try { (function() { 
var requirejs,require,define;
(function(){function J(d){return ia.call(d)==="[object Function]"}function X(d){return ia.call(d)==="[object Array]"}function Y(d,f,l){for(var j in f)if(!(j in F)&&(!(j in d)||l))d[j]=f[j];return h}function K(d,f,l){d=new Error(f+"\nhttp://requirejs.org/docs/errors.html#"+d);if(l)d.originalError=l;return d}function ja(d,f,l){var j,q,o;for(j=0;o=f[j];j++){o=typeof o==="string"?{name:o}:o;q=o.location;if(l&&(!q||q.indexOf("/")!==0&&q.indexOf(":")===-1))q=l+"/"+(q||o.name);d[o.name]={name:o.name,location:q||
o.name,main:(o.main||"main").replace(ua,"").replace(ka,"")}}}function Z(d,f){if(d.holdReady)d.holdReady(f);else if(f)d.readyWait+=1;else d.ready(true)}function va(d){function f(a){var b,c;for(b=0;c=a[b];b++)if(c==="."){a.splice(b,1);b-=1}else if(c==="..")if(b===1&&(a[2]===".."||a[0]===".."))break;else if(b>0){a.splice(b-1,2);b-=2}}function l(a,b){var c;if(a.charAt(0)===".")if(b){if(r.pkgs[b])b=[b];else{b=b.split("/");b=b.slice(0,b.length-1)}a=b.concat(a.split("/"));f(a);c=r.pkgs[b=a[0]];a=a.join("/");
if(c&&a===b+"/"+c.main)a=b}return a}function j(a,b){var c=a?a.indexOf("!"):-1,e=null,g=b?b.name:null,k=a,n,m;if(c!==-1){e=a.substring(0,c);a=a.substring(c+1,a.length)}if(e)e=l(e,g);if(a){if(e)n=(c=p[e])?c.normalize?c.normalize(a,function(u){return l(u,g)}):l(a,g):"__$p"+g+"@"+a;else n=l(a,g);m=$[n];if(!m){m=h.toModuleUrl?h.toModuleUrl(i,n,b):i.nameToUrl(n,null,b);$[n]=m}}return{prefix:e,name:n,parentMap:b,url:m,originalName:k,fullName:e?e+"!"+n:n}}function q(){var a=true,b=r.priorityWait,c,e;if(b){for(e=
0;c=b[e];e++)if(!v[c]){a=false;break}a&&delete r.priorityWait}return a}function o(a){return function(b){a.exports=b}}function L(a,b,c){return function(){var e=[].concat(wa.call(arguments,0)),g;if(c&&J(g=e[e.length-1]))g.__requireJsBuild=true;e.push(b);return a.apply(null,e)}}function la(a,b){b=L(i.require,a,b);Y(b,{nameToUrl:L(i.nameToUrl,a),toUrl:L(i.toUrl,a),defined:L(i.requireDefined,a),specified:L(i.requireSpecified,a),ready:h.ready,isBrowser:h.isBrowser});if(h.paths)b.paths=h.paths;return b}
function xa(a){var b,c,e,g,k,n,m,u=T[a];if(u)for(g=0;c=u[g];g++){b=c.fullName;c=j(c.originalName,c.parentMap);c=c.fullName;e=w[b]||[];k=w[c];if(c!==b){if(b in y){delete y[b];y[c]=true}w[c]=k?k.concat(e):e;delete w[b];for(k=0;k<e.length;k++){m=e[k].depArray;for(n=0;n<m.length;n++)if(m[n]===b)m[n]=c}}}delete T[a]}function ma(a){var b=a.prefix,c=a.fullName;if(!(y[c]||c in p)){if(b&&!G[b]){G[b]=undefined;(T[b]||(T[b]=[])).push(a);(w[b]||(w[b]=[])).push({onDep:function(e){e===b&&xa(b)}});ma(j(b))}i.paused.push(a)}}
function aa(a){var b,c,e;b=a.callback;var g=a.fullName,k=[],n=a.depArray;if(b&&J(b)){if(n)for(b=0;b<n.length;b++)k.push(a.deps[n[b]]);try{c=h.execCb(g,a.callback,k,p[g])}catch(m){e=m}if(g)if(a.cjsModule&&a.cjsModule.exports!==undefined)c=p[g]=a.cjsModule.exports;else if(c===undefined&&a.usingExports)c=p[g];else p[g]=c}else if(g)c=p[g]=b;if(B[a.waitId]){delete B[a.waitId];a.isDone=true;i.waitCount-=1;if(i.waitCount===0)ba=[]}if(e){e=K("defineerror",'Error evaluating module "'+g+'" at location "'+(g?
j(g).url:"")+'":\n'+e+"\nfileName:"+(e.fileName||e.sourceURL)+"\nlineNumber: "+(e.lineNumber||e.line),e);e.moduleName=g;return h.onError(e)}if(g)if(a=w[g]){for(b=0;b<a.length;b++)a[b].onDep(g,c);delete w[g]}}function na(a,b,c,e){a=j(a,e);var g=a.name,k=a.fullName,n={},m={waitId:g||ya+za++,depCount:0,depMax:0,prefix:a.prefix,name:g,fullName:k,deps:{},depArray:b,callback:c,onDep:function(oa,Aa){if(!(oa in m.deps)){m.deps[oa]=Aa;m.depCount+=1;m.depCount===m.depMax&&aa(m)}}},u,t;if(k){if(k in p||v[k]===
true||k==="jquery"&&r.jQuery&&r.jQuery!==c().fn.jquery)return;y[k]=true;v[k]=true;k==="jquery"&&c&&U(c())}for(c=0;c<b.length;c++)if(u=b[c]){u=j(u,g?a:e);t=u.fullName;b[c]=t;if(t==="require")m.deps[t]=la(a);else if(t==="exports"){m.deps[t]=p[k]={};m.usingExports=true}else if(t==="module"){m.cjsModule=u=m.deps[t]={id:g,uri:g?i.nameToUrl(g,null,e):undefined,exports:p[k]};u.setExports=o(u)}else if(t in p&&!(t in B))m.deps[t]=p[t];else if(!n[t]){m.depMax+=1;ma(u);(w[t]||(w[t]=[])).push(m);n[t]=true}}if(m.depCount===
m.depMax)aa(m);else{B[m.waitId]=m;ba.push(m);i.waitCount+=1}}function M(a){na.apply(null,a);v[a[0]]=true}function pa(a,b){if(!a.isDone){var c=a.fullName,e=a.depArray,g,k;if(c){if(b[c])return p[c];b[c]=true}for(k=0;k<e.length;k++)(g=e[k])&&!a.deps[g]&&B[g]&&a.onDep(g,pa(B[g],b));return c?p[c]:undefined}}function ca(){var a=r.waitSeconds*1E3,b=a&&i.startTime+a<(new Date).getTime();a="";var c=false,e=false,g;if(!(i.pausedCount>0)){if(r.priorityWait)if(q())C();else return;for(g in v)if(!(g in F)){c=true;
if(!v[g])if(b)a+=g+" ";else{e=true;break}}if(c||i.waitCount){if(b&&a){g=K("timeout","Load timeout for modules: "+a);g.requireType="timeout";g.requireModules=a;return h.onError(g)}if(e||i.scriptCount){if((A||qa)&&!da)da=setTimeout(function(){da=0;ca()},50)}else{if(i.waitCount){for(D=0;a=ba[D];D++)pa(a,{});if(ea<5){ea+=1;ca()}}ea=0;h.checkReadyState()}}}}function ra(a,b){var c=b.name,e=b.fullName,g;if(!(e in p||e in v)){G[a]||(G[a]=p[a]);v[e]||(v[e]=false);g=function(k){h.onPluginLoad&&h.onPluginLoad(i,
a,c,k);aa({prefix:b.prefix,name:b.name,fullName:b.fullName,callback:function(){return k}});v[e]=true};g.fromText=function(k,n){var m=N;i.loaded[k]=false;i.scriptCount+=1;if(m)N=false;h.exec(n);if(m)N=true;i.completeLoad(k)};G[a].load(c,la(b.parentMap,true),g,r)}}function Ba(a){if(a.prefix&&a.name.indexOf("__$p")===0&&p[a.prefix])a=j(a.originalName,a.parentMap);var b=a.prefix,c=a.fullName,e=i.urlFetched;if(!(y[c]||v[c])){y[c]=true;if(b)if(p[b])ra(b,a);else{if(!O[b]){O[b]=[];(w[b]||(w[b]=[])).push({onDep:function(g){if(g===
b){var k,n=O[b];for(g=0;g<n.length;g++){k=n[g];ra(b,j(k.originalName,k.parentMap))}delete O[b]}}})}O[b].push(a)}else if(!e[a.url]){h.load(i,c,a.url);e[a.url]=true}}}var i,C,r={waitSeconds:7,baseUrl:s.baseUrl||"./",paths:{},pkgs:{}},P=[],y={require:true,exports:true,module:true},$={},p={},v={},B={},ba=[],za=0,w={},G={},O={},fa=0,T={};U=function(a){if(!i.jQuery)if(a=a||(typeof jQuery!=="undefined"?jQuery:null))if(!(r.jQuery&&a.fn.jquery!==r.jQuery))if("holdReady"in a||"readyWait"in a){i.jQuery=a;M(["jquery",
[],function(){return jQuery}]);if(i.scriptCount){Z(a,true);i.jQueryIncremented=true}}};C=function(){var a,b,c;fa+=1;if(i.scriptCount<=0)i.scriptCount=0;for(;P.length;){a=P.shift();if(a[0]===null)return h.onError(K("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));else M(a)}if(!r.priorityWait||q())for(;i.paused.length;){c=i.paused;i.pausedCount+=c.length;i.paused=[];for(b=0;a=c[b];b++)Ba(a);i.startTime=(new Date).getTime();i.pausedCount-=c.length}fa===1&&ca();fa-=1};i={contextName:d,
config:r,defQueue:P,waiting:B,waitCount:0,specified:y,loaded:v,urlMap:$,scriptCount:0,urlFetched:{},defined:p,paused:[],pausedCount:0,plugins:G,managerCallbacks:w,makeModuleMap:j,normalize:l,configure:function(a){var b,c,e;if(a.baseUrl)if(a.baseUrl.charAt(a.baseUrl.length-1)!=="/")a.baseUrl+="/";b=r.paths;e=r.pkgs;Y(r,a,true);if(a.paths){for(c in a.paths)c in F||(b[c]=a.paths[c]);r.paths=b}if((b=a.packagePaths)||a.packages){if(b)for(c in b)c in F||ja(e,b[c],c);a.packages&&ja(e,a.packages);r.pkgs=
e}if(a.priority){c=i.requireWait;i.requireWait=false;i.takeGlobalQueue();C();i.require(a.priority);C();i.requireWait=c;r.priorityWait=a.priority}if(a.deps||a.callback)i.require(a.deps||[],a.callback);a.ready&&h.ready(a.ready)},requireDefined:function(a,b){return j(a,b).fullName in p},requireSpecified:function(a,b){return j(a,b).fullName in y},require:function(a,b,c){if(typeof a==="string"){if(h.get)return h.get(i,a,b);c=b;b=j(a,c);a=b.fullName;if(!(a in p))return h.onError(K("notloaded","Module name '"+
b.fullName+"' has not been loaded yet for context: "+d));return p[a]}na(null,a,b,c);if(!i.requireWait)for(;!i.scriptCount&&i.paused.length;){i.takeGlobalQueue();C()}},takeGlobalQueue:function(){if(V.length){Ca.apply(i.defQueue,[i.defQueue.length-1,0].concat(V));V=[]}},completeLoad:function(a){var b;for(i.takeGlobalQueue();P.length;){b=P.shift();if(b[0]===null){b[0]=a;break}else if(b[0]===a)break;else{M(b);b=null}}b?M(b):M([a,[],a==="jquery"&&typeof jQuery!=="undefined"?function(){return jQuery}:null]);
v[a]=true;U();if(h.isAsync)i.scriptCount-=1;C();h.isAsync||(i.scriptCount-=1)},toUrl:function(a,b){var c=a.lastIndexOf("."),e=null;if(c!==-1){e=a.substring(c,a.length);a=a.substring(0,c)}return i.nameToUrl(a,e,b)},nameToUrl:function(a,b,c){var e,g,k,n,m=i.config;a=l(a,c&&c.fullName);if(h.jsExtRegExp.test(a))b=a+(b?b:"");else{e=m.paths;g=m.pkgs;c=a.split("/");for(n=c.length;n>0;n--){k=c.slice(0,n).join("/");if(e[k]){c.splice(0,n,e[k]);break}else if(k=g[k]){a=a===k.name?k.location+"/"+k.main:k.location;
c.splice(0,n,a);break}}b=c.join("/")+(b||".js");b=(b.charAt(0)==="/"||b.match(/^\w+:/)?"":m.baseUrl)+b}return m.urlArgs?b+((b.indexOf("?")===-1?"?":"&")+m.urlArgs):b}};i.jQueryCheck=U;i.resume=C;return i}function Da(){var d,f,l;if(Q&&Q.readyState==="interactive")return Q;d=document.getElementsByTagName("script");for(f=d.length-1;f>-1&&(l=d[f]);f--)if(l.readyState==="interactive")return Q=l;return null}var Ea=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,Fa=/require\(["']([^'"\s]+)["']\)/g,ua=/^\.\//,ka=/\.js$/,
ia=Object.prototype.toString,x=Array.prototype,wa=x.slice,Ca=x.splice,A=!!(typeof window!=="undefined"&&navigator&&document),qa=!A&&typeof importScripts!=="undefined",Ga=A&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,sa=typeof opera!=="undefined"&&opera.toString()==="[object Opera]",ya="_r@@",F={},H={},V=[],Q=null,Ha=false,ea=0,N=false,h;x={};var ga,s,I,W,z,R,S,D,ha,ta,E,U,da;if(typeof define==="undefined"){if(typeof requirejs!=="undefined")if(J(requirejs))return;else{x=
requirejs;requirejs=undefined}if(typeof require!=="undefined"&&!J(require)){x=require;require=undefined}h=requirejs=function(d,f,l){var j="_",q;if(!X(d)&&typeof d!=="string"){q=d;if(X(f)){d=f;f=l}else d=[]}if(q&&q.context)j=q.context;l=H[j]||(H[j]=va(j));q&&l.configure(q);return l.require(d,f)};if(typeof require==="undefined")require=h;h.toUrl=function(d){return H._.toUrl(d)};h.version="0.25.0";h.isArray=X;h.isFunction=J;h.mixin=Y;h.jsExtRegExp=/^\/|:|\?|\.js$/;s=h.s={contexts:H,skipAsync:{},isPageLoaded:!A,
readyCalls:[]};if(h.isAsync=h.isBrowser=A){I=s.head=document.getElementsByTagName("head")[0];if(W=document.getElementsByTagName("base")[0])I=s.head=W.parentNode}h.onError=function(d){throw d;};h.load=function(d,f,l){var j=d.loaded;Ha=false;j[f]||(j[f]=false);d.scriptCount+=1;h.attach(l,d,f);if(d.jQuery&&!d.jQueryIncremented){Z(d.jQuery,true);d.jQueryIncremented=true}};define=h.def=function(d,f,l){var j;if(typeof d!=="string"){l=f;f=d;d=null}if(!h.isArray(f)){l=f;f=[]}if(!d&&!f.length&&h.isFunction(l))if(l.length){l.toString().replace(Ea,
"").replace(Fa,function(q,o){f.push(o)});f=(l.length===1?["require"]:["require","exports","module"]).concat(f)}if(N){j=ga||Da();if(!j)return h.onError(K("interactive","No matching script interactive for "+l));d||(d=j.getAttribute("data-requiremodule"));j=H[j.getAttribute("data-requirecontext")]}(j?j.defQueue:V).push([d,f,l])};define.amd={multiversion:true,plugins:true,jQuery:true};h.exec=function(d){return eval(d)};h.execCb=function(d,f,l,j){return f.apply(j,l)};h.onScriptLoad=function(d){var f=d.currentTarget||
d.srcElement,l;if(d.type==="load"||Ga.test(f.readyState)){Q=null;d=f.getAttribute("data-requirecontext");l=f.getAttribute("data-requiremodule");H[d].completeLoad(l);f.detachEvent&&!sa?f.detachEvent("onreadystatechange",h.onScriptLoad):f.removeEventListener("load",h.onScriptLoad,false)}};h.attach=function(d,f,l,j,q){var o;if(A){j=j||h.onScriptLoad;o=f&&f.config&&f.config.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");o.type=q||"text/javascript";
o.charset="utf-8";o.async=!s.skipAsync[d];f&&o.setAttribute("data-requirecontext",f.contextName);o.setAttribute("data-requiremodule",l);if(o.attachEvent&&!sa){N=true;o.attachEvent("onreadystatechange",j)}else o.addEventListener("load",j,false);o.src=d;ga=o;W?I.insertBefore(o,W):I.appendChild(o);ga=null;return o}else if(qa){j=f.loaded;j[l]=false;importScripts(d);f.completeLoad(l)}return null};if(A){z=document.getElementsByTagName("script");for(D=z.length-1;D>-1&&(R=z[D]);D--){if(!I)I=R.parentNode;
if(S=R.getAttribute("data-main")){if(!x.baseUrl){z=S.split("/");R=z.pop();z=z.length?z.join("/")+"/":"./";x.baseUrl=z;S=R.replace(ka,"")}x.deps=x.deps?x.deps.concat(S):[S];break}}}s.baseUrl=x.baseUrl;h.pageLoaded=function(){if(!s.isPageLoaded){s.isPageLoaded=true;ha&&clearInterval(ha);if(ta)document.readyState="complete";h.callReady()}};h.checkReadyState=function(){var d=s.contexts,f;for(f in d)if(!(f in F))if(d[f].waitCount)return;s.isDone=true;h.callReady()};h.callReady=function(){var d=s.readyCalls,
f,l,j;if(s.isPageLoaded&&s.isDone){if(d.length){s.readyCalls=[];for(f=0;l=d[f];f++)l()}d=s.contexts;for(j in d)if(!(j in F)){f=d[j];if(f.jQueryIncremented){Z(f.jQuery,false);f.jQueryIncremented=false}}}};h.ready=function(d){s.isPageLoaded&&s.isDone?d():s.readyCalls.push(d);return h};if(A){if(document.addEventListener){document.addEventListener("DOMContentLoaded",h.pageLoaded,false);window.addEventListener("load",h.pageLoaded,false);if(!document.readyState){ta=true;document.readyState="loading"}}else if(window.attachEvent){window.attachEvent("onload",
h.pageLoaded);if(self===self.top)ha=setInterval(function(){try{if(document.body){document.documentElement.doScroll("left");h.pageLoaded()}}catch(d){}},30)}document.readyState==="complete"&&h.pageLoaded()}h(x);if(h.isAsync&&typeof setTimeout!=="undefined"){E=s.contexts[x.context||"_"];E.requireWait=true;setTimeout(function(){E.requireWait=false;E.takeGlobalQueue();E.jQueryCheck();E.scriptCount||E.resume();h.checkReadyState()},0)}}})();/*
 jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==
typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,
t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,
t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=
S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),
isReady:!0,error:function(e){throw new Error(e);},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e))for(n=e.length;r<n;r++){if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},
makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],
o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,
t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\x00-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+
W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+
M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>
10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\x00"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,
r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1])if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else{if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,
e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=
[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?
1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,
le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&
(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),
d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=
function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===
n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||
v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";
var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||
a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},
j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,
t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||
e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e);},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),
e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i)if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else{if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",
first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&
(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,
r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":
"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]=
{}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,
r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),
lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||
~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();
return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),
gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,
p];if(n)while(e=e[u]){if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,
r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],
i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,
e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),
n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=
e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=
se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||
t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(j).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?
1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=
d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=
0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&
3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,
D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,
e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,
"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=
e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e;}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,
t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?
r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||
(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),
this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");
t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,
m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,
r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+
e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e;})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&
!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}
function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):
e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};
var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,
t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==
(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,
i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,
e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,
e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,
t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),
o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;
ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],
tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||
(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=
""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,
s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i])if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();
else{if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,we)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,
i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),
namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||
{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,
"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&
!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=
[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,
t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==
e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=
e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=
this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),
S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Se(this,e,Ce),!1},trigger:function(){return Se(this,e),!0},_default:function(){return!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,
arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){S.event.remove(this,e,n,t)})}});
var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,
"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),De)).length;c<f;c++)u=
e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&
(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<
i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return $(this,function(e){return void 0===e?
S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,
function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===
e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",
insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Me=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},
Ie=new RegExp(ne.join("|"),"i");function We(e,t,n){var r,i,o,a,s=e.style;return(n=n||Re(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Pe.test(a)&&Ie.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",
l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip=
"content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",
t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var Be=["Webkit","Moz","ms"],$e=E.createElement("div").style,_e={};function ze(e){var t=S.cssProps[e]||_e[e];return t||(e in $e?e:_e[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Be.length;
while(n--)if((e=Be[n]+t)in $e)return e}(e)||e)}var Ue=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ve={position:"absolute",visibility:"hidden",display:"block"},Ge={letterSpacing:"0",fontWeight:"400"};function Ye(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Qe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,
"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Je(e,t,n){var r=Re(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=We(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&
A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Qe(e,t,n||(i?"border":"content"),o,r,a)+"px"}function Ke(e,t,n,r,i){return new Ke.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,
gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Xe.test(t),l=e.style;if(u||(t=ze(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==
o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Xe.test(t)||(t=ze(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=We(e,t,r)),"normal"===i&&t in Ge&&(i=Ge[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,
t,n){if(t)return!Ue.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,u,n):Me(e,Ve,function(){return Je(e,u,n)})},set:function(e,t,n){var r,i=Re(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Qe(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Qe(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Ye(0,t,s)}}}),S.cssHooks.marginLeft=
Fe(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-Me(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Ye)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,
i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=Ke).prototype={constructor:Ke,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=Ke.propHooks[this.prop];return e&&e.get?e.get(this):Ke.propHooks._default.get(this)},run:function(e){var t,
n=Ke.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ke.propHooks._default.set(this),this}}).init.prototype=Ke.prototype,(Ke.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,
e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[ze(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ke.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=Ke.prototype.init,S.fx.step={};var Ze,et,tt,nt,rt=/^(?:toggle|show|hide)$/,
it=/queueHooks$/;function ot(){et&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ot):C.setTimeout(ot,S.fx.interval),S.fx.tick())}function at(){return C.setTimeout(function(){Ze=void 0}),Ze=Date.now()}function st(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function lt(o,e,
t){var n,a,r=0,i=lt.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=Ze||at(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:Ze||at(),duration:t.duration,
tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=
a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=lt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ut,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,
t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,
S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],rt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===
c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ut(g?v[r]:0,r,p),r in v||(v[r]=u.start,
g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),
r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=lt(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||
"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&it.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,
!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(st(r,!0),e,t,n)}}),S.each({slideDown:st("show"),slideUp:st("hide"),slideToggle:st("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,
r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(Ze=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),Ze=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){et||(et=!0,ot())},S.fx.stop=function(){et=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=
C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},tt=E.createElement("input"),nt=E.createElement("select").appendChild(E.createElement("option")),tt.type="checkbox",y.checkOn=""!==tt.value,y.optSelected=nt.selected,(tt=E.createElement("input")).value="t",tt.type="radio",y.radioValue="t"===tt.value;var ct,ft=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,
t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",
t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=ft[t]||S.find.attr;ft[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=ft[o],ft[o]=r,r=null!=a(e,t,n)?o:null,ft[o]=i),r}});var pt=/^(?:input|select|textarea|button)$/i,dt=/^(?:a|area)$/i;function ht(e){return(e.match(P)||
[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,
n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex",
"readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,gt(this)))});if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,
n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,gt(this)))});if(!arguments.length)return this.attr("class","");if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):
m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,gt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=vt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=gt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+ht(gt(n))+" ").indexOf(t))return!0;return!1}});
var yt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,
"value"))?e:"string"==typeof(e=t.value)?e.replace(yt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:ht(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,
i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var mt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};
S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!mt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=
void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,mt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&
(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,xt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,xt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,
t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,
r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var bt=C.location,wt={guid:Date.now()},Tt=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Ct=/\[\]$/,Et=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;
function At(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||Ct.test(n)?i(n,t):At(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)At(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)At(n,e[n],
t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&kt.test(this.nodeName)&&!St.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):
{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Nt=/%20/g,jt=/#.*$/,Dt=/([?&])_=[^&]*/,qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Ot={},Pt={},Rt="*/".concat("*"),Mt=E.createElement("a");function It(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Wt(t,i,o,a){var s={},u=t===Pt;function l(e){var r;return s[e]=!0,
S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Ft(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Mt.href=bt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol),global:!0,
processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Rt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ft(Ft(e,
S.ajaxSettings),t):Ft(S.ajaxSettings,e)},ajaxPrefilter:It(Ot),ajaxTransport:It(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=qt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=
n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||bt.href)+"").replace(Ht,
bt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Mt.protocol+"//"+Mt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Wt(Ot,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),
v.hasContent=!Lt.test(v.type),f=v.url.replace(jt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Nt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Tt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Dt,"$1"),o=(Tt.test(f)?"&":"?")+"_="+wt.guid++ +o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&
T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+Rt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Wt(Pt,v,
t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));
if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&S.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=
t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&
(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,
t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},
dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},
wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},$t=S.ajaxSettings.xhr();
y.cors=!!$t&&"withCredentials"in $t,y.ajax=$t=!!$t,S.ajaxTransport(function(i){var o,a;if(y.cors||$t&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=
r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Bt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&
i.data||null)}catch(e){if(o)throw e;}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,
i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&
(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===
i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=
N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=ht(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,
e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&
(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();
else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;
return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},
function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),
S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),
function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Xt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=
X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Xt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Vt=C.jQuery,Gt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Gt),e&&C.jQuery===S&&(C.jQuery=Vt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});var Bb="function"==typeof Object.defineProperties?Object.defineProperty:function(a,d,l){if(a==Array.prototype||a==Object.prototype)return a;a[d]=l.value;return a};function Cb(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var d=0;d<a.length;++d){var l=a[d];if(l&&l.Math==Math)return l}throw Error("Cannot find global object");}var Db=Cb(this);
function Eb(a,d){if(d)a:{var l=Db;a=a.split(".");for(var m=0;m<a.length-1;m++){var k=a[m];if(!(k in l))break a;l=l[k]}a=a[a.length-1];m=l[a];d=d(m);d!=m&&null!=d&&Bb(l,a,{configurable:!0,writable:!0,value:d})}}
Eb("String.prototype.matchAll",function(a){return a?a:function(d){if(d instanceof RegExp&&!d.global)throw new TypeError("RegExp passed into String.prototype.matchAll() must have global tag.");var l=new RegExp(d,d instanceof RegExp?void 0:"g"),m=this,k=!1,c={next:function(){if(k)return{value:void 0,done:!0};var h=l.exec(m);if(!h)return k=!0,{value:void 0,done:!0};""===h[0]&&(l.lastIndex+=1);return{value:h,done:!1}}};c[Symbol.iterator]=function(){return c};return c}});
(function(){function a(e){this.Op=e;this.Ft=null;this.Sc={}}function d(){this.Bi={};this.Bi[d.SCRIPT_URL]=[];this.Bi[d.THREE_JS_WEBGL_URL]="lib/ThreeWebGL.js";this.Bi[d.WEBVR_POLYFILL_URL]="lib/WebVRPolyfill.js";this.Bi[d.WEBXR_POLYFILL_URL]="lib/webxr-polyfill.js";this.Bi[d.HLS_URL]="lib/Hls.js";this.Bi[d.GS_URL]="lib/tdvgs.js";this.Bi[d.f6]="lib/basis/";this.Bi[d.w6]="lib/draco/";this.Bi[d.CURSORS_DIR_URL]="lib/cursors";this.Bi[d.SERVICE_WORKER_URL]="tdvplayersw.js";this.Bi[d.wz]="lib/webxr-input-profiles/";
this.Bi[d.BACKGROUND_PRELOAD_ENABLED]=void 0;this.Bi[d.EV]=void 0}function l(){this.uQ=[];this.o0=[];this.sYa=[];this.iW=null}function m(e){return"[object Array]"==Object.prototype.toString.call(e)}function k(e){return!!(window.location.hash&&0<=window.location.hash.indexOf("device="+e))}function c(e){return 0<=f.search(e.toLowerCase())}var h=window.TDV=window.TDV||{},f=navigator.userAgent.toLowerCase();l.prototype.getVersion=l.prototype.pEa=function(){return{MAJOR:"0",MINOR:"2252"}};
l.prototype.getClassByName=function(){};l.prototype.uxa=function(){if(this.iW)for(;0<this.uQ.length;){var e=this.uQ[0];this.uQ=this.uQ.slice(1);this.o0.push(e);this.URa(e)}};l.prototype.Eua=function(e){var g=document.createElement("a");g.href=e;return g.href};l.prototype.qUa=function(){var e=document.currentScript;e||(e=document.getElementsByTagName("head")[0].getElementsByTagName("script"),e=e[e.length-1]);return this.Eua(e.src)};l.prototype.URa=function(e){var g=this,n=e.Op.get(d.SELECTED_SCRIPT_URL);
setTimeout(function(){var q=document.createElement("script");q.type="text/javascript";q.src=n;document.getElementsByTagName("head")[0].appendChild(q);g.iW.tcb(e)},1)};l.prototype.defineScript=function(e){for(var g=[],n=this.qUa(),q=0;q<this.o0.length;q++){var p=this.o0[q],r=this.Eua(p.Op.get(d.SELECTED_SCRIPT_URL));r==n?(p.Op.set(d.SCRIPT_DATA,e),p.Kab(new this.iW(p,p.Op)),this.sYa.push(p)):g.push(r)}this.o0=g};l.prototype.create=l.prototype.create=function(e){var g=e.get(d.SCRIPT_URL);g=m(g)?this.oZa(g):
"string"===typeof g?g:"script.js";e.set(d.SELECTED_SCRIPT_URL,g);e=new h.Vna(e);this.uQ.push(e);this.uxa();return e};l.prototype.setPlayerClass=l.prototype.Jab=function(e){this.iW=e;this.uxa();this.trigger({name:"classesReady",source:this})};l.prototype.bind=l.prototype.bind=function(e,g,n,q){this.Sc=this.Sc||{};this.Sc[e]=this.Sc[e]||[];this.Sc[e].push({handler:g,context:n,immediate:q||!1})};l.prototype.unbind=l.prototype.unbind=function(e,g,n,q){this.Sc&&e in this.Sc&&(this.Sc[e]=this.Sc[e].filter(function(p){return p.handler!=
g||p.context!=n||p.immediate!=q}))};l.prototype.trigger=function(e){this.Sc&&e.name in this.Sc&&(this.Jz(e,!0),setTimeout(function(){this.Jz(e,!1)}.bind(this),0))};l.prototype.Jz=function(e,g){e.unbindCurrentHandler=function(){}.bind(this);for(var n=this.Sc[e.name],q=0;q<n.length;q++)if(n[q].immediate==g)try{n[q].handler.call(n[q].context||window,e)}catch(p){setTimeout(function(){throw p;},0)}};l.prototype.getOrientation=l.prototype.$r=function(){var e=screen.orientation&&screen.orientation.type||
window.orientation;return"portrait-primary"==e||"portrait-secondary"==e||0===e||180==e?h.cb.u7:"landscape-primary"==e||"landscape-secondary"==e||90==e||-90==e?h.cb.t7:window.innerWidth<window.innerHeight?h.cb.u7:h.cb.t7};l.prototype.oZa=function(e){if(0<e.length){for(var g=0;g<e.length;g++){var n=e[g];if(m(n)){if(this.Gza(n[0]))return n[1]}else if("string"===typeof n)return n}return e[0][1]}return"script.js"};l.prototype.Gza=function(e){if("string"===typeof e){var g=e.match(/^\s*default\s*$/);if(g)return!0;
if(g=e.match(/^\s*os\s*=\s*(\w+)\s*$/))return this.zd==g[1].toLowerCase();if(g=e.match(/^\s*browser\s*=\s*(\w+)\s*$/))return this.browser==g[1].toLowerCase();if(g=e.match(/^\s*device\s*=\s*(\w+)\s*$/))return this.Cj==g[1].toLowerCase();if(g=e.match(/^\s*screen_size\s*(<|>|=|<=|>=)\s*(\d+)\s*x\s*(\d+)\s*$/)){e=parseInt(g[2]);var n=parseInt(g[3]);switch(g[1]){case "<":var q=function(p,r){return p<r};break;case ">":q=function(p,r){return p>r};break;case "=":q=function(p,r){return p==r};break;case "<=":q=
function(p,r){return p<=r};break;case ">=":q=function(p,r){return p>=r}}return q(screen.width,e)&&q(screen.height,n)||this.mobile&&q(screen.width,n)&&q(screen.height,e)}return!1}if(m(e)){for(g=0;g<e.length;g++)if(!this.Gza(e[g]))return!1;return!0}return!1};l.prototype.ORIENTATION_LANDSCAPE=l.prototype.t7="landscape";l.prototype.ORIENTATION_PORTRAIT=l.prototype.u7="portrait";l.prototype.OS_IOS=l.prototype.TV="ios";l.prototype.OS_ANDROID=l.prototype.v7="android";l.prototype.OS_WINDOWS=l.prototype.Ona=
"windows";l.prototype.OS_WINDOWS_PHONE=l.prototype.z7="windows_phone";l.prototype.OS_MACOSX=l.prototype.w7="osx";l.prototype.OS_LINUX=l.prototype.Nna="linux";l.prototype.OS_QNX=l.prototype.y7="qnx";l.prototype.OS_OTHER=l.prototype.x7="other";l.prototype.BROWSER_TYPE_WEBKIT=l.prototype.QM="webkit";l.prototype.BROWSER_TYPE_OPERA=l.prototype.l6="opera";l.prototype.BROWSER_TYPE_MSIE=l.prototype.k6="msie";l.prototype.BROWSER_TYPE_MOZILLA=l.prototype.j6="mozilla";l.prototype.BROWSER_TYPE_OTHER=l.prototype.m6=
"other";l.prototype.BROWSER_SAFARI_IOS=l.prototype.sh="safari_ios";l.prototype.BROWSER_OPERA=l.prototype.vV="opera";l.prototype.BROWSER_SAFARI=l.prototype.Mj="safari";l.prototype.BROWSER_CHROME=l.prototype.po="chrome";l.prototype.BROWSER_EDGE=l.prototype.tH="edge";l.prototype.BROWSER_MSIE=l.prototype.Yy="msie";l.prototype.BROWSER_ANDROID=l.prototype.uV="android";l.prototype.BROWSER_MOZILLA=l.prototype.Fs="mozilla";l.prototype.BROWSER_OTHER=l.prototype.g6="other";l.prototype.BROWSER_SUBTYPE_SAMSUNG_INTERNET=
l.prototype.xV="samsunginternet";l.prototype.BROWSER_SUBTYPE_OCULUS_BROWSER=l.prototype.bv="oculusbrowser";l.prototype.BROWSER_SUBTYPE_PICO_BROWSER=l.prototype.cv="picobrowser";l.prototype.BROWSER_SUBTYPE_SAMSUNG_INTERNET_FOR_GEAR_VR=l.prototype.yV="samsunginternetgearvr";l.prototype.BROWSER_SUBTYPE_MI_BROWSER=l.prototype.h6="mibrowser";l.prototype.BROWSER_SUBTYPE_CHROME_IOS=l.prototype.vC="chromeios";l.prototype.BROWSER_SUBTYPE_SAFARI_IOS=l.prototype.OM="safari_ios";l.prototype.BROWSER_SUBTYPE_CHROME_WEBVIEW=
l.prototype.uH="chrome_webview";l.prototype.BROWSER_SUBTYPE_SAFARI_WEBVIEW=l.prototype.PM="safari_webview";l.prototype.BROWSER_SUBTYPE_TOUR_LAUNCHER=l.prototype.$y="tour_launcher";l.prototype.BROWSER_SUBTYPE_CHROMIUM_EDGE=l.prototype.uH="chromium_edge";l.prototype.BROWSER_SUBTYPE_FIREFOX_REALITY=l.prototype.Zy="firefox_reality";l.prototype.BROWSER_SUBTYPE_VR_APP=l.prototype.Gs="vrapp";l.prototype.BROWSER_SUBTYPE_XR_APP=l.prototype.Hs="xrapp";l.prototype.BROWSER_SUBTYPE_FACEBOOK_IOS_WEBVIEW=l.prototype.wV=
"facebook_ios_webview";l.prototype.BROWSER_SUBTYPE_OTHER=l.prototype.i6="other";l.prototype.BROWSER_VERSION_UNKNOWN=l.prototype.n6=-1;l.prototype.DEVICE_IPHONE=l.prototype.AV="iphone";l.prototype.DEVICE_IPAD=l.prototype.SM="ipad";l.prototype.DEVICE_IPOD=l.prototype.r6="ipod";l.prototype.DEVICE_OCULUS_QUEST_2=l.prototype.zH="oculusquest2";l.prototype.DEVICE_OCULUS_QUEST_3=l.prototype.TM="oculusquest3";l.prototype.DEVICE_PICO_G2=l.prototype.BV="picog2";l.prototype.DEVICE_PICO_G3=l.prototype.WM="picog3";
l.prototype.DEVICE_PICO_NEO2=l.prototype.CV="piconeo2";l.prototype.DEVICE_PICO_NEO3=l.prototype.XM="piconeo3";l.prototype.DEVICE_PICO_4=l.prototype.UM="pico4";l.prototype.DEVICE_PICO_4_ULTRA=l.prototype.VM="pico4ultra";l.prototype.DEVICE_VIVE_FOCUS=l.prototype.DV="vivefocus";l.prototype.DEVICE_OTHER=l.prototype.s6="other";l.prototype.os=l.prototype.zd=c("iphone")||c("ipad")||c("ipod")?l.prototype.TV:c("qnx")?l.prototype.y7:c("android")||c("oculusbrowser")&&c("linux")?l.prototype.v7:c("windows phone")?
l.prototype.z7:c("windows")?l.prototype.Ona:c("mac_powerpc")?l.prototype.w7:c("macintosh")?1<navigator.maxTouchPoints?l.prototype.TV:l.prototype.w7:c("linux")||c("x11")?l.prototype.Nna:l.prototype.x7;l.prototype.browser=l.prototype.browser=c("ipad")||c("iphone")||c("ipod")||c("macintosh")&&1<navigator.maxTouchPoints?l.prototype.sh:c("opera")?l.prototype.vV:c("edge")?l.prototype.tH:c("chrome")||c("crmo")?l.prototype.po:c("safari")?l.prototype.Mj:c("trident")||c("msie")?l.prototype.Yy:!c("compatible")&&
c("mozilla")?l.prototype.Fs:c("android")?l.prototype.uV:l.prototype.g6;l.prototype.browserType=l.prototype.ZK=l.prototype.browser==l.prototype.sh||l.prototype.browser==l.prototype.po||l.prototype.browser==l.prototype.uV||l.prototype.browser==l.prototype.Mj||c("webkit")?l.prototype.QM:l.prototype.browser==l.prototype.vV||c("opera")?l.prototype.l6:c("trident")||c("msie")?l.prototype.k6:!c("compatible")&&c("mozilla")?l.prototype.j6:l.prototype.m6;l.prototype.browserSubtype=l.prototype.jc=window.location.hash&&
0<=window.location.hash.indexOf("xrapp")?l.prototype.Hs:window.location.hash&&0<=window.location.hash.indexOf("vrapp")?l.prototype.Gs:c("picobrowser")?l.prototype.cv:c("oculusbrowser")?l.prototype.bv:c("xiaomi")||c("miui")?l.prototype.h6:c("samsungbrowser")&&c("android")?c("mobile vr")?l.prototype.yV:l.prototype.xV:c("ipad")||c("iphone")||c("ipod")?c("crios")?l.prototype.vC:c("fban")||c("fbav")?l.prototype.wV:c("safari")&&c("version")&&!navigator.standalone?l.prototype.OM:l.prototype.PM:c("electron")?
l.prototype.$y:c("chrome")&&c("wv")?l.prototype.uH:c("edg/")?l.prototype.Hma:!c("compatible")&&c("mozilla")&&c("mobile vr")?l.prototype.Zy:l.prototype.i6;l.prototype.browserVersion=l.prototype.YBa=function(){if(l.prototype.browser==l.prototype.Yy){var e=f.match(RegExp("MSIE ([0-9]{1,}[.0-9]{0,})"));if(null!=e)return parseFloat(e[1]);e=f.match(RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"));if(null!=e)return parseFloat(e[1])}return l.prototype.n6}();l.prototype.device=l.prototype.Cj=c("ipad")||c("macintosh")&&
1<navigator.maxTouchPoints?l.prototype.SM:c("iphone")?l.prototype.AV:c("ipod")?l.prototype.r6:k("picog2")?l.prototype.BV:k("piconeo2")?l.prototype.CV:k("piconeo3")?l.prototype.XM:k("vivefocus")?l.prototype.DV:k("oculusquest3")?l.prototype.TM:k("oculusquest2")?l.prototype.zH:k("oculusquest")?l.prototype.zH:l.prototype.jc==l.prototype.cv&&c("pico 4 ultra")?l.prototype.VM:l.prototype.jc==l.prototype.Hs&&c("picoa9210")?l.prototype.VM:l.prototype.jc==l.prototype.cv&&c("pico 4")?l.prototype.UM:l.prototype.jc==
l.prototype.Hs&&c("picoa8110")?l.prototype.UM:l.prototype.jc==l.prototype.cv&&c("pico g3")?l.prototype.WM:l.prototype.jc==l.prototype.Hs&&c("picoa7q10")?l.prototype.WM:l.prototype.jc==l.prototype.Hs&&c("pico neo 3")?l.prototype.XM:l.prototype.jc==l.prototype.bv&&(c("quest 3")||c("quest pro"))?l.prototype.TM:l.prototype.jc==l.prototype.bv&&c("quest 2")?l.prototype.zH:l.prototype.s6;a:{switch(l.prototype.zd){case l.prototype.v7:case l.prototype.TV:case l.prototype.z7:case l.prototype.y7:var b=!0;break a}b=
!1}l.prototype.mobile=l.prototype.mobile=b;h.PlayerAPI=h.cb=new l;d.prototype.append=d.prototype.append=function(e,g,n){e==d.SCRIPT_URL&&("undefined"==typeof n&&(n=g,g="default"),g=[g,n]);m(this.Bi[e])||(this.Bi[e]=[]);this.Bi[e].push(g)};d.prototype.set=d.prototype.set=function(e,g){this.Bi[e]=g};d.prototype.get=d.prototype.get=function(e){return this.Bi[e]};d.SCRIPT_URL=d.SCRIPT_URL="ScriptURL";d.SCRIPT_DATA=d.SCRIPT_DATA="ScriptData";d.FLASH_EXPRESS_INSTALLER_URL=d.FLASH_EXPRESS_INSTALLER_URL=
"FlashExpressInstallerURL";d.FLASH_AUDIO_PLAYER_URL=d.FLASH_AUDIO_PLAYER_URL="FlashAudioPlayerURL";d.FLASH_VIDEO_PLAYER_URL=d.FLASH_VIDEO_PLAYER_URL="FlashVideoPlayerURL";d.FLASH_PANORAMA_PLAYER_URL=d.FLASH_PANORAMA_PLAYER_URL="FlashPanoramaPlayerURL";d.GS_URL=d.GS_URL="GSURL";d.THREE_JS_WEBGL_URL=d.THREE_JS_WEBGL_URL="ThreeJSWebGLURL";d.WEBVR_POLYFILL_URL=d.WEBVR_POLYFILL_URL="WebVRPolyfillURL";d.WEBXR_POLYFILL_URL=d.WEBXR_POLYFILL_URL="WebXRPolyfillURL";d.WEBXR_INPUT_PROFILES_DIR_URL=d.wz="WebXRInputProfilesDirURL";
d.CAPTURA_VIEWER_URL=d.CAPTURA_VIEWER_URL="CapturaViewerURL";d.DASH_URL=d.DASH_URL="DashURL";d.HLS_URL=d.HLS_URL="HlsURL";d.BASIS_URL=d.f6="BasisURL";d.DRACO_URL=d.w6="DRACOURL";d.CONTAINER=d.CONTAINER="Container";d.SELECTED_SCRIPT_URL=d.SELECTED_SCRIPT_URL="SelectedScriptURL";d.BASE_DIR_URL=d.BASE_DIR_URL="BaseDirURL";d.QUERY_STRING_PARAMETERS=d.QUERY_STRING_PARAMETERS="QueryStringParameters";d.CURSORS_DIR_URL=d.CURSORS_DIR_URL="CursorsDirURL";d.BACKGROUND_PRELOAD_ENABLED=d.BACKGROUND_PRELOAD_ENABLED=
"BackgroundPreloadEnabled";d.ACTIVE_VIDEO_ELEMENT=d.ACTIVE_VIDEO_ELEMENT="ActiveVideoElement";d.SERVICE_WORKER_URL=d.SERVICE_WORKER_URL="ServiceWorkerURL";d.PINCH_TO_ZOOM_ENABLED=d.TMa="PinchToZoomEnabled";d.DOWNLOAD_DISABLED=d.EV="DownloadDisabled";h.PlayerSettings=h.PlayerSettings=d;h.PlayerEvent=h.XV=function(e,g,n,q){this.name=e;this.data=this.originalEvent=g;this.sourceClassName=n[n.length-1];this.sourceClassPath=n;this.sourceId=q};a.prototype.Kab=function(e){this.Ft=e};a.prototype["delete"]=
function(){this.Ft&&(this.Ft.clear(),this.Ft=null)};a.prototype.getById=a.prototype.uB=function(e){return this.Ft?this.Ft.H6a(e):null};a.prototype.getByClassName=a.prototype.Xi=function(e){return this.Ft?this.Ft.Xi(e):[]};a.prototype.createInstance=a.prototype.Dm=function(e){return this.Ft.Dm(e)};a.prototype.disposeInstance=a.prototype.gL=function(e){return this.Ft.gL(e)};a.prototype.bind=a.prototype.bind=function(e,g,n,q){var p=e.split(":");e=p[0];p=1<p.length?p[1]:"*";this.Sc[e]=this.Sc[e]||{};
this.Sc[e][p]=this.Sc[e][p]||[];this.Sc[e][p].push({handler:g,context:n,immediate:q});return this};a.prototype.unbind=a.prototype.unbind=function(e,g,n,q){var p=e.split(":");e=p[0];p=1<p.length?p[1]:"*";if(e in this.Sc&&p in this.Sc[e]){for(var r=[],t=this.Sc[e][p],u=0;u<t.length;u++){var v=t[u];v.handler==g&&v.context==n&&v.immediate==q||r.push(v)}this.Sc[e][p]=r}};a.prototype.bindOnObject=function(e,g,n,q,p){return this.bind(g+":"+this.uaa(e),n,q,p)};a.prototype.unbindOnObject=function(e,g,n,q,
p){return this.unbind(g+":"+this.uaa(e),n,q,p)};a.prototype.bindOnObjectsOf=function(e,g,n,q,p){return this.bind(g+":"+this.jaa(e),n,q,p)};a.prototype.unbindOnObjectsOf=function(e,g,n,q,p){return this.unbind(g+":"+this.jaa(e),n,q,p)};a.prototype.cookiesEnabled=a.prototype.E4a=!1;a.DEFAULT_PANORAMA_HFOV=a.HLa=l.prototype.mobile?90:110;a.prototype.trigger=function(e){if(e.name in this.Sc){this.Jz(e,!0);var g=this;setTimeout(function(){g.Jz(e,!1)},0)}};a.prototype.Jz=function(e,g){g=this.CTa(e,g);for(var n=
0;n<g.length;n++)try{g[n].handler.call(g[n].context||window,e)}catch(q){console.log("Exception handling event "+(e&&e.name),q.message,q.stack)}};a.prototype.CTa=function(e,g){var n=[];if(e.name in this.Sc){for(var q=[],p=0;p<e.sourceClassPath.length;p++)q.push(this.jaa(e.sourceClassPath[p]));e.sourceId&&q.push(this.uaa(e.sourceId));q.push("*");e=this.Sc[e.name];for(p=0;p<q.length;p++)for(var r=e[q[p]]||[],t=0;t<r.length;t++)!!r[t].immediate==!!g&&n.push(r[t])}return n};a.prototype.uaa=function(e){return"instance("+
e+")"};a.prototype.jaa=function(e){return"className("+e+")"};h.Player=h.Vna=a})();
var Z=this&&this.$db||function(){function a(d,l){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,k){m.__proto__=k}||function(m,k){for(var c in k)Object.prototype.hasOwnProperty.call(k,c)&&(m[c]=k[c])};return a(d,l)}return function(d,l){function m(){this.constructor=d}if("function"!==typeof l&&null!==l)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(d,l);d.prototype=null===l?Object.create(l):(m.prototype=l.prototype,new m)}}();
define("jquery.mod",["require","jquery"],function(a){return a("jquery").noConflict(!0)});
(function(){var a=window.TDV||(window.TDV={});(function(){(function(){function d(I,P){return I.TPa?r(P).chain():P}function l(I){return"\\"+ca[I]}function m(I){function P(Y){return I[Y]}var R="(?:"+r.keys(I).join("|")+")",M=RegExp(R),Q=RegExp(R,"g");return function(Y){return Y=null==Y?"":""+Y,M.test(Y)?Y.replace(Q,P):Y}}function k(I,P,R,M){if(I===P)return 0!==I||1/I===1/P;if(null==I||null==P)return I===P;I instanceof r&&(I=I.JF);P instanceof r&&(P=P.JF);var Q=E.call(I);if(Q!==E.call(P))return!1;switch(Q){case "[object RegExp]":case "[object String]":return""+
I==""+P;case "[object Number]":return+I!==+I?+P!==+P:0===+I?1/+I===1/P:+I===+P;case "[object Date]":case "[object Boolean]":return+I===+P}Q="[object Array]"===Q;if(!Q){if("object"!=typeof I||"object"!=typeof P)return!1;var Y=I.constructor,ba=P.constructor;if(Y!==ba&&!(r.isFunction(Y)&&Y instanceof Y&&r.isFunction(ba)&&ba instanceof ba)&&"constructor"in I&&"constructor"in P)return!1}R=R||[];M=M||[];for(Y=R.length;Y--;)if(R[Y]===I)return M[Y]===P;if(R.push(I),M.push(P),Q){if(Y=I.length,Y!==P.length)return!1;
for(;Y--;)if(!k(I[Y],P[Y],R,M))return!1}else{var da;Q=r.keys(I);if(Y=Q.length,r.keys(P).length!==Y)return!1;for(;Y--;)if(da=Q[Y],!r.has(P,da)||!k(I[da],P[da],R,M))return!1}return R.pop(),M.pop(),!0}function c(I,P,R,M,Q){if(!(M instanceof P))return I.apply(R,Q);P=g(I.prototype);I=I.apply(P,Q);return r.IL(I)?I:P}function h(I,P,R,M){var Q=[],Y=0;M=M||0;for(var ba=X(I);ba>M;M++){var da=I[M];if(b(da)&&(r.isArray(da)||r.isArguments(da))){P||(da=h(da,P,R));var fa=0,ha=da.length;for(Q.length+=ha;ha>fa;)Q[Y++]=
da[fa++]}else R||(Q[Y++]=da)}return Q}function f(I){return function(P,R,M){var Q={};return R=q(R,M),r.each(P,function(Y,ba){ba=R(Y,ba,P);I(Q,Y,ba)}),Q}}function b(I){I=X(I);return"number"==typeof I&&0<=I&&U>=I}function e(I){return function(P){return null==P?void 0:P[I]}}function g(I){if(!r.IL(I))return{};if(S)return S(I);t.prototype=I;I=new t;return t.prototype=null,I}function n(I,P){return function(R){var M=arguments.length;if(2>M||null==R)return R;for(var Q=1;M>Q;Q++)for(var Y=arguments[Q],ba=I(Y),
da=ba.length,fa=0;da>fa;fa++){var ha=ba[fa];P&&void 0!==R[ha]||(R[ha]=Y[ha])}return R}}function q(I,P,R){return null==I?r.identity:r.isFunction(I)?p(I,P,R):r.IL(I)?r.o8a(I):r.QHa(I)}function p(I,P,R){if(void 0===P)return I;switch(null==R?3:R){case 1:return function(M){return I.call(P,M)};case 2:return function(M,Q){return I.call(P,M,Q)};case 3:return function(M,Q,Y){return I.call(P,M,Q,Y)};case 4:return function(M,Q,Y,ba){return I.call(P,M,Q,Y,ba)}}return function(){return I.apply(P,arguments)}}function r(I){return I instanceof
r?I:this instanceof r?void(this.JF=I):new r(I)}function t(){}function u(I){return function(P,R,M,Q){R=p(R,Q,4);var Y=!b(P)&&r.keys(P),ba=(Y||P).length,da=0<I?0:ba-1;3>arguments.length&&(M=P[Y?Y[da]:da],da+=I);for(var fa=R,ha=M;0<=da&&ba>da;da+=I){var ia=Y?Y[da]:da;ha=fa(ha,P[ia],ia,P)}return ha}}function v(I){return function(P,R,M){R=q(R,M);M=X(P);for(var Q=0<I?0:M-1;0<=Q&&M>Q;Q+=I)if(R(P[Q],Q,P))return Q;return-1}}function w(I,P,R){return function(M,Q,Y){var ba=0,da=X(M);if("number"==typeof Y)0<
I?ba=0<=Y?Y:Math.max(Y+da,ba):da=0<=Y?Math.min(Y+1,da):Y+da+1;else if(R&&Y&&da)return Y=R(M,Q),M[Y]===Q?Y:-1;if(Q!==Q)return Y=P(A.call(M,ba,da),r.isNaN),0<=Y?Y+ba:-1;for(Y=0<I?ba:da-1;0<=Y&&da>Y;Y+=I)if(M[Y]===Q)return Y;return-1}}function x(I,P){var R=N.length,M=I.constructor;M=r.isFunction(M)&&M.prototype||D;var Q="constructor";for(r.has(I,Q)&&!r.contains(P,Q)&&P.push(Q);R--;)Q=N[R],Q in I&&I[Q]!==M[Q]&&!r.contains(P,Q)&&P.push(Q)}var y=this,z=y._,B=Array.prototype,D=Object.prototype,F=B.push,
A=B.slice,E=D.toString,J=D.hasOwnProperty,C=Array.isArray,L=Object.keys,T=Function.prototype.bind,S=Object.create;"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=r),exports._=r):y._=r;r.VERSION="1.8.3";var U=Math.pow(2,53)-1,X=e("length");r.each=r.forEach=function(I,P,R){P=p(P,R);var M;if(b(I))for(R=0,M=I.length;M>R;R++)P(I[R],R,I);else{var Q=r.keys(I);R=0;for(M=Q.length;M>R;R++)P(I[Q[R]],Q[R],I)}return I};r.map=function(I,P,R){P=q(P,R);R=!b(I)&&r.keys(I);
for(var M=(R||I).length,Q=Array(M),Y=0;M>Y;Y++){var ba=R?R[Y]:Y;Q[Y]=P(I[ba],ba,I)}return Q};r.reduce=u(1);r.reduceRight=u(-1);r.find=r.detect=function(I,P,R){var M;return M=b(I)?r.findIndex(I,P,R):r.w5a(I,P,R),void 0!==M&&-1!==M?I[M]:void 0};r.filter=r.select=function(I,P,R){var M=[];return P=q(P,R),r.each(I,function(Q,Y,ba){P(Q,Y,ba)&&M.push(Q)}),M};r.reject=function(I,P,R){return r.filter(I,r.negate(q(P)),R)};r.every=r.all=function(I,P,R){P=q(P,R);R=!b(I)&&r.keys(I);for(var M=(R||I).length,Q=0;M>
Q;Q++){var Y=R?R[Q]:Q;if(!P(I[Y],Y,I))return!1}return!0};r.some=r.any=function(I,P,R){P=q(P,R);R=!b(I)&&r.keys(I);for(var M=(R||I).length,Q=0;M>Q;Q++){var Y=R?R[Q]:Q;if(P(I[Y],Y,I))return!0}return!1};r.contains=r.includes=r.include=function(I,P,R,M){return b(I)||(I=r.values(I)),("number"!=typeof R||M)&&(R=0),0<=r.indexOf(I,P,R)};r.invoke=function(I,P){var R=A.call(arguments,2),M=r.isFunction(P);return r.map(I,function(Q){var Y=M?P:Q[P];return null==Y?Y:Y.apply(Q,R)})};r.pluck=function(I,P){return r.map(I,
r.QHa(P))};r.max=function(I,P,R){var M,Q=-1/0,Y=-1/0;if(null==P&&null!=I){I=b(I)?I:r.values(I);for(var ba=0,da=I.length;da>ba;ba++)R=I[ba],R>Q&&(Q=R)}else P=q(P,R),r.each(I,function(fa,ha,ia){M=P(fa,ha,ia);(M>Y||M===-1/0&&Q===-1/0)&&(Q=fa,Y=M)});return Q};r.min=function(I,P,R){var M,Q=1/0,Y=1/0;if(null==P&&null!=I){I=b(I)?I:r.values(I);for(var ba=0,da=I.length;da>ba;ba++)R=I[ba],Q>R&&(Q=R)}else P=q(P,R),r.each(I,function(fa,ha,ia){M=P(fa,ha,ia);(Y>M||1/0===M&&1/0===Q)&&(Q=fa,Y=M)});return Q};r.Dbb=
function(I){for(var P=b(I)?I:r.values(I),R=P.length,M=Array(R),Q=0;R>Q;Q++)I=r.random(0,Q),I!==Q&&(M[Q]=M[I]),M[I]=P[Q];return M};r.sample=function(I,P,R){return null==P||R?(b(I)||(I=r.values(I)),I[r.random(I.length-1)]):r.Dbb(I).slice(0,Math.max(0,P))};r.sortBy=function(I,P,R){return P=q(P,R),r.pluck(r.map(I,function(M,Q,Y){return{value:M,index:Q,FCa:P(M,Q,Y)}}).sort(function(M,Q){var Y=M.FCa,ba=Q.FCa;if(Y!==ba){if(Y>ba||void 0===Y)return 1;if(ba>Y||void 0===ba)return-1}return M.index-Q.index}),
"value")};r.groupBy=f(function(I,P,R){r.has(I,R)?I[R].push(P):I[R]=[P]});f(function(I,P,R){I[R]=P});f(function(I,P,R){r.has(I,R)?I[R]++:I[R]=1});r.toArray=function(I){return I?r.isArray(I)?A.call(I):b(I)?r.map(I,r.identity):r.values(I):[]};r.size=function(I){return null==I?0:b(I)?I.length:r.keys(I).length};r.first=r.head=function(I,P,R){return null==I?void 0:null==P||R?I[0]:r.initial(I,I.length-P)};r.initial=function(I,P,R){return A.call(I,0,Math.max(0,I.length-(null==P||R?1:P)))};r.last=function(I,
P,R){return null==I?void 0:null==P||R?I[I.length-1]:r.rest(I,Math.max(0,I.length-P))};r.rest=function(I,P,R){return A.call(I,null==P||R?1:P)};r.compact=function(I){return r.filter(I,r.identity)};r.flatten=function(I,P){return h(I,P,!1)};r.without=function(I){return r.difference(I,A.call(arguments,1))};r.uniq=r.unique=function(I,P,R,M){r.isBoolean(P)||(M=R,R=P,P=!1);null!=R&&(R=q(R,M));M=[];for(var Q=[],Y=0,ba=X(I);ba>Y;Y++){var da=I[Y],fa=R?R(da,Y,I):da;P?(Y&&Q===fa||M.push(da),Q=fa):R?r.contains(Q,
fa)||(Q.push(fa),M.push(da)):r.contains(M,da)||M.push(da)}return M};r.union=function(){return r.uniq(h(arguments,!0,!0))};r.intersection=function(I){for(var P=[],R=arguments.length,M=0,Q=X(I);Q>M;M++){var Y=I[M];if(!r.contains(P,Y)){for(var ba=1;R>ba&&r.contains(arguments[ba],Y);ba++);ba===R&&P.push(Y)}}return P};r.difference=function(I){var P=h(arguments,!0,!0,1);return r.filter(I,function(R){return!r.contains(P,R)})};r.zip=function(){return r.ycb(arguments)};r.ycb=function(I){for(var P=I&&r.max(I,
X).length||0,R=Array(P),M=0;P>M;M++)R[M]=r.pluck(I,M);return R};r.object=function(I,P){for(var R={},M=0,Q=X(I);Q>M;M++)P?R[I[M]]=P[M]:R[I[M][0]]=I[M][1];return R};r.findIndex=v(1);r.x5a=v(-1);r.sortedIndex=function(I,P,R,M){R=q(R,M,1);P=R(P);M=0;for(var Q=X(I);Q>M;){var Y=Math.floor((M+Q)/2);R(I[Y])<P?M=Y+1:Q=Y}return M};r.indexOf=w(1,r.findIndex,r.sortedIndex);r.lastIndexOf=w(-1,r.x5a);r.range=function(I,P,R){null==P&&(P=I||0,I=0);R=R||1;P=Math.max(Math.ceil((P-I)/R),0);for(var M=Array(P),Q=0;P>
Q;Q++,I+=R)M[Q]=I;return M};r.bind=function(I,P){function R(){return c(I,R,P,this,M.concat(A.call(arguments)))}if(T&&I.bind===T)return T.apply(I,A.call(arguments,1));if(!r.isFunction(I))throw new TypeError("Bind must be called on a function");var M=A.call(arguments,2);return R};r.uka=function(I){function P(){for(var M=0,Q=R.length,Y=Array(Q),ba=0;Q>ba;ba++)Y[ba]=R[ba]===r?arguments[M++]:R[ba];for(;M<arguments.length;)Y.push(arguments[M++]);return c(I,P,this,this,Y)}var R=A.call(arguments,1);return P};
r.bindAll=function(I){var P,R=arguments.length;if(1>=R)throw Error("bindAll must be passed function names");for(P=1;R>P;P++){var M=arguments[P];I[M]=r.bind(I[M],I)}return I};r.memoize=function(I,P){function R(M){var Q=R.cache,Y=""+(P?P.apply(this,arguments):M);return r.has(Q,Y)||(Q[Y]=I.apply(this,arguments)),Q[Y]}return R.cache={},R};r.delay=function(I,P){var R=A.call(arguments,2);return setTimeout(function(){return I.apply(null,R)},P)};r.defer=r.uka(r.delay,r,1);r.throttle=function(I,P,R){function M(){fa=
!1===R.k8a?0:r.now();da=null;ba=I.apply(Q,Y);da||(Q=Y=null)}var Q,Y,ba,da=null,fa=0;R||(R={});return function(){var ha=r.now();fa||!1!==R.k8a||(fa=ha);var ia=P-(ha-fa);return Q=this,Y=arguments,0>=ia||ia>P?(da&&(clearTimeout(da),da=null),fa=ha,ba=I.apply(Q,Y),da||(Q=Y=null)):da||!1===R.Ueb||(da=setTimeout(M,ia)),ba}};r.debounce=function(I,P,R){function M(){var ha=r.now()-da;P>ha&&0<=ha?Q=setTimeout(M,P-ha):(Q=null,R||(fa=I.apply(ba,Y),Q||(ba=Y=null)))}var Q,Y,ba,da,fa;return function(){ba=this;Y=
arguments;da=r.now();var ha=R&&!Q;return Q||(Q=setTimeout(M,P)),ha&&(fa=I.apply(ba,Y),ba=Y=null),fa}};r.wrap=function(I,P){return r.uka(P,I)};r.negate=function(I){return function(){return!I.apply(this,arguments)}};r.compose=function(){var I=arguments,P=I.length-1;return function(){for(var R=P,M=I[P].apply(this,arguments);R--;)M=I[R].call(this,M);return M}};r.after=function(I,P){return function(){return 1>--I?P.apply(this,arguments):void 0}};r.before=function(I,P){var R;return function(){return 0<
--I&&(R=P.apply(this,arguments)),1>=I&&(P=null),R}};r.once=r.uka(r.before,2);var K=!{toString:null}.propertyIsEnumerable("toString"),N="valueOf isPrototypeOf toString propertyIsEnumerable hasOwnProperty toLocaleString".split(" ");r.keys=function(I){if(!r.IL(I))return[];if(L)return L(I);var P=[],R;for(R in I)r.has(I,R)&&P.push(R);return K&&x(I,P),P};r.Aha=function(I){if(!r.IL(I))return[];var P=[],R;for(R in I)P.push(R);return K&&x(I,P),P};r.values=function(I){for(var P=r.keys(I),R=P.length,M=Array(R),
Q=0;R>Q;Q++)M[Q]=I[P[Q]];return M};r.invert=function(I){for(var P={},R=r.keys(I),M=0,Q=R.length;Q>M;M++)P[I[R[M]]]=R[M];return P};r.functions=r.methods=function(I){var P=[],R;for(R in I)r.isFunction(I[R])&&P.push(R);return P.sort()};r.extend=n(r.Aha);r.cDa=r.assign=n(r.keys);r.w5a=function(I,P,R){P=q(P,R);var M;R=r.keys(I);for(var Q=0,Y=R.length;Y>Q;Q++)if(M=R[Q],P(I[M],M,I))return M};r.H4=function(I,P,R){var M,Q,Y={},ba=I;if(null==ba)return Y;r.isFunction(P)?(Q=r.Aha(ba),M=p(P,R)):(Q=h(arguments,
!1,!1,1),M=function(ja,ka,la){return ka in la},ba=Object(ba));for(var da=0,fa=Q.length;fa>da;da++){var ha=Q[da],ia=ba[ha];M(ia,ha,ba)&&(Y[ha]=ia)}return Y};r.defaults=n(r.Aha,!0);r.create=function(I,P){I=g(I);return P&&r.cDa(I,P),I};r.clone=function(I){return r.IL(I)?r.isArray(I)?I.slice():r.extend({},I):I};r.tap=function(I,P){return P(I),I};r.S7a=function(I,P){var R=r.keys(P),M=R.length;if(null==I)return!M;I=Object(I);for(var Q=0;M>Q;Q++){var Y=R[Q];if(P[Y]!==I[Y]||!(Y in I))return!1}return!0};r.isEqual=
function(I,P){return k(I,P)};r.isEmpty=function(I){return null==I?!0:b(I)&&(r.isArray(I)||r.isString(I)||r.isArguments(I))?0===I.length:0===r.keys(I).length};r.isElement=function(I){return!(!I||1!==I.nodeType)};r.isArray=C||function(I){return"[object Array]"===E.call(I)};r.IL=function(I){var P=typeof I;return"function"===P||"object"===P&&!!I};r.each("Arguments Function String Number Date RegExp Error".split(" "),function(I){r["is"+I]=function(P){return E.call(P)==="[object "+I+"]"}});r.isArguments(arguments)||
(r.isArguments=function(I){return r.has(I,"callee")});"function"!=typeof/./&&"object"!=typeof Int8Array&&(r.isFunction=function(I){return"function"==typeof I||!1});r.isFinite=function(I){return isFinite(I)&&!isNaN(parseFloat(I))};r.isNaN=function(I){return r.isNumber(I)&&I!==+I};r.isBoolean=function(I){return!0===I||!1===I||"[object Boolean]"===E.call(I)};r.isNull=function(I){return null===I};r.isUndefined=function(I){return void 0===I};r.has=function(I,P){return null!=I&&J.call(I,P)};r.noConflict=
function(){return y._=z,this};r.identity=function(I){return I};r.constant=function(I){return function(){return I}};r.noop=function(){};r.QHa=e;r.o8a=r.matches=function(I){return I=r.cDa({},I),function(P){return r.S7a(P,I)}};r.times=function(I,P,R){var M=Array(Math.max(0,I));P=p(P,R,1);for(R=0;I>R;R++)M[R]=P(R);return M};r.random=function(I,P){return null==P&&(P=I,I=0),I+Math.floor(Math.random()*(P-I+1))};r.now=Date.now||function(){return(new Date).getTime()};C={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;",
"'":"&#x27;","`":"&#x60;"};var V=r.invert(C);r.escape=m(C);r.unescape=m(V);r.result=function(I,P,R){P=null==I?void 0:I[P];return void 0===P&&(P=R),r.isFunction(P)?P.call(I):P};var W=0;r.uniqueId=function(I){var P=++W+"";return I?I+P:P};r.jcb={evaluate:/<%([\s\S]+?)%>/g,G7a:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var aa=/(.)^/,ca={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ea=/\\|'|\r|\n|\u2028|\u2029/g;r.template=function(I,P,R){function M(da){return ba.call(this,
da,r)}!P&&R&&(P=R);P=r.defaults({},P,r.jcb);var Q=0,Y="__p+='";I.replace(RegExp([(P.escape||aa).source,(P.G7a||aa).source,(P.evaluate||aa).source].join("|")+"|$","g"),function(da,fa,ha,ia,ja){return Y+=I.slice(Q,ja).replace(ea,l),Q=ja+da.length,fa?Y+="'+\n((__t=("+fa+"))==null?'':_.escape(__t))+\n'":ha?Y+="'+\n((__t=("+ha+"))==null?'':__t)+\n'":ia&&(Y+="';\n"+ia+"\n__p+='"),da});Y+="';\n";P.fLa||(Y="with(obj||{}){\n"+Y+"}\n");Y="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+
Y+"return __p;\n";try{var ba=new Function(P.fLa||"obj","_",Y)}catch(da){throw da.source=Y,da;}return M.source="function("+(P.fLa||"obj")+"){\n"+Y+"}",M};r.chain=function(I){I=r(I);return I.TPa=!0,I};r.mixin=function(I){r.each(r.functions(I),function(P){var R=r[P]=I[P];r.prototype[P]=function(){var M=[this.JF];return F.apply(M,arguments),d(this,R.apply(r,M))}})};r.mixin(r);r.each("pop push reverse shift sort splice unshift".split(" "),function(I){var P=B[I];r.prototype[I]=function(){var R=this.JF;
return P.apply(R,arguments),"shift"!==I&&"splice"!==I||0!==R.length||delete R[0],d(this,R)}});r.each(["concat","join","slice"],function(I){var P=B[I];r.prototype[I]=function(){return d(this,P.apply(this.JF,arguments))}});r.prototype.value=function(){return this.JF};r.prototype.valueOf=r.prototype.toJSON=r.prototype.value;r.prototype.toString=function(){return""+this.JF};"function"==typeof define&&define.teb&&define("pU",[],function(){return r})}).call(this)}).call(a)})();define("underscore-min",function(){});
define("er",["require","underscore-min"],function(a){a("underscore-min");return window.TDV._.noConflict()});
define("pB",["require","exports"],function(){return{G:function(a){return a+"_change"},Ke:"default",hb:"mouseDown",Pb:"mouseMove",Eb:"mouseUp",Os:"mouseWheel",ma:"click",El:"doubleClick",Gc:"rollOver",Jb:"rollOut",RC:"mouseEnter",hq:"mouseLeave",Fl:"pointerOver",Ddb:"pointerOut",rz:"pointerDown",MH:"pointerUp",Xf:"pointerClick",aMa:"focusIn",bMa:"focusOut",gz:"gestureStart",k7:"gestureChange",CH:"gestureEnd",kMa:"gestureRotate",DH:"gestureScale",mc:"progress",vH:"close",OPEN:"open",nq:"select",tc:"resize",
zV:"changing",ba:"change",Ae:"stateChange",uk:"cueChange",VC:"preloaded",ea:"loaded",Bc:"loadingError",uo:"start",Yf:"stop",qz:"play",LH:"pause",tV:"beforeFrame",Vh:"frame",jd:"ready",rMa:"instanceCreation",Tp:"begin",Gb:"end",pdb:"cancel",Oj:"press",Hl:"release",lq:"repeatEnd",mq:"scroll",tna:"movementChange",odb:"beforeShow",yLa:"beforeHide",INIT:"init",kd:"show",cd:"hide",hN:"showEnd",aN:"hideEnd",sMa:"loadingScript",XMa:"processingScript",AH:"enableCookies",wLa:"applicationSet",bD:"userInteraction",
toa:"userInteractionStart",soa:"userInteractionEnd",P7:"transitionEnd",iNa:"toolTipShow",ioa:"toolTipHide",Gl:"positionSet",coa:"sizeSet",Kma:"controllerConnected",Lma:"controllerDisconnected"}});define("cI",["require","exports"],function(){return function(){return function(a,d){void 0===d&&(d=void 0);this.name=a;this.data=d;this.source=void 0}}()});
define("iv",["require"],function(){return[123,34,70,97,100,101,73,110,69,102,102,101,99,116,34,58,32,256,112,114,111,112,101,114,116,105,101,115,270,272,125,44,32,34,112,97,114,101,110,269,271,34,264,266,268,34,286,288,77,111,260,108,51,68,68,105,115,112,108,97,121,298,267,295,272,289,291,293,319,34,66,97,115,101,79,98,106,318,301,287,34,80,104,111,116,111,65,108,98,117,109,80,314,121,76,311,116,73,116,101,109,284,273,275,277,279,281,283,271,256,109,101,100,105,97,357,34,116,121,277,284,336,338,340,
342,344,356,302,289,348,278,371,373,375,296,337,339,341,343,345,347,315,386,125,383,290,292,294,376,396,349,351,353,355,334,288,396,110,101,304,306,308,330,332,300,364,289,359,278,280,282,371,293,99,305,105,110,103,371,260,102,97,117,108,324,115,114,103,98,34,335,388,101,376,293,345,91,108,431,101,291,287,441,443,93,410,34,117,112,89,387,374,448,296,110,345,98,398,335,260,112,116,104,84,282,319,256,435,437,439,284,116,114,117,101,446,467,376,98,111,111,108,461,104,101,105,103,104,481,372,492,469,
471,473,288,119,105,100,477,466,389,288,470,109,472,114,461,463,90,515,468,517,508,521,383,463,88,525,376,518,520,461,99,327,116,83,104,259,111,119,533,296,494,496,461,97,116,116,97,99,478,111,80,322,403,421,483,438,319,436,108,328,491,516,34,548,497,383,110,111,114,109,97,108,532,421,447,534,528,461,574,576,578,465,581,506,527,519,509,34,586,577,108,524,590,569,535,594,115,512,526,482,101,436,563,376,102,275,403,568,526,34,450,109,91,100,111,117,98,108,490,32,612,111,294,287,98,554,107,460,399,335,
401,323,376,69,120,354,114,110,578,415,101,307,68,418,333,383,81,117,259,72,339,312,339,558,586,97,577,79,118,278,348,77,97,112,371,274,276,424,362,357,400,559,324,654,656,658,112,660,97,662,664,666,114,348,73,577,103,101,326,328,461,86,605,111,51,54,48,82,282,622,114,99,606,422,674,361,426,421,115,623,280,116,625,115,85,82,76,546,288,115,487,431,433,335,311,85,690,486,488,101,383,625,666,566,725,34,291,114,315,91,699,260,701,703,705,115,707,709,76,101,740,635,335,103,97,431,434,608,484,319,49,615,
583,593,529,335,542,115,65,117,368,111,764,609,485,271,487,489,769,547,495,572,678,402,324,748,101,750,704,706,117,708,101,756,740,461,405,632,99,107,326,521,421,673,360,425,363,320,632,114,326,806,103,275,117,110,100,67,496,575,310,292,268,105,629,742,618,91,338,114,105,122,629,553,108,287,689,280,538,108,759,726,354,112,541,543,545,600,616,571,461,328,625,268,367,83,850,852,621,854,320,582,787,549,400,348,499,259,818,107,820,622,823,825,108,575,82,551,831,814,256,869,288,744,746,602,114,848,34,
859,318,862,850,87,512,514,855,376,575,91,893,287,360,709,294,895,816,66,575,260,114,884,368,117,887,505,601,584,872,315,874,100,865,544,83,274,455,100,742,893,858,850,915,114,917,919,105,921,936,925,335,727,101,112,876,878,822,824,826,114,828,318,831,110,833,518,835,575,838,840,578,843,675,846,895,897,861,929,864,542,866,79,290,99,105,373,946,771,858,648,898,975,950,940,917,83,838,710,889,595,947,726,987,974,863,950,930,119,657,837,839,294,578,756,432,903,868,591,997,985,383,973,354,989,951,633,
953,880,956,884,280,111,922,996,891,121,907,528,895,100,798,885,832,904,507,1017,637,873,934,1004,979,554,982,121,984,536,1018,976,853,932,292,259,1052,603,1055,866,86,970,1010,293,103,1013,888,1015,937,1054,950,1048,981,983,1041,592,1053,1044,927,934,991,278,943,945,1078,1016,1080,288,313,1082,259,1004,881,575,742,429,882,772,999,860,1020,1002,851,977,544,66,108,798,1086,1030,1071,998,570,291,1084,114,1096,809,1014,569,1099,1097,926,121,928,1004,1064,361,846,1011,1068,104,1060,1101,896,1E3,1104,
939,916,278,1120,1098,956,938,1003,1107,1005,965,1008,841,1133,1069,923,616,1072,335,816,1075,1050,1136,461,1092,1127,1046,1149,1006,966,1009,108,1154,1135,1088,1158,849,950,901,513,1174,1122,616,906,908,32,910,323,895,1165,928,1118,1144,1088,1124,1137,1190,934,1179,1155,996,1184,528,909,278,911,116,913,1117,1142,114,993,122,995,1114,1043,288,914,1023,821,1025,1100,1027,886,742,1032,1034,771,1189,1045,875,1210,1212,1214,924,1216,1138,1103,899,950,1163,1073,1106,853,1193,1182,376,1195,986,1238,1021,
952,1220,955,1100,742,906,1226,1195,93,287,1259,461,1218,819,1253,1245,1070,569,1257,114,745,1033,1259,1261,956,972,939,1219,879,1254,1097,1088,1270,1272,91,1274,32,1262,1126,1128,1149,742,857,1290,934,72,500,502,504,1201,114,1227,520,1204,799,912,1147,1022,1265,1280,1120,1223,1029,1225,1271,892,1035,1308,1297,501,503,1256,1302,1185,1187,1307,1018,1139,1239,951,1210,1112,1241,948,1329,1251,1279,954,1120,958,830,1040,1246,296,834,836,1170,841,969,1131,578,1277,1148,853,1109,1111,259,944,1113,1235,
1090,896,1062,544,1161,1077,1344,1079,603,1336,1105,1004,1057,934,1334,1091,1230,100,1366,1051,1175,1115,1197,1094,1149,1356,918,1358,1087,1368,1089,1370,1250,1105,1320,1299,1323,1303,278,1305,1206,1229,1093,100,1252,1311,956,1341,1028,961,1088,1346,1151,967,842,32,844,105,971,1308,1192,1146,1194,1146,1242,1118,1233,1376,1237,988,1372,1149,1267,1156,1247,1425,1081,1166,875,1338,1221,1282,1391,1284,746,1287,1289,948,850,1360,1157,1115,1019,1330,1129,1065,1172,1067,1200,1215,1362,684,604,1410,1429,
1454,1021,1380,1241,790,639,296,85,73,825,109,684,413,403,383,793,795,752,754,800,757,648,672,423,713,887,1471,560,288,1482,1484,798,755,1487,572,335,405,350,727,408,356,421,1487,294,922,727,276,371,311,68,608,278,292,935,783,736,1054,291,504,1515,1517,1271,367,735,489,383,472,103,763,421,1526,266,1528,1520,32,784,737,335,293,1540,256,1537,1518,1529,1521,1531,1493,324,696,329,331,333,637,1490,813,371,366,368,370,1088,77,367,369,938,551,1234,616,834,1512,112,277,100,457,553,361,432,909,348,729,1579,
276,112,729,895,314,472,497,1088,727,837,432,301,636,288,932,499,292,647,649,651,420,320,811,675,714,320,1248,561,765,610,296,35,265,1619,102,445,288,996,1248,383,745,920,922,562,782,32,53,786,1369,1137,577,120,1333,1382,1236,475,477,479,727,780,766,1530,626,1435,870,1501,288,109,431,1639,1391,1072,1553,640,642,278,645,108,1604,417,1557,300,383,692,97,694,412,414,305,648,1666,419,504,225,1609,1491,1514,693,1572,376,1670,694,1497,799,461,428,430,1597,1614,781,440,442,444,1634,617,963,453,413,456,32,
458,98,635,1659,390,314,413,1665,650,1667,269,653,655,100,657,116,659,116,661,575,663,97,665,667,315,1489,712,1561,364,1709,288,1720,1722,1724,745,688,1729,1051,1717,682,1721,684,1723,686,1725,1741,690,315,1686,695,327,710,1509,1721,371,104,605,1514,115,1516,1538,1519,1648,1018,338,867,1547,1764,1527,1767,1551,737,1735,325,1756,1606,269,1559,1732,676,421,276,1049,1367,607,1695,284,768,1623,1461,594,368,727,686,709,1429,105,1683,742,1754,1688,1800,1126,805,107,80,1029,982,960,1451,376,1226,681,100,
1739,1726,1728,1752,121,804,633,1811,1464,960,895,1418,709,1815,296,1226,1820,577,1811,431,1207,1598,383,84,104,471,645,105,1172,351,427,666,1510,371,555,686,694,1763,1765,1549,1540,1542,1599,321,791,376,1474,1476,1478,639,1783,812,1785,320,275,108,108,1822,1506,558,100,368,432,84,1513,1640,1362,982,355,76,97,1592,70,840,87,1298,1322,1412,963,494,108,1578,32,1899,917,287,453,1299,1400,32,49,48,48,287,50,1911,287,51,1915,32,52,1918,53,1918,703,1912,32,55,1918,56,1918,57,1918,596,1352,461,1887,346,
259,1881,103,1883,671,1885,1393,988,1506,1406,1339,1026,1039,1833,890,1316,1033,893,895,1874,1876,689,1506,1889,1592,479,642,1047,980,1162,1943,1137,1936,1961,648,1963,540,1149,1130,845,1066,1012,1181,1268,1452,1236,1957,1877,354,109,1118,756,102,116,1656,1981,770,1362,1984,1959,1986,1118,915,552,111,109,82,1321,1991,1389,1951,1392,1137,348,622,1300,1015,834,1831,968,32,1347,1152,1934,383,1936,1118,2004,1299,1434,1624,1437,1102,1945,1998,1210,2E3,340,2003,2005,1992,1650,1635,461,1996,278,1960,1890,
1972,101,1964,1433,1423,1391,1625,1335,1250,1506,1843,1845,762,108,1965,1788,1381,1657,1453,1336,1946,1210,1941,2038,996,1176,1430,974,2066,941,1085,2005,2027,1015,2052,288,2042,114,2074,942,2005,1428,1968,1935,1986,1004,1293,788,2041,496,1958,2043,1998,1441,1281,1121,1993,296,1445,1273,1276,1275,1100,1956,2095,1985,355,1118,1941,2087,2063,1236,1970,2045,108,1973,2060,1076,2062,2102,2040,2022,1986,1879,1939,2025,1896,2116,1362,1467,2055,1844,519,1846,2059,1975,1457,1173,1429,2082,2084,278,1941,1989,
2006,1628,1466,2065,1986,1971,2120,2047,1974,853,1469,2088,1626,2110,1997,2112,1210,2149,2078,1123,2029,2072,1020,1878,1938,729,2149,1801,2032,2075,114,2114,994,2177,2112,2099,2168,1183,1302,1258,2106,1288,1276,2089,2165,2179,2034,2002,2186,1436,1255,1328,2054,2178,917,2068,2037,2007,2183,1987,2166,608,116,2198,296,2080,34,1936,2056,2138,2058,669,120,1396,2132,2125,2009,858,99,1957,808,2160,2133,603,2228,2095,808,1199,1980,2039,2226,2201,2031,355,2129,729,2196,1507,2232,1969,2203,278,2246,2115,2225,
2071,2135,2098,1310,1948,1100,1409,960,962,451,2019,1415,1350,1977,847,1164,348,1504,2013,569,1503,1849,2127,355,2218,98,2139,2223,2273,1982,1886,1986,2279,2139,1004,1169,2020,1458,1979,2144,2163,2097,2194,917,2149,2253,2239,2071,2023,1332,2086,2182,2161,2053,2242,2209,2179,2131,540,2306,2248,2193,1937,1880,2245,339,2035,2152,2202,2278,2137,2280,2058,1422,1255,1424,2200,731,2250,918,2206,2151,2307,2030,2073,2333,2213,288,2215,2118,1962,2157,2289,1414,1171,2143,2337,2171,367,2136,2057,1847,1373,933,
1059,2351,2145,2333,2300,2070,2064,2323,1987,2099,2231,2254,1115,2303,2195,2320,2002,2069,1795,2249,1888,2119,1827,1813,1343,2225,834,625,1990,287,340,112,287,837,1299,631,2374,109,972,2153,2324,2355,2140,853,2290,1415,2350,2315,2241,2339,355,2369,2301,2365,2309,1999,2395,2341,34,2343,2333,1941,2416,2215,2361,2399,2219,2356,1292,1088,1294,2332,355,1976,1419,578,342,501,1411,1391,834,494,2001,109,287,1654,1880,625,2388,276,2109,1875,2111,2310,917,2252,2314,2370,1236,115,2234,1875,808,2403,1171,669,
442,1535,2406,2430,109,2287,2058,2091,2428,2093,2277,2367,2258,823,2410,2364,2457,2398,109,2155,1892,294,2363,1015,1202,771,457,994,460,731,115,2115,1861,335,2423,2469,2325,2139,2479,2377,2094,2450,2164,2483,2119,2121,1168,2348,1153,1459,2238,2480,1362,1761,260,83,2459,108,66,117,2001,110,2008,2429,288,2372,2204,276,2149,2376,1361,594,2344,648,70,822,1342,2437,2225,42,2316,2470,1847,1427,2455,2411,2481,2366,2546,1876,1966,1789,2550,2285,2379,2345,2048,1244,2050,2225,2422,2295,2083,2154,2119,2485,
2212,2563,2239,2215,2016,108,2435,103,2542,2239,2439,2395,2443,512,100,2446,1541,2448,1249,2413,2067,2532,2211,2534,2284,2536,2340,2572,2028,2331,2529,2568,1592,2462,841,2577,2579,996,834,1206,1908,2386,116,2391,2005,895,2217,2501,2327,1332,2207,2351,2537,108,71,670,1466,2521,808,699,604,624,1684,1345,963,2082,287,578,119,315,115,2449,2096,2567,2297,1143,2598,2079,2170,2499,1947,1442,1388,1028,2008,1226,1955,2505,2643,2044,1891,1893,1895,2283,449,1898,496,1901,1903,2611,2005,1908,1910,1925,1914,1925,
1917,1925,1920,1925,1922,1925,1924,287,1927,1925,1929,1925,1931,1925,1933,2269,2162,2506,2296,2476,877,1266,1408,105,829,1465,1897,2264,2512,2017,2575,2616,2333,2246,2312,2594,1994,594,2499,2503,2535,2378,2508,2661,2486,373,625,2263,619,982,578,1419,287,2691,2708,2424,2326,2426,2159,2555,2124,2557,2714,2566,2173,2318,432,2246,2208,2553,2716,2595,2718,2553,2237,2322,2309,2553,1095,2647,2169,2600,34,109,2650,2620,2336,2467,2338,2172,2128,2174,1882,1884,2763,2352,100,2660,2538,840,2421,2170,344,2525,
2520,1957,85,1942,1444,2188,1953,91,906,1555,2523,2525,287,73,429,110,2790,340,110,93,1260,32,2788,1756,2796,629,2792,2794,2804,2798,2397,2366,2472,1391,2528,2216,2257,2697,1407,1222,1950,1315,1285,2657,2475,1988,2211,2487,2717,461,553,98,262,260,120,1429,2265,1171,2606,2724,1286,323,2611,2211,2614,1299,972,2628,291,2776,2758,2617,2400,2520,578,1674,260,2839,574,413,287,102,1847,1416,2861,116,95,431,604,260,2860,982,95,2012,2868,626,2864,95,340,95,511,1180,2870,2865,2878,499,2615,2589,2408,2452,2251,
2395,2827,2748,2887,2765,2645,114,2167,2756,616,2418,2896,2205,1299,2712,1042,1995,2740,2090,2427,2813,2474,2468,2024,2621,2770,2499,2754,1386,1110,1388,2762,2456,2134,2482,2414,2441,2533,2915,2923,2739,2694,2644,2889,817,2415,2899,2199,1125,2913,2591,112,2905,2126,2468,2155,1973,1516,429,745,2702,2438,963,954,667,454,287,111,689,1702,626,2960,45,477,821,502,2729,629,101,913,2524,2797,2780,2095,2312,1398,1226,2802,328,2808,2806,629,2808,2799,2957,1302,2789,2971,2805,32,2793,2982,2988,2809,461,761,
2783,2930,1137,2499,2244,432,2176,2360,2908,2559,2046,2561,1063,2142,2514,2752,2888,2553,2548,1213,2627,2229,291,2464,1534,2607,2504,2693,2659,2602,2774,2721,121,2723,2703,2725,841,2728,32,2730,2545,2618,2734,3009,1351,2292,1134,3012,2895,2719,3007,2158,866,1387,2943,2240,2468,647,1646,1616,517,575,597,1622,2580,963,2691,2388,3038,108,45,629,108,121,1905,2119,3067,110,3069,2731,2696,1024,2100,2261,2383,3061,2704,1007,2266,1417,1457,3076,2918,2562,2329,2051,2170,2256,3006,2156,3008,544,2604,1978,3043,
2351,3094,3077,2698,3091,2225,2104,1286,2190,1448,2601,2732,2139,2328,1443,2564,2649,3005,2934,2420,2937,2214,3118,2932,2146,2180,276,3051,2071,2760,2311,2335,1359,3017,2235,291,2432,846,3020,2466,2998,2658,2451,3001,103,2975,3102,2925,2210,1990,3129,1115,2917,3065,2357,1058,1546,2738,2999,3119,3014,1232,2549,2516,2931,3025,3095,2510,1355,2920,3152,2551,2590,2311,2929,3159,3143,2507,3089,978,2736,2208,2484,840,2892,905,1324,1203,1705,2492,3060,311,2496,1522,2498,3119,2926,2035,3172,2558,109,2747,
2713,3160,3125,2286,3065,3115,2101,2573,3093,3149,2179,2299,3164,3023,2468,2553,2221,2751,3148,2366,2024,3133,1390,3142,2824,3163,3016,2351,2794,354,294,1048,113,489,2092,871,2308,2888,3184,294,1894,2005,2839,1903,2394,1900,2670,1907,114,287,2673,1913,1918,2677,287,2679,287,2681,287,2683,1926,1928,1930,1932,3058,2021,2945,2569,840,258,1654,3069,742,1595,729,3178,2695,3224,2026,3122,2342,2170,2623,3169,3049,3171,3176,3165,1137,2778,2972,2521,3003,2784,91,2977,2986,2803,2993,2981,2795,2993,2984,2801,
3300,2979,3302,2990,2807,3305,2810,3174,2531,851,3216,2828,2407,3045,2113,276,2849,2939,2764,2353,3026,3096,3048,544,3324,3205,3167,2500,2852,2511,3084,2349,3011,3222,2309,3242,540,2722,2633,288,834,2726,453,99,2967,587,2692,3240,3045,2946,2157,2948,1725,2951,2384,2953,823,2955,2859,2801,2959,2956,32,2962,2964,622,2966,3035,2968,3314,2888,3145,3147,2770,3103,3180,544,3238,1652,2771,2354,2425,2401,3288,1357,2922,3177,2475,3343,3332,2316,3099,2576,1906,3022,569,2609,2841,3252,3370,2843,32,2392,503,
2642,2451,3357,642,3359,2950,2262,3031,91,2954,690,3369,2958,3365,2961,454,2963,104,2965,104,2967,413,3412,2507,3343,3186,2103,3188,2490,3190,1213,2493,2529,2495,2314,2497,1217,2993,2973,1875,68,544,3402,2187,3298,2786,2978,695,3310,2991,3304,2525,3306,3458,2980,3311,2992,3463,3076,3145,3296,3227,2940,2373,2927,2593,3290,3217,3326,2772,3328,3287,544,3138,3100,1460,3319,3196,3206,3113,2471,2141,3041,2405,3473,3112,3335,3389,3156,1375,2622,2333,2928,3393,3291,3279,2933,3383,119,3397,3024,2451,2651,
1379,3182,3341,2888,3198,2375,3478,3488,2081,3197,2033,2395,3504,3134,3502,3491,3039,1108,3289,3505,3479,2759,3524,2179,2903,503,3200,1944,3518,3229,3346,2240,1862,1836,97,67,663,278,1565,1608,1560,1872,167,123,1778,82,339,1039,1663,3550,366,745,803,378,557,2271,1849,810,3555,1611,1547,1986,2655,2786,391,340,2275,1505,1986,1708,637,679,404,3569,1645,383,825,111,107,362,1811,3350,2737,1680,1733,320,798,1593,1391,3277,1597,2494,733,3601,3447,34,694,111,820,670,1761,99,65,1058,2976,2786,3603,103,2800,
3620,3583,1091,3585,296,1555,1781,461,1737,1747,3548,1822,691,1803,3571,1784,3573,1778,3631,685,687,1727,2959,1753,1683,1555,803,1749,1740,97,1838,1494,358,3638,922,121,97,1771,3394,637,982,555,1470,3584,1864,3627,1780,1715,461,669,112,3580,352,1986,1731,1871,3573,34,1563,1569,1566,2626,1126,386,3683,3673,385,529,1778,3674,1506,698,700,67,3237,1508,1851,1759,421,1533,3141,2216,1773,1766,1550,1541,3195,3347,823,1857,1774,3707,1861,1778,3628,3670,1870,1610,922,1545,84,1802,3545,2255,1580,116,3723,366,
1470,1481,281,119,278,3616,455,1562,101,477,305,922,1165,677,3584,921,606,1054,2769,3557,2498,480,1524,677,1778,1866,2002,1868,614,1091,3572,1511,717,982,720,3483,3510,3283,2417,2170,1165,1809,808,80,275,820,282,115,3203,2906,594,109,1675,2120,557,3650,1726,84,745,115,314,1410,68,1038,3361,34,1630,767,3261,1794,3522,384,315,3772,291,2282,1398,1325,1205,1188,858,3763,719,282,2755,3106,3211,2758,487,686,1828,629,3054,3419,2632,823,1585,627,259,101,2872,2524,95,436,260,2866,2798,461,118,114,2625,1213,
3653,643,72,605,3729,3725,1383,3775,292,115,115,3514,3779,2944,288,1797,496,666,3788,3820,2382,110,3793,3417,3081,3506,400,3850,3777,3015,3848,1236,3293,629,752,3727,3618,1285,3465,3460,3312,3469,2985,91,2987,2791,3467,3462,2797,2799,1164,3870,3852,808,3514,2416,3108,1447,2192,1018,3812,720,2744,1283,3439,1304,1186,3809,1327,1438,3804,2897,105,666,68,745,103,3021,433,2473,3239,1377,3803,633,808,3559,2932,310,312,348,3385,3838,2180,2325,727,1419,107,3559,553,1410,1105,3055,1631,1925,3661,288,2861,
114,727,3861,2526,3863,3865,3561,1429,3771,3926,1117,2185,3768,3899,3110,3901,335,538,941,494,291,1819,111,1839,2646,3816,2599,3325,570,2993,405,558,3746,3879,746,3881,3888,3461,2983,2800,3985,2797,3303,3988,2270,3925,806,2461,1167,3170,3392,3528,2770,3958,3996,3805,1083,3961,3975,2488,2785,1285,3900,2108,3934,3843,278,83,1139,960,1434,3797,376,1618,102,54,1924,3060,3976,1196,348,3913,3472,2239,2489,3908,1326,1840,1808,3959,114,3774,3611,3851,3853,4007,827,2700,959,3867,2014,963,2836,1349,3086,3041,
2970,2525,1883,3919,625,83,3903,3679,1301,3456,3880,3308,3459,3986,3883,3891,3989,4067,3466,3987,3313,461,102,111,99,921,3736,97,2853,3030,320,4021,271,48,46,1633,3800,2893,3902,114,436,709,705,845,4060,4018,629,4020,1615,1631,34,4023,1620,4027,2648,2758,4003,807,291,4041,3776,3895,3544,1466,4062,3853,4118,2351,3875,110,405,3983,1033,3990,2989,4075,3884,3307,3886,3301,4069,3468,4071,3811,4095,554,101,4098,1419,625,2410,4087,32,4089,54,1699,2255,4120,3209,1145,2758,716,98,718,3765,3358,267,3360,3418,
2952,451,3421,2960,2957,3368,3366,3371,3429,3373,3431,3375,3433,3994,121,3913,3897,2699,2701,4164,3362,3083,1348,2706,3087,1263,3449,2389,4127,2787,4073,3882,4137,629,3464,4195,4136,3890,4198,1403,4179,4039,1297,1385,853,3933,4038,4004,114,4207,929,2049,4008,2757,3977,1797,1165,1883,496,280,112,262,4061,4140,709,4017,1103,4184,3796,4104,319,1542,1699,2814,4112,3896,2761,4001,3496,896,4120,3471,2211,3957,4030,4039,3380,3107,3907,1908,4036,972,4120,2812,2225,2814,97,97,69,645,2632,3158,4147,4236,4092,
493,2912,3760,4042,3777,3806,3906,1399,3406,4255,4178,3913,4115,4043,4181,2819,2654,2821,1317,1228,3811,4158,3764,282,4263,1890,625,4266,4234,1648,4237,4271,34,3839,4015,1119,2572,4147,4106,1620,265,4109,4218,1137,716,4228,4142,3739,4144,101,4230,4048,110,4146,4298,271,1793,3947,711,4116,115,4032,4064,3808,1306,4037,3912,4039,3905,3297,4333,1402,3893,4273,3895,3960,2477,2100,1313,3576,2822,1318,383,4303,3972,294,278,3930,553,110,1800,1694,1647,271,50,4151,1453,4245,2767,103,4338,4243,2157,1662,578,
1825,4212,742,4375,4113,4029,3995,4379,4214,2914,3534,3801,4239,4005,259,3221,4339,3189,4279,4211,4382,934,3855,3052,726,4120,3766,3050,3521,4093,1783,4329,4154,2330,3977,4353,3973,114,1822,4103,1791,1617,1911,55,554,99,4311,2900,3770,3894,4121,3175,4385,4404,3924,4205,4212,3854,3516,2770,4372,644,4374,4424,808,4377,4438,291,4280,4206,3998,866,3399,3495,4327,3839,1892,666,3956,4361,3056,3946,3868,3966,3970,3969,941,4304,4357,1799,3873,1462,4441,4412,4433,4243,4387,2935,2179,3437,3856,4302,4040,4354,
643,4320,2541,3847,3944,767,2675,4365,2457,4367,2742,1940,3749,4327,673,4406,4045,2653,1224,1088,2656,4351,4336,4212,4282,3871,4241,3226,4492,4249,4212,4390,4252,4277,1401,3810,4394,2230,4469,4327,4157,4159,3814,3337,4187,3042,3487,4428,4244,4291,3813,115,2625,2997,4327,340,117,555,1822,4082,4084,710,4147,4326,4457,1623,745,2526,3791,960,3952,3821,110,932,101,3707,4243,3967,100,4460,3971,4411,4480,1410,3511,948,4400,2346,4522,2291,4448,4543,4328,4283,1209,4426,4242,4518,4153,2368,4517,4570,4493,4572,
4346,1340,4047,2541,2839,4052,4188,4055,4290,4520,115,2570,3273,1847,2737,996,3620,4591,4292,2495,2919,4E3,4506,4570,4519,4601,4284,3116,3817,3977,4471,4383,1210,4563,4544,3820,4547,629,4549,3954,3794,4232,4580,3786,577,1883,1604,3861,3790,3561,3955,3795,4541,1911,4456,3535,4607,4529,4397,2071,4613,4006,4583,4182,4321,4587,2705,1416,2707,4443,4212,4214,1456,3494,3340,4002,4424,4641,1115,4124,86,82,699,101,3660,4064,3299,4134,3309,4201,3988,3885,3887,3991,3889,3993,4515,4114,4441,4645,4217,3455,2189,
2108,2107,575,4256,4528,720,4655,2268,4569,4638,4120,3485,3400,2436,2839,2389,2583,2445,626,2440,2035,4256,4315,4143,99,625,4414,4362,288,4107,1619,4421,2938,1137,4220,348,4222,439,105,4225,110,1883,4535,104,2780,4553,2526,4210,4405,4572,817,4495,3080,3454,2665,4186,2291,2267,2433,3354,4272,4329,4251,4033,4253,4278,3910,4335,3448,2525,3981,697,4276,4669,4675,4130,4070,4203,4674,4135,4676,4131,4138,4679,4213,1296,2663,3807,4392,4752,913,625,3826,1882,4545,4550,4633,4624,3535,3819,3953,3792,4623,4049,
3801,4639,4691,1149,4660,4487,4690,282,3399,2838,3419,2612,1261,3405,2844,3411,2829,4780,4619,4726,4780,3863,4294,4265,4733,4399,4796,115,3766,4794,1462,4508,107,863,1571,2839,1575,1577,1583,315,3827,290,3746,100,1036,622,2632,67,3350,107,65,4586,4454,4105,340,4059,3830,102,438,566,2228,4731,4717,2634,451,4844,103,625,3833,4848,2458,292,293,3432,2969,4600,4529,3379,3245,3102,4120,2570,4474,34,4034,1908,604,3442,4342,4494,4682,4610,4668,2786,4012,4688,4878,4735,4407,3092,4111,4821,3997,4208,866,1374,
2359,3381,4565,3097,119,4697,4694,4386,4438,2395,4773,3440,4393,4458,3968,111,3970,4304,4561,4548,3724,3957,4467,3872,4119,4816,2570,4616,3802,4430,4395,1440,4880,4496,1314,4498,2786,2823,4501,4926,1405,4122,4002,4891,4388,4215,2735,2061,4248,4381,3773,4904,2179,4923,4791,282,6,1941,4906,4035,4775,3838,3733,3823,4165,619,1798,823,3970,843,894,4865,720,2570,3244,1397,3824,2667,3248,1904,3370,2671,3406,3254,32,4485,32,3257,1919,1921,1923,1918,2685,287,2687,287,2689,3352,597,4689,4592,4871,3345,2839,
3349,3034,3036,4769,4888,3117,2200,1862,3723,4296,1805,797,799,801,1488,3637,3678,922,275,3767,822,2664,3780,1137,1099,825,5019,3665,3625,3667,288,5009,753,1498,1486,802,383,83,453,260,79,2524,317,1607,3655,5015,387,779,4800,3408,4701,3409,2005,2394,2441,3624,1863,1472,288,5041,1716,335,915,120,1713,3629,3698,323,3742,1812,3942,3739,3712,3706,1860,3709,896,994,4017,1525,3705,1859,1768,1778,641,643,1663,5063,3718,4272,5044,561,3918,761,2632,88,825,294,1874,115,4712,3056,4308,102,4636,48,4852,3284,
2758,2960,4510,4233,4415,1909,4486,1362,4096,101,5099,4105,4715,4310,1699,2215,1654,110,5109,4570,2960,4323,5111,4542,3535,5123,4275,2770,100,5091,4295,101,89,5095,487,496,5098,4306,4324,4714,1911,265,1911,5105,3769,2758,1642,478,480,4483,4299,4269,1651,461,5135,1671,5092,625,90,5140,5097,5117,324,35,5103,5120,5158,5106,4219,5136,2632,3616,5017,4448,4147,1922,5113,594,2880,1155,4541,5183,4719,950,5186,5145,5130,3801,5123,1516,476,2515,3535,2960,5168,4022,4309,1621,5121,2170,5161,3919,5137,1601,278,
4142,3176,5181,5188,498,4772,4842,767,5215,400,5068,960,3917,5162,5137,5156,271,565,567,5173,570,4301,4876,101,5224,5208,2632,5227,3828,566,1649,996,2814,5115,5128,4713,4637,3319,1862,3641,116,3672,3634,315,3672,3677,3720,3744,5027,5056,34,5251,5253,3645,121,1754,3648,383,1713,1806,710,3597,3556,289,5222,629,599,4086,5145,5248,4526,1463,3863,580,5279,5111,5281,3204,1164,5276,110,589,5286,5247,5220,3196,3941,960,5278,1790,5295,5231,3130,3560,1410,5293,5301,4455,5296,3523,5298,629,79,2179,5239,34,88,
89,524,1699,834,5318,90,287,88,90,89,287,89,5326,5329,90,88,287,5333,5328,32,5327,88,895,3600,3276,728,3604,3444,3606,1768,5297,3561,5285,5308,3945,5310,34,739,648,1629,5145,91,2800,2239,1226,5270,5010,1499,758,2227,2854,5239,5193,4526,431,844,5300,5110,4713,5229,5242,1015,2814,5373,424,5307,5376,3056,5378,4300,3923,2216,110,844,5351,5385,1631,5387,5231,2814,4785,4631,1410,5393,4147,5288,5021,4806,4618,3561,5384,5403,5354,5399,4808,5375,5410,5303,925,1778,5364,5031,5011,1500,461,5036,605,262,5058,
5257,1681,421,628,2247,4185,619,4801,2587,2390,5050,2393,1902,2395,5054,638,1494,297,265,652,335,70,3791,3633,5265,4378,2381,3795,5273,3679,1787,2123,1429,280,366,1798,1477,1429,3658,4667,3535,1957,3957,3663,5198,5249,3666,5261,3717,1678,461,5449,551,5251,5451,1742,5267,1756,1850,5066,1760,1762,1536,5079,1539,5348,726,1770,5071,5080,1776,1862,5443,1554,3669,5477,3719,5429,320,5458,1967,5294,3056,5371,5289,383,1797,4358,4360,3381,846,4540,5192,5354,4112,5454,1814,4287,1033,5479,1748,3643,5254,1824,
4821,5523,4198,1935,3636,1391,5030,1485,461,111,265,328,116,5393,4570,5541,102,5543,5384,4570,2885,4970,2770,4588,4698,2578,2839,2610,3406,5435,3410,4753,34,5185,5472,5282,5471,1429,2575,4799,4959,91,4705,2002,4702,2585,626,2389,2846,2854,4958,5433,91,2861,1875,2882,3836,2874,5587,2873,605,5587,2878,5565,5593,111,95,5552,503,4863,895,5466,2294,1875,3731,335,1818,5482,1823,5453,5291,5428,3598,256,5507,2556,4570,5461,3752,5464,2351,1831,4063,1015,1835,4626,3652,4478,5442,3626,288,5476,5447,411,5627,
3563,3552,3930,1165,5533,2579,5456,1492,5474,5444,3940,3561,578,5637,745,5639,348,5641,461,5314,98,982,350,5553,256,1758,5067,4550,5077,5496,5492,5498,1778,5659,1322,5504,5614,896,1149,1883,625,4545,5516,5352,319,4089,4091,4327,1613,5509,5118,5203,5150,2215,5603,5218,284,5404,4475,538,727,4258,5394,564,578,5230,2239,2814,115,1149,2038,4147,56,5354,3973,4786,2737,5187,5416,1641,311,1165,1297,108,360,5239,5396,5703,4301,3782,2856,5692,296,2861,120,367,2877,5597,1580,694,1782,5231,834,5730,5732,2878,
538,3564,97,2870,5731,100,5733,2877,291,5736,2109,5312,3864,5176,4085,5680,284,5723,5243,4301,1588,116,3664,5728,4148,5354,5705,1355,369,5358,5287,5768,1149,3672,2300,4147,1920,57,4150,5715,1053,1862,4463,4359,101,3548,5650,97,304,666,366,3654,711,5089,285,5645,324,219,5785,4097,5305,960,5649,3551,745,5791,355,639,383,1011,4593,314,292,5609,3932,5014,5258,421,5691,4002,5568,4123,625,554,1761,1693,5686,5681,5354,2632,5825,729,5800,5519,5287,46,52,5220,3691,5627,5530,3694,749,3548,5486,1852,1508,3711,
5490,1858,5667,3708,1531,3966,489,67,542,432,710,1548,5852,3715,5798,404,5627,3060,5643,1853,489,4349,746,1482,3696,4864,738,495,4532,4147,5760,5380,4301,437,2389,5816,5828,5157,5724,871,5250,683,339,5264,5483,3647,5485,5817,5505,256,5570,3401,5316,2444,5577,5150,2581,2441,5576,2586,5579,5535,1671,3545,5538,5032,5540,5542,3739,5402,5280,5354,5547,5549,5239,5694,4398,34,5599,504,5415,4327,5555,5571,5758,2214,3405,5905,963,5559,1905,3408,5562,895,5565,5924,5354,5713,5920,5782,594,2834,5766,5925,2255,
5518,5582,5699,611,2862,5937,451,2858,2875,2862,5587,2867,5592,627,2871,5591,2869,5968,2883,5597,5595,5972,5749,5928,5630,5028,1779,328,3629,383,1811,112,463,5815,1730,5897,5673,100,291,107,293,3514,5239,4268,5888,3386,5522,5291,5871,1033,5985,5987,5841,5452,5532,5291,2616,5536,2225,5914,1689,4352,311,105,5238,5766,5880,569,2814,118,700,742,1496,5365,448,400,5822,4002,276,463,5834,2294,5754,5375,4570,275,5754,5550,5468,5802,629,5545,3535,5820,4243,882,3591,65,2639,121,1883,3845,260,4482,5766,2675,
5953,1453,3941,5835,4713,1363,1587,1529,5321,963,4826,367,4828,121,4830,437,328,4833,5290,5986,112,2221,5133,4511,908,4908,288,2518,101,69,327,3278,5766,5355,454,4442,6069,451,2960,1704,3236,259,3836,287,6101,5748,2012,6104,1718,3836,3831,2613,1288,623,1419,6103,6113,5657,99,6111,1261,6114,6119,431,6120,32,6101,279,6116,6127,2865,6107,6126,655,6128,6124,6132,3236,1839,6129,117,6139,6137,6141,294,6110,2012,1590,495,4839,6053,6055,5489,5886,1776,5388,3386,5705,544,6090,604,5827,5934,288,6099,521,6097,
5434,6095,3406,6105,6140,6102,6143,6102,6136,2524,6121,6118,6116,4080,6179,6132,6181,6115,6176,6112,6130,6172,6128,6174,6135,110,6125,6138,6145,431,6108,6142,6177,6133,6139,6186,895,6088,4782,3081,4635,1918,4492,6033,6081,97,120,5125,4009,4512,6086,5674,544,6206,2579,6208,6061,1236,104,4078,118,1429,6050,4532,5761,5389,5883,276,5885,4259,2474,383,5662,5488,260,4263,3158,5861,1775,5853,1543,849,1571,5857,1855,5860,5491,6246,3608,1545,5666,6255,5074,4710,3938,6258,3707,5378,1769,6159,5849,320,6245,
3714,1522,5840,5529,5265,3060,366,3740,100,1511,4192,1734,1438,5259,321,3982,6282,6087,6153,3750,5494,3384,1734,1862,5210,837,99,3548,70,1740,5272,3761,371,312,1602,3545,906,6014,709,287,1482,702,796,5420,709,1353,292,111,6295,6306,1302,6308,626,6311,751,6028,5979,5261,6298,6300,3671,450,3693,5065,5847,1873,2110,2524,6263,5073,5854,3523,2932,6339,5493,2417,4838,6344,5228,5701,1777,5864,3668,5982,5087,5795,5818,1612,1761,1900,402,5525,91,1567,470,1506,1590,2119,5343,1596,433,399,5035,798,5115,4709,
625,5086,5477,5990,5274,5514,4464,5945,5949,1137,5555,5722,6350,6156,5160,5190,5154,1645,5766,5998,6232,789,6352,5057,1661,4436,1664,3783,1677,5634,34,932,339,5670,504,6240,810,5291,5665,5850,3713,6340,6351,5260,5444,6410,5867,6302,561,351,6383,5952,5521,5291,5236,5163,6064,5386,6389,5397,5882,432,5757,5957,271,703,5354,260,538,5947,5111,4364,6385,537,5144,5111,5101,4108,5205,2758,6048,6440,5767,6449,6030,5764,2238,5930,4606,5706,5213,5520,6460,948,1386,5771,6384,4327,5711,1464,6446,4713,5511,5405,
5513,5717,348,5719,5721,6020,6435,5999,461,5951,6154,6459,4327,6040,4632,5756,6433,5395,6487,6397,537,539,5698,5879,6499,5881,5389,6477,5309,6469,1091,618,98,3565,6428,6510,34,122,6473,6465,853,5776,2549,5778,48,5780,5839,5984,3567,776,778,5613,3556,5418,1568,97,6530,831,3566,392,5789,5654,6380,3679,4597,3535,6490,4243,839,2002,258,268,4881,3023,3716,5502,6406,5481,6007,1742,4082,5846,3700,320,3782,3746,756,97,666,6348,6247,383,6565,328,2782,6570,6265,335,6573,5235,3453,6576,6350,3512,6338,6416,5072,
6345,2082,6570,3608,6261,806,6582,5241,6572,622,328,4263,643,6590,6272,6399,5981,1556,5503,5088,6357,256,4080,3950,6553,3403,963,3797,287,3612,98,287,5858,1901,3782,666,1036,6482,315,4722,4224,262,4727,555,4730,293,5772,4713,6396,6506,3386,577,112,3898,1302,1195,44,3348,1683,44,5399,5500,44,686,121,3892,530,328,72,686,824,798,753,3210,6500,383,340,496,3723,6231,1015,4599,6372,5607,1718,6558,6274,5894,5912,6532,3639,6603,1818,6673,1750,3644,6675,694,5268,335,5656,982,1713,5789,6677,922,431,1813,578,
6035,5766,6479,4475,1637,6697,2770,5195,6426,5786,1429,621,623,4711,4838,4840,4634,5145,2417,5936,6167,2840,4355,3406,5962,6327,5444,6690,5805,370,5810,6368,6543,922,4078,3028,6439,2608,963,4999,3351,3375,3353,1830,1457,5933,3082,619,5049,5903,2586,5574,2396,2829,4161,2949,4453,5572,4167,3423,4170,3426,413,3428,3430,5601,4077,3272,663,4596,6369,3278,6663,2157,6767,1597,6769,4899,4901,4657,4243,354,4899,4402,4427,5512,773,4649,6742,6734,6098,3408,5939,5438,4805,383,6731,116,4969,2224,6743,5573,4972,
5440,3249,5560,4976,3253,1918,4980,4982,3259,1632,4985,1925,4987,32,4989,32,4991,6738,4993,6763,2486,3318,3455,1185,5234,3443,3704,3194,6341,372,4566,3090,6612,4422,3818,6830,3181,4943,2351,6793,4923,6778,3330,1150,3338,2513,2293,2161,3755,1475,3757,2968,1480,6687,1715,308,6562,922,882,3829,6244,6254,6271,1552,6603,3756,1477,6851,5737,6356,5898,34,612,3551,6003,91,6322,5602,3659,5606,288,5527,6681,3651,5842,6729,6284,5500,376,6882,1821,6275,1669,110,413,114,6378,333,6885,421,829,500,666,5698,6662,
335,111,1715,73,3158,4598,5344,6371,4458,5697,2910,6237,5889,6603,6896,1668,335,5893,1823,6692,6886,5631,6604,5983,5060,4765,3081,6412,3554,3777,6601,6828,292,5824,4757,6269,6861,6418,383,6592,107,6594,328,5499,6926,6865,3758,6868,5868,3571,3777,367,3928,2643,4609,957,4585,3795,6786,619,5555,4743,1420,3869,6955,100,3766,6775,6846,4658,6969,6957,1822,2947,4162,3866,4739,4853,619,6755,3366,3424,3422,4171,3427,3372,117,3374,6721,6750,4899,4923,933,3852,367,2155,6771,6912,6164,6728,3602,6911,3893,6975,
2566,4871,6821,3187,4512,3441,4864,2494,6827,6248,3536,2932,2122,5508,6049,315,2012,4648,6844,4589,2268,895,6841,3416,6753,5583,6984,626,6986,4168,4975,6759,6990,6992,3376,7007,6998,100,6976,689,4968,5217,5572,3247,6800,4974,1906,503,2672,6805,3256,1918,6808,3799,3263,6812,6814,6816,5001,3489,2643,4922,3768,2215,6997,6077,7047,2147,6835,3532,4604,2008,4642,4043,6956,2566,3519,109,6996,7082,100,4594,6765,3275,1594,7006,2022,2794,6215,1269,4750,4513,3911,3760,7008,2932,3281,503,4872,7081,6969,3461,
6083,4749,7013,6218,7073,862,6915,6488,6968,7045,7075,195,4472,3316,7107,3153,2566,4818,4579,3535,7115,4936,3538,276,7124,1236,6841,2347,7027,4524,5566,6782,7102,7120,2740,7096,902,7140,3438,7113,4955,7119,7074,7009,6764,3274,6545,569,6669,446,7077,119,6780,4575,6039,7153,6732,3545,3348,3033,6737,7067,7142,6077,4919,3004,7020,4216,6832,4718,461,5726,7167,963,5986,5705,2447,4845,1189,7088,7121,4692,4744,4902,4526,2082,7105,2571,4683,7179,3512,689,6903,6637,7044,7152,2932,6971,3010,6973,4470,7088,2825,
1990,6840,7160,4819,594,6839,7071,3124,2643,1004,7162,4605,7129,7189,7126,7215,7128,4903,7103,6958,2941,7087,7109,7145,1180,4953,4254,7150,7068,1822,6959,4348,6362,4933,7172,7083,3125,2794,7111,4332,4774,4334,7188,7231,7242,2304,3282,7198,3123,4111,7088,7049,4868,7051,6799,2669,6802,3251,6804,2674,7059,2678,4984,2682,4986,3265,2688,3267,6739,7204,367,7085,4923,6793,4872,4874,3406,6824,3192,3445,3230,6571,446,1890,2832,2047,4917,6969,3766,4447,6776,4492,7226,2932,4996,3029,7182,451,6736,4992,3269,
7247,4941,866,7234,7143,7104,3525,2441,7134,2907,7319,3214,2826,7011,6480,7241,689,7207,4656,7209,7304,7256,689,7212,2313,7293,4243,2082,7010,7339,7112,6823,3191,7016,3446,5074,7286,4997,3419,7311,6817,7313,422,7335,4016,7177,6661,4110,4612,7211,4578,6837,2770,6793,6795,5020,3710,451,7052,7268,1905,6803,1909,7058,2676,7060,7275,3262,7277,2686,3266,2690,3268,4745,7356,7045,7337,7322,594,7130,7121,7301,4649,7193,7141,7388,6077,7127,7365,7210,7357,4736,4928,7244,4931,4350,4289,7151,7283,4615,7219,7262,
6969,7196,4923,2082,7137,4523,7397,7328,7314,7070,7260,5174,1137,7136,3493,4693,7303,4580,7305,7221,4603,2921,7163,7225,7416,7320,2035,7391,3333,1822,7191,1132,7432,6043,7324,2453,2936,7426,5151,7362,7404,7425,7178,7261,7455,7318,7232,7325,7213,7414,3977,2082,7395,7138,7422,4475,7195,7441,2002,7443,498,6784,5901,3419,6789,5561,2886,7411,7131,2085,1299,7475,1532,2993,71,821,6667,7157,7094,1559,7404,6959,4193,4884,4965,7483,6978,6752,6962,4050,4166,3364,6987,7036,6757,7374,7040,4173,6991,4175,6993,
7200,2251,7364,5459,2351,7130,7243,2820,7408,4288,520,895,2996,7299,7461,7257,4473,7327,7471,7084,7233,7465,1196,7263,3185,7351,5572,7353,7171,4302,6741,7478,7266,5907,32,6746,5578,2588,7517,2083,7250,7050,6084,7253,4341,7483,7446,3486,7147,4475,7522,4737,6961,4783,6613,4741,3085,4651,7095,2982,608,575,800,7004,6916,6E3,7088,7222,3533,7438,7230,7531,7201,7117,6904,6342,2643,3766,7418,7227,3415,6979,7033,6797,7035,4169,3425,7511,101,6760,4174,6762,7483,4814,7019,7435,1056,2358,6909,7449,7462,2298,
2211,7317,7205,7617,3974,7458,7427,7282,7046,7596,6842,7595,7450,2147,7133,7534,5926,7130,7420,4568,7448,3801,6793,4595,7092,7005,6370,3507,5003,4611,7539,7300,7160,7620,7248,6958,7519,7022,7334,7045,4401,7585,7224,3801,7195,4495,7498,3964,4013,7555,7174,2916,7628,7584,7079,7530,6077,3500,4896,7403,7588,7358,7613,3157,7674,7653,1822,7216,7649,7045,7686,7626,7190,4567,2404,7639,5282,7363,4928,7665,4686,2191,7667,7495,7045,7021,5617,7616,7242,200,7568,4183,4789,1573,4051,4649,6966,7355,7393,2566,7704,
7156,7194,7536,3132,7486,7634,5304,7249,629,7097,6822,7560,4514,7702,6077,7342,6320,7013,7290,7347,7293,3608,7522,7537,7453,2565,7306,7154,6766,7093,7645,7575,110,7251,6216,4340,7731,7592,1822,7264,5660,6797,7372,2667,3250,7056,4977,7377,1916,7379,2680,6810,2684,7278,4990,7280,6818,6670,1495,2436,3739,354,1713,1827,116,673,1832,6161,3921,3554,3656,1853,6451,6065,5170,5103,5104,6455,3977,431,6894,5707,5280,46,55,5921,4517,5403,46,51,5921,2524,1085,6467,5129,5839,6918,6404,68,7782,7784,3777,6768,335,
3917,276,3452,119,2579,6932,6609,5858,1856,6586,5497,6571,6848,1867,6867,6423,7789,6899,7717,7590,7203,1126,2272,4377,3587,5059,4272,1477,7369,1363,7749,3355,367,5985,2782,7497,4408,1196,276,2782,3145,4952,7521,7861,1243,6836,7520,6032,112,2782,4531,7683,100,5178,3331,7538,6819,116,7642,7719,376,7158,1623,7651,7878,5221,7871,1309,2817,954,7689,383,744,1108,7577,292,7E3,3922,3386,7218,7743,3770,7866,4384,7586,5282,7866,7637,7693,7333,5618,7296,3364,6547,6493,7084,7664,4758,4883,7666,4885,6773,116,
7032,7504,7571,6983,7507,7038,7037,3369,4172,6761,4176,5875,637,7909,7436,3541,7444,7336,4495,7407,1391,4499,7410,7159,6774,7208,3101,2770,1591,5013,7644,7821,6087,7477,4699,5047,2387,1288,4803,6790,5563,684,7889,7858,4889,3977,7286,7634,7288,2491,4877,7738,526,7740,7434,4537,1271,7877,7903,2758,7895,119,7728,7398,7716,7104,7919,3297,4685,4688,4687,7500,7732,7283,7992,4511,7994,894,7996,1189,7939,4209,7900,6079,7862,4368,4748,5618,7228,7402,7657,7173,7944,7524,7946,4932,4500,1952,5017,7873,7521,7583,
7842,6022,5762,8006,3040,7431,7912,3535,7529,6838,2662,7265,5583,7761,6801,7374,7270,7376,7272,7378,7274,7769,7276,6811,7772,6815,7774,7355,1467,7856,112,7457,7360,4312,3507,8057,7969,5004,4612,8031,7983,7624,7454,7428,7160,7302,8034,7640,7541,7308,4998,7169,7312,7387,7967,8010,4489,4331,7129,7866,8059,4155,7460,7621,7445,8028,856,8030,7889,7676,7615,7662,2566,7876,3767,7984,3977,7429,3999,7437,7661,4526,7986,7752,3801,7986,7652,7627,7991,7406,8019,2225,7947,7527,8009,3673,4368,4370,7917,2932,8057,
8088,7859,1841,335,5263,670,5530,1754,6924,6287,5055,5444,8133,112,8135,5895,697,383,72,84,77,724,6898,320,7350,8077,7352,8079,7354,7387,7031,7598,7927,7711,7506,917,7931,7510,7039,7605,7041,7515,7043,6792,7746,7643,2225,7884,6829,7950,7332,7952,6777,7160,7223,7080,1115,3232,5056,8175,7494,3948,8038,7759,6963,6798,1900,4973,7763,643,7271,3255,8047,3258,7380,32,7063,8052,7066,7386,895,7972,7343,7252,3440,7737,3444,7017,7924,3815,8069,2215,8105,7868,7656,4570,7902,8219,2170,6841,6785,7505,619,6789,
106,921,280,102,3070,3407,7962,5942,6994,6842,8073,8180,3394,7835,6850,1479,7848,34,943,646,7816,5652,315,5427,8151,607,2526,101,3847,1516,6236,6458,51,46,6224,2134,401,328,258,260,6551,340,3210,7806,6699,5926,260,8259,8271,101,8273,4610,8276,5354,5123,1802,395,4478,5777,5145,50,8266,5768,277,367,8283,8275,7801,50,5683,3868,5418,8253,6625,316,5446,6920,288,1894,98,6299,3551,3738,6278,5016,608,3851,1980,6948,5980,6950,7837,5672,5274,5342,7748,3278,3605,734,5498,948,2521,4812,4296,7610,578,882,119,
1941,78,6568,501,7599,4267,736,6390,530,3074,4911,100,87,499,7751,2584,293,7610,2867,3739,1118,4210,1862,1482,6856,427,6268,1772,5851,6259,6828,4080,5116,7830,6253,8369,6862,6419,8139,324,1567,1564,7838,5796,256,5932,7548,6163,6715,6719,5960,8231,7964,7481,2845,537,5870,6362,5873,489,895,6610,791,6058,6703,7810,6388,5241,8348,3966,4173,4627,3429,282,338,1900,2835,7558,5684,8411,3549,7887,335,5944,3102,6063,2839,1165,6075,4832,1586,1576,367,1830,6025,1088,6027,6314,6029,1159,4777,1939,6519,3535,1037,
6980,5569,7547,7960,6491,3680,2584,2723,6717,6748,5908,7553,112,5580,6377,1675,5316,2876,5966,2856,6717,5962,5965,3953,5971,2876,5970,5963,5973,2879,7146,5596,5598,2663,895,6234,3743,6395,8347,6436,5389,6230,8407,5702,7591,2417,8420,83,3782,339,5826,7787,3227,1862,65,519,281,3234,99,4710,921,960,7781,1029,7783,275,7785,6092,7788,8384,896,5518,5370,6209,5546,2524,5986,5929,6714,4021,6717,6615,32,97,111,2616,4355,5712,5370,5830,6472,6515,4327,624,7673,5766,5838,6516,455,7786,6221,5239,3799,4327,5994,
644,648,7800,6447,8302,5131,1655,706,1110,6713,5773,6460,8304,416,7817,8509,7819,3852,7957,336,5636,6725,4017,3236,428,6301,7839,5797,6420,324,5647,1410,5804,5744,8573,489,6706,5984,5627,3692,3676,8257,3680,6535,4377,5866,6943,6725,8595,3643,6691,3685,8060,616,3548,405,398,3691,7847,3693,5035,574,119,5988,3596,6424,320,1798,279,8546,6059,5103,5768,2389,8620,6491,6060,8267,1061,4824,6093,8428,5345,6797,8632,103,8431,1577,8531,6695,2059,8426,8631,1584,8633,8193,8635,8637,8433,1570,279,4823,354,8427,
8644,8636,1705,2389,8638,1935,8532,6476,5924,4090,8295,4553,4297,5836,8301,7814,8579,5865,6674,6923,5810,8039,6869,5614,6555,6354,5477,383,6881,5891,5528,6682,5530,6561,8257,3640,8684,8614,6561,383,5834,8581,5803,108,5789,5807,5793,1679,8616,8385,6227,8262,553,5465,3659,8706,3553,4470,5471,8710,5026,8379,376,8696,629,8583,3552,8700,5809,5060,2993,8137,6336,7726,110,722,8150,7956,8633,732,8331,7294,2529,2794,8730,7001,7291,5347,8332,7314,3461,8739,8328,8733,721,8735,7979,7404,8745,723,8740,8330,3607,
6602,8671,6353,4068,2797,3649,3643,6537,5046,8514,6608,6534,1564,8765,461,4082,8141,6884,8767,5898,8690,1746,5892,8134,6891,335,3696,6118,6329,8314,8592,6181,5913,1683,5271,1263,4905,1088,6322,2829,4491,996,8796,1532,633,1804,8791,6028,1147,6317,8784,8790,5912,8792,1626,8676,8799,8804,8438,4077,613,7851,8800,335,2612,8803,8810,8805,8321,6328,5627,8313,3730,5984,3689,6364,117,6333,320,7828,6346,6262,7832,5852,6265,8679,6605,1558,6607,6870,7954,3601,8188,7749,1862,1818,8829,5787,6559,6923,6334,6563,
365,6597,1486,6568,8375,6417,6345,6088,6935,7018,6158,3660,6270,6942,335,4078,4080,3778,6585,6940,8376,8873,7756,8878,8368,8865,8743,6871,4079,921,262,8868,7555,8891,3966,6347,8840,6246,6577,1653,8861,6599,3686,8879,8885,7834,6603,8614,8383,6608,4924,1809,5641,6874,5608,8856,5653,6009,4550,5341,6655,6657,3696,6611,8603,4270,5389,8424,2770,8327,8732,730,5346,8750,5074,4720,6626,788,6628,4726,622,6631,4850,6633,7610,293,5137,8667,6635,8484,7118,335,5623,6874,8605,5629,8797,6665,4724,8740,383,5928,1801,
6719,554,1410,8335,4554,6458,6636,8029,5389,8186,294,262,643,8964,3915,6497,5700,8408,8485,3386,1802,6676,8795,8815,5539,6663,4780,6887,6486,8980,7118,3547,3567,8726,256,8927,4243,8983,7831,5537,8986,5915,8960,8418,8224,453,4225,1683,3399,8174,8950,3857,4788,6981,4475,437,778,8953,6529,777,831,6722,8380,8594,1669,6012,617,3699,922,6944,6946,8378,8990,288,8323,8248,8908,6870,8386,8449,5583,7480,5941,7482,335,8929,8850,8329,8932,8757,6828,2458,5581,8461,3419,8467,5968,5586,5976,8464,8473,6111,5589,
5976,5594,8476,9066,5597,5978,3838,8448,5557,4971,7550,7552,2447,8458,8131,288,65,110,8983,2172,9003,1689,8592,292,277,551,8443,7640,6300,8625,4243,2861,1663,8854,5316,314,1645,6717,3949,727,3071,727,2109,5018,5794,4606,8642,8450,6071,935,6717,9114,6073,8429,6077,8401,496,5024,9110,3535,6024,2631,4145,4551,6281,6491,8969,8094,5389,6872,366,9123,7851,2071,8481,8263,8346,785,8981,1598,1544,9030,6303,3878,8896,8377,6239,8367,3704,8880,6588,950,455,116,6243,8891,1778,8796,6578,3739,338,6279,672,6236,
678,6286,8578,6066,2997,7776,34,84,5751,3739,8718,3562,6725,8254,121,8722,5794,6953,868,9178,3344,5211,4042,3613,1419,8298,5460,9189,72,6227,9196,442,3739,89,6878,7521,551,7565,1700,6787,8239,5051,1705,836,354,9105,3370,629,694,9107,8806,794,3612,112,3614,8298,4552,8967,7913,9201,1723,6031,8498,6603,9180,8720,5806,3424,8701,803,4467,8996,1116,7405,7891,2652,4738,7026,4523,7714,7387,1264,9244,2100,7698,7995,7700,7923,1159,4573,942,4403,7989,4752,1429,914,7413,8103,3292,291,7893,9258,7122,4016,7724,
4661,4345,9252,1312,8118,5362,8021,7410,8246,6866,9038,8146,8148,76,1973,9241,4860,3136,114,7988,7423,8516,3018,4305,9267,2227,9297,3140,9016,5926,9291,2460,9269,7229,4526,9305,2522,3137,6017,6019,5572,2636,8528,108,6053,2641,498,116,109,8849,2239,8176,9310,2629,1457,9302,1429,6986,102,8339,4825,2521,6619,8356,110,843,9313,625,2846,9297,3399,9330,6847,6864,6849,9284,8723,288,1818,1482,8907,8592,6001,4550,8913,1718,8614,5611,8918,1690,4264,5008,110,4663,5997,8949,8490,555,275,8412,8319,2667,6707,8306,
6627,4724,6629,8940,4729,8942,4732,8008,6792,3829,5039,7925,9015,5239,4980,4449,970,5624,569,5626,3643,3843,895,8945,4265,4226,4358,5992,941,9369,9143,9013,4302,8435,1391,8437,8987,8440,1545,8513,6163,8628,5022,8397,7525,1033,8399,7937,288,6024,749,2630,6018,9128,863,8798,7843,8410,9373,8421,9299,1523,8653,6093,9114,8391,91,9117,1186,8655,909,6076,8649,2022,9028,8814,8824,8816,383,5616,6508,1631,8277,2071,6664,2120,8958,8747,7002,5390,8975,2541,8966,8947,3056,9132,8925,3386,9402,9366,3550,4910,3970,
9408,5379,8970,3386,9372,2002,4083,8494,477,9418,4327,6382,6706,2351,3746,6656,880,6659,8069,2814,9477,8967,9142,9483,9133,7901,3829,262,9095,6458,9393,5126,5877,8337,2524,6235,5989,2911,6917,3347,9147,421,6579,6567,6569,9150,8881,1363,6250,8374,8893,6288,5727,8903,6587,8886,8870,9532,8887,8876,9389,9539,8618,5078,9155,8886,8372,6251,5859,9539,1984,8883,9154,8904,6256,9153,8872,6345,8875,8889,2579,9558,8886,6589,9527,6345,9032,9566,6349,6595,6578,8900,8390,9569,8905,8759,5635,8673,3932,9164,8316,
9168,9518,6290,6285,6939,9585,1575,3754,8675,1712,7816,5064,8776,5673,9458,8534,6516,5685,8388,5119,5204,5231,2215,5153,1644,8523,5111,9474,5159,383,8998,6458,9461,1115,5735,3739,5414,5948,4533,9189,5919,8561,9621,9229,5409,9620,8303,6603,5083,4373,6403,8564,6928,288,9177,9229,6724,5744,9185,8702,8577,888,9189,6702,6777,9189,9203,5467,3801,5466,558,5191,6452,6158,279,5155,6717,8394,5600,9212,575,9214,6112,882,5859,9219,6663,9189,6038,4784,9622,9200,5736,6042,3801,9617,7880,2958,9674,3739,80,9231,
8245,7815,8564,8699,9237,9351,34,304,1410,1387,8508,727,8567,7786,9241,6475,7656,5714,4518,663,313,3679,4147,1914,8670,8716,296,9695,8510,4079,7820,6772,8132,8684,6922,348,8688,8836,9522,8727,1876,9553,9563,8736,7611,1822,9539,9568,9535,7833,8842,6603,5633,300,8325,3679,6639,6641,3109,1100,6644,6735,6646,6648,679,6650,110,6652,8919,101,9497,6658,8923,7610,9463,6666,8959,8363,700,5271,5012,9324,9187,256,9048,9325,7006,8756,6345,889,9049,9716,890,5720,542,3672,8746,8930,8741,8933,6828,1463,643,9781,
9775,8931,3704,8742,9728,9135,3552,9441,3381,708,9594,2543,5216,8813,3535,9613,4570,429,6444,4587,50,54,4091,104,9809,52,913,982,2950,4465,8607,9736,6556,8309,9691,7816,5789,8585,8575,9241,9089,9158,9598,4327,577,4962,8274,9459,8979,8489,9435,2081,3752,279,9641,79,8729,328,2083,8963,4841,6491,6021,9506,2041,9841,5252,9689,294,8262,9584,9832,9856,352,7915,1429,6622,5808,6335,8119,2786,9639,8721,9861,5054,8837,1798,354,9549,9001,8884,9536,9728,3702,9562,6941,6345,6257,9575,3608,9829,551,9160,9887,8758,
9710,5632,9821,6868,6277,9166,3742,9169,3745,9587,3748,9174,5006,9189,5788,6725,9641,8996,1778,9637,5736,9234,8698,9909,9861,461,4767,6931,9723,358,6934,9892,6936,987,5896,9733,5862,6260,8895,9929,8897,6583,9283,6951,9039,5673,2145,8738,8754,9466,9783,9052,7018,7130,8753,8731,9789,9944,6345,5900,9042,7760,2582,7551,8452,8457,7255,7679,4468,8015,7433,8752,9941,9949,9770,7853,7958,7138,8229,7928,452,6788,7964,8240,7750,9788,9968,9050,9791,9784,7018,7181,8427,921,4175,4855,9342,4190,2525,7490,622,7492,
616,8176,2830,7297,7916,7164,2932,9270,4617,2526,5443,99,121,6712,8977,7610,7130,10003,7399,9227,7843,1862,8381,369,8771,8592,9140,9859,6662,1778,8771,383,9915,9688,5792,8187,9029,5487,5848,6860,9546,9576,9894,6927,6355,9767,3796,9391,2351,8544,9491,8193,6165,6108,6175,9339,6133,6173,6200,6171,6186,6178,6185,10051,6184,6119,6183,6122,6146,10054,6134,2865,6197,10052,6190,10065,1524,10064,6187,6144,10067,10051,6195,6131,10065,6202,6193,6147,461,5466,9226,8098,4526,6226,2958,10086,5470,6462,10091,6847,
8588,9399,3689,9241,4124,4126,7920,4066,4670,8761,4761,4197,2809,4764,4671,4766,4762,2994,7488,2525,9479,4557,4911,941,4665,9650,4684,3457,4200,10111,10107,4199,10104,4074,10112,6653,335,7986,75,101,121,775,9849,8388,6494,8653,6717,10140,5578,4807,1571,7608,8951,3733,3735,3617,8436,10149,114,8693,4564,4315,4914,629,4697,9082,4856,9818,3292,2993,90,495,109,8890,10102,3984,10124,10106,4202,10108,4133,4760,10051,9920,10113,1159,2993,5807,8012,6216,4759,6930,10178,10130,4072,10128,4196,10174,10131,3857,
8306,405,8775,6163,9851,9475,9991,2972,9130,8001,10123,10191,4672,3313,10109,10105,10188,10126,6204,9199,4123,3979,9450,4193,4129,10212,10193,10190,10177,3992,4076,6016,749,6026,700,6312,2094,5754,9471,10011,9684,4570,4124,3877,3753,10170,4128,10172,10221,4673,10176,10187,10225,3469,461,5994,4179,10118,6970,10145,354,10158,110,10161,6439,4147,1931,8286,670,8606,8924,7148,5363,10264,3689,2800,3672,10265,8434,4666,5956,8193,4961,9406,1901,4556,4558,4964,1590,8977,3548,9183,4378,808,1105,2527,4301,6549,
109,10234,9386,7495,6858,100,10295,9131,9370,9839,3680,7816,10265,742,7781,10098,383,6457,4570,9428,794,10286,10196,4939,10266,1217,5233,6374,4141,10257,4798,6438,10163,550,268,655,108,72,70,79,86,1466,9112,5583,9446,8647,1186,9450,6078,8597,5744,8599,6682,8601,446,9382,5166,496,10276,8230,620,3918,95,4419,987,6980,287,5207,95,10140,1829,550,4262,9365,10015,9484,461,453,666,10315,3931,315,10288,4442,10296,288,761,1213,647,10300,10199,6505,10369,7894,10328,578,86,10332,10334,2351,104,5135,10373,5640,
10317,7610,6708,4836,6711,10138,6458,5390,1602,982,9444,9989,4846,4859,9384,2388,10255,626,431,10406,5563,10380,2855,101,10134,121,825,9534,9950,383,103,121,275,2458,674,4697,6431,729,10383,9410,4124,4058,10162,71,10429,1029,429,516,10205,10103,10224,4677,10209,10246,10110,10173,4678,10181,4755,348,10184,7098,4065,10171,10207,10125,10222,10210,10129,10213,10202,629,3980,10218,10241,4194,10462,10453,10450,10220,10248,4768,8874,120,4261,10436,8490,8935,5531,4945,10377,9519,6157,3727,8404,4555,798,8403,
4916,10216,10456,315,7825,9303,3108,10477,10449,4132,10503,10179,10194,3978,10498,121,6575,10472,10506,10189,10465,10192,10454,4754,3294,4861,2526,378,10219,10243,10478,4763,10451,10211,10526,10180,4399,10157,4101,263,10367,10087,10201,6596,3746,10350,9633,7309,619,10361,10357,5677,3561,10360,10355,10363,5534,10114,2797,1503,4247,10513,10525,10504,4071,10516,10208,10249,10553,4620,3611,10162,5251,2008,10502,10558,10507,10223,10247,10559,4203,10468,110,5807,8085,10459,10186,10452,10244,10476,10571,
10189,10577,4663,10120,10524,10474,10584,10505,10586,10467,8960,8684,115,10436,9504,8409,2342,10402,8560,6065,5962,9444,1165,95,4831,5230,7516,10455,2797,10166,2002,9542,10557,10592,10530,10127,10448,10572,2658,9264,10182,3424,10512,7993,10206,10623,10515,10528,10466,10222,10577,10439,625,3841,10420,10591,10632,10213,10561,10463,10518,10509,2797,5807,10500,10642,10574,10572,10645,10475,10563,3584,3643,10345,3651,10637,10566,4060,10321,4229,10534,10652,10583,10621,10573,10669,10575,10531,10304,10425,
6797,436,9215,6101,453,373,895,5994,950,1713,76,8351,367,901,3740,2524,10687,538,10605,6434,8992,8490,259,106,4141,294,8954,9358,10483,10303,10428,10430,10444,6089,10536,7610,10394,4040,5627,10287,10317,10290,8362,9146,10033,320,6024,10275,1675,9877,8864,9880,3608,9865,8701,10726,9543,6063,10732,9925,9984,6535,6056,10727,7833,10729,6535,541,6292,9933,9151,9047,9846,8974,3552,9470,9557,9884,8886,933,10298,10018,4083,5495,10736,10343,3552,5641,10735,10746,9528,10298,729,4503,3852,9539,3746,9847,9469,
3942,9149,10766,5081,9820,8680,8845,8593,9582,9523,3424,1883,672,291,3551,643,814,91,3142,335,645,3730,296,5603,302,10794,517,8787,1091,5568,10800,3177,10795,10803,7611,410,10801,595,10809,10089,6228,125,93,6596,3916,6581,8138,10293,10618,9172,9865,4251,1328,101,6945,810,10789,6277,278,10792,10812,10796,616,5283,1465,10817,9170,9903,9572,666,10629,9588,8863,6632,10522,339,6925,10540,8598,8138,8482,9172,5543,8854,9362,3863,10788,6300,10791,284,10793,10807,10802,10797,1091,5612,10841,1438,10827,1449,
3749,1126,10846,1328,1723,5612,10831,10863,10834,10865,10836,10809,10799,287,10886,10869,289,10805,10889,10867,10813,10891,5469,10806,3506,10808,10891,10815,301,10818,1335,7880,6300,4621,1410,6542,1608,10832,3739,10884,271,10866,10900,10868,10838,10871,10905,9840,9544,6284,9865,3472,10427,3739,10849,10911,256,292,116,798,9385,1623,115,58,123,120,271,1185,121,10942,528,125,47,10940,58,1925,10944,48,125,5867,10913,10864,10916,10890,616,10888,2315,10901,10838,10805,10922,4924,10927,760,9682,8589,10881,
1873,3739,10935,814,372,10938,123,5466,10945,4907,5471,10981,520,10947,10979,3659,10950,909,10983,10953,10955,10883,3950,10885,10895,10837,376,2834,10899,2504,10963,376,1743,10966,3851,345,5116,10854,9172,1165,10651,10822,10167,10169,285,8499,9022,111,8792,8592,4950,721,9942,9782,9772,8886,3834,329,2524,10492,6458,9420,2995,762,6222,6468,4327,10566,9792,9950,11027,9728,1477,51,11041,9980,8748,9792,5863,9577,10039,8681,1502,8915,10375,8917,10861,8592,9597,3004,6041,6036,5350,5460,3724,5463,9995,7398,
10311,3535,10903,7521,10236,9125,10215,7670,5605,9347,11052,9737,8249,3674,8365,421,1854,432,9491,9727,8898,8491,6252,9161,10780,8844,9738,8846,5673,2135,9863,3529,109,8953,8609,3582,9080,8570,8600,9917,10030,9186,8703,3558,6044,9181,9640,9918,3589,10264,11056,2737,8837,9524,455,9526,10778,9564,6337,9545,9555,5074,9565,11127,9728,9732,9879,9734,6583,9572,3746,8901,3210,9727,11051,10038,8907,9739,1629,6705,5679,7917,10336,6458,10200,9611,10132,10325,9092,4526,9496,8921,9499,10318,5232,5389,9E3,8809,
1687,8825,773,11077,8999,6894,280,8711,11154,10385,9852,9175,1713,9082,9084,4232,10041,431,2833,1429,686,11183,629,9246,6093,2691,9444,3063,9317,5084,1571,895,10998,9943,6943,10494,323,11032,8224,431,578,9099,6093,9101,6868,8193,9104,9665,539,8401,11204,9857,7569,7710,4740,619,4078,114,2639,941,631,633,11227,10342,1449,8630,9113,8658,6068,5738,6070,11236,1901,10339,10611,9451,474,10043,7953,9514,8991,9838,10386,10132,9516,10856,10384,10697,10016,10720,9867,9529,9876,9531,9575,11091,9886,11134,11091,
9889,9159,10753,10036,9735,11081,9896,6276,9165,3741,9583,2124,10842,3747,10875,9174,3751,689,9903,3547,8571,5744,10931,8677,6533,9233,11115,9235,5628,4550,461,8256,9595,6381,11246,4371,6091,6162,6797,10048,10052,5748,10068,6171,6174,11309,10082,6200,10060,6180,10063,10062,6179,10056,10069,10076,10049,10070,10074,10072,11321,10078,6140,6199,10074,10081,6111,8480,9083,577,3792,11221,9303,834,11196,578,11198,354,6148,9434,10386,6239,9922,9529,279,9033,6792,6330,11263,11139,9840,11285,10710,10035,8904,
11264,11270,11362,11357,2759,1487,3950,4319,10777,11137,8841,9935,11095,3629,9581,9899,1853,4464,8849,1126,6284,9589,8138,292,11359,6284,5736,11290,10933,10975,5512,9762,749,6312,8590,409,8592,3681,11176,996,6324,5104,10762,6514,1391,10028,8598,1523,279,11206,7129,10098,1088,8605,10309,8608,315,2272,8610,9717,8779,5252,8781,1742,9241,6639,742,8774,5265,5256,7555,9183,7610,11161,9498,9757,11249,9505,10538,7329,2043,9453,1015,11430,6684,8439,7756,689,5256,1088,11446,1823,11432,731,11444,569,11453,3635,
6676,3320,9503,5145,11155,10319,5389,9502,9472,1631,9610,11466,6157,2065,11457,616,11459,3646,11461,7854,100,11451,1391,11477,9184,3684,10132,1058,6874,11484,4082,9024,376,9719,1730,1842,837,684,824,11120,9579,9859,9767,1778,3550,8123,11501,1743,335,9913,9179,11294,9916,11117,11111,9642,8515,290,4525,11223,9974,9210,5439,9656,9664,1905,9217,480,7030,9907,11075,9677,9197,11172,9625,9675,9204,2406,11114,5754,11295,9910,10096,6682,11427,670,10693,3561,6634,3056,5360,1699,9398,6682,3672,11547,1410,895,
7181,1172,4079,11548,5239,11551,5231,11553,3651,10686,11561,11557,1164,1524,369,9324,8490,10815,77,3703,8212,1304,7114,9684,6464,11072,11534,9805,4459,10253,8833,10307,450,550,11019,8953,5627,8765,1830,11585,3535,9794,11594,3643,8854,8480,100,10700,1206,3548,6874,65,11605,10701,8685,3651,10214,2958,2221,9377,4961,709,1883,5449,495,8299,5129,7802,5354,9333,9380,9010,4649,9012,8490,3839,11589,1566,11591,9457,5265,11601,8686,5265,11492,9711,9026,335,9354,11121,9241,9357,3863,11640,6883,6008,4381,5641,
9401,10536,262,9368,8483,9409,9371,8420,1843,9375,8416,2351,10485,9379,4725,6630,9383,10521,10291,5389,3825,8442,8537,8224,9388,2524,9510,9707,8519,11599,9508,3864,11302,9511,11685,3801,11468,9404,6657,9481,11661,11440,11156,9427,9412,2225,9414,9004,3662,6462,2627,9055,10676,11214,5964,9061,8469,9063,8472,8477,5975,2876,2884,2663,10147,9427,11598,3801,8372,6874,9425,5753,5408,11064,5401,1801,11475,1685,9086,1807,10148,9429,9341,329,9129,11347,11179,9436,9487,4949,11153,4307,9443,9116,11240,9118,1582,
10340,4832,2642,9331,7805,11038,5618,788,9760,11202,731,9848,8965,10711,11697,10602,1700,8946,262,10116,4558,9482,11769,9486,577,8493,495,9490,11305,4570,9493,11151,4570,11436,9756,6660,8944,11767,10301,11662,10303,11073,2770,11071,3801,8487,10378,743,11253,8263,10024,11258,8859,10304,6566,11125,10740,9930,9053,10734,11262,11134,3608,8867,10761,6470,10745,11372,8370,7018,9560,8877,11130,10728,5074,10924,11818,2342,5856,11814,11821,10747,8882,11826,10741,5074,11265,11834,9528,11824,11016,11841,6588,
2566,9731,9932,11845,9570,6947,11140,6598,9574,11815,9893,9035,11108,11641,11426,11377,11277,810,9901,3625,9171,9588,10204,9175,11403,9241,10313,8766,4511,11403,5271,2637,2786,11876,6326,8434,749,1002,6317,1398,11880,8438,11878,1285,11887,1485,6653,1778,11647,10659,5269,10269,397,3210,10041,11428,3687,10577,8581,5116,882,806,511,9587,7112,10582,10529,10673,10622,10653,10587,10819,9866,9855,11709,10353,2794,1595,11036,6072,627,4861,95,5207,2860,11928,10545,823,10362,11115,457,121,4359,8475,477,3833,
281,1900,2872,102,95,10723,119,4056,2797,11905,9137,1143,11907,107,11909,7735,11912,10635,10245,10514,10596,10614,5277,10167,10824,10446,10461,10643,10464,10634,10517,10226,11964,110,10616,10168,10501,4010,11969,11916,10644,11972,10562,10479,11700,4666,10150,3737,10152,11988,10154,3617,1862,11123,9861,10765,11850,10037,11858,11082,11275,10784,320,10823,8883,383,10293,11844,9904,6284,10143,11953,1119,11955,11957,12012,5305,11906,4079,11956,311,3747,10017,11591,8858,5016,11129,9551,11847,11830,8838,
6593,11356,6595,6534,6365,3676,11148,371,11061,5134,11150,8978,284,6448,8126,7654,7697,8130,7555,8129,7970,1137,7641,7091,7882,296,9326,1336,8064,7648,1263,8E3,12063,7555,10013,1467,12053,8065,12055,2775,7887,5006,68,5007,282,5419,5539,8592,10298,993,624,729,11549,11470,10302,9484,455,961,6239,7982,2180,9189,5239,5781,4492,291,328,2221,74,6906,12086,319,7808,6516,108,488,3550,555,414,431,8291,5111,3263,4327,1518,575,11665,8414,9376,2351,12108,117,12110,499,2221,12114,4713,6814,9492,3453,10757,6213,
12102,98,12104,284,12097,4570,6701,6392,8715,11858,12079,11704,1736,8691,11648,12027,371,11843,9883,10036,3608,11824,11967,9554,11827,6863,11052,11147,11098,5274,673,1678,11463,5111,11465,11165,3386,2082,11434,11800,11693,9367,82,8488,11698,11472,7180,670,12138,10916,5361,1031,10206,8683,11423,8614,3672,287,6889,1751,668,670,287,6680,12149,11507,3672,10508,1936,12184,32,11564,9280,10103,12189,1738,11121,1754,12193,12200,11860,1823,12213,32,12199,12190,12212,1683,10508,12176,4227,5115,10257,11775,
9144,1626,101,6138,6246,11255,11250,11743,3710,8946,12229,9410,608,299,7851,5427,7555,11299,2225,12245,8874,11687,11683,8292,11691,4526,12225,9405,11696,11792,12180,12171,8660,10775,960,10600,5145,11471,12261,7555,1506,12205,12207,12187,12209,3791,12194,6683,12217,6646,32,12276,8143,5912,12198,6672,12215,11653,11447,10508,11787,8922,11789,11800,5559,1822,12174,10489,9364,11771,110,11773,10253,12179,11769,11029,9389,12252,6447,12254,7398,2082,3672,12271,12186,5625,12188,12275,12286,6890,1742,12192,
12280,12318,12195,5255,12197,12219,12285,12221,12201,670,10508,322,327,11563,12314,9397,12316,5480,12323,12277,9720,1058,12214,12329,12216,12342,455,12284,1745,12211,11507,11491,1708,10027,11512,9825,12232,8586,11151,10041,11268,9864,11695,9835,7610,3851,3727,9843,9845,2043,11765,7570,12237,11367,9544,9641,9858,12058,6700,9861,9999,9864,9861,6874,11408,11514,11919,9873,11350,11840,12159,11838,9926,9090,11269,11361,12160,9034,6926,12002,11862,9167,11864,9584,11280,9590,5448,12317,12345,12287,11454,
2626,8689,6603,12210,3632,12222,5912,6686,303,10305,4478,8902,5661,11350,6579,5807,9539,6579,11013,11856,8371,11849,12392,11811,7018,10400,6710,8839,12432,9984,8861,10846,12435,11822,8826,5444,12401,12164,5457,2392,431,9676,4526,965,3021,6046,3801,12456,431,9671,3801,368,7709,11976,9377,12465,12454,7398,12464,4321,12458,4093,5006,3065,7490,512,11085,6358,11093,10761,9936,8324,12450,12028,3490,2317,1939,7864,2770,2623,7758,6796,8193,8041,7054,7375,4978,6806,7768,3260,7770,3264,7383,7279,7385,7281,
2475,7863,11742,7398,3103,7523,4286,9423,4277,3434,2695,3414,6842,10013,3286,7160,6972,8244,10001,3334,7337,7941,3507,3126,2710,3225,8184,2117,2333,2312,4949,3213,7451,2441,2711,9261,9295,2499,12520,8218,11164,2215,3382,3155,4793,9308,12512,12540,7632,2942,12544,4475,12513,7258,503,7630,12528,12562,7338,10326,2475,7202,11251,11449,3280,12065,4882,4011,7922,7997,12572,2933,3322,3317,8211,3535,12523,4899,12522,2766,4489,10458,9309,2482,3509,12525,11519,12545,3537,3316,3527,8108,12555,2366,12547,12553,
9963,7706,2507,7337,12539,2366,4246,1990,2208,12581,7487,2913,12574,10185,7921,7699,3111,2815,2896,2246,12609,3315,12557,12543,6781,9295,2530,278,2898,9439,3218,3065,6082,9006,4638,2847,9962,7869,7340,3161,12552,8007,12297,1018,12640,9294,12560,2482,3145,8125,4570,12631,2935,7321,9274,3173,3518,7708,4647,3419,6965,4054,7029,4178,7845,11415,7847,3037,2400,8111,5372,3207,3336,2402,7396,7694,7398,1936,12650,4873,7099,3909,7254,2316,7196,12615,3480,3126,2312,12690,12622,12488,2319,2441,3044,3327,3530,
2522,9266,8226,2850,12537,12534,12699,3481,2896,4923,12585,8242,12679,8074,12591,2552,12645,4894,7614,5604,12565,7533,12583,4790,2925,7655,7705,3801,12656,2710,12559,5926,2623,11290,10047,5048,276,4804,6112,6748,3377,3045,3509,8243,12595,12651,2366,12068,12556,12657,2035,12711,2419,3323,8422,3497,11577,5124,7146,2208,10160,8387,9955,9076,9958,9078,12518,12580,7473,109,12694,9327,3805,4649,9346,12491,12676,3499,8093,11441,3497,4432,12605,12725,12602,3271,6820,12724,7729,8213,7346,8215,7348,6936,12644,
2400,10013,12546,2509,8072,12714,12526,11072,605,3450,2522,2993,11675,8982,12754,112,12599,12535,3201,3162,12723,12568,11480,3388,2733,2554,12784,12675,3168,7886,12634,12579,2773,108,12070,12066,8951,9073,11340,2666,12765,4703,12767,2894,12700,3120,2592,3151,12732,2302,1986,12674,7012,7754,7101,12695,7647,4028,2316,2155,4798,12763,8193,9044,11522,6791,12635,2400,7906,12600,12630,3328,8025,5517,9297,9430,9314,5583,9316,2638,2640,12768,3126,12564,3513,8018,12515,8020,7409,8121,12269,3328,12493,7851,
2581,8195,7053,8197,7057,8046,7767,8048,12502,8050,7771,12505,7773,12507,7775,11442,12580,12662,10403,8193,12665,7574,3474,12541,3199,12707,7175,3334,12587,3095,7307,6733,10353,7544,8208,12672,12779,4942,12642,12048,3144,8124,8794,12777,12701,12919,3498,12821,12683,2255,12592,12718,8068,12549,7220,3513,4505,12814,3542,3045,12510,11069,9295,3103,3396,12756,10648,629,12806,12444,12575,11981,10672,10654,11984,10646,11974,12691,2909,12646,7581,12688,12882,4497,12884,7526,278,3076,7390,12659,1362,9998,
11101,5554,7959,9074,5572,12860,6112,9977,8333,9297,12753,3095,3220,12760,11102,2754,5955,9056,5572,9058,5585,2863,2871,9062,5590,2524,9065,11718,5974,9068,13010,8478,9046,12968,12623,2891,12980,12949,12841,12608,12956,12656,3539,2150,7907,12310,3119,12570,12374,12656,12530,12887,12701,7672,8107,12948,4313,12750,2246,12813,12721,12946,3475,12752,13023,12811,13033,3270,2560,7925,8160,12373,11520,7601,3367,7603,8167,7606,7514,11721,3387,12778,12821,13036,13049,10379,12413,11078,3334,12611,9138,7125,
12487,12603,853,12594,9207,12940,12717,12864,4937,8999,1986,12637,9802,8099,13075,12787,3344,8154,7543,8156,7545,9332,9334,3419,9310,9337,1880,4862,1417,11739,3088,12942,4900,7951,12746,9304,2482,13076,3391,13037,2208,10352,9973,11196,477,2400,3073,3069,3071,1592,13121,6652,12972,4928,11192,5572,12911,4189,2475,3509,12625,3241,12800,4899,12745,13079,2412,12661,12050,10630,12576,12620,3965,3497,12816,917,12880,12607,7742,12704,7466,12597,12632,7326,12789,13028,12487,12581,13067,9729,13152,7722,3540,
12845,2371,13085,431,12848,12953,12640,4697,12776,12643,12487,4867,8192,12584,13085,6213,12939,13141,3321,3150,13026,12866,7535,12487,3509,4895,10537,12596,13191,3208,13083,12930,3435,13137,6842,8183,12708,12692,13168,1983,12796,12927,8222,12728,12824,3046,12830,3185,7973,12685,8214,6826,12794,7018,3131,12914,3520,12629,4475,1936,12798,13208,12821,12853,7361,13039,3223,13187,12694,2851,3389,12995,7237,3517,13186,13166,13188,13038,12688,13198,9805,840,323,3235,3697,12647,12819,12888,8191,12494,10353,
12496,12894,7765,12896,4981,12501,6809,12900,12504,4988,7384,8080,9343,9292,13176,6474,13255,294,7881,8959,12906,12692,2077,13047,12825,6779,7660,13245,11462,12709,12842,12582,53,12818,13016,13289,13135,3356,13201,12548,8089,7942,2695,12744,12802,13109,13080,3342,13090,863,13092,5583,12924,12508,13254,13283,13052,7503,13054,6982,3420,7930,6756,13058,7934,7607,7936,12742,12841,13179,13257,12785,2753,13106,8358,13275,7197,13154,2718,12857,9954,12859,8393,9045,8395,13034,13213,7502,4163,11222,13317,
13056,7932,6988,7512,7935,10613,12828,13333,7287,13217,12792,13219,7739,5074,4124,12806,12431,11968,10242,10620,11914,10671,11913,10624,12509,4368,10580,13212,7085,13042,13241,12841,13112,3484,13108,13140,13207,13196,12677,8032,7192,12680,12867,13035,1149,13193,12613,13187,13163,3154,13387,12943,13298,12531,2816,3078,12749,13234,13045,13224,13027,13195,12722,13223,2483,3477,13225,12733,13064,2288,7940,13206,7323,13411,12627,12916,3381,12750,7487,1862,350,10372,5866,12151,6899,9157,9890,11364,12398,
12447,324,5845,12040,1536,9083,11175,12830,6300,12382,6838,10908,4810,1410,11412,9093,3551,9183,13452,12474,9027,9455,12080,11300,3679,5356,741,12516,6322,9765,11643,9895,10781,9822,9177,98,661,7955,12425,10721,7829,12481,12441,13438,376,5140,11925,6166,12485,6303,1336,13472,7594,12956,2830,4593,12073,12827,2771,13472,12831,12854,678,1672,4368,12490,9647,12137,7394,12826,13335,2829,1890,115,7121,12921,10543,91,13310,12905,1623,13510,13506,13284,8540,2770,13492,13345,8446,3419,13349,8166,13322,13061,
13324,11571,13501,4489,12654,4638,13488,1890,12783,12929,7913,13505,7671,12604,13541,9672,12137,7468,7421,13390,4475,13492,7734,7238,7289,13359,3193,13220,9669,13543,7745,294,6840,13510,12735,10353,5435,5049,5562,5052,4706,13509,12137,13540,8223,13537,1250,13472,12062,4064,6643,8528,12619,4688,11529,13561,7593,12524,13383,9196,12137,7090,7155,13278,13518,13592,13256,12890,2666,12892,7373,4975,8044,12499,7273,8202,8049,7381,8051,12902,8053,12904,8055,13538,98,12514,12974,9868,12885,12977,13573,4044,
13143,4511,13582,8002,10508,1467,13497,13215,13159,7148,7345,7976,12793,13361,6828,13492,13617,4930,12975,1954,8022,13496,1890,13525,7599,8193,13528,13321,6989,7513,7042,4177,13560,7292,13291,372,13510,7331,8033,12803,11532,13548,8182,13285,13591,13511,7918,13624,7112,13626,13584,894,13325,6970,13646,8014,13546,13664,4817,13679,13576,13329,974,13630,3243,12638,9973,13259,7269,7764,8199,4979,13606,4983,13608,8204,7382,13268,12506,13270,13622,3145,13668,13520,13314,13346,12835,8163,13058,13350,6758,
8168,13653,8170,13655,3584,13534,1939,13375,7398,13492,13512,13631,7735,13634,7015,13636,7978,11828,2065,12983,13504,13493,7166,8078,2727,7170,12925,13500,9396,616,1226,13472,13474,108,558,694,13586,13669,8116,9252,13405,988,13489,12801,7469,13551,13110,13578,13678,8178,13662,13303,9616,13660,13507,12944,4156,13615,7659,13522,13735,7121,13640,6874,7246,13659,12137,12869,13775,7165,6794,13689,8162,619,13691,8043,13693,8045,8200,12897,13607,12899,13609,12901,13701,12903,13703,13742,13327,13073,7135,
13519,13544,12678,13759,12715,12601,13756,1890,13513,13738,3350,13801,7295,12137,9972,13787,907,7386,287,5382,11369,4802,6719,12354,11509,1890,13747,13749,8576,8515,8848,9761,6603,13483,454,1137,3550,5391,327,1673,6919,11516,8909,538,13843,2008,2544,8597,13850,3847,11068,1429,1691,11678,9113,1697,9444,11307,1706,13468,336,1711,10420,1605,3670,6528,392,11397,5432,11291,9740,8594,11415,8995,11405,11401,1015,3578,111,8601,11418,406,3581,409,8694,12044,9870,9236,11515,9241,5466,8714,11668,12044,13897,
7366,2958,13900,8712,6462,13903,4327,120,13906,4570,122,13909,6047,13912,5473,11052,13892,5790,11118,12408,12339,12410,12319,12278,8984,13461,5644,11052,12416,3642,12346,11478,6685,5485,5269,13877,13926,387,3065,11047,6910,7645,11043,3608,13836,11202,8843,9635,6407,274,1887,13846,9241,5412,3561,350,413,5201,1617,5688,7796,7428,10255,960,13956,329,11758,7813,6516,10839,5223,6496,12303,12230,948,994,65,552,450,8345,11464,11178,12781,1700,9806,9491,11748,13861,9659,6169,457,1697,6011,13925,6013,11735,
11448,3796,6496,13965,5109,9702,11783,6392,9607,12240,11575,13786,12470,13999,454,5246,5510,6443,6496,5094,840,5167,7791,5100,4023,5103,5689,3093,8517,6698,5411,13963,11191,13972,11439,11769,9804,8444,6496,5165,14017,5142,13958,5146,4636,5172,12832,10004,5400,13964,454,12872,10260,13981,11256,12571,13998,5225,2632,6319,14039,6453,4716,13961,5160,14010,13957,14019,5687,4309,14023,3818,14028,110,14E3,12996,6491,9615,1641,6496,5139,14037,566,14057,7793,5148,7795,9604,8227,14069,7470,8278,6496,6319,8553,
4713,8555,9677,14069,9619,9624,5618,14069,9627,14097,4784,14069,9623,5302,4327,1799,836,14104,4455,8664,6516,14107,575,14100,5247,14111,9492,6496,8101,5180,5145,5182,6516,5234,6431,5226,14031,12230,11349,13477,5275,5664,5070,12032,5234,6415,13480,5082,6401,5085,9593,6355,9898,11863,320,11389,105,5731,2059,14025,10973,10934,644,10976,7974,32,2954,9097,9451,3547,6211,9361,11058,5455,8703,3536,6037,11730,960,12469,12596,5754,12473,13723,11067,553,5621,11796,11537,4243,11795,13904,5765,11538,11375,13870,
11055,11507,9911,14186,11054,6880,6300,9355,9722,14131,11124,8863,9539,11817,13480,11819,8871,10754,9793,8888,11825,12030,2450,9726,14205,12156,14207,11844,12445,11835,13164,12424,14216,9528,11136,14220,5759,11366,6579,11142,11094,12162,11648,13441,10722,11723,5282,14164,5524,12516,14163,11655,6010,522,8920,11437,12292,13253,5311,11729,11062,11065,9495,8735,11042,9051,11846,11079,12043,10374,6054,8937,9380,8939,4728,10849,12809,12298,4813,11768,13974,6087,14233,13723,11761,9465,9782,9005,13087,5372,
12372,629,12265,9609,12088,12374,14033,9651,14180,4492,11531,4526,8972,9862,12263,11126,12235,12260,5381,11733,296,8820,14044,9035,14294,8348,11394,794,11396,11414,13937,10855,6926,11416,11899,5843,10314,14307,5043,8909,10100,11803,12618,10447,11982,11971,11962,10636,6481,14257,10197,6275,14128,10437,3979,5653,10471,13144,12962,13371,10633,14324,10647,8402,11205,10496,2770,6944,10009,6207,6714,10607,6717,10609,11243,13062,13363,10204,11911,10631,14322,11961,10595,14325,11975,4756,11958,14357,12963,
14338,14360,10647,9875,13514,10338,9448,11754,9120,4956,10228,10152,10228,14326,10397,10487,11164,2814,3746,1482,8854,1027,12045,6155,14268,12957,110,10239,11352,10619,11970,14359,13368,13372,10148,11992,9721,11702,10153,8693,14130,11259,14370,11998,14223,8886,11400,10739,12429,10743,10760,14138,14191,10782,14144,12403,8617,11869,6283,14309,11867,10828,10830,10912,10994,10835,10997,10809,13970,832,10872,10923,11371,9175,3548,11555,11569,11184,14166,12379,5926,11902,1391,11455,890,11158,2351,1E4,9125,
11739,10719,11273,13470,11083,5627,83,645,112,6158,13847,6870,14435,9303,9908,11289,10871,11456,13994,2239,8800,13947,14187,12421,8564,9764,5422,8592,9769,13941,9981,8734,9945,9669,103,12313,1699,3108,834,3782,5657,9342,2800,14494,6906,1847,2969,13865,12002,13458,11169,8438,9765,13953,1671,10569,11980,1033,834,10756,8351,44,14495,14501,44,4724,259,673,44,8888,1110,115,103,111,14517,14500,739,3252,14518,14532,50,694,9339,629,260,9833,4833,14498,7183,6937,14516,14534,490,14521,100,14523,14525,921,14528,
14530,14496,757,14533,14531,14557,14536,4862,14539,355,6657,12289,14251,11048,9790,14487,6345,3612,10136,14151,12971,14275,13180,3801,14284,7695,355,563,4724,453,367,342,9223,13881,11348,14419,9822,67,500,1702,103,11505,14195,14316,8777,13838,11500,13931,11508,1736,68,82,5845,12081,345,11208,5786,10726,13456,7398,1637,8288,2483,14609,645,9494,6703,6213,76,14618,4464,10726,10094,6703,6694,109,345,14623,5123,6427,14185,14229,11896,11422,12351,14602,11482,14598,8678,6603,12281,5265,5484,8145,6921,12422,
9696,8511,9715,8497,13875,11149,115,12239,14330,10484,311,5137,8353,14501,5791,13986,14050,12236,13983,11468,14006,10303,1797,14662,6359,101,85,10749,12372,11305,6504,14051,11179,14477,14192,34,4837,1029,10211,9699,2794,14071,13240,6974,7045,3461,14692,13766,1236,7990,2659,2794,8114,7121,14696,454,13184,13385,14701,629,14697,13384,1886,14702,12956,9947,14714,13495,9940,4102,12074,11095,2808,461,13839,6894,8315,11378,715,2521,8974,111,10590,10882,10790,10915,12206,2225,9037,1869,10919,1247,6359,935,
14437,9296,2095,10787,14734,10833,10995,10958,14433,10891,11E3,10894,10918,10896,10960,10904,13481,1473,9349,9937,14231,256,12773,114,14048,13514,12875,9318,12877,9300,9292,9345,5751,11578,5199,7024,9553,8193,13510,496,7810,9249,6619,4649,13271,9306,9298,13508,6943,13249,3234,290,8574,7610,555,1847,5135,293,10750,745,10752,14658,14245,14746,14790,14707,2134,12640,13273,4606,12640,10013,8036,12984,9971,12858,11922,13340,12861,5563,9953,12986,8040,9956,9077,5436,14789,9311,14768,9329,14777,9303,2071,
13096,11820,6797,13099,2018,9338,9340,9127,9426,8491,14800,6361,12516,14739,12851,4850,3561,3594,1419,14446,3348,10258,100,118,4464,10360,648,397,10342,1862,14851,6411,12426,8861,9525,11810,11822,1699,304,11141,3699,8956,9464,1106,14839,11144,5074,14201,11999,11091,9538,12035,11852,8899,3746,12444,14883,11793,569,14876,6598,14878,6663,14272,112,14414,12032,6694,11837,12436,10539,328,13365,14411,6247,14875,8900,14899,474,4835,12439,12034,12441,14913,14877,9690,9552,14906,14874,5231,14897,6089,14915,
12579,8868,14921,14898,9690,14222,14894,12260,14928,69,14930,12375,2549,14937,14908,10710,6600,10736,14933,14929,5809,14684,10782,10041,9759,4724,13803,9264,12770,12628,13409,13552,14901,13773,13114,4123,12566,13163,14955,8123,13535,12933,4243,8964,10329,13172,4475,1809,3078,1754,13940,6668,9771,14253,8886,14969,13554,4276,13728,6825,13558,13637,7018,14986,13598,3246,7267,7762,13692,8198,13792,13695,8201,13697,13796,13699,13610,13799,13612,13817,1653,431,14810,594,14969,13455,14343,4555,3405,14174,
9295,5559,14171,12560,12780,11699,743,10388,108,15013,3292,13187,6840,14901,13593,7747,14274,9258,13128,11339,9247,4742,12666,4744,913,13247,3535,494,7132,12558,13415,2255,1770,12247,2239,12249,1623,15034,8076,12922,9973,13516,7355,5562,13555,7100,5563,431,14733,14807,5769,12719,7682,14966,13407,13413,12844,15051,4661,2941,12694,15048,7618,15077,14961,5926,6748,15065,12686,7561,10348,8957,14970,12489,12511,9295,290,4489,13503,8538,2941,14960,13189,9304,7359,13401,8801,13671,12961,2105,13146,7701,
15057,15092,13661,13389,13810,9295,14969,13337,14826,11306,9975,6719,12739,15045,13243,15081,14959,13420,15014,14901,13595,5232,15075,12694,14969,12865,13286,1870,1671,6250,12434,8490,431,8505,260,262,1889,121,7025,11800,15097,13721,10556,13523,14901,13297,12051,6470,13077,13590,2351,14969,13549,7638,15117,14962,15092,7563,7139,1466,13545,13684,4526,15082,7811,15078,3874,12566,4923,8961,14988,7730,12851,9126,9431,3545,5398,15058,13563,12956,14978,1253,10013,14969,13066,15130,15031,4948,14715,12932,
12698,15163,15095,288,14156,6218,14579,12849,15184,5563,15137,12617,10459,13582,834,9748,791,10508,2082,10013,5132,14008,12630,14278,10535,14806,14575,15160,4446,13302,14712,15131,15092,7669,10493,11438,5572,8527,6620,7030,14901,13231,8061,14900,15114,13769,15106,15230,7078,14965,2770,15176,3127,12812,13414,15085,2071,6088,15054,996,15056,372,15157,7692,3339,15167,5926,14994,1875,544,14928,7610,1637,15030,12064,8117,12883,13619,12976,12578,15134,3316,15033,15235,12727,14446,9462,15265,7681,3501,15156,
15092,10013,12042,6777,15290,13210,15288,9616,14901,13072,14958,7463,12567,15304,13412,15285,14880,7401,13680,4526,1637,14976,7635,8011,14276,7398,8822,15183,4907,7150,5784,11339,4374,11595,11019,13895,14286,12141,6213,14616,10259,13658,5763,14184,9232,14636,6682,10026,14649,8564,11649,6430,14030,9850,13982,15026,13858,14666,9655,13988,11238,6098,13990,1705,13992,4139,6375,4317,4710,12112,14393,15198,15277,9252,3548,9979,14485,11049,9983,2022,4330,10688,11469,9837,14295,4301,632,5994,6970,2157,798,
9706,14667,15378,6233,294,11573,5771,2175,14482,6491,11034,5513,11689,4580,12423,11164,8508,4411,5368,625,14126,12873,11177,14682,13983,6304,278,4744,6656,576,629,1419,115,2221,1516,3776,14389,6492,11760,15092,15133,7055,11806,12273,746,6410,1277,11234,8388,11749,15354,619,11242,10341,8648,11232,2342,11010,2225,13917,9364,6024,613,8701,10750,8533,14026,9599,6502,15025,12181,8172,103,1516,15450,15394,5768,10665,4319,10534,14280,5377,15348,15455,10156,12227,10534,825,608,5239,12106,4576,4708,15361,
6377,6213,13163,15193,2818,8069,906,15216,963,15218,1188,8209,6050,15252,6163,1910,5354,14861,837,686,7851,8176,6900,8977,13030,13983,11189,753,5141,1588,99,70,1847,643,15392,802,11679,11599,11208,13445,10803,8388,11212,9444,11215,9106,5563,6906,1678,14491,11565,9869,14142,1678,8209,3611,14080,13960,14084,2758,10551,5755,14054,14049,12169,15467,12268,11157,11190,10936,15280,1033,11181,11336,3561,15490,11623,7111,11583,12463,8306,15261,1015,1713,9183,15263,1588,14149,1313,12758,4539,9831,10237,2099,
14980,11025,14252,9982,14488,335,120,6895,12026,14449,11637,5855,1528,294,14613,9295,9333,11623,14012,9460,10263,120,78,455,12367,1781,115,14769,11159,7398,119,575,1900,85,13443,4628,10914,14751,6032,14651,9714,8568,14680,5359,12336,13744,15530,8564,7818,14652,15614,3621,15359,4141,6376,5212,3393,14002,3535,293,15446,629,8701,15369,14982,13942,14984,9793,15491,9742,15486,4854,8989,679,10508,11559,10307,7816,8811,7938,4411,15528,12208,746,15401,13828,10370,11248,14807,10022,9836,14224,15408,9611,14407,
11806,14936,14212,14282,11493,8861,1713,14940,9690,12438,11906,12440,11999,12267,14928,15674,14899,8769,1569,12402,922,15603,690,100,4738,1883,11547,9324,11391,14154,376,1064,6552,114,51,10993,14735,15610,10917,1015,15699,8274,15702,11003,296,12471,4586,11001,14896,551,837,120,52,3060,11201,1653,15717,14148,87,15604,14744,10966,11254,12406,8138,15689,1900,5641,15693,11561,15695,10974,15697,296,15708,575,15710,5027,15704,14432,11402,318,15743,15721,14434,14472,14449,15724,15719,15751,10891,11337,15718,
15726,15690,14760,10969,5252,3739,259,551,11176,15696,10936,12684,3298,9751,287,14158,454,15440,9173,11388,10929,9384,11390,15739,15771,1721,10939,10941,3035,3189,10944,15789,3440,15186,2632,271,571,12090,125,124,470,5605,3666,15746,10996,15748,15700,15744,14758,376,14468,10811,7112,3620,15775,3364,14159,6078,15711,15206,13870,10966,5736,5834,11621,15491,371,15770,14155,12685,15776,413,15818,15745,14750,15747,15707,15749,15701,15757,10920,11297,14745,15508,14429,10932,15784,15829,6363,7816,14928,
14803,328,2541,15815,435,15777,6825,401,15804,14752,14757,15722,34,14755,10962,14741,10798,15763,7885,1505,6719,15853,3795,15828,7012,571,15855,608,15857,15703,15835,15805,15837,15807,15840,15810,5291,49,15812,15806,15709,15886,296,14468,50,15869,3609,3739,669,728,6214,15727,15827,15847,7012,15900,15718,8542,15831,8649,15803,15882,15861,6216,15814,14157,15816,15880,15819,2216,15728,9175,5857,14800,13952,13432,1608,6414,14134,14418,11052,9631,6402,13952,14765,14132,3954,15346,14302,14391,5123,15761,
1900,1883,9683,14149,15569,6838,15517,11210,8450,15521,9103,2700,9215,11212,2616,15374,6859,13973,10437,97,15381,1973,15384,12205,12170,2814,8445,13648,12639,5369,15451,11152,3561,14096,14105,7164,11063,15515,8099,14173,15601,12953,11747,6714,15434,8634,14373,11243,1901,9114,15554,883,7812,6478,15395,7938,4550,15977,6509,6210,4550,14109,5353,13969,5291,14115,16002,14814,2854,15405,15542,15466,15665,15468,14246,1410,5314,917,5316,5330,5320,15435,91,5323,5325,5327,5329,5331,32,5319,5334,5338,5318,5335,
5330,8401,15453,12970,9410,15496,369,9124,7493,9969,4873,1715,15654,15428,15550,15531,318,11728,3792,15939,15407,14668,15026,11189,11337,14236,13642,15849,8564,11182,16062,10552,10132,552,5825,15945,5631,15940,9410,15589,575,15556,9628,14102,5407,1410,16001,16006,4533,14099,15984,5695,11219,3728,15017,4327,16077,12641,9701,16080,14094,16082,960,16005,5829,12107,15660,15229,15723,15902,15690,15945,14148,648,15948,6703,3783,15649,14480,11170,9840,709,15502,15454,15545,890,11802,9859,14681,16059,15455,
1862,71,495,10162,12312,308,12077,15417,15650,8805,9356,12099,414,12135,12103,8518,5354,670,105,10422,15133,12118,12094,9229,9392,15998,6164,9217,982,777,13658,16150,12120,6158,11667,14073,16154,5355,12109,5825,16141,120,12129,3056,2681,16165,4547,10934,11921,12463,12133,8351,12101,16143,5766,1917,5354,12124,12126,15363,16171,1631,2677,15395,9912,12076,14501,16136,16116,9456,335,12477,955,1009,13840,9699,13170,12759,14693,4243,14767,14776,2465,14836,1115,14825,13710,13788,14828,12766,14830,14774,
14790,4923,14290,13251,15188,4301,14799,6360,14802,15226,10705,14052,14767,15276,2475,15315,15207,7240,726,14812,14835,3135,14790,14816,13069,14181,12985,16215,6718,15E3,9660,15067,1986,12683,16237,12687,2475,13086,14577,13212,12758,15315,5954,12871,14456,3419,14771,9319,14831,9328,3041,14813,3535,14838,10121,11520,14841,2518,8279,14844,15187,3076,13239,14698,1362,16227,14801,9303,1226,14868,8401,1058,10910,496,14856,4998,14859,14861,5786,14863,385,14866,9348,7836,9285,335,901,823,14839,10041,4710,
14688,2808,3774,6969,10013,16311,10583,13777,7245,13644,16317,10211,16314,7389,12703,13770,3977,928,7518,15108,14320,1446,12577,8401,882,10583,12653,14972,5931,934,16330,13754,12554,9295,16329,9272,12751,2197,12956,16322,2808,13776,12908,8161,11520,13131,4590,6663,4292,15133,16351,2993,13776,16326,15249,1623,4292,13498,13232,5216,3829,9243,3078,4584,12465,15041,7573,13132,12833,1847,9278,15279,15655,13643,7948,10603,16312,2993,16262,1115,16346,15236,16340,16372,15244,6833,3977,16362,2525,16353,16331,
10581,13674,2800,12621,494,100,121,12689,13019,15031,16408,13575,13211,7398,16392,13153,16327,12072,339,2890,13243,16222,16336,16323,7696,9277,3962,14512,9743,9255,12621,666,1847,10739,15560,569,15263,16407,1824,15202,2321,8037,16421,16347,12624,15192,305,16409,12770,4923,16440,13580,16332,15110,16432,13147,5927,16341,10714,12589,15318,15021,16425,16313,16427,16374,4646,12909,10353,16357,12667,8172,16445,16454,16403,13145,16457,15112,6346,16388,2525,7110,15224,4475,16346,16338,15203,13901,16475,13235,
16411,8793,16413,16365,15159,10319,16495,15049,15128,16408,12951,11066,3813,14987,4391,12791,13635,13360,13731,12433,16482,2797,3461,16234,773,16460,12979,13632,4475,4078,16491,16500,16493,6943,16465,2993,3461,16452,16449,14957,3231,16527,4755,13374,15155,4243,16453,12973,13641,15549,12517,16494,16450,15135,16525,446,4292,15311,15174,16416,16460,16503,10393,16518,15080,16547,8899,5992,11574,10303,16453,15032,12956,16434,8698,16469,16355,13317,16472,15044,537,16534,11951,13670,16428,4285,13618,16384,
16543,16359,16505,14995,4971,13601,14998,13790,15E3,13605,15003,7061,12503,7064,13269,8157,15533,16523,7485,7106,16558,16481,16337,7211,15046,3801,16563,12817,1429,16399,16575,7631,1211,16601,16610,10469,13502,15205,5926,16417,15127,16601,16522,643,12581,16424,16513,10469,16467,3105,15995,16383,16051,16581,8894,16627,2795,16496,12054,16371,2453,16540,13778,13644,4520,13647,16569,7370,7929,8164,13320,7508,7604,13060,13654,14846,16346,16390,7135,4292,15120,16248,5435,6789,12990,16387,16337,15317,16259,
7398,16615,16206,16284,15014,16549,15248,16497,5232,16499,15284,16565,14593,9742,13627,8004,16544,16519,13658,16623,16422,15083,13334,16419,16544,15303,14966,16679,2076,7259,14792,16548,3813,16695,5554,16553,16536,12612,16533,16636,16324,6077,14705,413,16516,16367,16702,16617,12952,13552,16675,13138,15232,16609,16574,2982,12947,16504,625,15115,7447,15268,2071,16671,16476,10122,16478,8003,9256,15282,16689,16373,15194,16344,4475,16566,15195,16368,15059,13514,15062,8158,16720,13202,13667,15163,4292,
16488,16443,16704,16395,15180,12956,16346,12762,13338,13258,16217,12838,16219,16526,16709,7088,16529,16350,16724,14393,7144,14710,14706,14072,4555,16775,16401,16343,12823,7398,16539,15039,16376,12664,7713,15043,6967,16635,10583,14704,14717,16700,16666,10211,16712,101,16714,8887,16598,7623,16693,6266,511,15615,15543,16016,16122,16602,16426,7416,15287,16723,16636,6959,13129,5583,16571,16793,9427,14593,10744,119,16437,616,15263,16740,7085,12694,16740,16658,16285,16782,2566,10013,16620,16691,16626,16318,
16605,10088,16556,16546,16520,15269,16747,13276,12057,15133,16832,16642,16320,16386,16804,16624,16354,13316,16648,964,7138,9249,16597,16624,16845,14175,16716,16462,16669,16464,16636,16316,16775,16414,15300,1017,15667,9031,16425,9539,472,11225,9754,6289,14911,11145,11858,14725,386,15687,6241,11281,6291,3660,15859,15913,14737,2239,16892,13485,15809,15894,3585,15715,9852,15920,5559,1529,10841,10017,16053,5042,10032,11259,14885,16889,11828,14417,15680,5074,6579,14893,15670,6828,12430,10821,14202,11836,
14209,2643,11848,15679,16920,12161,10038,12449,14655,12041,13967,6478,5521,14545,7677,16058,15387,3386,6088,1555,1379,3864,12044,15961,8490,12176,11660,12259,11769,15488,294,4082,10009,14293,16948,11769,12290,11163,14671,14052,14670,14267,12241,8308,12244,16976,3507,16829,640,16978,9152,12299,4823,4962,9407,16974,11575,605,14663,8460,6024,16810,16015,16127,16813,1099,5037,14127,16960,14391,6088,16991,14676,14678,12263,16994,10696,16996,15189,15424,11763,12579,15465,9473,15671,15026,6944,17015,12087,
14895,14683,383,12002,8592,5992,8707,1088,13852,731,13194,2529,8279,8235,281,3690,13871,379,394,13874,8837,12391,14944,15685,370,15936,1165,12669,1391,13883,11084,5876,16618,4260,11593,6362,13883,380,345,11596,11107,15933,14141,9634,3670,8592,15663,4088,5354,7916,15557,4526,6518,15981,5282,679,6908,13837,13916,16915,8249,9641,13883,6691,17026,15397,15631,11304,14654,10047,15356,10055,10077,6109,11312,10073,10057,6123,10059,11318,11315,10063,11328,10066,6189,10079,11326,6192,6194,10075,11330,6145,
6143,11333,10083,2022,13443,11573,13566,2274,3567,6541,15753,13659,9229,17120,8604,17122,6725,5654,14761,411,17129,10344,8146,2348,16200,15926,14308,5506,16943,14013,6516,368,15186,629,12205,15494,17144,14004,5155,16988,10706,837,9253,6093,9602,14067,16398,3405,13965,5143,3816,4307,17158,14060,1018,6523,5192,16192,9630,14140,8252,17065,14685,8500,5657,323,6422,8788,14064,5169,15536,14043,9468,6633,16096,13968,9685,11052,6422,8682,3069,1822,15444,8592,10684,14902,8418,10601,14391,11784,15421,16165,
15223,16463,4475,15677,4837,3938,14346,11037,6452,10293,9444,10293,7608,8563,1676,68,10347,9578,6682,15951,14642,5274,13119,3389,14981,16046,14486,8749,15577,15206,11639,17057,11121,972,14463,14465,11652,1726,14462,12183,378,14503,11274,383,11977,8136,15927,9768,17006,10751,11766,12397,12393,7018,10298,8967,14944,15038,9277,12434,17262,288,10773,14803,8976,12958,11371,16937,8869,5518,14410,17044,16303,8247,14740,16941,1536,1683,13722,13173,15973,12491,1683,12291,8069,834,15240,14565,5911,9878,14475,
13996,8396,1512,109,16236,7099,6218,8876,2035,16254,17302,16238,2216,9010,16485,12733,1683,16803,11167,15099,16011,8460,16177,13821,8463,11713,13007,1721,5967,13013,11717,2871,11719,9211,17304,2002,13829,7777,749,11021,17140,8997,101,98,109,17230,9996,14983,15576,6345,11023,15636,17231,15371,17234,3680,112,52,17342,7883,17344,14570,8886,774,10020,17001,9410,15182,2770,15209,9295,11040,14567,15370,14569,17233,6345,13463,11726,9763,6028,13467,11035,3703,15630,13915,16939,17248,335,884,431,14597,17281,
17141,8015,7806,8669,14124,3727,12307,4713,8627,8623,7824,11689,11684,4636,5354,9600,10404,17166,15537,3977,14370,5316,8635,10608,14373,15993,8660,8640,8652,15421,4924,9981,8646,17414,11240,15431,8651,11153,17422,4829,11753,17415,17117,3233,8662,5952,14117,4606,8296,15376,5693,17436,6554,8906,11648,5269,9824,15442,17389,365,6213,12462,15313,6213,15020,6700,6213,15023,12733,5577,9826,14620,15443,17446,8584,12358,9827,1328,8574,5786,16050,12315,1285,13917,17460,6315,7180,431,4451,11066,366,1883,6908,
15060,5567,11706,2351,1637,9683,17485,2770,15579,17020,15377,12304,9680,2351,11797,14277,17417,17465,17461,2239,17473,17500,11736,6249,9796,15433,11240,17413,17429,8656,15991,15439,8480,9516,15595,291,258,11624,16995,16949,17476,110,17454,14447,12453,9864,12461,5569,114,17492,15664,17010,4301,13954,3942,17438,15570,8556,4125,14288,14614,12453,15330,5131,6213,17478,2622,17118,11209,17495,6491,55,14093,4526,436,17520,5510,12309,9295,6234,17517,114,17519,5676,3552,17501,17072,13028,5754,14627,15493,
5710,17550,579,16088,12733,17575,16009,16085,12655,17575,16084,16102,8549,10135,4558,17532,14390,9410,14905,11573,9649,17577,2071,17203,8962,8640,17488,15337,11033,8286,9573,15228,8968,17017,16017,3680,17456,17545,3801,1703,17558,3945,8266,14074,1362,16879,1362,14454,3801,17074,14635,16917,11806,14468,14137,16923,6828,17268,16230,13436,17258,6654,12371,12263,17271,10240,15931,17383,14459,12003,14728,8617,9682,10972,273,10956,14736,15706,569,2544,15920,15811,15843,11865,9586,16896,15779,8138,5543,
9433,1519,11290,16899,15609,15836,17652,15893,10870,15842,10818,1862,7110,9718,11425,8857,17337,8778,1722,11494,14603,9823,9687,11110,11919,12479,256,9794,9539,17043,16927,12399,5980,16940,10041,121,17572,13907,17699,4580,5471,17701,11686,8272,9373,9510,11680,6057,111,17708,3535,122,17704,8075,118,17715,17556,3829,1883,6996,17647,17602,17144,17087,11692,17089,2839,11307,17093,10049,6106,10071,11313,6125,11316,10068,11316,11319,10058,17110,11327,17094,10072,6191,10076,17110,10081,6198,17113,10080,
6196,11314,5563,11029,6299,16349,13495,10085,17538,13898,11619,4319,17761,11538,17445,15620,11105,11398,17337,8593,8382,1566,7816,4178,14219,996,10308,14312,17132,13866,11419,407,3676,3732,5844,17769,13874,11901,13936,14404,14379,11233,11411,16092,4580,14315,2239,9354,11417,8906,17788,461,12220,14639,12411,12347,11176,11503,14644,12340,8687,11994,17385,12356,17130,17723,10041,949,6317,9222,9224,8964,8069,2071,17497,16416,14270,15096,17542,6480,14952,9822,1567,327,15384,17139,13476,11259,17203,17276,
17693,6596,260,17842,12155,11857,6926,17063,17174,17220,11376,13486,421,12333,3436,13216,7736,3191,738,2119,15591,5219,17144,12044,12955,13495,17203,2155,10013,9606,17152,15347,16812,4260,1058,17863,5693,6429,1839,2221,13163,17856,2119,16734,7199,15652,15191,17164,6714,17407,17185,17884,2720,7880,16853,17013,1863,13444,5834,2155,17886,7459,1137,12333,17595,1383,11572,6696,17866,17862,16743,5926,5127,17142,15592,16007,1839,5236,6996,17909,108,17901,13090,13277,17898,822,982,12205,10783,6296,9444,6277,
6296,13824,1477,15411,7715,4478,4413,13491,591,15433,729,8453,16025,7786,2586,14630,4723,9705,6624,17763,3343,17926,15037,10195,14327,17922,17924,1592,16971,12374,17894,648,10013,8848,16506,15493,12047,11579,4875,13557,13657,17373,17925,17897,17957,743,1058,17867,16798,5275,17881,1655,15365,14326,5515,7579,1592,17903,7625,5221,1839,13163,401,17900,17911,17895,4923,17597,17075,15319,13090,15535,14066,17167,8821,17885,12065,17165,7794,14083,17185,10485,17961,13475,17606,17022,15504,1058,18006,6454,
17408,4719,8306,4082,7899,17874,17534,5389,17997,11573,18017,13214,12788,13727,3189,7290,17994,17840,15616,11552,9869,8544,17837,17081,9400,7180,13E3,9043,16292,626,1568,6112,11948,10284,14063,17890,6452,17892,13499,474,17999,3027,15306,15321,3908,18040,8821,16779,16207,9614,6527,14638,12417,11507,14647,1757,11350,16919,17266,6219,14204,17847,16938,12001,11274,15936,15296,18074,17865,17763,11707,16014,17143,4507,14239,9358,17237,11507,10860,11570,2162,15980,7670,15983,2622,14297,5029,17297,8960,17829,
4475,17827,16345,16247,5558,14822,12989,13015,10892,17489,4243,16214,14996,12837,5577,12839,12648,11708,13514,13003,8468,13009,5969,13008,17325,17328,13011,2881,9069,13014,5439,13354,4302,18114,5926,5469,10095,6921,16245,17448,8451,11336,345,11977,9195,2351,7037,2640,6362,17682,8209,11943,1379,102,10120,8135,11713,10013,17366,13226,17583,10167,18159,17287,14474,9454,14506,9415,6087,17311,2071,2861,648,18167,18169,5265,1112,16112,9096,18166,79,18168,3733,18170,2874,7285,9008,1754,9011,14446,5244,18194,
18196,4666,5530,9389,18199,12956,9054,17318,13514,13002,13005,17322,5976,11715,18143,17327,8474,9071,6572,15332,14630,109,18158,17824,11164,18185,18206,18189,1742,18210,605,7893,17045,6539,17039,381,17361,17226,6678,13916,6535,15341,9081,11611,11607,13431,14196,14408,1139,11353,17833,6952,14166,18002,4002,18252,2225,5845,16983,9403,4551,15462,12228,17153,16972,11791,6163,12267,2814,18116,14977,11230,3970,17594,18151,288,12386,5638,10196,17818,14166,17820,9221,745,9223,9194,18230,12144,6926,18283,
745,17131,1502,6529,17040,10306,8592,14318,10023,16455,10473,14397,10585,14399,11917,11853,8260,13450,16862,9208,13788,8441,3827,9310,11950,629,15595,642,10668,14337,11983,14339,12967,14392,10470,11867,14356,14321,14366,18327,14368,18329,11948,11989,14588,616,10120,18340,8797,4728,10909,18315,2439,18318,17430,2521,18321,11741,16718,15772,11959,11973,10594,18310,11963,10519,16616,18332,15109,18307,14358,18309,18308,10657,17506,14371,11751,9447,17511,9449,11755,18050,3746,18347,11191,17726,15175,16363,
9854,18325,11960,18368,18367,18370,289,18300,381,4377,18392,345,10577,16314,6024,6597,18386,18358,10560,12965,10656,11986,15264,18346,18314,18381,13526,17624,9874,11813,13479,17629,10737,1564,14903,16931,17772,369,16827,14228,17641,11096,9897,11276,14422,273,17657,11243,11383,14424,517,6770,11385,18385,10855,11386,831,3226,14440,17134,3552,9290,12999,17319,11520,18216,10076,18136,17107,18452,5749,18222,5977,8479,9145,14458,18426,8772,15328,11022,15986,9655,17509,11750,6067,11241,15990,10341,17515,
6531,1088,8765,15651,4815,4592,18343,11993,11990,9413,14405,17814,16155,4491,16126,17522,11995,11350,11829,18420,14409,11833,17273,9152,17257,14907,18257,17643,14145,18430,12405,9902,17659,11384,11017,8682,11681,9159,16978,12414,15932,16982,11646,700,13845,17081,17688,1700,18498,12446,5855,8373,18415,18496,11418,9592,17175,14953,14166,11725,8398,3695,8400,8396,15585,16091,10869,4243,14630,17507,16967,14391,11167,8823,18181,12147,13984,1692,14654,13987,443,13862,15356,13864,537,11664,8413,16162,17032,
5926,11777,9438,17983,17410,3419,15437,8430,8657,18469,11882,794,10229,17335,16117,570,18350,18552,16097,4526,15970,16647,5926,15662,16956,10303,11799,18030,18489,11744,11778,9489,8496,6879,8250,17816,10344,10021,9516,16062,99,9180,17699,4635,5710,17459,17504,3545,18296,4083,18609,17416,13444,17127,8717,18598,10763,17124,17592,578,17474,18610,18618,745,18623,14061,5162,729,18177,17573,18093,1165,9641,6874,11510,1991,18625,97,9183,9641,17515,2035,885,99,11977,18605,17170,6443,8306,5314,501,17387,17723,
996,18611,10287,17124,3405,3843,729,6055,2348,18587,14052,9833,10329,18604,17765,15493,12131,4570,17198,262,17599,5291,9844,4549,4808,18665,12374,328,17468,1832,6362,18611,18623,11558,686,10329,18647,18670,18092,5931,6986,18631,17724,4533,3724,17481,5904,11080,18425,13948,17835,4314,13868,6405,268,3843,13895,1429,17621,17073,18294,17695,17384,17223,11567,7816,11556,14444,9643,34,18276,5926,11225,709,1604,10687,1358,17008,6498,17875,5762,17831,18115,18713,12383,306,16115,17220,461,17623,15338,18704,
14478,257,15955,1723,10834,3822,17463,18445,17197,4553,17199,8676,17201,9410,1637,1395,18184,8185,2095,6017,11191,10914,10403,18760,10484,14917,15678,806,17212,5316,17536,448,6717,18778,13062,11955,15273,14659,11257,17080,17685,17135,1502,17798,311,86,2727,7627,10851,17590,10041,4353,3069,13003,18192,14106,538,14540,1419,87,1571,587,114,807,16339,17972,4751,16256,10348,4728,1516,6024,11785,10303,965,323,15971,9973,684,279,745,982,3071,823,9054,277,18353,15606,18542,14364,18334,18326,14323,18337,18390,
18836,8337,18804,355,18806,18808,577,18810,17316,7753,15211,8480,18845,1654,99,18807,643,18849,107,17284,15206,12685,17303,11587,3970,65,14861,1847,17E3,16105,6871,10411,10521,16231,18682,18268,10534,18868,2058,18871,14331,2525,77,8406,14396,18389,18403,18328,18390,429,3591,3593,16294,10007,4193,3590,3592,282,14855,10007,2800,18898,18894,3595,15242,4728,18876,13983,3839,10541,5677,18880,18870,15406,8490,5793,117,17057,8832,6332,11106,10564,8939,4845,18885,18543,18365,18890,18889,18841,18406,866,8350,
259,17589,5240,18031,3386,15482,954,16314,10298,18937,18274,15379,2993,11142,2539,1875,4860,4851,18887,18335,18840,18360,14361,10379,10442,10431,277,18914,1591,17483,13983,311,304,14556,10399,4234,4663,4304,9100,1756,16904,8193,10419,9106,13621,8960,327,9207,8176,2639,18859,5993,17963,13983,14547,11577,112,6639,1588,432,18909,16060,18855,18847,18986,18810,12590,15210,15322,18815,16155,806,367,18652,18823,18584,14514,9663,18828,11216,18831,538,18833,10577,641,982,18950,4849,10521,18401,11985,10527,
18930,10576,18924,10638,8282,18874,117,18953,14335,13367,18369,18931,18957,10647,554,3829,18856,18858,278,18860,18681,13983,4847,18951,9384,258,1875,1809,5316,2012,11945,3833,6330,6717,19056,5541,19058,3551,13062,3839,18963,18882,18917,18247,830,14861,1410,5956,4307,16809,866,9444,19076,544,631,3305,4077,19033,293,19067,18916,14672,15879,17118,17147,6362,11082,6825,1210,5693,5513,282,107,2389,18991,18993,10435,18272,18761,8861,8353,4553,108,18945,17607,16813,3797,11635,16064,5739,19084,10051,18836,
2391,11115,11893,11805,6280,17639,14886,11366,18822,1009,4562,18495,11090,11366,17631,17637,12154,11365,9571,2529,2526,17989,67,16292,4232,17277,11052,16903,18501,18429,15898,116,65,12137,14784,354,11047,15875,12059,17344,17666,10957,16901,17370,17670,462,734,14745,8976,19072,101,18243,1863,15860,19162,1015,15786,40,41,32,61,62,1417,3972,9115,15867,15441,19053,8802,14745,14853,354,262,18094,13433,14153,15771,17696,17649,15705,15575,15863,4710,327,115,8342,8830,10966,311,19192,17989,18195,4837,19203,
15904,19195,10976,857,15912,17667,15883,17349,9790,19201,9101,19204,8314,16908,376,16940,15863,2867,17989,15897,4220,14688,19209,14634,17648,14431,19220,616,19229,10809,19231,6383,14745,5736,66,10423,19224,19205,710,19157,8023,746,19093,15881,19219,15914,19221,19164,19202,3852,19251,14760,5784,8234,17388,10041,18091,8285,18093,19232,17435,17555,12512,8624,17401,12253,17403,17394,1524,17396,3056,17398,9599,17182,5202,18007,18025,1570,18543,4307,17412,14350,17423,18572,18614,11573,17418,17411,8655,
17510,6074,17430,87,17424,8650,3344,15432,15989,18375,18571,8432,15778,9700,2556,19271,4518,18693,17392,9709,11858,8907,5984,275,12167,11481,18808,11573,17838,18154,8438,18280,3381,1485,14586,542,17907,13805,9229,8808,15965,292,742,17030,18435,4114,13867,19047,1651,12090,858,1485,17451,13723,9648,17611,4526,9678,19336,11176,17569,12953,1485,19341,15383,19343,17029,13509,9229,19354,15118,9673,15163,9648,1466,107,16450,17071,15386,6156,19351,1018,1485,17525,2255,1485,17457,1658,17172,11198,10542,13869,
14685,17779,121,14219,10041,18304,14446,10570,19039,18388,18955,10647,19399,14363,19025,12966,18359,19037,19029,11975,19031,1057,1887,14511,10460,19036,18888,19027,18932,19412,11831,18538,15587,14977,4191,16618,19401,19411,10175,19028,10674,10100,14334,13366,18366,19404,19403,18839,14369,17427,10353,14372,19311,15991,17953,14381,4925,4439,11800,312,837,9214,19110,18020,15026,10238,18438,19035,19438,19441,19440,18387,18842,16114,17774,15343,6016,14402,10151,18483,19471,3737,18490,14131,17690,14889,
9946,16946,11481,14416,14882,17843,11233,11261,18526,18083,14413,16888,19489,19483,18085,11131,18087,12400,18089,1653,18428,9900,18504,11866,10843,10379,15899,3783,15946,16111,14574,11367,19215,19276,10876,4458,476,15384,1883,68,15768,9979,19253,7852,8569,14657,6902,9384,14465,12012,19460,3557,8499,15389,2727,327,9712,9697,9491,17819,14657,4083,9704,625,14508,6059,17603,10676,11748,19540,9444,3852,4261,44,102,10481,97,13865,19536,15622,9698,399,19306,4696,7453,2504,19053,1424,5547,18783,6870,3303,
13042]});
define("lV",["require","exports"],function(){function a(f,b){function e(){}e.prototype=b.prototype;f.prototype=new e;f.prototype.constructor=f}function d(f,b){b.forEach(function(e){Object.getOwnPropertyNames(e).forEach(function(g){f.prototype[g]=e[g]})})}function l(f){setTimeout(function(){try{f()}catch(b){k("Deferred callback failed",b)}},1)}function m(f){if(f!=h){h=f;try{if(c){var b=document.createElement("div");b.innerText=f;c.insertBefore(b,c.childNodes[0]||null)}else console.log(f)}catch(e){}}}function k(f,
b){var e=[];e.push("Exception: "+f);b.message?(e.push(b.message),e.push(b.stack)):e.push(b);m(e.join("\n"))}var c,h;return{c2:d,b5a:function(f){for(;;){var b=f.pop();if(!b)break;if(b==f.length)break;f.splice(b,1)}b=[];for(var e=0;256>e;e+=1)b[e]=String.fromCharCode(e);var g=256,n=String.fromCharCode(f[0]),q=n;for(e=1;e<f.length;e+=1){var p=f[e];p=b[p]?b[p]:n+n.charAt(0);q+=p;b[g++]=n+p.charAt(0);n=p}return JSON.parse(q)},defer:l,deferred:function(f,b){return function(){var e=arguments;l(function(){f.apply(b||
window,e)})}},extend:function(){var f=arguments[arguments.length-1],b=Array.prototype.slice.call(arguments,1,arguments.length-1);a(f,arguments[0]);d(f,b);return f},n5a:function(f){c=document.createElement("div");c.style.overflow="auto";c.style.position="absolute";c.style.bottom="0";c.style.left="0";c.style.right="0";c.style.padding="20px";c.style.fontFamily="Verdana";c.style.backgroundColor="#FFFFFF";c.style.color="#000000";c.style.zIndex="100";f?c.style.top="0":(c.style.width="40%",c.style.right=
"0",c.style.left="auto",c.style.height="50%",c.style.filter="alpha(opacity=60)",c.style.opacity="0.6");document.body.appendChild(c);console.log=function(b){m(b)}},log:m,JT:k,Ip:function(f,b){var e=!1;return function(){e||(e=!0,l(function(){e=!1;f.apply(b||window)}))}},F9a:function(f){for(var b=[],e=0;e<f;e++)b.push(Math.floor(16*Math.random()).toString(16));return b.join("")},toArray:function(f){return void 0===f||null===f?[]:Array.isArray(f)?f:[f]},o7a:function(f,b){if(f.length!=b.length)return!1;
for(var e=0;e<f.length;e++)if(f[e]!=b[e])return!1;return!0},isString:function(f){var b="[object "+f+"]";return function(e){return Object.prototype.toString.call(e)===b}}("String")}});
define("lY",["require","exports","lV"],function(a,d,l){function m(){var e=h.length,g=h.splice(0,e);c+=e;for(var n=0;n<e;n++){var q=g[n];if(q)try{q()}catch(p){l.JT("Error in async task",p)}}}var k=0,c=0,h=[],f,b=new Promise(function(e){e()});setInterval(function(){0<h.length&&100<(new Date).getTime()-f&&m()},100);return{ZB:function(e,g){void 0===g&&(g=void 0);if(void 0!==g&&0<g)return-1-setTimeout(e,g||1);0==h.length&&(b.then(m),f=(new Date).getTime());k++;h.push(e);return k-1},cancel:function(e){if(0>
e)clearTimeout(-1-e);else{var g=e-c;if(0<=g){if(!h[g])throw"invalid async handle: "+e;h[g]=null}}}}});
define("gF",["require","exports","cI","lY","lV"],function(a,d,l,m,k){var c=function(){return function(){}}();return function(){function h(){this.Sc={}}h.prototype.X3a=function(f,b,e){this.Ipa(f,b,e,!0,b,!0,!1)};h.prototype.bind=function(f,b,e,g,n,q){void 0===q&&(q=!1);return this.Ipa(f,b,e,g,n||b,!1,q)};h.prototype.Ipa=function(f,b,e,g,n,q,p){if(void 0===f)throw"Event name undefined";if(void 0===b)throw"Event handler undefined";e=e||this;g=g?!0:!1;f in this.Sc||(this.Sc[f]=[]);var r=new c;r.xT=b;
r.U6a=n||b;r.context=e;r.VEa=g;r.M7a=p;f=this.Sc[f];q?f.unshift(r):f.push(r);return this};h.prototype.unbind=function(f,b,e){f in this.Sc&&(e=e||this,this.Sc[f]=this.Sc[f].filter(function(g){return g.xT!=b||g.context!=e}),0==this.Sc[f].length&&delete this.Sc[f]);return this};h.prototype.wcb=function(f){f in this.Sc&&delete this.Sc[f]};h.prototype.qma=function(){this.Sc={}};h.prototype.trigger=function(f,b){void 0===b&&(b=void 0);"string"==typeof f&&(f=new l(f,b));f.name in this.Sc&&(f.source=this,
this.Jz(f,!0),f.name in this.Sc&&this.CRa(f));return this};h.prototype.CRa=function(f){h.sX.push({caller:this,event:f});h.f$||(h.f$=!0,m.ZB(h.ara))};h.ara=function(){for(var f=(new Date).getTime()+1E3;h.sX.length;){var b=h.sX.shift();h.prototype.Jz.call(b.caller,b.event,!1);if((new Date).getTime()>f)break}0<h.sX.length?m.ZB(h.ara,1):h.f$=!1};h.prototype.r3=function(f){return f in this.Sc};h.prototype.yT=function(f){if(f in this.Sc){f=this.Sc[f];for(var b=0;b<f.length;b++)if(f[b].M7a)return!0}return!1};
h.prototype.uL=function(f,b){var e=[];f=this.Sc[f]||[];for(var g=0;g<f.length;g++){var n=f[g];void 0!==b&&n.VEa!=b||e.push(n.U6a)}return e};h.prototype.Jz=function(f,b){var e=this;f.unbindCurrentHandler=function(){q&&e.unbind(f.name,q.xT,q.context)};if(f.name in this.Sc)for(var g=this.Sc[f.name],n=0;n<g.length;n++){var q=g[n];if(q.VEa==b)try{q.xT.call(q.context,f)}catch(p){k.JT("Exception handling event "+f.name,p)}}};h.sX=[];h.f$=!1;return h}()});
define("mV",["require","exports"],function(){return function(){function a(){}a.qja=function(d){if(this.mg("crossorigin",!1))return!0;if(this.E3(d)){var l=window.location.protocol+"//"+window.location.hostname;window.location.port&&(l+=":"+window.location.port);return d.substring(0,l.length)!=l}return!1};a.Ny=function(d,l){if(this.d8a(d))d=window.location.protocol+d;else if(!this.E3(d)&&!this.BB(d)){if(l)if(0==d.indexOf("/")){var m=l.indexOf("//"),k="";0<=m&&(k=l.substr(0,m+2),l=l.substr(m+2));m=l.indexOf("/");
0<m&&(l=l.substr(0,m));d=k+l+d}else d=l+d;this.En.href=d;d=this.En.href}return d};a.P7a=function(){switch(window.location.protocol){case "http:":case "https:":return!0;default:return!1}};a.d8a=function(d){return 0===d.indexOf("//")};a.E3=function(d){if(!d)return!1;var l=d.indexOf("://");return 3<=l&&5>=l?!0:0==d.indexOf("filesystem:")};a.Y7a=function(d){return d&&0<=d.indexOf("/pdfjs/")};a.getDirectory=function(d){d=this.Ny(d);d=d.split("?")[0];d=d.split("/");1<d.length&&d.splice(d.length-1,1);return d.join("/")+
"/"};a.Fj=function(d){this.MJ||(this.MJ=this.Lsa());return void 0!==this.MJ[d]};a.getQueryParameter=function(d){this.MJ||(this.MJ=this.Lsa());return this.MJ[d]};a.RJa=function(d,l){var m=d.split(l);d=m[0];(m=m.slice(1).join(l))&&(m=l+m);return[d,m]};a.lB=function(d,l){if(!l)return d;var m=this.RJa(d,"#"),k=m[1];m=this.RJa(m[0],"?");var c=m[0];m=m[1];return 0<=m.indexOf(l)?d:c+(m+(m?"&":"?")+l)+k};a.parse=function(d){this.En.href=d;d={};d.protocol=this.En.protocol;d.hostname=this.En.hostname;d.port=
this.En.port;d.pathname=this.En.pathname;d.search=this.En.search;d.hash=this.En.hash;d.host=this.En.host;var l=d.pathname?d.pathname.lastIndexOf("."):-1;d.p5a=0<=l?d.pathname.substr(l).toLowerCase():"";return d};a.getExtension=function(d){d=this.parse(d).pathname;var l=d.lastIndexOf(".");return 0<=l?d.substr(l,d.length):""};a.mg=function(d,l){d=(this.getQueryParameter(d)||"").toLowerCase();return this.p9a(d,l)};a.p9a=function(d,l){switch(d){case "false":case "0":case "no":case "n":return!1;case "true":case "1":case "yes":case "y":return!0;
default:return l}};a.PDa=function(d,l){d=parseInt(this.getQueryParameter(d));return isNaN(d)?l:d};a.f3=function(d){d=parseFloat(this.getQueryParameter(d));return isNaN(d)?void 0:d};a.Lsa=function(){for(var d={},l=window.location.hash.substring(1).split("&").concat(window.location.search.substring(1).split("&")),m=0;m<l.length;m++){var k=l[m].split("="),c=decodeURIComponent(k[0]);k=1<k.length?decodeURIComponent(k[1]):null;d[c]=k}return d};a.En=document.createElement("a");a.MJ=null;a.BB=function(d){return d&&
0==d.indexOf("data:")};return a}()});
define("w",["require","exports","lV","mV"],function(a,d,l,m){var k={};k.yi=TDV.cb.TV;k.Vy=TDV.cb.v7;k.U7=TDV.cb.Ona;k.Wdb=TDV.cb.z7;k.o7=TDV.cb.w7;k.hna=TDV.cb.Nna;k.Gdb=TDV.cb.y7;k.x7=TDV.cb.x7;k.QM=TDV.cb.QM;k.l6=TDV.cb.l6;k.k6=TDV.cb.k6;k.j6=TDV.cb.j6;k.m6=TDV.cb.m6;k.sh=TDV.cb.sh;k.vV=TDV.cb.vV;k.Mj=TDV.cb.Mj;k.po=TDV.cb.po;k.tH=TDV.cb.tH;k.Yy=TDV.cb.Yy;k.uV=TDV.cb.uV;k.Fs=TDV.cb.Fs;k.g6=TDV.cb.g6;k.xV=TDV.cb.xV;k.bv=TDV.cb.bv;k.cv=TDV.cb.cv;k.yV=TDV.cb.yV;k.h6=TDV.cb.h6;k.OM=TDV.cb.OM;k.vC=TDV.cb.vC;
k.uH=TDV.cb.uH;k.PM=TDV.cb.PM;k.$y=TDV.cb.$y;k.Hma=TDV.cb.Hma;k.Zy=TDV.cb.Zy;k.Gs=TDV.cb.Gs;k.Hs=TDV.cb.Hs;k.wV=TDV.cb.wV;k.i6=TDV.cb.i6;k.n6=TDV.cb.n6;k.AV=TDV.cb.AV;k.SM=TDV.cb.SM;k.r6=TDV.cb.r6;k.zH=TDV.cb.zH;k.TM=TDV.cb.TM;k.BV=TDV.cb.BV;k.WM=TDV.cb.WM;k.CV=TDV.cb.CV;k.XM=TDV.cb.XM;k.UM=TDV.cb.UM;k.VM=TDV.cb.VM;k.DV=TDV.cb.DV;k.s6=TDV.cb.s6;k.YD=function(h){h="force_"+h;if(m.Fj("debug")&&m.Fj(h))return m.getQueryParameter(h)};k.JSa=k.YD("os");k.zd=function(){return k.JSa||TDV.cb.zd};k.ESa=k.YD("browser");
k.browser=function(){return k.ESa||TDV.cb.browser};k.FSa=k.YD("browser_type");k.ZK=function(){return k.FSa||TDV.cb.ZK};k.Rra=k.YD("browser_subtype");k.jc=function(){return k.Rra?k.Rra:TDV.cb.jc};k.GSa=k.YD("browser_version");k.YBa=function(){return k.GSa||TDV.cb.YBa};k.ISa=k.YD("device");k.Cj=function(){return k.ISa||TDV.cb.Cj};k.pb=function(){return TDV.cb.mobile};k.pSa=function(){for(var h=navigator.userAgent.toLowerCase(),f=["SM-G960","SM-G965"],b=0;b<f.length;b++)if(0<=h.indexOf(f[b].toLowerCase()))return!0;
return!1}();k.WPa=k.browser()!=k.po||0>navigator.userAgent.indexOf("; wv")?!1:!0;k.HSa=!!k.YD("chromewebview");k.nCa=function(){return k.HSa||k.WPa};k.Ef=function(){return k.jc()==k.bv||k.jc()==k.cv||k.jc()==k.yV||k.jc()==k.Gs||k.jc()==k.Hs||k.jc()==k.Zy};k.J3=function(){return k.pG()};k.I3=function(){return k.ML()||k.gFa()||k.pFa()||k.kFa()};k.sja=function(){return k.jc()==k.Gs};k.kha=void 0;k.edb=function(){if(void 0===k.kha){var h=void 0;k.CB()&&(window.location.hash.split("&").forEach(function(f){"app-version"==
f.split("=")[0]&&(h=f.split("=")[1])}),h&&(h=parseInt(h)));h=h||0;k.kha=h}return k.kha};k.CB=function(){return k.HT()||k.sja()};k.HT=function(){return k.jc()==k.Hs};k.a8a=function(){return k.Cj()==k.BV};k.T7a=function(){return k.Cj()==k.CV};k.gFa=function(){return k.Cj()==k.XM};k.Z7a=function(){return k.Cj()==k.UM};k.$7a=function(){return k.Cj()==k.VM};k.jFa=function(){return k.Cj()==k.WM};k.kFa=function(){return!!(window.location.hash&&0<=window.location.hash.indexOf("device=picoxr"))};k.pFa=function(){return k.Cj()==
k.DV};k.pG=function(){return k.Cj()==k.TM};k.ML=function(){return k.Cj()==k.zH};k.UE=void 0;k.B9a=function(){void 0===k.UE&&(k.UE=parseInt(m.getQueryParameter("sts")),isNaN(k.UE)&&(k.Ef()&&!k.pSa?k.UE=512:k.pb()&&k.zd()==k.yi?k.UE=512:k.UE=k.pb()?256:1024));return k.UE};k.iZa=function(){if(k.browser()==k.Mj||k.browser()==k.sh)try{var h=/Version\/([0-9]+\.[0-9]+)/i.exec(navigator.userAgent);if(h)return parseFloat(h[1])}catch(f){}}();k.Wka=function(){return k.iZa};k.WUa=function(){try{var h=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(f){}h||(h=k.Wka());return h}();k.jja=function(){return k.WUa};k.xOa=function(){if(k.zd()==k.Vy)try{var h=/Android ([0-9]+\.?[0-9]*)/i.exec(navigator.userAgent);if(h)return parseFloat(h[1])}catch(f){}}();k.N3a=function(){return k.xOa};k.ata=function(){var h={sEa:"unknown",p8a:1},f=document.createElement("canvas");if(f&&(f=f.getContext("webgl")||
f.getContext("experimental-webgl"))){var b=f.getExtension("WEBGL_debug_renderer_info");b&&(h.sEa=f.getParameter(b.UNMASKED_RENDERER_WEBGL));h.maxTextureSize=f.getParameter(f.MAX_TEXTURE_SIZE);if(b=f.getExtension("EXT_texture_filter_anisotropic")||f.getExtension("MOZ_EXT_texture_filter_anisotropic")||f.getExtension("WEBKIT_EXT_texture_filter_anisotropic"))h.p8a=f.getParameter(b.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}return h}();k.R6a=function(){return k.ata};k.zOa=function(){var h=k.ata.sEa.match(/Apple\s+(.+)\s+GPU/);
return h?h[1].toUpperCase():"unknown"}();k.ueb=function(){return k.zOa};k.IVa=k.Cj()==k.SM?!0:!1;k.ly=function(){return k.IVa};k.eCa=function(){return k.browser()==k.Mj&&14<=k.Wka()};var c=!1;try{c="true"==window.localStorage.getItem("tdvp_video_drift_2")}catch(h){}k.j7a=function(){return c};k.Xab=function(){c=!0;try{window.localStorage.setItem("tdvp_video_drift_2","true")}catch(h){}};k.VO="ontouchstart"in window||"undefined"!==typeof window.PointerEvent&&"undefined"!==typeof navigator.maxTouchPoints&&
0<navigator.maxTouchPoints?!0:!1;k.M5=function(){return k.VO};k.No=m.Fj("touchenabled")?m.mg("touchenabled"):"ontouchstart"in window?k.zd()==k.U7?!1:!0:!1;k.N5=function(){return k.No};k.summary=function(){return["browser: "+k.browser(),"browserType: "+k.ZK(),"browserSubtype: "+k.jc(),"device: "+k.Cj(),"isMobile: "+k.pb(),"chromeWebView: "+k.nCa(),"touchDevice"+k.M5(),"touchEnabled"+k.N5()].join(", ")};k.log=function(){l.log("browser: "+k.browser());l.log("browserType: "+k.ZK());l.log("browserSubtype: "+
k.jc());l.log("device: "+k.Cj());l.log("isMobile: "+k.pb());l.log("chromeWebView: "+k.nCa());l.log("touchDevice: "+k.M5());l.log("touchEnabled: "+k.N5())};return k});
define("ni",["require","exports","mV"],function(a,d,l){a={};a.fv=l.mg("debug",!1);a.nMa=l.Fj("hqhls");a.Fma=l.mg("audiocontext",!0);a.Pdb=l.mg("testhash",!1);a.$La=l.mg("exitvronblur",!1);a.LLa=l.mg("download",!0);a.mNa=l.mg("updatewhilehidden",!1);a.fMa=l.mg("webgl2",!1);a.eMa=l.mg("webgl1",!1);a.cMa=l.mg("lowp",!1);a.$ma=l.mg("antialias");a.rNa=l.mg("unlimited-video-resolution",!1);return a});
define("iQ",["require"],function(){return{"bg-bg":{mute:"\u0417\u0430\u0433\u043b\u0443\u0448\u0430\u0432\u0430\u043d\u0435","cardboard-v1":"\u0410\u043a\u043e \u043d\u0435 \u0441\u0442\u0435 \u0441\u0438\u0433\u0443\u0440\u043d\u0438 \u043a\u043e\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430 Cardboard \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435, \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b \u043d\u0430 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435. \u0421\u043b\u0435\u0434 \u0442\u043e\u0432\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0449\u0435 \u043f\u043e\u0433\u043b\u0435\u0434\u043d\u0435\u0442\u0435 \u0445\u043e\u0442\u0441\u043f\u043e\u0442\u0430 \u0438 \u0449\u0435 \u0438\u0437\u0447\u0430\u043a\u0430\u0442\u0435, \u0434\u043e\u043a\u0430\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u0442\u043e \u0441\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0430.",
"download-tour":"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435 \u043d\u0430 \u0442\u0443\u0440\u0430 \u0437\u0430 \u0432\u044a\u0437\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0436\u0434\u0430\u043d\u0435 \u043e\u0444\u043b\u0430\u0439\u043d","change-to-drag-and-release":"\u041f\u0440\u043e\u043c\u0435\u043d\u0435\u0442\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u041f\u043b\u044a\u0437\u0433\u0430\u043d\u0435 \u0438 \u041f\u0443\u0441\u043a\u0430\u043d\u0435",
accept:"\u041f\u0440\u0438\u0435\u043c\u0435\u0442\u0435",cancel:"\u041e\u0442\u043a\u0430\u0437","storage-not-provided-bookmark":"\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0442\u043e \u0441\u044a\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u043d\u043e. \u041e\u043f\u0438\u0442\u0430\u0439\u0442\u0435 \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u0442\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0432 \u043e\u0442\u043c\u0435\u0442\u043a\u0438 \u0438 \u0434\u0430 \u044f \u043f\u0440\u0435\u0437\u0430\u0440\u0435\u0434\u0438\u0442\u0435.",
"dont-display-again":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u0432\u0430\u0439 \u0442\u0430\u0437\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0442\u043d\u043e\u0432\u043e","web-server-required":"\u0422\u043e\u0437\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u0435\u043b\u0435\u043d \u0442\u0443\u0440 \u043d\u0435 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0431\u044a\u0434\u0435 \u043f\u0443\u0441\u043d\u0430\u0442 \u043e\u0442 \u043b\u043e\u043a\u0430\u043b\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. \u041c\u043e\u043b\u044f, \u043a\u0430\u0447\u0435\u0442\u0435 \u0433\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438 \u043e\u043f\u0438\u0442\u0430\u0439\u0442\u0435 \u043e\u0442\u043d\u043e\u0432\u043e.\n\u0410\u043a\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0442\u0435, \u0438\u0437\u0442\u0435\u0433\u043b\u0435\u0442\u0435 htm \u0444\u0430\u0439\u043b\u0430 (\u0438\u043b\u0438 \u0446\u044f\u043b\u0430\u0442\u0430 \u043f\u0430\u043f\u043a\u0430 \u043d\u0430 \u0442\u0443\u0440\u0430) \u0432\u044a\u0440\u0445\u0443 \u0438\u043a\u043e\u043d\u0430\u0442\u0430 \u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u0442\u043e TourViewer.",
download:"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435","change-to-click-and-move":"\u041f\u0440\u043e\u043c\u0435\u043d\u0435\u0442\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u041a\u043b\u0438\u043a\u0432\u0430\u043d\u0435 \u0438 \u041f\u0440\u0435\u043c\u0435\u0441\u0442\u0432\u0430\u043d\u0435",yes:"\u0434\u0430","delete-downloaded":"\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043d\u0435","use-safari-for-vr":"\u041f\u0440\u0435\u043f\u043e\u0440\u044a\u0447\u0432\u0430\u043c\u0435 Safari, \u0437\u0430 \u0434\u0430 \u0440\u0430\u0437\u0433\u043b\u0435\u0434\u0430\u0442\u0435 \u0442\u043e\u0437\u0438 \u0442\u0443\u0440 \u0432 \u0440\u0435\u0436\u0438\u043c VR",
"exit-fullscreen":"\u0418\u0437\u043b\u0435\u0437\u0442\u0435 \u043e\u0442 \u0446\u044f\u043b \u0435\u043a\u0440\u0430\u043d",no:"\u043d\u0435","download-failed":"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435\u0442\u043e \u0441\u0435 \u043f\u0440\u043e\u0432\u0430\u043b\u0438","giroscope-disabled-http":"\u0418\u043c\u0430\u0442\u0435 \u0434\u043e\u0441\u0442\u044a\u043f \u0434\u043e \u0442\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0447\u0440\u0435\u0437 http, \u0442\u0430\u043a\u0430 \u0447\u0435 \u0434\u043e\u0441\u0442\u044a\u043f\u044a\u0442 \u0434\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u0442\u043e \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f\u0442\u0430 \u043d\u0430 \u0432\u0430\u0448\u0435\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u0440\u0435\u0436\u0438\u043c\u044a\u0442 VR \u0441\u0430 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0438, \u043c\u043e\u043b\u044f, \u043e\u0442\u0432\u043e\u0440\u0435\u0442\u0435 \u0433\u043e \u0447\u0440\u0435\u0437 https, \u0437\u0430 \u0434\u0430 \u0433\u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u0442\u0435.",
"cookies-notice":"\u0422\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430 \u0431\u0438\u0441\u043a\u0432\u0438\u0442\u043a\u0438 \u0437\u0430 \u0441\u044a\u0431\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0430\u043d\u043d\u0438 \u0437\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u043d\u0435\u0442\u043e. \u0417\u0430 \u043f\u043e\u0432\u0435\u0447\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043c\u043e\u043b\u044f, \u043f\u043e\u0441\u0435\u0442\u0435\u0442\u0435 <a> \u041f\u0440\u0430\u0432\u0438\u043b\u0430\u0442\u0430 \u0437\u0430 \u0431\u0438\u0441\u043a\u0432\u0438\u0442\u043a\u0438\u0442\u0435 </a>.",
"use-cardboard":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439 Cardboard","launch-default-browser":"\u0421\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u043d\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u044a\u0440\u0430 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435","rotate-device":"\u041c\u043e\u043b\u044f \u0437\u0430\u0432\u044a\u0440\u0442\u0435\u0442\u0435 \u0432\u0430\u0448\u0435\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e",
"exit-vr":"\u0418\u0437\u043b\u0438\u0437\u0430\u043d\u0435 \u043e\u0442 \u0440\u0435\u0436\u0438\u043c VR","storage-not-provided-launch-from-desktop":"\u041c\u043e\u043b\u044f, \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u0439\u0442\u0435 \u043e\u0431\u0438\u043a\u043e\u043b\u043a\u0430\u0442\u0430 \u043e\u0442 \u0438\u043a\u043e\u043d\u0430\u0442\u0430 \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0430, \u0437\u0430 \u0434\u0430 \u044f \u0438\u0437\u0442\u0435\u0433\u043b\u0438\u0442\u0435.",
"disable-measure":"Stop measuring",downloading:"\u0418\u0437\u0442\u0435\u0433\u043b\u044f\u043d\u0435","cardboard-v2":"\u0410\u043a\u043e \u0438\u043c\u0430\u0442\u0435 \u043e\u0447\u0438\u043b\u0430 Cardboard v2, \u043a\u043e\u0438\u0442\u043e \u0440\u0430\u0437\u043f\u043e\u043b\u0430\u0433\u0430\u0442 \u0441 \u0431\u0443\u0442\u043e\u043d, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u043f\u043e\u0433\u043b\u0435\u0434\u043d\u0435\u0442\u0435 \u0445\u043e\u0442\u0441\u043f\u043e\u0442\u0430 \u0438 \u0434\u0430 \u043d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 \u0431\u0443\u0442\u043e\u043d\u0430, \u0437\u0430 \u0434\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u0442\u043e \u043c\u0443.",
"enable-video-audio-prompt":"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e \u0438 \u0430\u0443\u0434\u0438\u043e?",reject:"\u041e\u0442\u0445\u0432\u044a\u0440\u043b\u0435\u0442\u0435",downloaded:"\u0422\u043e\u0437\u0438 \u0442\u0443\u0440 \u0435 \u0438\u0437\u0442\u0435\u0433\u043b\u0435\u043d \u0437\u0430 \u0432\u044a\u0437\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0436\u0434\u0430\u043d\u0435 \u043e\u0444\u043b\u0430\u0439\u043d.","samsung-internet-vr-app-info":"\u0410\u043a\u043e \u0438\u043c\u0430\u0442\u0435 \u043e\u0447\u0438\u043b\u0430 Gear VR, \u0441\u044a\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0438 \u0441 \u0442\u043e\u0432\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0438 \u0441\u0442\u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043b\u0438 Samsung Internet for VR, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0433\u0438 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0438 \u0437\u0430 \u043f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u0442\u043e\u0432\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u044a\u0432 VR. \u0422\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u0435 Samsung Internet \u0431\u0440\u0430\u0443\u0437\u044a\u0440 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435.",
"samsung-internet-vr-info":"\u0410\u043a\u043e \u0438\u043c\u0430\u0442\u0435 \u043e\u0447\u0438\u043b\u0430 Gear VR, \u0441\u044a\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0438 \u0441 \u0442\u043e\u0432\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0438 \u0441\u0442\u0435 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043b\u0438 Samsung Internet for VR, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0433\u0438 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0438 \u0437\u0430 \u043f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u0442\u043e\u0432\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u044a\u0432 VR. \u0421\u0435\u0433\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0441\u043b\u043e\u0436\u0438\u0442\u0435 \u043c\u043e\u0431\u0438\u043b\u043d\u0438\u044f \u0441\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0432 \u043e\u0447\u0438\u043b\u0430\u0442\u0430 \u0437\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043d\u0430 \u0440\u0435\u0430\u043b\u043d\u043e\u0441\u0442.",
"enable-video-prompt":"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e?","giroscope-disabled-safari-request-permission":["\u0414\u043e\u0441\u0442\u044a\u043f\u044a\u0442 \u0437\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043d\u0430 \u0432\u0430\u0448\u0435\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u0440\u0435\u0436\u0438\u043c\u044a\u0442 VR \u0441\u0430 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0438 \u0437\u0430 \u0442\u043e\u0437\u0438 \u0441\u0430\u0439\u0442.",
"\u0417\u0430 \u0434\u0430 \u0432\u0438\u0434\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043d\u043e \u0442\u0430\u0437\u0438 \u0443\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u043c\u043e\u043b\u044f, \u043a\u043b\u0438\u043a\u043d\u0435\u0442\u0435 \u0432\u044a\u0440\u0445\u0443 \u043f\u0440\u043e\u0434\u044a\u043b\u0436\u0438 \u0438 \u043f\u0440\u0438\u0435\u043c\u0435\u0442\u0435 \u0438\u0441\u043a\u0430\u043d\u0435\u0442\u043e \u0437\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435."],
"storage-not-provided-launch-from-homescreen":"\u041c\u043e\u043b\u044f, \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u0439\u0442\u0435 \u043e\u0431\u0438\u043a\u043e\u043b\u043a\u0430\u0442\u0430 \u043e\u0442 \u0438\u043a\u043e\u043d\u0430\u0442\u0430 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u043d\u0438\u044f \u0435\u043a\u0440\u0430\u043d, \u0437\u0430 \u0434\u0430 \u044f \u0438\u0437\u0442\u0435\u0433\u043b\u0438\u0442\u0435.","enter-fullscreen":"\u0412\u043b\u0435\u0437\u0442\u0435 \u0432 \u0446\u044f\u043b \u0435\u043a\u0440\u0430\u043d",
"use-cardboard-v2":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439 Cardboard v2",unmute:"\u041f\u0443\u0441\u043a\u0430\u043d\u0435 \u0437\u0432\u0443\u043a","enter-vr":"\u0412\u043b\u0435\u0437 \u0432\u044a\u0432 VR \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435","enable-measure":"Start measuring","use-cardboard-info":"\u041c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0432\u0441\u044f\u043a\u0430\u043a\u0432\u0438 \u0441\u044a\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0438 Google Cardboard \u043e\u0447\u0438\u043b\u0430, \u0437\u0430 \u0434\u0430 \u0432\u0438\u0434\u0438\u0442\u0435 \u0442\u043e\u0432\u0430 \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u044a\u0432 VR.",
"refresh-downloaded":"\u041e\u0431\u043d\u043e\u0432\u044f\u0432\u0430\u043d\u0435","use-default-cardboard":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435","enable-audio-prompt":"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0430\u0443\u0434\u0438\u043e?"},"fi-fi":{mute:"Poista \u00e4\u00e4ni k\u00e4yt\u00f6st\u00e4","cardboard-v1":"Mik\u00e4li et ole varma, mit\u00e4 Cardboard-versiota k\u00e4yt\u00e4t, valitse oletusarvoinen hotspot-hallinta. T\u00e4m\u00e4n j\u00e4lkeen katsomalla hotspotia, toiminto k\u00e4ynnistyy.",
"download-tour":"Lataa t\u00e4m\u00e4 sis\u00e4lt\u00f6 offline-toistoa varten","change-to-drag-and-release":"Muuta ohjaustilaa vet\u00e4m\u00e4ll\u00e4 ja vapauttamalla",accept:"Hyv\u00e4ksy",download:"Lataa","storage-not-provided-bookmark":"Tallennus ep\u00e4onnistui. Kokeile lis\u00e4t\u00e4 t\u00e4m\u00e4 verkkosivu kirjanmerkkeihin ja suorita lataus uudelleen.","dont-display-again":"\u00c4l\u00e4 n\u00e4yt\u00e4 t\u00e4t\u00e4 ilmoitusta uudelleen","web-server-required":"T\u00e4t\u00e4 sis\u00e4lt\u00f6\u00e4 ei voi toistaa paikalliselta asemalta. Lataa sis\u00e4lt\u00f6 internet-palvelimelle ja yrit\u00e4 uudelleen.\nVoit my\u00f6s vet\u00e4\u00e4 htm-tiedoston (tai koko kansion) TourViewer-sovelluskuvakkeen p\u00e4\u00e4lle.",
cancel:"Sulje","change-to-click-and-move":"Muuta ohjaustilaa klikkaamalla ja siirt\u00e4m\u00e4ll\u00e4",yes:"Kyll\u00e4","delete-downloaded":"Poista","use-safari-for-vr":"Suosittelemme Safari-selainta t\u00e4m\u00e4n sis\u00e4ll\u00f6n katseluun VR-tilassa.","exit-fullscreen":"Sulje koko n\u00e4yt\u00f6n n\u00e4kym\u00e4",no:"Ei","download-failed":"Lataus ep\u00e4onnistui","giroscope-disabled-http":"K\u00e4yt\u00e4t t\u00e4t\u00e4 verkkosivua http:n kautta, joten laitteesi liiketunnistimet sek\u00e4 VR-tila on poistettu k\u00e4yt\u00f6st\u00e4. Ota ne k\u00e4ytt\u00f6\u00f6n siirtym\u00e4ll\u00e4 sivulle https:n kautta.",
"cookies-notice":"T\u00e4m\u00e4 verkkosivu k\u00e4ytt\u00e4\u00e4 ev\u00e4steit\u00e4 k\u00e4ytt\u00f6tilastojen ker\u00e4\u00e4miseen. Lis\u00e4tietoja <a>ev\u00e4stek\u00e4yt\u00e4nn\u00f6st\u00e4</a>.","use-cardboard":"K\u00e4yt\u00e4 Cardboardia","launch-default-browser":"K\u00e4ynnist\u00e4 oletusselaimessa","rotate-device":"K\u00e4\u00e4nn\u00e4 laitettasi","exit-vr":"Poistu VR-tilasta",reject:"Hylk\u00e4\u00e4","disable-measure":"Lopeta mittaaminen",downloading:"Ladataan","cardboard-v2":"Mik\u00e4li sinulla on Cardboard v2 -virtuaalilasit, joissa on painike, voit katsoa hotspotia ja aktivoida sen painamalla painiketta.",
"enable-video-audio-prompt":"Otetaanko \u00e4\u00e4ni ja video k\u00e4ytt\u00f6\u00f6n?","storage-not-provided-launch-from-desktop":"Uudelleenk\u00e4ynnist\u00e4 t\u00e4m\u00e4 sis\u00e4lt\u00f6 ty\u00f6p\u00f6yd\u00e4n kuvakkeesta aloittaaksesi lataamisen.",downloaded:"T\u00e4m\u00e4 sis\u00e4lt\u00f6 on ladattu offline-toistoa varten","samsung-internet-vr-app-info":"Mik\u00e4li sinulla on t\u00e4m\u00e4n laitteen kanssa yhteensopivat Gear VR -virtuaalilasit ja olet asentanut Samsung Internet for VR:n, voit k\u00e4ytt\u00e4\u00e4 virtuaalilaseja t\u00e4m\u00e4n sis\u00e4ll\u00f6n katseluun VR-tilassa. Sinun on lis\u00e4ksi m\u00e4\u00e4ritett\u00e4v\u00e4 Samsung Internet oletusselaimeksi.",
"samsung-internet-vr-info":"Mik\u00e4li sinulla on t\u00e4m\u00e4n laitteen kanssa yhteensopivat Gear VR -virtuaalilasit ja olet asentanut Samsung Internet for VR:n, voit k\u00e4ytt\u00e4\u00e4 virtuaalilaseja t\u00e4m\u00e4n sis\u00e4ll\u00f6n katseluun VR-tilassa. Aseta \u00e4lypuhelin virtuaalilaseihin aloittaaksesi.","enable-video-prompt":"Otetaanko video k\u00e4ytt\u00f6\u00f6n?","giroscope-disabled-safari-request-permission":["Laitteesi liiketunnistimen k\u00e4ytt\u00f6oikeus ja VR-tila on poistettu k\u00e4yt\u00f6st\u00e4 t\u00e4ll\u00e4 sivustolla.",
"N\u00e4hd\u00e4ksesi t\u00e4m\u00e4n verkkosivun oikein, valitse jatka ja hyv\u00e4ksy lupapyynt\u00f6 pyydett\u00e4ess\u00e4."],"storage-not-provided-launch-from-homescreen":"Uudelleenk\u00e4ynnist\u00e4 t\u00e4m\u00e4 sis\u00e4lt\u00f6 kotin\u00e4yt\u00f6n kuvakkeesta aloittaaksesi lataamisen","enter-fullscreen":"Avaa koko n\u00e4yt\u00f6n n\u00e4kym\u00e4","use-cardboard-v2":"K\u00e4yt\u00e4 Cardboard v2:sta",unmute:"Ota \u00e4\u00e4ni k\u00e4ytt\u00f6\u00f6n","enter-vr":"Siirry VR-tilaan","enable-measure":"Aloita mittaaminen",
"use-cardboard-info":"Voit k\u00e4ytt\u00e4\u00e4 mit\u00e4 tahansa yhteensopivia Google Cardboard -virtuaalilaseja katsellaksesi t\u00e4t\u00e4 sis\u00e4lt\u00f6\u00e4 VR-tilassa.","refresh-downloaded":"P\u00e4ivit\u00e4","use-default-cardboard":"K\u00e4yt\u00e4 oletuksena","enable-audio-prompt":"Otetaanko \u00e4\u00e4ni k\u00e4ytt\u00f6\u00f6n?"},"sk-sk":{mute:"St\u00ed\u0161i\u0165","cardboard-v1":"Ak ste si nie ist\u00ed, ktor\u00fa verziu Cardboardu pou\u017e\u00edvate, vyberte si predvolen\u00e9 ovl\u00e1danie hotspotu. Potom sa jednoducho pozriete na hotspot a po\u010dkajte, k\u00fdm sa akcia nespust\u00ed.",
"download-tour":"Stiahnu\u0165 prehliadku na hranie v offline re\u017eime","change-to-drag-and-release":"Zmeni\u0165 re\u017eim ovl\u00e1dania na Presun\u00fa\u0165 a Uvo\u013eni\u0165",accept:"s\u00fahlasi\u0165",cancel:"Zru\u0161i\u0165","storage-not-provided-bookmark":"Trval\u00e9 \u00falo\u017eisko odmietnut\u00e9. Sk\u00faste si t\u00fato webov\u00fa str\u00e1nku ulo\u017ei\u0165 a na\u010d\u00edta\u0165 ju znova.","dont-display-again":"Tieto inform\u00e1cie u\u017e nezobrazova\u0165","web-server-required":"T\u00e1to virtu\u00e1lna prehliadka sa ned\u00e1 prehra\u0165 z lok\u00e1lneho disku. Nahrajte ju na internet a sk\u00faste to znova.\nAk chcete, potiahnite s\u00fabor htm (alebo cel\u00fd prie\u010dinok prehliadky) na ikonu aplik\u00e1cie TourViewer.",
download:"Stiahnu\u0165","change-to-click-and-move":"Zmeni\u0165 re\u017eim ovl\u00e1dania na Klikn\u00fa\u0165 a Presun\u00fa\u0165",yes:"\u00e1no","delete-downloaded":"Zmaza\u0165","use-safari-for-vr":"Odpor\u00fa\u010dame pou\u017e\u00edva\u0165 Safari prehliada\u010d pre t\u00fato prehliadku v re\u017eime VR","exit-fullscreen":"Ukon\u010di\u0165 cel\u00fa obrazovku",no:"nie","download-failed":"S\u0165ahovanie zlyhalo","giroscope-disabled-http":"Na t\u00fato webov\u00fa str\u00e1nku pristupujete cez http protokol, preto pr\u00edstup k pohybu a orient\u00e1cii v\u00e1\u0161ho zariadenia a re\u017eim VR s\u00fa deaktivovan\u00e9. Ak ich chcete povoli\u0165, nav\u0161t\u00edvte str\u00e1nku cez https.",
"cookies-notice":"T\u00e1to webov\u00e1 str\u00e1nka pou\u017e\u00edva s\u00fabory cookie na zhroma\u017e\u010fovanie \u0161tatist\u00edk pou\u017e\u00edvania. \u010eal\u0161ie inform\u00e1cie n\u00e1jdete v <a> pravidl\u00e1ch pou\u017e\u00edvania s\u00faborov cookie </a>.","use-cardboard":"Pou\u017eite Cardboard okuliare.","launch-default-browser":"Spusti\u0165 v predvolenom prehliada\u010di","rotate-device":"Oto\u010dte svoje zariadenie","exit-vr":"Ukon\u010denie VR","storage-not-provided-launch-from-desktop":"Znovu na\u010d\u00edtajte prehliadku pomocou desktop ikony pre jej stiahnite.",
"disable-measure":"Ukon\u010di\u0165 meranie",downloading:"S\u0165ahovanie","cardboard-v2":"Ak m\u00e1te n\u00e1hlavn\u00fa s\u00fapravu Cardboard v2, ktor\u00e1 je dod\u00e1van\u00e1 s tla\u010didlom, m\u00f4\u017eete sa pozrie\u0165 na hotspot a stla\u010den\u00edm tla\u010didla spusti\u0165 akciu.","enable-video-audio-prompt":"Povoli\u0165 video a zvuk?",reject:"Odmietnu\u0165",downloaded:"T\u00e1to prehliadka je stiahnut\u00e1 na hranie v offline re\u017eime.","samsung-internet-vr-app-info":"Ak m\u00e1te Gear VR sl\u00fachadl\u00e1\u00e1 kompatibiln\u00e9 s t\u00fdmto zariaden\u00edm a m\u00e1te nain\u0161talovan\u00fd program Samsung Internet pre VR, m\u00f4\u017eete ho tie\u017e pou\u017ei\u0165 na prezeranie tohto obsahu vo VR. Mus\u00edte si nastavi\u0165 Samsung Internet ako predvolen\u00fd prehliada\u010d.",
"samsung-internet-vr-info":"Ak m\u00e1te Gear VR sl\u00fachadl\u00e1 kompatibiln\u00e9 s t\u00fdmto zariaden\u00edm a m\u00e1te nain\u0161talovan\u00fd program Samsung Internet pre VR, m\u00f4\u017eete ho tie\u017e pou\u017ei\u0165 na prezeranie tohto obsahu vo VR. Sta\u010d\u00ed teraz vlo\u017ei\u0165 mobiln\u00fd telef\u00f3n do n\u00e1hlavnej s\u00fapravy.","enable-video-prompt":"Povoli\u0165 video?","giroscope-disabled-safari-request-permission":["Pre t\u00fato str\u00e1nku s\u00fa pr\u00edstup k pohybu a orient\u00e1cii v\u00e1\u0161ho zariadenia a re\u017eim VR deaktivovan\u00e9.",
"Aby ste korektne videli t\u00fato webov\u00fa str\u00e1nku, pros\u00edm kliknite pokra\u010dova\u0165 a akceptujte po\u017eadovan\u00e9 povolenie."],"storage-not-provided-launch-from-homescreen":"Znovu na\u010d\u00edtajte prehliadku pomocou ikony na ploche pre jej stiahnite.","enter-fullscreen":"Prejs\u0165 na cel\u00fa obrazovku","use-cardboard-v2":"Pou\u017eite Cardboard v2",unmute:"Zapn\u00fa\u0165 zvuk","enter-vr":"Vlo\u017ei\u0165 VR obsah","enable-measure":"Za\u010da\u0165 meranie","use-cardboard-info":"Na zobrazenie tohto obsahu vo VR m\u00f4\u017eete pou\u017ei\u0165 \u013eubovo\u013en\u00fa kompatibiln\u00fa n\u00e1hlavn\u00fa s\u00fapravu Google Cardboard.",
"refresh-downloaded":"Obnovi\u0165","use-default-cardboard":"Pou\u017ei\u0165 predvolen\u00e9","enable-audio-prompt":"Povoli\u0165 zvuk?"},"uk-ua":{mute:"\u0412\u0438\u043c\u043a\u043d\u0443\u0442\u0438 \u0437\u0432\u0443\u043a","cardboard-v1":"\u042f\u043a\u0449\u043e \u0432\u0438 \u043d\u0435 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u044f\u043a\u0443 \u0432\u0435\u0440\u0441\u0456\u044e Cardboard \u0432\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u0435, \u0432\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u0443 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c. \u041f\u043e\u0442\u0456\u043c \u0432\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0438\u0432\u0438\u0442\u0435\u0441\u044f \u043d\u0430 \u0442\u043e\u0447\u043a\u0443 \u0442\u0430 \u043f\u043e\u0447\u0435\u043a\u0430\u0439\u0442\u0435, \u0434\u043e\u043a\u0438 \u0434\u0456\u044f \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f.",
"download-tour":"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0442\u0435 \u0442\u0443\u0440 \u0434\u043b\u044f \u0432\u0456\u0434\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0432 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c\u0443 \u0440\u0435\u0436\u0438\u043c\u0456","change-to-drag-and-release":"\u0417\u043c\u0456\u043d\u0456\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f \u043d\u0430 \u041f\u0435\u0440\u0435\u0442\u044f\u0433\u043d\u0456\u0442\u044c \u0456 \u0432\u0456\u0434\u043f\u0443\u0441\u0442\u0456\u0442\u044c",
accept:"\u041f\u0440\u0438\u0439\u043c\u0456\u0442\u044c",cancel:"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438","storage-not-provided-bookmark":"\u041f\u043e\u0441\u0442\u0456\u0439\u043d\u0435 \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u043d\u043d\u044f \u0437\u0430\u0431\u043e\u0440\u043e\u043d\u0435\u043d\u043e. \u0421\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u0446\u044e \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443 \u0432 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0438 \u0442\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438 \u0457\u0457.",
"dont-display-again":"\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u0443\u0439\u0442\u0435 \u0446\u044e \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044e \u0437\u043d\u043e\u0432\u0443","web-server-required":"\u0426\u0435\u0439 \u0432\u0456\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0438\u0439 \u0442\u0443\u0440 \u043d\u0435 \u043c\u043e\u0436\u043d\u0430 \u0432\u0456\u0434\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. \u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0442\u0435 \u0439\u043e\u0433\u043e \u0432 \u0406\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0456 \u043f\u043e\u0432\u0442\u043e\u0440\u0456\u0442\u044c \u0441\u043f\u0440\u043e\u0431\u0443.\n\u042f\u043a\u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435, \u043f\u0435\u0440\u0435\u0442\u044f\u0433\u043d\u0456\u0442\u044c \u0444\u0430\u0439\u043b htm (\u0430\u0431\u043e \u0432\u0441\u044e \u043f\u0430\u043f\u043a\u0443 \u0442\u0443\u0440\u0443) \u043d\u0430 \u043f\u0456\u043a\u0442\u043e\u0433\u0440\u0430\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0438 TourViewer.",
download:"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438","change-to-click-and-move":"\u0417\u043c\u0456\u043d\u0456\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f \u043d\u0430 \u041a\u043b\u0430\u0446\u043d\u0456\u0442\u044c \u0456 \u043f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0456\u0442\u044c",yes:"\u0442\u0430\u043a","delete-downloaded":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438","use-safari-for-vr":"\u041c\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0454\u043c\u043e Safari \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0442\u0443\u0440\u0443 \u0432 \u0440\u0435\u0436\u0438\u043c\u0456 VR",
"exit-fullscreen":"\u0412\u0438\u0439\u0442\u0438 \u0437 \u043f\u043e\u0432\u043d\u043e\u0435\u043a\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0443",no:"\u043d\u0456","download-failed":"\u041d\u0435 \u0432\u0434\u0430\u043b\u043e\u0441\u044f \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438","giroscope-disabled-http":"\u0412\u0438 \u043e\u0442\u0440\u0438\u043c\u0443\u0454\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0446\u0456\u0454\u0457 \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 http, \u0442\u043e\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0440\u0443\u0445\u0443 \u0442\u0430 \u043e\u0440\u0456\u0454\u043d\u0442\u0430\u0446\u0456\u0457 \u0432\u0430\u0448\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u044e \u0442\u0430 \u0440\u0435\u0436\u0438\u043c VR \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u043e. \u0429\u043e\u0431 \u0443\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0457\u0445, \u043f\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044c \u0434\u043e \u043d\u0438\u0445 \u0447\u0435\u0440\u0435\u0437 https.",
"cookies-notice":"\u0426\u044f \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454 \u0444\u0430\u0439\u043b\u0438 cookie \u0434\u043b\u044f \u0437\u0431\u043e\u0440\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f. \u0414\u043b\u044f \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e\u0457 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u0457 \u0432\u0456\u0434\u0432\u0456\u0434\u0430\u0439\u0442\u0435 <a> \u041f\u043e\u043b\u0456\u0442\u0438\u043a\u0443 \u0449\u043e\u0434\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0444\u0430\u0439\u043b\u0456\u0432 cookie</a>.",
"use-cardboard":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 Cardboard","launch-default-browser":"\u0417\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u0443 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0456 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c","rotate-device":"\u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u043f\u043e\u0432\u0435\u0440\u043d\u0456\u0442\u044c \u0441\u0432\u0456\u0439 \u043f\u0440\u0438\u0441\u0442\u0440\u0456\u0439",
"exit-vr":"\u0412\u0438\u0439\u0434\u0456\u0442\u044c \u0456\u0437 VR","storage-not-provided-launch-from-desktop":"\u0429\u043e\u0431 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u043e\u0433\u043b\u044f\u0434 \u0456\u0437 \u0437\u043d\u0430\u0447\u043a\u0430 \u043d\u0430 \u0440\u043e\u0431\u043e\u0447\u043e\u043c\u0443 \u0441\u0442\u043e\u043b\u0456.","disable-measure":"\u041f\u0440\u0438\u043f\u0438\u043d\u0456\u0442\u044c \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u043d\u043d\u044f",
downloading:"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f","cardboard-v2":"\u042f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u0454 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0430 Cardboard v2, \u044f\u043a\u0430 \u043f\u043e\u0441\u0442\u0430\u0447\u0430\u0454\u0442\u044c\u0441\u044f \u0437 \u043a\u043d\u043e\u043f\u043a\u043e\u044e, \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0438\u0432\u0438\u0442\u0438\u0441\u044f \u043d\u0430 \u0442\u043e\u0447\u043a\u0443 \u0442\u0430 \u043d\u0430\u0442\u0438\u0441\u043d\u0443\u0442\u0438 \u043a\u043d\u043e\u043f\u043a\u0443, \u0449\u043e\u0431 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u0457\u0457.",
"enable-video-audio-prompt":"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0432\u0456\u0434\u0435\u043e \u0442\u0430 \u0430\u0443\u0434\u0456\u043e?",reject:"\u0412\u0456\u0434\u0445\u0438\u043b\u0438\u0442\u0438",downloaded:"\u0426\u0435\u0439 \u0442\u0443\u0440 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043e \u0434\u043b\u044f \u0432\u0456\u0434\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0432 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c\u0443 \u0440\u0435\u0436\u0438\u043c\u0456.",
"samsung-internet-vr-app-info":"\u042f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u0454 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0430 Gear VR, \u0441\u0443\u043c\u0456\u0441\u043d\u0430 \u0437 \u0446\u0438\u043c \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u0454\u043c, \u0456 \u0432\u0438 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f VR, \u0432\u0438 \u0442\u0430\u043a\u043e\u0436 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0457\u0457 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443 \u0443 VR, \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0437\u0440\u043e\u0431\u0438\u0442\u0438 Samsung Internet \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c.",
"samsung-internet-vr-info":"\u042f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u0454 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0430 Gear VR, \u0441\u0443\u043c\u0456\u0441\u043d\u0430 \u0437 \u0446\u0438\u043c \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u0454\u043c, \u0456 \u0432\u0438 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f \u0432\u0456\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0457 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0456, \u0432\u0438 \u0442\u0430\u043a\u043e\u0436 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0457\u0457 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443 \u0443 VR, \u0432\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0440\u0430\u0437 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043f\u0456\u0434\u2019\u0454\u0434\u043d\u0430\u0442\u0438 \u043c\u043e\u0431\u0456\u043b\u044c\u043d\u0438\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0434\u043e \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0438.",
"enable-video-prompt":"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0432\u0456\u0434\u0435\u043e?","giroscope-disabled-safari-request-permission":["\u0414\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0440\u0443\u0445\u0443 \u0442\u0430 \u043e\u0440\u0456\u0454\u043d\u0442\u0430\u0446\u0456\u0457 \u0432\u0430\u0448\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0442\u0440\u043e\u044e, \u0430 \u0442\u0430\u043a\u043e\u0436 \u0440\u0435\u0436\u0438\u043c VR \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u043e \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0443.",
"\u0429\u043e\u0431 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u043d\u0443\u0442\u0438 \u0446\u044e \u0432\u0435\u0431-\u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443, \u043d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u00ab\u041f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438\u00bb \u0442\u0430 \u043f\u0440\u0438\u0439\u043c\u0456\u0442\u044c \u0437\u0430\u043f\u0438\u0442 \u043d\u0430 \u0434\u043e\u0437\u0432\u0456\u043b, \u044f\u043a\u0449\u043e \u0437\u2019\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0437\u0430\u043f\u0438\u0442."],
"storage-not-provided-launch-from-homescreen":"\u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u0442\u0443\u0440 \u0437\u0456 \u0437\u043d\u0430\u0447\u043a\u0430 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0435\u043a\u0440\u0430\u043d\u0430, \u0449\u043e\u0431 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438.","enter-fullscreen":"\u041f\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044c \u0443 \u043f\u043e\u0432\u043d\u043e\u0435\u043a\u0440\u0430\u043d\u043d\u0438\u0439 \u0440\u0435\u0436\u0438\u043c",
"use-cardboard-v2":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 Cardboard v2",unmute:"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0437\u0432\u0443\u043a","enter-vr":"\u041e\u0431\u0435\u0440\u0456\u0442\u044c \u0432\u043c\u0456\u0441\u0442 VR","enable-measure":"\u041f\u043e\u0447\u043d\u0456\u0442\u044c \u0432\u0438\u043c\u0456\u0440\u044e\u0432\u0430\u0442\u0438","use-cardboard-info":"\u0412\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0431\u0443\u0434\u044c-\u044f\u043a\u0443 \u0441\u0443\u043c\u0456\u0441\u043d\u0443 \u0433\u0430\u0440\u043d\u0456\u0442\u0443\u0440\u0443 Google Cardboard \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0446\u044c\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443 \u0443 VR.",
"refresh-downloaded":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438","use-default-cardboard":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c","enable-audio-prompt":"\u0423\u0432\u0456\u043c\u043a\u043d\u0443\u0442\u0438 \u0430\u0443\u0434\u0456\u043e?"},"en-us":{mute:"Mute","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Change control mode to Drag and Release",accept:"Accept",cancel:"Cancel","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
download:"Download","change-to-click-and-move":"Change control mode to Click and Move",yes:"yes","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Exit fullscreen",no:"no","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"This web page uses cookies to collect usage statistics. For more information, please visit the <a>Cookie Policy</a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","rotate-device":"Please rotate your device","exit-vr":"Exit VR","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Enable video and audio?",
reject:"Reject",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Enable video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Enter fullscreen","use-cardboard-v2":"Use Cardboard v2",unmute:"Unmute","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","refresh-downloaded":"Refresh","use-default-cardboard":"Use Default","enable-audio-prompt":"Enable audio?"},"sv-se":{mute:"Inaktivera ljud","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing",
"change-to-drag-and-release":"\u00c4ndra kontrolll\u00e4ge f\u00f6r att dra och sl\u00e4ppa",accept:"Acceptera",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
cancel:"Cancel","change-to-click-and-move":"\u00c4ndra kontrolll\u00e4ge f\u00f6r att klicka och flytta",yes:"ja","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Avsluta fullsk\u00e4rmen",no:"Nej","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Denna webbsida anv\u00e4nder cookies f\u00f6r att samla in anv\u00e4ndningsstatistik. F\u00f6r mer information, bes\u00f6k <a>Cookie Policy</a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Avvisa","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Aktivera ljud och video?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Aktivera video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Ange fullsk\u00e4rm","use-cardboard-v2":"Use Cardboard v2",unmute:"Aktivera ljud","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","refresh-downloaded":"Refresh","use-default-cardboard":"Use Default","enable-audio-prompt":"Aktivera ljud?"},"id-id":{mute:"Mute","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing",
"change-to-drag-and-release":"Change control mode to Drag and Release",accept:"Menerima",cancel:"Cancel","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",download:"Download",
"change-to-click-and-move":"Change control mode to Click and Move",yes:"yes","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Exit fullscreen",no:"no","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Halaman web ini menggunakan cookie untuk mengumpulkan statistik penggunaan. Untuk informasi lebih lanjut, silakan kunjungi <a>Kebijakan Cookie</a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","rotate-device":"Please rotate your device","exit-vr":"Exit VR","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Enable video and audio?",
reject:"Menolak",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Enable video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Enter fullscreen","use-cardboard-v2":"Use Cardboard v2",unmute:"Unmute","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","refresh-downloaded":"Refresh","use-default-cardboard":"Use Default","enable-audio-prompt":"Enable audio?"},"pt-br":{mute:"Desativar som","cardboard-v1":"Se voc\u00ea n\u00e3o tiver certeza de qual vers\u00e3o do Cardboard est\u00e1 usando, selecione o controle de ponto de acesso padr\u00e3o. Voc\u00ea simplesmente olha para um ponto de acesso e espera at\u00e9 que a a\u00e7\u00e3o seja acionada.",
"download-tour":"Download do Tour para reprodu\u00e7\u00e3o offline","change-to-drag-and-release":"Alterar controle para arrastar e soltar",accept:"Aceitar",cancel:"Cancelar","storage-not-provided-bookmark":"Armazenamento persistente negado. Tente marcar esta p\u00e1gina da Web e recarreg\u00e1-la.","dont-display-again":"N\u00e3o exibir essas informa\u00e7\u00f5es novamente","web-server-required":"Este passeio virtual n\u00e3o pode ser reproduzido a partir de uma unidade local. Envie-o para a Internet e tente novamente.\nSe preferir, arraste o arquivo htm (ou toda a pasta do tour) para o \u00edcone do aplicativo TourViewer.",
download:"Download","change-to-click-and-move":"Alterar controle para clicar e mover",yes:"sim","delete-downloaded":"Apagar","use-safari-for-vr":"Recomendamos o Safari para ver este passeio no modo VR","exit-fullscreen":"Sair da tela cheia",no:"n\u00e3o","download-failed":"Falha no Download","giroscope-disabled-http":"Voc\u00ea est\u00e1 acessando esta p\u00e1gina da Web por meio do http, para que o acesso \u00e0 orienta\u00e7\u00e3o e movimento do dispositivo e o modo VR sejam desativados, acesse-o atrav\u00e9s de https para ativ\u00e1-los.",
"cookies-notice":"Esta p\u00e1gina da web usa cookies para coletar estat\u00edsticas de uso. Para obter mais informa\u00e7\u00f5es, visite a <a>Pol\u00edtica de cookies</a>.","use-cardboard":"Use Cardboard","launch-default-browser":"Iniciar no navegador padr\u00e3o","rotate-device":"Por favor, gire seu dispositivo","exit-vr":"Sair do VR","storage-not-provided-launch-from-desktop":"Por favor, reinicie o tour no \u00edcone da \u00e1rea de trabalho para fazer o download.","disable-measure":"Stop measuring",
downloading:"Baixando","cardboard-v2":"Se voc\u00ea tiver um fone de ouvido Cardboard v2, que vem com um bot\u00e3o, poder\u00e1 observar um ponto de acesso e pressionar o bot\u00e3o para acionar sua a\u00e7\u00e3o.","enable-video-audio-prompt":"Ativar \u00e1udio e v\u00eddeo?",reject:"Rejeitar",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Voc\u00ea precisa tornar o Samsung Internet o seu padr\u00e3o. browser.",
"samsung-internet-vr-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Basta colocar o celular no fone de ouvido agora.","enable-video-prompt":"Ativar v\u00eddeo?","giroscope-disabled-safari-request-permission":["O acesso a movimento e orienta\u00e7\u00e3o do dispositivo e o modo VR est\u00e3o desativados para este site.","Para ver corretamente esta p\u00e1gina da web, clique em continuar e aceite a solicita\u00e7\u00e3o de permiss\u00e3o, se solicitado."],
"storage-not-provided-launch-from-homescreen":"Reinicie o tour no \u00edcone da tela inicial para fazer o download.","enter-fullscreen":"Entrar em tela cheia","use-cardboard-v2":"Use Cardboard v2",unmute:"Ativar som","enter-vr":"Inserir conte\u00fado VR","enable-measure":"Start measuring","use-cardboard-info":"Voc\u00ea pode usar qualquer fone de ouvido compat\u00edvel do Google Cardboard para visualizar este conte\u00fado em VR","refresh-downloaded":"Atualizar","use-default-cardboard":"Use o padr\u00e3o",
"enable-audio-prompt":"Ativar \u00e1udio?"},"it-it":{mute:"Disattiva audio","cardboard-v1":"Se non sei sicuro della versione di Cardboard, seleziona il controllo hotspot predefinito. Baster\u00e0 guardare un hotspot e attendere che l'azione venga attivata.","download-tour":"Scarica il tour per la riproduzione offline","change-to-drag-and-release":"Cambia modalit\u00e0 di controllo in Trascina e Rilascia",accept:"Accetta",cancel:"Annulla","storage-not-provided-bookmark":"Archiviazione persistente negata. Prova ad aggiungere questa pagina ai segnalibri e ricaricala.",
"dont-display-again":"Non mostrare pi\u00f9 queste informazioni","web-server-required":"Questo tour virtuale non pu\u00f2 essere riprodotto da un'unit\u00e0 locale. Caricalo su internet e riprova.\nIn alternativa, trascina il file html (o l'intera cartella del tour) sull'icona dell'app TourViewer.",download:"Scarica","change-to-click-and-move":"Cambia modalit\u00e0 di controllo in Clicca e Sposta",yes:"s\u00ec","delete-downloaded":"Elimina","use-safari-for-vr":"Consigliamo l'uso di Safari per visualizzare questo tour in modalit\u00e0 VR",
"exit-fullscreen":"Esci da schermo intero",no:"no","download-failed":"Download fallito","giroscope-disabled-http":"Stai accedendo a questa pagina tramite http, quindi l'accesso al movimento, all'orientamento e alla modalit\u00e0 VR del dispositivo \u00e8 disabilitato. Accedi tramite https per abilitarli.","cookies-notice":"Questo sito web utilizza i cookie per raccogliere statistiche di utilizzo. Per ulteriori informazioni, visita la <a>Politica sui Cookie</a>.","use-cardboard":"Usa Cardboard","launch-default-browser":"Apri nel browser predefinito",
"rotate-device":"Ruota il dispositivo","exit-vr":"Esci dalla VR","storage-not-provided-launch-from-desktop":"Avvia il tour dall'icona sul desktop per scaricarlo.","disable-measure":"Interrompi misurazione",downloading:"Download in corso","cardboard-v2":"Se hai un visore Cardboard v2, con un pulsante, guarda l'hotspot e premi il pulsante per attivare l'azione.","enable-video-audio-prompt":"Abilitare video e audio?",reject:"Rifiuta",downloaded:"Questo tour \u00e8 stato scaricato per la riproduzione offline.",
"samsung-internet-vr-app-info":"Se hai un visore Gear VR compatibile con questo dispositivo e hai installato Samsung Internet for VR, puoi usarlo per visualizzare questo contenuto in VR. \u00c8 necessario impostare Samsung Internet come browser predefinito.","samsung-internet-vr-info":"Se hai un visore Gear VR compatibile con questo dispositivo e hai installato Samsung Internet for VR, puoi usarlo per visualizzare questo contenuto in VR. Basta inserire il telefono nel visore ora.","enable-video-prompt":"Abilitare il video?",
"giroscope-disabled-safari-request-permission":["L'accesso al movimento e all'orientamento del dispositivo e la modalit\u00e0 VR sono disabilitati per questo sito.","Per visualizzare correttamente questa pagina, fai clic su continua e accetta la richiesta di autorizzazione se viene mostrata."],"storage-not-provided-launch-from-homescreen":"Avvia il tour dall'icona nella schermata iniziale per scaricarlo.","enter-fullscreen":"Vai a schermo intero","use-cardboard-v2":"Usa Cardboard v2",unmute:"Attiva audio",
"enter-vr":"Accedi ai contenuti VR","enable-measure":"Inizia misurazione","use-cardboard-info":"Puoi usare un visore compatibile con Google Cardboard per visualizzare questo contenuto in VR.","refresh-downloaded":"Aggiorna","use-default-cardboard":"Usa Predefinito","enable-audio-prompt":"Abilitare l'audio?"},"zh-tw":{mute:"\u975c\u97f3","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"\u4e0b\u8f09\u865b\u64ec\u5c0e\u89bd\uff0c\u4ee5\u9032\u884c\u96e2\u7dda\u64ad\u653e","change-to-drag-and-release":"\u5c07\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u70ba\u201c\u62d6\u653e\u6a21\u5f0f\u201c",accept:"\u63a5\u53d7",cancel:"\u53d6\u6d88","storage-not-provided-bookmark":"\u88dd\u7f6e\u5167\u6c38\u4e45\u5b58\u5132\u88ab\u62d2\u7d55\u3002\u8acb\u5617\u8a66\u5c07\u6b64\u7db2\u9801\u65b0\u589e\u70ba\u66f8\u7c64\uff0c\u4e26\u91cd\u65b0\u8f09\u5165\u3002","dont-display-again":"\u4e0d\u518d\u986f\u793a\u672c\u8a0a\u606f",
"web-server-required":"\u672c\u865b\u64ec\u5c0e\u89bd\u7121\u6cd5\u5728\u672c\u5730\u96fb\u8166\u4e0a\u64ad\u653e\u3002 \u8acb\u5c07\u5176\u4e0a\u50b3\u5230\u7db2\u969b\u7db2\u8def\u4f3a\u670d\u5668\uff0c\u7136\u5f8c\u91cd\u8a66\u3002\n\u5982\u679c\u9700\u8981\u672c\u5730\u9810\u89bd\uff0c\u8acb\u5c07htm\u6a94\u6848\uff08\u6216\u865b\u64ec\u5c0e\u89bd\u7684\u6574\u500b\u8cc7\u6599\u593e\uff09\u62d6\u653e\u5230TourViewer\u61c9\u7528\u7a0b\u793a\u7684\u5716\u793a\u4e0a\u3002",download:"\u4e0b\u8f09",
"change-to-click-and-move":"\u5c07\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u70ba\u201c\u9ede\u64ca\u4e26\u79fb\u52d5\u201d",yes:"\u662f","delete-downloaded":"\u522a\u9664","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u9000\u51fa\u5168\u87a2\u5e55",no:"\u5426","download-failed":"\u4e0b\u8f09\u5931\u6557","giroscope-disabled-http":"\u60a8\u6b63\u5728\u901a\u904ehttp(\u672a\u52a0\u5bc6)\u700f\u89bd\u672c\u7db2\u9801\uff0c\u56e0\u6b64\u8a2d\u5099\u7684\u904b\u52d5\u548c\u65b9\u5411\u53d6\u7528\u6b0a\u9650\uff0c\u4ee5\u53caVR\u6a21\u5f0f\u5747\u5df2\u7981\u7528\uff0c\u8acb\u53e6\u901a\u904ehttps(\u52a0\u5bc6)\u7db2\u5740\u5c0d\u5176\u9032\u884c\u555f\u7528\u3002",
"cookies-notice":"\u8a72\u7db2\u9801\u4f7f\u7528cookie\u4f86\u6536\u96c6\u4f7f\u7528\u60c5\u6cc1\u7d71\u8a08\u4fe1\u606f\u3002 \u6709\u95dc\u66f4\u591a\u4fe1\u606f\uff0c\u8acb\u8a2a\u554f<a> Cookie\u653f\u7b56</a>\u3002","use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","rotate-device":"Please rotate your device","exit-vr":"Exit VR","storage-not-provided-launch-from-desktop":"\u8acb\u5f9e\u684c\u9762\u9ede\u64ca\u5716\u793a\uff0c\u91cd\u65b0\u555f\u52d5\u865b\u64ec\u5c0e\u89bd\uff0c\u4ee5\u9032\u884c\u4e0b\u8f09\u3002",
"disable-measure":"Stop measuring",downloading:"\u6b63\u5728\u4e0b\u8f09","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u5141\u8a31\u5f71\u7247\u53ca\u8072\u97f3\u64ad\u653e?",reject:"\u62d2\u7d55",downloaded:"\u865b\u64ec\u5c0e\u89bd\u5df2\u4e0b\u8f09\uff0c\u53ef\u9032\u884c\u96e2\u7dda\u64ad\u653e\u3002","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.",
"samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"\u5141\u8a31\u5f71\u7247\u64ad\u653e?","giroscope-disabled-safari-request-permission":["\u8a72\u7db2\u7ad9\u5df2\u7981\u7528\u60a8\u8a2d\u5099\u7684\u904b\u52d5\u548c\u65b9\u5411\u53d6\u7528\u6b0a\u9650\uff0cVR\u6a21\u5f0f\u4e5f\u88ab\u7981\u7528\u3002",
"\u8981\u6b63\u78ba\u67e5\u770b\u672c\u7db2\u9801\uff0c\u8acb\u55ae\u64ca\u7e7c\u7e8c\uff0c\u4e26\u5728\u51fa\u73fe\u63d0\u793a\u6642\u63a5\u53d7\u8a31\u53ef\u8acb\u6c42\u3002"],"storage-not-provided-launch-from-homescreen":"\u8acb\u4e3b\u9801\u9762\u87a2\u5e55\u9ede\u64ca\u5716\u793a\uff0c\u91cd\u65b0\u555f\u52d5\u865b\u64ec\u5c0e\u89bd\uff0c\u4ee5\u9032\u884c\u4e0b\u8f09\u3002","enter-fullscreen":"\u9032\u5165\u5168\u87a2\u5e55","use-cardboard-v2":"Use Cardboard v2",unmute:"\u53d6\u6d88\u975c\u97f3",
"enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","refresh-downloaded":"\u91cd\u65b0\u6574\u7406","use-default-cardboard":"Use Default","enable-audio-prompt":"\u5141\u8a31\u8072\u97f3\u64ad\u653e?"},"nb-no":{mute:"Skru av lyd","cardboard-v1":"Hvis du ikke er sikker, hvilken Cardboard versjon du bruker, velger du standard hotspot-kontrollen. Du vil da bare se p\u00e5 et hotspot og vente til handlingen utl\u00f8ses.",
"download-tour":"Last ned visningen, s\u00e5 den kan bli sett uten internett","change-to-drag-and-release":"Endre kontrollmodus til Trekk og Slipp",accept:"Aksepterer",cancel:"Avbryt","storage-not-provided-bookmark":"Vedvarende lagring nektet. Pr\u00f8v \u00e5 bokmerke denne nettsiden og laste den inn p\u00e5 nytt.","dont-display-again":"Ikke vis denne informasjonen igjen","web-server-required":"Denne virtuelle visningen kan ikke spilles av lokalt. Vennligst last den opp til internett, og fors\u00f8k igjen.\ndersom du prefererer det, kan du dra htm filen (eller hele mappen som inneholder visningen) over 'TourViewer' appen.",
download:"Last ned","change-to-click-and-move":"Endre kontrollmodus til Klikk og Flytt",yes:"Ja","delete-downloaded":"Slett","use-safari-for-vr":"Vi anbefaler Safari for \u00e5 se p\u00e5 venne visningen i VR modus","exit-fullscreen":"G\u00e5 ut av full skjerm",no:"Nei","download-failed":"Nedlastning feilet","giroscope-disabled-http":"Du er koblet til denne nettsiden via http. Dermed er enhetens bevegelses- og orienteringstilgang og VR-modus deaktivert. Koble til via https for \u00e5 aktivere denne.",
"cookies-notice":"Denne websiden bruker informasjonskapsler for \u00e5 samle inn bruksstatistikk. For mer informasjon, bes\u00f8k <a>retningslinjer for informasjonskapsler</a>.","use-cardboard":"Bruk Cardboard","launch-default-browser":"\u00c5pne i standard nettleser","rotate-device":"Vennligst roter enheten","exit-vr":"G\u00e5 ut av VR","storage-not-provided-launch-from-desktop":"Start turen p\u00e5 nytt fra skrivebordsikonet for \u00e5 laste ned.","disable-measure":"Stop measuring",downloading:"Laster ned",
"cardboard-v2":"Dersom du har Cardboard versjon 2, hvilket kommer med en knapp, kan du kikke p\u00e5 en klikkbar ting i visningen, og bruke knappen for \u00e5 bruke disse tingene, p\u00e5 samme m\u00e5te som p\u00e5 en laptop eller telefon.","enable-video-audio-prompt":"Aktivere video og lyd?",reject:"Avvis",downloaded:"Denne visningen er lastet ned, s\u00e5 den kan bli sett uten internett.","samsung-internet-vr-app-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten og har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du m\u00e5 ogs\u00e5 gj\u00f8re Samsung Internet til standard nettleser.",
"samsung-internet-vr-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten, og du har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du trenger bare \u00e5 sette mobiltelefonen p\u00e5 headsettet n\u00e5.","enable-video-prompt":"Aktivere video?","giroscope-disabled-safari-request-permission":["Din enhet sin bevegelses- og orienterings tilgang, samt VR modus er deaktivert for denne nettsiden.","For \u00e5 se denne siden korrekt, vennligst klikk p\u00e5 fortsett og godta tillatelsesforesp\u00f8rselen hvis du blir bedt om dette."],
"storage-not-provided-launch-from-homescreen":"Start turen p\u00e5 nytt fra startskjermikonet for \u00e5 laste ned.","enter-fullscreen":"G\u00e5 til full skjerm","use-cardboard-v2":"Bruk Cardboard Versjon 2",unmute:"Skru p\u00e5 lyd","enter-vr":"\u00c5pne VR Modus","enable-measure":"Start measuring","use-cardboard-info":"Du kan bruke hvilke some helst Google Cardboard kompatible headsett for \u00e5 se denne visningen i VR.","refresh-downloaded":"Last inn p\u00e5 nytt","use-default-cardboard":"Bruk Standard",
"enable-audio-prompt":"Aktivere audio?"},"pt-pt":{mute:"Desativar som","cardboard-v1":"Se voc\u00ea n\u00e3o tiver certeza de qual vers\u00e3o do Cardboard est\u00e1 usando, selecione o controle de ponto de acesso padr\u00e3o. Voc\u00ea simplesmente olha para um ponto de acesso e espera at\u00e9 que a a\u00e7\u00e3o seja acionada.","download-tour":"Download do Tour para reprodu\u00e7\u00e3o offline","change-to-drag-and-release":"Alterar controle para arrastar e soltar",accept:"Aceitar",cancel:"Cancelar",
"storage-not-provided-bookmark":"Armazenamento persistente negado. Tente marcar esta p\u00e1gina da Web e recarreg\u00e1-la.","dont-display-again":"N\u00e3o exibir essas informa\u00e7\u00f5es novamente","web-server-required":"Este passeio virtual n\u00e3o pode ser reproduzido a partir de uma unidade local. Envie-o para a Internet e tente novamente.\nSe preferir, arraste o arquivo htm (ou toda a pasta do tour) para o \u00edcone do aplicativo TourViewer.",download:"Download","change-to-click-and-move":"Alterar controle para clicar e mover",
yes:"sim","delete-downloaded":"Apagar","use-safari-for-vr":"Recomendamos o Safari para ver este passeio no modo VR","exit-fullscreen":"Sair da tela cheia",no:"n\u00e3o","download-failed":"Falha no Download","giroscope-disabled-http":"Voc\u00ea est\u00e1 acessando esta p\u00e1gina da Web por meio do http, para que o acesso \u00e0 orienta\u00e7\u00e3o e movimento do dispositivo e o modo VR sejam desativados, acesse-o atrav\u00e9s de https para ativ\u00e1-los.","cookies-notice":"Esta p\u00e1gina da web usa cookies para coletar estat\u00edsticas de uso. Para obter mais informa\u00e7\u00f5es, visite a <a>Pol\u00edtica de cookies</a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Iniciar no navegador padr\u00e3o","rotate-device":"Por favor, gire seu dispositivo","exit-vr":"Sair do VR","storage-not-provided-launch-from-desktop":"Por favor, reinicie o tour no \u00edcone da \u00e1rea de trabalho para fazer o download.","disable-measure":"Stop measuring",downloading:"Baixando","cardboard-v2":"Se voc\u00ea tiver um fone de ouvido Cardboard v2, que vem com um bot\u00e3o, poder\u00e1 observar um ponto de acesso e pressionar o bot\u00e3o para acionar sua a\u00e7\u00e3o.",
"enable-video-audio-prompt":"Ativar \u00e1udio e v\u00eddeo?",reject:"Rejeitar",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Voc\u00ea precisa tornar o Samsung Internet o seu padr\u00e3o. browser.","samsung-internet-vr-info":"Se voc\u00ea possui um fone de ouvido Gear VR compat\u00edvel com este dispositivo e instalou o Samsung Internet for VR, tamb\u00e9m pode us\u00e1-lo para visualizar esse conte\u00fado em VR. Basta colocar o celular no fone de ouvido agora.",
"enable-video-prompt":"Ativar v\u00eddeo?","giroscope-disabled-safari-request-permission":["O acesso a movimento e orienta\u00e7\u00e3o do dispositivo e o modo VR est\u00e3o desativados para este site.","Para ver corretamente esta p\u00e1gina da web, clique em continuar e aceite a solicita\u00e7\u00e3o de permiss\u00e3o, se solicitado."],"storage-not-provided-launch-from-homescreen":"Reinicie o tour no \u00edcone da tela inicial para fazer o download.","enter-fullscreen":"Entrar em tela cheia","use-cardboard-v2":"Use Cardboard v2",
unmute:"Ativar som","enter-vr":"Inserir conte\u00fado VR","enable-measure":"Start measuring","use-cardboard-info":"Voc\u00ea pode usar qualquer fone de ouvido compat\u00edvel do Google Cardboard para visualizar este conte\u00fado em VR","refresh-downloaded":"Atualizar","use-default-cardboard":"Use o padr\u00e3o","enable-audio-prompt":"Ativar \u00e1udio?"},"hr-hr":{mute:"nijem","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Promijenite na\u010din upravljanja u povla\u010denje i otpu\u0161tanje",accept:"Prihvatiti",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
cancel:"Cancel","change-to-click-and-move":"Promijenite na\u010din upravljanja na Klik i Premjesti",yes:"Da","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Iza\u0111ite s punog zaslona",no:"Ne","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Ova web stranica koristi kola\u010di\u0107e za prikupljanje statistike upotrebe. Za vi\u0161e informacija posjetite <a>Pravila o kola\u010di\u0107ima</a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Odbiti","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Omogu\u0107iti videozapis i zvuk?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",
downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Omogu\u0107ite videozapis?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Unesite cijeli zaslon","use-cardboard-v2":"Use Cardboard v2",unmute:"Uklju\u010di mikrofon",
"enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","refresh-downloaded":"Refresh","use-default-cardboard":"Use Default","enable-audio-prompt":"\u017delite li omogu\u0107iti zvuk?"},"ja-jp":{mute:"\u30df\u30e5\u30fc\u30c8","cardboard-v1":"\u4f7f\u7528\u3057\u3066\u3044\u308bCardboard\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u308f\u304b\u3089\u306a\u3044\u5834\u5408\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30db\u30c3\u30c8\u30b9\u30dd\u30c3\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u9078\u629e\u3057\u307e\u3059\u3002\u6b21\u306b\u3001\u30db\u30c3\u30c8\u30b9\u30dd\u30c3\u30c8\u3092\u6ce8\u8996\u3057\u3001\u30a2\u30af\u30b7\u30e7\u30f3\u304c\u52d5\u4f5c\u3059\u308b\u307e\u3067\u5f85\u6a5f\u3057\u307e\u3059\u3002\uff08\u4e00\u90e8\u52d5\u4f5c\u3057\u306a\u3044\u30a2\u30af\u30b7\u30e7\u30f3\u6709\u308a\uff09",
"download-tour":"\u30aa\u30d5\u30e9\u30a4\u30f3\u518d\u751f\u7528\u30c4\u30a2\u30fc\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b","change-to-drag-and-release":"\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30e2\u30fc\u30c9\u3092\u30c9\u30e9\u30c3\u30b0\uff06\u30ea\u30ea\u30fc\u30b9\u306b\u5909\u66f4",accept:"\u53d7\u3051\u5165\u308c\u308b",cancel:"\u30ad\u30e3\u30f3\u30bb\u30eb","storage-not-provided-bookmark":"\u6c38\u7d9a\u7684\u306a\u4fdd\u5b58\u304c\u62d2\u5426\u3055\u308c\u305f\u3002\u3053\u306eWeb\u30da\u30fc\u30b8\u3092\u30d6\u30c3\u30af\u30de\u30fc\u30af\u3057\u3001\u66f4\u65b0\u3057\u3066\u304f\u3060\u3055\u3044",
"dont-display-again":"\u4eca\u5f8c\u3053\u306e\u60c5\u5831\u3092\u8868\u793a\u3057\u306a\u3044","web-server-required":"\u3053\u306e\u30d0\u30fc\u30c1\u30e3\u30eb\u30c4\u30a2\u30fc\u306f\u3001\u30ed\u30fc\u30ab\u30eb\u30c9\u30e9\u30a4\u30d6\u304b\u3089\u518d\u751f\u3067\u304d\u307e\u305b\u3093\u3002\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u63a5\u7d9a\u3057\u3001\u3082\u3046\u4e00\u5ea6\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3092\u304a\u8a66\u3057\u304f\u3060\u3055\u3044\n\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001htm\u30d5\u30a1\u30a4\u30eb\uff08\u307e\u305f\u306f\u30c4\u30a2\u30fc\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u5168\u4f53\uff09\u3092\u300eTourViewer\u300f\u30a2\u30d7\u30ea\u306e\u30a2\u30a4\u30b3\u30f3\u306b\u30c9\u30e9\u30c3\u30b0\u3057\u307e\u3059",
download:"\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9","change-to-click-and-move":"\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30e2\u30fc\u30c9\u3092\u30af\u30ea\u30c3\u30af\uff06\u30e0\u30fc\u30d6\u306b\u5909\u66f4",yes:"\u306f\u3044","delete-downloaded":"\u524a\u9664","use-safari-for-vr":"\u3053\u306e\u30c4\u30a2\u30fc\u3092VR\u30d3\u30e5\u30fc\u3067\u8868\u793a\u3059\u308b\u306b\u306f\u3001Safari\u30d6\u30e9\u30a6\u30b6\u306e\u5229\u7528\u3092\u304a\u52e7\u3081\u3057\u307e\u3059","exit-fullscreen":"\u30d5\u30eb\u30b9\u30af\u30ea\u30fc\u30f3\u3092\u7d42\u4e86\u3059\u308b",
no:"\u3044\u3044\u3048","download-failed":"\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5931\u6557\u3057\u307e\u3057\u305f","giroscope-disabled-http":"\u3053\u306eWeb\u30da\u30fc\u30b8\u306b\u300ehttp\u300f\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u3054\u5229\u7528\u7aef\u672b\u306e\u30e2\u30fc\u30b7\u30e7\u30f3\u3068\u753b\u9762\u306e\u5411\u304d\u3078\u30a2\u30af\u30bb\u30b9\u304c\u3067\u304d\u305a\u3001VR\u30e2\u30fc\u30c9\u304c\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u300ehttps\u300f\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3057\u6709\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044",
"cookies-notice":"\u3053\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306fCookie\u3092\u4f7f\u7528\u3057\u3066\u4f7f\u7528\u7d71\u8a08\u3092\u53ce\u96c6\u3057\u307e\u3059\u3002 \u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001<a>Cookie\u30dd\u30ea\u30b7\u30fc</a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002","use-cardboard":"Cardboard\u5229\u7528","launch-default-browser":"\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u8d77\u52d5","rotate-device":"\u7aef\u672b\u3092\u56de\u8ee2\u3055\u305b\u3066\u304f\u3060\u3055\u3044",
"exit-vr":"VR\u30d3\u30e5\u30fc \u7d42\u4e86","storage-not-provided-launch-from-desktop":"\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306e\u30a2\u30a4\u30b3\u30f3\u304b\u3089\u30c4\u30a2\u30fc\u3092\u518d\u8d77\u52d5\u3057\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044","disable-measure":"Stop measuring",downloading:"\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u4e2d","cardboard-v2":"\u30dc\u30bf\u30f3\u304c\u4ed8\u5c5e\u3057\u3066\u3044\u308bCardboard v2\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u3092\u304a\u6301\u3061\u306e\u5834\u5408\u306f\u3053\u3061\u3089\u3002",
"enable-video-audio-prompt":"\u30d3\u30c7\u30aa\u3068\u97f3\u58f0\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u304b\uff1f",reject:"\u62d2\u5426\u3059\u308b",downloaded:"\u3053\u306e\u30c4\u30a2\u30fc\u306f\u3001\u30aa\u30d5\u30e9\u30a4\u30f3\u3067\u518d\u751f\u3059\u308b\u305f\u3081\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3092\u3059\u308b","samsung-internet-vr-app-info":"\u3053\u306e\u7aef\u672b\u3068\u4e92\u63db\u6027\u306e\u3042\u308bVR\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u6a5f\u5668\u3092\u304a\u6301\u3061\u3067\u3001VR\u7528\u306e\u300eSamsung Internet\u300f\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u5834\u5408\u3002VR\u30d3\u30e5\u30fc\u3067\u3053\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u969b\u3001\u300eSamsung Internet\u300f\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d6\u30e9\u30a6\u30b6\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059",
"samsung-internet-vr-info":"\u3053\u306e\u7aef\u672b\u3068\u4e92\u63db\u6027\u306e\u3042\u308bVR\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u6a5f\u5668\u3092\u304a\u6301\u3061\u3067\u3001VR\u7528\u306e\u300eSamsung Internet\u300f\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u5834\u5408\u3002VR\u30d3\u30e5\u30fc\u3067\u3053\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u969b\u3001\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u3092\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u306b\u88c5\u7740\u3059\u308b\u3060\u3051\u3067\u3059",
"enable-video-prompt":"\u30d3\u30c7\u30aa\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u304b\uff1f","giroscope-disabled-safari-request-permission":["\u3054\u5229\u7528\u7aef\u672b\u306e\u30e2\u30fc\u30b7\u30e7\u30f3\u3068\u753b\u9762\u306e\u5411\u304d\u3078\u30a2\u30af\u30bb\u30b9\u304c\u3067\u304d\u305a\u3001VR\u30e2\u30fc\u30c9\u304c\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002","\u3053\u306eWeb\u30da\u30fc\u30b8\u3092\u6b63\u3057\u304f\u8868\u793a\u3059\u308b\u306b\u306f\u3001\u300eOK\u300f\u3092\u30af\u30ea\u30c3\u30af\u3057\u300e\u8a31\u53ef\u300f\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u3051\u5165\u308c\u3066\u304f\u3060\u3055\u3044"],
"storage-not-provided-launch-from-homescreen":"\u30db\u30fc\u30e0\u753b\u9762\u306e\u30a2\u30a4\u30b3\u30f3\u304b\u3089\u30c4\u30a2\u30fc\u3092\u518d\u8d77\u52d5\u3057\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044","enter-fullscreen":"\u30d5\u30eb\u30b9\u30af\u30ea\u30fc\u30f3\u3067\u5165\u529b\u3059\u308b","use-cardboard-v2":"Cardboard v2\u5229\u7528",unmute:"\u30df\u30e5\u30fc\u30c8\u89e3\u9664","enter-vr":"VR\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u5165\u529b","enable-measure":"Start measuring",
"use-cardboard-info":"\u3053\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092VR\u30d3\u30e5\u30fc\u3067\u8868\u793a\u3059\u308b\u306b\u306f\u3001\u4e92\u63db\u6027\u306e\u3042\u308b\u4efb\u610f\u306eGoogle Cardboard\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u3092\u5229\u7528\u3067\u304d\u307e\u3059","refresh-downloaded":"\u66f4\u65b0","use-default-cardboard":"\u30c7\u30d5\u30a9\u30eb\u30c8\u5229\u7528","enable-audio-prompt":"\u97f3\u58f0\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u304b\uff1f"},"zh-cn":{mute:"\u9759\u97f3",
"cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"\u4e0b\u8f7d\u5168\u666f\u6f2b\u6e38\uff0c\u4ee5\u8fdb\u884c\u79bb\u7ebf\u64ad\u653e","change-to-drag-and-release":"\u5c06\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u4e3a\u201c\u62d6\u653e\u201d",accept:"\u63a5\u53d7",cancel:"\u53d6\u6d88","storage-not-provided-bookmark":"\u88c5\u7f6e\u5185\u6c38\u4e45\u5b58\u50a8\u88ab\u62d2\u7edd\u3002\u5c1d\u8bd5\u5c06\u6b64\u7f51\u9875\u6dfb\u52a0\u4e3a\u4e66\u7b7e\uff0c \u5e76\u91cd\u65b0\u52a0\u8f7d\u3002",
"dont-display-again":"\u4e0d\u518d\u663e\u793a\u6b64\u4fe1\u606f","web-server-required":"\u6b64\u5168\u666f\u6f2b\u6e38\u65e0\u6cd5\u4ece\u672c\u5730\u9a71\u52a8\u5668\u4e0a\u64ad\u653e\u3002 \u8bf7\u5c06\u5176\u4e0a\u4f20\u5230\u4e92\u8054\u7f51\u670d\u52a1\u5668\uff0c\u7136\u540e\u91cd\u8bd5\u3002\n\u5982\u679c\u9700\u8981\u672c\u5730\u9884\u89c8\uff0c\u53ef\u4ee5\u5c06htm\u6587\u4ef6\uff08\u6216\u5168\u666f\u6f2b\u6e38\u7684\u6574\u4e2a\u6587\u4ef6\u5939\uff09\u62d6\u5230TourViewer\u5e94\u7528\u7a0b\u5e8f\u7684\u56fe\u6807\u4e0a\u3002",
download:"\u4e0b\u8f7d","change-to-click-and-move":"\u5c06\u63a7\u5236\u6a21\u5f0f\u66f4\u6539\u4e3a\u201c\u5355\u51fb\u5e76\u79fb\u52a8\u201d",yes:"\u662f","delete-downloaded":"\u5220\u9664","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u9000\u51fa\u5168\u5c4f",no:"\u5426","download-failed":"\u4e0b\u8f7d\u5931\u8d25","giroscope-disabled-http":"\u60a8\u6b63\u5728\u901a\u8fc7http(\u672a\u52a0\u5bc6)\u8bbf\u95ee\u6b64\u7f51\u9875\uff0c\u56e0\u6b64\u8bbe\u5907\u7684\u8fd0\u52a8\u548c\u65b9\u5411\u8bbf\u95ee\u6743\u9650\u4ee5\u53caVR\u6a21\u5f0f\u5747\u5df2\u7981\u7528\uff0c\u8bf7\u901a\u8fc7https(\u52a0\u5bc6)\u5bf9\u5176\u8fdb\u884c\u542f\u7528\u3002",
"cookies-notice":"\u8be5\u7f51\u9875\u4f7f\u7528cookie\u6765\u6536\u96c6\u4f7f\u7528\u60c5\u51b5\u7edf\u8ba1\u4fe1\u606f\u3002 \u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u8bbf\u95ee<a>Cookie\u653f\u7b56</a>\u3002","use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","rotate-device":"Please rotate your device","exit-vr":"Exit VR","storage-not-provided-launch-from-desktop":"\u8bf7\u4ece\u684c\u9762\u70b9\u51fb\u56fe\u6807\uff0c\u91cd\u65b0\u542f\u52a8\u5168\u666f\u6f2b\u6e38\uff0c\u4ee5\u8fdb\u884c\u4e0b\u8f7d\u3002",
"disable-measure":"Stop measuring",downloading:"\u6b63\u5728\u4e0b\u8f7d","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u542f\u7528\u89c6\u9891\u548c\u97f3\u9891\uff1f",reject:"\u62d2\u7edd",downloaded:"\u6b64\u5168\u666f\u6f2b\u6e38\u5df2\u4e0b\u8f7d\uff0c\u53ef\u8fdb\u884c\u79bb\u7ebf\u64ad\u653e\u3002","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.",
"samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"\u542f\u7528\u89c6\u9891\uff1f","giroscope-disabled-safari-request-permission":["\u8be5\u7ad9\u70b9\u5df2\u7981\u7528\u8bbe\u5907\u7684\u8fd0\u52a8\u548c\u65b9\u5411\u8bbf\u95ee\u6743\u9650\uff0cVR\u6a21\u5f0f\u4e5f\u88ab\u7981\u7528\u3002",
"\u8981\u6b63\u786e\u67e5\u770b\u6b64\u7f51\u9875\uff0c\u8bf7\u5355\u51fb\u7ee7\u7eed\uff0c\u5e76\u5728\u51fa\u73b0\u63d0\u793a\u65f6\u63a5\u53d7\u8bb8\u53ef\u8bf7\u6c42"],"storage-not-provided-launch-from-homescreen":"\u8bf7\u4ece\u4e3b\u5c4f\u5e55\u70b9\u51fb\u56fe\u6807\uff0c\u91cd\u65b0\u542f\u52a8\u5168\u666f\u6f2b\u6e38\uff0c\u4ee5\u8fdb\u884c\u4e0b\u8f7d\u3002","enter-fullscreen":"\u8fdb\u5165\u5168\u5c4f","use-cardboard-v2":"Use Cardboard v2",unmute:"\u53d6\u6d88\u9759\u97f3","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","refresh-downloaded":"\u5237\u65b0","use-default-cardboard":"Use Default","enable-audio-prompt":"\u542f\u7528\u97f3\u9891\uff1f"},"nl-nl":{mute:"Schakel audio uit","cardboard-v1":"Als u niet weet wat voor versie van Cardboard u gebruikt, selecteer dan de default hotspot control. Dan zult u moeten wachten op een hotspot tot er een bepaald actie is gestart.","download-tour":"Download Tour voor offline afspelen",
"change-to-drag-and-release":"Verander de besturingsmodus om te slepen en los te laten",accept:"Aanvaarden",download:"Download","storage-not-provided-bookmark":"Aanhoudende inhoud geweigerd. Probeer deze pagina als bookmark op te slaan en te verversen.","dont-display-again":"Niet meer laten zien","web-server-required":"Deze virtuele tour kan niet worden afgespeeld vanaf een lokale schijf. Upload dit alstublieft op het internet. Je kan ook de htm bestand slepen naar het icoon van de TourViewer app.",
cancel:"Annuleren","change-to-click-and-move":"Verander de bedieningsmodus om te klikken en te verplaatsen",yes:"Ja","delete-downloaded":"Verwijderen","use-safari-for-vr":"We raden aan om in Safari deze tour te bekijken in VR mode","exit-fullscreen":"Volledig scherm verlaten",no:"Nee","download-failed":"Download mislukt","giroscope-disabled-http":"Jij betreedt deze pagina door http, dus uw toestel's motion en orientation access en VR modus zijn uitgeschakeld. Betreed deze pagina door https om ze weer aan te schakelen.",
"cookies-notice":"Deze webpagina maakt gebruik van cookies om gebruiksstatistieken te verzamelen. Raadpleeg het <a>Cookiebeleid</a> voor meer informatie.","use-cardboard":"Gebruik Cardboard","launch-default-browser":"Start op in standaard browser","rotate-device":"Draai uw toestel om, alstublieft","exit-vr":"VR verlaten",reject:"Weigeren","disable-measure":"Stop meten",downloading:"Downloaden","cardboard-v2":"Als u een Cardboard v2 headset heeft, wat met een knop komt, kunt u wachten op een hotspot en een op een knop drukken om een actie te starten.",
"enable-video-audio-prompt":"Audio en video inschakelen?","storage-not-provided-launch-from-desktop":"Start de tour alstublieft opnieuw up vanaf het bureaublad om te kunnen downloaden.",downloaded:"Deze tour is gedownload voor offline afspelen.","samsung-internet-vr-app-info":"Als u een Gear VR headset heeft dat werkt met dit toestel en u Samsung Internet voor VR heeft ge\u00efnstalleerd, kunt u dit ook bekijken in VR. U moet alleen Samsung Internet instellen als uw standaard browser.","samsung-internet-vr-info":"Als u een Gear VR headset heeft dat werkt met dit toestel en u Samsung Internet voor VR heeft ge\u00efnstalleerd, kunt u dit ook bekijken in VR, u moet alleen uw mobiele toestel op uw headset zetten.",
"enable-video-prompt":"Video inschakelen?","giroscope-disabled-safari-request-permission":["Uw toestel's motion en orientation access en VR modus zijn uitgeschakeld voor deze site..","Om deze pagina goed te kunnen zien, druk op doorgaan en geef toestemming als dat gevraagd wordt."],"storage-not-provided-launch-from-homescreen":"Start de tour alstublieft opnieuw up vanaf het homescherm om te kunnen downloaden.","enter-fullscreen":"Volledig scherm inschakelen","use-cardboard-v2":"Gebruik Cardboard v2",
unmute:"Schakel audio in","enter-vr":"Voer VR inhoud in","enable-measure":"Begin meten","use-cardboard-info":"U kunt elk werkend Google Cardboard headset gebruiken om dit te bekijken.","refresh-downloaded":"Verversen","use-default-cardboard":"Standaard gebruiken","enable-audio-prompt":"Audio inschakelen?"},"hu-hu":{mute:"N\u00e9m\u00edt\u00e1s","cardboard-v1":"Ha nem vagy biztos benne, hogy milyen VR eszk\u00f6zt haszn\u00e1lsz, akkor v\u00e1laszd az alap\u00e9rtelmezettet \u00e9s az egyes hotspot-ok megtekint\u00e9s\u00e9hez csak tartsd ott a jel\u00f6l\u0151t.",
"download-tour":"T\u00fara let\u00f6lt\u00e9se offline megtekint\u00e9shez","change-to-drag-and-release":"Ir\u00e1ny\u00edt\u00e1s \u00e1t\u00e1ll\u00edt\u00e1sa: megfog \u00e9s mozgat m\u00f3dra",accept:"Elfogad",cancel:"M\u00e9gsem","storage-not-provided-bookmark":"Pr\u00f3b\u00e1lja meg az oldalt megjel\u00f6lni \u00e9s \u00fajrat\u00f6lteni!","dont-display-again":"Ne mutasd \u00fajra","web-server-required":"Ez a t\u00fara nem j\u00e1tszat\u00f3 le helyi futtat\u00e1ssal, k\u00e9rlek t\u00f6lsd fel az internetre \u00e9s pr\u00f3b\u00e1ld meg \u00fajra\nM\u00e1sik megold\u00e1s, ha a Tourviewer applik\u00e1ci\u00f3ra h\u00fazod a t\u00fara f\u00e1jlt, vagy az azt tartalmaz\u00f3 t\u00fara mapp\u00e1t.",
download:"Let\u00f6lt\u00e9s","change-to-click-and-move":"Ir\u00e1ny\u00edt\u00e1s \u00e1t\u00e1ll\u00edt\u00e1sa kattint \u00e9s k\u00f6rben\u00e9z m\u00f3dra",yes:"igen","delete-downloaded":"T\u00f6rl\u00e9s","use-safari-for-vr":"Azt javasoljuk, hogy haszn\u00e1lj Safari b\u00f6ng\u00e9sz\u0151t a VR n\u00e9zet megtekint\u00e9s\u00e9hez","exit-fullscreen":"Kil\u00e9p\u00e9s a teljesk\u00e9perny\u0151 m\u00f3db\u00f3l",no:"nem","download-failed":"Let\u00f6lt\u00e9s sikertelen","giroscope-disabled-http":"Az oldalt https el\u0151taggal sz\u00fcks\u00e9ges megnyitnod ahhoz, hogy a k\u00e9sz\u00fcl\u00e9ked mozg\u00e1s\u00e1t \u00e9rz\u00e9kelni tudja.",
"cookies-notice":"Ez a weboldal s\u00fctiket haszn\u00e1l a haszn\u00e1lati statisztik\u00e1k gy\u0171jt\u00e9s\u00e9hez. Tov\u00e1bbi inform\u00e1ci\u00f3\u00e9rt l\u00e1togasson el a <a>s\u00fctikre vonatkoz\u00f3 ir\u00e1nyelvekbe</a>.","use-cardboard":"Cardboard haszn\u00e1lata","launch-default-browser":"Futtat\u00e1s az alap\u00e9rtelmezett b\u00f6ng\u00e9sz\u0151ben","rotate-device":"Forgasd el a telefont!","exit-vr":"Kil\u00e9p\u00e9s a VR m\u00f3db\u00f3l","storage-not-provided-launch-from-desktop":"K\u00e9rlek ind\u00edtsd \u00fajra az oldalt az asztalon tal\u00e1lhat\u00f3 iconra kattintva.",
"disable-measure":"Stop measuring",downloading:"Let\u00f6lt\u00e9s","cardboard-v2":"Ha Cardboard 2.0 t\u00edpus\u00fa eszk\u00f6zt haszn\u00e1lsz, akkor a kapcsol\u00f3kkal ir\u00e1ny\u00edthatod a t\u00far\u00e1t, kattinthatsz az egyes hotspotokra","enable-video-audio-prompt":"Hang \u00e9s vide\u00f3 enged\u00e9lyez\u00e9se",reject:"Elutas\u00edt",downloaded:"Let\u00f6ltve offline megtekint\u00e9shez","samsung-internet-vr-app-info":"Ha Samsung Gear VR szem\u00fcveget szeretn\u00e9l haszn\u00e1lni, akkor nyisd meg a Samsung internetb\u00f6ng\u00e9sz\u0151ben a t\u00far\u00e1t.",
"samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"Vide\u00f3 enged\u00e9lyez\u00e9se","giroscope-disabled-safari-request-permission":["A megjelen\u00edt\u0151 eszk\u00f6z\u00f6d nem adott hozz\u00e1f\u00e9r\u00e9st a mozg\u00e1s \u00e9rz\u00e9kel\u00e9s\u00e9hez ezen az oldalon.","Ahhoz hogy megfelel\u0151en l\u00e1sd az oldalt k\u00e9rlek enged\u00e9lyezd a hozz\u00e1f\u00e9r\u00e9st."],
"storage-not-provided-launch-from-homescreen":"Ind\u00edtsd \u00fajra a t\u00far\u00e1t a home ikonra kattintva.","enter-fullscreen":"Teljesk\u00e9perny\u0151","use-cardboard-v2":"Cardboard 2.0 haszn\u00e1lata",unmute:"N\u00e9m\u00edt\u00e1s kikapcsol\u00e1sa","enter-vr":"VR tartalom megtekint\u00e9se","enable-measure":"Start measuring","use-cardboard-info":"Haszn\u00e1lhatsz b\u00e1rmilyen google cardboard-ot ahhoz, hogy VR m\u00f3dban l\u00e1sd a t\u00far\u00e1t.","refresh-downloaded":"Friss\u00edt\u00e9s",
"use-default-cardboard":"Alap\u00e9rtelmezett haszn\u00e1lata","enable-audio-prompt":"Hang enged\u00e9lyez\u00e9se"},"ar-ar":{mute:"\u062a\u0639\u0637\u064a\u0644 \u0627\u0644\u0635\u0648\u062a","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing","change-to-drag-and-release":"\u062a\u063a\u064a\u064a\u0631 \u0648\u0636\u0639 \u0627\u0644\u062a\u062d\u0643\u0645 \u0644\u0644\u0633\u062d\u0628 \u0648\u0627\u0644\u0625\u0641\u0631\u0627\u062c",
accept:"\u0642\u0628\u0648\u0644",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"\u062a\u063a\u064a\u064a\u0631 \u0648\u0636\u0639 \u0627\u0644\u062a\u062d\u0643\u0645 \u0644\u0644\u0646\u0642\u0631 \u0648\u0627\u0644\u062a\u062d\u0631\u0643",
yes:"\u0646\u0639\u0645 \u0641\u0639\u0644\u0627","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 \u0645\u0644\u0626 \u0644\u0644\u0634\u0627\u0634\u0629",no:"\u0644\u0627","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.",
"cookies-notice":"\u062a\u0633\u062a\u062e\u062f\u0645 \u0635\u0641\u062d\u0629 \u0627\u0644\u0648\u064a\u0628 \u0647\u0630\u0647 \u0645\u0644\u0641\u0627\u062a \u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0627\u0631\u062a\u0628\u0627\u0637 \u0644\u062c\u0645\u0639 \u0625\u062d\u0635\u0627\u0626\u064a\u0627\u062a \u0627\u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645. \u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u060c \u064a\u0631\u062c\u0649 \u0632\u064a\u0627\u0631\u0629 <a> \u0633\u064a\u0627\u0633\u0629 \u0645\u0644\u0641\u0627\u062a \u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0627\u0631\u062a\u0628\u0627\u0637 </a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"\u064a\u0631\u0641\u0636","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0635\u0648\u062a \u0648\u0627\u0644\u0641\u064a\u062f\u064a\u0648\u061f",
"storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0641\u064a\u062f\u064a\u0648\u061f","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"\u0623\u062f\u062e\u0644 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",
"use-cardboard-v2":"Use Cardboard v2",unmute:"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0635\u0648\u062a","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","refresh-downloaded":"Refresh","use-default-cardboard":"Use Default","enable-audio-prompt":"\u062a\u0645\u0643\u064a\u0646 \u0627\u0644\u0635\u0648\u062a\u061f"},"ca-es":{mute:"Silenciar","cardboard-v1":"Si no esteu segurs de quina versi\u00f3 de cartr\u00f3 utilitzeu, seleccioneu el control de punt d'acc\u00e9s per defecte. Despr\u00e9s, simplement veureu un punt d'acc\u00e9s i espereu fins que s'activi l'acci\u00f3.",
"download-tour":"Descarregueu la visita virtual per a jugar fora de l\u00ednia","change-to-drag-and-release":"Canvieu el mode de control a Arrossegar i deixeu anar",accept:"Accepta",cancel:"Cancel\u00b7lar","storage-not-provided-bookmark":"S'ha denegat l'emmagatzematge persistent. Proveu de marcar aquesta p\u00e0gina web i torneu-la a carregar.","dont-display-again":"No tornis a mostrar aquesta informaci\u00f3","web-server-required":"Aquesta visita virtual no es pot reproduir des d'una unitat local. Carregueu-lo a Internet i torneu-ho a provar.\nSi ho preferiu, arrossegueu el fitxer htm (o tota la carpeta de la visita virtual) a la icona de l'aplicaci\u00f3 TourViewer.",
download:"Descarregar","change-to-click-and-move":"Canvieu el mode de control a Fer clic i desplaceu",yes:"s\u00ed","delete-downloaded":"Suprimeix","use-safari-for-vr":"Recomanem Safari per a visualitzar aquesta visita virtual en mode VR","exit-fullscreen":"Surt de pantalla completa",no:"no","download-failed":"Error de desc\u00e0rrega","giroscope-disabled-http":"Accediu a aquesta p\u00e0gina web a trav\u00e9s de http de manera que el moviment i l\u2019orientaci\u00f3 del dispositiu i el mode VR estan desactivats, accediu-hi mitjan\u00e7ant https per habilitar-les.",
"cookies-notice":"Aquesta p\u00e0gina web utilitza cookies per recopilar estad\u00edstiques d\u2019\u00fas. Per obtenir m\u00e9s informaci\u00f3, visiteu la <a>Pol\u00edtica de cookies</a>.","use-cardboard":"Utilitzeu Cardboard","launch-default-browser":"Inicieu el navegador per defecte","rotate-device":"Gireu el dispositiu","exit-vr":"Surt de VR","storage-not-provided-launch-from-desktop":"Torneu a iniciar la visita virtual des de la icona de l'escriptori per a descarregar-la.","disable-measure":"Stop measuring",
downloading:"Baixant","cardboard-v2":"Si teniu unes Cardboard v2, que venen amb un bot\u00f3, podeu mirar cap a un punt de vista i pr\u00e9mer el bot\u00f3 per activar-lo.","enable-video-audio-prompt":"Habilitar v\u00eddeo i \u00e0udio?",reject:"Rebutjar",downloaded:"Aquesta visita virtual es descarrega per a reproduir-la fora de l\u00ednia.","samsung-internet-vr-app-info":"Si teniu un auricular Gear VR compatible amb aquest dispositiu i heu instal\u00b7lat Samsung Internet per a VR, tamb\u00e9 podeu utilitzar-lo per visualitzar aquest contingut en VR, heu de fer que Samsung Internet sigui el vostre navegador predeterminat.",
"samsung-internet-vr-info":"Si teniu un auricular Gear VR compatible amb aquest dispositiu i heu instal\u00b7lat Samsung Internet per a VR, tamb\u00e9 podeu utilitzar-lo per visualitzar aquest contingut en VR, nom\u00e9s heu de posar el tel\u00e8fon m\u00f2bil als auriculars.","enable-video-prompt":"Activar v\u00eddeo?","giroscope-disabled-safari-request-permission":["Aquest lloc web est\u00e0 desactivat en el moviment i en la direcci\u00f3 o en mode VR del dispositiu.","Per veure correctament aquesta p\u00e0gina web, feu clic a Continuar i accepteu la sol\u00b7licitud de perm\u00eds si se us demana."],
"storage-not-provided-launch-from-homescreen":"Torneu a iniciar la visita virtual des de la icona de la pantalla inicial.","enter-fullscreen":"Entra a pantalla completa","use-cardboard-v2":"Utilitzeu Cardboard v2",unmute:"No activa","enter-vr":"Introdu\u00efu contingut de VR","enable-measure":"Start measuring","use-cardboard-info":"Podeu utilitzar qualsevol auricular de Google Cardboard compatible per a visualitzar aquest contingut en VR.","refresh-downloaded":"Actualitzaci\u00f3","use-default-cardboard":"\u00das per defecte",
"enable-audio-prompt":"Activar \u00e0udio?"},"ru-ru":{mute:"\u0411\u0435\u0437 \u0437\u0432\u0443\u043a\u0430","cardboard-v1":"\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u043a\u0430\u043a\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Cardboard \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0417\u0430\u0442\u0435\u043c \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u0438 \u0434\u043e\u0436\u0434\u0438\u0442\u0435\u0441\u044c, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.",
"download-tour":"\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0442\u0443\u0440  \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f","change-to-drag-and-release":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u0435",
accept:"\u041f\u0440\u0438\u043d\u044f\u0442\u044c",download:"\u0421\u043a\u0430\u0447\u0430\u0442\u044c","storage-not-provided-bookmark":"\u0412 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u043d\u043e. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0438 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0435.",
"dont-display-again":"\u0411\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e","web-server-required":"\u042d\u0442\u043e\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0443\u0440 \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437.\n\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435, \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 htm-\u0444\u0430\u0439\u043b (\u0438\u043b\u0438 \u0432\u0441\u044e \u043f\u0430\u043f\u043a\u0443 \u0442\u0443\u0440\u0430) \u043d\u0430 \u0437\u043d\u0430\u0447\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f TourViewer.",
cancel:"\u041e\u0442\u043c\u0435\u043d\u0430","change-to-click-and-move":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u0430\u0436\u0430\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435",yes:"\u0434\u0430","delete-downloaded":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","use-safari-for-vr":"\u041c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c Safari \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u0442\u0443\u0440\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 VR.",
"exit-fullscreen":"\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430",no:"\u043d\u0435\u0442","download-failed":"\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438","giroscope-disabled-http":"\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u043e\u0439 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0447\u0435\u0440\u0435\u0437 http, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044e \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0440\u0435\u0436\u0438\u043c VR \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u043d\u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 https, \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0445.",
"cookies-notice":"\u042d\u0442\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u044b cookie \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0441\u043c. <a>\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 cookie</a>.",
"use-cardboard":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Cardboard","launch-default-browser":"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e","rotate-device":"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e",
"exit-vr":"\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 VR",reject:"\u041e\u0442\u043a\u043b\u043e\u043d\u0438\u0442\u044c","disable-measure":"\u041f\u0440\u0435\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f",downloading:"\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435","cardboard-v2":"\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0430 Cardboard v2 \u0441 \u043a\u043d\u043e\u043f\u043a\u043e\u0439, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0445\u043e\u0442\u0441\u043f\u043e\u0442 \u0438 \u043d\u0430\u0436\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.",
"enable-video-audio-prompt":"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0438 \u0430\u0443\u0434\u0438\u043e?","storage-not-provided-launch-from-desktop":"\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0442\u0443\u0440 \u0441\u043e \u0437\u043d\u0430\u0447\u043a\u0430 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u0442\u043e\u043b\u0435..",
downloaded:"\u042d\u0442\u043e\u0442 \u0442\u0443\u0440 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f.","samsung-internet-vr-app-info":"\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0430 Gear VR, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430\u044f \u0441 \u044d\u0442\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c, \u0438 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f VR, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 VR, \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c Samsung Internet \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.",
"samsung-internet-vr-info":"\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0430 Gear VR, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430\u044f \u0441 \u044d\u0442\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c, \u0438 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 Samsung Internet \u0434\u043b\u044f VR, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 VR, \u0432\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0434\u0435\u0442\u044c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0430 \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0443 \u0441\u0435\u0439\u0447\u0430\u0441.",
"enable-video-prompt":"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e?","giroscope-disabled-safari-request-permission":["\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044e \u0438 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0436\u0438\u043c VR \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430.",
"\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u044d\u0442\u0443 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u00ab\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c\u00bb \u0438 \u043f\u0440\u0438\u043c\u0438\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e."],
"storage-not-provided-launch-from-homescreen":"\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0442\u0443\u0440 \u0441\u043e \u0437\u043d\u0430\u0447\u043a\u0430 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435.","enter-fullscreen":"\u0412\u043e\u0439\u0442\u0438 \u0432 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c",
"use-cardboard-v2":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Cardboard v2",unmute:"\u0421\u043e \u0437\u0432\u0443\u043a\u043e\u043c","enter-vr":"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c VR \u043a\u043e\u043d\u0442\u0435\u043d\u0442","enable-measure":"\u041d\u0430\u0447\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f","use-cardboard-info":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0443\u044e \u0433\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0443 Google Cardboard \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 VR.",
"refresh-downloaded":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c","use-default-cardboard":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e","enable-audio-prompt":"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0443\u0434\u0438\u043e?"},"nn-no":{mute:"Skru av lyd","cardboard-v1":"Hvis du ikke er sikker, hvilken Cardboard versjon du bruker, velger du standard hotspot-kontrollen. Du vil da bare se p\u00e5 et hotspot og vente til handlingen utl\u00f8ses.",
"download-tour":"Last ned visningen, s\u00e5 den kan bli sett uten internett","change-to-drag-and-release":"Endre kontrollmodus til Trekk og Slipp",accept:"Aksepterer",cancel:"Avbryt","storage-not-provided-bookmark":"Vedvarende lagring nektet. Pr\u00f8v \u00e5 bokmerke denne nettsiden og laste den inn p\u00e5 nytt.","dont-display-again":"Ikke vis denne informasjonen igjen","web-server-required":"Denne virtuelle visningen kan ikke spilles av lokalt. Vennligst last den opp til internett, og fors\u00f8k igjen.\ndersom du prefererer det, kan du dra htm filen (eller hele mappen som inneholder visningen) over 'TourViewer' appen.",
download:"Last ned","change-to-click-and-move":"Endre kontrollmodus til Klikk og Flytt",yes:"Ja","delete-downloaded":"Slett","use-safari-for-vr":"Vi anbefaler Safari for \u00e5 se p\u00e5 venne visningen i VR modus","exit-fullscreen":"G\u00e5 ut av full skjerm",no:"Nei","download-failed":"Nedlastning feilet","giroscope-disabled-http":"Du er koblet til denne nettsiden via http. Dermed er enhetens bevegelses- og orienteringstilgang og VR-modus deaktivert. Koble til via https for \u00e5 aktivere denne.",
"cookies-notice":"Denne websiden bruker informasjonskapsler for \u00e5 samle inn bruksstatistikk. For mer informasjon, bes\u00f8k <a>retningslinjer for informasjonskapsler</a>.","use-cardboard":"Bruk Cardboard","launch-default-browser":"\u00c5pne i standard nettleser","rotate-device":"Vennligst roter enheten","exit-vr":"G\u00e5 ut av VR","storage-not-provided-launch-from-desktop":"Start turen p\u00e5 nytt fra skrivebordsikonet for \u00e5 laste ned.","disable-measure":"Stop measuring",downloading:"Laster ned",
"cardboard-v2":"Dersom du har Cardboard versjon 2, hvilket kommer med en knapp, kan du kikke p\u00e5 en klikkbar ting i visningen, og bruke knappen for \u00e5 bruke disse tingene, p\u00e5 samme m\u00e5te som p\u00e5 en laptop eller telefon.","enable-video-audio-prompt":"Aktivere video og lyd?",reject:"Avvis",downloaded:"Denne visningen er lastet ned, s\u00e5 den kan bli sett uten internett.","samsung-internet-vr-app-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten og har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du m\u00e5 ogs\u00e5 gj\u00f8re Samsung Internet til standard nettleser.",
"samsung-internet-vr-info":"Hvis du har et Gear VR-headset som er kompatibelt med denne enheten, og du har installert Samsung Internet for VR, kan du ogs\u00e5 bruke det til \u00e5 se dette innholdet i VR, du trenger bare \u00e5 sette mobiltelefonen p\u00e5 headsettet n\u00e5.","enable-video-prompt":"Aktivere video?","giroscope-disabled-safari-request-permission":["Din enhet sin bevegelses- og orienterings tilgang, samt VR modus er deaktivert for denne nettsiden.","For \u00e5 se denne siden korrekt, vennligst klikk p\u00e5 fortsett og godta tillatelsesforesp\u00f8rselen hvis du blir bedt om dette."],
"storage-not-provided-launch-from-homescreen":"Start turen p\u00e5 nytt fra startskjermikonet for \u00e5 laste ned.","enter-fullscreen":"G\u00e5 til full skjerm","use-cardboard-v2":"Bruk Cardboard Versjon 2",unmute:"Skru p\u00e5 lyd","enter-vr":"\u00c5pne VR Modus","enable-measure":"Start measuring","use-cardboard-info":"Du kan bruke hvilke some helst Google Cardboard kompatible headsett for \u00e5 se denne visningen i VR.","refresh-downloaded":"Last inn p\u00e5 nytt","use-default-cardboard":"Bruk Standard",
"enable-audio-prompt":"Aktivere audio?"},"es-es":{mute:"Silenciar","cardboard-v1":"Si no esta seguro de que versi\u00f3n de Cardboard debe usar escoja la selecci\u00f3n de hotspot por defecto. Solo tendr\u00e1 que apuntar al hotspot y esperar para que se ejecute la acci\u00f3n.","download-tour":"Descargar el tour para reproducirlo sin conexi\u00f3n","change-to-drag-and-release":"Cambiar el modo de control a arrastrar y soltar",accept:"Aceptar","use-cardboard-v2":"Usar Cardboard v2","storage-not-provided-bookmark":"Almacenamiento persistente denagado. Intente a\u00f1adir la p\u00e1gina a los marcadores y recargarla.",
"dont-display-again":"No volver a mostrar esta informaci\u00f3n","web-server-required":"Este tour virtual no puede reproducirse desde una unidad local. Por favor s\u00fabalo a internet y pruebe de nuevo.\nSi lo prefiere puede arrastrar el archivo html o la carpeta con el tour sobre el icono de la aplicaci\u00f3n Tour Viewer de su escritorio.",download:"Descargar","change-to-click-and-move":"Cambiar el modo de control a pulsar y mover",yes:"s\u00ed","delete-downloaded":"Borrar","use-safari-for-vr":"Recomendamos Safari para ver este tour en modo VR",
"exit-fullscreen":"Salir de pantalla completa",no:"no","download-failed":"La descarga ha fallado","giroscope-disabled-http":"Est\u00e1 accediendo a esta p\u00e1gina web por http por lo que el acceso al movimiento y la orientaci\u00f3n del dispositivo est\u00e1 deshabilitado, por favor acceda por https.","cookies-notice":"Esta p\u00e1gina usa cookies para recolectar estad\u00edsticas de uso. Para m\u00e1s informaci\u00f3n, visite la <a>Pol\u00edtica de Cookies</a>.","use-cardboard":"Usar Cardboard",
"launch-default-browser":"Lanzar en el navegador por defecto","rotate-device":"Por favor, gire el dispositivo","exit-vr":"Salir de VR","storage-not-provided-launch-from-desktop":"Por favor lance el tour desde el escritorio para descargarlo.","disable-measure":"Stop measuring",cancel:"Cancel",downloading:"Descargando","cardboard-v2":"Si tiene unas gafas Cardboard v2, que vienen con un bot\u00f3n, puede apuntar al hotspot y pulsar el bot\u00f3n para que se ejecute su acci\u00f3n.","enable-video-audio-prompt":"\u00bfActivar v\u00eddeo y audio?",
reject:"Rechazar",downloaded:"Este tour esta descargado para reproducirlo sin conexi\u00f3n.","samsung-internet-vr-app-info":"Si tiene unas gafas Gear VR compatibles con este dispositivo y tiene instalado Samsung Internet for VR puede usarlo para ver este contenido en VR, necesita hacer Samsung Internet su navegador por defecto.","samsung-internet-vr-info":"Si tiene unas gafas Gear VR compatibles con este dispositivo y tiene instalado Samsung Internet for VR puede usarlo para ver este contenido en VR, solo tiene que poner ahora el dispositivo en las gafas.",
"enable-video-prompt":"\u00bfActivar v\u00eddeo?","giroscope-disabled-safari-request-permission":["El acceso al movimiento y la orientaci\u00f3n del dispositivo est\u00e1 deshabiltado para este sitio.","Para ver correctamente la p\u00e1gina por favor pulse Continuar y acepte la petici\u00f3n de permiso si se muestra."],"storage-not-provided-launch-from-homescreen":"Por favor lance el tour desde el icono de la pantalla de inicio para descargarlo.","enter-fullscreen":"Mostrar en pantalla completa",
unmute:"Habilitar sonido","enter-vr":"Entrar al contenido VR","enable-measure":"Start measuring","use-cardboard-info":"Puede usar unas gafas compatibles con Google Cardboard para ver este contenido en VR.","refresh-downloaded":"Actualizar","use-default-cardboard":"Usar versi\u00f3n por defecto","enable-audio-prompt":"\u00bfActivar audio?"},"el-gr":{mute:"\u0391\u03c0\u03b5\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 \u03c4\u03bf\u03bd \u03ae\u03c7\u03bf","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"\u0391\u03bb\u03bb\u03ac\u03be\u03c4\u03b5 \u03c4\u03b7 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c3\u03cd\u03c1\u03b5\u03c4\u03b5 \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03b1\u03c0\u03b5\u03bb\u03b5\u03c5\u03b8\u03b5\u03c1\u03ce\u03c3\u03b5\u03c4\u03b5",accept:"\u0391\u03c0\u03bf\u03b4\u03ad\u03c7\u03bf\u03bc\u03b1\u03b9",download:"Download",
"storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"\u0391\u03bb\u03bb\u03ac\u03be\u03c4\u03b5 \u03c4\u03b7 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03ba\u03bb\u03b9\u03ba \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03bc\u03b5\u03c4\u03b1\u03ba\u03b9\u03bd\u03b7\u03b8\u03b5\u03af\u03c4\u03b5",
yes:"\u039d\u03b1\u03af","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"\u0388\u03be\u03bf\u03b4\u03bf\u03c2 \u03b1\u03c0\u03cc \u03c4\u03b7\u03bd \u03c0\u03bb\u03ae\u03c1\u03b7 \u03bf\u03b8\u03cc\u03bd\u03b7",no:"\u03cc\u03c7\u03b9","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.",
"cookies-notice":"\u0391\u03c5\u03c4\u03ae \u03b7 \u03b9\u03c3\u03c4\u03bf\u03c3\u03b5\u03bb\u03af\u03b4\u03b1 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03b5\u03af cookie \u03b3\u03b9\u03b1 \u03c4\u03b7 \u03c3\u03c5\u03bb\u03bb\u03bf\u03b3\u03ae \u03c3\u03c4\u03b1\u03c4\u03b9\u03c3\u03c4\u03b9\u03ba\u03ce\u03bd \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03c9\u03bd \u03c7\u03c1\u03ae\u03c3\u03b7\u03c2. \u0393\u03b9\u03b1 \u03c0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b5\u03c2 \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2, \u03b5\u03c0\u03b9\u03c3\u03ba\u03b5\u03c6\u03b8\u03b5\u03af\u03c4\u03b5 \u03c4\u03b7\u03bd <a> \u03a0\u03bf\u03bb\u03b9\u03c4\u03b9\u03ba\u03ae cookie </a>.",
"use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"\u0391\u03c0\u03bf\u03c1\u03c1\u03af\u03c0\u03c4\u03c9","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03ae\u03c7\u03bf\u03c5 \u03ba\u03b1\u03b9 \u03b2\u03af\u03bd\u03c4\u03b5\u03bf;",
"storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03b2\u03af\u03bd\u03c4\u03b5\u03bf;","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"\u0395\u03b9\u03c3\u03ac\u03b3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c0\u03bb\u03ae\u03c1\u03b7 \u03bf\u03b8\u03cc\u03bd\u03b7",
"use-cardboard-v2":"Use Cardboard v2",unmute:"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03ae\u03c7\u03bf\u03c5","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","refresh-downloaded":"Refresh","use-default-cardboard":"Use Default","enable-audio-prompt":"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03ae\u03c7\u03bf\u03c5;"},
"da-dk":{mute:"Deaktiver lyd","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.","download-tour":"Download Tour for offline playing","change-to-drag-and-release":"Skift kontroltilstand for at tr\u00e6kke og slippe",accept:"Acceptere",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again",
"web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",cancel:"Cancel","change-to-click-and-move":"Skift kontroltilstand for at klikke og flytte",yes:"Ja","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Afslut fuldsk\u00e6rm",no:"ingen","download-failed":"Download failed",
"giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.","cookies-notice":"Denne webside bruger cookies til at indsamle brugsstatistikker. For mere information, se venligst <a> Cookiepolitik </a>.","use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Afvise","disable-measure":"Stop measuring",
downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.","enable-video-audio-prompt":"Aktiv\u00e9r lyd og video?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.",
"samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.","enable-video-prompt":"Aktiv\u00e9r video?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],
"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Indtast fuldsk\u00e6rm","use-cardboard-v2":"Use Cardboard v2",unmute:"Aktiv\u00e9r lyd","enter-vr":"Enter VR content","enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","refresh-downloaded":"Refresh","use-default-cardboard":"Use Default","enable-audio-prompt":"Aktiv\u00e9r lyd?"},"pl-pl":{mute:"Wycisz",
"cardboard-v1":"Je\u015bli nie masz pewno\u015bci, kt\u00f3rej wersji Cardboard u\u017cywasz, wybierz domy\u015blne sterowanie hotspotem. Nast\u0119pnie skieruj wzrok na hotspot i poczekaj na uruchomienie ich dzia\u0142ania.","download-tour":"Pobierz spacer do odtwarzania w trybie offline","change-to-drag-and-release":"Zmie\u0144 tryb na Przeci\u0105gnij i Upu\u015b\u0107",accept:"Zaakceptowa\u0107",cancel:"Anuluj","storage-not-provided-bookmark":"Odmowa zapisu w pami\u0119ci sta\u0142ej. Spr\u00f3buj doda\u0107 stron\u0119 do zak\u0142adek i za\u0142aduj j\u0105 ponownie.",
"dont-display-again":"Nie wy\u015bwietlaj tego ponownie","web-server-required":"Nie mo\u017cna odtworzy\u0107 tego spaceru z dysku lokalnego. Prze\u015blij go do internetu i spr\u00f3buj ponownie.\nMo\u017cesz te\u017c przeci\u0105gn\u0105\u0107 plik htm (lub ca\u0142y folder spaceru) na ikon\u0119 aplikacji TourViewer.",download:"Pobierz","change-to-click-and-move":"Zmie\u0144 tryb na to Kliknij i Przenie\u015b",yes:"tak","delete-downloaded":"Usu\u0144","use-safari-for-vr":"Zalecamy Safari, jako przegl\u0105dark\u0119 spacer\u00f3w w trybie VR",
"exit-fullscreen":"Wyjd\u017a z trybu pe\u0142nego ekranu",no:"nie","download-failed":"Pobieranie nie powiod\u0142o si\u0119","giroscope-disabled-http":"To jest dost\u0119p za po\u015brednictwem protoko\u0142u http, wi\u0119c dost\u0119p do ruchu i orientacji oraz tryb VR s\u0105 wy\u0142\u0105czone. Prze\u0142\u0105cz si\u0119\u00a0na protok\u00f3\u0142 https, aby je w\u0142\u0105czy\u0107.","cookies-notice":"Ta strona u\u017cywa plik\u00f3w cookie do zbierania statystyk u\u017cytkowania. Aby uzyska\u0107 wi\u0119cej informacji, odwied\u017a <a>Zasady dotycz\u0105ce plik\u00f3w cookie</a>.",
"use-cardboard":"U\u017cyj Cardboard","launch-default-browser":"Uruchom w domy\u015blnej przegl\u0105darce","rotate-device":"Obr\u00f3\u0107 urz\u0105dzenie","exit-vr":"Wyjd\u017a z VR","storage-not-provided-launch-from-desktop":"Aby pobra\u0107, uruchom ponownie spacer klikaj\u0105c ikon\u0119 pulpitu.","disable-measure":"Stop measuring",downloading:"Pobieranie","cardboard-v2":"Je\u015bli masz okulary Cardboard v2, kt\u00f3re maj\u0105 przycisk, mo\u017cesz spojrze\u0107 na hotspot i nacisn\u0105\u0107 przycisk, aby uruchomi\u0107 ich dzia\u0142anie.",
"enable-video-audio-prompt":"W\u0142\u0105czy\u0107 video i d\u017awi\u0119k?",reject:"Odrzuca\u0107",downloaded:"Spacer jest pobierany do odtwarzania w trybie offline.","samsung-internet-vr-app-info":"Je\u015bli masz okulary zgodne z Gear VR i zainstalowa\u0142e\u015b Samsung Internet for VR, mo\u017cesz je u\u017cy\u0107 do przegl\u0105dania zawarto\u015bci w VR. Musisz w tym przypadku ustawi\u0107 Samsung Internet jako domy\u015bln\u0105 przegl\u0105dark\u0119.","samsung-internet-vr-info":"Je\u015bli masz okulary Gear VR i zainstalowa\u0142e\u015b Samsung Internet for VR, to mo\u017cesz u\u017cy\u0107 ich do przegl\u0105dania zawarto\u015bci w VR. Umie\u015b\u0107 teraz telefon w okularach Gear VR.",
"enable-video-prompt":"W\u0142\u0105czy\u0107 video?","giroscope-disabled-safari-request-permission":["Dost\u0119p do funkcji ruchu i orientacji oraz tryb VR s\u0105 wy\u0142\u0105czone dla tej strony.","Aby poprawnie wy\u015bwietli\u0107 stron\u0119, kliknij kontynuuj i zaakceptuj wszystkie zgody."],"storage-not-provided-launch-from-homescreen":"Aby pobra\u0107, uruchom ponownie spacer klikaj\u0105c ikon\u0119 strony g\u0142\u00f3wnej.","enter-fullscreen":"Uruchom pe\u0142ny ekran","use-cardboard-v2":"U\u017cyj Cardboard v2",
unmute:"Wy\u0142\u0105cz Wycisz","enter-vr":"Wejd\u017a do VR","enable-measure":"Start measuring","use-cardboard-info":"Do wy\u015bwietlania w VR mo\u017cesz u\u017cy\u0107 oklular\u00f3w zgodnych z Google Cardboard.","refresh-downloaded":"Od\u015bwie\u017c","use-default-cardboard":"U\u017cyj Domy\u015blnych","enable-audio-prompt":"W\u0142\u0105czy\u0107 d\u017awi\u0119k?"},"fr-fr":{mute:"Couper le son","cardboard-v1":"Si vous n'\u00eates pas s\u00fbr de la version de votre Cardboard, s\u00e9lectionnez le contr\u00f4le de hotspot par d\u00e9faut. Ensuite, vous n'aurez qu'\u00e0 fixer un hotspot du regard et attendre que l'action se d\u00e9clenche.",
"download-tour":"T\u00e9l\u00e9charger la visite pour jouer hors ligne","change-to-drag-and-release":"Changer le mode de contr\u00f4le en glisser-d\u00e9poser",accept:"Accepter",cancel:"Annuler","storage-not-provided-bookmark":"Stockage persistant refus\u00e9. Essayez de mettre cette page Web en signet et de la recharger.","dont-display-again":"Ne plus afficher ces informations","web-server-required":"Cette visite virtuelle ne peut pas \u00eatre lue \u00e0 partir d'un lecteur local. Veuillez la t\u00e9l\u00e9charger sur Internet et r\u00e9essayer.\nSi vous pr\u00e9f\u00e9rez, faites glisser le fichier htm (ou l'int\u00e9gralit\u00e9 du dossier de la visite) sur l'ic\u00f4ne de l'application TourViewer.",
download:"T\u00e9l\u00e9charger","change-to-click-and-move":"Changer le mode de contr\u00f4le pour cliquer et d\u00e9placer",yes:"Oui","delete-downloaded":"Supprimer","use-safari-for-vr":"Nous recommandons Safari pour visionner cette visite en mode VR","exit-fullscreen":"Quitter le mode plein \u00e9cran",no:"Non","download-failed":"\u00c9chec du t\u00e9l\u00e9chargement","giroscope-disabled-http":"Vous acc\u00e9dez \u00e0 cette page Web via http, donc l'acc\u00e8s au mouvement et \u00e0 l'orientation de votre appareil et le mode VR sont d\u00e9sactiv\u00e9s, veuillez y acc\u00e9der via https pour les activer.",
"cookies-notice":"Cette page Web utilise des cookies pour collecter des statistiques d'utilisation. Pour plus d'informations, veuillez consulter la <a>Politique en mati\u00e8re de cookies</a>.","use-cardboard":"Utiliser le Cardboard","launch-default-browser":"Lancer dans le navigateur par d\u00e9faut","rotate-device":"Veuillez faire pivoter votre appareil","exit-vr":"Quitter la r\u00e9alit\u00e9 virtuelle","storage-not-provided-launch-from-desktop":"Veuillez relancer la visite \u00e0 partir de l'ic\u00f4ne du bureau pour t\u00e9l\u00e9charger.",
"disable-measure":"Arr\u00eatez de mesurer",downloading:"T\u00e9l\u00e9chargement","cardboard-v2":"Si vous disposez d'un casque Cardboard v2, qui est \u00e9quip\u00e9 d'un bouton, vous pouvez fixer un hotspot du regard et appuyer sur le bouton pour d\u00e9clencher son action.","enable-video-audio-prompt":"Activer la vid\u00e9o et l'audio?",reject:"Rejeter",downloaded:"Cette visite est t\u00e9l\u00e9charg\u00e9e pour jouer hors ligne.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.",
"samsung-internet-vr-info":"Si vous disposez d'un casque Gear VR compatible avec cet appareil et que vous avez install\u00e9 Samsung Internet pour VR, vous pouvez \u00e9galement l'utiliser pour visualiser ce contenu en r\u00e9alit\u00e9 virtuelle. Il vous suffit de placer maintenant le t\u00e9l\u00e9phone mobile sur le casque.","enable-video-prompt":"Activer la vid\u00e9o?","giroscope-disabled-safari-request-permission":["L'acc\u00e8s au mouvement et \u00e0 l'orientation de votre appareil et le mode VR sont d\u00e9sactiv\u00e9s pour ce site.",
"Pour voir correctement cette page Web, veuillez cliquer sur Continuer et accepter la demande d'autorisation si vous y \u00eates invit\u00e9."],"storage-not-provided-launch-from-homescreen":"Veuillez relancer la visite \u00e0 partir de l'ic\u00f4ne de l'\u00e9cran d'accueil pour t\u00e9l\u00e9charger.","enter-fullscreen":"Passer en mode plein \u00e9cran","use-cardboard-v2":"Utiliser le Cardboard v2",unmute:"R\u00e9tablir le son","enter-vr":"Entrez le contenu VR","enable-measure":"Commencer \u00e0 mesurer",
"use-cardboard-info":"Vous pouvez utiliser n'importe quel casque Google Cardboard compatible pour visualiser ce contenu en r\u00e9alit\u00e9 virtuelle.","refresh-downloaded":"Rafra\u00eechir","use-default-cardboard":"Utiliser par d\u00e9faut","enable-audio-prompt":"Activer le son?"},"de-de":{mute:"Deaktiviere Audio","cardboard-v1":"Wenn Sie sich nicht sicher sind, welche Cardboard-Version Sie verwenden, w\u00e4hlen Sie die Standard-Hotspot-Steuerung. Sie schauen dann einfach auf einen Hotspot und warten, bis die jeweilige Aktion ausgel\u00f6st wird.",
"download-tour":"Tour zum Offline-Abspielen herunterladen","giroscope-disabled-safari-request-permission":["Der Bewegungs- und Orientierungszugriff, sowie VR Modus Ihres Ger\u00e4ts ist f\u00fcr diese Seite deaktiviert.","Um diese Webseite korrekt anzuzeigen, klicken Sie auf Weiter und akzeptieren Sie die Erlaubnisanfrage, wenn Sie dazu aufgefordert werden."],accept:"Akzeptieren",download:"Download",downloading:"Downloading","dont-display-again":"Diese Info nicht mehr anzeigen","web-server-required":"Diese Virtual Tour kann nicht von einem lokalen Laufwerk abgespielt werden. Laden Sie Ihre Tour ins Internet und versuchen Sie es erneut.\nAlternativ, ziehen Sie die htm Datei (oder den ganzen Tour Ordner) auf das Icon der Tour Viewer App, um die Tour direkt lokal abzuspielen.",
cancel:"Abbrechen","change-to-click-and-move":"\u00c4ndern Sie den Steuerungsmodus, um zu klicken und zu drehen",yes:"ja","delete-downloaded":"L\u00f6schen","use-safari-for-vr":"Wir empfehlen Safari, um diese Tour im VR-Modus zu sehen","exit-fullscreen":"Vollbild verlassen",no:"nein","storage-not-provided-bookmark":"Dauerhafte Speicherung verweigert. Versuchen Sie, diese Seite als Lesezeichen zu speichern und erneut zu laden.","download-failed":"Download fehlgeschlagen","giroscope-disabled-http":"Der Bewegungs- und Ausrichtungsszugriff Ihres Ger\u00e4ts ist f\u00fcr diese Webseite deaktiviert. Greifen Sie bitte \u00fcber https darauf zu.",
"cookies-notice":"Diese Webseite verwendet Cookies, um Nutzungsstatistiken zu sammeln. Weitere Informationen finden Sie in der <a>Cookie-Richtlinie</a>.","use-cardboard":"Cardboard verwenden","launch-default-browser":"Im Standardbrowser starten","rotate-device":"Bitte drehen Sie Ihr Ger\u00e4t","exit-vr":"VR verlassen",reject:"Ablehnen","disable-measure":"Messung beenden","change-to-drag-and-release":"\u00c4ndern Sie den Steuerungsmodus zu Ziehen und Loslassen","cardboard-v2":"Wenn Sie ein Cardboard v2-Headset haben, das mit einer Taste ausgestattet ist, k\u00f6nnen Sie auf einen Hotspot blicken und die Taste dr\u00fccken, um dessen Aktion auszul\u00f6sen.",
"enable-video-audio-prompt":"Video und Audio aktivieren?","storage-not-provided-launch-from-desktop":"Bitte starten Sie die Tour erneut \u00fcber das Desktop-Symbol, um sie herunterzuladen.",downloaded:"Diese Tour ist zum Offline-Abspielen heruntergeladen.","samsung-internet-vr-app-info":"Wenn Sie ein Gear VR-Headset haben, das mit diesem Ger\u00e4t kompatibel ist, und Sie Samsung Internet f\u00fcr VR installiert haben, k\u00f6nnen Sie es auch verwenden, um diese Inhalte in VR anzusehen. Machen Sie dazu Samsung Internet zu Ihrem Standardbrowser.",
"samsung-internet-vr-info":"Wenn Sie ein Gear VR-Headset haben, das mit diesem Ger\u00e4t kompatibel ist, und Sie Samsung Internet f\u00fcr VR installiert haben, k\u00f6nnen Sie es auch verwenden, um diese Inhalte in VR zu sehen. Setzen Sie dazu nun das Mobiltelefon auf das Headset.","enable-video-prompt":"Video aktivieren?","storage-not-provided-launch-from-homescreen":"Bitte starten Sie die Tour erneut \u00fcber das Symbol auf dem Startbildschirm, um sie herunterzuladen.","enter-fullscreen":"Vollbildmodus aktivieren",
"use-cardboard-v2":"Cardboard v2 verwenden",unmute:"Audio aktivieren","enter-vr":"VR Inhalt eingeben","enable-measure":"Messung beginnen","use-cardboard-info":"Sie k\u00f6nnen jedes kompatible Google Cardboard-Headset verwenden, um diese Inhalte in VR zu sehen.","refresh-downloaded":"Aktualisieren","use-default-cardboard":"Standard verwenden","enable-audio-prompt":"Audio aktivieren?"},"tr-tr":{mute:"Sesi devre d\u0131s\u0131 b\u0131rakmak","cardboard-v1":"If you are not sure, which Cardboard version you're using, select the default hotspot control. You'll then simply gaze at a hotspot and wait until the action is triggered.",
"download-tour":"Download Tour for offline playing","change-to-drag-and-release":"S\u00fcr\u00fckleyip b\u0131rakmak i\u00e7in kontrol modunu de\u011fi\u015ftirin",accept:"Kabul etmek",download:"Download","storage-not-provided-bookmark":"Persistent storage denied. Try bookmarking this webpage and reloading it.","dont-display-again":"Don't display this info again","web-server-required":"This virtual tour cannot be played from a local drive. Please upload it to the internet and try again.\nIf you prefer, drag the htm file (or the entire folder of the tour) onto the icon of the TourViewer app.",
cancel:"Cancel","change-to-click-and-move":"T\u0131klamak ve ta\u015f\u0131mak i\u00e7in kontrol modunu de\u011fi\u015ftirin",yes:"evet","delete-downloaded":"Delete","use-safari-for-vr":"We recommend Safari to view this tour in VR mode","exit-fullscreen":"Tam ekrandan \u00e7\u0131k",no:"hay\u0131r","download-failed":"Download failed","giroscope-disabled-http":"You are accessing this webpage through http so your device's motion and orientation access and VR mode are disabled, please access it through https to enable them.",
"cookies-notice":"Bu web sayfas\u0131, kullan\u0131m istatistiklerini toplamak i\u00e7in tan\u0131mlama bilgileri kullan\u0131r. Daha fazla bilgi i\u00e7in l\u00fctfen <a>\u00c7erez Politikas\u0131n\u0131</a> ziyaret edin.","use-cardboard":"Use Cardboard","launch-default-browser":"Launch in default browser","rotate-device":"Please rotate your device","exit-vr":"Exit VR",reject:"Reddet","disable-measure":"Stop measuring",downloading:"Downloading","cardboard-v2":"If you have a Cardboard v2 headset, which comes with a button, you can gaze at a hotspot and press the button to trigger its action.",
"enable-video-audio-prompt":"Ses ve video etkinle\u015ftirilsin mi?","storage-not-provided-launch-from-desktop":"Please relaunch the tour from the desktop icon to download.",downloaded:"This tour is downloaded for offline playing.","samsung-internet-vr-app-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you need to make Samsung Internet your default browser.","samsung-internet-vr-info":"If you have a Gear VR headset compatible with this device and you have installed Samsung Internet for VR you can also use it to view this content in VR, you just need to put the mobile phone on the headset now.",
"enable-video-prompt":"Video aktif edilsin mi?","giroscope-disabled-safari-request-permission":["Your device's motion and orientation access and VR mode are disabled for this site.","To properly see this webpage, please click continue and accept the permission request if prompted."],"storage-not-provided-launch-from-homescreen":"Please relaunch the tour from the home screen icon to download.","enter-fullscreen":"Tam ekran yap","use-cardboard-v2":"Use Cardboard v2",unmute:"Sesi etkinle\u015ftir","enter-vr":"Enter VR content",
"enable-measure":"Start measuring","use-cardboard-info":"You can use any compatible Google Cardboard headset to view this content in VR.","refresh-downloaded":"Refresh","use-default-cardboard":"Use Default","enable-audio-prompt":"Ses aktif edilsin mi?"}}});
define("pz",["require","lV","iQ","mV"],function(a){function d(e){return m[b][e]||m.en[e]||e}var l=a("lV"),m=a("iQ"),k=a("mV"),c;for(c in m)m[c.substr(0,2)]=m[c];m.en["giroscope-disabled-safari-toggle-on"]='<div>Your device\'s motion and orientation access and VR mode are disabled for this site.</div>\n<div>To properly see this webpage, please enable it:</div>\n<ul style="display:inline-block; text-align:left;">\n<li>Access you device\'s settings: "Settings > Safari > Privacy & Security" and toggle on: "Motion & Orientation Access".</li>\n<li>Refresh the browser.</li>\n</ul>';m["zh-hk"]=
m["zh-mo"]=m["zh-tw"];m.no=m.nn;var h=function(){var e=window.navigator,g=["language","browserLanguage","systemLanguage","userLanguage"],n,q,p=[];(n=k.getQueryParameter("language"))&&p.push(n.toLowerCase());var r=e.languages;if(Array.isArray(r))for(n=0;n<r.length;n++)(q=r[n])&&q.length&&(q=q.toLowerCase(),-1==p.indexOf(q)&&p.push(q));for(n=0;n<g.length;n++)(q=e[g[n]])&&q.length&&(q=q.toLowerCase(),-1==p.indexOf(q)&&p.push(q));return p}(),f=Object.keys(m),b=function(){for(var e=0;e<h.length;e++){var g=
h[e];if(0<=f.indexOf(g))return g;g=g.substr(0,2);if(0<=f.indexOf(g))return g}return"en"}();d.log=function(){l.log("translation lang: "+b);l.log("browser lang: "+h.join(", "))};return d});
define("fC",["require","w"],function(a){function d(){for(;e.length;)e.shift()();document.body.removeEventListener("click",d,!0);document.body.removeEventListener("touchstart",k,!0);document.body.removeEventListener("touchmove",m,!0);document.body.removeEventListener("touchend",l,!0);f=!1}function l(){b&&d()}function m(){b=!1}function k(){b=!0;h.zd()==h.yi&&d()}function c(){document.body.addEventListener("click",d,!0);document.body.addEventListener("touchstart",k,!0);document.body.addEventListener("touchmove",
m,!0);document.body.addEventListener("touchend",l,!0)}var h=a("w"),f=!1,b=!1,e=[];return{V5:function(){d()},wait:function(g){e.push(g);f||(f=!0,document.body?c():document.addEventListener("DOMContentLoaded",c))},Seb:function(g){g=e.indexOf(g);0<=g&&e.splice(g,1)}}});
define("pQ",["require"],function(){var a={};a.src=a.Oeb="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=";return a});
define("ek",["require","pQ","w"],function(a){function d(q){var p=document.createElement("video");p.setAttribute("webkit-playsinline","true");p.setAttribute("playsinline","true");p.src=h.src;var r=p.play();if(r){var t=!1;r.then(function(){t=!0;p.pause();q(!1)})["catch"](function(){t||q(!0)})}else p.pause(),q(!1)}function l(q){var p=!1,r=document.createElement("video");r.setAttribute("webkit-playsinline","true");r.setAttribute("playsinline","true");r.src="";(r=r.play())?r["catch"](function(t){p="NotAllowedError"!==
t.name}).then(function(){q(!p)}):q(!0)}function m(q){n=q;e=!0;k()}function k(){for(;g.length;)g.shift().call(window,n)}function c(){b||(b=!0,f.browser()==f.Mj&&11<=f.Wka()?m(!0):f.browser()==f.sh?d(m):l(function(q){q?d(m):m(!1)}))}var h=a("pQ"),f=a("w"),b=!1,e=!1,g=[],n;return{test:function(q){e||b||c();g.push(q);e&&k()}}});
define("bL",["require","pz","fC","ek"],function(a){function d(h,f){this.zm=h;this.yp=f;this.rr=this.rr.bind(this);this.sr=!1}function l(){this.rr=this.rr.bind(this);this.Xga=this.Xga.bind(this);this.C="not tested";this.dpa=[];this.Lv=[];this.u_=!1;k.wait(this.Xga)}var m=a("pz"),k=a("fC"),c=a("ek");l.prototype.qcb=function(){"not tested"==this.C&&(this.C="testing",c.test(function(h){this.C=h?"requires action":"allowed";this.FWa()}.bind(this)))};l.prototype.FWa=function(){"allowed"==this.C?this.rr(!0):
this.u_&&(this.u_=!1,this.Lv.forEach(function(h){h.request()}))};l.prototype.Cma=function(h){"allowed"==this.C?h.call(this,!0):this.dpa.push(h)};l.prototype.request=function(h){this.Kt(h)};l.prototype.cancel=function(h){this.wD(h)};l.prototype.active=function(){return"allowed"==this.C};l.prototype.Rab=function(){"allowed"==this.C&&(this.C="requires action")};l.prototype.Xga=function(){setTimeout(this.QPa.bind(this),300);this.bt(!0)};l.prototype.QPa=function(){for(;this.Lv.length;)this.Lv.pop().cancel()};
l.prototype.Kt=function(h){"testing"==this.C||"not tested"==this.C?(this.n8(h),this.u_=!0):"requires action"==this.C&&this.n8(h).request()};l.prototype.wD=function(h){"testing"==this.C||"not tested"==this.C?this.u_=!1:"requires action"==this.C&&this.n8(h).cancel()};l.prototype.rr=function(h){var f=this.Lv;this.Lv=[];f.forEach(function(b){h||b.zm.set("mute",!0);b.cancel()});this.bt(h)};l.prototype.bt=function(h){this.C="allowed";this.dpa.forEach(function(f){f.call(window,h)})};l.prototype.n8=function(h){for(var f=
null,b=0;b<this.Lv.length&&!f;b++)this.Lv[b].zm==h&&(f=this.Lv[b]);f||(f=new d(h,this.rr),this.Lv.push(f));return f};d.prototype.request=function(){this.sr||(this.sr=!0,"button"==this.zm.get("mediaActivationMode")?this.zm.JK.c$a(this.rr):this.zm.oJ.show(m("enable-audio-prompt"),this.rr))};d.prototype.cancel=function(){this.zm.JK.i4a(this.rr);this.zm.oJ.hide(this.rr)};d.prototype.rr=function(h){this.yp(!1!==h);this.sr=!1};return new l});
define("hC","require exports pB cI gF mV".split(" "),function(a,d,l,m,k,c){return new (function(h){function f(){var b=h.call(this)||this;b.visible=!0;b.ob=!1;b.X5=!1;b.visible=!0;b.ob=!1;b.X5=!1;b.SHa=c.getQueryParameter("redirect-when-hidden")||"";b.H9a=c.mg("reload-when-hidden",!1);document.addEventListener("visibilitychange",b.onChange.bind(b),!1);b.onChange();return b}Z(f,h);f.prototype.Gy=function(b){if(this.ob=b)this.X5=!1;this.onChange()};f.prototype.Pla=function(b){this.X5=b;this.onChange()};
f.prototype.onChange=function(){var b=this.ob?!this.X5:!document.hidden;this.visible!=b&&((this.visible=b)&&this.h9a(),this.trigger(new m(l.ba)))};f.prototype.h9a=function(){this.SHa?window.location.href=this.SHa:this.H9a&&window.location.reload()};return f}(k))});
define("gp",["require","pB","ni","bL","hC"],function(a){var d=a("pB"),l=a("ni"),m=a("bL"),k=a("hC");if(!l.Fma||!1==="AudioContext"in window)return null;var c=new AudioContext;m.Cma(function(){"running"!==c.state&&c.resume()});k.bind(d.ba,function(){k.visible&&"interrupted"==c.state&&c.resume()});return c});
define("mq","require jquery.mod lV gp w ni mV".split(" "),function(a){function d(){}a("jquery.mod");var l=a("lV"),m=a("gp"),k=a("w"),c=a("ni");a=a("mV");d.lha=!1;d.tbb=function(){d.lha=!0};d.NUa=function(){window.MediaSource=window.MediaSource||window.Xdb;return window.MediaSource&&"function"===typeof window.MediaSource.isTypeSupported&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')};d.XUa=function(){if(k.browser()==k.sh){var b=k.jja();if(10<=b&&11>b||11.3<=b)return!0}return!1};
d.OUa=function(){return k.browser()==k.Mj||k.browser()==k.sh?!0:!1};var h;d.hCa=function(b){try{return h||(h=document.createElement("audio")),!!h.canPlayType(b).replace(/^no$/,"")}catch(e){}return!1};var f;d.cL=function(b){try{return f||(f=document.createElement("video"),f.setAttribute("webkit-playsinline","true"),f.setAttribute("playsinline","true")),!!f.canPlayType(b).replace(/^no$/,"")}catch(e){}return!1};d.a4a=function(){return k.browser()==k.sh?15<=k.jja()||m?!0:!1:!0};d.PUa=function(){try{if(document.createElement("canvas").getContext("webgl"))return!0}catch(b){}try{if(document.createElement("canvas").getContext("experimental-webgl"))return!0}catch(b){}return!1};
d.nKa=function(b,e,g,n){if(c.rNa)return!0;if(k.zd()==k.yi)if(!g||30<g){if(3168>=b&&1584>=e)return!0}else{if(4096>=b&&2048>=e)return!0}else if((k.ML()||k.pG())&&!k.CB()){if(4320>=b&&4320>=e||8192>=b&&4096>=e)return!0}else if((k.ML()||k.pG())&&k.sja()){if("h264"==n&&(5760>=b&&5760>=e||7680>=b&&3840>=e)||3840>=b&&2160>=e)return!0}else if(k.HT())if("h264"==n){if(5760>=b&&5760>=e||7680>=b&&3840>=e)return!0}else{if(4400>=b&&2200>=e)return!0}else if(k.pb()){if(3840>=b&&2160>=e)return!0}else if(4096>=b&&
2048>=e)return!0;return!1};d.c4a=function(){return k.HT()||(k.ML()||k.pG())&&k.jc()==k.bv||!k.pb()&&d.lha&&k.browser()==k.po?!0:!1};d.mKa=function(b){return d.nKa(b.get("width"),b.get("height"),b.get("framerate"),b.get("codec"))};d.b4a=function(){return d.lha?!0:!1};d.EHa=!c.fMa&&c.eMa?1:2;d.d4a=function(){return void 0!==c.$ma?c.$ma:k.pG()||k.HT()||k.Z7a()||k.$7a()||k.jFa()||k.ML()&&!k.CB()||!k.Ef()&&k.zd()!=k.Vy&&k.zd()!=k.yi?!0:!1};d.lcb=function(b,e){return d.nKa(b,e,30)};d.log=function(){l.log("webgl: "+
d.Es);l.log("html5 audio: "+d.REa);l.log("html5 video: "+d.UEa)};d.F0a=function(){return["webgl:"+d.Es,"html5audio:"+d.REa,"html5video:"+d.UEa].join(" ")};d.TEa=d.hCa('audio/ogg; codecs="vorbis"');d.SEa=d.hCa("audio/mpeg");d.REa=d.TEa||d.SEa;d.hja=d.cL('video/ogg; codecs="theora"');d.cL('video/mp4; codecs="avc1.42E01E"');d.ija=d.cL('video/webm; codecs="vp8, vorbis"');d.t7a=d.cL('video/mp4; codecs="hev1"');d.u3=d.cL("video/mp4");d.u7a=d.cL("video/quicktime");d.v7a=d.XUa();d.EEa=d.OUa();d.b7a=d.EEa||
d.u3&&d.NUa();d.UEa=d.hja||d.u3||d.ija;d.Es=d.PUa();a.Fj("debug")&&a.Fj("capabilities")&&d.log();d.summary=d.F0a();return d});
define("ok",["require"],function(){var a=Math.PI/180,d=180/Math.PI,l=new THREE.Euler(0,0,0,"YXZ"),m=new THREE.Quaternion;return{create:function(){return{x:0,y:0,z:0,w:0}},wDa:function(k,c,h){m.setFromEuler(l.set(c*a,-k*a,h*a,"YXZ"));k={};k.x=m.x;k.y=m.y;k.z=m.z;k.w=m.w;return k},L5:function(k,c){l.setFromQuaternion(m.set(k.x,k.y,k.z,k.w),"YXZ");k={};k.Ra=-l.y*d;k.pitch=l.x*d;k.Fg=l.z*d;c||(k.pitch=Math.min(90,Math.max(-90,k.pitch)));return k},Ra:function(k){l.setFromQuaternion(m.set(k.x,k.y,k.z,k.w),
"YXZ");return-l.y*d}}});
define("ox",["require"],function(){var a={};a.degToRad=Math.PI/180;a.radToDeg=180/Math.PI;a.Vector2=function(d,l){this.x=d||0;this.y=l||0};a.Vector2.prototype={constructor:a.Vector2,set:function(d,l){this.x=d;this.y=l;return this},copy:function(d){this.x=d.x;this.y=d.y;return this},subVectors:function(d,l){this.x=d.x-l.x;this.y=d.y-l.y;return this}};a.Vector3=function(d,l,m){this.x=d||0;this.y=l||0;this.z=m||0};a.Vector3.prototype={constructor:a.Vector3,set:function(d,l,m){this.x=d;this.y=l;this.z=
m;return this},copy:function(d){this.x=d.x;this.y=d.y;this.z=d.z;return this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},normalize:function(){var d=this.length();0!==d?this.multiplyScalar(1/d):this.z=this.y=this.x=0;return this},multiplyScalar:function(d){this.x*=d;this.y*=d;this.z*=d},applyQuaternion:function(d){var l=this.x,m=this.y,k=this.z,c=d.x,h=d.y,f=d.z;d=d.w;var b=d*l+h*k-f*m,e=d*m+f*l-c*k,g=d*k+c*m-h*l;l=-c*l-h*m-f*k;this.x=b*d+l*-c+e*-f-g*-h;this.y=e*
d+l*-h+g*-c-b*-f;this.z=g*d+l*-f+b*-h-e*-c;return this},dot:function(d){return this.x*d.x+this.y*d.y+this.z*d.z},crossVectors:function(d,l){var m=d.x,k=d.y;d=d.z;var c=l.x,h=l.y;l=l.z;this.x=k*l-d*h;this.y=d*c-m*l;this.z=m*h-k*c;return this}};a.Quaternion=function(d,l,m,k){this.x=d||0;this.y=l||0;this.z=m||0;this.w=void 0!==k?k:1};a.Quaternion.prototype={constructor:a.Quaternion,set:function(d,l,m,k){this.x=d;this.y=l;this.z=m;this.w=k;return this},copy:function(d){this.x=d.x;this.y=d.y;this.z=d.z;
this.w=d.w;return this},QIa:function(d,l,m){var k=Math.cos(d/2),c=Math.cos(l/2),h=Math.cos(m/2);d=Math.sin(d/2);l=Math.sin(l/2);m=Math.sin(m/2);this.x=d*c*h+k*l*m;this.y=k*l*h-d*c*m;this.z=k*c*m-d*l*h;this.w=k*c*h+d*l*m;return this},setFromAxisAngle:function(d,l){l/=2;var m=Math.sin(l);this.x=d.x*m;this.y=d.y*m;this.z=d.z*m;this.w=Math.cos(l);return this},multiply:function(d){return this.multiplyQuaternions(this,d)},multiplyQuaternions:function(d,l){var m=d.x,k=d.y,c=d.z;d=d.w;var h=l.x,f=l.y,b=l.z;
l=l.w;this.x=m*l+d*h+k*b-c*f;this.y=k*l+d*f+c*h-m*b;this.z=c*l+d*b+m*f-k*h;this.w=d*l-m*h-k*f-c*b;return this},inverse:function(){this.x*=-1;this.y*=-1;this.z*=-1;this.normalize();return this},normalize:function(){var d=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);0===d?(this.z=this.y=this.x=0,this.w=1):(d=1/d,this.x*=d,this.y*=d,this.z*=d,this.w*=d);return this},slerp:function(d,l){if(0===l)return this;if(1===l)return this.copy(d);var m=this.x,k=this.y,c=this.z,h=this.w,f=h*
d.w+m*d.x+k*d.y+c*d.z;0>f?(this.w=-d.w,this.x=-d.x,this.y=-d.y,this.z=-d.z,f=-f):this.copy(d);if(1<=f)return this.w=h,this.x=m,this.y=k,this.z=c,this;d=Math.acos(f);var b=Math.sqrt(1-f*f);if(.001>Math.abs(b))return this.w=.5*(h+this.w),this.x=.5*(m+this.x),this.y=.5*(k+this.y),this.z=.5*(c+this.z),this;f=Math.sin((1-l)*d)/b;l=Math.sin(l*d)/b;this.w=h*f+this.w*l;this.x=m*f+this.x*l;this.y=k*f+this.y*l;this.z=c*f+this.z*l;return this},setFromUnitVectors:function(){var d,l;return function(m,k){void 0===
d&&(d=new a.Vector3);l=m.dot(k)+1;1E-6>l?(l=0,Math.abs(m.x)>Math.abs(m.z)?d.set(-m.y,m.x,0):d.set(0,-m.z,m.y)):d.crossVectors(m,k);this.x=d.x;this.y=d.y;this.z=d.z;this.w=l;this.normalize();return this}}()};return a});
define("fG",["require","pB","cI","gF","ox"],function(a){function d(){e||(e=!0,p=new b.Vector3(0,0,1),r=new b.Quaternion,t=new b.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5)),u=new b.Quaternion,m(),window.addEventListener("orientationchange",m,!1),window.addEventListener("deviceorientation",k,!1),l())}function l(){if(v&&void 0!==n&&void 0!==q){v=!1;var y=b.degToRad*q;u.QIa(b.degToRad*n.beta,b.degToRad*n.alpha,-(b.degToRad*n.gamma));u.multiply(t);u.multiply(r.setFromAxisAngle(p,-y));w||(x++,5<=x&&(w=
!0,g.trigger(new h(c.jd))));g.trigger(new h(c.ba))}}function m(){q=window.orientation||0;v=!0;l()}function k(y){n=y;v=!0;l()}var c=a("pB"),h=a("cI"),f=a("gF"),b=a("ox"),e=!1,g=new f,n,q,p,r,t,u,v,w=!1,x=0;d.prototype.$r=function(){l();return u};d.prototype.bind=function(){g.bind.apply(g,arguments)};d.prototype.unbind=function(){g.unbind.apply(g,arguments)};d.prototype.stop=function(){window.removeEventListener("orientationchange",m,!1);window.removeEventListener("deviceorientation",k,!1)};return d});
define("jy","require pB cI gF w ox".split(" "),function(a){function d(n){this.i8a=n;this.dia=new k;this.w2=new k;this.Eka=new k;this.aG=new b.Quaternion;this.Dka=new b.Quaternion;this.sBa=new b.Quaternion;this.hFa=!1;this.G2=new b.Vector3;this.Nja=new b.Vector3;this.S6a=new b.Quaternion}function l(){this.deviceId="webvr-polyfill:fused";this.XFa=!1;this.WFa=0;this.qS=new b.Vector3;this.q3=new b.Vector3;this.filter=new d(.98);this.z9a=new m(.04);this.GL=g.GL();this.Bp=g.Bp();g.Iia();this.Bja=g.L7a();
this.L2=new b.Quaternion;g.Bp()?this.L2.setFromAxisAngle(new b.Vector3(1,0,0),Math.PI/2):this.L2.setFromAxisAngle(new b.Vector3(1,0,0),-Math.PI/2);this.D3=new b.Quaternion;this.MM=new b.Quaternion;this.bHa=new b.Quaternion;this.bHa.setFromAxisAngle(new b.Vector3(0,0,1),-window.orientation*Math.PI/180);this.pJa();g.fFa()&&this.L2.multiply(this.D3);this.Tu=new b.Quaternion;this.GL=g.GL();this.Bp=g.Bp();this.K7a=66<=g.Iia();this.yG=this.yG.bind(this);this.YT=this.YT.bind(this);this.XT=this.XT.bind(this);
screen&&screen.orientation&&screen.orientation.addEventListener?screen.orientation.addEventListener("change",this.yG):window.addEventListener("orientationchange",this.yG);this.Bja?window.addEventListener("deviceorientation",this.YT):window.addEventListener("devicemotion",this.XT)}function m(n){this.A9a=n;this.N4=new b.Quaternion;this.kM=null;this.HCa=new b.Quaternion;this.bU=new b.Quaternion}function k(n,q){this.set(n,q)}var c=a("pB"),h=a("cI"),f=a("gF");a("w");var b=a("ox"),e=new f;d.prototype.q3a=
function(n,q){this.dia.set(n,q)};d.prototype.y3a=function(n,q){this.w2.set(n,q);g.f8a(q-this.Eka.K5)&&this.m$a();this.Eka.copy(this.w2)};d.prototype.m$a=function(){if(this.hFa){var n=this.T6a(this.w2.sample,this.w2.K5-this.Eka.K5);this.S6a.multiply(n);this.aG.copy(this.Dka);this.aG.multiply(n);n=new b.Quaternion;n.copy(this.aG);n.inverse();this.G2.set(0,0,-1);this.G2.applyQuaternion(n);this.G2.normalize();this.Nja.copy(this.dia.sample);this.Nja.normalize();n=new b.Quaternion;n.setFromUnitVectors(this.G2,
this.Nja);n.inverse();var q=new b.Quaternion;q.copy(this.aG);q.multiply(n);this.aG.slerp(q,1-this.i8a);this.Dka.copy(this.aG)}else this.sBa=this.p3a(this.dia.sample),this.Dka.copy(this.sBa),this.hFa=!0};d.prototype.$r=function(){return this.aG};d.prototype.p3a=function(n){var q=new b.Vector3;q.copy(n);q.normalize();n=new b.Quaternion;n.setFromUnitVectors(new b.Vector3(0,0,-1),q);n.inverse();return n};d.prototype.T6a=function(n,q){var p=new b.Quaternion,r=new b.Vector3;r.copy(n);r.normalize();p.setFromAxisAngle(r,
n.length()*q);return p};l.prototype.stop=function(){screen&&screen.orientation&&screen.orientation.addEventListener&&screen.orientation.removeEventListener("change",this.yG);window.removeEventListener("orientationchange",this.yG);window.removeEventListener("deviceorientation",this.YT);window.removeEventListener("devicemotion",this.XT)};l.prototype.ll=function(){return null};l.prototype.$r=function(){var n=void 0;if(this.Bja&&this.tX){this.JCa=this.JCa||function(){var p=(new b.Quaternion).setFromAxisAngle(new b.Vector3(0,
0,-1),0),r=new b.Quaternion;"landscape-secondary"==this.n0?r.setFromAxisAngle(new b.Vector3(0,1,0),Math.PI/-2):r.setFromAxisAngle(new b.Vector3(0,1,0),Math.PI/2);return p.multiply(r)}();this.ICa=this.ICa||function(){var p=new b.Quaternion;p.setFromAxisAngle(new b.Vector3(1,0,0),-Math.PI/2);return p}();n=this.tX;var q=new b.Quaternion;q.copy(n);q.multiply(this.ICa);q.multiply(this.Tu);q.multiply(this.MM);q.multiplyQuaternions(this.JCa,q);this.Web&&(q.x=0,q.z=0,q.normalize());this.D4[0]=q.x;this.D4[1]=
q.y;this.D4[2]=q.z;this.D4[3]=q.w;return this.D4}n=this.filter.$r();n=this.z9a.C6a(n,this.q3,this.kM);q=new b.Quaternion;q.copy(this.L2);q.multiply(this.Tu);q.multiply(n);q.multiply(this.MM);return q};l.prototype.resetPose=function(){this.Tu.copy(this.filter.$r());this.Tu.x=0;this.Tu.y=0;this.Tu.z*=-1;this.Tu.normalize();g.fFa()&&this.Tu.multiply(this.D3);this.Tu.multiply(this.bHa)};l.prototype.YT=function(n){this.tX=this.tX||new b.Quaternion;var q=n.alpha,p=n.beta;n=n.gamma;q=(q||0)*Math.PI/180;
p=(p||0)*Math.PI/180;n=(n||0)*Math.PI/180;this.tX.QIa(p,q,-n)};l.prototype.XT=function(n){var q=n.rotationRate;if(q){var p=n.accelerationIncludingGravity;n=n.timeStamp/1E3;this.GL&&(n/=1E3);var r=n-this.kM;r<=g.ona||r>g.kna?this.kM=n:(this.qS.set(-p.x,-p.y,-p.z),this.q3.set(q.alpha,q.beta,q.gamma),(this.Bp||this.GL||this.K7a)&&this.q3.multiplyScalar(Math.PI/180),this.filter.q3a(this.qS,n),this.filter.y3a(this.q3,n),this.kM=n,this.XFa||(this.WFa++,5<=this.WFa&&(this.XFa=!0,e.trigger(new h(c.jd)))),
this.n0!=this.CDa()&&this.yG(),e.trigger(new h(c.ba)))}else this.Bja=!0,window.addEventListener("deviceorientation",this.YT),window.removeEventListener("devicemotion",this.XT)};l.prototype.bind=function(){e.bind.apply(e,arguments)};l.prototype.unbind=function(){e.unbind.apply(e,arguments)};l.prototype.yG=function(){this.pJa();e.trigger(new h(c.ba))};l.prototype.pJa=function(){this.MM.set(0,0,0,1);this.n0=this.CDa();switch(this.n0){case "landscape-primary":this.MM.setFromAxisAngle(new b.Vector3(0,
0,1),-Math.PI/2);break;case "landscape-secondary":this.MM.setFromAxisAngle(new b.Vector3(0,0,1),Math.PI/2)}this.D3.copy(this.MM);this.D3.inverse()};l.prototype.CDa=function(){var n=screen.orientation&&screen.orientation.type;if(!n)switch(window.orientation){case 0:n="portrait-primary";break;case 90:n="landscape-primary";break;case -90:n="landscape-secondary";break;case 180:n="portrait-secondary"}"landscape-primary"==n&&(4.9<this.qS.z||-4.9>this.qS.z?n=this.n0||n:0<this.qS.x&&(n="landscape-secondary"));
return n};m.prototype.C6a=function(n,q,p){if(!this.kM)return this.N4.copy(n),this.kM=p,n;p=new b.Vector3;p.copy(q);p.normalize();q=q.length();if(q<20*b.degToRad)return this.bU.copy(n),this.N4.copy(n),this.bU;this.HCa.setFromAxisAngle(p,q*this.A9a);this.bU.copy(this.N4);this.bU.multiply(this.HCa);this.N4.copy(n);return this.bU};k.prototype.set=function(n,q){this.sample=n;this.K5=q};k.prototype.copy=function(n){this.set(n.sample,n.K5)};var g={ona:.001,kna:1,f8a:function(n){return isNaN(n)||n<=g.ona||
n>g.kna?!1:!0}};g.Bp=function(){var n=/iPad|iPhone|iPod/.test(navigator.platform);return function(){return n}}();g.Heb=function(){var n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return function(){return n}}();g.GL=function(){var n=-1!==navigator.userAgent.indexOf("Firefox")&&-1!==navigator.userAgent.indexOf("Android");return function(){return n}}();g.Iia=function(){var n=navigator.userAgent.match(/.*Chrome\/([0-9]+)/),q=n?parseInt(n[1],10):null;return function(){return q}}();g.L7a=
function(){var n=!1;if(65===g.Iia()){var q=navigator.userAgent.match(/.*Chrome\/([0-9\.]*)/);if(q){q=q[1].split(".");var p=q[3];n=3325===parseInt(q[2],10)&&148>parseInt(p,10)}}return function(){return n}}();g.fFa=function(){return 90==window.orientation||-90==window.orientation};return l});
define("ij","require lV pB cI gF ok w fG jy mV".split(" "),function(a){function d(){function w(){q=!0;g.trigger(new m(l.ba))}function x(){var A;!F||!y&&B?B&&(A=z):A=D;p!=A&&(p&&(p.unbind(l.ba,w),p.stop()),p=A)&&(p.bind(l.ba,w,this,!0),w())}var y=h.zd()==h.yi||e.Fj("debug")&&"deviceorientation"==e.getQueryParameter("sensor"),z=new b,B=!1;z.bind(l.jd,function(){B=!0;x()},this,!0);var D=new f,F=!1;D.bind(l.jd,function(){F=!0;x()},this,!0)}a("lV");var l=a("pB"),m=a("cI"),k=a("gF"),c=a("ok"),h=a("w"),
f=a("fG"),b=a("jy"),e=a("mV"),g=new k,n={},q=!1,p,r=[],t=!1,u=!1;n.Pka=function(w){w&&r.push(w);if(!n.disabled)for(;r.length;)r.pop()();else if(h.zd()==h.yi&&window.DeviceMotionEvent&&DeviceMotionEvent.requestPermission){DeviceOrientationEvent.requestPermission().then(function(y){"granted"===y&&(u=!0,x())})["catch"](function(){});DeviceMotionEvent.requestPermission().then(function(y){"granted"===y&&(t=!0,x())})["catch"](function(){});var x=function(){if(n.disabled&&t&&u)for(n.disabled=!1,d();r.length;)r.pop()()};
x()}};n.bind=function(w,x){g.bind(l.ba,w,x)};n.unbind=function(w,x){g.unbind(l.ba,w,x)};n.i9a=function(){return q};n.$r=function(){q=!1;if(p){var w=p.$r();w=c.L5(w);return{yaw:w.Ra,pitch:w.pitch,roll:w.Fg}}return{yaw:0,pitch:0,roll:0}};if(h.zd()==h.U7||h.zd()==h.o7||h.zd()==h.hna||h.Ef())n.kk=!1,n.disabled=!1;else if(h.zd()==h.Vy&&h.browser()==h.po&&"https:"!=window.location.protocol&&"localhost"!=window.location.hostname)n.kk=!0,n.disabled=!0;else if(h.zd()==h.yi)if(n.kk=!0,n.disabled=!0,window.DeviceMotionEvent&&
DeviceMotionEvent.requestPermission)n.Pka();else{var v=function(){window.removeEventListener("deviceorientation",v,!1);n.disabled=!1;d()};window.addEventListener("deviceorientation",v,!1)}else n.kk=void 0!=window.DeviceMotionEvent,n.disabled=!1;n.kk&&!n.disabled&&d();return n});
define("cF",["require","exports","mV"],function(a,d,l){d=function(){function k(){this.S3=null;this.i2=[]}k.prototype.initialize=function(c){this.S3=l.Ny(c);this.oV=this.oV.bind(this);this.update()};k.prototype.load=function(c,h){this.i2.push({call:c,context:h||window});this.SL||(this.SL=this.M2());this.update()};k.prototype.Mh=function(){return void 0!==this.SL};k.prototype.update=function(){0<this.i2.length&&(void 0!==this.SL?this.d5a():this.S3&&this.Gja())};k.prototype.oV=function(){var c=this.M2();
void 0===c?setTimeout(this.oV,250):(this.SL=c,this.update())};k.prototype.Gja=function(){throw Error("Method not implemented.");};k.prototype.M2=function(){throw Error("Method not implemented.");};k.prototype.d5a=function(){for(;0<this.i2.length;){var c=this.i2.pop();c.call.call(c.context,this.SL)}};return k}();a=function(k){function c(h){var f=k.call(this)||this;f.xFa=h;return f}Z(c,k);c.prototype.Gja=function(){this.W4||(this.W4=document.createElement("script"),this.W4.type="text/javascript",this.W4.src=
this.S3,document.getElementsByTagName("head")[0].appendChild(this.W4),this.oV())};c.prototype.M2=function(){for(var h=window,f=0;f<this.xFa.length&&void 0!==h;f++)h=h[this.xFa[f]];return h};return c}(d);d=function(k){function c(h){var f=k.call(this)||this;f.namespace=h;return f}Z(c,k);c.prototype.Gja=function(){this.module||(c.E7a(),this.module=document.createElement("script"),this.module.type="module",this.module.textContent=['import * as all from "'+this.S3+'";',"window."+this.namespace.join(".")+
" = all;"].join("\n"),document.getElementsByTagName("head")[0].appendChild(this.module),this.oV())};c.prototype.M2=function(){for(var h=window,f=0;f<this.namespace.length&&void 0!==h;f++)h=h[this.namespace[f]];return h};c.E7a=function(){this.w3||(this.w3=document.createElement("script"),this.w3.type="importmap",this.w3.textContent=['{\n"imports":\n{','"three": "'+this.T4a()+'"',"}\n}"].join("\n"),document.getElementsByTagName("head")[0].appendChild(this.w3))};c.T4a=function(){var h=[];h.push("const three = window.THREE;");
for(var f in window.THREE)h.push("export const "+f+" = three."+f+";");return window.URL.createObjectURL(new Blob([h.join("\n")],{type:"application/javascript"}))};return c}(d);var m={};m.GS=new d(["TDV","GS"]);m.xNa=new a(["WebVRConfig","FORCE_ENABLE_VR"]);m.woa=new a(["WebXRPolyfill"]);m.HLS=new a(["Hls"]);m.initialize=function(k){this.HLS.initialize(k.get(TDV.PlayerSettings.HLS_URL));this.xNa.initialize(k.get(TDV.PlayerSettings.WEBVR_POLYFILL_URL));this.woa.initialize(k.get(TDV.PlayerSettings.WEBXR_POLYFILL_URL));
this.GS.initialize(k.get(TDV.PlayerSettings.GS_URL))};return m});
define("bh","require exports w mq ij cF mV".split(" "),function(a,d,l,m,k,c,h){return function(){function f(){}f.initialize=function(b){this.XR.X4?(this.Gla(!0),b()):(this.nja||(this.nja=this.kcb().then(function(e){this.Gla(e);return e}.bind(this)).catch(function(){this.Gla(!1);return!1}.bind(this))),this.nja.then(function(){b()}))};f.Gla=function(b){this.XR.LM=b;this.XR.fdb=b&&(l.Ef()||!l.pb());b&&m.tbb()};f.kcb=function(){return this.mcb().then(function(b){return b?Promise.resolve(!0):this.ncb()}.bind(this))};
f.mcb=function(){return navigator.xr&&"cardboard"!=h.getQueryParameter("vr_mode")?this.ocb():Promise.resolve(!1)};f.ncb=function(){return this.Z3a()?this.P3a():Promise.resolve(!1)};f.ocb=function(){return navigator.xr&&navigator.xr.isSessionSupported?navigator.xr.isSessionSupported("immersive-vr"):navigator.xr&&navigator.xr.supportsSession?navigator.xr.supportsSession("immersive-vr"):Promise.reject()};f.Z3a=function(){return k.kk&&l.pb()&&l.Cj()!=l.SM&&this.$3a()};f.$3a=function(){return l.Cj()==
l.AV?this.g8a():!0};f.g8a=function(){try{return window.self===window.top}catch(b){return!1}};f.P3a=function(){var b=this;return new Promise(function(e){c.woa.load(function(){var g;b.x9a=new window.WebXRPolyfill({overwriteNativeXR:!0,cardboardConfig:{DPDB_URL:"https://raw.githubusercontent.com/immersive-web/webvr-polyfill-dpdb/refs/heads/main/dpdb.json",BUFFER_SCALE:null===(g=b.XR)||void 0===g?void 0:g.M4,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!0,MOBILE_WAKE_LOCK:!1}});b.XR.LL=!0;e(!0)})})};
f.nja=null;f.x9a=null;return f}()});define("three.mod",["require","exports"],function(){var a=window.THREE,d=new TDV.PlayerSettings;a.Gma=d.get(TDV.PlayerSettings.f6);a.Oma=d.get(TDV.PlayerSettings.w6);a.wz=d.get(TDV.PlayerSettings.wz);return a});
define("qd",["require","exports","pB","three.mod"],function(a,d,l,m){var k=function(){function r(){}r.initialize=function(){this.XR.Aj=new m.Group;this.XR.Aj.matrixAutoUpdate=!1;this.XR.Yn=new m.Group;this.XR.Yn.matrixAutoUpdate=!1;this.XR.Aj.add(this.XR.Yn);this.XR.N.bind(l.tV,this.MB,this,!0);this.XR.N.bind(l.ba,this.ze,this,!0)};r.setScale=function(t){this.hg!==t&&(this.hg=t,this.XR.Am=1/t,this.setPosition({x:this.XR.Ec.x,y:this.XR.Ec.y,z:this.XR.Ec.z,Ra:-b.setFromQuaternion(this.XR.dg,"YXZ").y*
p}))};r.qM=function(t){var u,v;this.W3(this.pC,h);this.W3(n.copy(this.pC).premultiply(this.XR.Aj.matrixWorld),c);var w=this.XR.Aj.matrix;w.identity();w.multiply(n.makeRotationY(void 0===t?c.yaw:-t*q));w.multiply(n.makeRotationY(-h.yaw));w.multiply(n.makeScale(this.XR.Am,this.XR.Am,this.XR.Am));w.multiply(n.makeTranslation(-h.x,-h.y,-h.z));void 0!==t&&(w=this.XR.Yn.matrix,w.identity(),w.multiply(n.makeTranslation(h.x,h.y,h.z)),w.multiply(n.makeRotationY(-h.yaw*q)));this.XR.Aj.updateMatrixWorld(!0);
null===(u=this.camera)||void 0===u?void 0:u.updateMatrixWorld(!0);null===(v=this.tk)||void 0===v?void 0:v.updateMatrixWorld(!0);this.zma()};r.setPosition=function(t){var u,v;this.W3(this.pC,h);this.W3(n.copy(this.pC).premultiply(this.XR.Aj.matrixWorld),c);var w=this.XR.Aj.matrix;w.identity();w.multiply(n.makeTranslation(void 0===t.x?c.x:t.x,void 0===t.y?c.y:t.y,void 0===t.z?c.z:t.z));w.multiply(n.makeRotationY(void 0===t.yaw?c.yaw:-t.yaw*q));w.multiply(n.makeRotationX(void 0===t.pitch?c.pitch:t.pitch*
q));w.multiply(n.makeRotationZ(void 0===t.roll?c.roll:t.roll*q));w.multiply(n.makeRotationZ(-h.roll));w.multiply(n.makeRotationX(-h.pitch));w.multiply(n.makeRotationY(-h.yaw));w.multiply(n.makeScale(this.XR.Am,this.XR.Am,this.XR.Am));w.multiply(n.makeTranslation(-h.x,-h.y,-h.z));if(void 0!==t.yaw||void 0!==t.pitch||void 0!==t.roll)w=this.XR.Yn.matrix,w.identity(),w.multiply(n.makeTranslation(h.x,h.y,h.z)),w.multiply(n.makeRotationY(-h.yaw*q)),w.multiply(n.makeRotationX(h.pitch*q)),w.multiply(n.makeRotationX(h.roll*
q));this.XR.Aj.updateMatrixWorld(!0);null===(u=this.camera)||void 0===u?void 0:u.updateMatrixWorld(!0);null===(v=this.tk)||void 0===v?void 0:v.updateMatrixWorld(!0);this.zma()};r.MB=function(){var t,u,v,w;this.Xu(this.XR.WB);this.BJa((null===(t=this.XR.nh)||void 0===t?void 0:t.xr.getCamera())||null);this.setCamera(this.XR.Ru);if(u=(u=(t=null===(u=this.XR.nh)||void 0===u?void 0:u.xr.getFrame())&&this.XR.referenceSpace&&t.getViewerPose(this.XR.referenceSpace))&&u.transform)this.XR.aCa=u.position.y,
this.pC.fromArray(u.matrix),this.pC.decompose(this.XR.bdb,this.XR.nH,g),null===(v=this.camera)||void 0===v?void 0:v.updateMatrixWorld(!0),null===(w=this.tk)||void 0===w?void 0:w.updateMatrixWorld(!0),this.zma()};r.ze=function(){this.XR.isPresenting?this.scene&&this.camera&&(this.XR.WB!=this.scene||this.XR.Ru!=this.camera)&&(this.Xu(this.XR.WB),this.setCamera(this.XR.Ru),this.XR.nh.xr.updateCamera(this.XR.Ru),this.setPosition({x:this.XR.Ec.x,y:this.XR.Ec.y,z:this.XR.Ec.z,Ra:-b.setFromQuaternion(this.XR.dg,
"YXZ").y*p})):(this.Xu(null),this.BJa(null),this.setCamera(null))};r.zma=function(){n.copy(this.pC).premultiply(this.XR.Aj.matrixWorld).decompose(this.XR.Ec,this.XR.dg,g);b.setFromRotationMatrix(this.XR.Yn.matrix,"YXZ");e.setFromMatrixPosition(this.pC);this.XR.Yn.matrix.identity();this.XR.Yn.matrix.multiply(n.makeTranslation(e.x,e.y,e.z));this.XR.Yn.matrix.multiply(n.makeRotationFromEuler(b));this.XR.Yn.updateMatrixWorld(!0)};r.Xu=function(t){this.scene!==t&&(this.scene&&this.scene.remove(this.XR.Aj),
null==t&&(this.dIa(),this.fIa()),(this.scene=t)&&this.scene.add(this.XR.Aj))};r.setCamera=function(t){this.camera!==t&&(this.dIa(),(this.camera=t)&&this.XR.Aj.add(this.camera))};r.BJa=function(t){this.tk!==t&&(this.fIa(),(this.tk=t)&&this.XR.Aj.add(this.tk))};r.dIa=function(){this.scene&&this.camera&&this.camera.parent===this.XR.Aj&&(this.scene.add(this.camera),this.camera=null)};r.fIa=function(){this.tk&&this.tk.parent===this.XR.Aj&&(this.tk.parent.remove(this.tk),this.tk=null)};r.W3=function(t,
u){t.decompose(e,f,g);b.setFromQuaternion(f,"YXZ");u.yaw=b.y;u.pitch=b.x;u.roll=b.z;u.x=e.x;u.y=e.y;u.z=e.z};r.pC=new m.Matrix4;r.hg=1;r.scene=null;r.camera=null;r.tk=null;return r}(),c={x:void 0,y:void 0,z:void 0,Ra:void 0},h={x:void 0,y:void 0,z:void 0,Ra:void 0},f=new m.Quaternion,b=new m.Euler,e=new m.Vector3,g=new m.Vector3,n=new m.Matrix4,q=Math.PI/180,p=180/Math.PI;window.Sm=function(r){k.setPosition({x:void 0,y:void 0,z:void 0,Ra:r})};return k});
define("n",["require","exports"],function(){return{BH:"gaze",bN:"laser"}});
define("jo",["require","exports","pB"],function(a,d,l){return function(){function m(){}m.fab=function(k,c,h){var f=this.XR.Pm.indexOf(k);-1<f&&f!==this.XR.Pm.length-1&&(this.XR.Pm.splice(f,1),this.XR.Pm.splice(this.XR.Pm.length,0,k));this.XR.Nka.set(k,c);this.XR.Mka.set(k,h);k!==this.XR.nh||this.XR.WB===c&&this.XR.Ru===h||(this.XR.WB=c,this.XR.Ru=h,this.XR.N.trigger(l.ba))};m.add=function(k){this.remove(k);this.XR.Pm.push(k)};m.remove=function(k){var c=this.XR.Pm.indexOf(k);-1!=c&&(this.XR.Pm.splice(c,
1),this.XR.Nka.delete(k),this.XR.Mka.delete(k))};return m}()});define("iR",["require","exports"],function(){return{A7:"Panorama",pna:"Model3D"}});define("jG",["require","exports"],function(){return{BH:"gaze",iMa:"gaze_click"}});define("F",["require","exports"],function(){return{zl:"Cardboard",Vdb:"WebVR",yNa:"WebXR"}});
define("nM",["require","exports","pB","ni","hC"],function(a,d,l,m,k){return function(){function c(){}c.initialize=function(){this.ze=this.ze.bind(this);this.B4=this.B4.bind(this);this.XR.N.bind(l.ba,this.ze,this,!0);window.addEventListener("vrdisplayblur",function(){k.Pla(!0)},!0);window.addEventListener("vrdisplayfocus",function(){k.Pla(!1)},!0)};c.ze=function(){this.XR.session?(this.rC=this.XR.session,this.rC.addEventListener("visibilitychange",this.B4)):(this.rC&&this.rC.removeEventListener("visibilitychange",
this.B4),this.rC=null);k.Gy(this.XR.isPresenting)};c.B4=function(){k.Pla(!this.rC||"visible"!=this.rC.visibilityState);m.$La&&"visible"!=this.rC.visibilityState&&this.XR.xia()};c.rC=null;return c}()});
define("dC",["require","exports","w","mV"],function(a,d,l,m){return function(){function k(){}k.initialize=function(){this.CB=-1<[l.Gs,l.Hs].indexOf(l.jc());this.dLa=m.Fj("vr");if(this.CB||this.dLa)this.LKa(),document.addEventListener("visibilitychange",function(){document.hidden||this.LKa()}.bind(this),!1)};k.LKa=function(){this.t4a();this.Eha=0;this.$Ja()};k.$Ja=function(){this.Eha++;this.J5=setTimeout(this.f9a.bind(this),this.dLa?500:1E3*this.Eha)};k.t4a=function(){this.J5&&(clearTimeout(this.J5),
this.J5=null)};k.f9a=function(){this.J5=null;this.CB&&5<this.Eha?window.location.reload():document.hidden||k.XR.isPresenting||(!this.TS()||this.CB)&&this.$Ja()};k.TS=function(){if(!this.XR.dU)return!1;for(var c=this.XR.dU.Xi("PanoramaPlayer"),h=0;h<c.length;h++){var f=c[h];if(f.get("panorama"))return f.get("viewerArea").set("viewMode","vr"),!0}c=this.XR.dU.Xi("Model3DPlayer");for(h=0;h<c.length;h++)if(f=c[h],f.get("model")&&f.get("model").get("isLoaded"))return f.get("viewerArea").set("viewMode",
"vr"),!0;return!1};return k}()});
define("oq",["require","exports","three.mod"],function(a,d,l){return function(){function m(){}m.o$a=function(k,c){if(m.lFa(k)){var h=m.ks(k),f,b=256;c.forEach(function(e){if(m.lFa(e)){var g=m.gIa(h,m.ks(e));g<b&&(f=e,b=g)}});if(f&&5>=b)return f}return k};m.c3=function(k,c){return m.gIa(m.ks(k),m.ks(c))};m.lFa=function(k){return!!k&&0===k.indexOf("#")};m.ks=function(k){return[parseInt(k.substr(1,2),16),parseInt(k.substr(3,2),16),parseInt(k.substr(5,2),16)]};m.gIa=function(k,c){return Math.max(Math.abs(k[0]-
c[0]),Math.abs(k[1]-c[1]),Math.abs(k[2]-c[2]))};m.scb=function(k){k=m.ks(k);return k[0]<<16|k[1]<<8|k[2]<<0};m.Qp=function(k){return new l.Color(m.scb(k))};return m}()});
define("ga",["require","exports","oq","three.mod"],function(a,d,l,m){a=function(){function f(b,e){this.dot=this.ray=this.qa=null;this.qa=new m.Group;this.ray=new k(b,e);this.qa.add(this.ray.qa);this.dot=new c(b,e);this.qa.add(this.dot.qa)}f.prototype.update=function(){this.ray.update();this.dot.update()};f.prototype.dispose=function(){var b;this.qa&&(this.ray.dispose(),this.ray=null,this.dot.dispose(),this.dot=null,null===(b=this.qa.parent)||void 0===b?void 0:b.remove(this.qa),this.qa=null)};return f}();
var k=function(){function f(b,e){this.Fp=this.material=this.qa=null;this.color="#ffffff";this.rc=b;this.yl=e;this.Kla();this.qa=new m.Mesh(new m.CylinderGeometry(5E-4,5E-4,.35,8),this.material);this.qa.renderOrder=999;this.qa.position.z=-.175;this.qa.position.y=-.001;this.qa.rotation.copy(new m.Euler(-Math.PI/2,0,0,"YXZ"));this.qa.updateMatrix()}f.prototype.update=function(){this.gV();this.yma()};f.prototype.dispose=function(){var b;this.qa&&(this.qa.geometry.dispose(),this.cma(),null===(b=this.qa.parent)||
void 0===b?void 0:b.remove(this.qa),this.qa=null)};f.prototype.Kla=function(){if(!this.material){var b=document.createElement("canvas");b.width=b.height=256;this.Fp=b.getContext("2d");this.material=new m.MeshBasicMaterial;this.material.map=new m.Texture(b);this.material.map.colorSpace=m.SRGBColorSpace;this.material.transparent=!0;this.gV()}};f.prototype.cma=function(){var b,e;if(this.material){var g=null===(b=this.material.map)||void 0===b?void 0:b.image;g.width=g.height=1;null===(e=this.material.map)||
void 0===e?void 0:e.dispose();this.material.map=null;this.material.dispose();this.Fp=this.material=null}};f.prototype.gV=function(){var b=this.wL();if(this.color!==b){this.color=b;b=l.ks(this.color).join(", ");var e=this.material.map.image,g=this.Fp.createLinearGradient(0,0,0,e.height);g.addColorStop(0,"rgba("+b+", 0)");g.addColorStop(.5,"rgba("+b+", 1)");g.addColorStop(1,"rgba("+b+", 1)");this.Fp.fillStyle=g;this.Fp.clearRect(0,0,e.width,e.height);this.Fp.fillRect(0,0,e.width,e.height);this.material.map.needsUpdate=
!0;this.material.needsUpdate=!0}};f.prototype.yma=function(){this.qa.visible=!this.rc.disabled&&!this.rc.hidden};f.prototype.wL=function(){return this.rc.pressed?this.yl.L4:this.rc.bM?this.yl.xka:this.yl.J4};return f}(),c=function(){function f(b,e){this.Fp=this.ku=this.material=this.border=this.dot=this.qa=null;this.color="#ffffff";this.rc=b;this.yl=e;this.fbb();this.Kla();this.qa=new m.Group;this.qa.renderOrder=999;this.border=new m.Mesh(new m.SphereGeometry(.0046,32,32),this.ku);this.dot=new m.Mesh(new m.SphereGeometry(.004,
32,32),this.material);this.qa.add(this.dot);this.qa.add(this.border);this.SKa()}f.prototype.update=function(){this.gV();this.SKa();this.yma()};f.prototype.dispose=function(){var b;this.qa&&(this.qa.remove(this.dot),this.dot.geometry.dispose(),this.cma(),this.qa.remove(this.border),this.border.geometry.dispose(),this.dcb(),null===(b=this.qa.parent)||void 0===b?void 0:b.remove(this.qa),this.qa=null)};f.prototype.fbb=function(){if(!this.ku){var b=document.createElement("canvas");b.width=b.height=256;
var e=b.getContext("2d");e.fillStyle="rgba(0, 0, 0, 0.75)";e.clearRect(0,0,b.width,b.height);e.fillRect(0,0,b.width,b.height);e=new m.MeshBasicMaterial;e.map=new m.Texture(b);e.map.colorSpace=m.SRGBColorSpace;e.map.needsUpdate=!0;e.transparent=!0;e.depthTest=!1;e.side=m.BackSide;this.ku=e;this.ku.needsUpdate=!0}};f.prototype.dcb=function(){var b,e;if(this.ku){var g=null===(b=this.ku.map)||void 0===b?void 0:b.image;g.width=g.height=1;null===(e=this.ku.map)||void 0===e?void 0:e.dispose();this.ku.map=
null;this.ku.dispose();this.ku=null}};f.prototype.Kla=function(){if(!this.material){var b=document.createElement("canvas");b.width=b.height=256;this.Fp=b.getContext("2d");var e=new m.MeshBasicMaterial;e.map=new m.Texture(b);e.map.colorSpace=m.SRGBColorSpace;e.transparent=!0;e.depthTest=!1;this.material=e;this.gV()}};f.prototype.cma=function(){var b,e;if(this.material){var g=null===(b=this.material.map)||void 0===b?void 0:b.image;g.width=g.height=1;null===(e=this.material.map)||void 0===e?void 0:e.dispose();
this.material.map=null;this.material.dispose();this.Fp=this.material=null}};f.prototype.yma=function(){this.qa.visible=!this.rc.hidden&&!this.rc.disabled&&void 0!==this.rc.Gu};f.prototype.SKa=function(){var b,e=this.qa.parent?h.setFromMatrixScale(null===(b=this.qa)||void 0===b?void 0:b.parent.matrixWorld).x:1;b=(this.rc.Gu||500)/e;this.qa.position.z=-b;this.qa.scale.set(b,b,b);this.qa.updateMatrix()};f.prototype.gV=function(){var b=this.wL();this.color!==b&&(this.color=b,b=this.material.map.image,
this.Fp.fillStyle=this.color,this.Fp.clearRect(0,0,b.width,b.height),this.Fp.fillRect(0,0,b.width,b.height),this.material.map.needsUpdate=!0,this.material.needsUpdate=!0)};f.prototype.wL=function(){return this.rc.pressed?this.yl.L4:this.rc.bM?this.yl.xka:this.yl.J4};return f}();new m.Matrix4;var h=new m.Vector3;return a});
define("jz",["require","exports","three.mod"],function(a,d,l){return function(){function m(){this.id=0;this.ray=new l.Ray;this.matrixWorld=new l.Matrix4;this.disabled=!1;this.handedness="";this.wi=this.bM=!1;this.jHa=0;this.Gu=void 0;this.hidden=this.Nr=this.pressed=!1;this.Xb=new l.Vector2;this.jH=!1;this.id=m.ST++}m.ST=0;return m}()});
define("hQ","require exports pB w ga jz mV three.mod".split(" "),function(a,d,l,m,k,c,h,f){var b=[0,1],e="trigger grip unknown0 thumbstick buttonA buttonB pico".split(" ");a=function(){function g(){}g.initialize=function(){this.XR.N.bind(l.ba,this.ze.bind(this),this,!0);this.XR.N.bind(l.Vh,this.NB.bind(this),this,!0);this.uy=this.uy.bind(this);this.ty=this.ty.bind(this);this.j4=this.j4.bind(this);this.n4=this.n4.bind(this);this.l4=this.l4.bind(this);this.Fha=h.getQueryParameter("backURL")};g.sb=function(n){this.enabled=
n};g.isConnected=function(){return this.dL.some(function(n){return n})};g.gJa=function(n){var q;if(0<this.Nh.length!==n)if(n){var p=new f.DirectionalLight(16777215,Math.PI);p.position.set(10,20,0);null===(q=this.Om)||void 0===q?void 0:q.add(p);this.Nh.push(p)}else for(;this.Nh.length;)q=this.Nh.pop(),null===(p=this.Om)||void 0===p?void 0:p.remove(q)};g.uJa=function(n){this.P5!==n&&((this.P5=n)?this.pu.forEach(this.VFa.bind(this)):this.pu.forEach(this.eIa.bind(this)))};g.s$a=function(n,q){n=this.z6a(n);
-1!=n&&(n=this.q2[n])&&n.hapticActuators&&n.hapticActuators.length&&(n=n.hapticActuators[0],n.pulse&&n.pulse(.6,q))};g.ze=function(){this.XR.isPresenting?this.$a():this.Ca()};g.$a=function(){b.forEach(function(n){this.hbb(n);this.ibb(n)}.bind(this))};g.Ca=function(){b.forEach(function(n){this.hcb(n);this.gcb(n);this.fcb(n)}.bind(this))};g.NB=function(){this.Hab(this.enabled&&this.XR.Aj||null);this.vma();this.Ccb()};g.vma=function(){if(this.enabled){for(;this.XR.og.length;)this.XR.og.pop();b.forEach(function(n){var q=
this.controllers[n];if(q&&this.dL[n]){var p=this.SF[n];this.Dcb(n);p.matrixWorld.copy(q.matrixWorld);p.ray.origin.set(0,0,0);p.ray.direction.set(0,0,-1);n=(n=(n=this.pu[n].motionController)&&n.components["xr-standard-thumbstick"])&&n.values;p.jH=n&&"pressed"==n.state||!1;p.Xb.set(n&&n.xAxis||0,n&&n.yAxis||0);this.XR.og.push(p)}}.bind(this))}};g.Ccb=function(){this.enabled&&b.forEach(function(n){n=this.IS[n];null===n||void 0===n?void 0:n.update()}.bind(this))};g.obb=function(){if(!this.via){var n=
this.XR.nh,q=n.xr.enabled;n.Bm=!0;n.xr.enabled=!1;var p=new f.RoomEnvironment(n);this.via=(new f.PMREMGenerator(n)).fromScene(p).texture;n.Bm=!1;n.xr.enabled=q}};g.hbb=function(n){var q=this.XR.nh.xr.getController(n);this.controllers[n]!=q&&(q.addEventListener("selectstart",this.uy),q.addEventListener("selectend",this.ty),q.addEventListener("connected",this.j4),q.addEventListener("disconnected",this.n4),q.userData.f4=!0,this.controllers[n]=q,this.SF[n]=new c,this.Yha[n]=0)};g.fcb=function(n){var q=
this.controllers[n];q&&(q.removeEventListener("selectstart",this.uy),q.removeEventListener("selectend",this.ty),q.removeEventListener("connected",this.j4),q.removeEventListener("disconnected",this.n4),this.controllers[n]=null)};g.ibb=function(n){if(!this.RF[n]){var q=this.XR.nh.xr.getControllerGrip(n);q.userData.f4=!0;this.s2||(this.s2=new f.XRControllerModelFactory);this.s2.path=f.wz.endsWith("/")?f.wz.slice(0,-1):f.wz;var p=this.s2.createControllerModel(q,this.ldb);p.addEventListener("loaded",this.l4);
this.pu[n]=p;q.add(p);this.RF[n]=q}};g.ldb=function(n){n=Array.from(n.profiles);if(m.pG())n=["meta-quest-touch-plus"].concat(n);else if(m.ML())n=["oculus-touch-v3"].concat(n);else if(m.jFa())n=["generic-trigger"].concat(n);else if(m.kFa()||0<=n.indexOf("pico-phoenix")||0<=n.indexOf("pico-4"))n=["pico-4"].concat(n);else if(m.pFa()||0<=n.indexOf("htc-vive-focus-3")||0<=n.indexOf("htc-vive-focus-3-plus"))n=["htc-vive-focus-3"].concat(n);else if(m.a8a()||m.T7a()||m.gFa()||0<=n.indexOf("pico-g2")||0<=
n.indexOf("pico-neo2")||0<=n.indexOf("pico-neo3"))n=["generic-trigger"].concat(n);return n};g.gcb=function(n){var q,p=this.RF[n];if(p){var r=this.pu[n];this.pu[n]=null;r.removeEventListener("loaded",this.l4);p.remove(r);this.RF[n]=null;null===(q=p.parent)||void 0===q?void 0:q.remove(p)}};g.jbb=function(n){if(!this.IS[n]){var q=new k(this.SF[n],this.XR.yl);this.IS[n]=q;this.controllers[n].add(q.qa)}};g.hcb=function(n){var q=this.IS[n];q&&(q.dispose(),this.IS[n]=null)};g.Hab=function(n){this.Om!==n&&
(this.Om=n,this.Lcb())};g.Lcb=function(){this.controllers.forEach(function(n){var q,p;n&&n.parent!=this.Om&&(null===(q=n.parent)||void 0===q?void 0:q.remove(n),null===(p=this.Om)||void 0===p?void 0:p.add(n))}.bind(this));this.RF.forEach(function(n){var q,p;n&&n.parent!=this.Om&&(null===(q=n.parent)||void 0===q?void 0:q.remove(n),null===(p=this.Om)||void 0===p?void 0:p.add(n))}.bind(this));this.Nh.forEach(function(n){var q,p;n.parent!==this.Om&&(null===(q=n.parent)||void 0===q?void 0:q.remove(n),null===
(p=this.Om)||void 0===p?void 0:p.add(n))}.bind(this))};g.uy=function(n){n=this.a3(n.target);if(this.dL[n]){var q=this.SF[n];q.pressed=!0;this.XR.N.trigger(l.rz,{pointerState:q});this.Yha[n]=Date.now()}};g.ty=function(n){n=this.a3(n.target);if(this.dL[n]){var q=this.SF[n];q.pressed=!1;this.Fha&&(this.bFa(n,"buttonB")||this.bFa(n,"pico"))?window.location.href=this.Fha:(this.XR.N.trigger(l.MH,{pointerState:q}),this.Yha[n]+300>Date.now()&&this.XR.N.trigger(l.Xf,{pointerState:q}))}};g.j4=function(n){var q,
p;if("gaze"!=n.data.targetRayMode){var r=this.a3(n.target);this.jbb(r);null===(q=this.Om)||void 0===q?void 0:q.add(this.controllers[r]);null===(p=this.Om)||void 0===p?void 0:p.add(this.RF[r]);this.dL[r]=!0;this.q2[r]=n.data.gamepad;this.SF[r].handedness=n.data.handedness;this.XR.N.trigger(l.Kma)}};g.uja=function(n){return n.profiles.some(function(q){return 0<=q.indexOf("hand")})};g.n4=function(n){var q,p;n=this.a3(n.target);null===(q=this.Om)||void 0===q?void 0:q.remove(this.controllers[n]);null===
(p=this.Om)||void 0===p?void 0:p.remove(this.RF[n]);this.dL[n]=!1;this.q2[n]=null;this.XR.N.trigger(l.Lma)};g.l4=function(n){var q=this.T5a(n.target);q=this.pu[q];q.userData.uja=this.uja(n.target.motionController.xrInputSource);q.userData.Mh=!0;q.userData.nFa=!1};g.kbb=function(n){n=this.pu[n];this.obb();n.setEnvironmentMap(this.via);this.P5?this.VFa(n):this.eIa(n);n.userData.nFa=!0};g.Dcb=function(n){var q=this.pu[n];q.userData.Mh&&(q.userData.nFa||this.kbb(n),n=this.SF[n],q.visible=q.userData.uja||
n.hidden?!1:!0)};g.bFa=function(n,q){q=e.indexOf(q);n=this.q2[n];if(!n)return!1;n=n.buttons.length>q?n.buttons[q]:null;return!!n&&n.pressed};g.VFa=function(n){n&&n.traverse(function(q){if("isMesh"in q&&q.material){var p=q.material;if(!p.userData.js){var r=p.userData.u8a;r||(r=p.clone(),p.userData.u8a=r,r.userData.js=p,r.transparent||(r.transparent=!0,r.opacity=1,"map"in r&&r.map&&(r.map=this.D4a(r.map)),r.needsUpdate=!0));q.material=r}void 0===q.userData.qka&&(q.userData.qka=q.renderOrder);q.renderOrder=
1E3}}.bind(this))};g.eIa=function(n){n&&n.traverse(function(q){if("isMesh"in q&&q.material){var p=q.material;p.userData.js&&(q.material=p.userData.js);void 0==q.userData.qka&&(q.renderOrder=q.userData.qka)}}.bind(this))};g.D4a=function(n){if(!n)return null;var q=document.createElement("canvas");q.width=n.image.width;q.height=n.image.height;var p=q.getContext("2d");p.drawImage(n.image,0,0);for(var r=p.getImageData(0,0,q.width,q.height),t=r.data,u=0;u<t.length;u+=4)t[u+3]=255;p.putImageData(r,0,0);
n=(new f.Texture).copy(n);n.image=q;n.needsUpdate=!0;return n};g.a3=function(n){return this.controllers.indexOf(n)};g.T5a=function(n){return this.pu.indexOf(n)};g.z6a=function(n){return this.XR.og.indexOf(n)};g.enabled=!0;g.controllers=[null,null];g.dL=[!1,!1];g.RF=[null,null];g.pu=[null,null];g.s2=null;g.IS=[null,null];g.q2=[null,null];g.Nh=[];g.P5=!1;g.SF=[];g.Yha=[];g.Om=null;g.via=null;g.Fha=null;return g}();new f.Matrix4;return a});
define("mt",["require","exports"],function(){return function(){function a(d){this.Jc=this.qt(d.J4);this.ux=this.qt(d.L4);this.Gx=this.Yk([0,0,0],0);this.B0=this.Yk([0,0,0],.125);this.RRa=this.Yk(this.Jc,1);this.SRa=this.Yk(this.ux,1);this.$Pa=this.Yk(this.ux,1);this.ZPa=this.Yk(this.Jc,.5);this.XPa=this.Yk(this.Jc,1);this.YPa=this.Yk(this.ux,1);this.Ml=this.Yg=128;this.x8=4E3;this.nra=.1;this.Nl=.16;this.ip=.04;this.lqa=this.$W=.68-this.ip;this.ZW=1-this.ip;this.T=document.createElement("canvas");
this.T.width=this.Yg;this.T.height=this.Ml;this.Da=this.T.getContext("2d");this.pd=this.Wv=!1;this.jJ=this.h_=void 0;this.lD=0}a.prototype.qt=function(d){return(d=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(d))?[parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16)]:[0,0,0]};a.prototype.Yk=function(d,l){return"rgba("+d.join(",")+", "+l+")"};a.prototype.WG=function(d,l){this.pd=d;this.h_=l};a.prototype.Fy=function(d){this.Wv=d};a.prototype.Fe=function(){return this.Yg};a.prototype.Ve=function(){return this.Ml};
a.prototype.eg=function(){return this.T};a.prototype.update=function(d){return this.Wv?this.VRa(d):this.pd?this.$Ra():this.ZRa()};a.prototype.dispose=function(){this.Da=null;this.T.width=this.T.height=1};a.prototype.qI=function(){var d;null===(d=this.Da)||void 0===d?void 0:d.clearRect(0,0,this.Yg,this.Ml)};a.prototype.ZRa=function(){if(this.jJ==a.gna)return!1;this.qI();this.tra(this.RRa,1);this.jJ=a.gna;return!0};a.prototype.$Ra=function(){if(void 0===this.h_){if(this.jJ==a.aa)return!1;this.qI();
this.tra(this.SRa,2)}else this.TXa(this.h_);this.jJ=a.aa;return!0};a.prototype.VRa=function(d){for(this.lD+=d;this.lD>this.x8;)this.lD-=this.x8;this.UPa(this.lD/this.x8);this.jJ=a.zV;return!0};a.prototype.tra=function(d,l){this.Wj(this.nra*l+this.ip,0,this.Gx,this.B0,0,2*Math.PI);this.Wj(this.nra*l,0,this.Gx,d,0,2*Math.PI)};a.prototype.aSa=function(d){this.Wj(this.$W-.5*(this.Nl+this.ip),this.Nl+this.ip,this.B0,this.Gx,0,2*Math.PI);this.Wj(this.$W-.5*this.Nl,this.Nl,this.ZPa,this.Gx,0,2*Math.PI);
this.Wj(this.$W-.5*this.Nl,this.Nl,this.$Pa,this.Gx,.5*Math.PI,(.5+2*d)*Math.PI)};a.prototype.WRa=function(d,l){this.Wj(this.lqa-.5*(this.Nl+this.ip),this.Nl+this.ip,this.B0,this.Gx,0,2*Math.PI);this.Wj(this.lqa-.5*this.Nl,this.Nl,this.XPa,this.Gx,0,2*Math.PI);d=(.5+2*d)*Math.PI;for(l=(.5+2*l)*Math.PI;l<d;)l+=2*Math.PI;var m=d-this.ip/(2*this.ZW*Math.PI),k=l+this.ip/(2*this.ZW*Math.PI);Math.abs(k-m+2*Math.PI)<2*this.ip&&(m=0,k=l);this.Wj(this.ZW-.5*(this.Nl+this.ip),this.Nl+this.ip,this.B0,this.Gx,
m,k);this.Wj(this.ZW-.5*this.Nl,this.Nl,this.YPa,this.Gx,d,l)};a.prototype.Wj=function(d,l,m,k,c,h){var f=Math.round(.5*this.Yg),b=Math.round(.5*this.Ml),e=Math.min(f,b);d=Math.round(d*e);var g=this.Da;g&&(g.imageSmoothingEnabled=!0,g.lineWidth=l*e,g.strokeStyle=m,g.fillStyle=k,g.beginPath(),g.arc(f,b,d,c,h,!1),g.stroke(),g.fill())};a.prototype.UPa=function(d){this.qI();if(.25>d){var l=d/.25;d=.5*l}else.5>d?(l=(d-.25)/.25,d=.5+l,l=1+.5*l):.75>d?(l=(d-.5)/.25,d=.5+.5*l,l=.5+l):(d=l=(d-.75)/.25,l=.5+
.5*l);this.WRa(d,l)};a.prototype.TXa=function(d){this.qI();this.aSa(d)};a.gna="initial";a.zV="changing";a.aa="over";return a}()});
define("bo",["require","exports","lV","hC","ni"],function(a,d,l,m,k){var c=window.requestAnimationFrame.bind(window),h=window.cancelAnimationFrame.bind(window),f=function(){function e(){}e.requestFrame=function(g,n,q){for(var p=0;p<e.ls.length;p++)if(e.ls[p].is(g,n))return;p=e.P3;void 0!==q&&(p+=q);e.ls.push(new b(g,n,p));e.paused||void 0!==e.Su||(e.Su=e.sU(e.U2))};e.jCa=function(g,n){for(var q=0;q<e.ls.length;q++)if(e.ls[q].is(g,n)){e.ls.splice(q,1);break}};e.QU=function(g){e.paused!=g&&(e.paused=
g,e.paused?void 0!==e.Su&&(e.Qha(e.Su),e.Su=void 0):0<e.ls.length&&(e.Su=e.sU(e.U2)))};e.oJa=function(g,n){e.sU!=g&&(void 0!==e.Su&&(e.Qha(e.Su),e.Su=g(e.U2)),e.sU=g,e.Qha=n)};e.g$a=function(){e.oJa(c,h)};e.U2=function(g){e.bDa(g);e.Su=0<e.ls.length?e.sU(e.U2):void 0};e.bDa=function(g){g<e.Ue&&(e.startTime=g-e.P3*e.i7,e.Ue=g);var n=0;void 0===e.startTime?e.startTime=g:n=Math.round((g-e.startTime)/e.i7);var q=(n-e.P3)*e.i7,p=e.ls;e.ls=[];e.x3=!0;e.P3=n;q=1<q?100>q?q:100:1;e.Ue=g;e.uDa=q;for(g=0;g<
p.length;g++){var r=p[g];n<r.SFa?e.ls.push(r):r.call(q)}e.x3=!1};e.Ue=(new Date).getTime();e.uDa=0;e.x3=!1;e.sU=c;e.Qha=h;e.ls=[];e.Su=void 0;e.paused=!1;e.i7=1E3/60;e.P3=0;e.startTime=void 0;return e}();k.mNa&&setInterval(function(){m.visible||f.bDa(f.Ue+100)},100);var b=function(){function e(g,n,q){this.SFa=0;this.yp=g;this.context=n;this.SFa=q}e.prototype.is=function(g,n){return this.yp==g&&this.context==n};e.prototype.call=function(g){try{this.yp.call(this.context,g)}catch(n){l.JT("Error in animation frame",
n)}};return e}();return f});define("ns",["require"],function(){return{Odb:"single",FRONT:"front",ab:"left",BACK:"back",ub:"right",Hc:"top",Ac:"bottom"}});
define("jJ",["require","ns"],function(a){a=a("ns");var d={},l=Math.PI/180,m=new THREE.Matrix4;new THREE.Matrix4;var k=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];d.Hg=500;d.p6=.5*d.Hg;d.cNa=d.Hg;d.hoa=[a.FRONT,a.ub,a.BACK,a.ab,a.Hc,a.Ac];d.DCa=function(c,h){for(var f=d.Hg,b=d.p6,e=c*h,g=this.Zv(),n=[],q=0,p=6*e;q<p;q++)n.push(q);q=[];var r=e;q.push(this.ZH(g,c,h,-b,+b,-b,+f,0,-f,0,n.slice(0,r)));p=r;r+=e;q.push(this.ZH(g,c,h,+b,+b,
-b,0,+f,-f,0,n.slice(p,r)));p=r;r+=e;q.push(this.ZH(g,c,h,+b,+b,+b,-f,0,-f,0,n.slice(p,r)));p=r;r+=e;q.push(this.ZH(g,c,h,-b,+b,+b,0,-f,-f,0,n.slice(p,r)));p=r;r+=e;q.push(this.ZH(g,c,h,-b,+b,+b,+f,0,0,-f,n.slice(p,r)));q.push(this.ZH(g,c,h,-b,-b,-b,+f,0,0,+f,n.slice(r,r+e)));g.mergeVertices();g.computeFaceNormals();g.userData.type="cube";g.userData.QEa=c;g.userData.gLa=h;g.userData.s9a=q;return d.HR(g)};d.eL=function(){var c=this.Zv();this.mpa(c,-.5,.5,0,1,0,0,0,-1,0,0);c.mergeVertices();c.computeFaceNormals();
c.userData.type="plane";return d.HR(c)};d.CCa=function(c,h,f,b,e,g,n,q,p,r,t,u){var v=this.Zv();v.vertices.push(new THREE.Vector3(c,h,f));v.vertices.push(new THREE.Vector3(b,e,g));v.vertices.push(new THREE.Vector3(n,q,p));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 d.HR(v)};d.jJa=function(c,h,f,b,e){c=d.Tfa(c);var g=c.faceVertexUvs[0][0];g[0].x=h;g[0].y=f+e;g[1].x=h;g[1].y=f;g[2].x=h+b;g[2].y=f;g=c.faceVertexUvs[0][1];g[0].x=h;g[0].y=f+e;g[1].x=h+b;g[1].y=f;g[2].x=h+b;g[2].y=f+e;c.uvsNeedUpdate=!0;return d.HR(c,!0)};d.Yr=function(){return d.p6};d.Xia=function(c,h){return 2*c*Math.tan(.5*h*l)};d.Yia=function(c,h){return 2*c*Math.tan(.5*h*
l)};d.yu=function(c){return Math.max(Math.min(3.539647*c-6.669366*c*c+4.7454*c*c*c,d.p6),.1)};d.Zv=function(){var c=new THREE.Geometry;c.userData={};return c};d.dispose=function(c){c&&(c.isBufferGeometry&&c.userData&&c.userData.geometry&&c.userData.geometry.dispose(),c.isGeometry&&c.userData&&c.userData.$K&&c.userData.$K.dispose(),c.dispose())};d.HR=function(c,h){if(c.isBufferGeometry)return c;if(c.isGeometry){if(!c.userData.$K||h)c.userData.$K&&c.userData.$K.dispose(),h=c.toBufferGeometry(),(h.userData=
{}).geometry=c,c.userData.$K=h;return c.userData.$K}return null};d.Tfa=function(c){return c.isGeometry?c:c.isBufferGeometry&&c.userData&&c.userData.geometry?c.userData.geometry:null};d.ZH=function(c,h,f,b,e,g,n,q,p,r,t){for(var u={},v=0,w=0;w<f;w++){u[w]={};for(var x=0;x<h;x++)this.mpa(c,b+n*x/h+0*w/f,e+0*x/h+p*w/f,g+q*x/h+r*w/f,n/h,0/h,q/h,0/f,p/f,r/f,t[v]),u[w][x]=c.faces.slice(c.faces.length-2,c.faces.length),v+=1}return u};d.zeb=function(c,h,f){h=.5*h/Math.tan(.5*f);m.copy(c);c=k[0];c.x=0;c.y=
0;c.z=0;c.applyMatrix4(m);f=Math.sqrt(c.x*c.x+c.y*c.y+c.z*c.z);var b=h/c.z,e=k[1];e.x=c.x*b;e.y=c.y*b;e.z=h;return f/Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z)};d.q6a=function(c,h,f){c=d.Tfa(c);m.copy(h.matrixWorldInverse).multiply(f);switch(c.userData.type){case "cube":return d.vUa(c,m,h.projectionMatrix);default:return d.wUa(c)}};d.l6a=function(c,h,f){c=d.Tfa(c);switch(c.userData.type){case "plane":return d.bUa(c,h,f);case "quad":return d.xsa(c,1,h,f)||d.xsa(c,0,h,f);default:return null}};d.mpa=function(c,
h,f,b,e,g,n,q,p,r,t){var u=c.vertices.length;c.vertices.push(new THREE.Vector3(h,f,b));c.vertices.push(new THREE.Vector3(h+q,f+p,b+r));c.vertices.push(new THREE.Vector3(h+e+q,f+g+p,b+n+r));c.vertices.push(new THREE.Vector3(h+e,f+g,b+n));c.faces.push(new THREE.Face3(u,u+1,u+2,null,null,t));c.faceVertexUvs[0].push([new THREE.Vector2(0,1),new THREE.Vector2(0,0),new THREE.Vector2(1,0)]);c.faces.push(new THREE.Face3(u,u+2,u+3,null,null,t));c.faceVertexUvs[0].push([new THREE.Vector2(0,1),new THREE.Vector2(1,
0),new THREE.Vector2(1,1)])};d.bUa=function(c,h,f){var b=c.faces[0],e=c.faces[1],g=k[0],n=k[1],q=k[2];g.copy(c.vertices[b.a]).applyMatrix4(h);n.copy(c.vertices[e.c]).applyMatrix4(h);q.copy(c.vertices[b.b]).applyMatrix4(h);h=n.x-g.x;e=n.y-g.y;var p=n.z-g.z;n=q.x-g.x;var r=q.y-g.y;q=q.z-g.z;var t=e*q-p*r,u=p*n-h*q,v=h*r-e*n,w=f.direction.x*t+f.direction.y*u+f.direction.z*v;if(0!=w&&(v=-(t*(f.origin.x-g.x)+u*(f.origin.y-g.y)+v*(f.origin.z-g.z))/w,!(0>=v||(t=f.origin.x+f.direction.x*v-g.x,u=f.origin.y+
f.direction.y*v-g.y,g=f.origin.z+f.direction.z*v-g.z,f=(h*t+e*u+p*g)/(h*h+e*e+p*p),g=(n*t+r*u+q*g)/(n*n+r*r+q*q),h=c.faceVertexUvs[0][0][0],e=c.faceVertexUvs[0][1][2],c=c.faceVertexUvs[0][0][1],0>f||1<f||0>g||1<g))))return{MKa:h.x+(e.x-h.x)*f+(c.x-h.x)*g,eLa:h.y+(e.y-h.y)*f+(c.y-h.y)*g,materialIndex:b.materialIndex}};d.xsa=function(c,h,f,b){var e=c.faces[h],g=k[0],n=k[1],q=k[2];g.copy(c.vertices[e.a]).applyMatrix4(f);n.copy(c.vertices[e.b]).applyMatrix4(f);q.copy(c.vertices[e.c]).applyMatrix4(f);
f=n.x-g.x;var p=n.y-g.y,r=n.z-g.z;n=q.x-g.x;var t=q.y-g.y;q=q.z-g.z;var u=p*q-r*t,v=r*n-f*q,w=f*t-p*n,x=b.direction.x*u+b.direction.y*v+b.direction.z*w;if(0!=x&&(w=-(u*(b.origin.x-g.x)+v*(b.origin.y-g.y)+w*(b.origin.z-g.z))/x,!(0>=w))){u=b.origin.x+b.direction.x*w-g.x;v=b.origin.y+b.direction.y*w-g.y;b=b.origin.z+b.direction.z*w-g.z;if(0!=(g=t*f-n*p))f=(v*f-u*p)/g,p=(v*n-u*t)/-g;else if(0!=(g=q*f-n*r))f=(v*f-u*p)/g,p=(v*n-u*t)/-g;else if(0!=(g=q*p-t*r))f=(b*p-v*r)/g,p=(b*t-v*q)/-g;else return;if(!(0>
p||1<p||0>f||1<f||1<p+f))return n=c.faceVertexUvs[0][h][0],t=c.faceVertexUvs[0][h][1],c=c.faceVertexUvs[0][h][2],{MKa:n.x+(t.x-n.x)*p+(c.x-n.x)*f,eLa:n.y+(t.y-n.y)*p+(c.y-n.y)*f,materialIndex:e.materialIndex}}};d.vUa=function(c,h,f){var b=Array.prototype.concat.apply([],c.userData.s9a.map(function(e){return d.Nsa(h,f,e,c.vertices,0,0,c.userData.QEa,c.userData.gLa).map(function(g){return g.materialIndex})}));return d.Ysa(b)};d.wUa=function(c){c=c.faces.map(function(h){return h.materialIndex});return d.Ysa(c)};
d.Ysa=function(c){var h={};c.forEach(function(b){h[b]=!0});c=[];for(var f in h)c.push(f);return c};d.Nsa=function(c,h,f,b,e,g,n,q){var p=[];if(d.Q0a(c,h,b[f[g][e][0].a],b[f[g+q-1][e][0].b],b[f[g+q-1][e+n-1][0].c],b[f[g][e+n-1][1].c]))if(1==n&&1==q)p.push(f[g][e][0]);else for(g=1<q?[g,g+Math.ceil(.5*q),g+q]:[g,g+q],e=1<n?[e,e+Math.ceil(.5*n),e+n]:[e,e+n],n=1;n<g.length;n++){q=g[n-1];for(var r=g[n]-q,t=1;t<e.length;t++){var u=e[t-1];p=p.concat(d.Nsa(c,h,f,b,u,q,e[t]-u,r))}}return p};d.Q0a=function(c,
h,f,b,e,g){var n=[null,null,null,null,null];k[0].copy(f).applyMatrix4(c);k[1].copy(b).applyMatrix4(c);k[2].copy(e).applyMatrix4(c);k[3].copy(g).applyMatrix4(c);f=0;b=4;for(c=0;4>c;c++){e=k[(c+3)%4];g=k[c];var q=k[(c+1)%4];if(0>=g.z)n[f++]=g;else{if(0>=e.z){var p=k[b++],r=e.z/(e.z-g.z);p.x=e.x+(g.x-e.x)*r;p.y=e.y+(g.y-e.y)*r;p.z=-1E-5;n[f++]=p}0>=q.z&&(p=k[b++],r=g.z/(g.z-q.z),p.x=g.x+(q.x-g.x)*r,p.y=g.y+(q.y-g.y)*r,p.z=-1E-5,n[f++]=p)}}if(2<f){for(c=0;c<f;c++)n[c].applyMatrix4(h);c=0;for(h=f-2;c<
h;c++)if(f=n[c],b=n[c+1],e=n[c+2],!(1<f.x&&1<b.x&&1<e.x||-1>f.x&&-1>b.x&&-1>e.x||1<f.y&&1<b.y&&1<e.y||-1>f.y&&-1>b.y&&-1>e.y))return!0}return!1};d.ECa=function(c,h,f,b,e,g,n,q,p){var r=c*l,t=.5*-r+.5*Math.PI,u=h*l,v=.5*(Math.PI-u)-f*l,w=.5*d.cNa,x=64/Math.PI,y=Math.max(2,Math.ceil(r/b*x));x=Math.max(2,Math.ceil(u/e*x));for(var z=b*y,B=e*x,D=this.Zv(),F=0,A=[],E=0;E<=B;E++){for(var J=[],C=v+E*u/B,L=0;L<=z;L++){var T=-(t+L*r/z);D.vertices.push(new THREE.Vector3(-w*Math.cos(T)*Math.sin(C),+w*Math.cos(C),
+w*Math.sin(T)*Math.sin(C)));J.push(F++)}A.push(J)}for(t=r=0;t<e;t++)for(u=t*x,v=0;v<b;v++){w=v*y;for(E=0;E<x;E++)for(z=n+(1-E/x)*p,B=n+(1-(E+1)/x)*p,L=0;L<y;L++){F=g+L/y*q;J=g+(L+1)/y*q;C=A[u+E][w+L];T=A[u+E+1][w+L+1];var S=A[u+E][w+L+1];D.faces.push(new THREE.Face3(C,A[u+E+1][w+L],T,null,null,r));D.faceVertexUvs[0].push([new THREE.Vector2(F,z),new THREE.Vector2(F,B),new THREE.Vector2(J,B)]);D.faces.push(new THREE.Face3(C,T,S,null,null,r));D.faceVertexUvs[0].push([new THREE.Vector2(F,z),new THREE.Vector2(J,
B),new THREE.Vector2(J,z)])}r++}D.mergeVertices();D.computeFaceNormals();D.userData.type="sphere";D.userData.We=c;D.userData.Cs=h;D.userData.pitch=f;D.userData.QEa=b;D.userData.gLa=e;return d.HR(D)};return d});
define("cL","require exports mt bo three.mod jJ".split(" "),function(a,d,l,m,k,c){a=function(){function f(b,e){this.Zx=this.Kp=null;this.rc=b;this.yl=e;this.canvas=new l(e);this.N4a();this.G4a();this.qa=new k.Group;this.qa.add(this.Kp);this.qa.add(this.Zx)}f.prototype.update=function(){this.canvas.update(m.uDa)&&(this.Kp.material.map.needsUpdate=!0);var b=c.yu(this.yl.uHa||2),e=2*b*Math.tan(f.mMa/2);this.qa.matrixAutoUpdate=!1;this.qa.matrixWorldNeedsUpdate=!1;this.qa.matrix.identity();this.qa.matrix.multiply(h.makeTranslation(0,
0,-b));this.qa.matrix.multiply(h.makeScale(e,e,e));this.qa.updateMatrixWorld(!0)};f.prototype.gf=function(b){this.Kp.material.opacity=b};f.prototype.WG=function(b,e){void 0===e&&(e=void 0);this.canvas.WG(b,e)};f.prototype.Fy=function(b){this.canvas.Fy(b)};f.prototype.dispose=function(){var b;this.j5a();this.g5a();this.canvas.dispose();null===(b=this.qa.parent)||void 0===b?void 0:b.remove(this.qa);this.qa=null};f.prototype.g5a=function(){var b;if(this.Zx){this.Zx.geometry.dispose();var e=this.Zx.material.map.source;
e.width=e.height=1;this.Zx.material.map.dispose();null===(b=this.Zx.parent)||void 0===b?void 0:b.remove(this.Zx);this.Zx=null}};f.prototype.G4a=function(){var b=document.createElement("canvas");b.width=b.height=256;var e=b.getContext("2d");e.fillStyle="rgba(0, 0, 0, 0)";e.fillRect(0,0,256,256);e=new k.Texture;e.image=b;e.generateMipmaps=!0;e.minFilter=k.LinearMipMapLinearFilter;e.needsUpdate=!0;b=new k.MeshBasicMaterial({map:e,transparent:!0});b.map.needsUpdate=!0;b.needsUpdate=!0;b=new k.Mesh(new k.PlaneGeometry,
b);b.renderOrder=1E4;this.Zx=b};f.prototype.j5a=function(){var b;this.Kp&&(this.Kp.geometry.dispose(),this.Kp.material.map.dispose(),this.Kp.material.dispose(),null===(b=this.Kp.parent)||void 0===b?void 0:b.remove(this.Kp),this.Kp=null)};f.prototype.N4a=function(){var b=new k.PlaneGeometry,e=new k.Texture;this.canvas.update(10);e.colorSpace=k.SRGBColorSpace;e.image=this.canvas.eg();e.generateMipmaps=!0;e.minFilter=k.LinearMipMapLinearFilter;e.needsUpdate=!0;e=new k.MeshBasicMaterial({map:e,transparent:!0});
this.Kp=new k.Mesh(b,e);this.Kp.renderOrder=1E4};f.mMa=6*Math.PI/180;return f}();var h=new k.Matrix4;return a});
define("jC","require exports pB jz cL jG three.mod".split(" "),function(a,d,l,m,k,c,h){a=function(){function e(){}e.initialize=function(){this.uy=this.uy.bind(this);this.ty=this.ty.bind(this);this.XR.N.bind(l.ba,this.ze.bind(this),this,!0);this.XR.N.bind(l.Vh,this.NB.bind(this),this,!0);this.XR.N.bind(l.nq,this.X8a.bind(this),this,!0)};e.sb=function(g){this.enabled=g;this.UKa()};e.ze=function(){this.UKa()};e.NB=function(){this.setCamera(this.enabled&&this.XR.Ru||null);this.vma();this.Rcb()};e.X8a=
function(){this.XR.$ka==c.dW&&this.XR.N.trigger(l.Xf,{pointerState:this.rc})};e.UKa=function(){this.XR.isPresenting&&this.enabled?this.Ola():this.gma()};e.setCamera=function(g){this.camera!==g&&(this.camera=g,this.Tcb())};e.vma=function(){this.XR.qL.origin.copy(this.XR.Ec);this.XR.qL.direction.set(0,0,-1).applyQuaternion(this.XR.dg);if(this.enabled){if(1!=this.XR.og.length&&this.XR.og[0]!==this.rc){for(;this.XR.og.length;)this.XR.og.pop();this.XR.og.push(this.rc)}this.rc.matrixWorld.copy(f.compose(this.XR.Ec,
this.XR.dg,b));this.rc.ray.origin.set(0,0,0);this.rc.ray.direction.set(0,0,-1)}};e.Tcb=function(){this.Ye&&this.Ye.qa.parent!==this.camera&&(this.Ye.qa.parent&&this.Ye.qa.parent.remove(this.Ye.qa),this.camera.add(this.Ye.qa))};e.Ola=function(){var g;this.Ye||(this.Ye=new k(this.rc,this.XR.yl),null===(g=this.camera)||void 0===g?void 0:g.add(this.Ye.qa),this.controller=this.XR.nh.xr.getController(0),this.controller.addEventListener("selectstart",this.uy),this.controller.addEventListener("selectend",
this.ty))};e.gma=function(){this.Ye&&(this.Ye.dispose(),this.Ye=null,this.controller.removeEventListener("selectstart",this.uy),this.controller.removeEventListener("selectend",this.ty),this.controller=null)};e.Rcb=function(){var g,n,q,p;if(this.enabled){if(this.wi=this.rc.wi)this.ZJa=this.rc.jHa;var r=Date.now();if(this.XR.$ka==c.BH){var t=this.wi?r-this.ZJa:0;var u=this.XR.yl.yHa;this.iHa<u&&t>=u&&this.XR.N.trigger(l.Xf,{pointerState:this.rc});this.iHa=t;null===(g=this.Ye)||void 0===g?void 0:g.WG(this.wi&&
this.rc.bM,Math.min(1,t/u))}else null===(t=this.Ye)||void 0===t?void 0:t.WG(this.rc.bM);this.rc.wi||this.rc.Nr?this.zT=void 0:void 0==this.zT&&(g=this.XR.yl.zDa,void 0!==g&&(this.zT=r+g));r=(void 0!==this.zT?this.zT:Infinity)-r;null===(n=this.Ye)||void 0===n?void 0:n.gf(this.rc.hidden?0:Math.max(.01,Math.min(1,r/500)));null===(q=this.Ye)||void 0===q?void 0:q.Fy(this.rc.Nr);null===(p=this.Ye)||void 0===p?void 0:p.update()}};e.uy=function(){this.rc.pressed=!0;this.XR.N.trigger(l.rz,{pointerState:this.rc})};
e.ty=function(){this.rc.pressed=!1;this.XR.N.trigger(l.rz,{pointerState:this.rc});this.XR.N.trigger(l.Xf,{pointerState:this.rc})};e.rc=new m;e.enabled=!1;e.camera=null;e.Ye=null;e.wi=!1;e.ZJa=0;e.iHa=0;e.zT=void 0;e.controller=null;return e}();var f=new h.Matrix4,b=new h.Vector3(1,1,1);return a});
define("kI","require exports pB n hQ jC".split(" "),function(a,d,l,m,k,c){return function(){function h(){}h.Qab=function(f){this.DHa=f};h.initialize=function(){this.XR.N.bind(l.ba,this.ze.bind(this),this,!0);this.XR.N.bind(l.Vh,this.NB.bind(this),this,!0);this.XR.N.bind(l.Kma,this.F8a.bind(this),this,!0);this.XR.N.bind(l.Lma,this.G8a.bind(this),this,!0)};h.ze=function(){this.wma()};h.NB=function(){};h.F8a=function(){this.wma()};h.G8a=function(){this.wma()};h.wma=function(){var f=this.XR.isPresenting?
this.DHa===m.bN&&k.isConnected()?m.bN:m.BH:null;this.pointerType!==f&&(this.pointerType=f,k.sb(f===m.bN),c.sb(f===m.BH))};h.DHa=m.bN;h.pointerType=null;return h}()});define("cN",["require","exports"],function(){return function(){return function(){this.zDa=1E3;this.J4="#ffffff";this.uHa=2;this.xka="#007acc";this.L4="#ff6600";this.yHa=1200;this.tDa=0}}()});
define("qb",["require"],function(){return{qNa:"1",pNa:"auto",bNa:"1",LMa:"2",KMa:"auto",e6:"2",BLa:"3",ALa:"auto",aNa:"5",jNa:"100",sdb:"101",dMa:999998,Udb:999999,qMa:1E6}});
define("cl",["require"],function(){return{zl:"data:image/png;base64, ",jMa:"data:image/png;base64, ",
ZMa:"data:image/png;base64, ",
gN:"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==",
hNa:"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",
o6:"data:image/png;base64, ",
qz:"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",
C7:115,UMa:115,LH:"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=",
QMa:115,PMa:115,sNa:"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==",
tNa:115,Tdb:117,MLa:"data:image/png;base64, ",
vNa:"data:image/png;base64, ",
$C:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"}});
define("nO","require jquery.mod lV pB cI gF w".split(" "),function(a){var d=a("jquery.mod"),l=a("lV"),m=a("pB"),k=a("cI"),c=a("gF"),h=a("w");if(h.jc()!=h.PM){var f=function(t){return t.requestFullscreen||t.msRequestFullscreen||t.mozRequestFullScreen||t.webkitRequestFullscreen},b=function(){return document.exitFullscreen||document.msExitFullscreen||document.mozCancelFullScreen||document.webkitExitFullscreen},e=document.createElement("div");if(!(a=!(!f(e)&&!b())&&h.jc()!=h.vC))try{a=window.self===window.top}catch(t){a=
!1}if(a){var g=l.extend(c,function(t){c.call(this);this.xa=t;this.Kt=f(t);this.wD=b(t);this.V=this.naa();var u=this;d(document).bind("msfullscreenchange webkitfullscreenchange mozfullscreenchange fullscreenchange",function(){u.Kfa()});d(window).bind("resize",function(){u.Kfa()})});g.nla=function(){};g.prototype.kk=function(){return!(!f(this.xa||e)&&!b())&&h.jc()!=h.vC};g.prototype.E2=function(){this.enabled()||this.toggle()};g.prototype.Tr=function(){this.enabled()&&this.toggle()};g.prototype.toggle=
function(){this.enabled()?this.wD.call(document):this.Kt.call(this.xa);this.Kfa()};g.prototype.enabled=function(){return this.V&&this.naa()};g.prototype.naa=function(){return this.xa===g.fullscreenElement()};g.prototype.Kfa=function(){var t=this.naa();this.V!=t&&(this.V=t,this.trigger(new k(m.ba)),g.N.trigger(m.ba))};g.N=new c;g.enabled=function(){return!!g.fullscreenElement()};g.fullscreenElement=function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||
document.msFullscreenElement};g.Tr=function(){g.enabled()&&b().call(document)}}else{g=l.extend(c,function(t){c.call(this);this.xa=t});var n=!0;g.nla=function(t){n="out_of_frame"==t};g.prototype.kk=function(){return n};g.prototype.E2=function(){this.toggle()};g.prototype.Tr=function(){};g.prototype.toggle=function(){n&&window.open(window.self.location.href,"_blank")};g.prototype.enabled=function(){return g.enabled()};g.N=new c;g.enabled=function(){return!1};g.fullscreenElement=function(){return null};
g.Tr=function(){}}}else{g=l.extend(c,function(t){c.call(this);this.xa=t});g.prototype.kk=function(){return!0};g.prototype.E2=function(){this.enabled()||this.toggle()};g.prototype.Tr=function(){this.enabled()&&this.toggle()};g.prototype.toggle=function(){if(this.enabled())q("fullscreen"),g.bA=null;else{g.bA&&g.bA.Tr();q("fullscreen");var t=p();t.push("fullscreen");r(t);g.bA=this}this.trigger(new k(m.ba));g.N.trigger(m.ba)};g.prototype.enabled=function(){return this==g.bA};g.N=new c;g.enabled=function(){return!!g.fullscreenElement()};
g.fullscreenElement=function(){return g.bA&&g.bA.xa};g.Tr=function(){g.enabled()&&g.bA.Tr()};g.nla=function(){};g.bA=null;var q=function(t){for(var u=p(),v=[],w=0;w<u.length;w++)u[w]!=t&&v.push(u[w]);r(v)},p=function(){var t=window.location.hash.substring(1);return t.length?t.split("&"):[]},r=function(t){window.location.hash="#"+(t.length?t.join("&"):"")}}return g});
define("eU",["require"],function(){var a={};a:{try{if("localStorage"in window&&(window.localStorage.setItem("test","test"),"test"==window.localStorage.getItem("test"))){window.localStorage.removeItem("test");var d=!0;break a}}catch(m){}d=!1}if(d)a.setItem=function(m,k){window.localStorage.setItem(m,k)},a.getItem=function(m){return window.localStorage.getItem(m)},a.removeItem=function(m){return window.localStorage.removeItem(m)},a.clear=function(){try{window.localStorage.clear()}catch(m){}};else{var l=
{};a.setItem=function(m,k){l[m]=k};a.getItem=function(m){return l[m]};a.removeItem=function(m){delete l[m]};a.clear=function(){l={}}}return a});
define("jt","require jquery.mod lV pz w mV qb cl nO eU".split(" "),function(a){function d(U,X){this.h3a=U;this.CQa=X;this.Ffa=[];this.Sj=null;this.zx=!1}var l=a("jquery.mod"),m=a("lV"),k=a("pz"),c=a("w"),h=a("mV"),f=a("qb"),b=a("cl"),e=a("nO"),g=a("eU"),n="color:#000; font-family:Arial, Helvetica, sans-serif;",q="",p="border-color:#b2b2b2;",r=p,t="background-color:#009adb; border:none; box-sizing:border-box; color:#fff; cursor:pointer; font-family:Arial, Helvetica, sans-serif; text-align:center;",u=
"vertical-align:middle; padding:0;",v='<img style="width:33vmin;" src="'+b.zl+'"/>',w='<img style="width:24vmin;" src="'+b.zl+'"/>',x='<img style="width:34vmin;" src="'+b.o6+'"/>',y='<img style="width:34vmin;" src="'+b.jMa+'"/>',z='<img style="width:24vmin;" src="'+b.ZMa+'"/>';c.pb()?(t+=" margin:0 1vmin; min-width:20vmin; padding:2.2vmin 4vmin; font-size:3.6vmin; font-weight:bold; min-width:30vmin;",n+=" font-size:3.6vmin; line-height:4.3vmin;",q+=" margin:5vmin 0;",p+="  margin:5vmin 0;",r+="  margin:3vmin 0;",
u+=" height:4vmin; margin:0 1vmin 0 0; width:4vmin;"):t+=" font-size:19px; padding:17px 34px;";q+=n;d.prototype.K9=function(){this.Sj||(this.Sj=l("<div/>"),this.Sj.css({position:"fixed","z-index":f.qMa,left:0,top:0,margin:0,padding:0,height:"100%",width:"100%","background-color":"rgba(255, 255, 255, 0.99)"}),this.Sj.html(this.CQa),l(this.Sj).find("button").on("click",function(U){this.HWa(l(U.currentTarget).attr("id"))}.bind(this)))};d.prototype.Tea=function(U,X){var K={},N;for(N in X)K[N]=U.css(N);
this.Ffa.push({$el:U,css:K});U.css(X)};d.prototype.fZa=function(){for(;this.Ffa.length;){var U=this.Ffa.pop();U.$el.css(U.css)}};d.prototype.show=function(U,X,K){U||(U=function(){});X||(X=function(){});if(this.zx){var N=this.gX;this.gX=function(){N();U()};var V=this.VW;this.VW=function(){V();X()}}else{this.K9();this.gX=U;this.VW=X;var W=this.tTa();if(void 0===W){this.zx=!0;var aa=this;W=e.fullscreenElement()||document.body;W=l(W);!0!==K?W.children().each(function(){aa.Tea(l(this),{visibility:"hidden"})}):
(this.Tea(W,{overflow:"hidden"}),W.children().each(function(){aa.Tea(l(this),{position:"absolute","z-index":0})}));W.append(this.Sj)}else this.zx=!1,W?this.gX():this.VW()}};d.prototype.hide=function(){this.zx&&(this.zx=!1,this.Sj.detach(),this.fZa())};d.prototype.tTa=function(){var U=g.getItem(this.rsa());if("true"==U)return!0;if("false"==U)return!1};d.prototype.yya=function(U){g.setItem(this.rsa(),U?"true":"false")};d.prototype.rsa=function(){return this.h3a+"DontDisplay:"+window.location.pathname};
d.prototype.HWa=function(U){var X=l("#tdvvriw_dontdisplay").is(":checked");this.hide();"tdvvriw_continue"==U?(this.gX(),X&&this.yya(!0)):"tdvvriw_cancel"==U&&(this.VW(),X&&this.yya(!1))};a=m.extend(d,function(){var U=['<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>',v,'<div style="'+q+'">'+k("use-cardboard-info")+"</div>",'<div><button style="'+t+'" id="tdvvriw_continue">'+
k("use-cardboard")+"</button></div>","</div>",'<hr style="'+p+'">',"<div>",'<div style="'+q+'">','<div style="margin-bottom:2vmin;">'+k("samsung-internet-vr-app-info")+"</div>",'<div><button style="'+t+'" id="tdvvriw_cancel">'+k("launch-default-browser")+"</button></div>","</div>",y,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+q+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+u+'"><label for="tdvvriw_dontdisplay">'+
k("dont-display-again")+"</label>","</div>"].join("\n");d.call(this,"ChromeAppInfoWindow",U)});var B=m.extend(d,function(){var U=['<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>',v,'<div style="'+q+'">'+k("use-cardboard-info")+"</div>",'<div><button style="'+t+'" id="tdvvriw_continue">OK</button></div>',"</div>",'<hr style="'+p+'">',"<div>",'<div style="'+q+'">',
'<div style="margin-bottom:2vmin;">'+k("samsung-internet-vr-info")+"</div>","</div>",y,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+q+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+u+'"><label for="tdvvriw_dontdisplay">'+k("dont-display-again")+"</label>","</div>"].join("\n");d.call(this,"SamsungInternetInfoWindow",U)}),D=m.extend(d,function(){d.call(this,"SamsungInternetForGearVRInfoWindow",
['<div style="box-sizing:border-box; margin:0; padding:0 12vmin; display:table; height:100%; width:100%;"><div style="vertical-align:middle; text-align:center; display:table-cell;">\n<div>',y,'<div style="'+q+'">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="'+t+'" id="tdvvriw_cancel">OK</button></div>',"</div>\n</div></div>"].join("\n"))}),F=m.extend(d,function(){var U=
['<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="'+q+'"></div>','<div style="text-align:center;"><button style="'+t+' box-shadow:0 0 4px rgba(0, 0, 0, 0.5);" id="tdvvriw_continue">'+k("exit-vr")+"</button></div>","</div></div>"].join("\n");d.call(this,"ExternalVRDisplayVRInfoWindow",U)});F.prototype.K9=function(){d.prototype.K9.call(this);!0===h.mg("vrv")&&
this.Sj.css({background:"none"})};var A=m.extend(d,function(){var U=c.browser()==c.sh?"https:"!=window.location.protocol&&"localhost"!=window.location.hostname?"<div>"+k("giroscope-disabled-http")+"</div>":k("giroscope-disabled-safari-request-permission").map(function(X){return"<div>"+X+"</div>"}).join("\n"):"<div>"+k("giroscope-disabled-http")+"</div>";U=['<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="'+q+'">',U,"</div>",'<div><button style="'+t+'" id="tdvvriw_continue">OK</button></div>',"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+q+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+u+'"><label for="tdvvriw_dontdisplay">'+k("dont-display-again")+"</label>","</div>"].join("\n");d.call(this,"GiroscopeDisabledInfoWindow",U)}),E=m.extend(d,function(){var U=['<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>',
v,'<div style="'+q+'">'+k("use-cardboard-info")+'</div><div><button style="'+t+'" id="tdvvriw_continue">'+k("use-cardboard")+"</button></div>","</div>",'<hr style="'+p+'">',"<div>",y,'<div style="'+q+'">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="'+t+'" id="tdvvriw_cancel">Use Carmel web browser</button></div>',"</div>\n</div></div>"].join("\n");d.call(this,"CarmelInstallationPromptVRInfoWindow",
U)}),J=m.extend(d,function(){var U=['<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>',v,'<div style="'+n+' margin:2vmin 0;">'+k("cardboard-v1")+"</div>",'<div><button style="'+t+'" id="tdvvriw_cancel">'+k("use-default-cardboard")+"</button></div>","</div>",'<hr style="'+r+'">',"<div>",'<div style="'+n+' margin-bottom:2vmin;">'+k("cardboard-v2")+"</div>",'<div><button style="'+
t+'" id="tdvvriw_continue">'+k("use-cardboard-v2")+"</button></div>",x,"</div>\n</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+q+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+u+'"><label for="tdvvriw_dontdisplay">'+k("dont-display-again")+"</label>","</div>"].join("\n");d.call(this,"CardboardV2InfoWindow",U)}),C=m.extend(d,function(){var U=['<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="'+q+'"></div>','<div style="text-align:center;"><button style="'+t+'" id="tdvvriw_continue">'+k("enter-vr")+"</button></div>","</div></div>"].join("\n");d.call(this,"EnterVRInfoWindow",U)}),L=m.extend(d,function(){d.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="'+q+'">Preparing VR...</div>',"</div></div>"].join("\n"))}),
T=m.extend(d,function(){var U=['<div style="position: absolute; top: 7vmin; right:5vmin; ">',w,'</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;">',z,'<div style="'+q+'">'+k("use-safari-for-vr")+"</div>",'<div style="text-align:center;"><button style="'+t+'" id="tdvvriw_continue">OK</button></div>',"</div></div>",'<div style="position:absolute; left:12vmin; right:12vmin; bottom:6vmin; '+
q+'">','<input type="checkbox" id="tdvvriw_dontdisplay" name="tdvvriw_dontdisplay" value="true" style="'+u+'"><label for="tdvvriw_dontdisplay">'+k("dont-display-again")+"</label>","</div>"].join("\n");d.call(this,"UseSafariVRInfoWindow",U)});m=m.extend(d,function(){var U=['<div style="position: absolute; top: 5vmin; right:5vmin;">','<img style="width:24vmin" src="'+b.zl+'"/>','</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.gN+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+k("rotate-device")+"</div>","</div>\n</div>"].join("\n");d.call(this,"RotateVRInfoWindow",U)});var S={};S.Ldb=new B;S.Mdb=new D;S.Xma=new F;S.qdb=new E;S.vdb=new C;S.Fdb=new L;S.uoa=new T;S.gN=new m;S.bna=new A;S.zLa=new a;S.o6=new J;return S});
define("hh",["require"],function(){return{Ke:void 0,aa:"over",Bb:"pressed",lc:"pressedOver",ka:"selected"}});
define("mz",["require","exports","pB","cI","gF"],function(a,d,l,m,k){return function(c){function h(){var f=c.call(this)||this;f.wq={};return f}Z(h,c);h.prototype.set=function(f,b){var e=this;if("object"===typeof f){b=[];var g=0;for(f=Object.entries(f);g<f.length;g++){var n=f[g],q=n[0];n=n[1];this.wq[q]!==n&&(this.wq[q]=n,b.push(q))}b.forEach(function(p){return e.fga(p)})}else this.wq[f]!==b&&(this.wq[f]=b,this.fga(f))};h.prototype.fga=function(f){f=new m(l.G(f));this.trigger(f)};h.prototype.copy=
function(f){this.wq={};for(var b in f.wq)this.wq[b]=f.wq[b];return this};h.prototype.get=function(f,b){void 0===b&&(b=void 0);f=this.wq[f];return void 0!==f?f:b};return h}(k)});
define("bi",["require","exports"],function(){return function(){function a(){}a.hz="grab";a.Wh="grabbing";a.una="move";a.Ena="move-n";a.Fna="move-ne";a.vna="move-e";a.Ina="move-se";a.Hna="move-s";a.Jna="move-sw";a.Kna="move-w";a.Gna="move-nw";a.CMa="move-ew";a.EMa="move-ns";a.DMa="move-nesw";a.FMa="move-nwse";a.xna="move-fast-n";a.yna="move-fast-ne";a.wna="move-fast-e";a.Bna="move-fast-se";a.Ana="move-fast-s";a.Cna="move-fast-sw";a.Dna="move-fast-w";a.zna="move-fast-nw";a.Le="hand";a.$C="transparent";
a.Ke="default";a.pv="inherit";return a}()});define("iy",["require","exports"],function(){return{yMa:7,e6:6,lna:5,Cl:4,doa:3,fN:2,B7:1,Adb:0,qna:3,QC:2,SMa:1,RMa:2,OMa:2,wo:2,kNa:3,Sdb:4}});define("bp",["require"],function(){return{n7:"horizontal",O7:"vertical"}});
define("gX",["require"],function(){var a=1,d={};return{css:function(l,m){var k=l.__duqid;void 0===k&&(k=a.toString(),l.__duqid=k,a++);l=d[k]||(d[k]={e:l,s:{}});for(var c in m)l.s[c]=m[c]},process:function(){for(var l in d){var m=d[l],k=m.e.style;m=m.s;for(var c in m)k[c]=m[c]}d={}}}});
define("bX",["require"],function(){return{a7a:function(a){return!!a&&0<=a.indexOf("&tdvflipx")},xBa:function(a){a&&(0>a.indexOf("#")&&(a+="#"),a+="&tdvflipx");return a},A5a:function(a,d,l){var m=document.createElement("canvas");m.width=d;m.height=l;l=m.getContext("2d");l.translate(d,0);l.scale(-1,1);l.drawImage(a,0,0);a.src=m.toDataURL()}}});
define("J",["require","exports"],function(){return function(){function a(d,l,m,k,c,h){this.queue=d;this.url=l;this.priority=m;this.time=k;this.Kbb=c;this.f4a=h}a.prototype.loaded=function(){this.queue.KU(this.url);this.queue.remove(this)};a.prototype.cancel=function(){this.queue.remove(this)};return a}()});
define("bB","require exports w mV lY J".split(" "),function(a,d,l,m,k,c){var h=l.jc()===l.$y,f=!(m.Fj("debug")&&m.mg("disable-cache"));return function(){function b(){}b.add=function(e,g,n,q){e=new c(this,e,g,(new Date).getTime(),n,q);this.mx.push(e);this.oa();return e};b.Xbb=function(e){this.wK.push(e);this.oa()};b.Wbb=function(e){e=this.wK.indexOf(e);0<=e&&this.wK.splice(e,1);this.oa()};b.hdb=function(e){var g;return h?!0:f?null!==(g=this.Xta[e])&&void 0!==g?g:!1:!1};b.KU=function(e){h||f&&(this.Xta[e]=
!0)};b.oa=function(){this.Rga||(this.Rga=k.ZB(b.U1a.bind(this)))};b.U1a=function(){this.Rga=null;for(var e=this.qZa(),g=0,n=this.WY;g<n.length;g++){var q=n[g];e.includes(q)||q.f4a()}g=this.WY;this.WY=e;e=0;for(n=this.WY;e<n.length;e++)q=n[e],g.includes(q)||q.Kbb()};b.Z_a=function(){this.mx.sort(function(e,g){return e.priority-g.priority||g.time-e.time});this.wK.sort(function(e,g){return e-g})};b.qZa=function(){this.Z_a();var e=[];if(this.mx.length)for(var g=this.wK.length?this.wK[0]:this.mx[0].priority,
n=0;10>n&&n<this.mx.length&&this.mx[n].priority<=g;n++)e.push(this.mx[n]);return e};b.remove=function(e){e=this.mx.indexOf(e);0<=e&&this.mx.splice(e,1);this.oa()};b.mx=[];b.WY=[];b.wK=[];b.Rga=null;b.Xta={};return b}()});
define("mD","require lV cI gF pB iy mV bX bB".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("gF"),k=a("pB"),c=a("iy"),h=a("mV"),f=a("bX"),b=a("bB");a=d.extend(m,function(g){m.call(this);this.Ht=g||c.yMa;this.wa=this.sa=this.ic=this.Wd=null;this.tA=!1;this.dK=this.Po=null;this.b0=0;this.oba=[];this.rY=this.rY.bind(this);this.sY=this.sY.bind(this)});a.prototype.load=function(g){this.cancel();this.Wd=g;this.b0=0;this.Txa()};a.prototype.Txa=function(){this.Po=b.add(this.Wd,this.Ht,this.i0a.bind(this),
this.PPa.bind(this))};a.prototype.cancel=function(){this.Po&&(this.Po.cancel(),this.Po=null);this.nqa();this.Wd=null};a.prototype.R7a=function(){return!!this.ic&&!this.tA||this.dK};a.prototype.Mh=function(){return this.tA};a.prototype.Cf=function(g){return g?(g=this.ic.cloneNode(!0),this.oba.push(g),g):this.ic};a.prototype.Fe=function(){return this.sa};a.prototype.Ve=function(){return this.wa};a.prototype.Yi=function(){return this.Wd};a.prototype.i0a=function(){this.ic=this.eRa(this.Wd)};a.prototype.PPa=
function(){this.R7a()&&this.nqa()};a.prototype.nqa=function(){if(this.ic){this.dK&&(clearTimeout(this.dK),this.dK=null);for(this.tA=!1;this.oba.length;)this.kra(this.oba.shift());this.kra(this.ic);this.ic=null}};a.prototype.aOa=function(g){g.addEventListener("load",this.rY);g.addEventListener("error",this.sY)};a.prototype.Mxa=function(g){g.removeEventListener("load",this.rY);g.removeEventListener("error",this.sY)};a.prototype.rY=function(){this.ic.width&&this.ic.height||!(-1<this.Wd.indexOf(".svg"))||
this.tSa();this.Po.loaded();this.Po=null;this.Mxa(this.ic);this.tA=!0;this.sa=this.ic.width;this.wa=this.ic.height;f.a7a(this.Wd)&&f.A5a(this.ic,this.sa,this.wa);this.trigger(new l(k.ea))};a.prototype.sY=function(){this.cancel();this.b0<e?(this.b0++,this.dK=setTimeout(function(){this.dK=null;this.Txa()}.bind(this),1E3*Math.pow(2,this.b0))):this.trigger(new l(k.Bc))};a.prototype.tSa=function(){var g=new XMLHttpRequest;g.open("GET",this.Wd,!1);g.send();var n=document.createElement("div");n.innerHTML=
g.responseText;g=n.children[0];this.ic.width=g.width.baseVal.value;this.ic.height=g.height.baseVal.value};a.prototype.eRa=function(g){var n=document.createElement("img");h.qja(g)?n.setAttribute("crossOrigin","Anonymous"):n.removeAttribute("crossOrigin");n.setAttribute("draggable","false");n.style.position="static";n.style.border="none";n.style.display="none";this.aOa(n);n.src=g;return n};a.prototype.kra=function(g){this.Mxa(g);g.parentNode&&g.parentNode.removeChild(g);g.src=""};var e=5;a.H5=function(g){return b.hdb(g)};
return a});
define("gQ","require er jquery.mod pB iy bp qb gX mD".split(" "),function(a){function d(){this.xq=this.zq=this.Aq=this.yq=this.Sv=this.Rv=this.Uv=this.Tv=0;this.yW=this.AW=this.BW=this.zW="";this.Mb=1;this.Jc=void 0;this.FD=[];this.v9=[];this.s9=h.O7;this.WW=!1;this.oY=void 0;this.gi=null;this.Maa=this.mha=0;this.nc=document.createElement("canvas");this.nc.setAttribute("tdvlayer","background");this.xa=m(this.nc);b.css(this.nc,{position:"absolute",left:0,top:0,"z-index":f.e6,"user-select":"none","-ms-user-select":"none",
"-moz-user-select":"none","-webkit-user-select":"none"});this.Kg=!0}var l=a("er"),m=a("jquery.mod"),k=a("pB"),c=a("iy"),h=a("bp"),f=a("qb"),b=a("gX"),e=a("mD");d.prototype.setSize=function(g,n){if(this.mha!=g||this.Maa!=n)this.mha=g||0,this.Maa=n||0,this.Kg=!0};d.prototype.WIa=function(g){this.Pq!=g&&(this.Pq=g,this.Kg=!0)};d.prototype.hd=function(){return this.xa};d.prototype.Xd=function(){return this.nc};d.prototype.dab=function(g){if(this.oY!=g){this.gi&&(this.gi.unbind(k.ea,this.OO,this),this.gi.cancel(),
this.gi=null);if(this.oY=g)this.gi=new e(c.doa),this.gi.bind(k.ea,this.OO,this),this.gi.load(this.oY);this.Kg=!0}};d.prototype.ila=function(g){this.Tv!=g&&(this.Tv=g,this.Kg=!0)};d.prototype.jla=function(g){this.Uv!=g&&(this.Uv=g,this.Kg=!0)};d.prototype.dla=function(g){this.Rv!=g&&(this.Rv=g,this.Kg=!0)};d.prototype.ela=function(g){this.Sv!=g&&(this.Sv=g,this.Kg=!0)};d.prototype.gla=function(g){this.yq!=g&&(this.yq=g,this.Kg=!0)};d.prototype.kla=function(g){this.Aq!=g&&(this.Aq=g,this.Kg=!0)};d.prototype.hla=
function(g){this.zq!=g&&(this.zq=g,this.Kg=!0)};d.prototype.fla=function(g){this.xq!=g&&(this.xq=g,this.Kg=!0)};d.prototype.y$a=function(g){this.zW!=g&&(this.zW=g,this.Kg=!0)};d.prototype.A$a=function(g){this.BW!=g&&(this.BW=g,this.Kg=!0)};d.prototype.z$a=function(g){this.AW!=g&&(this.AW=g,this.Kg=!0)};d.prototype.x$a=function(g){this.yW!=g&&(this.yW=g,this.Kg=!0)};d.prototype.Oh=function(g){this.Mb!=g&&(this.Mb=g,this.Kg=!0)};d.prototype.kl=function(){return this.Mb};d.prototype.setColor=function(g){l.isEqual(this.Jc,
g)||(this.Jc=g,l(g).isArray()||(g=[g]),g=l(g).filter(function(n){return l(n).isString()}),this.GIa(g))};d.prototype.wL=function(){return this.Jc};d.prototype.GIa=function(g){l.isEqual(this.FD,g)||(this.FD=g,this.Kg=!0)};d.prototype.G$a=function(g){this.eeb!=g&&(this.v9=g,this.Kg=!0)};d.prototype.F$a=function(g){this.s9!=g&&(this.s9=g,this.Kg=!0)};d.prototype.OO=function(){this.Kg=!0;this.rh()};d.prototype.rh=function(){this.Kg&&(this.oa(),this.Kg=!1)};d.prototype.oa=function(){var g=Math.max(0,this.mha-
(this.yq+this.zq)),n=Math.max(0,this.Maa-(this.Aq+this.xq)),q=this.xa.get(0);q.width=g;q.height=n;q=q.getContext("2d");var p=this.LPa(),r=0<p.length,t=this.gi&&this.gi.Mh(),u=0<this.yq&&this.zW||0<this.Aq&&this.BW||0<this.zq&&this.AW||0<this.xq&&this.yW;u=r||t||u;if(r){var v=this.s9==h.n7?q.createLinearGradient(0,0,g,0):q.createLinearGradient(0,0,0,n);l(p).forEach(function(w){v.addColorStop(w.ratio,w.color)});q.fillStyle=v;q.fillRect(0,0,g,n);this.WW=!0}else this.WW&&(q.clearRect(0,0,g,n),this.WW=
!1);t&&(q.drawImage(this.gi.Cf(),0,0,g,n),this.WW=!0);this.nc.style.opacity=this.Mb;this.nc.style.filter="alpha(opacity="+Math.round(100*this.Mb)+")";this.nc.style["-ms-filter"]="alpha(opacity="+Math.round(100*this.Mb)+")";this.nc.style.borderTopLeftRadius=this.Tv+"px";this.nc.style.borderTopRightRadius=this.Uv+"px";this.nc.style.borderBottomLeftRadius=this.Rv+"px";this.nc.style.borderBottomRightRadius=this.Sv+"px";this.nc.style.borderLeft=this.XX(this.yq,this.zW);this.nc.style.borderTop=this.XX(this.Aq,
this.BW);this.nc.style.borderRight=this.XX(this.zq,this.AW);this.nc.style.borderBottom=this.XX(this.xq,this.yW);this.nc.style.width=g+"px";this.nc.style.height=n+"px";this.nc.style.cursor="inherit";this.nc.style.display=u?"block":"none";0===this.nc.clientWidth&&0!==g&&(this.nc.style.width=0,this.nc.style.width=g+"px")};d.prototype.XX=function(g,n){return 0<g?n?g+"px solid "+n:g+"px solid transparent":"none"};d.prototype.LPa=function(){var g=[];if(0<this.FD.length){var n=this.FD.slice();n=[].concat([n[0]],
n,[n[n.length-1]]);var q=this.KPa();q=[].concat([0],q,[1]);for(var p=0;p<n.length;p++){var r=q[p];0<=r&&g.push({color:n[p],ratio:r})}for(p=0;p<g.length-1;)g[p].ratio==g[p+1].ratio&&g[p].color==g[p+1].color?g.splice(p,1):p++;for(p=1;p<g.length-1;)g[p-1].ratio==g[p+1].ratio?g.splice(p,1):p++}return g};d.prototype.KPa=function(){var g=this.FD.length,n;for(n=0<this.v9.length?l(this.v9).map(function(q){return Math.min(1,Math.max(0,q))}):1==g?[.5]:l(l.range(g)).map(function(q,p){return 1*p/(g-1)});n.length<
g;)n.push(1);n.length>g&&n.splice(g,n.length-g);return n};return d});
define("dE",["require","jquery.mod","qb","gX"],function(a){function d(){this.i_=this.k_=this.l_=this.j_=this.xq=this.zq=this.Aq=this.yq=0;this.rQ=this.Pq=!0;this.gha=this.hba=0;this.Ba=!0;this.XQ=document.createElement("div");this.XQ.setAttribute("tdvlayer","content");this.mya=l(this.XQ);k.css(this.XQ,{position:"absolute"});this.RN=document.createElement("div");this.C9=l(this.RN);k.css(this.RN,{position:"absolute"});this.mya.append(this.C9)}var l=a("jquery.mod"),m=a("qb"),k=a("gX");d.prototype.append=
function(c){this.C9.append(c)};d.prototype.prepend=function(c){this.C9.prepend(c)};d.prototype.Bha=function(c){this.RN.appendChild(c)};d.prototype.O9a=function(c){this.RN.removeChild(c)};d.prototype.hd=function(){return this.mya};d.prototype.Xd=function(){return this.XQ};d.prototype.aab=function(c){this.hba!=c&&(this.hba=c,this.Ba=!0)};d.prototype.wbb=function(c){this.gha!=c&&(this.gha=c,this.Ba=!0)};d.prototype.yL=function(){return this.j_+this.yq};d.prototype.AL=function(){return this.l_+this.Aq};
d.prototype.zL=function(){return this.k_+this.zq};d.prototype.vL=function(){return this.i_+this.xq};d.prototype.tM=function(c){this.rQ!=c&&(this.rQ=c,this.Ba=!0)};d.prototype.Cab=function(c){this.j_!=c&&(this.j_=c,this.Ba=!0)};d.prototype.Eab=function(c){this.l_!=c&&(this.l_=c,this.Ba=!0)};d.prototype.Dab=function(c){this.k_!=c&&(this.k_=c,this.Ba=!0)};d.prototype.Bab=function(c){this.i_!=c&&(this.i_=c,this.Ba=!0)};d.prototype.gla=function(c){this.yq!=c&&(this.yq=c,this.Ba=!0)};d.prototype.kla=function(c){this.Aq!=
c&&(this.Aq=c,this.Ba=!0)};d.prototype.hla=function(c){this.zq!=c&&(this.zq=c,this.Ba=!0)};d.prototype.fla=function(c){this.xq!=c&&(this.xq=c,this.Ba=!0)};d.prototype.WIa=function(c){this.Pq!=c&&(this.Pq=c,this.Ba=!0)};d.prototype.rh=function(){this.Ba&&(this.oa(),this.Ba=!1)};d.prototype.oa=function(){k.css(this.XQ,{overflow:this.rQ?"visible":"hidden","z-index":this.Pq?m.BLa:m.ALa,left:this.yL()+"px",top:this.AL()+"px",right:this.zL()+"px",bottom:this.vL()+"px",cursor:"inherit"});k.css(this.RN,{left:-this.hba+
"px",top:-this.gha+"px",right:this.rQ?0:"initial",bottom:this.rQ?0:"initial",cursor:"inherit"})};return d});
define("kB","require er jquery.mod lV qb gX".split(" "),function(a){function d(){this.wa=this.sa=this.Qa=this.Na=void 0;this.Sv=this.Rv=this.Uv=this.Tv=0;this.Ub=!1;this.gba=0;this.fha=4;this.W8=6;this.ufa=0;this.Jc="#000000";this.Mb=1;this.nc=document.createElement("div");this.nc.setAttribute("tdvlayer","shadow");this.xa=l(this.nc);k.css(this.nc,{position:"absolute",left:0,top:0,right:0,bottom:"0"});this.Ba=!1}a("er");var l=a("jquery.mod");a("lV");var m=a("qb"),k=a("gX");d.prototype.hd=function(){return this.xa};
d.prototype.Xd=function(){return this.nc};d.prototype.ila=function(c){this.Tv!=c&&(this.Tv=c,this.Ba=!0)};d.prototype.jla=function(c){this.Uv!=c&&(this.Uv=c,this.Ba=!0)};d.prototype.dla=function(c){this.Rv!=c&&(this.Rv=c,this.Ba=!0)};d.prototype.ela=function(c){this.Sv!=c&&(this.Sv=c,this.Ba=!0)};d.prototype.Oh=function(c){this.Mb!=c&&(this.Mb=c,this.Ba=!0)};d.prototype.kl=function(){return this.Mb};d.prototype.Ze=function(c){this.Ub!=c&&(this.Ub=c,this.Ba=!0)};d.prototype.$$a=function(c){this.gba!=
c&&(this.gba=c,this.Ba=!0)};d.prototype.vbb=function(c){this.fha!=c&&(this.fha=c,this.Ba=!0)};d.prototype.w$a=function(c){this.W8!=c&&(this.W8=c,this.Ba=!0)};d.prototype.Yab=function(c){this.ufa!=c&&(this.ufa=c,this.Ba=!0)};d.prototype.setColor=function(c){this.Jc!=c&&(this.Jc=c,this.Ba=!0)};d.prototype.wL=function(){return this.Jc};d.prototype.rh=function(){this.Ba&&(this.oa(),this.Ba=!1)};d.prototype.oa=function(){var c=this.gba+"px "+this.fha+"px "+this.W8+"px "+this.ufa+"px "+this.Jc;this.nc.style.display=
this.Ub?"block":"none";this.nc.style.boxShadow=c;this.nc.style["-webkit-box-shadow"]=c;this.nc.style["-moz-box-shadow"]=c;this.nc.style.borderTopLeftRadius=this.Tv+"px";this.nc.style.borderTopRightRadius=this.Uv+"px";this.nc.style.borderBottomLeftRadius=this.Rv+"px";this.nc.style.borderBottomRightRadius=this.Sv+"px";this.nc.style.filter="alpha(opacity="+Math.round(100*this.Mb)+")";this.nc.style["-ms-filter"]="alpha(opacity="+Math.round(100*this.Mb)+")";this.nc.style.opacity=this.Mb;this.nc.style.zIndex=
m.bNa};return d});
define("nJ","require jquery.mod er lV mz bi pB gQ dE kB qb cI gX w".split(" "),function(a){var d=a("jquery.mod");a("er");var l=a("lV"),m=a("mz"),k=a("bi"),c=a("pB"),h=a("gQ"),f=a("dE"),b=a("kB"),e=a("qb"),g=a("cI"),n=a("gX");a("w");var q=l.extend(m,function(){m.call(this);this.$I=q.$I++;this.B9=this.te=this.uda=this.qQ=this.kfa=this.xa=this.nc=null;this.fAa=this.yta=!1;this.ta=this.mb=null;this.wa=this.sa=this.Mw=this.Lw=0;this.nA=this.Ub=!1;this.nta=!0;this.pP=this.qP=this.bm=this.cm=0;this.Mb=1;
this.ci=k.Ke;this.set("inView",!1);this.set("toolTip",void 0);this.jF(!0);this.afa(!0)});q.prototype.Re=function(p){this.AD=p};q.prototype.toString=function(){return"["+(this.xa?this.xa.attr("tdvclass"):"")+"::"+this.$I+"]"};q.prototype.log=function(p){l.log(p+" "+this.toString()+" "+(new Date).getTime().toString())};q.prototype.Db=function(){return this.mb};q.prototype.Pt=function(p){(this.mb=p)&&this.xba();this.FK();this.trigger(c.wLa)};q.prototype.hd=function(){this.xa=d(this.Xd());this.hd=function(){return this.xa};
return this.xa};q.prototype.qJa=function(p){(p=p||this.AD)?this.nc.setAttribute("tdvclass",p):this.nc.removeAttribute("tdvclass")};q.prototype.h$a=function(){this.qJa()};q.prototype.Xd=function(){this.nc=document.createElement("div");this.nc.setAttribute("id",this.$I);this.AD&&this.nc.setAttribute("tdvclass",this.AD);n.css(this.nc,{margin:0,padding:0,position:"absolute",overflow:"visible",display:"block"});this.Xd=function(){return this.nc};return this.nc};q.prototype.Rl=function(){this.kfa=new b;
this.Rl=function(){return this.kfa};return this.kfa};q.prototype.dd=function(){this.te=new h;this.dd=function(){return this.te};return this.te};q.prototype.WI=function(){this.qQ=document.createElement("div");this.qQ.setAttribute("tdvlayer","overShadow");n.css(this.qQ,{position:"absolute",left:0,top:0,cursor:"inherit"});this.WI=function(){return this.qQ};return this.qQ};q.prototype.Caa=function(){this.uda=d(this.WI());this.Caa=function(){return this.uda};return this.uda};q.prototype.Yb=function(){this.B9=
new f;this.Yb=function(){return this.B9};return this.B9};q.prototype.getParent=function(){return this.ta};q.prototype.Wa=function(){return this.sa};q.prototype.Ab=function(){return this.wa};q.prototype.X6a=function(){return void 0!==this.sa&&void 0!==this.wa};q.prototype.Bf=function(){return this.sa-this.Yb().yL()-this.Yb().zL()};q.prototype.Af=function(){return this.wa-this.Yb().AL()-this.Yb().vL()};q.prototype.Fm=function(){return this.Yb().yL()};q.prototype.vu=function(){return this.Yb().AL()};
q.prototype.uu=function(){return this.Yb().zL()};q.prototype.xL=function(){return this.Yb().vL()};q.prototype.Ze=function(p){this.Ub!=p&&(this.Ub=p,this.xe(),this.ta&&(this.ta.fc(),this.ta.Yd()),this.FK())};q.prototype.FK=function(){var p=!1;this.mb&&this.Ub&&0<this.kl()&&(this==this.mb?p=!0:this.ta&&(p=this.ta.nA));this.nA!=p&&this.H8(p)};q.prototype.H8=function(p){this.nA=p;this.set("inView",p);this.nA?this.trigger(new g(c.kd)):this.trigger(new g(c.cd))};q.prototype.m_a=function(p){this.nta!=p&&
(this.nta=p,this.ta&&this.ta.Yd())};q.prototype.d_a=function(p){this.NI!=p&&(this.NI=p,this.fc())};q.prototype.c_a=function(p){this.MI!=p&&(this.MI=p,this.fc())};q.prototype.b_a=function(p){this.LI!=p&&(this.LI=p,this.fc())};q.prototype.a_a=function(p){this.KI!=p&&(this.KI=p,this.fc())};q.prototype.e_a=function(p){this.sn!=p&&(this.sn=p,void 0!=this.sn&&(this.Nn=void 0),this.fc())};q.prototype.$Za=function(p){this.QD!=p&&(this.QD=p,void 0!=this.QD&&(this.Mn=void 0),this.fc())};q.prototype.y_a=function(p){this.Nn!=
p&&(this.Nn=p,void 0!=this.Nn&&(this.sn=void 0),this.fc())};q.prototype.u_a=function(p){this.Mn!=p&&(this.Mn=p,void 0!=this.Mn&&(this.QD=void 0),this.fc())};q.prototype.o_a=function(p){this.Fw!=p&&(void 0!=p&&(this.z_=void 0),this.Fw=p,this.ta&&this.ta.Yd(),this.fc())};q.prototype.N_a=function(p){this.zr!=p&&(void 0!=p&&(this.B_=void 0),this.zr=p,this.ta&&this.ta.Yd(),this.fc())};q.prototype.A_a=function(p){this.UQ!=p&&(void 0!=p&&(this.A_=void 0),this.UQ=p,this.ta&&this.ta.Yd(),this.fc())};q.prototype.RZa=
function(p){this.FN!=p&&(void 0!=p&&(this.y_=void 0),this.FN=p,this.ta&&this.ta.Yd(),this.fc())};q.prototype.v_a=function(p){this.z_!=p&&(void 0!=p&&(this.Fw=void 0),this.z_=p,this.ta&&this.ta.Yd(),this.fc())};q.prototype.x_a=function(p){this.B_!=p&&(void 0!=p&&(this.zr=void 0),this.B_=p,this.ta&&this.ta.Yd(),this.fc())};q.prototype.w_a=function(p){this.A_!=p&&(void 0!=p&&(this.UQ=void 0),this.A_=p,this.ta&&this.ta.Yd(),this.fc())};q.prototype.t_a=function(p){this.y_!=p&&(void 0!=p&&(this.FN=void 0),
this.y_=p,this.ta&&this.ta.Yd(),this.fc())};q.prototype.VZa=function(p){this.Lz!=p&&(this.Lz=p,this.ta&&this.ta.Yd())};q.prototype.WZa=function(p){this.Mz!=p&&(this.Mz=p,this.ta&&this.ta.Yd())};q.prototype.Au=function(){return isNaN(this.sn)?this.cm:this.sn};q.prototype.zu=function(){return isNaN(this.QD)?this.bm:this.QD};q.prototype.fUa=function(){return isNaN(this.mSa)?this.fua:this.mSa};q.prototype.xu=function(){return isNaN(this.NI)?this.qP:this.NI};q.prototype.gy=function(){return isNaN(this.MI)?
this.pP:this.MI};q.prototype.j3=function(){return isNaN(this.LI)?1E4:this.LI};q.prototype.i3=function(){return isNaN(this.KI)?1E4:this.KI};q.prototype.Mya=function(p){this.Faa()!=p&&(this.Yb().Cab(p),this.fc())};q.prototype.Faa=function(){return this.Yb().j_};q.prototype.Oya=function(p){this.Haa()!=p&&(this.Yb().Eab(p),this.fc())};q.prototype.Haa=function(){return this.Yb().l_};q.prototype.Nya=function(p){this.Gaa()!=p&&(this.Yb().Dab(p),this.fc())};q.prototype.Gaa=function(){return this.Yb().k_};
q.prototype.Lya=function(p){this.Eaa()!=p&&(this.Yb().Bab(p),this.fc())};q.prototype.Eaa=function(){return this.Yb().i_};q.prototype.OU=function(p){if(this.Lw!=p){var r=0==this.Lw!=(0==p);this.Lw=p;this.ol();r&&this.ta&&this.ta.Yd()}};q.prototype.PU=function(p){if(this.Mw!=p){var r=0==this.Mw!=(0==p);this.Mw=p;this.ol();r&&this.ta&&this.ta.Yd()}};q.prototype.f7a=function(){return 0!=this.Lw||0!=this.Mw};q.prototype.Oh=function(p){this.Mb!=p&&(this.Mb=p,n.css(this.WI(),{filter:"alpha(opacity="+Math.round(100*
this.Mb)+") ",opacity:this.Mb}),this.FK(),this.ol())};q.prototype.kl=function(){return this.Mb};q.prototype.OZa=function(p){this.dd().Tv!=p&&(this.Rl().ila(p),this.dd().ila(p))};q.prototype.bTa=function(){return this.dd().Tv};q.prototype.PZa=function(p){this.dd().Uv!=p&&(this.Rl().jla(p),this.dd().jla(p))};q.prototype.cTa=function(){return this.dd().Uv};q.prototype.GZa=function(p){this.dd().Rv!=p&&(this.Rl().dla(p),this.dd().dla(p))};q.prototype.$Sa=function(){return this.dd().Rv};q.prototype.HZa=
function(p){this.dd().Sv!=p&&(this.Rl().ela(p),this.dd().ela(p))};q.prototype.aTa=function(){return this.dd().Sv};q.prototype.KZa=function(p){this.dd().yq!=p&&(this.dd().gla(p),this.Yb().gla(p),this.fc())};q.prototype.gsa=function(){return this.dd().yq};q.prototype.QZa=function(p){this.dd().Aq!=p&&(this.dd().kla(p),this.Yb().kla(p),this.fc())};q.prototype.isa=function(){return this.dd().Aq};q.prototype.MZa=function(p){this.dd().zq!=p&&(this.dd().hla(p),this.Yb().hla(p),this.fc())};q.prototype.hsa=
function(){return this.dd().zq};q.prototype.IZa=function(p){this.dd().xq!=p&&(this.dd().fla(p),this.Yb().fla(p),this.fc())};q.prototype.fsa=function(){return this.dd().xq};q.prototype.JZa=function(p){this.dd().y$a(p)};q.prototype.NZa=function(p){this.dd().A$a(p)};q.prototype.LZa=function(p){this.dd().z$a(p)};q.prototype.FZa=function(p){this.dd().x$a(p)};q.prototype.z0=function(p){this.Rl().Ze(p)};q.prototype.G_a=function(p){this.Rl().$$a(p)};q.prototype.J_a=function(p){this.Rl().vbb(p)};q.prototype.E_a=
function(p){this.Rl().w$a(p)};q.prototype.I_a=function(p){this.Rl().Yab(p)};q.prototype.H_a=function(p){this.Rl().Oh(p)};q.prototype.F_a=function(p){this.Rl().setColor(p)};q.prototype.BZa=function(p){this.XSa()!=p&&this.dd().Oh(p)};q.prototype.XSa=function(){return this.dd().kl()};q.prototype.xZa=function(p){this.WSa()!=p&&this.dd().setColor(p)};q.prototype.WSa=function(){return this.dd().wL()};q.prototype.zZa=function(p){this.dd().G$a(p)};q.prototype.yZa=function(p){this.dd().F$a(p)};q.prototype.AZa=
function(p){this.dd().dab(p)};q.prototype.$A=function(p){this.ci!=p&&(this.ci=p,this.ol())};q.prototype.M_a=function(p){this.Hfa!==p&&(this.Hfa=p,this.Xd().tabIndex=void 0===this.Hfa?void 0:this.Hfa)};q.prototype.vZa=function(p){this.D8!=p&&((this.D8=p)?this.Xd().setAttribute("aria-label",this.D8):this.Xd().removeAttribute("aria-label"))};q.prototype.wZa=function(p){this.E8!=p&&((this.E8=p)?this.Xd().setAttribute("role",this.E8):this.Xd().removeAttribute("role"))};q.prototype.jF=function(p){this.Pq!=
p&&(this.Pq=p,n.css(this.WI(),{"z-index":this.Pq?e.LMa:e.KMa}),this.Yb().WIa(this.Pq),this.ol())};q.prototype.afa=function(p){this.cxa!=p&&(this.cxa=p,n.css(this.Xd(),{"z-index":this.cxa?e.qNa:e.pNa}),this.ol())};q.prototype.tq=function(){this.FK();this.CT()};q.prototype.Pn=function(){this.FK()};q.prototype.Bea=function(){};q.prototype.xba=function(){this.CT();this.xe();this.fc();this.Yd();this.ol()};q.prototype.Kw=function(){this.pP=this.qP=this.bm=this.cm=0;this.fua=void 0};q.prototype.CT=function(){var p=
this.Db();p&&p.$H.CT(this)};q.prototype.xe=function(){var p=this.Db();p&&p.$H.xe(this)};q.prototype.fc=function(){var p=this.Db();p&&p.$H.fc(this)};q.prototype.Yd=function(){var p=this.Db();p&&p.$H.Yd(this)};q.prototype.ol=function(){var p=this.Db();p&&p.$H.ol(this)};q.prototype.Saa=function(){var p=isNaN(this.z_)&&isNaN(this.Fw),r=isNaN(this.A_)&&isNaN(this.UQ);return isNaN(this.sn)&&isNaN(this.Nn)&&(p||r)?!0:!1};q.prototype.bta=function(){var p=isNaN(this.B_)&&isNaN(this.zr),r=isNaN(this.y_)&&isNaN(this.FN);
return isNaN(this.QD)&&isNaN(this.Mn)&&(p||r)?!0:!1};q.prototype.x2a=function(){this.Kw();var p=this.fUa();if(p){var r=this.Saa(),t=this.bta();r&&!t?(r=this.Af(),0!=r&&(this.cm=r*p+this.Fm()+this.uu(),this.bm=r+this.vu()+this.xL())):!r&&t&&(r=this.Bf(),0!=r&&(this.bm=r/p+this.Fm()+this.uu(),this.cm=r+this.Fm()+this.uu()))}!isNaN(this.NI)&&this.cm<this.NI&&(this.cm=this.NI);!isNaN(this.LI)&&this.cm>this.LI&&(this.cm=this.LI);!isNaN(this.MI)&&this.bm<this.MI&&(this.bm=this.MI);!isNaN(this.KI)&&this.bm>
this.KI&&(this.bm=this.KI)};q.prototype.Hb=function(){if(!this.fAa){this.fAa=!0;var p=this.Xd(),r=this.WI();p.appendChild(this.Rl().Xd());p.appendChild(r);r.appendChild(this.dd().Xd());r.appendChild(this.Yb().Xd())}};q.prototype.Jcb=function(){this.x2a();var p=this.Au(),r=this.zu(),t=this.xu(),u=this.gy();return p!=this.AWa||r!=this.zWa||t!=this.wWa||u!=this.vWa||this.Nn!=this.yWa||this.Mn!=this.xWa?(this.AWa=p,this.zWa=r,this.wWa=t,this.vWa=u,this.yWa=this.Nn,this.xWa=this.Mn,!0):!1};q.prototype.bb=
function(){this.ol()};q.prototype.cj=function(){};q.prototype.EIa=function(p,r,t,u){if(this.Na!=p||this.Qa!=r||this.sa!=t||this.wa!=u)this.Na=p,this.Qa=r,this.sa=t,this.wa=u,this.dd().setSize(this.sa,this.wa),this.Yd(),this.ol(),this.trigger(new g(c.tc))};q.prototype.rh=function(){var p=this.Xd(),r=this.WI();this.Ub?(r.style.width=this.sa+"px",r.style.height=this.wa+"px",p.style.left=this.Na+this.Lw+"px",p.style.top=this.Qa+this.Mw+"px",p.style.width=this.sa+"px",p.style.height=this.wa+"px",p.style.visibility=
"inherit",p.style.overflow="visible",p.style.cursor=this.mb&&this.mb.b$.BDa(this.ci),0===r.clientWidth&&0!==this.sa&&(p.style.width=0,p.style.width=this.sa+"px")):(p.style.visibility="hidden",p.style.width=0,p.style.height=0,p.style.overflow="hidden",r.style.width=0,r.style.height=0);this.Rl().rh();this.dd().rh();this.Yb().rh();!this.yta&&this.mb&&(this.yta=!0,this.mb.Aja()?this.yba():this.mb.bind(c.uo,this.yba,this,!0))};q.prototype.yba=function(){this.trigger(c.INIT)};q.prototype.F6a=function(p){p=
p.hd().offset();var r=this.hd().offset(),t={};t.left=r.left-p.left;t.top=r.top-p.top;this.mb&&(t.left/=this.mb.JA,t.top/=this.mb.JA);return t};q.$I=0;return q});
define("S","require er lV pB cI hh nJ".split(" "),function(a){var d=a("er"),l=a("lV"),m=a("pB"),k=a("cI"),c=a("hh"),h=a("nJ"),f=l.extend(h,function(){this.o={};this.lx=this.Sra=void 0;this.RA={};this.Pra=!0;this.oza={};h.call(this);this.DRa();this.yb();this.Re("UICustomizable");this.xe()});f.Ic={ariaLabel:void 0,ariaRole:void 0,visible:!0,includeInLayout:!0,state:void 0,left:void 0,right:void 0,top:void 0,bottom:void 0,centerX:void 0,centerY:void 0,width:void 0,height:void 0,minWidth:void 0,minHeight:void 0,
maxWidth:void 0,maxHeight:void 0,actualWidth:void 0,actualHeight:void 0,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,opacity:1,borderRadius:0,borderTopRadius:void 0,borderBottomRadius:void 0,borderLeftRadius:void 0,borderRightRadius:void 0,borderTopLeftRadius:void 0,borderTopRightRadius:void 0,borderBottomLeftRadius:void 0,borderBottomRightRadius:void 0,borderSize:0,borderLeftSize:void 0,borderTopSize:void 0,borderRightSize:void 0,borderBottomSize:void 0,borderColor:void 0,borderLeftColor:void 0,
borderTopColor:void 0,borderRightColor:void 0,borderBottomColor:void 0,shadow:!1,shadowHorizontalLength:0,shadowVerticalLength:3,shadowBlurRadius:6,shadowSpread:0,shadowColor:"#000000",shadowOpacity:void 0,tabIndex:void 0,backgroundOpacity:1,backgroundColor:void 0,backgroundColorRatios:void 0,backgroundColorDirection:void 0,backgroundImageUrl:void 0,hideEffect:void 0,showEffect:void 0};f.prototype.DRa=function(){this.oza[c.lc]=c.Bb};f.prototype.yb=function(){this.Io(f.Ic)};f.prototype.Io=function(b){for(var e in b){var g=
b[e],n=g&&g.length;n&&"string"!=typeof g?1==n?this.h(e,g[0]):2==n?this.A(e,g[0],g[1]):3==n&&this.A(e,g[0],g[1],g[2]):this.h(e,g)}};f.prototype.h=function(b,e){this.o[b]={i:!0,d:e}};f.prototype.kUa=function(){var b=[],e;for(e in this.o)b.push(e);return b};f.prototype.A=function(b,e,g,n){this.RA[e]||(this.RA[e]={});this.h(b,n);this.RA[e][g]=b};f.prototype.mK=function(b,e){if(e)this.Sra=b;else if(void 0!=this.Sra)return;if(this.lx!=b){if(e=this.RA[this.lx])for(var g in e)(this.o[g]||(this.o[g]={})).i=
!0;this.lx=b;if(e=this.RA[this.lx])for(g in e)(this.o[g]||(this.o[g]={})).i=!0;this.xe()}};f.prototype.ra=function(b){if(d(b).isString())this.set(b,void 0);else{var e=b;for(b in e)this.set(b,e[b])}};f.prototype.set=function(b,e){var g=this.o[b];g?(void 0==e&&(e=g.d),d.isEqual(this.get(b),e)||("state"==b&&this.mK(e,!0),h.prototype.set.call(this,b,e),g.i=!0,this.xe())):h.prototype.set.call(this,b,e)};f.prototype.get=function(b,e){switch(b){case "actualWidth":return this.Wa();case "actualHeight":return this.Ab();
default:var g=h.prototype.get.call(this,b);void 0===g&&((b=this.o[b])&&(g=b.d),void 0===g&&(g=e));return g}};f.prototype.qpa=function(){for(var b="paddingLeft paddingTop paddingRight paddingBottom borderRadius borderTopRadius borderBottomRadius borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderSize borderLeftSize borderTopSize borderRightSize borderBottomSize".split(" "),e=0;e<b.length;e++)if(this.L(b[e]))return!0;return!1};
f.prototype.L=function(b){if((this.o[b]||{}).i)return!0;if(void 0!==this.lx)return b=this.RA[this.lx][b],!!(this.o[b]||{}).i};f.prototype.lF=function(b){(this.o[b]||(this.o[b]={})).i=!0;this.xe()};f.prototype.S=function(b){(this.o[b]||(this.o[b]={})).i=!1;void 0!=this.lx&&(b=this.RA[this.lx][b])&&((this.o[b]||(this.o[b]={})).i=!1)};f.prototype.B=function(){for(var b,e=0;e<arguments.length;e++){for(var g=arguments[e],n=this.lx;n;){if(b=this.RA[n][g])if(b=this.get(b),void 0!=b&&null!=b)return b;n=this.oza[n]}b=
this.get(g);if(void 0!=b&&null!=b)return b}};f.prototype.mfa=function(b){b.source.unbind(m.Gb,this.mfa,this);this.trigger(new k(m.hN))};f.prototype.dba=function(b){b.source.unbind(m.Gb,this.dba,this);this.trigger(new k(m.aN))};f.prototype.Nv=function(){return this.get("ariaLabel")||this.get("toolTip")};f.prototype.bb=function(){if(this.Pra)this.Pra=!1;else if(this.L("visible")){var b=this.B("visible"),e=this.get(b?"hideEffect":"showEffect");e&&e.KL(this)&&(e.unbind(m.Gb,b?this.dba:this.mfa,this),
e.end());(e=this.get(b?"showEffect":"hideEffect"))?e.KL(this)||(this.S("visible"),e.bind(m.Gb,b?this.mfa:this.dba,this),e.play(this)):this.trigger(new k(b?m.hN:m.aN))}this.L("visible")&&(this.Ze(this.B("visible")),this.S("visible"));this.L("includeInLayout")&&(this.m_a(this.B("includeInLayout")),this.S("includeInLayout"));this.L("left")&&(e=this.B("left"),b=f.fo(e),e=void 0===b?e:void 0,this.v_a(b),this.o_a(e),this.S("left"));this.L("top")&&(e=this.B("top"),b=f.fo(e),e=void 0===b?e:void 0,this.x_a(b),
this.N_a(e),this.S("top"));this.L("right")&&(e=this.B("right"),b=f.fo(e),e=void 0===b?e:void 0,this.w_a(b),this.A_a(e),this.S("right"));this.L("bottom")&&(e=this.B("bottom"),b=f.fo(e),e=void 0===b?e:void 0,this.t_a(b),this.RZa(e),this.S("bottom"));this.L("centerX")&&(this.VZa(this.B("centerX")),this.S("centerX"));this.L("centerY")&&(this.WZa(this.B("centerY")),this.S("centerY"));this.L("width")&&(e=this.B("width"),b=f.fo(e),e=void 0===b?e:void 0,this.y_a(b),this.e_a(e),this.S("width"));this.L("height")&&
(e=this.B("height"),b=f.fo(e),e=void 0===b?e:void 0,this.u_a(b),this.$Za(e),this.S("height"));this.L("minWidth")&&(e=this.B("minWidth"),this.d_a(e),this.S("minWidth"));this.L("minHeight")&&(e=this.B("minHeight"),this.c_a(e),this.S("minHeight"));this.L("maxWidth")&&(e=this.B("maxWidth"),this.b_a(e),this.S("maxWidth"));this.L("maxHeight")&&(e=this.B("maxHeight"),this.a_a(e),this.S("maxHeight"));this.L("paddingLeft")&&(this.Mya(this.B("paddingLeft")),this.S("paddingLeft"));this.L("paddingTop")&&(this.Oya(this.B("paddingTop")),
this.S("paddingTop"));this.L("paddingRight")&&(this.Nya(this.B("paddingRight")),this.S("paddingRight"));this.L("paddingBottom")&&(this.Lya(this.B("paddingBottom")),this.S("paddingBottom"));b=!1;this.L("borderRadius")&&(this.S("borderRadius"),b=!0);e=!1;this.L("borderLeftRadius")&&(this.S("borderLeftRadius"),e=!0);var g=!1;this.L("borderTopRadius")&&(this.S("borderTopRadius"),g=!0);var n=!1;this.L("borderRightRadius")&&(this.S("borderRightRadius"),n=!0);var q=!1;this.L("borderBottomRadius")&&(this.S("borderBottomRadius"),
q=!0);if(this.L("borderTopLeftRadius")||g||e||b)this.OZa(this.B("borderTopLeftRadius","borderLeftRadius","borderTopRadius","borderRadius")),this.S("borderTopLeftRadius");if(this.L("borderTopRightRadius")||g||n||b)this.PZa(this.B("borderTopRightRadius","borderRightRadius","borderTopRadius","borderRadius")),this.S("borderTopRightRadius");if(this.L("borderBottomLeftRadius")||q||e||b)this.GZa(this.B("borderBottomLeftRadius","borderLeftRadius","borderBottomRadius","borderRadius")),this.S("borderBottomLeftRadius");
if(this.L("borderBottomRightRadius")||q||n||b)this.HZa(this.B("borderBottomRightRadius","borderRightRadius","borderBottomRadius","borderRadius")),this.S("borderBottomRightRadius");b=!1;this.L("borderSize")&&(this.S("borderSize"),b=!0);if(this.L("borderLeftSize")||b)this.KZa(this.B("borderLeftSize","borderSize")),this.S("borderLeftSize");if(this.L("borderTopSize")||b)this.QZa(this.B("borderTopSize","borderSize")),this.S("borderTopSize");if(this.L("borderRightSize")||b)this.MZa(this.B("borderRightSize",
"borderSize")),this.S("borderRightSize");if(this.L("borderBottomSize")||b)this.IZa(this.B("borderBottomSize","borderSize")),this.S("borderBottomSize");b=!1;this.L("borderColor")&&(this.S("borderColor"),b=!0);if(this.L("borderLeftColor")||b)this.JZa(this.B("borderLeftColor","borderColor")),this.S("borderLeftColor");if(this.L("borderTopColor")||b)this.NZa(this.B("borderTopColor","borderColor")),this.S("borderTopColor");if(this.L("borderRightColor")||b)this.LZa(this.B("borderRightColor","borderColor")),
this.S("borderRightColor");if(this.L("borderBottomColor")||b)this.FZa(this.B("borderBottomColor","borderColor")),this.S("borderBottomColor");this.L("shadow")&&(this.z0(this.B("shadow")),this.S("shadow"));this.L("shadowHorizontalLength")&&(this.G_a(this.B("shadowHorizontalLength")),this.S("shadowHorizontalLength"));this.L("shadowVerticalLength")&&(this.J_a(this.B("shadowVerticalLength")),this.S("shadowVerticalLength"));this.L("shadowBlurRadius")&&(this.E_a(this.B("shadowBlurRadius")),this.S("shadowBlurRadius"));
this.L("shadowSpread")&&(this.I_a(this.B("shadowSpread")),this.S("shadowSpread"));this.L("shadowColor")&&(this.F_a(this.B("shadowColor")),this.S("shadowColor"));this.L("tabIndex")&&(this.M_a(this.B("tabIndex")),this.S("tabIndex"));b=!1;this.L("opacity")&&(this.Oh(this.B("opacity")),this.S("opacity"),b=!0);if(this.L("shadowOpacity")||b)this.H_a(this.B("shadowOpacity","opacity")),this.S("shadowOpacity");this.L("backgroundOpacity")&&(this.BZa(this.B("backgroundOpacity")),this.S("backgroundOpacity"));
this.L("backgroundColor")&&(this.xZa(this.B("backgroundColor")),this.S("backgroundColor"));this.L("backgroundColorRatios")&&(this.zZa(this.B("backgroundColorRatios")),this.S("backgroundColorRatios"));this.L("backgroundColorDirection")&&(this.yZa(this.B("backgroundColorDirection")),this.S("backgroundColorDirection"));this.L("backgroundImageUrl")&&(this.AZa(this.B("backgroundImageUrl")),this.S("backgroundImageUrl"));this.L("ariaRole")&&(this.wZa(this.B("ariaRole")),this.S("ariaRole"));this.vZa(this.Nv());
h.prototype.bb.call(this)};f.fo=function(b){if(d(b).isString()&&(b=b.match(/^\s*([+-]?\d+\.?\d*)\s*%\s*$/))&&2<=b.length)return parseFloat(b[1])};return f});define("kj",["require","er","lV","cI"],function(a){var d=a("er"),l=a("lV"),m=a("cI");return l.extend(m,function(k,c,h,f,b,e,g,n){d.isNumber(c)||(c=1);d.isNumber(h)||(h=0);m.call(this,k);this.scale=c;this.rotation=h;this.x=f;this.y=b;this.pageX=e;this.pageY=g;this.touches=n||[]})});
define("pF",["require","exports","cI"],function(a,d,l){return function(m){function k(c,h,f,b,e,g,n,q){c=m.call(this,c)||this;c.x=h;c.y=f;c.pageX=b;c.pageY=e;c.delta=g;c.NS=n;c.originalEvent=q;c.movementX=q?q.movementX:0;c.movementY=q?q.movementY:0;return c}Z(k,m);return k}(l)});
define("e","require jquery.mod er lV pB hh fC S kj pF gX w mV".split(" "),function(a){var d=a("jquery.mod"),l=a("er"),m=a("lV"),k=a("pB"),c=a("hh"),h=a("fC"),f=a("S"),b=a("kj"),e=a("pF");a("gX");var g=a("w");a=a("mV");var n=m.extend(f,function(){f.call(this);this.Re("UIComponent");this.FX=[];this.uua=0;this.Fca=void 0;this.TRa=500;this.Tc=1;this.No=g.N5();this.TO=this.Bw=this.EY=!1;this.set("propagateClick",!0)});n.Ic={autoRolledOver:!1,autoPressed:!1,contentOpaque:!0,cursor:void 0,inheritedCursor:void 0,
inheritedInteractionEnabled:!0,interactionEnabled:!0,rollOverOpacity:[c.aa,"opacity"],rollOverShadow:[c.aa,"shadow"],toolTipFollowMouse:!1};l.defaults(n.Ic,f.Ic);n.prototype.yb=function(){this.Io(n.Ic)};n.prototype.Hpa=function(){this.Sya(!0)};n.prototype.Gpa=function(){this.Sya(!1)};n.prototype.Epa=function(){this.lK(!0)};n.prototype.Fpa=function(){this.lK(!1)};n.prototype.gR=function(p){this.Bw!=p&&(this.Bw=p,this.Ag())};n.prototype.lK=function(p){this.TO!=p&&(this.TO=p,this.Ag())};n.prototype.Sya=
function(p){this.EY!=p&&(this.EY=p,this.Ag())};n.prototype.Ag=function(){this.Bw?this.mK(c.ka):this.TO&&this.EY?this.mK(c.lc):this.TO?this.mK(c.Bb):this.EY?this.mK(c.aa):this.mK(c.Ke)};n.prototype.trigger=function(){f.prototype.trigger.apply(this,arguments)};n.prototype.Yza=function(p,r){this.trigger(new e(k.hb,p.x,p.y,p.pageX,p.pageY,void 0,void 0,r&&r.originalEvent))};n.prototype.Zza=function(p,r){this.trigger(new e(k.Pb,p.x,p.y,p.pageX,p.pageY,void 0,void 0,r&&r.originalEvent))};n.prototype.$za=
function(p,r){this.trigger(new e(k.Eb,p.x,p.y,p.pageX,p.pageY,void 0,void 0,r&&r.originalEvent))};n.prototype.p1a=function(p,r,t){this.trigger(new e(k.Os,p.x,p.y,p.pageX,p.pageY,r.delta,r.NS,t&&t.originalEvent))};n.prototype.Vza=function(p){this.trigger(new e(k.ma,p.x,p.y,p.pageX,p.pageY))};n.prototype.Wza=function(p){this.trigger(new e(k.El,p.x,p.y,p.pageX,p.pageY))};n.prototype.s1a=function(){this.trigger(new e(k.Gc))};n.prototype.r1a=function(){this.trigger(new e(k.Jb))};n.prototype.n1a=function(){this.trigger(new e(k.RC))};
n.prototype.o1a=function(){this.trigger(new e(k.hq))};n.prototype.m1a=function(p,r,t){this.trigger(new b(k.gz,p,r,t.x,t.y,t.pageX,t.pageY,t.touches))};n.prototype.i1a=function(p,r,t){this.trigger(new b(k.k7,p,r,t.x,t.y,t.pageX,t.pageY,t.touches))};n.prototype.j1a=function(p,r,t){this.trigger(new b(k.CH,p,r,t.x,t.y,t.pageX,t.pageY,t.touches))};n.prototype.k1a=function(p){this.trigger(new b(k.kMa,void 0,p))};n.prototype.l1a=function(p){this.trigger(new b(k.DH,p))};n.prototype.Vfa=function(p){p.stopImmediatePropagation();
this.HI(["touchend"]);this.Eta(p)?this.iea(p):this.Dxa(p,!0)};n.prototype.Dxa=function(p,r){var t=this.bE(p);r&&this.a1a(t);this.Yza(t,p);this.ta&&this.ta.Dxa(p,r&&this.get("propagateClick"))};n.prototype.Ufa=function(p){p.preventDefault();p.stopImmediatePropagation();this.Eta(p)?this.gea(p):this.Cxa(p)};n.prototype.Cxa=function(p){var r=this.bE(p);this.$0a(r);this.Zza(r,p);this.ta&&this.ta.Cxa(p)};n.prototype.maa=function(p,r){var t=p.pageX-r.pageX;p=p.pageY-r.pageY;return Math.sqrt(t*t+p*p)};n.prototype.fB=
function(p,r){this.dO(["touchend"]);!1!==r&&p.preventDefault();p.stopImmediatePropagation();this.XJ?this.hea(p):(r=this.bE(p),this.Bxa(p,this.Dta(r)),this.rta(r));this.XJ=null;this.yN()};n.prototype.Bxa=function(p,r){var t=this.bE(p);this.$za(t,p);this.Z0a(r);this.ta&&this.ta.Bxa(p,r)};n.prototype.a1a=function(p){this.bind(k.Jb,this.Oza,this,!0);this.uF=p};n.prototype.$0a=function(p){if(this.uF){p=this.maa(this.uF,p);if(g.pb()){var r=this.Db();r=.01*n.LNa*Math.min(r.Wa(),r.Ab())}else r=n.RNa;p>r&&
this.e1()}};n.prototype.Z0a=function(p){this.uF&&(this.Vza(this.uF),p&&this.Wza(this.uF),this.e1())};n.prototype.e1=function(){this.uF&&(this.unbind(k.Jb,this.Oza,this),this.uF=void 0)};n.prototype.Oza=function(){this.e1()};n.prototype.gaa=function(p){this.HI(["gesturechange","gestureend"]);p.preventDefault();p.stopImmediatePropagation();this.iea(p)};n.prototype.iea=function(p){var r=this.taa(p);this.XJ=r;this.m1a(r.scale,r.rotation,r.coordinates);this.ta&&this.ta.iea(p)};n.prototype.Vra=function(p){p.preventDefault();
p.stopImmediatePropagation();this.gea(p)};n.prototype.gea=function(p){var r=this.taa(p,this.XJ),t=r.rotation-this.XJ.rotation,u=r.scale/this.XJ.scale;this.XJ=r;this.Tc*=u;for(this.Zk+=t;180<this.Zk;)this.Zk-=360;for(;-180>this.Zk;)this.Zk+=360;this.i1a(this.Tc,this.Zk,r.coordinates);0!=t&&this.k1a(this.Zk);1!=u&&this.l1a(this.Tc);this.e1();this.ta&&this.ta.gea(p)};n.prototype.Xra=function(p){this.dO(["gesturechange","gestureend"]);p.preventDefault();p.stopImmediatePropagation();this.hea(p)};n.prototype.hea=
function(p){var r=this.taa(p);this.j1a(this.Tc,this.Zk,r.coordinates);this.ta&&this.ta.hea(p)};n.prototype.Aca=function(p){this.HI(["mouseup"]);p.stopImmediatePropagation();this.xxa(p,!0);q&&this.cWa(p.ctrlKey)};n.prototype.xxa=function(p,r){var t=this.eA(p);r&&this.qQa(t);this.Yza(t,p);this.ta&&this.ta.xxa(p,r&&this.get("propagateClick"))};n.prototype.Eca=function(p){p.preventDefault();p.stopImmediatePropagation();this.Db().PG(this);this.yxa(p)};n.prototype.yxa=function(p){var r=this.eA(p);this.pQa(r);
this.Zza(r,p);this.ta&&this.ta.yxa(p)};n.prototype.lZ=function(p){this.dO(["mouseup"]);p.preventDefault();p.stopImmediatePropagation();var r=this.eA(p);this.zxa(p,this.Dta(r));this.rta(r)};n.prototype.zxa=function(p,r){var t=this.eA(p);this.$za(t);this.oQa(r);this.ta&&this.ta.zxa(p,r)};n.prototype.qQa=function(p){this.bind(k.Jb,this.uqa,this,!0);this.ED=p};n.prototype.pQa=function(p){this.ED&&this.maa(this.ED,p)>n.ENa&&this.p9()};n.prototype.oQa=function(p){this.ED&&(this.Vza(this.ED),p&&this.Wza(this.ED),
this.p9())};n.prototype.p9=function(){this.ED&&(this.unbind(k.Jb,this.uqa,this),this.ED=void 0)};n.prototype.uqa=function(){this.p9()};n.prototype.wua=function(p){this.mb.vua&&(p.preventDefault(),p.stopImmediatePropagation(),this.Axa(p))};n.prototype.aqa=function(){return!1};n.prototype.Axa=function(p){var r=this.eA(p),t=this.UTa(p);this.ta&&!this.aqa(t.delta)&&this.ta.Axa(p);this.p1a(r,t,p)};n.prototype.eA=function(p){return this.YX(p.pageX,p.pageY)};n.prototype.UTa=function(p){p=window.event||p.originalEvent||
p;var r={};r.delta=Math.max(-1,Math.min(1,p.wheelDelta||-p.detail));r.NS=p.wheelDelta?.01*p.wheelDelta:r.delta;return r};n.prototype.bE=function(p){var r=this.raa(p);if(void 0===r){var t=void 0!==p.pageX?this.YX(p.pageX,p.pageY):this.YX(p.originalEvent.pageX,p.originalEvent.pageY);t.touches=[t]}else 0==r.length?t=this.rYa:(t={x:0,y:0,pageX:0,pageY:0,PB:0,QB:0,touches:[]},Array.from(r).forEach(function(u){u||(u=r[0]);u=this.YX(u.pageX,u.pageY);t.x+=u.x;t.y+=u.y;t.pageX+=u.pageX;t.pageY+=u.pageY;t.PB+=
u.PB;t.QB+=u.QB;t.touches.push(u)}.bind(this)),t.x/=r.length,t.y/=r.length,t.pageX/=r.length,t.pageY/=r.length,t.PB/=r.length,t.QB/=r.length);return this.rYa=t};n.prototype.Eta=function(p){if((p=this.raa(p))&&1<p.length)for(var r=0,t=0;t<p.length;t++)if(this.yVa(p[t].target)&&(r++,1<r))return!0;return!1};n.prototype.yVa=function(p){for(;p;){if(p==this.nc)return!0;p=p.parentNode}return!1};n.prototype.raa=function(p){return p.originalEvent.touches||p.originalEvent.targetTouches||p.originalEvent.changedTouches};
n.prototype.YX=function(p,r){var t=this.hd().offset(),u=this.mb?this.mb.JA:1,v={};v.x=(p-t.left)/u;v.y=(r-t.top)/u;v.pageX=p/u;v.pageY=r/u;v.PB=p;v.QB=r;return v};n.prototype.taa=function(p,r){var t=this.bE(p);return void 0!==p.originalEvent.scale||void 0!==p.originalEvent.rotation?{coordinates:t,scale:p.originalEvent.scale,rotation:p.originalEvent.rotation}:r?(p=this.wsa(p),{coordinates:t,scale:r.scale*p/r.touchesDistance,rotation:0,touchesDistance:p}):{coordinates:t,scale:1,rotation:0,touchesDistance:this.wsa(p)}};
n.prototype.wsa=function(p){var r=this.raa(p);return r&&1<r.length?(p=Math.abs(r[0].pageX-r[1].pageX),r=Math.abs(r[0].pageY-r[1].pageY),Math.sqrt(p*p+r*r)):0};n.prototype.HI=function(p){this.FX=l(this.FX).union(p);p=this.vsa(p);for(var r=0;r<p.length;r++){var t=p[r];t.target.bind(t.name,t.handler)}};n.prototype.rta=function(p){this.uua=(new Date).getTime();this.Fca=p};n.prototype.Dta=function(p){if((new Date).getTime()-this.uua>this.TRa||!this.Fca)return!1;p=this.maa(this.Fca,p);if(g.pb()){var r=
this.Db();r=.01*n.KNa*Math.min(r.Wa(),r.Ab())}else r=n.FNa;return p>r?!1:!0};n.prototype.dO=function(p){this.FX=l(this.FX).difference(p);p=this.vsa(p);for(var r=0;r<p.length;r++){var t=p[r];t.target.unbind(t.name,t.handler)}};n.prototype.vsa=function(p){this.Jra||(this.Jra=this.qaa());for(var r=[],t=0;t<p.length;t++)r=r.concat(this.Jra[p[t]]);return r};n.prototype.qaa=function(){var p=this.hd(),r=d(document),t=d(window);return{touchstart:[{target:p,name:"touchstart",handler:this.Jh(this.Vfa)}],touchmove:[{target:p,
name:"touchmove",handler:this.Jh(this.Ufa)}],touchend:[{target:p,name:"touchend",handler:this.Jh(this.fB,!0)},{target:r,name:"touchend",handler:this.Jh(this.fB,!0)},{target:p,name:"touchcancel",handler:this.Jh(this.fB,!0)},{target:r,name:"touchcancel",handler:this.Jh(this.fB,!0)}],gesturestart:[{target:p,name:"gesturestart",handler:this.Jh(this.gaa)}],gesturechange:[{target:p,name:"gesturechange",handler:this.Jh(this.Vra)}],gestureend:[{target:p,name:"gestureend",handler:this.Jh(this.Xra)}],mousedown:[{target:p,
name:"mousedown",handler:this.Jh(this.Aca)}],mousemove:[{target:p,name:"mousemove",handler:this.Jh(this.Eca)}],mouseup:[{target:p,name:"mouseup",handler:this.Jh(this.lZ,!0)},{target:t,name:"mouseup",handler:this.Jh(this.lZ,!0)}],mousewheel:[{target:p,name:"mousewheel",handler:this.Jh(this.wua)},{target:p,name:"DOMMouseScroll",handler:this.Jh(this.wua)}]}};n.prototype.Jh=function(p,r){var t=this;return function(){r&&h.V5();n.F1+=1;var u=p.apply(t,arguments);--n.F1;return u}};n.prototype.bb=function(){this.L("autoRolledOver")&&
(this.unbind(k.Gc,this.Hpa,this),this.unbind(k.Jb,this.Gpa,this),this.B("autoRolledOver")&&(this.bind(k.Gc,this.Hpa,this),this.bind(k.Jb,this.Gpa,this)),this.S("autoRolledOver"));this.L("autoPressed")&&(this.unbind(k.hb,this.Epa),this.unbind(k.Eb,this.Fpa),this.B("autoPressed")&&(this.bind(k.hb,this.Epa),this.bind(k.Eb,this.Fpa)),this.S("autoPressed"));var p=!1;this.L("contentOpaque")&&(p=!0,this.S("contentOpaque"));this.L("inheritedInteractionEnabled")&&(p=!0,this.S("inheritedInteractionEnabled"));
this.L("interactionEnabled")&&(p=!0,this.S("interactionEnabled"));if(this.L("backgroundOpacity")||this.L("backgroundColor"))p=!0;f.prototype.bb.call(this);if(p){var r=this.dd();r=0<r.kl()&&0<r.FD.length;var t=this.B("contentOpaque"),u=this.B("inheritedInteractionEnabled"),v=this.B("interactionEnabled");this.iF(u&&v&&(t||r))}if(p||this.L("cursor")||this.L("inheritedCursor"))this.S("cursor"),this.S("inheritedCursor"),this.pW?this.$A(this.B("cursor")):this.$A(this.B("inheritedCursor"))};n.prototype.iF=
function(p){this.pW!=p&&((this.pW=p)?this.HI(n.epa):this.dO(n.epa),this.yN())};n.prototype.yN=function(){this.Xd().style["pointer-events"]=this.Psa()};n.prototype.Psa=function(){return this.pW?"auto":"none"};n.prototype.cWa=function(p){if(p){p=[];for(var r=this;r;)p.push(r),r=r.getParent();console.log(p.map(function(t){return t.wq}))}else console.log(this.wq)};n.H3=function(){return 0<n.F1};n.epa=function(){var p=[];p=p.concat(["touchstart","touchmove"]);g.zd()!=g.yi&&(p=p.concat(["mousedown","mousemove",
"mousewheel"]));return p}();n.F1=0;n.Zdb=1E3;n.RNa=10;n.LNa=5;n.ENa=10;n.KNa=10;n.FNa=10;var q=a.mg("debug");return n});define("bM",["require","exports"],function(){return function(){return function(a,d,l,m){void 0===m&&(m=void 0);this.name=a;this.from=d;this.to=l;this.q8a=m}}()});
define("pd",["require","exports","bM"],function(a,d,l){function m(b){return function(e,g,n){e=Math.abs(g-e);return 1>e/n?0:1/(1-Math.pow((e-n)/e,1/b))}}function k(b){var e=new f;e.Dia=function(g,n,q,p){return g+(n-g)*Math.pow(0>=q?0:q>=p?1:q/p,b)};e.Qja=m(b);return e}function c(b){var e=new f;e.Dia=function(g,n,q,p){return g+(n-g)*(1-Math.pow(1-(0>=q?0:q>=p?1:q/p),b))};e.Qja=m(b);return e}function h(b){var e=new f;e.Dia=function(g,n,q,p){q=0>=q?0:q>=p?1:q/p;.5>q?q=Math.pow(2*q,b):(q=1-Math.pow(1-
(2*q-1),b),q+=1);return g+.5*(n-g)*q};e.Qja=m(b);return e}a=function(){function b(e,g,n){void 0===n&&(n=void 0);switch(e){case "quad_in":this.curve=k(2);break;case "quad_out":this.curve=c(2);break;case "quad_in_out":this.curve=h(2);break;case "cubic_in":this.curve=k(3);break;case "cubic_out":this.curve=c(3);break;case "cubic_in_out":this.curve=h(3);break;case "quart_in":this.curve=k(4);break;case "quart_out":this.curve=c(4);break;case "quart_in_out":this.curve=h(4);break;case "quint_in":this.curve=
k(5);break;case "quint_out":this.curve=c(5);break;case "quint_in_out":this.curve=h(5);break;default:this.curve=k(1)}this.Wx=g.slice();this.time=0;this.duration=this.$Ba(g,n);this.iia={};for(e=0;e<this.Wx.length;e++)this.iia[this.Wx[e].name]=g[e].from}b.prototype.Kia=function(e){for(var g=0;g<this.Wx.length;g++)if(this.Wx[g].name==e)return this.Wx[g];return null};b.prototype.eb=function(e){return this.iia[e]};b.prototype.Aja=function(){return 0<this.time};b.prototype.Xe=function(){return this.time>=
this.duration};b.prototype.ui=function(){return this.duration};b.prototype.ll=function(){return this.time/this.duration};b.prototype.getTime=function(){return this.time};b.prototype.setTime=function(e){this.time=Math.min(Math.max(0,e),this.duration);for(e=0;e<this.Wx.length;e++){var g=this.Wx[e];this.iia[g.name]=this.curve.Dia(g.from,g.to,this.time,this.duration)}};b.prototype.Fb=function(e){this.setTime(this.time+e)};b.prototype.$Ba=function(e,g,n){void 0===n&&(n=void 0);for(var q=[],p=0;p<this.Wx.length;p++){var r=
this.Wx[p],t=n?n:r.q8a;void 0!==t&&0<t&&q.push(this.curve.Qja(r.from,r.to,t/1E3))}if(0<q.length){e=q[0];for(p=1;p<q.length;p++)e=Math.max(e,q[p]);return void 0!==g&&0<g?Math.max(g,e):e}return void 0!==g?Math.max(g,.001):this.$Ba(e,g,1E3)};b.ui=function(){return(new b(void 0,[new l("",void 0,void 0,void 0)])).ui()};return b}();var f=function(){return function(){}}();return a});
define("eF","require lV mz pB cI bo pd bM".split(" "),function(a){var d=a("lV"),l=a("mz");a("pB");var m=a("cI"),k=a("bo"),c=a("pd"),h=a("bM"),f={},b=d.extend(l,function(){l.call(this);this.C="stopped";this.Sb=void 0;this.op=[];this.set("easing","linear");this.set("duration",1E3);this.set("loop",!1);this.set("animationDirection","normal")});b.prototype.play=function(e){e||(e=f);this.KL(e)||("stopped"==this.C||0>this.op.indexOf(e)?(this.C="playing",this.op.push(e),this.bf=0,this.Sb=Math.max(this.get("duration",
1E3),1),this.tg=new c(this.get("easing","linear"),[new h("pos",0,1)],this.Sb),this.tg.setTime(this.bf),this.pK(),this.yx(),this.EQ()):this.C="playing")};b.prototype.reverse=function(e){e||(e=f);this.b8a(e)||("stopped"==this.C||0>this.op.indexOf(e)?(this.C="playingReverse",this.op.push(e),this.bf=this.Sb=Math.max(this.get("duration",1E3),0),this.tg=new c(this.get("easing","linear"),[new h("pos",0,1)],this.Sb),this.tg.setTime(this.bf),this.pK(),this.yx(),this.EQ()):this.C="playingReverse")};b.prototype.stop=
function(){"stopped"!=this.C&&(this.C="stopped",0!==this.bf&&(this.bf=0,this.tg.setTime(this.bf),this.yx(),this.EQ()))};b.prototype.end=function(){"stopped"!=this.C&&(this.bf=this.Sb,this.tg.setTime(this.bf),this.yx(),this.EQ())};b.prototype.cancel=function(){this.C="stopped";this.bf=0;this.op=[]};b.prototype.KL=function(e){return"playing"==this.C&&0<=this.op.indexOf(e)};b.prototype.b8a=function(e){return"playingReverse"==this.C&&0<=this.op.indexOf(e)};b.prototype.ek=function(e){"stopped"!=this.C&&
(this.bf="playing"==this.C?Math.min(this.Sb,this.bf+e):Math.max(0,this.bf-e),this.tg.setTime(this.bf),this.yx(),this.EQ())};b.prototype.ll=function(){return this.tg&&this.tg.eb("pos")||0};b.prototype.$z=function(e){if(this.op)for(var g=0;g<this.op.length;g++)e.call(this,this.op[g],g)};b.prototype.pK=function(){this.trigger(new m("playingReverse"==this.C?b.WLa:b.YLa))};b.prototype.yx=function(){this.trigger(new m(b.E6))};b.prototype.nK=function(){this.trigger(new m(b.vk))};b.prototype.oK=function(){this.trigger(new m(b.kv))};
b.prototype.EQ=function(){"playingReverse"==this.C&&0>=this.bf?(this.bf=0,this.oK(),this.op=[],"stopped"!=this.C&&(this.C="stopped",this.get("loop")&&this.play())):"playing"==this.C&&this.bf>=this.Sb?(this.bf=this.Sb,this.nK(),this.op=[],"stopped"!=this.C&&(this.C="stopped","alternate"==this.get("animationDirection")?this.reverse():this.get("loop")&&this.play())):"stopped"!=this.C&&k.requestFrame(this.ek,this)};b.YLa="start";b.E6="frame";b.vk="end";b.WLa="reverseStart";b.kv="reverseEnd";return b});
define("bu",["require","lV","eF"],function(a){var d=a("lV"),l=a("eF");a=d.extend(l,function(){l.call(this);this.s8=this.q8=null});a.prototype.pK=function(){l.prototype.pK.call(this);this.q8=[];this.s8=[];this.$z(function(m){this.q8.push(this.get("alphaFrom",m.kl()));this.s8.push(this.get("alphaTo",m.kl()))});this.X_()};a.prototype.yx=function(){l.prototype.yx.call(this);this.X_()};a.prototype.X_=function(){this.$z(function(m,k){var c=this.q8[k];k=c+(this.s8[k]-c)*this.ll();!(0<m.kl()&&m.Ub)&&0<k?
(m.Oh(0),m.Ze(!0),m.Oh(k)):0==k?(m.Ze(!1),m.Oh(1)):m.Oh(k)})};a.prototype.nK=function(){this.X_();l.prototype.nK.call(this)};a.prototype.oK=function(){this.X_();l.prototype.oK.call(this)};return a});define("og",["require","lV","bu"],function(a){var d=a("lV"),l=a("bu");return d.extend(l,function(){l.call(this);this.set("alphaFrom",0);this.set("alphaTo",1)})});
define("oB",["require","lV","bu"],function(a){var d=a("lV"),l=a("bu");return d.extend(l,function(){l.call(this);this.set("alphaFrom",1);this.set("alphaTo",0)})});
define("hT","require lV jquery.mod er pz cl pB w e og oB".split(" "),function(a){function d(){this.Ub=!1;this.ER=null;this.wa=this.sa=100;this.jba=this.Gi=void 0;this.kba=100;this.xa=document.createElement("div");this.xa.style.opacity=0;this.xa.style.display="none";this.xa.style.transition="opacity 0.3s";this.xa.addEventListener("transitionend",this.Zfa.bind(this));this.te=document.createElement("div");this.BIa(!0);this.te.style.position="absolute";this.te.style.left=0;this.te.style.top=0;this.te.style.right=
0;this.te.style.bottom=0;this.xa.appendChild(this.te);this.ic=document.createElement("img");this.ic.style.cursor="pointer";this.ic.style.position="absolute";this.ic.style.left="50%";this.ic.style.top="50%";this.ic.style.transform="translate(-50%, -50%)";this.xa.appendChild(this.ic);this.V7=k(this.xa)}function l(t,u){this.reason=t;this.yp=u}var m=a("lV"),k=a("jquery.mod");a("er");a("pz");var c=a("cl"),h=a("pB"),f=a("w"),b=a("e"),e=a("og"),g=a("oB"),n=m.extend(b,function(){b.call(this);this.Re("UserInteractionWindow");
this.qc=null;this.Lt=[];var t=new e;t.set("duration",500);t.set("easing","cubic_in");var u=new g;u.set("duration",500);u.set("easing","cubic_out");this.ra({contentOpaque:!0,left:0,top:0,right:0,bottom:0,hideEffect:u,showEffect:t,visible:!1});this.bind(h.tc,this.Zga,this,!0);this.bind(h.ma,this.W2a,this,!0)});n.prototype.Zga=function(){this.qc&&this.qc.setSize(this.Bf(),this.Af())};n.prototype.W2a=function(){var t=this.Lt.slice();this.Lt=[];this.C1();t.forEach(function(u){u.yp.call(u.context)})};n.prototype.Hb=
function(){b.prototype.Hb.call(this);this.qc||(this.qc=new d,this.qc.setSize(this.Bf(),this.Af()),this.qc.Ze(!0),this.Yb().append(this.qc.hd().css({position:"absolute",left:0,top:0,right:0,bottom:0,overflow:"hidden"})),this.C1())};n.prototype.tq=function(){b.prototype.tq.call(this);this.getParent().bind(h.tc,this.Zga,this,!0);n.eOa(this)};n.prototype.Pn=function(){this.getParent().unbind(h.tc,this.Zga,this,!0);b.prototype.Pn.call(this);n.LYa(this)};n.prototype.c$a=function(t){this.Kt(p,t)};n.prototype.rU=
function(t){this.Kt(q,t)};n.prototype.Kt=function(t,u){this.Lt.push(new l(t,u));this.Lt.sort(function(v,w){return r[v.reason]-r[w.reason]});this.C1()};n.prototype.i4a=function(t){this.cancel(p,t)};n.prototype.g4a=function(){this.cancel(q,void 0)};n.prototype.cancel=function(t,u){t=this.mUa(t,u);0<=t&&this.WYa(t)};n.prototype.iI=function(){this.uW(!0)};n.prototype.Gz=function(){this.uW(!1)};n.prototype.mUa=function(t,u){for(var v=0;v<this.Lt.length;v++){var w=this.Lt[v];if(w.reason==t&&w.yp==u)return v}return-1};
n.prototype.C1=function(){if(this.qc){var t=this.xUa();if(t){switch(t.reason){case q:this.qc.sla(d.dna);break;case p:this.qc.sla(d.l7)}this.set("visible",!0)}else this.set("visible",!1)}};n.prototype.WYa=function(t){this.Lt.splice(t,1);t==this.Lt.length&&this.C1()};n.prototype.xUa=function(){return 0<this.Lt.length?this.Lt[0]:null};var q="vr",p="play",r={};r[q]=0;r[p]=1;d.prototype.hd=function(){return this.V7};d.prototype.setSize=function(t,u){if(this.sa!==t||this.wa!==u)this.sa=t,this.wa=u,this.D1()};
d.prototype.BIa=function(t){this.te.style.backdropFilter=t?"blur(8px)":"none"};d.prototype.Ze=function(t){this.Ub!=t&&(this.Ub=t,this.ER&&(clearTimeout(this.ER),this.ER=null),this.Ub?(this.xa.style.display="block",this.xa.style.opacity=0,this.ER=setTimeout(function(){this.ER=null;this.xa.style.opacity=1}.bind(this),30)):this.xa.style.opacity=0)};d.prototype.sla=function(t){this.Gi!=t&&(this.Gi=t,this.c2a())};d.prototype.Zfa=function(){this.Ub||(this.xa.style.display="none")};d.prototype.c2a=function(){switch(this.Gi){case d.l7:this.jba=
c.qz;this.kba=c.C7;break;case d.dna:this.jba=c.sNa,this.kba=c.tNa}this.ic.src=this.jba;this.D1()};d.prototype.D1=function(){f.pb()?(this.ic.style.maxWidth=Math.round(.5*this.sa)+"px",this.ic.style.width="20vmin"):(this.ic.style.maxWidth=Math.round(.33*this.sa)+"px",this.ic.style.width=this.kba+"px")};d.l7="play";d.dna="vr";n.Pna=d;n.md=[];n.Eda=[];n.eOa=function(t){n.md.push(t);n.Eda.forEach(function(u){n.sta(t,u)});n.Eda=[]};n.LYa=function(t){n.md.splice(n.md.indexOf(t),1)};n.ready=function(){return 0<
n.md.length};n.rU=function(t){n.md.length?n.md.forEach(function(u){n.sta(u,t)}):n.Eda.push(t)};n.sta=function(t,u){t.rU(function(){n.md.forEach(function(v){v!=t&&v.g4a()});u()})};return n});
define("dj",["require","exports"],function(){return function(){function a(){}a.addParameter=function(d){this.removeParameter(d);var l=this.toArray();l.push(d);this.wKa(l)};a.removeParameter=function(d){var l=this.toArray().filter(function(m){return m!=d});this.wKa(l)};a.toArray=function(){var d=window.location.hash.substring(1);return d.length?d.split("&"):[]};a.wKa=function(d){window.location.hash="#"+(d.length?d.join("&"):"")};return a}()});
define("gS","require exports w ij jt e nO fC hT dj jG mV".split(" "),function(a,d,l,m,k,c,h,f,b,e,g,n){var q=!1;f.wait(function(){setTimeout(function(){q=!0},10)});return function(){function p(){}p.aH=function(r){this.WCa(r)};p.WCa=function(r){function t(){v.WCa(r)}function u(){v.Bbb(r)}var v=this;this.XR.LL?m.disabled?k.bna.show(function(){m.Pka(t)}):h.enabled()||!c.H3()?(h.Tr(),b.rU(t)):u():this.XR.X4?u():l.CB()?u():l.jc()==l.bv||l.jc()==l.cv?q?u():c.H3()?setTimeout(u,10):b.rU(function(){setTimeout(u,
10)}):c.H3()?u():b.rU(u)};p.Bbb=function(r){function t(){u.p$a(r)}var u=this;l.jc()==l.uH?(e.removeParameter("vr"),k.zLa.show(t,function(){e.addParameter("vr")}.bind(this))):l.jc()==l.vC?k.uoa.show(t):l.jc()==l.wV?k.uoa.show():t()};p.p$a=function(r){function t(){v.XR.$ka=g.iMa;r()}function u(){v.XR.$ka=g.BH;r()}var v=this;!l.pb()||l.Ef()?u():"1"==n.getQueryParameter("cardboard_version")?u():"2"==n.getQueryParameter("cardboard_version")?t():k.o6.show(t,u)};return p}()});
define("u",["require","jquery.mod","nO"],function(a){function d(){g.get(0)==document.body&&h.height(window.innerHeight)}function l(p,r){var t={},u;for(u in r)t[u]=p.css(u);n.push({$el:p,css:t});p.css(r)}function m(p){this.xa=p}var k=a("jquery.mod"),c=a("nO");m.prototype.E2=function(){this.enabled()||this.toggle()};m.prototype.Tr=function(){this.enabled()&&this.toggle()};m.prototype.toggle=function(){this.enabled()?m.cancel():m.request(this.xa)};m.prototype.enabled=function(){return m.enabled(this.xa)};
var h=k("<div/>").css({position:"fixed",bottom:0,left:0,height:"100vh",width:"100vw"}),f=k("<div/>"),b=null,e=null,g=null,n=[],q=null;m.request=function(p){if(p!==b){m.cancel();b=p;var r=c.fullscreenElement()||document.body;e=k(p);g=k(r);f.insertAfter(e);e.appendTo(h);g.children().each(function(){l(k(this),{visibility:"hidden"})});l(e,{position:"absolute",left:0,top:0,width:"100%",height:"100%"});r==document.body?l(h,{position:"fixed",left:0,top:"",right:"",bottom:0,height:"100vh",width:"100vw",margin:0,
padding:0}):l(h,{position:"absolute",left:0,top:0,right:"",bottom:"",width:"100%",height:"100%",margin:0,padding:0});h.appendTo(g);d();q=setInterval(d,300)}};m.cancel=function(){if(b){h.detach();e.insertBefore(f);for(f.detach();n.length;){var p=n.pop();p.$el.css(p.css)}g=e=b=null;n=[];clearInterval(q)}};m.enabled=function(p){return b==p};return m});
define("lO","require lV pB cI gF pz cl".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cI"),k=a("gF"),c=a("pz");a=a("cl");var h=['<div style="position: absolute; top: 5vmin; right:5vmin;">','<img style="width:24vmin" src="'+a.zl+'"/>','</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"),f=h+['<img style="width:22vmin" src="'+a.gN+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+
c("rotate-device")+"</div>"].join("\n")+"</div>\n</div>",b=h+['<img style="width:13vmin; vertical-align:middle;" src="'+a.hNa+'"/>','<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>";d=d.extend(k,function(){k.call(this);this.jm=this.Go=this.Ho=this.fP=this.gP=this.bca=this.cca=
void 0;this.uY=!1;this.WA=this.Sda=this.aca=this.Jf=null;this.Ura=[];this.yba=this.sr=!1;this.Dc=this.Dc.bind(this)});d.prototype.request=function(){this.sr||(this.sr=!0,this.J9(),window.addEventListener("resize",this.Dc),document.body.appendChild(this.Jf),document.body.appendChild(this.WA),this.D0a=document.documentElement.style.overflow,this.C0a=document.body.style.overflow,document.documentElement.style.overflow="auto",document.body.style.overflow="auto",this.iQ())};d.prototype.cancel=function(){this.sr&&
(this.sr=!1,window.removeEventListener("resize",this.Dc),document.body.style.overflow=this.C0a,document.documentElement.style.overflow=this.D0a,document.body.removeChild(this.Jf),document.body.removeChild(this.WA),this.Cya(!1))};d.prototype.enabled=function(){return this.uY};d.prototype.J9=function(){this.Jf||(this.Jf=this.kX({position:"fixed",top:0,left:0,zIndex:9999998},!0),this.Jf.id="tdvminuictr",this.Sda=this.kX({position:"fixed",backgroundColor:"#fff",top:0,left:0,textAlign:"center"},!0,f),
this.Jf.appendChild(this.Sda),this.aca=this.kX({position:"fixed",backgroundColor:"#fff",top:0,left:0,textAlign:"center"},!0,b),this.Jf.appendChild(this.aca),this.WA=this.kX({position:"absolute",top:0,left:0,right:0,height:"999999999vmax",zIndex:9999999},!1),this.WA.id="tdvminuiscrl",this.WA.addEventListener("touchend",this.Dc))};d.prototype.kX=function(e,g,n){var q=document.createElement("div");this.aR(q,e);void 0!==n&&this.k_a(q,n);g&&this.Ura.push(q);return q};d.prototype.Dc=function(){[0,250,1E3,
2E3].forEach(function(e){setTimeout(this.hda.bind(this),e)}.bind(this))};d.prototype.hda=function(){this.Ho==window.innerWidth&&this.Go==window.innerHeight||this.iQ()};d.prototype.iQ=function(){this.Ho=window.innerWidth;this.Go=window.innerHeight;this.jm=this.Ho>this.Go?"landscape":"portrait";if("landscape"==this.jm){this.cca&&this.bca&&this.MVa(this.cca,this.bca)&&(!this.gP&&!this.fP||this.NVa(this.gP,this.fP))&&(this.gP=this.Ho,this.fP=this.Go);this.HVa()&&(this.gP=this.Ho,this.fP=this.Go);this.cca=
this.Ho;this.bca=this.Go;var e=this.gP==this.Ho&&this.fP==this.Go}else e=!1;this.Ura.forEach(function(p){p.style.height=this.Go+"px";p.style.width=this.Ho+"px"}.bind(this));var g=this.sr&&"portrait"==this.jm,n=this.sr&&"landscape"==this.jm&&!e,q=this.sr&&"landscape"==this.jm;this.aR(this.Jf,{display:g||n?"block":"none"});this.aR(this.Sda,{display:g?"block":"none"});this.aR(this.aca,{display:n?"block":"none"});this.aR(this.WA,{display:q?"block":"none",right:n?0:"99.9%"});this.Cya(e)};d.prototype.Cya=
function(e){null!=this.s0&&(clearTimeout(this.s0),this.s0=null);this.uY!=e&&(this.s0=setTimeout(function(){this.s0=null;(this.uY=e)?this.trigger(new m(l.Tp)):this.trigger(new m(l.Gb));this.trigger(new m(l.ba))}.bind(this),e?1E3:0))};d.prototype.HVa=function(){var e=window.innerWidth,g=window.innerHeight,n=Infinity;[[480,320],[960,640],[1136,640],[1334,750],[1920,1080],[2001,1125],[2048,1536],[2172,1125],[2208,1242],[2732,2048],[2436,1125]].forEach(function(q){n=Math.min(n,Math.abs(100-100*e*q[1]/
(g*q[0])))});return 1>=n?!0:!1};d.prototype.MVa=function(e,g){return e*window.innerHeight>g*window.innerWidth};d.prototype.NVa=function(e,g){return e*window.innerHeight>=g*window.innerWidth};d.prototype.aR=function(e,g){for(var n in g)e.style[n]=g[n]};d.prototype.k_a=function(e,g){e.innerHTML=g};return new d});
define("pG",["require","exports"],function(){return function(){function a(){}a.enable=function(){null===this.wakeLock&&navigator.wakeLock&&navigator.wakeLock.request("screen").then(function(d){this.wakeLock=d}.bind(this))};a.disable=function(){null!==this.wakeLock&&(this.wakeLock.release(),this.wakeLock=null)};a.wakeLock=null;return a}()});
define("la",["require","jquery.mod","pz","cl"],function(a){function d(){this.Sj=null;this.V=!1;this.Dc=this.Dc.bind(this);this.Go=this.Ho=this.jm=void 0}var l=a("jquery.mod"),m=a("pz"),k=a("cl");d.prototype.Zv=function(){this.Sj||(this.Sj=l("<div/>"),this.Sj.css({position:"fixed","z-index":1E6,left:0,top:0,margin:0,padding:0,height:"100%",width:"100%","background-color":"rgba(255, 255, 255, 0.99)"}),this.Sj.html(['<div style="position: absolute; top: 5vmin; right:5vmin;">','<img style="width:24vmin" src="'+
k.zl+'"/>','</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="'+k.gN+'"/>','<div style="color:#000; font-family:Arial, Helvetica, sans-serif; font-size:3.6vmin; line-height:4.3vmin; margin:5vmin 0; text-align:center;">'+m("rotate-device")+"</div>","</div>\n</div>"].join("\n")))};d.prototype.show=function(c){this.V||(this.V=!0,this.Zv(),
l(c).append(this.Sj),l(window).on("resize",this.Dc),this.iQ())};d.prototype.hide=function(){this.V&&(this.V=!1,l(window).off("resize",this.Dc),this.Sj.detach())};d.prototype.Dc=function(){[0,250,1E3,2E3].forEach(function(c){setTimeout(this.hda.bind(this),c)}.bind(this))};d.prototype.hda=function(){this.Ho==window.innerWidth&&this.Go==window.innerHeight||this.iQ()};d.prototype.iQ=function(){this.Ho=window.innerWidth;this.Go=window.innerHeight;this.jm=this.Ho>this.Go?"landscape":"portrait";this.Sj.toggle("landscape"!=
this.jm)};return new d});
define("hU","require exports pB w jt dj nO u lO pG la bo".split(" "),function(a,d,l,m,k,c,h,f,b,e,g,n){function q(p,r){p?setTimeout(r,200):r()}return function(){function p(){}p.request=function(r,t){this.XR.isPresenting||this.XR.GT||(this.ul=r,this.Qka=t,this.ul&&(this.XR.GT=!0,this.z8a(),this.requestSession().then(function(u){this.a9a(u);this.ul.xr.setReferenceSpaceType("local-floor");this.ul.xr.setFoveation(this.Qka.tDa);return this.ul.xr.setSession(u)}.bind(this)).then(function(){this.XR.referenceSpace=this.ul.xr.getReferenceSpace();
this.XR.GT=!1;this.b9a()}.bind(this)).catch(function(u){console.error(u);this.XR.GT=!1;this.$8a()}.bind(this))))};p.end=function(){this.XR.session&&this.XR.session.end()};p.requestSession=function(){var r,t=["local-floor","bounded-floor","hand-tracking"];(null===(r=this.ul)||void 0===r?0:r.capabilities.isWebGL2)&&t.push("layers");return navigator.xr.requestSession("immersive-vr",{optionalFeatures:t})};p.z8a=function(){n.QU(!0);this.W$a(this.ul);this.zbb()};p.a9a=function(r){this.nka||(this.nka=this.Z8a.bind(this));
this.oka||(this.oka=this.c9a.bind(this));r.addEventListener("end",p.nka);r.addEventListener("select",p.oka)};p.$8a=function(){n.QU(!1);this.jKa()};p.b9a=function(){var r;null===(r=this.ul)||void 0===r?void 0:r.xr.setAnimationLoop(this.eo.bind(this));n.oJa(this.requestFrame.bind(this),this.j4a.bind(this));n.QU(!1);this.mJa(this.ul,this.Qka);this.ul=null;m.jc()!=m.OM&&g.show(h.fullscreenElement());m.pb()||k.Xma.show(this.XR.xia.bind(this.XR))};p.Z8a=function(){var r;this.XR.session&&(this.XR.session.removeEventListener("end",
p.nka),this.XR.session.removeEventListener("select",p.oka),null===(r=this.ul)||void 0===r?void 0:r.xr.setAnimationLoop(null),n.g$a(),this.jKa(),this.mJa(null,null))};p.c9a=function(){this.XR.N.trigger(l.nq)};p.mJa=function(r,t){this.XR.nh!==r&&(this.XR.nh=r,this.XR.yl=t,this.XR.session=r?r.xr.getSession():null,this.XR.isPresenting=!!r,this.XR.WB=r?this.XR.Nka.get(r)||null:null,this.XR.Ru=r?this.XR.Mka.get(r)||null:null,this.VKa(),q(!this.XR.isPresenting,function(){this.XR.N.trigger(l.ba)}.bind(this)))};
p.W$a=function(r){var t=void 0;m.pG()?t=1.2545454545454546:m.Ef()?t=1.4222222222:m.pb()&&this.XR.LL&&(t=this.XR.M4);t&&r.xr.setFramebufferScaleFactor(t)};p.zbb=function(){var r;f.request(null===(r=this.ul)||void 0===r?void 0:r.domElement);this.XR.LL&&(this.ul.domElement.width=this.ul.domElement.height=100,m.jc()==m.PM?c.addParameter("vr"):e.enable(),m.jc()==m.OM&&b.request())};p.jKa=function(){f.cancel();g.hide();m.pb()||k.Xma.hide();this.XR.LL&&(c.removeParameter("vr"),b.cancel(),e.disable())};p.eo=
function(r){var t;null!==(t=this.XR.nh)&&void 0!==t&&t.xr.getFrame()&&(this.VKa(),t=this.V2,this.V2=null,this.XR.N.trigger(l.tV),t&&t(r),this.XR.N.trigger(l.Vh))};p.VKa=function(){if(this.XR.session&&this.XR.session.renderState)if(this.XR.session.renderState.baseLayer)this.XR.framebufferWidth=this.XR.session.renderState.baseLayer.framebufferWidth,this.XR.framebufferHeight=this.XR.session.renderState.baseLayer.framebufferHeight;else{var r=this.XR.session.renderState.layers;r&&0<r.length&&r[0].textureWidth&&
(this.XR.framebufferWidth=r[0].textureWidth,this.XR.framebufferHeight=r[0].textureHeight)}};p.requestFrame=function(r){this.V2=r;return 0};p.j4a=function(){this.V2=null};p.ul=null;p.Qka=null;p.V2=null;return p}()});
define("kQ","require exports lV gF bh qd n jo iR jG F nM dC hQ jC kI cN gS hU three.mod".split(" "),function(a,d,l,m,k,c,h,f,b,e,g,n,q,p,r,t,u,v,w,x){a=function(){function y(){}y.initialize=function(z){k.initialize(function(){this.Pm.forEach(function(B){B.xr.enabled=this.LM}.bind(this));n.initialize();q.initialize();p.initialize();r.initialize();t.initialize();c.initialize();this.WEa=!0;z()}.bind(this))};y.getType=function(){return this.LL?this.Cv.zl:this.Cv.yNa};y.TS=function(z,B){this.WEa?!this.LM||
this.isPresenting||this.GT||this.aH(function(){w.request(z,B)}.bind(w)):this.initialize(function(){y.TS(z,B)}.bind(y))};y.xia=function(){w.end()};y.zJa=function(z){t.Qab(z)};y.setScale=function(z){c.setScale(z)};y.setPosition=function(z){c.setPosition(z)};y.qM=function(z){c.qM(z)};y.zla=function(z,B,D,F){f.fab(z,B,D);switch(F){case b.A7:p.uJa(!0);p.gJa(!0);break;default:p.uJa(!1),p.gJa(!1)}};y.I3a=function(z){z.xr.enabled=this.LM;f.add(z)};y.Y9a=function(z){f.remove(z)};y.yla=function(z,B,D,F){void 0===
F&&(F=void 0);z.wi=B;z.bM=D;z.Gu=F;B&&(z.jHa=Date.now())};y.kJa=function(z,B){B!=z.disabled&&(z.disabled=B)};y.yIa=function(z,B){p.s$a(z,B)};y.Mab=function(z,B){z.Nr=B};y.xla=function(z,B){z.hidden=B};y.log=function(){l.log("VR: "+(this.LM?"available":"not available"))};y.aH=function(z){v.aH(z)};y.Wna=h;y.Cv=g;y.ZV=b;y.voa=u;y.LM=!0;y.LL=!1;y.nh=null;y.WB=null;y.Ru=null;y.isPresenting=!1;y.GT=!1;y.session=null;y.framebufferWidth=void 0;y.framebufferHeight=void 0;y.dg=new x.Quaternion;y.aCa=1.7;y.Ec=
new x.Vector3;y.Am=1;y.nH=new x.Quaternion;y.bdb=new x.Vector3;y.M4=Math.min(1,1280/(Math.max(screen.width,screen.height)*window.devicePixelRatio));y.Pm=[];y.yl=null;y.Nka=new Map;y.Mka=new Map;y.N=new m;y.referenceSpace=null;y.WEa=!1;y.og=[];y.qL=new x.Ray;y.X4=null;return y}();k.XR=a;c.XR=a;f.XR=a;n.XR=a;q.XR=a;p.XR=a;r.XR=a;t.XR=a;v.XR=a;return w.XR=a});
define("iN",["require","exports","pB","kQ"],function(a,d,l,m){var k=/^\s*((\+|\-)?(\d*\.)?\d+)\s*(vmin|vmax|vw|vh|px|%)?\s*$/i;return function(){function c(h){this.mb=h;this.bL=this.bL.bind(this);this.mb.bind(l.tc,this.Dc,this,!0);m.N.bind(l.ba,this.Dc,this,!0);this.ifa=new Map;this.OW=[];this.Dc()}c.prototype.Dc=function(){var h=this;this.R2a();this.ifa.forEach(function(f){for(var b in f)h.bL(f[b])});this.OW.forEach(this.bL)};c.prototype.R2a=function(){var h;if(m.isPresenting)var f=h=1024;else h=
this.mb.Wa(),f=this.mb.Ab();this.Q1=.01*h;this.K1=.01*f;this.mBa=Math.min(this.Q1,this.K1);this.lBa=Math.max(this.Q1,this.K1)};c.prototype.bL=function(h){h(this.Q1,this.K1,this.mBa,this.lBa)};c.prototype.r3a=function(h){this.OW.push(h)};c.prototype.L9a=function(h){h=this.OW.indexOf(h);0<=h&&this.OW.splice(h,1)};c.prototype.Y1=function(h,f,b,e){function g(q,p,r,t){f.call(h,b,n(q,p,r,t))}var n=c.dTa(e);(e=this.ifa.get(h))||this.ifa.set(h,e={});e[b]=g;g(this.Q1,this.K1,this.mBa,this.lBa)};c.get=function(h){var f=
c.md.get(h);f||(f=new c(h),c.md.set(h,f));return f};c.Y1=function(h,f,b,e){var g=h.get&&h.get("application")||h.Db&&h.Db();g?(c.vxa(),c.get(g).Y1(h,f,b,e)):c.nOa(h,f,b,e)};c.nOa=function(h,f,b,e){c.Fda.push({instance:h,ybb:f,name:b,value:e});c.PJ||(c.PJ=setTimeout(function(){c.PJ=null;c.vxa()},100))};c.vxa=function(){c.PJ&&(clearTimeout(c.PJ),c.PJ=null);var h=c.Fda;c.Fda=[];h.forEach(function(f){c.Y1(f.instance,f.ybb,f.name,f.value)})};c.dTa=function(h){var f=c.vD[h];if(f)return f;if("string"!=typeof h)return c.vD[h]=
function(){return h};var b=(f=k.exec(h))&&parseFloat(f[1]);switch(f&&f[4]&&f[4].toLowerCase()){case "vw":return c.vD[h]=function(e){return e*b};case "vh":return c.vD[h]=function(e,g){return g*b};case "vmin":return c.vD[h]=function(e,g,n){return n*b};case "vmax":return c.vD[h]=function(e,g,n,q){return q*b};default:return c.vD[h]=function(){return h}}};c.md=new Map;c.Fda=[];c.PJ=null;c.vD={};return c}()});
define("fq","require jquery.mod er iv iN mV lV".split(" "),function(a){function d(b,e,g){this.AD=b;this.ON=g;this.q_=e.parent;this.PVa=e.isValidRoot||!1;this.wda={};this.rda=[];this.Xwa=[];this.Wwa=[];this.rX={};b=e.properties||{};for(var n in b)g=b[n],this.wda[n]=g.type,g.isUrl&&this.Xwa.push(n),g.isSize&&this.Wwa.push(n),void 0!==g.order&&(this.rda[g.order]=n),void 0!==g["default"]&&(this.rX[n]=g["default"]);this.Uwa=[];this.Vwa=[];e=e.events||{};for(var q in e)e[q].isDeferred?this.Uwa.push(q):
this.Vwa.push(q);this.mA=this.Xz=this.oO=this.D0=this.mF=this.E1=this.EF=this.FI=this.dI=this.zN=void 0;this.Jta=!1}var l=a("jquery.mod"),m=a("er"),k=a("iv"),c=a("iN"),h=a("mV"),f=a("lV");k=f.b5a(k);d.prototype.w6a=function(){if(this.q_)return d.Xi(this.q_)};d.prototype.cG=function(){return this.AD};d.prototype.eT=function(){return this.jA()?this.tw().eT().concat(this.AD):[this.AD]};d.prototype.hasAttributes=function(){return 0<this.getAttributeNames().length};d.prototype.hasAttribute=function(b){return this.Fia(b)?
!0:!1};d.prototype.getAttributeNames=function(){void 0==this.zN&&this.Lqa();return this.zN};d.prototype.aEa=function(){if(this.rda)return this.rda;if(this.jA())this.tw().aEa();else return[]};d.prototype.EDa=function(){if(this.FI)return this.FI;this.FI={};if(this.jA()){var b=this.tw().EDa(),e;for(e in b)this.FI[e]=b[e]}if(this.rX)for(e in this.rX)this.FI[e]=this.rX[e];return this.FI};d.prototype.Fia=function(b){void 0==this.dI&&this.Lqa();return this.dI[b]};d.prototype.m7a=function(){return 0<this.nEa().length};
d.prototype.nEa=function(){void 0==this.EF&&this.Tqa();return this.EF};d.prototype.L6a=function(){void 0==this.E1&&this.Tqa();return this.E1};d.prototype.k7a=function(){return 0<this.iEa().length};d.prototype.iEa=function(){void 0==this.mF&&this.Sqa();return this.mF};d.prototype.J6a=function(){void 0==this.D0&&this.Sqa();return this.D0};d.prototype.Y6a=function(){return 0<this.Jia().length};d.prototype.CEa=function(b){void 0==this.Xz&&this.wI();return-1!=this.Xz.indexOf(b)};d.prototype.Jia=function(){void 0==
this.Xz&&this.wI();return this.Xz};d.prototype.c7a=function(){return 0<this.Qia().length};d.prototype.DEa=function(b){void 0==this.mA&&this.wI();return-1!=this.mA.indexOf(b)};d.prototype.Qia=function(){void 0==this.mA&&this.wI();return this.mA};d.prototype.$6a=function(b){void 0==this.oO&&this.wI();return-1!=this.oO.indexOf(b)};d.prototype.b6a=function(){void 0==this.oO&&this.wI();return this.oO};d.prototype.QDa=function(){return this.PVa||this.jA()&&this.tw().QDa()};d.prototype.Dm=function(b,e,g,
n){this.oYa(e,g);var q=this.ON;var p=n&&0<n.length?new (f.extend(q,function(){q.apply(this,n)})):new q;p.set("application",b);p.set("baseDirectoy",e);p.set("queryStringParameters",g);p.set("class",this.cG());return p};d.prototype.oYa=function(b,e){this.Jta||(this.Jta=!0,this.BRa(b,e),this.nSa(),this.WNa())};d.prototype.BRa=function(b,e){if(this.m7a()||this.k7a()){var g=this.ON.prototype,n=this.L6a(),q=this.J6a(),p=g.set;g.set=function(r,t){n[r]?(!t||h.BB(t)||h.E3(t)||h.Y7a(t)||(t=h.lB(h.Ny(t,b),e)),
p.call(this,r,t)):q[r]?c.Y1(this,p,r,t):p.call(this,r,t)}}};d.prototype.WNa=function(){var b=this.ON.prototype;this.getAttributeNames().forEach(function(e){Object.defineProperty(b,e,{get:function(){return this.get(e)},set:function(g){this.set(e,g)},enumerable:!0,configurable:!0})})};d.prototype.nSa=function(){var b=this.ON.prototype,e=this;this.hasAttributes()&&(b.set=b.set,b.get=b.get);if(this.Y6a()||this.c7a())b.bind=b.bind,b.getBindings=b.uL,b.hasBindings=b.r3,b.trigger=b.trigger,b.unbind=b.unbind;
b.getClassName=function(){return e.cG()};b.getClassPath=function(){return e.eT()};b.getAttributeNames=function(){return e.getAttributeNames()};b.getEventNames=function(){return e.b6a()};b.hasEvent=function(g){return e.$6a(g)}};d.prototype.Lqa=function(){this.zN=[];this.dI={};for(var b in this.wda)this.zN.push(b),this.dI[b]=d.paa(this.wda[b]);if(this.jA())for(var e=this.tw(),g=e.getAttributeNames(),n=0;n<g.length;n++)b=g[n],this.dI[b]||(this.zN.push(b),this.dI[b]=e.Fia(b))};d.prototype.Tqa=function(){this.EF=
this.Xwa.slice();this.jA()&&(this.EF=m(this.EF).union(this.tw().nEa()));this.E1={};for(var b=0;b<this.EF.length;b++)this.E1[this.EF[b]]=!0};d.prototype.Sqa=function(){this.mF=this.Wwa.slice();this.jA()&&(this.mF=m(this.mF).union(this.tw().iEa()));this.D0={};for(var b=0;b<this.mF.length;b++)this.D0[this.mF[b]]=!0};d.prototype.wI=function(){this.Xz=this.Uwa.slice();this.mA=this.Vwa.slice();this.jA()&&(this.Xz=m(this.Xz).union(this.tw().Jia()),this.mA=m(this.mA).union(this.tw().Qia()));this.oO=m(this.Xz).union(this.mA)};
d.prototype.jA=function(){return this.q_?!0:!1};d.prototype.tw=function(){return d.Xi(this.q_)};d.j9=new Map;d.mqa=new Map;d.define=function(b,e,g){e=f.extend(e,function(){g.apply(this,arguments);var q=n.EDa(),p;for(p in q)this.set(p,q[p])});var n=new d(b,k[b],e);d.j9.set(b,n);d.mqa.set(e,n);return e};d.getAll=function(){var b=[];d.j9.forEach(function(e){b.push(e)});return b};d.Xi=function(b){return d.j9.get(b)};d.L5a=function(b){return d.mqa.get(b)};d.Ja=function(b,e){b=d.Xi(b);if(m(e).isNull())return!0;
if(e&&e.constructor)for(e=d.L5a(e.constructor);e;){if(e==b)return!0;e=e.w6a()}return!1};d.paa=function(b){switch(b){case "string":case "code":return d.E0a;case "number":return d.tWa;case "bool":return d.sPa;case "color":return d.tQa;case "percent":return d.ZXa;case "size":return d.Y_a;case "identifier":return d.ZUa;case "array":return d.rpa;case "canvas":return d.RPa;case "img":return d.bVa;case "dict":return d.$Xa;case "*":return d.cSa;default:if(d.xVa(b))switch(d.iTa(b)){case "array":var e=d.paa(d.bsa(b));
return function(q,p){q=d.rpa(q,p);for(var r=0;r<q.length;r++)q[r]=e(q[r],p);return q};case "enum":var g=d.csa(b);return d.kTa(g);case "or":g=d.csa(b);var n=m(g).map(function(q){return d.paa(q)});return function(q,p){for(var r=0;r<n.length;r++)try{return n[r](q,p)}catch(t){}throw"Invalid value";};default:throw"Invalid type validator definition: "+b;}else return d.qn(function(q){return d.Ja(b,q)})}};d.xVa=function(b){return 0<=b.indexOf("[")&&b.lastIndexOf("]")==b.length-1};d.iTa=function(b){return b.substring(0,
b.indexOf("["))};d.bsa=function(b){return b.substring(b.indexOf("[")+1,b.lastIndexOf("]"))};d.csa=function(b){b=d.bsa(b);for(var e=[],g="",n=0,q=0;q<b.length;q++){var p=b.charAt(q);g+=p;switch(p){case "[":n++;break;case "]":n--;break;case ",":0==n&&(e.push(g.substr(0,g.length-1)),g="")}}""!=g&&e.push(g);return m(e).map(function(r){return d.x1a(r)})};d.x1a=function(b){return b.replace(/^\s+|\s+$/g,"")};d.qn=function(b){return function(e,g){if(!b(e)){if("string"!=typeof e)throw"Invalid value";e=d.lSa(e,
g);if(!b(e))throw"Invalid value";}return e}};d.lSa=function(b,e){return function(){return eval(b)}.call(e)};d.cSa=function(b){return b};d.tWa=d.qn(function(b){return"[object Number]"==Object.prototype.toString.call(b)});d.E0a=d.qn(function(b){return"string"==typeof b||null===b});d.sPa=d.qn(function(b){return!0===b||!1===b});d.rpa=d.qn(function(b){return"[object Array]"==Object.prototype.toString.call(b)});d.RPa=d.qn(function(b){return b&&"CANVAS"==b.tagName});d.bVa=d.qn(function(b){return b&&"IMG"==
b.tagName});d.kTa=function(b){return d.qn(function(e){return-1!=b.indexOf(e)})};d.MX=function(b,e){return m(b).isString()&&e.test(b)};d.ZUa=d.qn(function(b){return d.MX(b,RegExp("^[a-z][a-z0-9_]*$","i"))});d.ZXa=d.qn(function(b){return d.MX(b,RegExp("^\\s*([+-]?\\d+\\.?\\d*)%\\s*$","i"))});d.Y_a=d.qn(function(b){return d.MX(b,RegExp("^\\s*([+-]?\\d+\\.?\\d*)\\s*((vw)|(vh)|(vmin)|(vmax)|(px))\\s*$","i"))});d.tQa=d.qn(function(b){return d.MX(b,RegExp("^#[0-9a-f]{6}$","i"))});d.$Xa=d.qn(function(b){try{return l.isPlainObject(b)}catch(e){return!1}});
window.TDV.PlayerAPI.getClassByName=function(b){return d.Xi(b).ON};return d});
define("jl",["require"],function(){function a(){c[0]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=c[16]=0;this.Lha=c;this.pT=1779033703;this.qT=3144134277;this.rT=1013904242;this.sT=2773480762;this.tT=1359893119;this.uT=2600822924;this.vT=528734635;this.wT=1541459225;this.block=this.start=this.pB=this.eja=0;this.Bia=this.t3=!1;this.first=!0}var d="0123456789abcdef".split(""),l=[-2147483648,8388608,32768,128],m=[24,16,8,0],k=[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],c=[];a.prototype.update=function(h){if(!this.Bia){for(var f,b=0,e,g=h.length,n=this.Lha;b<g;){this.t3&&(this.t3=!1,n[0]=this.block,n[16]=n[1]=n[2]=n[3]=n[4]=n[5]=n[6]=n[7]=n[8]=n[9]=n[10]=n[11]=n[12]=n[13]=n[14]=n[15]=0);for(e=this.start;b<g&&64>e;++b)f=h.charCodeAt(b),128>f?n[e>>2]|=f<<m[e++&3]:(2048>f?n[e>>2]|=(192|f>>6)<<m[e++&3]:(55296>f||57344<=f?n[e>>
2]|=(224|f>>12)<<m[e++&3]:(f=65536+((f&1023)<<10|h.charCodeAt(++b)&1023),n[e>>2]|=(240|f>>18)<<m[e++&3],n[e>>2]|=(128|f>>12&63)<<m[e++&3]),n[e>>2]|=(128|f>>6&63)<<m[e++&3]),n[e>>2]|=(128|f&63)<<m[e++&3]);this.j8a=e;this.pB+=e-this.start;64<=e?(this.block=n[16],this.start=e-64,this.hash(),this.t3=!0):this.start=e}4294967295<this.pB&&(this.eja+=this.pB/4294967296<<0,this.pB%=4294967296);return this}};a.prototype.fDa=function(){if(!this.Bia){this.Bia=!0;var h=this.Lha,f=this.j8a;h[16]=this.block;h[f>>
2]|=l[f&3];this.block=h[16];56<=f&&(this.t3||this.hash(),h[0]=this.block,h[16]=h[1]=h[2]=h[3]=h[4]=h[5]=h[6]=h[7]=h[8]=h[9]=h[10]=h[11]=h[12]=h[13]=h[14]=h[15]=0);h[14]=this.eja<<3|this.pB>>>29;h[15]=this.pB<<3;this.hash()}};a.prototype.hash=function(){var h=this.pT,f=this.qT,b=this.rT,e=this.sT,g=this.tT,n=this.uT,q=this.vT,p=this.wT,r=this.Lha,t;for(t=16;64>t;++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=
f&b;for(t=0;64>t;t+=4){if(this.first){var x=704751109;u=r[0]-210244248;p=u-1521486534<<0;e=u+143694565<<0;this.first=!1}else{v=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10);u=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7);x=h&f;var y=x^h&b^w;var z=g&n^~g&q;u=p+u+z+k[t]+r[t];v+=y;p=e+u<<0;e=u+v<<0}v=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10);u=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7);w=e&h;y=w^e&f^x;z=p&g^~p&n;u=q+u+z+k[t+1]+r[t+1];v+=y;q=b+u<<0;b=u+v<<0;v=(b>>>2|b<<30)^(b>>>13|b<<19)^(b>>>22|b<<10);
u=(q>>>6|q<<26)^(q>>>11|q<<21)^(q>>>25|q<<7);x=b&e;y=x^b&h^w;z=q&p^~q&g;u=n+u+z+k[t+2]+r[t+2];v+=y;n=f+u<<0;f=u+v<<0;v=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10);u=(n>>>6|n<<26)^(n>>>11|n<<21)^(n>>>25|n<<7);w=f&b;y=w^f&e^x;z=n&q^~n&p;u=g+u+z+k[t+3]+r[t+3];v+=y;g=h+u<<0;h=u+v<<0}this.pT=this.pT+h<<0;this.qT=this.qT+f<<0;this.rT=this.rT+b<<0;this.sT=this.sT+e<<0;this.tT=this.tT+g<<0;this.uT=this.uT+n<<0;this.vT=this.vT+q<<0;this.wT=this.wT+p<<0};a.prototype.p7a=function(){this.fDa();var h=this.pT,
f=this.qT,b=this.rT,e=this.sT,g=this.tT,n=this.uT,q=this.vT,p=this.wT;return d[h>>28&15]+d[h>>24&15]+d[h>>20&15]+d[h>>16&15]+d[h>>12&15]+d[h>>8&15]+d[h>>4&15]+d[h&15]+d[f>>28&15]+d[f>>24&15]+d[f>>20&15]+d[f>>16&15]+d[f>>12&15]+d[f>>8&15]+d[f>>4&15]+d[f&15]+d[b>>28&15]+d[b>>24&15]+d[b>>20&15]+d[b>>16&15]+d[b>>12&15]+d[b>>8&15]+d[b>>4&15]+d[b&15]+d[e>>28&15]+d[e>>24&15]+d[e>>20&15]+d[e>>16&15]+d[e>>12&15]+d[e>>8&15]+d[e>>4&15]+d[e&15]+d[g>>28&15]+d[g>>24&15]+d[g>>20&15]+d[g>>16&15]+d[g>>12&15]+d[g>>
8&15]+d[g>>4&15]+d[g&15]+d[n>>28&15]+d[n>>24&15]+d[n>>20&15]+d[n>>16&15]+d[n>>12&15]+d[n>>8&15]+d[n>>4&15]+d[n&15]+d[q>>28&15]+d[q>>24&15]+d[q>>20&15]+d[q>>16&15]+d[q>>12&15]+d[q>>8&15]+d[q>>4&15]+d[q&15]+d[p>>28&15]+d[p>>24&15]+d[p>>20&15]+d[p>>16&15]+d[p>>12&15]+d[p>>8&15]+d[p>>4&15]+d[p&15]};a.prototype.digest=function(){this.fDa();var h=this.pT,f=this.qT,b=this.rT,e=this.sT,g=this.tT,n=this.uT,q=this.vT,p=this.wT;return[h>>24&255,h>>16&255,h>>8&255,h&255,f>>24&255,f>>16&255,f>>8&255,f&255,b>>
24&255,b>>16&255,b>>8&255,b&255,e>>24&255,e>>16&255,e>>8&255,e&255,g>>24&255,g>>16&255,g>>8&255,g&255,n>>24&255,n>>16&255,n>>8&255,n&255,q>>24&255,q>>16&255,q>>8&255,q&255,p>>24&255,p>>16&255,p>>8&255,p&255]};return function(h){return(new a(!0)).update(h).p7a()}});
define("ce",["require","jl"],function(a){function d(){for(var c=[[256,"9799e3eb6096a48f515a94324200b7af24251a4131eccf9a2cd65d012a1f5c71"],[1024,"cbab1f6d618e723188cfdb1c7c3f47146e46da4da56030386d85055016afd5d9"],[1E4,"d9c4539649520e3f4a35e5a3331b0fbdc67958dd64ef65a83a75d545413643dd"]],h=0;h<c.length;h++){var f=Array.apply(null,Array(c[h][0])).map((b,e)=>String.fromCharCode(e%256)).join("");if(k(f)!=c[h][1])return!1}return!0}function l(c){var h=Array.isArray(c)?"array":null===c?"null":typeof c;switch(h){case "array":return"["+
c.map(l).join(",")+"]";case "object":return"{"+Object.keys(c).sort().map(function(f){return l(f)+":"+l(c[f])}).join(",")+"}";case "boolean":return c?"true":"false";case "number":return c.toFixed(3);case "string":return'"'+c.split('"').join('\\"')+'"';case "null":case "undefined":return h;case "function":return"<"+h+">"}return""}function m(c){return c.map(function(h){return String.fromCharCode(h)}).join("")}var k=a("jl");return{validate:function(c){var h=[104,97,115,104],f=[116,100,118],b=window.location[m([111,
114,105,103,105,110])],e=c[m(h)];delete c[m(h)];c=m(f)+l(c);c=k(c);f=m(f)+b;f=k(f);return c==e||f==e||!d()}}});define("oo",["require"],function(){function a(d,l,m){this.set("undefined"!=typeof d?d:0,"undefined"!=typeof l?l:0,"undefined"!=typeof m?m:0)}a.prototype.set=function(d,l,m){this.x=d;this.y=l;this.z=m;return this};a.prototype.clone=function(){return new a(this.x,this.y,this.z)};a.prototype.apply=function(d){d.XK(this)};a.prototype.project=function(d){d.project(this)};return a});
define("a",["require","lV","oo"],function(a){var d=a("lV"),l=a("oo"),m=d.extend(l,function(k,c,h){l.call(this,k,c,h)});m.prototype.clone=function(){return new m(this.x,this.y,this.z)};m.prototype.Pc=function(){return 0==this.x&&0==this.z?0:-Math.atan2(this.x,this.z)};m.prototype.Oc=function(){return 0==this.y&&0==this.z?0:Math.atan2(this.y,Math.sqrt(this.z*this.z+this.x*this.x))};m.prototype.Tia=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};m.prototype.LU=function(k){k/=
this.Tia();this.x*=k;this.y*=k;this.z*=k;return this};m.prototype.normalize=function(){return this.LU(1)};m.prototype.WF=function(k){return this.x*k.x+this.y*k.y+this.z*k.z};m.prototype.v2=function(k){var c=this.z*k.x-this.x*k.z,h=this.x*k.y-this.y*k.x;this.x=this.y*k.z-this.z*k.y;this.y=c;this.z=h;return this};m.tB=function(k,c){return new m(c.x-k.x,c.y-k.y,c.z-k.z)};m.c3=function(k,c){k=NaN-k;c=NaN-c;return Math.sqrt(k*k+c*c+NaN)};m.by=function(k,c){return new m(Math.cos(c)*Math.sin(k),Math.sin(c),
Math.cos(c)*Math.cos(k))};return m});
define("jS",["require","mz","fq","a"],function(a){var d=a("mz"),l=a("fq"),m=a("a");a=l.define("AdjacentPanorama",d,function(){d.call(this);this.cha=this.ew=void 0});a.prototype.GDa=function(){if(void 0===this.ew){for(this.ew=this.usa()-this.get("yaw");180<this.ew;)this.ew-=360;for(;-180>this.ew;)this.ew+=360}return this.ew};a.prototype.a6a=function(){void 0===this.cha&&(this.cha=m.by(this.usa()*Math.PI/180,0));return this.cha};a.prototype.e4a=function(){return void 0!==this.get("yaw")&&void 0!==this.get("backwardYaw")};
a.prototype.usa=function(){return this.get("backwardYaw")-180};return a});define("iA",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("AmbientLight",d,function(){d.call(this)})});
define("fu",["require","mz","fq"],function(a){var d=a("mz");a=a("fq").define("Model3DPostprocessing",d,function(){d.call(this)});a.prototype.iC=function(l){this.vp!==l&&(this.vp=l,this.uAa())};a.prototype.jo=function(l){this.tJ!==l&&(this.tJ=l,this.uAa())};a.prototype.uAa=function(){this.set("disabled",this.tJ&&this.get("disableWhileMoving")||this.vp&&this.get("disableWhileUserInteracting"))};return a});
define("ow",["require","fq","fu"],function(a){var d=a("fq"),l=a("fu");return d.define("AmbientOcclusionModel3DPostprocessing",l,function(){l.call(this)})});define("lx",["require","exports"],function(){return{U:"stopped",PLAYING:"playing",Qb:"paused"}});define("ft",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("ImageResource",d,function(){d.call(this)})});
define("eC","require lV pB lx fq ft".split(" "),function(a){a("lV");var d=a("pB"),l=a("lx"),m=a("fq"),k=a("ft");a=m.define("AnimatedImageResource",k,function(){k.call(this)});a.prototype.play=a.prototype.play=function(){this.set("state",l.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.set("state",l.Qb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",l.U)};a.prototype.set=function(c,h){switch(c){case "state":(this.get("state")||l.U)==l.U&&h==l.PLAYING&&this.trigger(d.uo)}k.prototype.set.call(this,
c,h)};a.prototype.mk=function(c,h,f){h||(h=1);f||(f=1);return k.prototype.mk.call(this,c,h*this.get("colCount",1),f*this.get("rowCount",1))};return a});define("en",["require","fq","fu"],function(a){var d=a("fq"),l=a("fu");return d.define("AntialiasModel3DPostprocessing",l,function(){l.call(this)})});
define("iO",["require","mz","fq"],function(a){var d=a("mz");a=a("fq").define("HotspotMapOverlay",d,function(l){d.call(this);this.eK=void 0===l?!0:l;this.kJ=this.ur=this.tr=this.Aa=void 0});a.prototype.getItem=function(){if(void 0===this.Aa){var l=this.get("image");this.Aa=l?l.u2(this.eK):null}return this.Aa};a.prototype.eEa=function(){if(void 0===this.tr){var l=this.get("rollOverImage");this.tr=l?l.u2(this.eK):null}return this.tr};a.prototype.hEa=function(){if(void 0===this.ur){var l=this.get("selectedImage");
this.ur=l?l.u2(this.eK):null}return this.ur};a.prototype.o6a=function(){if(void 0===this.kJ){this.kJ=[];var l=this.getItem();l&&this.kJ.push(l);(l=this.eEa())&&this.kJ.push(l);(l=this.hEa())&&this.kJ.push(l)}return this.kJ};return a});define("fc",["require","fq","iO"],function(a){var d=a("fq"),l=a("iO");return d.define("AreaHotspotMapOverlay",l,function(){l.call(this,!0)})});define("pa",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("AudioResource",d,function(){d.call(this)})});
define("cZ",["require"],function(){return{PC:"inAdvance",Mma:"delayed"}});
define("hM",["require","pB"],function(a){function d(){this.jj=[]}var l=a("pB");d.prototype.register=function(m){this.XNa(m);this.jj.push(m);m.get("pressed")&&this.vya(m)};d.prototype.unregister=function(m){this.EYa(m)};d.prototype.XNa=function(m){m.bind(l.Oj,this.bva,this,!0)};d.prototype.EYa=function(m){m.unbind(l.Oj,this.bva,this)};d.prototype.bva=function(m){this.vya(m.source)};d.prototype.vya=function(m){this.jj.forEach(function(k){k.set("pressed",k==m)})};d.register=function(m,k){this.unregister(m);
k=this.Fi(k);m.i8=k;k.register(m)};d.unregister=function(m){m.i8&&(m.i8.unregister(m),delete m.i8)};d.Fi=function(m){return this.tta[m]||(this.tta[m]=new d)};d.tta={};return d});define("eo",["require"],function(){return{Me:"push",Rj:"toggle"}});define("il",["require"],function(){return{PH:"visible",cna:"hidden",mq:"scroll"}});define("nF",["require"],function(){return{ab:"left",ub:"right",$e:"center",Hc:"top",Ac:"bottom",se:"middle"}});define("fV",["require"],function(){return{Gc:"rollOver",ALWAYS:"always"}});
define("d",["require"],function(){return{sV:"absolute",Ig:"horizontal",iz:"grid",Yh:"vertical"}});define("cJ",["require"],function(){return function(a){this.Pd=a;this.height=this.width=this.y=this.x=0}});define("dQ",["require"],function(){return function(){this.minHeight=this.minWidth=this.height=this.width=0}});
define("cn",["require","nF","cJ","dQ"],function(a){function d(){this.ad=null;this.xm=l.Hc;this.Vl=l.ab;this.FF=this.ww=0}var l=a("nF"),m=a("cJ"),k=a("dQ");d.prototype.UIa=function(c){this.ww!=c&&(this.ww=c,this.kf())};d.prototype.n5=function(c){this.FF!=c&&(this.FF=c,this.kf())};d.prototype.rJa=function(c){this.ad=c;this.kf()};d.prototype.sM=function(c){this.Vl!=c&&(this.Vl=c,this.kf())};d.prototype.yM=function(c){this.xm!=c&&(this.xm=c,this.kf())};d.prototype.measure=function(){return new k};d.prototype.update=
function(){var c=this.QQa();this.DK(c);this.YZa(c)};d.prototype.DK=function(c){this.TR(c);this.SR(c)};d.prototype.aY=function(){for(var c=this.Zsa(),h=[],f=0;f<c.length;f++){var b=c[f];b.get("includeInLayout")&&h.push(b)}return h};d.prototype.Zsa=function(){for(var c=this.ad.rb(),h=[],f=0;f<c.length;f++){var b=c[f];b.get("visible")&&h.push(b)}return h};d.prototype.QQa=function(){for(var c=this.Zsa(),h=[],f=0;f<c.length;f++)h.push(new m(c[f]));return h};d.prototype.YZa=function(c){for(var h=0;h<c.length;h++){var f=
c[h];f.Pd.EIa(f.x,f.y,f.width,f.height)}};d.prototype.kf=function(){this.ad&&(this.ad.fc(),this.ad.Yd())};return d});
define("dJ",["require","lV","nF","cn","dQ"],function(a){var d=a("lV");a("nF");var l=a("cn"),m=a("dQ");a=d.extend(l,function(){l.call(this)});a.prototype.measure=function(){for(var k=new m,c=this.aY(),h=0;h<c.length;h++){var f=c[h],b=f.Fw,e=f.UQ,g=0;isNaN(b)||(g+=b);isNaN(e)||(g+=e);k.width=Math.max(g+f.Au(),k.width);k.minWidth=Math.max(g+f.xu(),k.minWidth);b=f.zr;e=f.FN;g=0;isNaN(b)||(g+=b);isNaN(e)||(g+=e);k.height=Math.max(g+f.zu(),k.height);k.minHeight=Math.max(g+f.gy(),k.minHeight)}c=this.ad.Fm()+
this.ad.uu();k.width+=c;k.minWidth+=c;c=this.ad.vu()+this.ad.xL();k.height+=c;k.minHeight+=c;return k};a.prototype.DK=function(k){this.TR(k);this.SR(k)};a.prototype.DK=function(k){for(var c=this.ad.Bf(),h=this.ad.Af(),f=0;f<k.length;f++){var b=k[f],e=b.Pd,g=e.Fw;if(isNaN(g)){var n=e.z_;isNaN(n)||(g=Math.round(n*c*.01))}n=e.UQ;if(isNaN(n)){var q=e.A_;isNaN(q)||(n=Math.round(q*c*.01))}q=e.Lz;var p=e.sn;if(isNaN(p)){var r=e.Nn;isNaN(r)?isNaN(g)||isNaN(n)||(p=c-g-n):p=Math.round(r*c*.01)}r=e.zr;if(isNaN(r)){var t=
e.B_;isNaN(t)||(r=Math.round(t*h*.01))}t=e.FN;if(isNaN(t)){var u=e.y_;isNaN(u)||(t=Math.round(u*h*.01))}u=e.Mz;var v=e.QD;if(isNaN(v)){var w=e.Mn;isNaN(w)?isNaN(r)||isNaN(t)||(v=h-r-t):v=Math.round(w*h*.01)}b.width=isNaN(p)?e.Au():Math.max(e.xu(),Math.min(e.j3(),p));b.height=isNaN(v)?e.zu():Math.max(e.gy(),Math.min(e.i3(),v));b.x=isNaN(g)||isNaN(n)?isNaN(g)?isNaN(n)?isNaN(q)?0:Math.round(.5*c+q-.5*b.width):c-n-b.width:g:Math.round(g+.5*(c-n-g-b.width));b.y=isNaN(r)||isNaN(t)?isNaN(r)?isNaN(t)?isNaN(u)?
0:Math.round(.5*h+u-.5*b.height):h-t-b.height:r:Math.round(r+.5*(h-t-r-b.height))}};return a});
define("kR",["require","lV","nF","cn","dQ"],function(a){var d=a("lV"),l=a("nF"),m=a("cn"),k=a("dQ");a=d.extend(m,function(){m.call(this);this.cya=this.xqa=this.WO=this.XO=this.YO=this.qE=this.Cw=this.Dw=this.$O=this.pA=this.sn=void 0});a.prototype.R$a=function(c){this.sn!=c&&(this.sn=c,this.kf())};a.prototype.iab=function(c){this.Dw!=c&&(this.Dw=c,void 0!=this.Dw&&(this.pA=void 0),this.kf())};a.prototype.hab=function(c){this.Cw!=c&&(this.Cw=c,void 0!=this.Cw&&(this.$O=void 0),this.kf())};a.prototype.qab=
function(c){this.pA!=c&&(this.pA=c,void 0!=this.Dw&&(this.Dw=void 0),this.kf())};a.prototype.pab=function(c){this.$O!=c&&(this.$O=c,void 0!=this.Cw&&(this.Cw=void 0),this.kf())};a.prototype.nab=function(c){this.qE!=c&&(this.qE=c,this.kf())};a.prototype.mab=function(c){this.YO!=c&&(this.YO=c,this.kf())};a.prototype.lab=function(c){this.XO!=c&&(this.XO=c,this.kf())};a.prototype.kab=function(c){this.WO!=c&&(this.WO=c,this.kf())};a.prototype.measure=function(){for(var c=new k,h=this.aY(),f=0,b=0;b<h.length;b++)h[b].get("includeInLayout")&&
f++;if(!isNaN(this.pA))for(isNaN(this.qE)||(c.minWidth=this.qE),b=0;b<h.length;b++){var e=h[b].xu();isNaN(e)||(c.minWidth=Math.max(e,c.minWidth))}if(isNaN(this.Dw))for(b=0;b<h.length;b++)e=h[b].Au(),isNaN(e)||(c.width=Math.max(e,c.width));else c.width=this.Dw;if(isNaN(this.Cw))for(b=0;b<h.length;b++)e=h[b].zu(),isNaN(e)||(c.height=Math.max(e,c.height));else c.height=this.Cw;isNaN(this.pA)?isNaN(this.sn)?h=Math.ceil(Math.sqrt(f)):(h=this.sn-this.ad.Fm()-this.ad.uu(),h=Math.max(1,Math.floor((h+this.ww)/
(c.width+this.ww)))):h=Math.max(1,Math.floor(100/this.pA));f=Math.ceil(f/h);c.width=c.width*h+Math.max(0,h-1)*this.ww+this.ad.Fm()+this.ad.uu();c.minWidth=c.minWidth+this.ad.Fm()+this.ad.uu();c.height=c.height*f+Math.max(0,f-1)*this.FF+this.ad.vu()+this.ad.xL();c.minHeight=0;return c};a.prototype.DK=function(c){for(var h,f,b=[],e=[],g=0;g<c.length;g++)f=c[g].Pd,f.get("includeInLayout")?b.push(c[g]):e.push(c[g]);var n=b.length,q=this.ad.Bf(),p=this.ww;if(isNaN(this.Dw))if(isNaN(this.pA)){for(g=c=0;g<
b.length;g++)f=b[g].Pd,c=Math.max(f.xu(),f.Au(),c);c=Math.min(q,c)}else c=Math.max(1,Math.floor(100/this.pA)),c=(q-(c-1)*p)/c,g=!1,!isNaN(this.XO)&&this.XO<c&&(c=this.XO,g=!0),!isNaN(this.qE)&&this.qE>c&&(c=this.qE,g=!0),g&&(c=Math.max(1,Math.floor((q+p)/(c+p))),c=(q-(c-1)*p)/c);else c=this.Dw;c=Math.max(1,c);var r=Math.max(1,Math.floor(.001+(q+p)/(c+p)));g=r*c;var t=r*(c+p)-p,u=0;if(q>=t)switch(this.Vl){case l.ub:u=q-t;break;case l.$e:u=Math.round(.5*(q-t));break;default:u=0}q=[];t=[];for(var v=
0;v<r;v++)f=Math.round(g/(r-v)),g-=f,t.push(u),u+=f+p,q.push(f);u=this.ad.Af();v=this.FF;if(isNaN(this.Cw))if(isNaN(this.$O))for(p=1,g=0;g<b.length;g++)f=b[g].Pd,p=Math.max(f.gy(),f.zu(),p);else p=Math.max(1,100/this.$O),p=(u-(p-1)*v)/p,g=!1,!isNaN(this.WO)&&this.WO<p&&(p=this.WO,g=!0),!isNaN(this.YO)&&this.YO>p&&(p=this.YO,g=!0),g&&(p=Math.max(1,Math.floor((u+v)/(p+v))),p=(u-(p-1)*v)/p);else p=this.Cw;n=Math.max(1,Math.ceil(n/r));g=n*p;f=n*(p+v)-v;h=0;if(u>=f)switch(this.xm){case l.Ac:h=u-f;break;
case l.se:h=Math.round(.5*(u-f))}u=[];f=[];for(var w=0;w<n;w++){var x=Math.round(g/(n-w));g-=x;f.push(h);h+=x+v;u.push(x)}for(g=0;g<b.length;g++)h=b[g],v=g%r,w=Math.floor(g/r),h.x=t[v],h.width=q[v],h.y=f[w],h.height=u[w];for(g=0;g<e.length;g++)h=e[g],h.x=0,h.width=Math.round(c),h.y=0,h.height=Math.round(p);this.xqa=r;this.cya=n};return a});
define("lT",["require","lV","nF","cn","dQ"],function(a){var d=a("lV"),l=a("nF"),m=a("cn"),k=a("dQ");a=d.extend(m,function(){m.call(this)});a.prototype.measure=function(){for(var c=new k,h=this.aY(),f=0;f<h.length;f++){var b=h[f];c.height=Math.max(b.zu(),c.height);c.minHeight=Math.max(b.gy(),c.minHeight);c.width+=b.Au();c.minWidth+=b.xu()}h=Math.max(0,h.length-1)*this.ww+this.ad.Fm()+this.ad.uu();c.width+=h;c.minWidth+=h;h=this.ad.vu()+this.ad.xL();c.height+=h;c.minHeight+=h;return c};a.prototype.DK=
function(c){this.TR(c);this.SR(c)};a.prototype.TR=function(c){for(var h=0,f=0;f<c.length;f++)c[f].Pd.get("includeInLayout")&&h++;f=Math.max(0,h-1)*this.ww;var b=this.ad.Bf()-f,e=this.ad.Af();h=b;var g=0,n=[];for(f=0;f<c.length;f++){var q=c[f],p=q.Pd,r=p.Mn;q.height=isNaN(r)?p.zu():Math.max(p.gy(),Math.min(p.i3(),Math.round(e*r*.01)));r=p.Nn;isNaN(r)?(q.width=p.Au(),h-=q.width):p.get("includeInLayout")?(g+=r,n.push(q)):q.width=Math.max(p.xu(),Math.min(p.j3(),Math.round(b*r*.01)))}h-=Math.max(0,h-b*
g*.01);do{c=!1;b=Math.max(0,0<g?h/g:0);e=[];for(f=g=0;f<n.length;f++){q=n[f];p=q.Pd;r=Math.round(p.Nn*b);var t=p.xu(),u=p.j3();r<t?(q.width=t,h-=q.width,c=!0):r>u?(q.width=u,h-=q.width,c=!0):(g+=p.Nn,e.push(q))}n=e}while(c);for(f=0;f<n.length;f++)q=n[f],p=q.Pd,b=Math.max(0,0<g?h/g:0),q.width=Math.round(p.Nn*b),h-=q.width,g-=p.Nn};a.prototype.SR=function(c){for(var h=this.ww,f=this.ad.Bf(),b=this.ad.Af(),e=0,g=0,n=0;n<c.length;n++){var q=c[n];q.Pd.get("includeInLayout")&&(e+=c[n].width,g++)}e+=h*(g-
1);if(f>=e)switch(this.Vl){case l.ub:f-=e;break;case l.$e:f=Math.round(.5*(f-e));break;default:f=0}else f=0;for(n=0;n<c.length;n++)if(q=c[n],q.Pd.get("includeInLayout")){if(b>=q.height)switch(this.xm){case l.Ac:q.y=b-q.height;break;case l.se:q.y=Math.round(.5*(b-q.height));break;default:q.y=0}else q.y=0;q.x=f;f+=q.width+h}else q.x=0,q.y=0};return a});
define("do",["require","lV","nF","cn","dQ"],function(a){var d=a("lV"),l=a("nF"),m=a("cn"),k=a("dQ");a=d.extend(m,function(){m.call(this)});a.prototype.measure=function(){for(var c=new k,h=this.aY(),f=0;f<h.length;f++){var b=h[f];c.width=Math.max(b.Au(),c.width);c.minWidth=Math.max(b.xu(),c.minWidth);c.height+=b.zu();c.minHeight+=b.gy()}h=Math.max(0,h.length-1)*this.FF+this.ad.vu()+this.ad.xL();c.height+=h;c.minHeight+=h;h=this.ad.Fm()+this.ad.uu();c.width+=h;c.minWidth+=h;return c};a.prototype.DK=
function(c){this.TR(c);this.SR(c)};a.prototype.TR=function(c){for(var h=0,f=0;f<c.length;f++)c[f].Pd.get("includeInLayout")&&h++;f=Math.max(0,h-1)*this.FF;var b=this.ad.Bf(),e=this.ad.Af()-f;h=e;var g=0,n=[];for(f=0;f<c.length;f++){var q=c[f],p=q.Pd,r=p.Nn;q.width=isNaN(r)?p.Au():Math.max(p.xu(),Math.min(p.j3(),Math.round(b*r*.01)));r=p.Mn;isNaN(r)?(q.height=p.zu(),h-=q.height):p.get("includeInLayout")?(g+=r,n.push(q)):q.height=Math.max(p.gy(),Math.min(p.i3(),Math.round(e*r*.01)))}h-=Math.max(0,h-
e*g*.01);do{c=!1;b=Math.max(0,0<g?h/g:0);e=[];for(f=g=0;f<n.length;f++){q=n[f];p=q.Pd;r=Math.round(p.Mn*b);var t=p.gy(),u=p.i3();r<t?(q.height=t,h-=q.height,c=!0):r>u?(q.height=u,h-=q.height,c=!0):(g+=p.Mn,e.push(q))}n=e}while(c);for(f=0;f<n.length;f++)q=n[f],p=q.Pd,b=Math.max(0,0<g?h/g:0),q.height=Math.round(p.Mn*b),h-=q.height,g-=p.Mn};a.prototype.SR=function(c){for(var h=this.FF,f=this.ad.Bf(),b=this.ad.Af(),e=0,g=0,n=0;n<c.length;n++){var q=c[n];q.Pd.get("includeInLayout")&&(e+=q.height,q.width>
f&&(f=q.width),g++)}e+=h*(g-1);if(b>=e)switch(this.xm){case l.Ac:b-=e;break;case l.se:b=Math.round(.5*(b-e));break;default:b=0}else b=0;for(n=0;n<c.length;n++)if(q=c[n],q.Pd.get("includeInLayout")){switch(this.Vl){case l.ub:q.x=f-q.width;break;case l.$e:q.x=Math.round(.5*(f-q.width));break;default:q.x=0}q.y=b;b+=q.height+h}else q.x=0,q.y=0};return a});
define("bU","require lV er e S nF cZ d dJ kR lT do".split(" "),function(a){var d=a("lV"),l=a("er"),m=a("e"),k=a("S"),c=a("nF"),h=a("cZ"),f=a("d"),b=a("dJ"),e=a("kR"),g=a("lT"),n=a("do"),q=d.extend(m,function(){m.call(this);this.Re("BaseContainer");this.Zl=null;this.$d=[];this.Eq=[];this.aO=h.Mma;this.set("contentOpaque",!1)});q.Ic={children:[[]],childrenInteractionEnabled:!0,gap:0,horizontalAlign:c.ab,itemHeight:void 0,itemMaxHeight:void 0,itemMaxWidth:void 0,itemMinHeight:void 0,itemMinWidth:void 0,
itemWidth:void 0,layout:f.sV,verticalAlign:c.Hc};l.defaults(q.Ic,m.Ic);q.prototype.yb=function(){this.Io(q.Ic)};q.prototype.set=function(p,r){"children"==p?this.qh(r):"creationPolicy"==p?this.I$a(r):m.prototype.set.call(this,p,r)};q.prototype.get=function(p,r){return"children"==p?this.rb():"creationPolicy"==p?this.aO:m.prototype.get.call(this,p,r)};q.prototype.I$a=function(p){this.aO!=p&&(this.aO=p,this.nga())};q.prototype.qh=function(p){var r=this.rb();p=p||[];for(var t=l(r).difference(p),u=0;u<
t.length;u++)this.removeChild(t[u]);r=l(p).difference(r);for(u=0;u<r.length;u++)this.Za(r[u]);for(u=0;u<p.length;u++)this.io(p[u],u)};q.prototype.rb=function(){return this.$d};q.prototype.Za=function(p){p.getParent()&&p.getParent().removeChild(p);this.$d.push(p);p.ta=this;this.wpa(p);p.afa(this.Pq);this.Eq.push(p);this.nga();p.tq()};q.prototype.removeChild=function(p){p.getParent()==this&&(p.Pn(),p.ta=null,l(this.Eq).contains(p)?this.Eq=l.without(this.Eq,p):(p.hd().detach(),p.Pt(null),this.fc(),this.Yd()),
this.$d=l.without(this.$d,p),p.Bea())};q.prototype.THa=function(){l(this.rb()).forEach(function(p){this.removeChild(p)})};q.prototype.Hia=function(p){return l(this.$d).indexOf(p)};q.prototype.io=function(p,r){var t=this.Hia(p);if(0>t)throw"Can't set index. This is not a child of this container";var u=this.$d.slice();u.splice(t,1);u.splice(r,0,p);if(!l.isEqual(this.$d,u)&&(this.$d=u,!l(this.Eq).contains(p))){r=this.Hia(p);p.hd().detach();u=t=null;for(var v=r-1;0<=v&&!t;v--)l(this.Eq).contains(this.$d[v])||
(t=this.$d[v]);for(v=r+1;v<this.$d.length&&!u&&!t;v++)l(this.Eq).contains(this.$d[v])||(u=this.$d[v]);t?p.hd().insertAfter(t.hd()):u?p.hd().insertBefore(u.hd()):this.Yb().Bha(p.Xd());this.Yd()}};q.prototype.iF=function(p){m.prototype.iF.call(this,p);this.oAa()};q.prototype.oAa=function(){l(this.$d).forEach(function(p){this.wpa(p)},this)};q.prototype.wpa=function(p){p.set("inheritedInteractionEnabled",this.B("interactionEnabled")&&this.B("inheritedInteractionEnabled")&&this.B("childrenInteractionEnabled"))};
q.prototype.yN=function(){m.prototype.yN.call(this);this.$d.forEach(function(p){p.yN()})};q.prototype.jF=function(p){m.prototype.jF.call(this,p);l(this.$d).forEach(function(r){r.afa(this.Pq)},this)};q.prototype.H8=function(p){m.prototype.H8.call(this,p);l(this.rb()).forEach(function(r){r.FK()});this.nga()};q.prototype.Pt=function(p){m.prototype.Pt.call(this,p);l(this.rb()).forEach(function(r){l(this.Eq).contains(r)||r.Pt(p)},this)};q.prototype.nga=function(){(this.aO==h.Mma&&this.nA||this.aO==h.PC)&&
0<this.Eq.length&&(l(this.Eq).forEach(function(p){this.Yb().Bha(p.Xd());p.Pt(this.Db())},this),this.Eq=[],this.fc(),this.Yd())};q.prototype.IU=function(p){this.Zl!=p&&(this.Zl&&this.Zl.rJa(null),(this.Zl=p)&&this.Zl.rJa(this))};q.prototype.bb=function(){var p=!1,r=this.B("layout");if(this.L("layout")){switch(r){case f.iz:this.IU(new e);break;case f.Ig:this.IU(new g);break;case f.Yh:this.IU(new n);break;default:this.IU(new b)}this.S("layout");p=!0}var t=this.Zl;if(this.L("horizontalAlign")||p)t.sM(this.B("horizontalAlign")),
this.S("horizontalAlign");if(this.L("verticalAlign")||p)t.yM(this.B("verticalAlign")),this.S("verticalAlign");if(this.L("gap")||p)r==f.iz?(t.UIa(this.B("gap")),t.n5(this.B("gap"))):r==f.Ig?t.UIa(this.B("gap")):r==f.Yh&&t.n5(this.B("gap")),this.S("gap");if(r==f.iz){if(this.L("itemWidth")||p){var u=this.B("itemWidth"),v=k.fo(u);void 0!==v?t.qab(v):t.iab(u);this.S("itemWidth")}if(this.L("itemHeight")||p)u=this.B("itemHeight"),v=k.fo(u),void 0!==v?t.pab(v):t.hab(u),this.S("itemHeight");this.L("itemMinWidth")&&
(t.nab(this.B("itemMinWidth")),this.S("itemMinWidth"));this.L("itemMinHeight")&&(t.mab(this.B("itemMinHeight")),this.S("itemMinHeight"));this.L("itemMaxWidth")&&(t.lab(this.B("itemMaxWidth")),this.S("itemMaxWidth"));this.L("itemMaxHeight")&&(t.kab(this.B("itemMaxHeight")),this.S("itemMaxHeight"))}this.L("childrenInteractionEnabled")&&(this.S("childrenInteractionEnabled"),this.oAa());this.xc(["cursor"],{cursor:"inheritedCursor"},this.$d,!0,!1);m.prototype.bb.call(this);r==f.iz&&t.R$a(this.sn)};q.prototype.xc=
function(p,r,t,u,v){for(var w=0;w<p.length;w++){var x=p[w];if(!u||this.L(x)){for(var y=0;y<t.length;y++)t[y].set(r[x]?r[x]:x,this.B(x));v&&this.S(x)}}};q.prototype.Kw=function(){if(this.Zl){var p=this.Zl.measure();this.cm=p.width;this.bm=p.height;this.qP=p.minWidth;this.pP=p.minHeight}else m.prototype.Kw.call(this)};q.prototype.cj=function(){this.Zl&&this.Zl.update(this);m.prototype.cj.call(this)};return q});
define("pD",["require","jquery.mod","lV","qb","gX"],function(a){function d(c,h){this.GI=c;this.Jc="#000000";this.Mb=.5;this.sa=10;this.fS=this.GO=5;this.Jf=h;this.eX=this.yda=this.gb=0;this.ppa=this.Ub=this.DW=!1;this.Ba=!0;this.tI=document.createElement("div");this.tI.setAttribute("tdvlayer","scrollbar");this.QN=l(this.tI);k.css(this.tI,{position:"absolute","z-index":m.aNa});this.BN=document.createElement("div");this.P8=l(this.BN);k.css(this.BN,{position:"absolute",left:0,top:0});this.QN.append(this.P8)}
var l=a("jquery.mod");a("lV");var m=a("qb"),k=a("gX");d.prototype.Fe=function(){return this.QN.width()};d.prototype.Ve=function(){return this.QN.height()};d.prototype.setPosition=function(c){this.gb!=c&&(this.gb=c,this.dya(),this.Ba=!0)};d.prototype.ll=function(){return this.gb};d.prototype.setSize=function(c,h){this.yda=c;this.eX=h;this.dya();this.Ba=!0};d.prototype.Ze=function(c){this.Ub!=c&&(this.Ub=c,this.Ba=!0)};d.prototype.DIa=function(c){this.DW!=c&&(this.DW=c,this.Ba=!0)};d.prototype.setColor=
function(c){this.Jc!=c&&(this.Jc=c,this.Ba=!0)};d.prototype.Oh=function(c){this.Mb!=c&&(this.Mb=c,this.Ba=!0)};d.prototype.UU=function(c){this.sa!=c&&(this.sa=c,this.Ba=!0)};d.prototype.SIa=function(c){this.GO!=c&&(this.GO=c,this.Ba=!0)};d.prototype.yJa=function(c){this.fS!=c&&(this.fS=c,this.Ba=!0)};d.prototype.rh=function(){this.Ba&&(this.ppa!=this.Ub&&(this.Ub?this.Jf.append(this.QN):this.QN.detach(),this.ppa=this.Ub),this.oa(),this.Ba=!1)};d.prototype.oa=function(){var c=Math.round(100*this.yda/
this.eX),h=Math.round(100*this.gb/this.eX);k.css(this.tI,{filter:"alpha(opacity="+Math.round(100*this.Mb)+")",opacity:this.Mb,display:this.Ub?"block":"none"});k.css(this.BN,{backgroundColor:this.Jc,"border-radius":Math.floor(this.sa/2)+"px"});this.GI==d.Ig?(k.css(this.tI,{left:this.GO+"px",right:(this.DW?this.sa:0)+this.GO+"px",height:this.sa+"px",bottom:this.fS+"px"}),k.css(this.BN,{left:h+"%",width:c+"%",height:this.sa+"px"})):(k.css(this.tI,{top:this.fS+"px",right:this.GO+"px",width:this.sa+"px",
bottom:(this.DW?this.sa:0)+this.fS+"px"}),k.css(this.BN,{top:h+"%",width:this.sa+"px",height:c+"%"}))};d.prototype.dya=function(){var c=this.eX-this.yda;0>this.gb?this.gb=0:this.gb>c&&(this.gb=c)};d.Ig="horizontal";d.Yh="vertical";return d});define("eE",["require","lV","pD"],function(a){var d=a("lV"),l=a("pD");return d.extend(l,function(m){l.call(this,l.Ig,m)})});define("kw",["require","lV","pD"],function(a){var d=a("lV"),l=a("pD");return d.extend(l,function(m){l.call(this,l.Yh,m)})});
define("bt",["require","exports"],function(){var a={gj:38,Sh:40,ub:39,ab:37,NH:32,mo:65,zNa:90,Zm:87,Xm:83,so:68,Q:81,E:69,VV:187,RV:189,GV:27,na:{}};a.na.gj="ArrowUp";a.na.Sh="ArrowDown";a.na.ub="ArrowRight";a.na.ab="ArrowLeft";a.na.mo="KeyA";a.na.zNa="KeyZ";a.na.Zm="KeyW";a.na.Xm="KeyS";a.na.so="KeyD";a.na.Q="KeyQ";a.na.E="KeyE";a.na.VV="BracketRight";a.na.RV="Slash";a.na.GV="Escape";a.na.NH="Space";a.na.FV="Enter";return a});
define("jv",["require","exports","pB","bt","gF"],function(a,d,l,m,k){a=function(){function h(){}h.ao=function(){return document.activeElement&&document.activeElement!==document.body};h.e6a=function(){return document.activeElement};h.N7a=function(f){return Array.isArray(f)?f.includes(document.activeElement):f==document.activeElement};h.Ska=function(f,b){void 0===f&&(f=void 0);void 0===b&&(b=void 0);this.$i||(this.$i=document.createElement("div"));document.querySelectorAll("*[tabindex]").forEach(function(e){e.tabIndex>
this.$i.tabIndex&&(this.$i.tabIndex=e.tabIndex+1)}.bind(this));document.body.appendChild(this.$i);void 0!=f&&void 0!=b?(this.$i.style.position="absolute",this.$i.style.top=b+"px",this.$i.style.left=f+"px",this.$i.style.width="1px",this.$i.style.height="1px"):(this.$i.style.position="fixed",this.$i.style.top="0",this.$i.style.left="0",this.$i.style.width="100%",this.$i.style.height="100%");this.$i.focus();this.$i.blur();document.body.removeChild(this.$i);this.Q2.trigger(l.ba)};h.blur=function(){document.activeElement.blur()};
h.wha=function(f){this.OS.push(f)};h.Ika=function(f){f=this.OS.indexOf(f);-1!=f&&this.OS.splice(f,1)};h.J3a=function(f){this.zU.push(f)};h.$9a=function(f){f=this.zU.indexOf(f);-1!=f&&this.zU.splice(f,1)};h.DBa=function(f,b){this.lla(f,b.map(function(e){return[e]}))};h.A3a=function(f,b){this.lla(f,[b])};h.x3a=function(f,b,e,g){for(var n=[],q=0;q<e;q++)n.push(b.slice(q*g,(q+1)*g));this.lla(f,n)};h.lla=function(f,b){this.eia.set(f,new c(b))};h.N9a=function(f){this.eia.delete(f)};h.ika=function(f){if(f.code==
m.na.NH||f.code==m.na.FV){var b=this.fEa();b&&this.e5a(b)}else f.code!=m.na.GV&&[m.na.gj,m.na.Sh,m.na.ub,m.na.ab].includes(f.code)&&this.eia.forEach(function(e){e.Z6a()&&e.C5a(f.code)})};h.jka=function(f){f.code==m.na.NH||f.code==m.na.FV?(f=this.fEa())?f.dispatchEvent(this.yCa("mouseup",f)):this.zU.length&&this.zU.pop()():f.code==m.na.GV&&(this.OS.length?this.OS.pop()():this.ao()&&this.Ska())};h.mh=function(f){!f.isTrusted||f.target&&["BUTTON","INPUT","SELECT","TEXTAREA"].includes(f.target.tagName)||
setTimeout(function(){this.Ska(f.pageX,f.pageY)}.bind(this),0)};h.J8a=function(){this.Q2.trigger(l.ba)};h.e5a=function(f){f.dispatchEvent(this.yCa("mousedown",f))};h.fEa=function(){return this.ao()?document.activeElement:null};h.yCa=function(f,b){b=b.getBoundingClientRect();return new window.MouseEvent(f,{clientX:b.left+b.width/2,clientY:b.top+b.height/2})};h.$a=function(){document.addEventListener("mouseup",this.mh.bind(this),!0);document.addEventListener("keydown",this.ika.bind(this),!0);document.addEventListener("keyup",
this.jka.bind(this),!0);document.addEventListener("focusin",this.J8a.bind(this),!0)};h.Q2=new k;h.$i=null;h.OS=[];h.zU=[];h.eia=new Map;return h}();var c=function(){function h(f){void 0===f&&(f=[]);this.jL=f}h.prototype.Z6a=function(){return null!=this.IDa()};h.prototype.IDa=function(){for(var f=document.activeElement,b=0;b<this.jL.length;b++)for(var e=0;e<this.jL[b].length;e++)if(this.jL[b][e]==f)return{l$a:b,z4a:e};return null};h.prototype.C5a=function(f){var b=this.IDa();if(null!=b){var e=0,g=
0;switch(f){case m.na.ub:e=1;break;case m.na.ab:e=-1;break;case m.na.gj:g=-1;break;case m.na.Sh:g=1}f=b.l$a+g;0>f||f>=this.jL.length||(b=b.z4a+e,0>b||b>=this.jL[f].length||this.jL[f][b].focus())}};return h}();return a});
define("T","require er lV pB cI w nF il fV bU eE kw bo pd bM jv".split(" "),function(a){var d=a("er"),l=a("lV"),m=a("pB"),k=a("cI"),c=a("w"),h=a("nF"),f=a("il"),b=a("fV"),e=a("bU"),g=a("eE"),n=a("kw"),q=a("bo"),p=a("pd"),r=a("bM"),t=a("jv"),u=l.extend(e,function(){e.call(this);this.Re("Container");this.xd=this.be=this.kg=this.Og=this.dc=this.Rb=this.Iqa=this.Hqa=0;this.Dba=this.Lba=this.fm=this.em=!1;this.Cqa=0;this.y9=this.x9=void 0;this.A9=this.z9=0;this.XA=null;this.vda=f.cna;this.iA=!1;this.eY=
null;this.eu=!1;this.G1=null;t.Q2.bind(m.ba,this.SWa,this)});u.Ic={overflow:f.PH,scrollBarColor:"#000000",scrollBarWidth:10,scrollBarMargin:5,scrollBarHorizontalMargin:void 0,scrollBarVerticalMargin:void 0,scrollBarOpacity:.5,scrollBarVisible:b.Gc};d.defaults(u.Ic,e.Ic);u.prototype.Jo=function(){this.eY=new g(this.Caa());this.eY.P8.bind("mousedown touchstart",d.bind(this.IUa,this));this.Jo=function(){return this.eY};return this.eY};u.prototype.Ko=function(){this.G1=new n(this.Caa());this.G1.P8.bind("mousedown touchstart",
d.bind(this.X2a,this));this.Ko=function(){return this.G1};return this.G1};u.prototype.SWa=function(){if(t.ao()){var v=this.rb().map(function(w){return w.Xd()}).indexOf(t.e6a());-1!==v&&this.scrollIntoView(this.rb()[v])}};u.prototype.scrollIntoView=function(v){var w=v.Na,x=v.Qa;this.scrollTo(Math.min(w,Math.max(w+v.Wa()-this.Og,this.be)),Math.min(x,Math.max(x+v.Ab()-this.kg,this.xd)))};u.prototype.scrollTo=function(v,w){var x=this.be;v>this.be?this.TW()&&(x=Math.min(v,this.Rb-this.Og)):v<this.be&&
this.SW()&&(x=Math.max(v,0));v=this.xd;w>this.xd?this.RW()&&(v=Math.min(w,this.dc-this.kg)):w<this.xd&&this.UW()&&(v=Math.max(w,0));this.wR(x,v)};u.prototype.oIa=function(){if(this.RW()){for(var v=Math.max(0,this.dc-this.kg),w=Math.min(v,this.xd+.5*this.kg),x=v=Math.min(v,this.xd+this.kg),y=this.rb().slice(),z=y.shift();y.length;z=y.shift())if(z.get("visible")){var B=z.Qa;B+z.Ab()>this.xd+this.kg&&B>=w&&B<v&&B<x&&(x=B)}this.wR(this.be,x)}};u.prototype.RW=function(){return this.Zpa()&&this.xd+this.kg<
this.dc};u.prototype.qIa=function(){if(this.UW()){for(var v=Math.max(0,this.xd-this.kg),w=Math.max(0,this.xd-.5*this.kg),x=v,y=this.rb().slice(),z=y.shift();y.length;z=y.shift())if(z.get("visible")){var B=z.Qa;z=B+z.Ab();B<this.xd&&z>=v+this.kg&&z<w+this.kg&&z>x+this.kg&&(x=z-this.kg)}this.wR(this.be,x)}};u.prototype.UW=function(){return this.Zpa()&&0<this.xd};u.prototype.pIa=function(){if(this.TW()){for(var v=Math.max(0,this.Rb-this.Og),w=Math.min(v,this.be+.5*this.Og),x=v=Math.min(v,this.be+this.Og),
y=this.rb().slice(),z=y.shift();y.length;z=y.shift())if(z.get("visible")){var B=z.Na;B+z.Wa()>this.be+this.Og&&B>=w&&B<v&&B<x&&(x=B)}this.wR(x,this.xd)}};u.prototype.TW=function(){return this.Ypa()&&this.be+this.Og<this.Rb};u.prototype.scrollLeft=function(){if(this.SW()){for(var v=Math.max(0,this.be-this.Og),w=Math.max(0,this.be-.5*this.Og),x=v,y=this.rb().slice(),z=y.shift();y.length;z=y.shift())if(z.get("visible")){var B=z.Na;z=B+z.Wa();B<this.be&&z>=v+this.Og&&z<w+this.Og&&z>x+this.Og&&(x=z-this.Og)}this.wR(x,
this.xd)}};u.prototype.SW=function(){return this.Ypa()&&0<this.be};u.prototype.wR=function(v,w){this.em=this.be!=v;this.fm=this.xd!=w;this.cu();this.XA=new p("cubic_in_out",[new r("hScrollPosition",this.be,v),new r("vScrollPosition",this.xd,w)],500);q.requestFrame(this.w8,this)};u.prototype.Zpa=function(){return this.eu&&this.kg<this.dc};u.prototype.Ypa=function(){return this.iA&&this.Og<this.Rb};u.prototype.yb=function(){this.Io(u.Ic)};u.prototype.BQa=function(){this.Lba=!0;this.cu()};u.prototype.AQa=
function(){this.Lba=!1;this.cu()};u.prototype.IUa=function(){this.em=!0};u.prototype.X2a=function(){this.fm=!0};u.prototype.xQa=function(v){this.em||this.fm?(this.Db().bind(m.Pb,this.Aqa,this),this.Db().bind(m.Eb,this.Bqa,this),this.Oz=v.pageX,this.Pz=v.pageY,this.cu()):this.Dqa(v)};u.prototype.Aqa=function(v){if(this.em){var w=(v.pageX-this.Oz)*this.Rb/this.Jo().Fe();this.be+=w}else this.fm&&(w=(v.pageY-this.Pz)*this.dc/this.Ko().Ve(),this.xd+=w);this.Oz=v.pageX;this.Pz=v.pageY;this.Mx()};u.prototype.Bqa=
function(){this.Db().unbind(m.Pb,this.Aqa,this);this.Db().unbind(m.Eb,this.Bqa,this);this.fm=this.em=!1;this.cu()};u.prototype.aqa=function(v){return this.eu&&(0<v&&0<this.xd||0>v&&this.xd<this.dc-this.kg)?!0:!1};u.prototype.zQa=function(v){this.eu&&(this.xd-=(c.zd()==c.o7?.1*v.NS:v.delta)*this.kg*.1,this.Mx())};u.prototype.Dqa=function(v){if(this.iA||this.eu)this.Db().bind(m.Pb,this.Eqa,this),this.Db().bind(m.Eb,this.Fqa,this),this.Dba=!0,this.Oz=v.pageX,this.Pz=v.pageY,this.cu(),this.cVa()};u.prototype.Eqa=
function(v){var w=v.pageX-this.Oz,x=v.pageY-this.Pz;!this.em&&!this.fm&&25<w*w+x*x&&(this.em=this.iA,this.fm=this.eu,this.cu());if(this.em||this.fm)this.be-=w,this.xd-=x,this.Oz=v.pageX,this.Pz=v.pageY,this.Mx(),this.Q1a()};u.prototype.Fqa=function(){this.Db().unbind(m.Pb,this.Eqa,this);this.Db().unbind(m.Eb,this.Fqa,this);this.Dba=!1;this.cu();var v=Math.max(Math.abs(this.z9/.001),Math.abs(this.A9/.001));this.XA=new p("linear",[new r("hScrollPosition",this.be,this.be-.5*this.z9*v),new r("vScrollPosition",
this.xd,this.xd-.5*this.A9*v)],v);q.requestFrame(this.w8,this)};u.prototype.cVa=function(){this.x9=this.Oz;this.y9=this.Pz};u.prototype.Q1a=function(){var v=(new Date).getTime(),w=v-this.Cqa;10<w&&(this.Cqa=v,this.z9=(this.Oz-this.x9)/w,this.A9=(this.Pz-this.y9)/w,this.x9=this.Oz,this.y9=this.Pz)};u.prototype.w8=function(v){this.XA&&!this.XA.Xe()&&(this.em||this.fm)?(this.XA.Fb(v),this.em&&(this.be=this.XA.eb("hScrollPosition"),0>this.be||this.be>this.Rb-this.Og)&&(this.em=!1),this.fm&&(this.xd=this.XA.eb("vScrollPosition"),
0>this.xd||this.xd>this.dc-this.kg)&&(this.fm=!1),this.Mx(),q.requestFrame(this.w8,this)):(this.fm=this.em=!1,this.XA=null,this.cu())};u.prototype.Mx=function(v){if(v){if(!this.iA)switch(this.B("horizontalAlign")){case h.ub:this.be=this.Rb-this.Og;break;case h.$e:this.be=(this.Rb-this.Og)/2;break;default:this.be=0}if(!this.eu)switch(this.B("verticalAlign")){case h.Ac:this.xd=this.dc-this.kg;break;case h.se:this.xd=(this.dc-this.kg)/2;break;default:this.xd=0}}this.be=Math.max(0,Math.min(this.Rb-this.Og,
this.be));this.xd=Math.max(0,Math.min(this.dc-this.kg,this.xd));this.Jo().setPosition(this.be);this.Ko().setPosition(this.xd);this.Yb().aab(this.be);this.Yb().wbb(this.xd);this.ol();if(this.oxa!=this.be||this.pxa!=this.xd)void 0!==this.oxa&&void 0!==this.pxa&&this.trigger(new k(m.mq)),this.oxa=this.be,this.pxa=this.xd};u.prototype.cu=function(){var v=this.get("scrollBarVisible")==b.ALWAYS?!0:this.No?this.em||this.fm||this.Dba:this.em||this.fm||this.Lba;this.Jo().Ze(this.iA&&v);this.Ko().Ze(this.eu&&
v);this.ol()};u.prototype.Hb=function(){e.prototype.Hb.call(this);this.yQa||(this.yQa=!0,this.No?this.bind(m.hb,this.Dqa,this):(this.bind(m.hb,this.xQa,this),this.bind(m.Gc,this.BQa,this),this.bind(m.Jb,this.AQa,this),this.bind(m.Os,this.zQa,this)))};u.prototype.bb=function(){this.L("overflow")&&(this.vda=this.B("overflow"),this.S("overflow"),this.Yd());this.L("scrollBarColor")&&(this.Jo().setColor(this.B("scrollBarColor")),this.Ko().setColor(this.B("scrollBarColor")),this.S("scrollBarColor"));this.L("scrollBarWidth")&&
(this.Jo().UU(this.B("scrollBarWidth")),this.Ko().UU(this.B("scrollBarWidth")),this.S("scrollBarWidth"));if(this.L("scrollBarMargin")||this.L("scrollBarVerticalMargin")||this.L("scrollBarHorizontalMargin")){var v=this.B("scrollBarHorizontalMargin","scrollBarMargin"),w=this.B("scrollBarVerticalMargin","scrollBarMargin");this.Jo().SIa(v);this.Jo().yJa(w);this.Ko().SIa(v);this.Ko().yJa(w);this.S("scrollBarMargin");this.S("scrollBarVerticalMargin");this.S("scrollBarHorizontalMargin")}this.L("scrollBarOpacity")&&
(this.Jo().Oh(this.B("scrollBarOpacity")),this.Ko().Oh(this.B("scrollBarOpacity")),this.S("scrollBarOpacity"));e.prototype.bb.call(this)};u.prototype.cj=function(){e.prototype.cj.call(this);this.S1a();this.r2a();this.p2a();this.cu();this.ol()};u.prototype.S1a=function(){for(var v=0,w=0,x=0,y=0,z=this.rb(),B=0;B<z.length;B++){var D=z[B];D.get("visible")&&(y=Math.min(y,D.Na),x=Math.min(x,D.Qa),v=Math.max(v,D.Na+D.Wa()),w=Math.max(w,D.Qa+D.Ab()))}this.Hqa=y;this.Iqa=x;this.Rb=v;this.dc=w};u.prototype.r2a=
function(){this.Og=Math.min(this.Bf(),this.Rb);this.kg=Math.min(this.Af(),this.dc)};u.prototype.p2a=function(){var v=this.$d.some(function(y){return y.f7a()}),w=0>this.Hqa||0>this.Iqa||this.Rb>this.Og||this.dc>this.kg;if(this.vda==f.mq){this.iA=this.Og<this.Rb;var x=(this.eu=this.kg<this.dc)&&this.iA;this.Jo().setSize(this.Og,this.Rb);this.Jo().DIa(x);this.Ko().setSize(this.kg,this.dc);this.Ko().DIa(x);this.Yb().tM(!w&&!v)}else this.eu=this.iA=!1,this.vda==f.PH?this.Yb().tM(!0):this.Yb().tM(!w&&!v);
this.Mx(!0)};u.prototype.rh=function(){this.Ko().rh();this.Jo().rh();e.prototype.rh.call(this)};return u});define("X",["require"],function(){return{Yh:"vertical",Ig:"horizontal"}});define("ec",["require","exports"],function(){return function(){function a(){}a.$x=function(d){return d?d.split(",").map(function(l){return l.trim()}).filter(function(l){return""!=l}).map(function(l){"'"!=l[0]&&'"'!=l[0]&&(l="'"+l+"'");return l}).join(", "):""};return a}()});
define("oU","require jquery.mod er lV nF X e gX ec".split(" "),function(a){function d(g){var n=g.Rn.width(),q=g.Rn.height();"italic"==g.get("fontStyle")&&(n+=1*q/5);return Math.round(n)}var l=a("jquery.mod"),m=a("er"),k=a("lV"),c=a("nF"),h=a("X"),f=a("e");a("gX");var b=a("ec");a=k.extend(f,function(){f.call(this);this.Re("Label");this.Rn=this.pR=null});a.Ic={};a.prototype.yb=function(){f.prototype.yb.call(this);this.h("fontFamily");this.h("fontSize");this.h("fontColor");this.h("fontWeight");this.h("fontStyle");
this.h("horizontalAlign",c.ab);this.h("verticalAlign",c.se);this.h("direction",h.Ig);this.h("text","");this.h("textDecoration");this.h("textShadowBlurRadius",3);this.h("textShadowColor","#000000");this.h("textShadowHorizontalLength",0);this.h("textShadowOpacity",0);this.h("textShadowVerticalLength",0)};a.prototype.Hb=function(){f.prototype.Hb.call(this);if(!this.Rn){this.pR=document.createElement("span");this.Rn=l(this.pR);this.tfa({position:"absolute","text-align":"center",cursor:"inherit","white-space":"nowrap",
transform:"translate3d(0, 0, 0)"});var g=this.Yb();g.tM(!1);g.append(this.Rn)}};a.prototype.Kw=function(){f.prototype.Kw.call(this);var g=this.Yb();this.cm=d(this)+g.yL()+g.zL();this.bm=this.Rn.height()+g.AL()+g.vL();e(this)};a.prototype.bb=function(){var g={};if(this.L("direction")||this.L("text")){switch(this.B("direction")){case h.Yh:g["line-height"]="100%";this.Rn.html(this.Rn.text(this.B("text")).text().split("").join("<br/>"));break;default:g["line-height"]="normal",this.Rn.text(this.B("text")),
this.Rn.html(this.Rn.html().split(" ").join("&nbsp;"))}this.S("direction");this.S("text");setTimeout(function(){this.fc();this.Yd()}.bind(this),0)}if(this.L("fontFamily")){var n=this.B("fontFamily");m(n).isString()||(n="");g.fontFamily=b.$x(n);this.S("fontFamily");this.fc();this.Yd()}this.L("fontSize")&&(n=this.B("fontSize"),m(n).isNumber()?n+="px":m(n).isString()||(n=""),g.fontSize=n,this.S("fontSize"),this.fc(),this.Yd());this.L("fontColor")&&(n=this.B("fontColor"),m(n).isString()||(n=""),g.color=
n,this.S("fontColor"));if(this.L("fontWeight")){n=this.B("fontWeight");switch(n){case "bold":case "bolder":case "lighter":case "100":case "200":case "300":case "400":case "500":case "600":case "700":case "800":case "900":case "normal":break;default:n="normal"}g.fontWeight=n;this.S("fontWeight");this.fc();this.Yd()}if(this.L("fontStyle")){n=this.B("fontStyle");switch(n){case "italic":case "normal":break;default:n="normal"}g.fontStyle=n;this.S("fontStyle");this.fc();this.Yd()}if(this.L("textDecoration")){n=
this.B("textDecoration");switch(n){case "underline":case "overline":case "line-through":case "none":break;default:n="none"}g.textDecoration=n;this.S("textDecoration");this.fc();this.Yd()}this.L("horizontalAlign")&&(this.Yd(),this.S("horizontalAlign"));this.L("verticalAlign")&&(this.Yd(),this.S("verticalAlign"));n=["textShadowColor","textShadowHorizontalLength","textShadowVerticalLength","textShadowBlurRadius","textShadowOpacity"];if(m(n).any(function(p){return this.L(p)},this)){var q={};m(n).each(function(p){q[p]=
this.B(p);this.S(p)},this);g["-moz-text-shadow"]=g["-webkit-text-shadow"]=g["text-shadow"]=[q.textShadowHorizontalLength+"px",q.textShadowVerticalLength+"px",q.textShadowBlurRadius+"px","rgba("+parseInt("0x"+q.textShadowColor.substr(1,2))+", "+parseInt("0x"+q.textShadowColor.substr(3,2))+", "+parseInt("0x"+q.textShadowColor.substr(5,2))+", "+q.textShadowOpacity+")"].join(" ");n=0==q.textShadowVerticalLength&&0==this.B("textShadowHorizontalLength")?135:45*Math.round(4*Math.atan2(q.textShadowHorizontalLength,
-q.textShadowVerticalLength)/Math.PI);g.filter="progid:DXImageTransform.Microsoft.Shadow(color=#"+("00"+(255*q.textShadowOpacity).toString(16)).slice(-2)+q.textShadowColor.substr(1,6)+",direction="+n+")";this.Yb().tM((0<q.textShadowHorizontalLength||0<q.textShadowVerticalLength||0<q.textShadowBlurRadius)&&0<q.textShadowOpacity)}this.tfa(g);f.prototype.bb.call(this)};a.prototype.cj=function(){var g={left:"auto",right:"auto",top:"auto",bottom:"auto"};switch(this.B("horizontalAlign")){case c.ab:g.left=
"0";break;case c.ub:this.rh();g.left=this.Bf()-d(this)+"px";break;case c.$e:this.rh(),g.left=Math.max(0,Math.round(.5*(this.Bf()-d(this))))+"px"}switch(this.B("verticalAlign")){case c.Hc:g.top="0";break;case c.Ac:this.rh();g.top=this.Af()-this.pR.clientHeight+"px";break;case c.se:this.rh(),g.top=Math.max(0,Math.round(.5*(this.Af()-this.pR.clientHeight)))+"px"}this.tfa(g)};a.prototype.tfa=function(g){var n=this.pR.style,q;for(q in g)n[q]=g[q]};var e=function(){function g(){r||n()&&(r=setTimeout(function(){r=
null;var t=(new Date).getTime()-5E3,u;for(u in p){var v=p[u];v.timestamp<t&&delete p[u];var w=v.label;if(v.width!=d(w)||v.height!=w.Rn.height())w.fc(),w.Yd()}g()},500))}function n(){for(var t in p)return!0;return!1}var q=1,p={},r=null;return function(t){t.Aua||(t.Aua=q++);p[t.Aua]={label:t,timestamp:(new Date).getTime(),width:d(t),height:t.Rn.height()};g()}}();return a});
define("mw","require lV er cZ bi pB cI hM eo il hh T oU".split(" "),function(a){var d=a("lV"),l=a("er"),m=a("cZ"),k=a("bi"),c=a("pB"),h=a("cI"),f=a("hM"),b=a("eo"),e=a("il"),g=a("hh"),n=a("T"),q=a("oU"),p=d.extend(n,function(){this.Re("Button");n.call(this);this.Gi=this.Pa=null;this.set("childrenInteractionEnabled",!1);this.set("contentOpaque",!0);this.set("creationPolicy",m.PC);this.set("overflow",e.cna);this.set("autoRolledOver",!0);this.set("autoPressed",!0);this.set("cursor",k.Le);this.set("ariaRole",
"button")});p.prototype.yb=function(){n.prototype.yb.call(this);this.h("label");this.h("fontFamily");this.h("fontSize");this.h("fontColor");this.h("fontWeight");this.h("fontStyle");this.h("textDecoration");this.h("textShadowBlurRadius");this.h("textShadowColor");this.h("textShadowHorizontalLength");this.h("textShadowOpacity");this.h("textShadowVerticalLength");this.h("layout","horizontal");this.h("iconWidth");this.h("iconHeight");this.h("iconBeforeLabel");this.h("gap",5);this.h("mode",b.Me);this.h("buttonGroup");
this.h("paddingLeft",5);this.h("paddingTop",5);this.h("paddingRight",5);this.h("paddingBottom",5);this.h("pressed");this.A("rollOverOpacity",g.aa,"opacity");this.A("rollOverIconWidth",g.aa,"iconWidth");this.A("rollOverIconHeight",g.aa,"iconHeight");this.A("rollOverFontSize",g.aa,"fontSize");this.A("rollOverFontColor",g.aa,"fontColor");this.A("rollOverFontWeight",g.aa,"fontWeight");this.A("rollOverFontStyle",g.aa,"fontStyle");this.A("rollOverTextDecoration",g.aa,"textDecoration");this.A("rollOverTextShadowBlurRadius",
g.aa,"textShadowBlurRadius");this.A("rollOverTextShadowColor",g.aa,"textShadowColor");this.A("rollOverTextShadowHorizontalLength",g.aa,"textShadowHorizontalLength");this.A("rollOverTextShadowOpacity",g.aa,"textShadowOpacity");this.A("rollOverTextShadowVerticalLength",g.aa,"textShadowVerticalLength");this.A("rollOverBorderSize",g.aa,"borderSize");this.A("rollOverBorderLeftSize",g.aa,"borderLeftSize");this.A("rollOverBorderTopSize",g.aa,"borderTopSize");this.A("rollOverBorderRightSize",g.aa,"borderRightSize");
this.A("rollOverBorderBottomSize",g.aa,"borderBottomSize");this.A("rollOverBorderColor",g.aa,"borderColor");this.A("rollOverBorderLeftColor",g.aa,"borderLeftColor");this.A("rollOverBorderTopColor",g.aa,"borderTopColor");this.A("rollOverBorderRightColor",g.aa,"borderRightColor");this.A("rollOverBorderBottomColor",g.aa,"borderBottomColor");this.A("rollOverShadow",g.aa,"shadow");this.A("rollOverShadowHorizontalLength",g.aa,"shadowHorizontalLength");this.A("rollOverShadowVerticalLength",g.aa,"shadowVerticalLength");
this.A("rollOverShadowBlurRadius",g.aa,"shadowBlurRadius");this.A("rollOverShadowSpread",g.aa,"shadowSpread");this.A("rollOverShadowOpacity",g.aa,"shadowOpacity");this.A("rollOverShadowColor",g.aa,"shadowColor");this.A("rollOverBackgroundOpacity",g.aa,"backgroundOpacity");this.A("rollOverBackgroundColor",g.aa,"backgroundColor");this.A("rollOverBackgroundColorRatios",g.aa,"backgroundColorRatios");this.A("rollOverBackgroundColorDirection",g.aa,"backgroundColorDirection");this.A("pressedLabel",g.Bb,
"label");this.A("pressedOpacity",g.Bb,"opacity");this.A("pressedIconWidth",g.Bb,"iconWidth");this.A("pressedIconHeight",g.Bb,"iconHeight");this.A("pressedFontSize",g.Bb,"fontSize");this.A("pressedFontColor",g.Bb,"fontColor");this.A("pressedFontWeight",g.Bb,"fontWeight");this.A("pressedFontStyle",g.Bb,"fontStyle");this.A("pressedTextDecoration",g.Bb,"textDecoration");this.A("pressedTextShadowBlurRadius",g.Bb,"textShadowBlurRadius");this.A("pressedTextShadowColor",g.Bb,"textShadowColor");this.A("pressedTextShadowHorizontalLength",
g.Bb,"textShadowHorizontalLength");this.A("pressedTextShadowOpacity",g.Bb,"textShadowOpacity");this.A("pressedTextShadowVerticalLength",g.Bb,"textShadowVerticalLength");this.A("pressedBorderSize",g.Bb,"borderSize");this.A("pressedBorderLeftSize",g.Bb,"borderLeftSize");this.A("pressedBorderTopSize",g.Bb,"borderTopSize");this.A("pressedBorderRightSize",g.Bb,"borderRightSize");this.A("pressedBorderBottomSize",g.Bb,"borderBottomSize");this.A("pressedBorderColor",g.Bb,"borderColor");this.A("pressedBorderLeftColor",
g.Bb,"borderLeftColor");this.A("pressedBorderTopColor",g.Bb,"borderTopColor");this.A("pressedBorderRightColor",g.Bb,"borderRightColor");this.A("pressedBorderBottomColor",g.Bb,"borderBottomColor");this.A("pressedShadow",g.Bb,"shadow");this.A("pressedShadowHorizontalLength",g.Bb,"shadowHorizontalLength");this.A("pressedShadowVerticalLength",g.Bb,"shadowVerticalLength");this.A("pressedShadowBlurRadius",g.Bb,"shadowBlurRadius");this.A("pressedShadowSpread",g.Bb,"shadowSpread");this.A("pressedShadowOpacity",
g.Bb,"shadowOpacity");this.A("pressedShadowColor",g.Bb,"shadowColor");this.A("pressedBackgroundOpacity",g.Bb,"backgroundOpacity");this.A("pressedBackgroundColor",g.Bb,"backgroundColor");this.A("pressedBackgroundColorRatios",g.Bb,"backgroundColorRatios");this.A("pressedBackgroundColorDirection",g.Bb,"backgroundColorDirection");this.A("pressedLabel",g.lc,"label");this.A("pressedRollOverOpacity",g.lc,"opacity");this.A("pressedRollOverIconWidth",g.lc,"iconWidth");this.A("pressedRollOverIconHeight",g.lc,
"iconHeight");this.A("pressedRollOverFontSize",g.lc,"fontSize");this.A("pressedRollOverFontColor",g.lc,"fontColor");this.A("pressedRollOverFontWeight",g.lc,"fontWeight");this.A("pressedRollOverFontStyle",g.lc,"fontStyle");this.A("pressedRollOverTextDecoration",g.lc,"textDecoration");this.A("pressedRollOverTextShadowBlurRadius",g.lc,"textShadowBlurRadius");this.A("pressedRollOverTextShadowColor",g.lc,"textShadowColor");this.A("pressedRollOverTextShadowHorizontalLength",g.lc,"textShadowHorizontalLength");
this.A("pressedRollOverTextShadowOpacity",g.lc,"textShadowOpacity");this.A("pressedRollOverTextShadowVerticalLength",g.lc,"textShadowVerticalLength");this.A("pressedRollOverBorderSize",g.lc,"borderSize");this.A("pressedRollOverBorderLeftSize",g.lc,"borderLeftSize");this.A("pressedRollOverBorderTopSize",g.lc,"borderTopSize");this.A("pressedRollOverBorderRightSize",g.lc,"borderRightSize");this.A("pressedRollOverBorderBottomSize",g.lc,"borderBottomSize");this.A("pressedRollOverBorderColor",g.lc,"borderColor");
this.A("pressedRollOverBorderLeftColor",g.lc,"borderLeftColor");this.A("pressedRollOverBorderTopColor",g.lc,"borderTopColor");this.A("pressedRollOverBorderRightColor",g.lc,"borderRightColor");this.A("pressedRollOverBorderBottomColor",g.lc,"borderBottomColor");this.A("pressedRollOverShadow",g.lc,"shadow");this.A("pressedRollOverShadowHorizontalLength",g.lc,"shadowHorizontalLength");this.A("pressedRollOverShadowVerticalLength",g.lc,"shadowVerticalLength");this.A("pressedRollOverShadowBlurRadius",g.lc,
"shadowBlurRadius");this.A("pressedRollOverShadowSpread",g.lc,"shadowSpread");this.A("pressedRollOverShadowOpacity",g.lc,"shadowOpacity");this.A("pressedRollOverShadowColor",g.lc,"shadowColor");this.A("pressedRollOverBackgroundOpacity",g.lc,"backgroundOpacity");this.A("pressedRollOverBackgroundColor",g.lc,"backgroundColor");this.A("pressedRollOverBackgroundColorRatios",g.lc,"backgroundColorRatios");this.A("pressedRollOverBackgroundColorDirection",g.lc,"backgroundColorDirection")};p.prototype.L9=function(){};
p.prototype.Hb=function(){n.prototype.Hb.call(this);this.Gi||(this.Gi=this.L9(),this.Za(this.Gi));this.Pa||(this.Pa=new q,this.Za(this.Pa))};p.prototype.HN=function(){this.get("pressed")?(this.set("pressed",!1),this.trigger(new h(c.Hl))):(this.set("pressed",!0),this.trigger(new h(c.Oj)))};p.prototype.Nv=function(){return this.get("label")||n.prototype.Nv.call(this)};p.prototype.bb=function(){var r=!1;this.L("mode")&&(this.B("mode")==b.Me?(this.unbind(c.ma,this.HN,this,!0),this.set("autoPressed",!0)):
(this.bind(c.ma,this.HN,this,!0),this.set("autoPressed",!1)),this.S("mode"),r=!0);if(r||this.L("pressed"))this.B("mode")==b.Rj?this.lK(1==this.B("pressed")):r&&this.lK(!1);this.L("label")&&(r=this.B("label"),this.Pa.set("text",r),this.Pa.set("visible",r?!0:!1),this.S("label"));this.xc(p.Moa,p.Noa,[this.Pa],!0,!0);this.L("iconBeforeLabel")&&(0==this.B("iconBeforeLabel")?this.io(this.Pa,0):this.io(this.Gi,0),this.S("iconBeforeLabel"));this.L("iconWidth")&&(this.Gi.set("width",this.B("iconWidth")),this.S("iconWidth"));
this.L("iconHeight")&&(this.Gi.set("height",this.B("iconHeight")),this.S("iconHeight"));this.L("buttonGroup")&&((r=this.B("buttonGroup"))?f.register(this,r):f.unregister(this),this.S("buttonGroup"));this.xc(["horizontalAlign","verticalAlign"],{},[this.Gi],!0,!1);n.prototype.bb.call(this)};p.Moa="fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" ");p.Noa={};l(p.Moa).each(function(r){p.Noa[r]=
r});return p});define("kk",["require","fq","mw"],function(a){var d=a("fq"),l=a("mw");return d.define("BaseButton",l,function(){l.call(this)})});define("jU",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("BaseObject",d,function(){d.call(this)})});
define("he",["require","pB","eF"],function(a){var d=a("pB"),l=a("eF");return{eSa:function(){this.Dk=this.af=null;this.bind(d.kd,this.Dra,this,!0);this.bind(d.cd,this.yra,this,!0);this.bind(d.Gc,this.Ara,this,!0);this.bind(d.Jb,this.zra,this,!0);this.bind(d.G("effect"),this.wra,this,!0);this.bind(d.G("rollOverEffect"),this.Bra,this,!0);this.MD=!1},feb:function(){this.unbind(d.kd,this.Dra,this,!0);this.unbind(d.cd,this.yra,this,!0);this.unbind(d.Gc,this.Ara,this,!0);this.unbind(d.Jb,this.zra,this,!0);
this.unbind(d.G("effect"),this.wra,this,!0);this.unbind(d.G("rollOverEffect"),this.Bra,this,!0)},Dra:function(){this.af&&this.af.play()},yra:function(){this.af&&this.af.stop();this.Dk&&this.Dk.stop();this.MD=!1},Ara:function(){this.MD||(this.MD=!0,this.Dk&&(this.af&&this.af.get("loop")&&0<this.af.ll()?this.af.reverse():this.af&&0!=this.af.ll()&&1!=this.af.ll()||(this.af&&this.af.stop(),this.Dk.play())))},zra:function(){this.MD&&(this.MD=!1,this.Dk&&(0<this.Dk.ll()?this.Dk.reverse():this.af&&this.af.get("loop")&&
this.af.play()))},xra:function(){this.F$()},F$:function(){this.MD&&this.Dk&&(this.af.stop(),this.Dk.play())},Cra:function(){this.MD||(this.Dk.stop(),this.af&&this.af.get("loop")&&this.af.play())},wra:function(){this.af&&this.af.unbind(l.vk,this.xra,this,!0);this.af&&this.af.unbind(l.kv,this.F$,this,!0);(this.af=this.get("effect"))&&this.af.bind(l.vk,this.xra,this,!0);this.af&&this.af.bind(l.kv,this.F$,this,!0)},Bra:function(){this.Dk&&this.Dk.unbind(l.kv,this.Cra,this,!0);(this.Dk=this.get("rollOverEffect"))&&
this.Dk.bind(l.kv,this.Cra,this,!0)}}});
define("jf",["require","lV","mz","fq","he"],function(a){var d=a("lV"),l=a("mz"),m=a("fq");a=a("he");m=m.define("Model3DObject",l,function(){l.call(this);this.set("hidden",!1);this.eSa();this.vp=this.tJ=this.aba=this.$aa=!1;this.rba=!0;this.hE=!1});d.c2(m,[a]);var k=["enabledInStandard","enabledInVR","hideBasedOnDistance","hideWhileUserInteracting","hideWhileMoving"];m.prototype.set=function(c,h){l.prototype.set.call(this,c,h);-1!=k.indexOf(c)&&this.yF()};m.prototype.rla=function(c){this.aba!==c&&
(this.aba=c,this.yF())};m.prototype.iC=function(c){this.vp!==c&&(this.vp=c,this.yF())};m.prototype.jo=function(c){this.tJ!==c&&(this.tJ=c,this.yF())};m.prototype.c5=function(c){this.rba!==c&&(this.rba=c,this.yF())};m.prototype.Gy=function(c){this.hE!==c&&(this.hE=c,this.yF())};m.prototype.qla=function(c){this.$aa!==c&&(this.$aa=c,this.yF())};m.prototype.yF=function(){this.set("hidden",this.aba||this.$aa||this.hE&&!1===this.get("enabledInVR")||this.rba&&!1===this.get("enabledInStandard")||this.tJ&&
this.get("hideWhileMoving")||this.vp&&this.get("hideWhileUserInteracting"))};return m});define("gB",["require","fq","jf"],function(a){var d=a("fq"),l=a("jf");return d.define("BoxModel3DObject",l,function(){l.call(this)})});define("mN",["require"],function(){return{NONE:"none",fz:"fill",Uh:"fit_inside",Is:"fit_outside",bq:"fit_to_width",xk:"fit_to_height",DLa:"custom"}});
define("nk","require er jquery.mod lV pB iy w nF mN e gX mD".split(" "),function(a){function d(r){this.c9=r;this.Cd=[];this.Ol=null}var l=a("er"),m=a("jquery.mod"),k=a("lV"),c=a("pB"),h=a("iy"),f=a("w"),b=a("nF"),e=a("mN"),g=a("e"),n=a("gX"),q=a("mD");d.En=document.createElement("a");d.prototype.vQa=function(r){d.En.href=r;return d.En.href};d.prototype.load=function(r,t,u){r=this.vQa(r);this.Ol&&!this.Ol.Mh()&&(this.Ol.cancel(),this.Cd=l(this.Cd).without(this.Ol));(this.Ol=l(this.Cd).find(function(x){return x.Yi()==
r}))?this.Cd=l(this.Cd).without(this.Ol):(this.Ol=new q(h.doa),this.Ol.load(r));for(this.Cd.splice(0,0,this.Ol);this.Cd.length>this.c9;)this.Cd.pop().cancel();if(t){var v=this.Ol,w=function(){t.call(u||window,v.Cf(),v.Fe(),v.Ve())};this.Ol.Mh()?w():this.Ol.bind(c.ea,w)}};d.prototype.clear=function(){this.Cd.forEach(function(r){r.cancel()});this.Ol=null};a=k.extend(g,function(r){g.call(this);this.Re("Image");this.c9=r||1;this.Vga=!1;this.Vl=b.ab;this.hY=!1;this.xm=b.Hc;this.J1=!1;this.Rf=e.NONE;this.Lea=
!1;this.HJ=this.IJ=0;this.nba=this.sda=!1;this.dc=this.Rb=0;this.Yv=!1;this.ed=this.Wl=this.ic=this.qY=this.pY=null;this.bind(c.tc,this.$Ua,this);this.bind(c.kd,this.aVa,this)});a.prototype.Aaa=function(){this.ed=new d(this.c9);this.Aaa=function(){return this.ed};return this.ed};a.prototype.yb=function(){g.prototype.yb.call(this);this.h("horizontalAlign",b.ab);this.h("verticalAlign",b.Hc);this.h("scaleMode",e.NONE)};a.prototype.set=function(r,t){"url"==r&&this.get("url")!=t&&(this.Vga=!0,this.xe());
g.prototype.set.call(this,r,t)};a.prototype.sM=function(r){this.Vl!=r&&(this.Vl=r,this.hY=!0,this.xe())};a.prototype.yM=function(r){this.xm!=r&&(this.xm=r,this.J1=!0,this.xe())};a.prototype.hC=function(r){this.Rf!=r&&(this.Rf=r,this.Lea=!0,this.xe(),this.fc())};a.prototype.$Ua=function(){this.Yv=!0;this.xe()};a.prototype.aVa=function(){this.WAa()};var p={position:"static",cursor:"inherit",display:"inline",verticalAlign:"top",visibility:"hidden","pointer-events":"none","user-select":"none","-ms-user-select":"none",
"-moz-user-select":"none","-webkit-user-select":"none","touch-callout":"none","-webkit-touch-callout":"none"};f.browser()==f.po&&f.pb()&&(p.transform="translate3d(0,0,0)");a.prototype.xpa=function(r,t,u){this.IJ=t?t:0;this.HJ=u?u:0;this.ic&&(this.ic.remove(),this.ic=null);if(this.Wl=r)this.ic=m(this.Wl),n.css(this.Wl,p),this.pY.append(this.ic);this.sda=this.nba=!0;this.xe();this.fc();this.ic&&this.trigger(c.ea)};a.prototype.Hb=function(){g.prototype.Hb.call(this);this.pY||(this.qY=document.createElement("div"),
this.pY=m(this.qY),n.css(this.qY,{position:"static",overflow:"hidden",cursor:"inherit"}),this.Yb().append(this.pY))};a.prototype.Kw=function(){this.cm=this.IJ+this.Fm()+this.uu();this.bm=this.HJ+this.vu()+this.xL();this.fua=0==this.IJ&&0==this.HJ?0:this.IJ/this.HJ;this.pP=this.qP=0};a.prototype.bb=function(){this.L("scaleMode")&&(this.hC(this.B("scaleMode")),this.S("scaleMode"));this.L("horizontalAlign")&&(this.sM(this.B("horizontalAlign")),this.S("horizontalAlign"));this.L("verticalAlign")&&(this.yM(this.B("verticalAlign")),
this.S("verticalAlign"));this.qpa()&&(this.Yv=!0);g.prototype.bb.call(this);this.WAa();if(this.X6a()){var r=!1;if(this.Lea||this.sda||this.Yv){var t=this.Bf(),u=this.Af(),v=this.IJ,w=this.HJ,x;if(0==v||0==w)var y=x=0;else switch(this.Rf){case e.NONE:x=v;y=w;break;case e.fz:x=t;y=u;break;case e.Uh:v*u>w*t?(x=t,y=w*t/v):(x=v*u/w,y=u);break;case e.Is:v*u>w*t?(x=v*u/w,y=u):(x=t,y=w*t/v);break;case e.bq:x=t;y=w*t/v;break;case e.xk:x=v*u/w,y=u}if(this.Rb!=x||this.dc!=y)this.Rb=x,this.dc=y,r=!0;this.sda=
this.Lea=!1}if(r||this.Yv||this.nba)this.J1=this.hY=!0,this.Wl&&n.css(this.Wl,{width:this.Rb+"px",height:this.dc+"px",visibility:"inherit"}),n.css(this.qY,{width:this.Bf()+"px",height:this.Af()+"px","border-top-left-radius":this.cY(this.bTa(),this.isa(),this.gsa())+"px","border-top-right-radius":this.cY(this.cTa(),this.isa(),this.hsa())+"px","border-bottom-left-radius":this.cY(this.$Sa(),this.fsa(),this.gsa())+"px","border-bottom-right-radius":this.cY(this.aTa(),this.fsa(),this.hsa())+"px"}),this.fc(),
this.nba=this.Yv=!1;if(this.hY&&this.Wl){switch(this.Vl){case b.ab:n.css(this.Wl,{"margin-left":0,"margin-right":this.Bf()-this.Rb+"px"});break;case b.ub:n.css(this.Wl,{"margin-left":this.Bf()-this.Rb+"px","margin-right":0});break;case b.$e:n.css(this.Wl,{"margin-left":Math.floor(.5*(this.Bf()-this.Rb))+"px","margin-right":Math.ceil(.5*(this.Bf()-this.Rb))+"px"})}this.hY=!1}if(this.J1&&this.Wl){switch(this.xm){case b.Hc:n.css(this.Wl,{"margin-top":0,"margin-bottom":this.Af()-this.dc+"px"});break;
case b.Ac:n.css(this.Wl,{"margin-top":this.Af()-this.dc+"px","margin-bottom":0});break;case b.se:n.css(this.Wl,{"margin-top":Math.floor(.5*(this.Af()-this.dc))+"px","margin-bottom":Math.ceil(.5*(this.Af()-this.dc))+"px"})}this.J1=!1}}};a.prototype.WAa=function(){if(this.Vga){var r=this.get("url");r?this.Aaa().load(r,this.xpa,this):(this.Aaa().clear(),this.xpa(null,0,0));this.Vga=!1}};a.prototype.cY=function(r,t,u){if(!r)return 0;var v=0;t&&(v=Math.max(v,t));u&&(v=Math.max(v,u));return Math.max(0,
r-v)};return a});
define("gl","require lV mN hh mw nk".split(" "),function(a){var d=a("lV"),l=a("mN"),m=a("hh"),k=a("mw"),c=a("nk");a=d.extend(k,function(){k.call(this)});a.prototype.yb=function(){k.prototype.yb.call(this);this.h("iconURL");this.A("rollOverIconURL",m.aa,"iconURL");this.A("pressedIconURL",m.Bb,"iconURL");this.A("pressedRollOverIconURL",m.lc,"iconURL")};a.prototype.L9=function(){var h=new c(3);h.set("scaleMode",l.Uh);return h};a.prototype.bb=function(){if(this.L("iconURL")){var h=this.B("iconURL");this.Gi.set("url",
h);this.Gi.set("visible",h?!0:!1);this.S("iconURL")}k.prototype.bb.call(this)};return a});define("gk",["require","fq","gl"],function(a){var d=a("fq"),l=a("gl");return d.define("Button",l,function(){l.call(this)})});define("kt",["require","fq","jf"],function(a){var d=a("fq"),l=a("jf");return d.define("ExternalModel3DObject",l,function(){l.call(this)})});define("pW",["require","fq","kt"],function(a){var d=a("fq"),l=a("kt");return d.define("PlaneModel3DObject",l,function(){l.call(this)})});
define("lG",["require","fq","pW"],function(a){var d=a("fq"),l=a("pW");return d.define("CanvasPlaneModel3DObject",l,function(){l.call(this)})});define("iD",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("CapPanoramaOverlay",d,function(){d.call(this)})});define("ir",["require","fq","iD"],function(a){var d=a("fq"),l=a("iD");return d.define("CeilingCapPanoramaOverlay",l,function(){l.call(this)})});
define("l",["require","fq","jf"],function(a){var d=a("fq"),l=a("jf");return d.define("ChildModel3DObject",l,function(){l.call(this);this.set("floorColor","transparent")})});
define("cH","require er jquery.mod lV pB cI e".split(" "),function(a){a("er");var d=a("jquery.mod"),l=a("lV"),m=a("pB"),k=a("cI"),c=a("e");a=l.extend(c,function(){c.call(this);this.Re("Canvas");this.B$=!0;this.T=null;this.bind(m.tc,this.SPa,this)});a.prototype.SPa=function(){this.A3()};a.prototype.A3=function(){this.B$=!0;this.ol()};a.prototype.Hb=function(){c.prototype.Hb.call(this);this.T||(this.T=d("<canvas/>"),this.T.css({position:"absolute",left:0,top:0,cursor:"inherit"}),this.Yb().append(this.T))};
a.prototype.bb=function(){this.qpa()&&this.A3();c.prototype.bb.call(this)};a.prototype.rh=function(){if(this.B$){this.B$=!1;var h=this.T.get(0);h.width=this.Bf();h.height=this.Af();this.Fcb()}c.prototype.rh.call(this)};a.prototype.$5a=function(){return this.T.get(0).width};a.prototype.Z5a=function(){return this.T.get(0).height};a.prototype.Y5a=function(){return this.T.get(0).getContext("2d")};a.prototype.Fcb=function(){this.trigger(new k(m.ba))};return a});
define("kE","require lV pB hh mw cH".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("hh"),k=a("mw"),c=a("cH");a=d.extend(k,function(){k.call(this)});a.prototype.cj=function(){k.prototype.cj.call(this)};a.prototype.yb=function(){k.prototype.yb.call(this);this.h("iconColor");this.A("rollOverIconColor",m.aa,"iconColor");this.A("pressedIconColor",m.Bb,"iconColor");this.A("pressedRollOverIconColor",m.lc,"iconColor")};a.prototype.L9=function(){var h=new c;h.bind(l.ba,this.WKa,this,!0);return h};a.prototype.bb=
function(){this.L("iconColor")&&(this.Gi.A3(),this.S("iconColor"));k.prototype.bb.call(this)};a.prototype.ETa=function(){return this.B("iconColor")};a.prototype.FTa=function(){return this.Gi.Y5a()};a.prototype.HTa=function(){return this.Gi.$5a()};a.prototype.GTa=function(){return this.Gi.Z5a()};a.prototype.WKa=function(){};return a});
define("gu","require lV pB kE nF hh jv".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("kE"),k=a("nF"),c=a("hh"),h=a("jv");a=d.extend(m,function(){m.call(this);this.ra({horizontalAlign:k.$e,verticalAlign:k.se});this.Ow=this.Ow.bind(this);this.bind(l.kd,this.tj,this,!0);this.bind(l.cd,this.sj,this,!0)});a.prototype.yb=function(){m.prototype.yb.call(this);this.h("iconLineWidth");this.A("rollOverIconLineWidth",c.aa,"iconLineWidth");this.A("pressedIconLineWidth",c.Bb,"iconLineWidth");this.A("pressedRollOverIconLineWidth",
c.lc,"iconLineWidth")};a.prototype.QTa=function(){return this.B("iconLineWidth")};a.prototype.bb=function(){this.L("iconLineWidth")&&(this.Gi.A3(),this.S("iconLineWidth"));m.prototype.bb.call(this)};a.prototype.WKa=function(){var f=this.FTa(),b=this.ETa(),e=this.HTa(),g=this.GTa(),n=this.QTa();f.clearRect(0,0,e,g);f.lineWidth=n||1;f.strokeStyle=b||"#000000";f.beginPath();f.moveTo(0,0);f.lineTo(e,g);f.moveTo(0,g);f.lineTo(e,0);f.closePath();f.stroke()};a.prototype.tj=function(){h.wha(this.Ow)};a.prototype.sj=
function(){h.Ika(this.Ow)};a.prototype.Ow=function(){this.trigger(l.ma)};return a});define("jR",["require","fq","gu"],function(a){var d=a("fq"),l=a("gu");return d.define("CloseButton",l,function(){l.call(this)})});define("kG",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("CookiesPolicy",d,function(){d.call(this)})});
define("mx",["require","lY","fq","T"],function(a){var d=a("lY"),l=a("fq"),m=a("T");a=l.define("Container",m,function(){m.call(this)});a.prototype.scrollTo=function(k,c){m.prototype.scrollTo.call(this,k,c)};a.prototype.scrollIntoView=function(k){d.ZB(function(){m.prototype.scrollIntoView.call(this,k)}.bind(this))};return a});
define("md",["require","mz","fq"],function(a){var d=a("mz"),l=a("fq");a=l.define("PanoramaFrame",d,function(){d.call(this);this.za=null});a.prototype.get=function(m,k){switch(m){case "overlays":return this.Daa();case "hfov":case "vfov":case "pitch":case "flipImageHorizontally":case "minFaceSize":if(this.za)return this.za.get(m,k)}return d.prototype.get.call(this,m,k)};a.prototype.Daa=function(){var m=d.prototype.get.call(this,"overlays");m||(m=[]);return this.qfa(m)};a.prototype.qfa=function(m){if(void 0===
this.qK||this.QY!=m){var k=function(h){return l.Ja("PopupPanoramaOverlay",h)},c=function(h){return l.Ja("LensFlarePanoramaOverlay",h)};this.QY=m;this.qK=[].concat(m.filter(function(h){return!(k(h)||c(h))}),m.filter(c),m.filter(k))}return this.qK};a.prototype.S3a=function(m){this.za=m};a.prototype.xB=function(){return this.za};a.prototype.Hm=function(){return!1};return a});define("pj",["require","fq","md"],function(a){var d=a("fq"),l=a("md");return d.define("CubicPanoramaFrame",l,function(){l.call(this)})});
define("eq","require gp pB w mV ni hC".split(" "),function(a){function d(f){this.Uo=this.Uo.bind(this);this.zt=this.zt.bind(this);this.cf=!1;this.Ir=this.TX=1;this.fY=!0;this.cA=this.fI=null;this.W=f;this.W.addEventListener("play",this.Uo,!0);this.W.addEventListener("playing",this.zt,!0);this.Zya();this.CF()}var l=a("gp");a("pB");var m=a("w"),k=a("mV"),c=a("ni");a("hC");var h;d.prototype.clear=function(){this.W&&(this.L0a(),this.W.removeEventListener("play",this.Uo,!0),this.W.removeEventListener("playing",
this.zt,!0),this.W=null)};d.prototype.Zya=function(){c.Fma&&m.browser()==m.sh&&m.jc()!=m.vC&&l&&!this.fI&&this.fA()&&(h||(h=l.createDelay(),h.delayTime.value=.3,h.connect(l.destination)),this.fI=l.createMediaElementSource(this.W),this.cA=l.createGain(),this.fI.connect(this.cA),this.cA.connect(h))};d.prototype.L0a=function(){this.fI&&(this.fI.disconnect(),this.fI=null);this.cA&&(this.cA.disconnect(),this.cA=null)};d.prototype.Y$a=function(f){this.fY!=f&&(this.W.log("AudioController","set hasAudio: "+
f),this.fY=f,this.CF())};d.prototype.Vf=function(f){this.cf!=f&&(this.W.log("AudioController","set muted: "+f),this.cf=f,this.CF())};d.prototype.Ly=function(f){this.Ir!=f&&(this.W.log("AudioController","set volume: "+f),this.Ir=f,this.CF())};d.prototype.CU=function(f){this.TX!=f&&(this.W.log("AudioController","set gain: "+f),this.TX=Math.max(0,Math.min(1,f)),this.CF())};d.prototype.Uo=function(){this.CF()};d.prototype.zt=function(){this.CF()};d.prototype.CF=function(){this.W.log("AudioController",
"updateVolume paused: "+this.W.paused+" outputVolume: "+(!this.fY||this.cf?0:this.Ir*this.TX));var f=!this.fY||this.cf?0:this.Ir*this.TX;0<f&&1>f&&this.Zya();this.cA?(this.cA.gain.value=f,this.W.volume=1):this.W.volume=f;this.W.muted=0==f};d.prototype.fA=function(){var f=this.W.currentSrc||this.W.children.length&&this.W.children[0].src||"";k.BB(f)&&(f=void 0);return f};return d});define("iq",["require"],function(){return{wo:"video",xLa:"audio"}});
define("nQ","require lV pB lx iy cI gF w mV bB hC".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("lx"),k=a("iy"),c=a("cI"),h=a("gF"),f=a("w"),b=a("mV"),e=a("bB"),g=a("hC"),n=d.extend(h,function(q){h.call(this);this.W=q;this.CE=this.CE.bind(this);this.Nw=this.Nw.bind(this);this.gm=this.gm.bind(this);this.wJ=this.wJ.bind(this);this.fk=this.fk.bind(this);this.im=this.im.bind(this);this.zt=this.zt.bind(this);this.ZR=this.ZR.bind(this);this.W.addEventListener("ended",this.gm,!0);this.W.addEventListener("pause",
this.im,!1);this.W.addEventListener("stalled",this.im,!1);this.W.addEventListener("waiting",this.im,!1);this.W.addEventListener("canplay",this.CE,!0);this.W.addEventListener("canplaythrough",this.Nw,!1);this.W.addEventListener("loadedmetadata",this.fk,!0);this.W.addEventListener("playing",this.zt,!1);this.W.addEventListener("error",this.wJ,!1);this.x$=!1;this.C=m.U;this.OJ=this.si=null;g.bind(l.ba,this.b3a,this)});n.prototype.clear=function(){this.W&&(this.W.removeEventListener("ended",this.gm,!0),
this.W.removeEventListener("pause",this.im,!1),this.W.removeEventListener("stalled",this.im,!1),this.W.removeEventListener("waiting",this.im,!1),this.W.removeEventListener("canplay",this.CE,!0),this.W.removeEventListener("canplaythrough",this.Nw,!1),this.W.removeEventListener("loadedmetadata",this.fk,!0),this.W.removeEventListener("error",this.wJ,!1),this.W=null)};n.prototype.play=function(){this.W.log("PlaybackController","play");this.OJ=m.PLAYING;this.JQ()};n.prototype.stop=function(){this.W.log("PlaybackController",
"stop");this.OJ=m.U;this.JQ()};n.prototype.getState=function(){return this.si||this.C};n.prototype.jG=function(){return this.W.readyState==this.W.HAVE_NOTHING||this.W.readyState==this.W.HAVE_METADATA||0===this.W.currentTime?!1:!0};n.prototype.JQ=function(){!this.si&&this.OJ&&(this.si=this.OJ,this.OJ=null,this.si==m.PLAYING?this.xfa():this.wfa())};n.prototype.b3a=function(){if(g.visible)this.W.log("PlaybackController","visibile changed to true, setting state to "+this.C),this.si=this.C,this.si==m.PLAYING?
this.xfa():this.wfa();else if(!this.W.paused){this.W.log("PlaybackController","paused by visibile changed to false");var q=this.W.pause();q&&q["catch"](this.wJ)}};n.prototype.fA=function(){return this.W.currentSrc||this.W.children.length&&this.W.children[0].src||""};n.prototype.xfa=function(){var q=this.fA();this.r0(q&&!b.BB(q));this.vW=f.browser()==f.sh;this.W.paused?(this.W.log("PlaybackController","startPlaying calling play"),this.W.muted=!0,this.W.log("PlaybackController","this._media.play()"),
this.W.play()["catch"](p=>{this.wJ(p)}).then(()=>{this.ewa()}).finally(()=>{})):(this.W.log("PlaybackController","startPlaying already playing"),this.ewa())};n.prototype.zt=function(){this.W.log("PlaybackController","onPlaying event received. Visible: "+g.visible)};n.prototype.ewa=function(){this.si==m.PLAYING?(this.W.log("PlaybackController","onPlay promise fullfilled received when waiting to play"),this.si=null,this.C=m.PLAYING,this.trigger(new c(n.Z6)),this.JQ()):this.W.log("PlaybackController",
"onPlay promise fullfilled received. Visible: "+g.visible)};n.prototype.wfa=function(){this.r0(!1);this.vW=!1;this.W.paused?(this.W.log("PlaybackController","startPausing already paused"),this.im()):(this.W.log("PlaybackController","startPausing calling pause"),this.W.pause())};n.prototype.im=function(){this.si==m.U?(this.W.log("PlaybackController","onPause event received when waiting to stop"),this.si=null,this.C=m.U,this.JQ()):g.visible?(this.W.log("PlaybackController","onPause event received without calling to pause"),
(this.C==m.PLAYING&&!this.si||this.si==m.PLAYING)&&!this.W.hasAttribute("loop")&&!isNaN(this.W.duration)&&this.W.currentTime==this.W.duration&&0<this.W.duration&&this.gm(),this.ZR()):this.W.log("PlaybackController","onPause event received when not visible")};n.prototype.CE=function(){this.W.log("PlaybackController","on can play");this.ZR()};n.prototype.Nw=function(){this.W.log("PlaybackController","can play through");this.ZR();this.r0(!1)};n.prototype.ZR=function(){if(this.bza()){if(this.vW&&0==this.W.currentTime){this.W.log("PlaybackController",
"updatePlaying applying ios hack");this.vW=!1;try{this.W.currentTime=.3}catch(q){}}f.browser()!=f.tH&&this.Zxa()}};n.prototype.bza=function(){return this.C==m.PLAYING&&g.visible&&this.W.paused&&3<=this.W.readyState};n.prototype.Zxa=function(q){this.$xa||(q?this.bza()&&(this.W.log("PlaybackController","updatePlaying retrying play"),this.si=m.PLAYING,this.xfa()):this.$xa=setTimeout(function(){this.$xa=null;this.Zxa(!0)}.bind(this),500))};n.prototype.wJ=function(){this.si==m.PLAYING&&(this.W.log("PlaybackController",
"onError waiting to play"),this.si=null,this.OJ?this.JQ():f.browser()==f.sh?this.trigger(new c(n.D6)):this.si=m.PLAYING)};n.prototype.fk=function(){this.W.log("PlaybackController","on loaded metadata");!isNaN(this.W.duration)&&this.W.currentTime==this.W.duration&&0<this.W.duration&&this.gm()};n.prototype.gm=function(){this.W.log("PlaybackController","onEnded");this.vW=!1;if(this.C==m.PLAYING&&!this.si||this.si==m.U)this.W.log("PlaybackController","onEnded finalizing video"),this.r0(!1),this.si=m.U,
this.wfa(),this.trigger(new c(n.vk))};n.prototype.r0=function(q){this.x$!=q&&(this.W.log("PlaybackController","downloading changed to: "+q),(this.x$=q)?e.Xbb(k.lna):e.Wbb(k.lna))};n.D6="deactivated";n.vk="end";n.Z6="play";return n});
define("C",["require","lV","pB","cI","gF"],function(a){var d=a("lV"),l=a("pB");a("cI");var m=a("gF");a=d.extend(m,function(k){m.call(this);this.fk=this.fk.bind(this);this.Mca=this.Mca.bind(this);this.Ji=this.Ji.bind(this);this.W=k;this.cl=null;this.Ne=[];this.W.addEventListener("loadedmetadata",this.fk,!0);this.W.textTracks.addEventListener("addtrack",this.Mca,!1)});a.prototype.set=function(k){k&&this.rOa(k)};a.prototype.clear=function(){this.YYa()};a.prototype.aT=function(){var k=this.cl&&this.cl.track.activeCues;
k&&(k=Array.prototype.slice.call(k,0));return k||[]};a.prototype.fk=function(){this.UAa()};a.prototype.Mca=function(){this.UAa()};a.prototype.Ji=function(){this.rya(this.cl.track.activeCues)};a.prototype.rya=function(k){k||(k=[]);if(0!=this.Ne.length||0!=k.length)this.Ne=Array.prototype.slice.call(k),this.trigger(l.uk,this.Ne)};a.prototype.rOa=function(k){this.W.log("TextTracksController","add text track src: "+k);this.cl=document.createElement("track");this.cl.kind="subtitles";this.cl.src=k;this.W.appendChild(this.cl)};
a.prototype.YYa=function(){this.cl&&(this.W.log("TextTracksController","remove text track"),this.cl.track.removeEventListener("cuechange",this.Ji),this.cl.track.mode="disabled",this.cl.src="",this.W.removeChild(this.cl),this.cl=null,this.rya([]))};a.prototype.UAa=function(){for(var k=0;k<this.W.textTracks.length;k++){var c=this.W.textTracks[k];c.removeEventListener("cuechange",this.Ji);c.mode=this.cl&&c==this.cl.track?"hidden":"disabled";"hidden"==c.mode&&c.addEventListener("cuechange",this.Ji)}};
return a});
define("iF",["require","exports","mV"],function(a,d,l){return function(){function m(){}m.is=function(k,c){k=l.parse(k).p5a;return-1!=c.indexOf(k)};m.BB=function(k,c){return!!k&&c.some(function(h){return 0===k.indexOf(h)})};m.Mna=[".mp4",".m4v",".m4p"];m.lMa=[".hevc"];m.sna=[".mov"];m.wNa=[".webm"];m.JMa=[".ogv",".ogg"];m.HLS=[".m3u8"];m.ana=".ply .bin .splat .spz .sog .zip".split(" ");m.ANa=[".json"];m.oMa=".jpg .jpeg .png .webp .gif .avif .apng .bmp".split(" ");m.wo=".m3u8 .mpd .mp4 .m4v .m4p .webm .ogv .ogg .mpg .mpeg .m3u8 .mpd".split(" ");m.pMa=
["data:image/"];return m}()});
define("eJ","require lV pB cI gF w iF".split(" "),function(a){var d=a("lV");a("pB");var l=a("cI"),m=a("gF"),k=a("w"),c=a("iF"),h=d.extend(m,function(f){m.call(this);this.W=f;this.Nw=this.Nw.bind(this);this.im=this.im.bind(this);this.Uo=this.Uo.bind(this);this.fk=this.fk.bind(this);this.gm=this.gm.bind(this);this.c_=this.c_.bind(this);this.mf=this.mf.bind(this);this.eca=this.uJ=this.sF=void 0;this.Qfa=0;this.W.addEventListener("ended",this.gm,!0);this.W.addEventListener("pause",this.im,!1);this.W.addEventListener("canplaythrough",
this.Nw,!1);this.W.addEventListener("timeupdate",this.c_,!1);this.W.addEventListener("play",this.Uo,!1);this.W.addEventListener("playing",this.zt,!1)});h.prototype.clear=function(){this.W&&(this.W.removeEventListener("ended",this.gm,!0),this.W.removeEventListener("pause",this.im,!1),this.W.removeEventListener("canplaythrough",this.Nw,!1),this.W.removeEventListener("timeupdate",this.c_,!1),this.W.removeEventListener("play",this.Uo,!1),this.W.removeEventListener("playing",this.zt,!1),this.W=null,this.sF&&
clearInterval(this.sF))};h.prototype.setTime=function(f){if(!this.W.srcObject){this.Qfa=0;this.RY=void 0;this.W.log("TimeController","setTime: "+f);k.eCa()&&!c.is(this.fA(),c.HLS)?this.xN=f||0:this.xN=void 0;try{this.W.currentTime=f}catch(b){}k.browser()==k.Yy||k.browser()==k.tH||k.jc()==k.xV&&0==f||(this.uJ=f,this.sAa())}};h.prototype.getTime=function(){return this.uJ||this.W.currentTime||0};h.prototype.ui=function(){return this.W.duration||0};h.prototype.Uo=function(){this.efa(!0)};h.prototype.im=
function(){this.efa(!1);this.RY=void 0};h.prototype.Nw=function(){this.W.log("TimeController","on can play through");this.sAa()};h.prototype.gm=function(){this.xN=void 0;this.efa(!1)};h.prototype.fk=function(){this.trigger(new l(h.dj))};h.prototype.sAa=function(){if(this.W.readyState>=this.W.HAVE_ENOUGH_DATA&&void 0!==this.uJ){this.W.log("TimeController","updateCurrentTime when can play through set time to: "+this.uJ);try{this.W.currentTime=this.uJ}catch(f){}this.uJ=void 0}};h.prototype.mf=function(){this.trigger(new l(h.Wf))};
h.prototype.c_=function(){if(k.eCa()&&!k.j7a()&&!this.W.paused&&this.W.readyState>=this.W.HAVE_ENOUGH_DATA){var f=(new Date).getTime();this.RY||(this.RY=f);this.eca&&500<f-this.eca&&(this.Qfa++,.4<this.Qfa/(.001*(f-this.RY))&&k.Xab());this.eca=f}if(void 0!==this.xN&&this.W.currentTime>this.xN){this.xN=void 0;try{this.W.currentTime-=.01}catch(b){}}this.mf()};h.prototype.efa=function(f){!!this.sF!=f&&(this.sF?(clearInterval(this.sF),this.sF=null):this.sF=setInterval(this.mf,16))};h.prototype.fA=function(){return this.W.currentSrc||
this.W.children.length&&this.W.children[0].src||""};h.Wf="time update";h.dj="duration update";return h});
define("dF",["require"],function(){var a={bGa:"data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU2LjM2LjEwMAAAAAAAAAAAAAAA//OEAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAEAAABIADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV6urq6urq6urq6urq6urq6urq6urq6urq6v////////////////////////////////8AAAAATGF2YzU2LjQxAAAAAAAAAAAAAAAAJAAAAAAAAAAAASDs90hvAAAAAAAAAAAAAAAAAAAA//MUZAAAAAGkAAAAAAAAA0gAAAAATEFN//MUZAMAAAGkAAAAAAAAA0gAAAAARTMu//MUZAYAAAGkAAAAAAAAA0gAAAAAOTku//MUZAkAAAGkAAAAAAAAA0gAAAAANVVV"};a.src=
a.bGa;return a});
define("dN","require lV pB cI gF mq mV ni iF cF dF".split(" "),function(a){function d(q,p,r){this.src=q||"";this.wl=p||"";this.startTime=r||0}var l=a("lV"),m=a("pB"),k=a("cI"),c=a("gF"),h=a("mq"),f=a("mV"),b=a("ni"),e=a("iF"),g=a("cF"),n=a("dF");a=l.extend(c,function(q,p){c.call(this);this.W=q;this.Un=p;this.nca=!1;this.I0=[];this.wf=this.Ce=this.EI=null});a.prototype.set=function(q,p,r){this.W.log("SrcSetter","set: "+q+" subtitles: "+p+" startTime: "+r);q=new d(q,p,r);this.Ce&&this.Ce.isEqual(q)||(!this.Ce&&
this.EI&&this.EI.isEqual(q)?this.l1():(this.Ce=q,this.YVa()))};a.prototype.clear=function(){this.wf&&(this.wf.destroy(),this.wf=null);this.EI=null;this.XYa();this.Un.clear()};a.prototype.g7a=function(){return!!this.Ce};a.prototype.YVa=function(){this.nca=!0;this.Vxa(this.Ce.src)&&!g.HLS.Mh()?(this.W.log("SrcSetter","hls lib required"),g.HLS.load(this.Tta,this)):this.Tta()};a.prototype.Tta=function(){this.nca&&(this.nca=!1,this.XOa())};a.prototype.XOa=function(){this.clear();this.ZZa(this.aZa(this.Ce.src));
this.Vxa(this.Ce.src)?this.LOa():this.Iba(this.Ce.src)?this.YOa():this.ZOa()};a.prototype.LOa=function(){var q=g.HLS.SL,p=1048576*(navigator.connection?Math.max(navigator.connection.downlink,2):2),r=.66*p;this.wf=new q({debug:b.fv,startPosition:0===this.Ce.startTime?-1:this.Ce.startTime,playlistLoadPolicy:{"default":{maxTimeToFirstByteMs:6E4,maxLoadTimeMs:6E4}},startLevel:-1,maxMaxBufferLength:12,autoStartLoad:!1,abrEwmaDefaultEstimate:p});this.wf.loadSource(this.Ce.src);this.wf.attachMedia(this.W);
var t=function(){this.wf.off(q.Events.MANIFEST_PARSED,t);var u=this.wf.levels.filter(function(w){return w.bitrate<=p});if(u.length){u.sort(function(w,x){return x.width-w.width});var v=this.wf.levels.indexOf(u[0]);this.wf.startLevel=v}u=this.wf.levels.filter(function(w){return w.bitrate<=r});u.length&&(u.sort(function(w,x){return x.width-w.width}),this.wf.config.minAutoBitrate=u[0].bitrate-1);u=this.wf.levels.filter(function(w){return h.lcb(w.width,w.height)});b.nMa&&(u.sort(function(w,x){return x.width-
w.width}),v=this.wf.levels.indexOf(u[0]),this.wf.startLevel=v);u.length&&u.length<this.wf.levels.length&&(u.sort(function(w,x){return x.width-w.width}),this.wf.autoLevelCapping=this.wf.levels.indexOf(u[0]));this.W.log("SrcSetter","bandwidth: "+p+" lowBandwidth: "+r);this.W.log("SrcSetter","levels: "+this.wf.levels);this.W.log("SrcSetter","startLevel: "+this.wf.levels[this.wf.startLevel]);this.W.log("SrcSetter","minLevel: "+this.wf.levels[this.wf.minAutoLevel]);this.wf.startLoad(0===this.Ce.startTime?
-1:this.Ce.startTime);0!=this.Ce.startTime&&this.Qt(this.Ce.startTime);this.Ce.wl&&this.Un.set(this.Ce.wl);this.EI=this.Ce;this.Ce=null;this.l1()}.bind(this);this.wf.on(q.Events.MANIFEST_PARSED,t);this.wf.on(q.Events.wdb,function(u,v){v.fatal&&v.type==q.ErrorTypes.Bdb&&this.wf.recoverMediaError()}.bind(this))};a.prototype.ZOa=function(){this.Ce.src?this.npa(this.Ce.src):this.npa(n.bGa,"audio/mpeg");this.Ce.wl&&this.Un.set(this.Ce.wl);this.W.load();0!=this.Ce.startTime&&this.Qt(this.Ce.startTime);
this.EI=this.Ce;this.Ce=null;this.l1()};a.prototype.YOa=function(){this.W.srcObject=this.Ce.src;this.EI=this.Ce;this.Ce=null;this.l1()};a.prototype.l1=function(){this.W.log("SrcSetter","src ready");this.trigger(new k(m.jd))};a.prototype.Vxa=function(q){return!!q&&!this.Iba(q)&&e.is(q,e.HLS)&&!h.EEa};a.prototype.aZa=function(q){return!!q&&!this.Iba(q)&&f.qja(q)};a.prototype.ZZa=function(q){q&&!this.W.hasAttribute("crossorigin")?this.W.setAttribute("crossorigin","anonymous"):!q&&this.W.hasAttribute("crossorigin")&&
this.W.removeAttribute("crossorigin")};a.prototype.Iba=function(q){return q instanceof MediaStream};a.prototype.Qt=function(q){try{this.W.currentTime=q}catch(p){}};a.prototype.npa=function(q,p){var r=document.createElement("source");p||(p=this.HUa(q));p&&(r.type=p);f.BB(q)||(q=f.lB(q,"swbypass=true"));r.src=q;this.W.appendChild(r);this.I0.push(r)};a.prototype.XYa=function(){for(;this.I0&&this.I0.length;){var q=this.I0.shift();q.src="";this.W.removeChild(q)}this.W.srcObject=null};a.prototype.HUa=function(q){switch(f.getExtension(q).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"}};d.prototype.isEqual=function(q){return this.src==q.src&&this.wl==q.wl};return a});
define("oR","require lV pB cI gF w ni e bL fC eq iq nQ C eJ dN".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cI"),k=a("gF"),c=a("w"),h=a("ni"),f=a("e"),b=a("bL"),e=a("fC"),g=a("eq"),n=a("iq"),q=a("nQ"),p=a("C"),r=a("eJ"),t=a("dN"),u=0,v=d.extend(k,function(w,x){k.call(this);this.pf=w;this.e3a=x;this.fk=this.fk.bind(this);this.bt=this.bt.bind(this);this.gda=this.gda.bind(this);this.Xo=this.CI=null;this.v_=void 0;this.vc=this.mb=null;this.$m="inactive";this.qp=this.Ma=this.Zd=this.Bx=this.Un=
null;this.cf=!1;this.$ya(document.createElement(this.pf));x&&e.wait(this.bt)});v.prototype.$ya=function(w){this.Eza();this.vc=w;for(this.vc.parentNode&&this.vc.parentNode.removeChild(this.vc);this.vc.children.length;)this.vc.removeChild(this.vc.children[0]);this.U_a();this.vc.autoplay=!1;this.vc.autobuffer="autobuffer";this.vc.preload=c.browser()==c.sh?"metadata":"none";this.vc.setAttribute("preload",c.browser()==c.sh?"metadata":"none");this.vc.setAttribute("webkit-playsinline","true");this.vc.setAttribute("playsinline",
"true");this.vc.addEventListener("loadedmetadata",this.fk,!0);this.Un=new p(this.vc);this.Un.bind(l.uk,this.Ji,this,!0);this.Bx=new t(this.vc,this.Un);this.Bx.bind(l.jd,this.Iwa,this,!0);this.Zd=new g(this.vc);this.Ma=new q(this.vc);this.Ma.bind(q.D6,this.hva,this,!0);this.Ma.bind(q.vk,this.gm,this,!0);this.Ma.bind(q.Z6,this.Uo,this,!0);this.qp=new r(this.vc);this.qp.bind(r.Wf,this.mf,this,!0);this.qp.bind(r.dj,this.Gn,this,!0)};v.prototype.U_a=function(){if(h.fv){var w="["+this.pf+" "+u++ +"]";this.vc.log=
function(x,y){console.log(w+"["+(new Date).toISOString().split("T")[1]+"] "+x+" "+y)}}else this.vc.log=function(){}};v.prototype.Eza=function(){this.vc&&(this.vc.removeEventListener("loadedmetadata",this.fk,!0),this.Bx&&(this.Bx.unbind(l.jd,this.Iwa,this,!0),this.Bx.clear(),this.Bx=null),this.Un&&(this.Un.unbind(l.uk,this.Ji,this,!0),this.Un.clear(),this.Un=null),this.Zd&&(this.Zd.clear(),this.Zd=null),this.Ma&&(this.Ma.unbind(q.D6,this.hva,this,!0),this.Ma.unbind(q.vk,this.gm,this,!0),this.Ma.unbind(q.Z6,
this.Uo,this,!0),this.Ma.clear(),this.Ma=null),this.qp&&(this.qp.unbind(r.Wf,this.mf,this,!0),this.qp.unbind(r.dj,this.Gn,this,!0),this.qp.clear(),this.qp=null),this.vc=null)};v.prototype.clear=function(){this.Eza()};v.prototype.iL=function(w,x,y){if(this.Hm()&&this.jG())try{return w.drawImage(this.vc,0,0,x,y),!0}catch(z){}w.fillRect(0,0,x,y);return!1};v.prototype.play=function(w,x,y){this.vc.log("HTMLMediaPlayer","play src: "+x.src+" subtitlesSrc: "+x.wl+" hasAudio: "+x.AB+" gain: "+x.gain);this.mb=
w;this.CI=null;this.Xo=x.clone();this.v_=y||0;this.EOa()};v.prototype.F3=function(){return"activated"==this.$m};v.prototype.Y5=function(){return this.e3a};v.prototype.stop=function(){this.vc.log("HTMLMediaPlayer","stop");this.Ma.stop();this.Xo=null};v.prototype.getState=function(){return this.Ma.getState()};v.prototype.jG=function(){return this.Bx.g7a()?!1:this.Ma.jG()};v.prototype.Vf=function(w){this.Zd.Vf(w);this.cf=w;this.mb&&"requested"==this.$m&&(this.cf?b.cancel(this.mb):b.request(this.mb))};
v.prototype.Ly=function(w){this.Zd.Ly(w)};v.prototype.CU=function(w){this.Zd.CU(w)};v.prototype.setLoop=function(w){this.TOa(w)};v.prototype.getCurrentTime=function(){return this.qp.getTime()};v.prototype.setCurrentTime=function(w){return this.qp.setTime(w)};v.prototype.ui=function(){return this.qp.ui()};v.prototype.Hm=function(){return this.pf==n.wo};v.prototype.getType=function(){return this.pf};v.prototype.Fe=function(){return this.vc&&this.Hm()&&this.vc.videoWidth||0};v.prototype.Ve=function(){return this.vc&&
this.Hm()&&this.vc.videoHeight||0};v.prototype.aT=function(){return this.Un.aT()};v.prototype.EOa=function(){this.vc.log("HTMLMediaPlayer","assert can play");"activated"==this.$m||!this.Xo.AB||0==this.Xo.gain||this.cf?(this.vc.log("HTMLMediaPlayer","can play activationState: "+this.$m+" pending media has audio: "+this.Xo.AB+" muted: "+this.cf),this.CE()):"inactive"==this.$m&&(this.vc.log("HTMLMediaPlayer","needs activation"),this.mb&&this.pf==n.wo&&this.MUa()?this.UNa():this.mb&&f.H3()?this.bt():
this.mb&&this.DOa())};v.prototype.MUa=function(){var w=this.$ra();return!w||w.currentSrc&&!w.paused||w.muted?!1:!0};v.prototype.$ra=function(){return this.mb.get("settings").get(TDV.PlayerSettings.ACTIVE_VIDEO_ELEMENT)};v.prototype.UNa=function(){this.vc.log("HTMLMediaPlayer","activate with application parameter");this.$ya(this.$ra());this.bt()};v.prototype.DOa=function(){this.vc.log("HTMLMediaPlayer","ask for activation");this.$m="requested";b.Cma(this.bt);this.mb&&!this.cf&&b.request(this.mb)};
v.prototype.bt=function(){if("inactive"==this.$m||"requested"==this.$m)this.vc.log("HTMLMediaPlayer","activate received when state: "+this.$m+" and has media: "+!!this.CI),this.CI?setTimeout(function(){e.wait(this.bt)}.bind(this),0):(this.$m="activating",this.Bx.set("","",0))};v.prototype.CE=function(){this.vc.log("HTMLMediaPlayer","media can play. Has pending properties: "+!!this.Xo);this.Xo&&this.Bx.set(this.Xo.src,this.Xo.wl,this.v_)};v.prototype.Iwa=function(){"activating"==this.$m?this.BXa():
this.Xo&&this.lXa()};v.prototype.BXa=function(){this.vc.log("HTMLMediaPlayer","on src ready activating");this.Ma.play()};v.prototype.Uo=function(){"activating"==this.$m&&(this.vc.log("HTMLMediaPlayer","on play activating"),this.Ma.stop(),this.$m="activated",this.CE())};v.prototype.lXa=function(){this.vc.log("HTMLMediaPlayer","on pending src ready");this.CI=this.Xo;this.Xo=null;this.MOa(this.CI.AB);this.KOa(this.CI.gain);this.qp.setTime(this.v_);this.v_=void 0;this.Ma.play()};v.prototype.MOa=function(w){this.Zd.Y$a(w)};
v.prototype.KOa=function(w){this.Zd.CU(w)};v.prototype.TOa=function(w){w&&!this.vc.hasAttribute("loop")?this.vc.setAttribute("loop",""):!w&&this.vc.hasAttribute("loop")&&this.vc.removeAttribute("loop")};v.prototype.hva=function(){this.vc.log("HTMLMediaPlayer","on deactivated");b.Rab();e.wait(this.gda);this.mb&&setTimeout(function(){b.request(this.mb)}.bind(this),0)};v.prototype.gda=function(){this.vc.log("HTMLMediaPlayer","on reactivated");this.Ma.play()};v.prototype.Ji=function(){this.trigger(l.uk,
this.Un.aT())};v.prototype.fk=function(){this.trigger(new m(v.XLa))};v.prototype.mf=function(){this.trigger(new m(v.Wf))};v.prototype.Gn=function(){this.trigger(new m(v.dj))};v.prototype.gm=function(){this.trigger(new m(v.vk))};v.Wf="time update";v.dj="duration update";v.XLa="size update";v.vk="end";return v});define("dL",["require"],function(){return function(a){this.cue=a;this.text=a.text}});
define("nH",["require"],function(){function a(){this.wl=this.src=void 0;this.AB=!1;this.gain=1}a.prototype.clone=function(){var d=new a;d.src=this.src;d.wl=this.wl;d.AB=this.AB;d.gain=this.gain;return d};return a});
define("cc","require lV er pB lx cI gF mq w mV oR iq".split(" "),function(a){function d(u){this.Ov=u;this.Aa=null;this.fca=(new Date).getTime()}var l=a("lV"),m=a("er"),k=a("pB"),c=a("lx"),h=a("cI"),f=a("gF"),b=a("mq"),e=a("w"),g=a("mV"),n=a("oR"),q=a("iq");d.prototype.tja=function(){return null==this.Aa};d.prototype.F3=function(){return this.Ov.F3()};d.prototype.Y5=function(){return this.Ov.Y5()};d.prototype.item=function(){return this.Aa};d.prototype.F5a=function(){this.Aa.wFa();this.Aa=null};d.prototype.use=
function(u){this.Aa=u;this.Aa.YCa(this.Ov);this.fca=(new Date).getTime()};var p=l.extend(f,function(){f.call(this);this.Tt=[];var u=g.PDa("avs",10);var v=e.jc()==e.$y?10:b.a4a()?4:1;v=g.PDa("avpas",v);for(var w=0;w<u;w++)this.Tt.push(new d(new n(q.wo,w<v)));this.ef=[];this.C=c.U});p.prototype.KL=function(){return 0<this.Tsa().length};p.prototype.R4=function(u){this.ef=[u].concat(m(this.ef).without(u));this.Jda();t()};p.prototype.appendItem=function(u){this.ef.push(u);this.Jda();t()};p.prototype.iU=
function(u){this.ef=m(this.ef).without(u);this.Jda()};p.prototype.Jda=function(){var u=this.jUa();if(p.MEa())for(;this.Tt.length<u.length;)this.Tt.push(new d(new n(q.wo,!1)));this.Tsa().forEach(function(v){0>u.indexOf(v.item())&&v.F5a()});this.wd(0<u.length?c.PLAYING:c.U);u.forEach(function(v){if(!this.ITa(v)){var w=this.xTa(v.getType(),v.Rka());w||v.Rka()||this.Tt.push(w=new d(new n(q.wo,!1)));w&&w.use(v)}}.bind(this));this.yTa().forEach(function(v){v.Ov.stop()})};p.prototype.jUa=function(){return this.ef.map(function(u,
v){var w={};w.index=v;w.priority=u.cEa();w.item=u;return w}).sort(function(u,v){return u.priority-v.priority||u.index-v.index}).map(function(u){return u.item})};p.prototype.wd=function(u){this.C!=u&&(this.C=u,this.trigger(new h(this.C==c.U?k.Yf:k.uo)))};p.prototype.xTa=function(u,v){u=this.Tt.filter(function(w){return w.tja()});return u.length?(v?(v=u.filter(function(w){return w.F3()}),v.length||(v=u.filter(function(w){return w.Y5()}))):(v=u.filter(function(w){return!w.Y5()}),v.length||(v=u.filter(function(w){return!w.F3()}))),
v.length&&(u=v),e.browser()==e.Mj?(u.sort(function(w,x){return x.fca-w.fca}),u[Math.min(2,u.length-1)]):u[0]):null};p.prototype.yTa=function(){return this.Tt.filter(function(u){return u.tja()})};p.prototype.Tsa=function(){return this.Tt.filter(function(u){return!u.tja()})};p.prototype.ITa=function(u){for(var v=0;v<this.Tt.length;v++)if(this.Tt[v].item()==u)return this.Tt[v];return null};p.zba=null;p.bind=function(){var u=p.Fi();u.bind.apply(u,arguments)};p.unbind=function(){var u=p.Fi();u.unbind.apply(u,
arguments)};var r=0<=[e.Zy,e.Gs].indexOf(e.jc());p.MEa=function(){return r};p.KL=function(){return p.Fi().KL()};p.appendItem=function(u){p.Fi().appendItem(u)};p.R4=function(u){p.Fi().R4(u)};p.iU=function(u){p.Fi().iU(u)};p.Zv=function(){null===p.zba&&(p.zba=new p);return p.zba};p.Fi=p.Zv;p.Zv();var t=function(){if(0<=[e.Zy,e.Gs].indexOf(e.jc())){var u=document.createElement("video");u.muted=!1;u.setAttribute("loop","");u.src="data:video/mp4;base64, ";
return function(){try{u.pause(),setTimeout(function(){u.play()["catch"](function(){})},0)}catch(v){}}}return function(){}}();return p});
define("G","require lV cI gF pB lx oR dL nH iq cc bo mq".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("gF"),k=a("pB"),c=a("lx"),h=a("oR"),f=a("dL"),b=a("nH"),e=a("iq"),g=a("cc"),n=a("bo"),q=a("mq"),p=d.extend(m,function(r,t,u){m.call(this);this.mb=r;this.v=t;this.Ht=u;this.o=null;this.lR();this.zZ=this.zZ.bind(this);this.v.bind(k.G("gain"),this.yJ,this,!0);this.v.bind(k.G("mp3Url"),this.Mk,this,!0);this.v.bind(k.G("oggUrl"),this.Mk,this,!0);this.v.bind(k.G("subtitlesURL"),this.Mk,this,!0);this.C=
c.U;this.Jk=!1;this.Sz=this.Sb=0;this.cf=!1;this.Ir=1;this.qO=!1;this.OI=1;this.Fd=null;this.yo=[]});p.prototype.Db=function(){return this.mb};p.prototype.Qc=function(r){this.C==r||r==c.Qb&&this.C!=c.PLAYING||(this.C=r,this.C==c.PLAYING?(this.OPa(),g.R4(this)):this.f0a(),this.gga())};p.prototype.f0a=function(){this.qO||(this.qO=!0,this.Mra=this.v.get("fadeOutTime"),0==this.Mra?this.wza():this.zZ(0))};p.prototype.zZ=function(r){this.Fd&&0!=this.OI&&this.qO&&!this.vVa()?(this.OI=Math.max(0,this.OI-
r/this.Mra),this.wW(),n.requestFrame(this.zZ)):this.wza()};p.prototype.OPa=function(){this.qO=!1;this.OI=1;this.wW()};p.prototype.wza=function(){this.qO=!1;this.OI=1;this.Fd&&(g.iU(this),this.C==c.U&&this.dfa())};p.prototype.getState=function(){return this.C};p.prototype.ui=function(){return this.Sb};p.prototype.setCurrentTime=function(r){this.Sz=r;this.Fd&&this.Fd.play(this.mb,this.o,this.Sz)};p.prototype.getCurrentTime=function(){return this.Sz};p.prototype.Ly=function(r){this.Ir=r;this.wW()};p.prototype.wW=
function(){this.Fd&&this.Fd.Ly(this.Ir*this.OI)};p.prototype.Vf=function(r){this.cf=r;this.Fd&&this.Fd.Vf(r)};p.prototype.setLoop=function(r){this.Jk=r;this.Fd&&this.Fd.setLoop(r)};p.prototype.Rka=function(){return!this.cf};p.prototype.getType=function(){return e.xLa};p.prototype.cEa=function(){return this.Ht};p.prototype.YCa=function(r){this.Fd=r;setTimeout(function(){this.Fd&&this.Fd.bind(h.vk,this.KP,this,!0)}.bind(this),0);this.lR();this.Fd.bind(h.Wf,this.mf,this,!0);this.Fd.bind(h.dj,this.Gn,
this,!0);this.Fd.bind(k.uk,this.Ji,this,!0);this.Fd.Vf(this.cf);this.wW();this.Fd.setLoop(this.Jk);this.Fd.play(this.mb,this.o,this.Sz)};p.prototype.wFa=function(){this.Sz=this.Fd.getCurrentTime();this.Fd.unbind(h.vk,this.KP,this,!0);this.Fd.unbind(h.Wf,this.mf,this,!0);this.Fd.unbind(h.dj,this.Gn,this,!0);this.Fd.unbind(k.uk,this.Ji,this,!0);this.Fd=null};p.prototype.clear=function(){this.Qc(c.U);this.v&&(this.v.unbind(k.G("gain"),this.yJ,this,!0),this.v.unbind(k.G("mp3Url"),this.Mk,this,!0),this.v.unbind(k.G("oggUrl"),
this.Mk,this,!0),this.v.unbind(k.G("subtitlesURL"),this.Mk,this,!0),this.v=null)};p.prototype.Mk=function(){this.XE&&clearTimeout(this.XE);this.XE=setTimeout(function(){this.XE=null;this.Fd&&(this.o.src=this.fA(this.v),this.o.wl=this.v.get("subtitlesURL"),this.Fd.play(this.mb,this.o,this.Sz))}.bind(this),10)};p.prototype.yJ=function(){if(this.Fd){var r=this.v.get("gain");this.o.gain!=r&&(this.o.gain=r,this.Fd.CU(this.o.gain))}};p.prototype.lR=function(){this.o=new b;this.o.src=this.fA(this.v);this.o.wl=
this.v.get("subtitlesURL");this.o.AB=!0;this.o.gain=this.v.get("gain")};p.prototype.fA=function(r){var t=r.get("mp3Url");return t&&q.SEa?t:(r=r.get("oggUrl"))&&q.TEa?r:t||r};p.prototype.Gn=function(){this.Sb=this.Fd.ui();this.bga()};p.prototype.mf=function(){this.Sb!=this.Fd.ui()&&this.Gn();this.Sz=this.Fd.getCurrentTime();this.QR()};p.prototype.Ji=function(){this.yo=this.Fd.aT().map(function(r){for(var t=null,u=0;u<this.yo.length&&!t;u++)this.yo[u].cue==r&&(t=this.yo[u]);t||(t=new f(r));return t}.bind(this));
this.trigger(new l(k.uk))};p.prototype.KP=function(){this.Qc(c.U);this.cga()};p.prototype.vVa=function(){return this.Fd&&this.Fd.getCurrentTime()&&this.Fd.getCurrentTime()==this.Fd.ui()};p.prototype.dfa=function(){this.Sz=0;this.QR()};p.prototype.QR=function(){this.trigger(new l(p.Wf))};p.prototype.bga=function(){this.trigger(new l(p.dj))};p.prototype.cga=function(){this.trigger(new l(k.Gb))};p.prototype.gga=function(){this.trigger(new l(k.Ae))};p.Wf="time update";p.dj="duration update";return p});
define("ho",["require"],function(){function a(l,m,k){this.Wd=l;this.Lza=m;this.kt=k||d}var d=function(){var l=document.createElement("canvas");l.width=l.height=256;l.getContext("2d").clearRect(0,0,l.width,l.height);return l}();a.prototype.isEmpty=function(){return this.kt==d||"CANVAS"==this.kt.tagName&&(0==this.kt.width||0==this.kt.height)};a.prototype.isEqual=function(l,m){return this.Wd==l.Wd&&Math.abs(this.Lza-l.Lza)<(m||0)&&this.kt==l.kt};return a});
define("dq",["require","mq","w","iF"],function(a){function d(f){return k.mKa(f)}function l(f,b){if(!b)return!0;var e=f.get("url"),g=f.get("srcObject");f=f.get("type")||"";switch(b){case "srcObj":return!!g;case "webm":return c.is(e,c.wNa)||m(f,"webm");case "h265":return c.is(e,c.lMa)||(c.is(e,c.Mna)||c.is(e,c.sna)||!e)&&(m(f,"hev1")||m(f,"h265")||m(f,"heic"))?!0:!1;case "mp4":return c.is(e,c.Mna)||m(f,"mp4");case "hls":return c.is(e,c.HLS)||m(f,"x-mpegurl");case "ogv":return c.is(e,c.JMa)||m(f,"ogg");
case "mov":return c.is(e,c.sna)||m(f,"quicktime");default:return!1}}function m(f,b){return 0<=(f||"").toLowerCase().indexOf(b)}var k=a("mq");a("w");var c=a("iF"),h={P6a:function(f){return h.select(f.get("levels"))},N6a:function(f){return h.select(f.get("levels"))},select:function(f){f||(f=[]);f=f.slice();var b=[];b.push({type:"srcObj",As:!0});k.b7a&&b.push({type:"hls",As:!1});k.t7a&&b.push({type:"h265",As:!0});k.ija&&b.push({type:"webm",As:!0});k.u3&&b.push({type:"mp4",As:!0});k.u7a&&b.push({type:"mov",
As:!0});k.hja&&b.push({type:"ogv",As:!0});b.push({type:"mp4",As:!0});b.push({type:"webm",As:!0});b.push({type:"mp4",As:!1});b.push({type:"webm",As:!1});for(var e=0;e<b.length;e++){var g=f;b[e].As&&(g=g.filter(d));g=g.filter(function(n){if(l(n,b[e].type))return!0});"hls"!=b[e].type&&g.sort(function(n,q){return q.get("width")-n.get("width")});if(g.length)return g[0]}return null}};return h});
define("oW","require lV cI gF pB lx iy fq w mV oR dL ho nH iq cc dq".split(" "),function(a){function d(x){e.browser()==e.Mj&&(x=g.lB(x,"playbacksession="+(new Date).getTime()));return x}var l=a("lV"),m=a("cI"),k=a("gF"),c=a("pB"),h=a("lx"),f=a("iy"),b=a("fq"),e=a("w"),g=a("mV"),n=a("oR"),q=a("dL"),p=a("ho"),r=a("nH"),t=a("iq"),u=a("cc"),v=a("dq"),w=l.extend(k,function(x,y){k.call(this);this.mb=x;this.v=y;this.fb=w.mk(this.v);this.o=null;this.lR();this.v.bind(c.G("subtitlesURL"),this.Mk,this,!0);this.v.bind(c.G("gain"),
this.yJ,this,!0);this.fb.bind(c.G("srcObject"),this.Mk,this,!0);this.fb.bind(c.G("subtitlesURL"),this.Mk,this,!0);this.fb.bind(c.G("url"),this.Mk,this,!0);this.fb.bind(c.G("gain"),this.yJ,this,!0);this.C=h.U;this.Kf=this.Sb=0;this.cf=!1;this.Ir=1;this.Jk=!1;this.T=this.bc=null;this.oI=!1;this.XW=void 0;this.rqa=!1;this.yo=[]});w.prototype.Db=function(){return this.mb};w.prototype.Qc=function(x){this.C==x||x==h.Qb&&this.C!=h.PLAYING||(this.rqa&&x==h.PLAYING&&this.C==h.U&&this.k9(),this.C=x,this.C==
h.PLAYING?(this.bc&&this.bc.play(this.mb,this.o,this.Kf),u.R4(this)):(u.MEa()?this.bc&&this.bc.stop():u.iU(this),this.C==h.U&&this.dfa()),this.gga())};w.prototype.getState=function(){return this.C};w.prototype.ui=function(){return this.Sb};w.prototype.setCurrentTime=function(x){this.Kf=x;this.bc&&(this.bc.jG()&&this.kO(),this.bc.play(this.mb,this.o,this.Kf))};w.prototype.getCurrentTime=function(){return this.Kf};w.prototype.Ly=function(x){this.Ir=x;this.bc&&this.bc.Ly(x)};w.prototype.Vf=function(x){this.cf=
x;this.bc&&this.bc.Vf(x)};w.prototype.setLoop=function(x){this.Jk=x;this.bc&&this.bc.setLoop(x)};w.prototype.D$a=function(){this.rqa=!0};w.prototype.iL=function(x,y,z){this.bc&&this.bc.jG()?this.bc.iL(x,y,z):this.oI?x.drawImage(this.T,0,0,y,z):x.fillRect(0,0,y,z)};w.prototype.b3=function(){if(this.bc&&this.bc.jG()){var x=this.bc.getCurrentTime(),y=this.bc.vc;if(this.SO())return new p(this.o.src,this.XW,this.T);this.k9();return new p(this.o.src,x,y)}return this.oI?new p(this.o.src,this.Kf,this.T):
new p(this.o.src,this.Kf,null)};w.prototype.Rka=function(){return!this.cf&&this.v.get("hasAudio")};w.prototype.getType=function(){return t.wo};w.prototype.cEa=function(){return f.wo};w.prototype.YCa=function(x){this.bc=x;setTimeout(function(){this.bc&&this.bc.bind(n.vk,this.KP,this,!0)}.bind(this),0);this.lR();this.bc.bind(n.Wf,this.mf,this,!0);this.bc.bind(n.dj,this.Gn,this,!0);this.bc.bind(c.uk,this.Ji,this,!0);this.bc.Vf(this.cf);this.bc.Ly(this.Ir);this.bc.setLoop(this.Jk);this.bc.play(this.mb,
this.o,this.Kf)};w.prototype.wFa=function(){this.bc.jG()&&this.kO();this.Kf=this.bc.getCurrentTime();this.bc.unbind(n.vk,this.KP,this,!0);this.bc.unbind(n.Wf,this.mf,this,!0);this.bc.unbind(n.dj,this.Gn,this,!0);this.bc.unbind(c.uk,this.Ji,this,!0);this.C==h.U&&(this.bc.stop(),this.bc.setCurrentTime(0),this.kQa());this.bc=null};w.prototype.clear=function(){u.iU(this);this.k9();this.v&&(this.v.unbind(c.G("subtitlesURL"),this.Mk,this,!0),this.v.unbind(c.G("gain"),this.yJ,this,!0),this.v=null);this.fb&&
(this.fb.unbind(c.G("subtitlesURL"),this.Mk,this,!0),this.fb.unbind(c.G("url"),this.Mk,this,!0),this.fb.unbind(c.G("srcObject"),this.Mk,this,!0),this.fb=null)};w.prototype.Mk=function(){this.XE&&clearTimeout(this.XE);this.XE=setTimeout(function(){this.XE=null;this.bc&&(this.o.wl=this.v.get("subtitlesURL")||this.fb.get("subtitlesURL"),this.o.src=this.fb.get("srcObject")||d(this.fb.get("url")),this.bc.play(this.mb,this.o,this.Kf))}.bind(this),10)};w.prototype.yJ=function(){this.bc&&(this.o.gain=this.v.get("gain",
1)*this.fb.get("gain",1),this.bc.CU(this.o.gain))};w.prototype.lR=function(){this.o=new r;this.o.src=this.fb.get("srcObject")||d(this.fb.get("url"));this.o.wl=this.v.get("subtitlesURL")||this.fb.get("subtitlesURL");this.o.AB=this.v.get("hasAudio",!0)&&this.fb.get("hasAudio",!0);this.o.gain=this.v.get("gain",1)*this.fb.get("gain",1)};w.prototype.kO=function(){this.T||(this.T=document.createElement("canvas"));if(!this.SO()){this.T.width=this.bc.Fe();this.T.height=this.bc.Ve();this.XW=this.bc.getCurrentTime();
var x=this.T.getContext("2d");x.clearRect(0,0,this.T.width,this.T.height);this.oI=this.bc.iL(x,this.T.width,this.T.height)}};w.prototype.SO=function(){var x=this.bc.getCurrentTime();this.Sb&&(x=Math.min(x,this.Sb));return this.oI&&.15>=Math.abs(x-this.XW)};w.prototype.k9=function(){this.oI&&(this.XW=void 0,this.oI=!1,e.browser()!=e.Mj&&(this.T.width=0,this.T.height=0,this.T=null))};w.prototype.Gn=function(){this.Sb=this.bc.ui();this.bga()};w.prototype.mf=function(){var x=this.bc.ui();0!==x&&(this.Sb!=
x&&this.Gn(),this.Kf=this.bc.getCurrentTime(),e.zd()==e.yi&&0<this.Kf&&this.Kf>this.Sb-.15&&!this.SO()&&!this.Jk?this.kO():e.browser()==e.Mj&&0<this.Kf&&this.Kf>this.Sb-.05&&!this.SO()&&!this.Jk?this.kO():e.browser()==e.po&&0<this.Kf&&this.Kf>this.Sb-.05&&!this.SO()&&this.Jk&&this.kO(),this.QR())};w.prototype.Ji=function(){this.yo=this.bc.aT().map(function(x){for(var y=null,z=0;z<this.yo.length&&!y;z++)this.yo[z].cue==x&&(y=this.yo[z]);y||(y=new q(x));return y}.bind(this));this.trigger(new m(c.uk))};
w.prototype.kQa=function(){0!=this.yo.length&&(this.yo=[],this.trigger(new m(c.uk)))};w.prototype.KP=function(){this.Qc(h.U);this.cga()};w.prototype.dfa=function(){this.Kf=0;this.QR()};w.prototype.QR=function(){this.trigger(new m(w.Wf))};w.prototype.bga=function(){this.trigger(new m(w.dj))};w.prototype.cga=function(){this.trigger(new m(c.Gb))};w.prototype.gga=function(){this.trigger(new m(c.Ae))};w.Wf="time update";w.dj="duration update";w.mk=function(x){if(b.Ja("Video360Resource",x))return v.N6a(x);
if(b.Ja("VideoResource",x))return v.P6a(x);throw"invalid video resource object: "+x;};return w});
define("oV",["require","oW","pB"],function(a){function d(m,k){this.xW=m;this.Ov=k;this.l8=[];this.fPa();this.Ji()}a("oW");var l=a("pB");d.prototype.clear=function(){this.dQa();this.y1a();this.Ov=this.xW=null};d.prototype.fPa=function(){this.Ov.bind(l.uk,this.Ji,this,!0)};d.prototype.y1a=function(){this.Ov.unbind(l.uk,this.Ji,this,!0)};d.prototype.Ji=function(){this.xW.set("activeSubtitles",this.l8=this.Ov.yo)};d.prototype.dQa=function(){this.xW.get("activeSubtitles")==this.l8&&this.xW.set("activeSubtitles",
this.l8=[])};return d});
define("ht","require pB iy lx mz cI fq G oV".split(" "),function(a){var d=a("pB"),l=a("iy"),m=a("lx"),k=a("mz"),c=a("cI"),h=a("fq"),f=a("G"),b=a("oV");a=h.define("Audio",k,function(e){k.call(this);this.Ht=e||l.kNa;this.Co=void 0;this.rm=null});a.prototype.bG=function(){if(void 0==this.Co){this.rm&&(this.rm.clear(),this.rm=null);var e=this.get("audio");e?(this.Co=new f(this.get("application"),e,this.Ht),e=function(){this.Co.setLoop(this.get("loop",!1))},e.call(this),this.bind(d.G("loop"),e,this),e=
function(){this.Co.Vf(this.get("application").get("mute",!1))},e.call(this),this.get("application").bind(d.G("mute"),e,this,!0),e=function(){this.set("state",this.Co.getState())},e.call(this),this.Co.bind(d.Ae,e,this,!0),this.Co.bind(d.Gb,this.EWa,this,!0),this.rm=new b(this,this.Co)):this.Co=null}return this.Co};a.prototype.set=function(e,g){switch(e){case "state":var n=this.get("state")||m.U,q=this.Co&&this.Co.getState()||m.U;q!=n&&(n==m.U&&q==m.PLAYING&&this.trigger(d.uo),this.trigger(new c(d.Ae,
{oldState:n,state:q})));break;case "subtitlesViewerArea":(n=k.prototype.get.call(this,e))&&n.X0.remove(this),g&&g.X0.add(this)}k.prototype.set.call(this,e,g)};a.prototype.Bu=function(){return[]};a.prototype.EWa=function(){this.trigger(new c(d.Gb))};a.prototype.play=a.prototype.Sk=function(){var e=this.bG();e&&e.Qc(m.PLAYING)};a.prototype.stop=a.prototype.lp=function(){var e=this.bG();e&&e.Qc(m.U)};a.prototype.pause=a.prototype.ir=function(){var e=this.bG();e&&e.Qc(m.Qb)};return a});
define("jx",["require","fq","ht"],function(a){var d=a("fq"),l=a("ht");return d.define("MediaAudio",l,function(m){l.call(this,m)})});define("qf",["require","iy","fq","jx"],function(a){var d=a("iy"),l=a("fq"),m=a("jx");return l.define("PanoramaAudio",m,function(){m.call(this,d.OMa)})});define("hH",["require","fq","qf"],function(a){var d=a("fq"),l=a("qf");return d.define("DirectionalPanoramaAudio",l,function(){l.call(this)})});
define("fz",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("Model3DCameraMovement",d,function(){d.call(this)})});define("iJ",["require","fq","fz"],function(a){var d=a("fq"),l=a("fz");return d.define("DistanceModel3DCameraMovement",l,function(){l.call(this)})});define("lD",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("DistancePanoramaCameraMovement",d,function(){d.call(this)})});
define("hk",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("DistanceRotationalCameraMovement",d,function(){d.call(this)})});
define("z",["require","exports","pB","lV"],function(a,d,l,m){return function(){function k(c,h,f,b,e){this.Nq=null;this.Kca=c;this.vf=l.G(this.Kca);this.Naa=h;this.Da=f||window;this.pba=b;this.Dua=e;this.Eba=!1}k.prototype.mC=function(){this.Fea(null)};k.prototype.Fea=function(c){var h=this;m.toArray(this.Nq).forEach(function(f){f&&f.unbind(this.vf,h.hqa,h)}.bind(this));this.Nq=c;m.toArray(this.Nq).forEach(function(f){f&&f.bind(this.vf,this.hqa,h,h.pba)}.bind(this));this.Wxa()};k.prototype.Wxa=function(){this.Dua&&
this.Dua.Fea(this.DTa())};k.prototype.DTa=function(){return null==this.Nq?null:Array.isArray(this.Nq)?this.Nq.map(function(c){return c?c.get(this.Kca):null}.bind(this)):this.Nq.get(this.Kca)};k.prototype.hqa=function(c){if(!this.Eba){try{this.Eba=!0,this.Wxa(),this.Naa.call(this.Da,c)}catch(h){m.JT("ChangeWatcher._changeHandler",h)}this.Eba=!1}};k.Zu=function(c,h,f,b,e){void 0===e&&(e=!1);m.isString(h)&&(h=h.split("."));return 0<h.length?(h=new k(h[0],f,b,e,k.Zu(null,h.slice(1),f,b,e)),h.Fea(c),h):
null};return k}()});
define("pX",["require","jquery.mod","lV","pB","e"],function(a){var d=a("jquery.mod"),l=a("lV"),m=a("pB"),k=a("e"),c=l.extend(k,function(){k.call(this);this.Re("DropDownArrow");this.T=null;this.Yv=!0;this.bind(m.tc,this.bSa,this)});c.prototype.yb=function(){k.prototype.yb.call(this);this.h("color","#000000");this.h("direction",c.t6)};c.prototype.bSa=function(){this.Yv=!0;this.xe()};c.prototype.Hb=function(){k.prototype.Hb.call(this);this.T||(this.T=d("<canvas/>"),this.T.css({position:"absolute",left:0,
top:0}),this.Yb().append(this.T))};c.prototype.bb=function(){var h=!1;this.L("color")&&(h=!0,this.S("color"));this.L("direction")&&(h=!0,this.S("direction"));this.Yv&&(h=!0,this.Yv=!1);if(h){h=this.Bf();var f=this.Af(),b=this.B("color"),e=this.B("direction"),g=[.5*h,0,h];e=e==c.t6?[f,0,0]:[0,f,f];var n=this.T.get(0);n.width=h;n.height=f;n=n.getContext("2d");n.clearRect(0,0,h,f);n.beginPath();n.moveTo(g[0],e[0]);n.lineTo(g[1],e[1]);n.lineTo(g[2],e[2]);n.fillStyle=b;n.fill()}k.prototype.bb.call(this)};
c.t6="down";c.udb="up";return c});
define("ie","require lV cI nF bi pB d hh T pX oU".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("nF"),k=a("bi"),c=a("pB"),h=a("d"),f=a("hh"),b=a("T"),e=a("pX"),g=a("oU");a=d.extend(b,function(){b.call(this);this.Re("DropDownButton");this.yz=this.Pa=null;this.$ba=!0;this.set("ariaRole","dropdown");this.set("autoRolledOver",!0);this.set("autoPressed",!0);this.set("childrenInteractionEnabled",!1);this.set("contentOpaque",!0);this.set("cursor",k.Le);this.bind(c.ma,this.C$,this)});a.prototype.yb=
function(){b.prototype.yb.call(this);this.h("arrowColor","#000000");this.h("arrowBeforeLabel");this.h("arrowWidth",9);this.h("arrowHeight",5);this.h("arrowGap",5);this.h("shadow",!1);this.h("layout",h.Ig);this.h("verticalAlign",m.se);this.h("borderRadius",5);this.h("borderColor","#AAAAAA");this.h("borderSize",1);this.h("backgroundColor",["#FAFAFA","#E5E5E5"]);this.h("backgroundColorRatios",[0,1]);this.h("backgroundColorDirection","vertical");this.h("paddingLeft",5);this.h("paddingTop",5);this.h("paddingRight",
5);this.h("paddingBottom",5);this.h("fontFamily");this.h("fontSize");this.h("fontColor","#555555");this.h("fontWeight");this.h("fontStyle");this.h("textDecoration");this.h("textShadowColor");this.h("textShadowHorizontalLength");this.h("textShadowVerticalLength");this.h("textShadowBlurRadius");this.h("textShadowOpacity");this.A("rollOverBorderColor",f.aa,"borderColor");this.A("rollOverArrowColor",f.aa,"arrowColor");this.A("rollOverBackgroundColor",f.aa,"backgroundColor");this.A("rollOverBackgroundColorRatios",
f.aa,"backgroundColorRatios");this.A("rollOverShadow",f.aa,"shadow");this.A("pressedBorderColor",f.Bb,"borderColor");this.A("pressedArrowColor",f.Bb,"arrowColor");this.A("pressedBackgroundColor",f.Bb,"backgroundColor");this.A("pressedBackgroundColorRatios",f.Bb,"backgroundColorRatios");this.A("pressedShadow",f.Bb,"shadow");this.A("pressedRollOverBorderColor",f.lc,"borderColor");this.A("pressedRollOverArrowColor",f.lc,"arrowColor");this.A("pressedRollOverBackgroundColor",f.lc,"backgroundColor");this.A("pressedRollOverBackgroundColorRatios",
f.lc,"backgroundColorRatios");this.A("pressedRollOverShadow",f.lc,"shadow");this.A("pressedBorderColor",f.ka,"borderColor");this.A("pressedArrowColor",f.ka,"arrowColor");this.A("pressedBackgroundColor",f.ka,"backgroundColor");this.A("pressedBackgroundColorRatios",f.ka,"backgroundColorRatios");this.A("pressedShadow",f.ka,"shadow")};a.prototype.set=function(n,q){"label"==n&&this.get("label")!=q&&(this.$ba=!0,this.xe());b.prototype.set.call(this,n,q)};a.prototype.Hb=function(){b.prototype.Hb.call(this);
this.Pa||(this.Pa=new g,this.Pa.set("width","100%"),this.Za(this.Pa));this.yz||(this.yz=new e,this.yz.set("direction",e.t6),this.Za(this.yz))};a.prototype.C$=function(){this.open();this.trigger(new l(c.OPEN))};a.prototype.open=function(){this.unbind(c.ma,this.C$,this);this.gR(!0)};a.prototype.close=function(){this.bind(c.ma,this.C$,this);this.gR(!1)};a.prototype.Nv=function(){return this.Pa&&this.Pa.get("text")||b.prototype.Nv.call(this)};a.prototype.bb=function(){if(this.$ba){var n=this.get("label");
this.Pa.set("text",n);this.$ba=!1}this.xc("horizontalAlign fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" "),{},[this.Pa],!0,!0);this.L("arrowGap")&&(this.set("gap",this.B("arrowGap")),this.S("arrowGap"));this.L("arrowColor")&&(this.yz.set("color",this.B("arrowColor")),this.S("arrowColor"));this.L("arrowBeforeLabel")&&(1==this.B("arrowBeforeLabel")?this.io(this.yz,
0):this.io(this.Pa,0),this.S("arrowBeforeLabel"));this.L("arrowWidth")&&(this.yz.set("width",this.B("arrowWidth")),this.S("arrowWidth"));this.L("arrowHeight")&&(this.yz.set("height",this.B("arrowHeight")),this.S("arrowHeight"));b.prototype.bb.call(this)};return a});define("hP",["require","er","lV","T","d"],function(a){var d=a("er"),l=a("lV"),m=a("T");a=a("d");var k=l.extend(m,function(){m.call(this)});k.Ic={layout:a.Yh};d.defaults(k.Ic,m.Ic);k.prototype.yb=function(){this.Io(k.Ic)};return k});
define("mc","require lV cI nF bi il pB T hP oU".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("nF"),k=a("bi"),c=a("il"),h=a("pB"),f=a("T"),b=a("hP"),e=a("oU");a=d.extend(f,function(){f.call(this);this.Re("DropDownPopup");this.set("ariaRole","listbox");this.Bd=null;this.EW=!1;this.Lb=null;this.eP=[];this.eB=!0});a.prototype.SDa=function(){return this.Lb.rb().map(function(g){return g.Xd()})};a.prototype.open=function(g){this.Bd=g;this.EW=!0;this.Db().io(this,this.Db().rb().length-1);this.set("overIndex",
-1);this.set("visible",!0);this.bind(h.hb,this.de,this);this.Db().bind(h.Eb,this.wt,this);this.Db().bind(h.tc,this.Dc,this)};a.prototype.close=function(){this.Bd=null;this.EW=!0;this.set("visible",!1);this.Lb.set("overflow",c.PH);this.Lb.set("contentOpaque",!0);this.unbind(h.hb,this.de,this);this.Db().unbind(h.Eb,this.wt,this);this.Db().bind(h.tc,this.Dc,this)};a.prototype.Hb=function(){f.prototype.Hb.call(this);this.Lb||(this.Lb=new b,this.Lb.set("overflow",c.PH),this.Lb.bind(h.tc,this.Dc,this),
this.Lb.bind(h.mq,this.WA,this),this.Za(this.Lb))};a.prototype.Dc=function(){this.KAa()};a.prototype.de=function(){this.Nea=!1};a.prototype.WA=function(){this.Nea=!0};a.prototype.wt=function(){-1!=this.get("overIndex")||this.Nea&&this.No||this.trigger(new l(h.vH));this.Nea=!1};a.prototype.VWa=function(g){this.set("overIndex",this.zaa(g.source))};a.prototype.WWa=function(g){g=this.zaa(g.source);this.get("overIndex")==g&&this.set("overIndex",-1)};a.prototype.UWa=function(g){g=this.zaa(g.source);this.set("overIndex",
g);this.set("selectedIndex",g);this.trigger(new l(h.nq))};a.prototype.zaa=function(g){for(var n=0;n<this.eP.length;n++)if(this.eP[n]==g)return n;return-1};a.prototype.yb=function(){f.prototype.yb.call(this);this.h("visible",!1);this.h("width","100%");this.h("height","100%");this.h("includeInLayout",!1);this.h("items",[]);this.h("selectedIndex",-1);this.h("overIndex",-1);this.h("popUpGap",0);this.h("popUpBackgroundColor");this.h("popUpBackgroundOpacity");this.h("rollOverPopUpBackgroundColor");this.h("selectedPopUpBackgroundColor");
this.h("popUpFontColor");this.h("rollOverPopUpFontColor");this.h("selectedPopUpFontColor");this.h("popUpShadow",!0);this.h("popUpShadowBlurRadius");this.h("popUpShadowColor");this.h("popUpShadowHorizontalLength");this.h("popUpShadowOpacity");this.h("popUpShadowSpread");this.h("popUpShadowVerticalLength");this.h("fontFamily");this.h("fontSize");this.h("fontWeight");this.h("fontStyle");this.h("textDecoration");this.h("textShadowColor");this.h("textShadowHorizontalLength");this.h("textShadowVerticalLength");
this.h("textShadowBlurRadius");this.h("textShadowOpacity");this.h("buttonWidth")};a.prototype.bb=function(){var g=!1,n=!1;if(this.L("items")){g=this.B("items")||[];for(var q=this.eP.length;q<g.length;q++){var p=new e;p.ra({width:"100%",paddingLeft:5,paddingRight:5,paddingBottom:2,paddingTop:2,cursor:k.Le});p.bind(h.RC,this.VWa,this);p.bind(h.hq,this.WWa,this);p.bind(h.ma,this.UWa,this);this.eP.push(p)}p=this.Lb.rb();for(q=g.length;q<p.length;q++)this.Lb.removeChild(p[q]);for(q=p.length;q<g.length;q++)this.Lb.Za(this.eP[q]);
for(q=0;q<g.length;q++)p[q].ra({text:g[q],ariaLabel:g[q],ariaRole:"option"});this.S("items");n=g=!0}this.L("selectedIndex")&&(this.S("selectedIndex"),g=!0);var r="horizontalAlign popUpBackgroundOpacity popUpPaddingBottom popUpPaddingLeft popUpPaddingRight popUpPaddingTop fontFamily fontSize fontWeight fontStyle tabIndex textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" ");for(q=0;q<r.length;q++)p=r[q],this.L(p)&&(this.S(p),
n=!0);if(n)for(r={fontFamily:this.B("fontFamily"),fontSize:this.B("fontSize"),fontWeight:this.B("fontWeight"),fontStyle:this.B("fontStyle"),horizontalAlign:this.B("horizontalAlign"),tabIndex:this.B("tabIndex"),textDecoration:this.B("textDecoration"),textShadowColor:this.B("textShadowColor"),textShadowHorizontalLength:this.B("textShadowHorizontalLength"),textShadowVerticalLength:this.B("textShadowVerticalLength"),textShadowBlurRadius:this.B("textShadowBlurRadius"),textShadowOpacity:this.B("textShadowOpacity"),
paddingBottom:this.B("popUpPaddingBottom"),paddingLeft:this.B("popUpPaddingLeft"),paddingRight:this.B("popUpPaddingRight"),paddingTop:this.B("popUpPaddingTop"),backgroundOpacity:this.B("popUpBackgroundOpacity")},p=this.Lb.rb(),q=0;q<p.length;q++)p[q].ra(r);r="selectedIndex overIndex popUpBackgroundColor rollOverPopUpBackgroundColor selectedPopUpBackgroundColor popUpFontColor rollOverPopUpFontColor selectedPopUpFontColor".split(" ");for(q=0;q<r.length;q++)p=r[q],this.L(p)&&(this.S(p),g=!0);if(g){g=
this.B("popUpBackgroundColor");r=this.B("rollOverPopUpBackgroundColor")||g;n=this.B("selectedPopUpBackgroundColor")||g;var t=this.B("popUpFontColor"),u=this.B("rollOverPopUpFontColor")||t,v=this.B("selectedPopUpFontColor")||t,w=this.B("selectedIndex"),x=this.B("overIndex");p=this.Lb.rb();for(q=0;q<p.length;q++)q==w?p[q].ra({fontColor:v,backgroundColor:n}):q==x?p[q].ra({fontColor:u,backgroundColor:r}):p[q].ra({fontColor:t,backgroundColor:g})}if(this.EW||this.L("popUpGap")||this.L("buttonWidth"))this.Bd&&
this.Lb.set("minWidth",this.Bd.Wa()),this.S("popUpGap"),this.KAa(),this.EW=!1;this.xc("popUpShadow popUpShadowBlurRadius popUpShadowColor popUpShadowHorizontalLength popUpShadowOpacity popUpShadowSpread popUpShadowVerticalLength".split(" "),{popUpShadow:"shadow",popUpShadowBlurRadius:"shadowBlurRadius",popUpShadowColor:"shadowColor",popUpShadowHorizontalLength:"shadowHorizontalLength",popUpShadowOpacity:"shadowOpacity",popUpShadowSpread:"shadowSpread",popUpShadowVerticalLength:"shadowVerticalLength"},
[this.Lb],!0,!0);this.nAa();f.prototype.bb.call(this)};a.prototype.KAa=function(){if(this.Bd){var g=this.Db(),n=this.Bd.F6a(g),q=this.Bd.Wa(),p=this.Bd.Ab(),r=this.B("popUpGap"),t=this.Lb.Rb,u=this.Lb.dc,v=g.Ab()-(n.top+p+r)-5,w=n.top-5-r,x=this.B("horizontalAlign");u<=v?(this.eB=!0,this.Lb.set("top",n.top+p+r),this.Lb.set("maxHeight",void 0),this.Lb.set("overflow",c.PH)):u<=w?(this.eB=!1,this.Lb.set("top",n.top-u-r),this.Lb.set("maxHeight",void 0),this.Lb.set("overflow",c.PH)):(v>=w?(this.eB=!0,
this.Lb.set("top",n.top+p+r),this.Lb.set("maxHeight",v)):(this.eB=!1,this.Lb.set("top",n.top-w+r),this.Lb.set("maxHeight",w)),this.Lb.set("overflow",c.mq));p=x==m.$e?n.left+Math.round(.5*(q-t)):x==m.ub?n.left+q-t:n.left;0>p?p=n.left:n.left+t>g.Wa()&&(p=n.left+q-t);this.Lb.set("left",p);this.nAa()}};a.prototype.nAa=function(){var g=this.B("popUpBorderRadius");this.Lb.ra({borderTopRadius:this.eB?0:g,borderBottomRadius:this.eB?g:0});for(var n=this.Lb.rb(),q=0;q<n.length;q++){var p=0==q,r=q==n.length-
1;n[q].ra({borderTopRadius:!this.eB&&p?g:0,borderBottomRadius:this.eB&&r?g:0})}};return a});
define("pO","require lV cI pB T ie mc jv".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("pB"),k=a("T"),c=a("ie"),h=a("mc"),f=a("jv");a=d.extend(k,function(){k.call(this);this.Ow=this.Ow.bind(this);this.Re("DropDown");this.TO=!1;this.Bd=this.Oi=null;this.fza=!0;this.Sf=-1;this.sp=!1});a.prototype.yb=function(){k.prototype.yb.call(this);this.h("prompt","");this.h("label","");this.h("items",[]);this.h("selectedIndex",-1);this.h("arrowBeforeLabel");this.h("arrowWidth",9);this.h("arrowHeight",5);
this.h("arrowGap",5);this.h("borderRadius",5);this.h("borderSize",1);this.h("backgroundColorDirection","vertical");this.h("horizontalAlign","left");this.h("paddingLeft",5);this.h("paddingTop",5);this.h("paddingRight",5);this.h("paddingBottom",5);this.h("fontFamily");this.h("fontSize");this.h("fontColor","#555555");this.h("fontWeight");this.h("fontStyle");this.h("textDecoration");this.h("textShadowColor");this.h("textShadowHorizontalLength");this.h("textShadowVerticalLength");this.h("textShadowBlurRadius");
this.h("textShadowOpacity");this.h("popUpGap",0);this.h("popUpBorderRadius");this.h("popUpPaddingBottom",2);this.h("popUpPaddingLeft",5);this.h("popUpPaddingRight",5);this.h("popUpPaddingTop",2);this.h("popUpShadow",!0);this.h("popUpShadowBlurRadius");this.h("popUpShadowColor");this.h("popUpShadowHorizontalLength");this.h("popUpShadowOpacity");this.h("popUpShadowSpread");this.h("popUpShadowVerticalLength");this.h("popUpBackgroundColor","#FFFFFF");this.h("popUpBackgroundOpacity");this.h("rollOverPopUpBackgroundColor");
this.h("selectedPopUpBackgroundColor");this.h("popUpFontColor","#555555");this.h("rollOverPopUpFontColor");this.h("selectedPopUpFontColor");this.h("borderColor","#AAAAAA");this.h("arrowColor","#000000");this.h("backgroundColor",["#FAFAFA","#E5E5E5"]);this.h("backgroundColorRatios",[0,1]);this.h("shadow",!1);this.h("rollOverBorderColor");this.h("rollOverArrowColor");this.h("rollOverBackgroundColor");this.h("rollOverBackgroundColorRatios");this.h("rollOverShadow");this.h("pressedBorderColor");this.h("pressedArrowColor");
this.h("pressedBackgroundColor");this.h("pressedBackgroundColorRatios");this.h("pressedShadow");this.h("pressedRollOverBorderColor");this.h("pressedRollOverArrowColor");this.h("pressedRollOverBackgroundColor");this.h("pressedRollOverBackgroundColorRatios");this.h("pressedRollOverShadow")};a.prototype.Hb=function(){k.prototype.Hb.call(this);this.Bd||(this.Bd=new c,this.Bd.bind(m.tc,this.JWa,this),this.Bd.bind(m.OPEN,this.jXa,this),this.Bd.bind(m.vH,this.wZ,this),this.Bd.bind(m.cd,this.IWa,this),this.Bd.set("width",
"100%"),this.Bd.set("height","100%"),this.Bd.set("toolTipDisabled",!0),this.Za(this.Bd));this.Oi||(this.Oi=new h,this.Oi.bind(m.vH,this.wZ,this),this.Oi.bind(m.nq,this.xXa,this),this.Db().Za(this.Oi))};a.prototype.JWa=function(){this.fza=!0;this.xe()};a.prototype.jXa=function(){this.Bd.open();this.Oi.set("selectedIndex",this.get("selectedIndex"));this.Oi.open(this.Bd);f.DBa(this,[this.Bd.Xd()].concat(this.Oi.SDa()));f.wha(this.Ow)};a.prototype.Ow=function(){this.wZ()};a.prototype.wZ=function(){f.N7a([this.Bd.Xd()].concat(this.Oi.SDa()))&&
this.Bd.Xd().focus();f.N9a(this);f.Ika(this.Ow);this.Bd.close();this.Oi.close()};a.prototype.IWa=function(){this.Bd.close();this.Oi.close()};a.prototype.xXa=function(){this.set("selectedIndex",this.Oi.get("selectedIndex"));this.wZ();this.sp=!0};a.prototype.bb=function(){var b=!1;if(this.L("prompt")||this.L("label"))b=!0,this.S("label"),this.S("prompt");if(this.L("selectedIndex")||this.L("items")){b=!0;var e=this.B("selectedIndex"),g=this.B("items");0<=e&&e>=g.length&&(e=-1);this.set("selectedIndex",
e);this.Oi.set("items",this.B("items"));this.Oi.set("selectedIndex",this.B("selectedIndex"));this.S("items");this.S("selectedIndex");this.sp&&(this.sp=!1,this.trigger(new l(m.ba)))}b&&(b=this.B("label"),b||(e=this.B("selectedIndex"),b=0>e?this.B("prompt"):this.B("items")[e]),this.Bd.set("label",b));this.fza&&(this.Oi.set("minWidth",this.Bd.Wa()),this.Oi.set("buttonWidth",this.Bd.Wa()));this.xc("fontFamily fontSize fontColor fontWeight fontStyle tabIndex textDecoration horizontalAlign textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" "),
{},[this.Bd,this.Oi],!0,!0);this.xc("popUpBorderRadius popUpGap popUpPaddingBottom popUpPaddingLeft popUpPaddingRight popUpPaddingTop popUpBackgroundColor popUpBackgroundOpacity rollOverPopUpBackgroundColor selectedPopUpBackgroundColor popUpFontColor rollOverPopUpFontColor selectedPopUpFontColor popUpShadow popUpShadowBlurRadius popUpShadowColor popUpShadowHorizontalLength popUpShadowOpacity popUpShadowSpread popUpShadowVerticalLength".split(" "),{},[this.Oi],!0,!0);this.xc("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.Bd],!0,!0);k.prototype.bb.call(this)};return a});
define("gb",["require","z","pB","fq","pO"],function(a){var d=a("z"),l=a("pB"),m=a("fq"),k=a("pO");a=m.define("DropDown",k,function(){k.call(this);this.Ed=null;this.Lta=[];this.bind(l.ba,this.MWa,this)});a.prototype.set=function(c,h){if("playList"==c){if(this.Ed)for(this.Ed.unbind("change",this.Yw,this);this.Lta.length;)this.Lta.shift().mC();(this.Ed=h)?(d.Zu(this.Ed,"items.label",this.q1,this),d.Zu(this.Ed,"items.media.label",this.q1,this),this.q1(),this.Ed.bind("change",this.Yw,this),this.Yw()):
this.q1()}k.prototype.set.call(this,c,h)};a.prototype.q1=function(){this.Ed?this.set("items",this.Ed.get("items").map(function(c){return c.get("label")||c.get("media")&&c.get("media").get("label")})):this.set("items",[])};a.prototype.Yw=function(){this.set("selectedIndex",this.Ed.get("selectedIndex"))};a.prototype.MWa=function(){this.Ed&&this.Ed.set("selectedIndex",this.get("selectedIndex"))};return a});
define("dA",["require","mz","fq"],function(a){var d=a("mz");a=a("fq").define("DustPanoramaOverlay",d,function(){d.call(this)});a.prototype.get=function(l,m){"startState"==l&&void 0===m&&(m=this.get("initialState"));return d.prototype.get.call(this,l,m)};return a});
define("bH",["require","fq","eF"],function(a){var d=a("fq"),l=a("eF");a=d.define("Effect",l,function(){l.call(this)});a.prototype.cancel=function(){return l.prototype.cancel.apply(this,arguments)};a.prototype.getPosition=function(){return l.prototype.ll.apply(this,arguments)};a.prototype.play=function(){return l.prototype.play.apply(this,arguments)};a.prototype.reverse=function(){return l.prototype.reverse.apply(this,arguments)};a.prototype.stop=function(){return l.prototype.stop.apply(this,arguments)};
return a});define("os",["require","fq","og"],function(a){var d=a("fq"),l=a("og");return d.define("FadeInEffect",l,function(){l.call(this)})});define("kn",["require","fq","oB"],function(a){var d=a("fq"),l=a("oB");return d.define("FadeOutEffect",l,function(){l.call(this)})});
define("gs","require mz pB lx fq lY".split(" "),function(a){var d=a("mz"),l=a("pB"),m=a("lx"),k=a("fq"),c=a("lY");a=k.define("Model3DCamera",d,function(){d.call(this);this.set("userInteracting",!1);this.set("moving",!1);this.set("mouseDisabled",!1);this.set("clickTranslationDisabled",!1);this.set("doubleClickDisabled",!1);this.u$=this.mWa=this.r9=this.q9=!1;"distance fov yaw pitch x y z".split(" ").forEach(function(h){this.bind(l.G(h),this.rXa,this,!0)}.bind(this))});a.prototype.Vbb=function(){this.vK=
{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(h){void 0!==h.x&&this.set("x",h.x);void 0!==h.y&&this.set("y",h.y);void 0!==h.z&&this.set("z",h.z);void 0!==h.distance&&this.set("distance",h.distance);void 0!==h.yaw&&this.set("yaw",h.yaw);void 0!==h.pitch&&this.set("pitch",h.pitch);void 0!==h.fov&&this.set("fov",h.fov);void 0!==h.easing?this.set("easing",h.easing):this.set("easing",
0)};a.prototype.K_a=function(h){this.vK||(this.vK={});for(var f in h)this.vK[f]=h[f]};a.prototype.i$a=function(){this.vK&&this.setPosition(this.vK)};a.prototype.dJa=function(h){this.jua!==h&&(this.jua=h,this.m2a())};a.prototype.m2a=function(){this.set("mouseDisabled",this.mWa||this.jua)};a.prototype.E$a=function(h){this.q9!==h&&(this.q9=h,this.pAa())};a.prototype.FIa=function(h){this.r9!==h&&(this.r9=h,this.pAa())};a.prototype.pAa=function(){this.set("clickTranslationDisabled",this.q9||this.r9)};
a.prototype.N$a=function(h){this.u$!==h&&(this.u$=h,this.V1a())};a.prototype.V1a=function(){this.set("doubleClickDisabled",this.u$)};a.prototype.rXa=function(){this.exa||(this.exa=!0,c.ZB(function(){this.exa=!1;this.q1a()}.bind(this)))};a.prototype.q1a=function(){this.trigger(l.Gl)};a.Edb=100;a.prototype.setStoredPosition=function(h){this.K_a(h)};a.prototype.play=function(){this.set("state",m.PLAYING)};a.prototype.pause=function(){this.set("state",m.Qb)};a.prototype.stop=function(){this.set("state",
m.U)};return a});define("lo",["require","fq","gs"],function(a){var d=a("fq"),l=a("gs");return d.define("FirstPersonModel3DCamera",l,function(){l.call(this);this.set("distance",0)})});
define("cW",["require","mz","pB","fq","eF"],function(a){var d=a("mz"),l=a("pB"),m=a("fq"),k=a("eF");a=m.define("HotspotPanoramaOverlay",d,function(){d.call(this);this.bind(l.kd,this.tj,this,!0);this.bind(l.cd,this.sj,this,!0);this.Ai=[];this.Ub=!1});a.prototype.set=function(c,h){switch(c){case "enabledInCardboard":this.set("enabledInVR",h);break;case "effect":case "rollOverEffect":case "areas":this.IYa(),this.Ai=[]}d.prototype.set.call(this,c,h);switch(c){case "enabledInCardboard":this.set("enabledInVR",
h);break;case "effect":case "rollOverEffect":case "areas":this.$Na()}};a.prototype.$Na=function(){this.get("effect")&&this.get("effect").bind(k.kv,this.jva,this,!0);this.get("rollOverEffect")&&this.get("rollOverEffect").bind(k.kv,this.wwa,this,!0);this.get("areas",[]).forEach(function(c){c.bind(l.Gc,this.Zua,this,!0);c.bind(l.Jb,this.Yua,this,!0)}.bind(this))};a.prototype.IYa=function(){this.get("effect")&&this.get("effect").unbind(k.kv,this.jva,this,!0);this.get("rollOverEffect")&&this.get("rollOverEffect").unbind(k.kv,
this.wwa,this,!0);this.get("areas",[]).forEach(function(c){c.unbind(l.Gc,this.Zua,this,!0);c.unbind(l.Jb,this.Yua,this,!0)}.bind(this))};a.prototype.Zua=function(c){0>this.Ai.indexOf(c.source)&&(this.Ai.push(c.source),1==this.Ai.length&&this.VZ())};a.prototype.Yua=function(c){c=this.Ai.indexOf(c.source);0<=c&&(this.Ai.splice(c,1),0==this.Ai.length&&this.cr())};a.prototype.VZ=function(){var c=this.get("effect"),h=this.get("rollOverEffect");h&&(c&&0<c.ll()?c.reverse():h.play())};a.prototype.cr=function(){var c=
this.get("rollOverEffect");if(c){var h=this.get("effect");0<c.ll()?c.reverse():h&&h.get("loop")&&h.play()}};a.prototype.jva=function(){if(0<this.Ai.length){var c=this.get("rollOverEffect");c&&(this.get("effect").stop(),c.play())}};a.prototype.wwa=function(){if(0==this.Ai.length){this.get("rollOverEffect").stop();var c=this.get("effect");c&&c.get("loop")&&c.play()}};a.prototype.tj=function(){var c=this.get("effect");c&&c.play()};a.prototype.sj=function(){var c=this.get("effect");c&&c.stop();(c=this.get("rollOverEffect"))&&
c.stop()};return a});define("nm",["require","fq","cW"],function(a){var d=a("fq"),l=a("cW");return d.define("FlatHotspotPanoramaOverlay",l,function(){l.call(this)})});define("v",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("HotspotPanoramaOverlayArea",d,function(){d.call(this);this.set("displayTooltipInTouchScreens",!0)})});define("fT",["require","fq","v"],function(a){var d=a("fq"),l=a("v");return d.define("FlatHotspotPanoramaOverlayArea",l,function(){l.call(this)})});
define("bv",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("QuadPanoramaOverlayPlaybackPosition",d,function(l,m,k){d.call(this);void 0!==l&&this.set("vertices",l);this.set("opacity",void 0!==m?m:1);void 0!==k&&this.set("timestamp",k)})});
define("em",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("FlatPanoramaOverlayPlaybackPosition",d,function(l,m,k,c,h){d.call(this);void 0!==l&&this.set("yaw",l);void 0!==m&&this.set("pitch",m);void 0!==k&&this.set("roll",k);this.set("opacity",void 0!==c?c:1);void 0!==h&&this.set("timestamp",h)})});
define("gE",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("PanoramaOverlayPlaybackPosition",d,function(l,m,k,c,h,f,b,e,g){d.call(this);void 0!==l&&this.set("yaw",l);void 0!==m&&this.set("pitch",m);void 0!==k&&this.set("rotationX",k);void 0!==c&&this.set("rotationY",c);void 0!==h&&this.set("roll",h);void 0!==f&&this.set("hfov",f);void 0!==b&&this.set("vfov",b);this.set("opacity",void 0!==e?e:1);void 0!==g&&this.set("timestamp",g)})});
define("cM",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("PanoramaPoint",d,function(l,m){d.call(this);this.set("yaw",l);this.set("pitch",m)})});
define("V",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("PopupPanoramaOverlayPlaybackPosition",d,function(l,m,k,c,h,f,b){d.call(this);void 0!==l&&this.set("yaw",l);void 0!==m&&this.set("pitch",m);void 0!==k&&this.set("rotationX",k);void 0!==c&&this.set("rotationY",c);void 0!==h&&this.set("rotationZ",h);void 0!==f&&this.set("hfov",f);void 0!==b&&this.set("timestamp",b)})});
define("kT","require mz bv em gE cM V".split(" "),function(a){var d=a("mz"),l=a("bv"),m=a("em"),k=a("gE"),c=a("cM"),h=a("V");return{d6a:function(f){return this.bY(f,this.BSa)},Zia:function(f){return this.bY(f,this.eYa)},B6a:function(f){return this.bY(f,this.lYa)},$ia:function(f){return this.bY(f,this.vYa)},BSa:function(f){return new m(d.prototype.get.call(f,"yaw",0),d.prototype.get.call(f,"pitch",0),d.prototype.get.call(f,"roll",0),d.prototype.get.call(f,"opacity",1),0)},vYa:function(f){var b=d.prototype.get.call(f,
"vertices",[null,null,null,null]);return new l([b[0]||new c(0,0),b[1]||new c(0,0),b[2]||new c(0,0),b[3]||new c(0,0)],d.prototype.get.call(f,"opacity",1),0)},eYa:function(f){function b(e,g){return d.prototype.get.call(f,e,g)}return new k(b("yaw",0),b("pitch",0),b("rotationX",0),b("rotationY",0),b("roll",0),b("hfov",void 0===b("vfov")?45:void 0),b("vfov"),b("opacity",1),0)},lYa:function(f){function b(e,g){return d.prototype.get.call(f,e,g)}return new h(b("yaw",0),b("pitch",0),b("rotationX",0),b("rotationY",
0),b("rotationZ",0),b("hfov",45),0)},bY:function(f,b){var e=d.prototype.get.call(f,"playbackPositions")||[];return 0<e.length?e.slice().sort(function(g,n){return g.get("timestamp")-n.get("timestamp")||e.indexOf(g)-e.indexOf(n)}):[b(f)]}}});
define("jO",["require","mz","pB","fq","kT"],function(a){var d=a("mz"),l=a("pB"),m=a("fq"),k=a("kT");a=m.define("FlatHotspotPanoramaOverlayImageBase",d,function(){d.call(this);this.sd=void 0});a.prototype.get=function(c,h){switch(c){case "playbackPositions":return void 0===this.sd&&(this.sd=k.d6a(this)),this.sd}return d.prototype.get.call(this,c,h)};a.prototype.set=function(c,h){var f=!1;switch(c){case "opacity":case "distance":case "pitch":case "roll":case "yaw":case "playbackPositions":this.sd=void 0,
f=!0}d.prototype.set.call(this,c,h);f&&"playbackPositions"!=c&&this.trigger(l.G("playbackPositions"))};return a});define("r",["require","fq","jO"],function(a){var d=a("fq"),l=a("jO");return d.define("FlatHotspotPanoramaOverlayImage",l,function(){l.call(this)})});define("eh",["require","fq","jO"],function(a){var d=a("fq"),l=a("jO");return d.define("FlatHotspotPanoramaOverlayMap",l,function(){l.call(this)})});
define("pq",["require","fq","gs"],function(a){var d=a("fq"),l=a("gs");return d.define("FlyOverModel3DCamera",l,function(){l.call(this)})});
define("nB",["require","mz","pB","fq","kT"],function(a){var d=a("mz"),l=a("pB"),m=a("fq"),k=a("kT");a=m.define("FramePanoramaOverlay",d,function(){d.call(this);this.sd=void 0});a.prototype.set=function(c,h){var f=!1;switch(c){case "hfov":case "pitch":case "rotationX":case "rotationY":case "roll":case "vfov":case "yaw":case "playbackPositions":this.sd=void 0,f=!0}d.prototype.set.call(this,c,h);f&&"playbackPositions"!=c&&this.trigger(l.G("playbackPositions"))};a.prototype.get=function(c,h){switch(c){case "playbackPositions":return void 0===
this.sd&&(this.sd=k.Zia(this)),this.sd}return d.prototype.get.call(this,c,h)};return a});define("kv",["require","mz","fq"],function(a){var d=a("mz");a=a("fq").define("Model3DResource",d,function(){d.call(this)});a.prototype.get=function(l,m){switch(l){case "levels":m=[this];break;case "url":for(var k=d.prototype.get.call(this,l),c=this.get("levels"),h=0;c&&h<c.length&&void 0===k;h++){var f=c[h];f!=this&&(k=f.get(l))}return void 0!==k?k:m}return d.prototype.get.call(this,l,m)};return a});
define("cy",["require","kv","fq"],function(a){var d=a("kv");return a("fq").define("TDTilesModel3DResource",d,function(){d.call(this)})});
define("mX",["require","mz","fq"],function(a){var d=a("mz");a=a("fq").define("Model3DResourceLevel",d,function(){d.call(this)});a.bW="mobile";a.prototype.get=function(l,m){switch(l){case "levels":m=[this];break;case "url":for(var k=d.prototype.get.call(this,l),c=this.get("levels"),h=0;c&&h<c.length&&void 0===k;h++){var f=c[h];f!=this&&(k=f.get(l))}return void 0!==k?k:m}return d.prototype.get.call(this,l,m)};return a});
define("df",["require","cy","mX","fq"],function(a){var d=a("cy"),l=a("mX");a=a("fq").define("GoogleMaps3DTilesModel3DResource",d,function(){d.call(this)});a.prototype.set=function(c,h){d.prototype.set.call(this,c,h);switch(c){case "latitude":case "longitude":this.yf();break;case "apiKey":this.h2a()}};a.prototype.yf=function(){var c=this.get("latitude"),h=this.get("longitude");if(void 0!==c&&void 0!==h){c=this.nsa(c,h);h=(new THREE.Vector3).crossVectors(c,(new THREE.Vector3).crossVectors(this.nsa(90,
0),c));var f=new THREE.Vector3(0,0,0);h=(new THREE.Matrix4).lookAt(c,f,h).invert();h=(new THREE.Matrix4).makeRotationX(-Math.PI/2).multiply(h);h=(new THREE.Euler).setFromRotationMatrix(h,"XYZ");this.set("rotationOrder",h.order);this.set("rotationX",h.x*k);this.set("rotationY",h.y*k);this.set("rotationZ",h.z*k);this.set("positionX",-c.x);this.set("positionY",-c.y);this.set("positionZ",-c.z)}};a.prototype.nsa=function(c,h){c*=m;h*=m;var f=1/298.257223563;const b=Math.sin(c);c=Math.cos(c);f=2*f-f*f;
const e=6378137/Math.sqrt(1-f*b*b);return new THREE.Vector3((e+0)*c*Math.cos(h),(e+0)*c*Math.sin(h),e*(1-f)*b)};a.prototype.h2a=function(){var c=this.get("apiKey");if(void 0!==c){var h=new l;h.set("url","https://tile.googleapis.com/v1/3dtiles/root.json?key="+c);this.set("levels",[h])}};var m=Math.PI/180,k=180/Math.PI;return a});
define("dH",["require","er","lV","T","d"],function(a){var d=a("er"),l=a("lV"),m=a("T");a=a("d");var k=l.extend(m,function(){m.call(this)});k.Ic={layout:a.iz};d.defaults(k.Ic,m.Ic);k.prototype.yb=function(){this.Io(k.Ic)};return k});define("ks",["require","fq","dH"],function(a){var d=a("fq"),l=a("dH");return d.define("GridContainer",l,function(){l.call(this)})});
define("jY","require er jquery.mod cI gF pB iy mV mD bB lV".split(" "),function(a){function d(){}function l(q){this.G9a=q;this.items=[];this.priority=0}var m=a("er");a("jquery.mod");var k=a("cI"),c=a("gF"),h=a("pB"),f=a("iy"),b=a("mV"),e=a("mD"),g=a("bB"),n=a("lV").extend(c,function(q){c.call(this);this.url=q;this.Hka=this.priority=0;this.status=n.H7;this.Ty=null});n.prototype.Tja=function(q){this.Hka+=q};n.prototype.WL=function(q){this.priority+=q};n.prototype.start=function(){this.status=n.aW;e.H5(this.url)?
this.tA():this.Po=g.add(this.url,f.e6,this.tZa.bind(this),this.$pa.bind(this))};n.prototype.tZa=function(){this.Ty=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");this.Ty.open("GET",this.url);this.Ty.onreadystatechange=function(){3<this.Ty.readyState&&this.tA()}.bind(this);this.Ty.send()};n.prototype.$pa=function(){this.Ty&&(this.Ty.abort(),this.Ty=null)};n.prototype.stop=function(){this.status==n.aW&&(this.status=n.H7,this.$pa(),this.Po&&this.Po.cancel())};n.prototype.tA=
function(){this.Ty=null;this.Po&&(this.Po.loaded(),this.Po=null);this.status=n.dNa;this.trigger(new k(h.ea))};n.H7="not loaded";n.aW="loading";n.dNa="loaded";l.prototype.C3a=function(q){q.forEach(function(p){0>this.items.indexOf(p)&&(this.items.push(p),p.WL(this.priority),p.Tja(1))}.bind(this))};l.prototype.S9a=function(q){var p=this.items;this.items=[];p.forEach(function(r){0>q.indexOf(r)?this.items.push(r):(r.WL(-this.priority),r.Tja(-1))}.bind(this))};l.prototype.I9a=function(){this.items.forEach(function(q){q.WL(-this.priority);
q.Tja(-1)}.bind(this));this.items=[];this.priority=0};l.prototype.WL=function(q){this.priority+=q;this.items.forEach(function(p){p.WL(q)})};d.Ch=[];d.Jxa=[];d.KSa=0;d.CBa=function(q,p){this.S_(q).C3a(p.map(function(r){return this.Aa(r)}.bind(this)));this.H0();this.oa()};d.a$a=function(q,p){this.S_(q).S9a(p.map(function(r){return this.Aa(r)}.bind(this)));this.H0();this.oa()};d.J9a=function(q){this.S_(q).I9a();this.H0();this.oa()};d.a4=function(q,p){this.S_(q).WL(p);this.H0();this.oa()};d.H0=function(){this.Ch.sort(function(q,
p){return p.priority-q.priority})};d.oa=function(q){if(this.enabled()&&(q||!this.du))if(q){this.du&&clearTimeout(this.du);this.du=null;q=this.KTa();var p=this.LTa();m(q).difference(p).forEach(function(r){r.stop()});m(p).difference(q).forEach(function(r){r.start()})}else this.du=setTimeout(function(){this.du=null;this.oa(!0)}.bind(this),1E3)};d.du=null;d.KTa=function(){return this.Ch.filter(function(q){return q.status==n.aW})};d.LTa=function(){for(var q=this.MTa(),p=[],r=0;r<this.Ch.length&&p.length<
q;r++){var t=this.Ch[r];0<t.Hka&&(t.status==n.H7||t.status==n.aW)&&p.push(t)}return p};d.MTa=function(){return 0<this.KSa?0:5};d.S_=function(q){var p=m(this.Jxa).find(function(r){return r.G9a==q});p||(p=new l(q),this.Jxa.push(p));return p};d.Aa=function(q){var p=m(this.Ch).find(function(r){return r.url==q});p||(p=new n(q),p.bind(h.ea,this.oa,this),this.Ch.push(p));return p};d.enabled=function(q){if(void 0===q)return d.HRa||d.IRa?!1:void 0!==d.H$?d.H$:d.V;d.V=q};d.V=!0;d.Hla=function(q){d.H$=q.get(TDV.PlayerSettings.BACKGROUND_PRELOAD_ENABLED)};
d.H$=void 0;d.IRa=b.mg("disable-background-preload",!1);d.HRa=!1;return d});define("ey",["require","lV","mz","fq","jY"],function(a){var d=a("lV"),l=a("mz"),m=a("fq"),k=a("jY");a=m.define("Media",l,function(){l.call(this);this.Gga=d.Ip(this.Gga,this)});a.prototype.Gga=function(){k.CBa(this,this.Bu())};a.prototype.Bu=function(){return[]};a.prototype.X9a=function(){k.J9a(this)};a.prototype.set=function(c,h){l.prototype.set.call(this,c,h);this.Gga()};return a});
define("fn",["require","fq","ey"],function(a){var d=a("fq"),l=a("ey");a=d.define("Panorama",l,function(){l.call(this);this.QY=this.qK=void 0;this.set("minFaceSize",void 0)});a.prototype.get=function(m,k){switch(m){case "overlays":return this.Daa();case "frames":return this.Bsa();case "partial":if(359.9>this.get("hfov"))return!0}return l.prototype.get.call(this,m,k)};a.prototype.set=function(m,k){switch(m){case "cardboardMenu":this.set("vrMenu",k)}l.prototype.set.call(this,m,k)};a.prototype.Daa=function(){var m=
l.prototype.get.call(this,"overlays");m||(m=[]);return this.qfa(m)};a.prototype.qfa=function(m){if(void 0===this.qK||this.QY!=m){var k=function(h){return d.Ja("PopupPanoramaOverlay",h)},c=function(h){return d.Ja("LensFlarePanoramaOverlay",h)};this.QY=m;this.qK=[].concat(m.filter(function(h){return!(k(h)||c(h))}),m.filter(c),m.filter(k))}return this.qK};a.prototype.LEa=function(){return 0<this.get("overlays").filter(function(m){return d.Ja("TripodCapPanoramaOverlay",m)}).length};a.prototype.BEa=function(){return 0<
this.get("overlays").filter(function(m){return d.Ja("CeilingCapPanoramaOverlay",m)}).length};a.prototype.aFa=function(){if(!this.pja())return!1;var m=this.get("pitch",0),k=this.get("vfov",180);if(179.9<=k)return!0;var c=this.BEa()?90:m+.5*k;m=this.LEa()?-90:m-.5*k;return 179.9<=c-m?!0:!1};a.prototype.pja=function(){return 359.9<=this.get("hfov")&&!this.get("partial")};a.prototype.Hm=function(){var m=this.Bsa();return 0<m.length&&m[0].Hm()};a.prototype.fT=function(){return 0};a.prototype.Bsa=function(){var m=
l.prototype.get.call(this,"frames",[]);m.forEach(function(k){k.S3a(this)}.bind(this));return m};return a});define("nW",["require","fq","fn"],function(a){var d=a("fq"),l=a("fn");a=d.define("HDRPanorama",l,function(){l.call(this)});a.prototype.fT=function(){var m=this.get("frames")||[];return Math.floor((m.length-1)/2)};return a});define("bc",["require","fq","jf"],function(a){var d=a("fq"),l=a("jf");return d.define("HorizonGridModel3DObject",l,function(){l.call(this)})});
define("mE",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("HotspotMapOverlayArea",d,function(){d.call(this)})});
define("mI",["require","mz","fq"],function(a){var d=a("mz"),l=a("fq").define("ImageResourceLevel",d,function(){d.call(this)});l.prototype.get=function(m,k){switch(m){case "tags":return(m=d.prototype.get.call(this,m))||(m=[]),Array.isArray(m)||(m=[m]),0>m.indexOf(l.Xs)&&d.prototype.get.call(this,"grayscale")&&(m=m.concat([l.Xs])),m}return d.prototype.get.call(this,m,k)};l.prototype.KEa=function(m){return 0<=this.get("tags").indexOf(m)};l.Xs="preload";l.bW="mobile";l.goa="ipadpro";l.cW="mobilevr";l.M7=
"mobilevr2gen";l.N7="ondemand";return l});
define("gx",["require","mI","w","mV"],function(a){var d=a("mI"),l=a("w"),m=a("mV");return{Zr:function(k){return this.mk(k,"load")},gG:function(k){return this.mk(k,"preload")},DL:function(k){return this.Zr(k)!=this.gG(k)},mk:function(k,c){k=k.get("levels")||[];var h=this.USa(k);h=this.hUa(c,h);k=this.vSa(k,c);(c=this.Jsa(k,h[0],h[1],this.gUa(c)))||(c=this.Jsa(k,h[0],h[1],void 0));return c},vSa:function(k,c){"preload"==c?k=this.rO(k,d.Xs):"load"==c&&(k=this.uSa(k,d.Xs));l.ly()&&(k=this.rO(k,d.goa));
if(l.I3()||l.J3())k=this.rO(k,d.M7);l.Ef()&&(k=this.rO(k,d.cW));l.pb()&&(k=this.rO(k,d.bW));return k},USa:function(k){if(0==k.length)return 1;k.sort(function(c,h){return h.get("width")-c.get("width")});return k[0].get("width")/k[0].get("height")},hUa:function(k,c){if("preload"==k)return[0,0];k=1E4;this.DSa()||(l.Ef()?k=2048:l.ly()?k=2048:l.pb()&&(k=2048));return 1>c?[k*c,k]:[k,k/c]},gUa:function(k){if("load"==k)return!1},DSa:function(){return l.ly()&&m.mg("recent_ipad_use_max_res",!1)},rO:function(k,
c){var h=k.filter(function(f){return f.KEa(c)});0==h.length&&(h=k);return h},uSa:function(k,c){var h=k.filter(function(f){return!f.KEa(c)});0==h.length&&(h=k);return h},Jsa:function(k,c,h,f){function b(e){return Math.abs(e.get("width")*e.get("height")-c*h)}k=k.filter(function(e){return void 0!==f&&f!=e.get("grayscale",!1)?!1:!0});if(0==k.length)return null;k.sort(function(e,g){return b(e)-b(g)});return k[0]}}});
define("L",["require","mz","fq","gx"],function(a){var d=a("mz"),l=a("fq"),m=a("gx");a=l.define("HotspotMapOverlayImageBase",d,function(){d.call(this)});a.prototype.Zr=function(){return this.get("image")?m.Zr(this.get("image")):null};a.prototype.gG=function(){return this.get("image")?m.gG(this.get("image")):null};return a});define("lW",["require","lV","cI"],function(a){var d=a("lV"),l=a("cI");return d.extend(l,function(m,k){l.call(this,m);this.Ug=k})});
define("cA",["require","lV","mz","pB","lW"],function(a){var d=a("lV"),l=a("mz"),m=a("pB"),k=a("lW");a=d.extend(l,function(){l.call(this);this.cS=[];this.lg=void 0;this.C="initial"});a.prototype.Du=function(){return this.cS};a.prototype.wM=function(c){this.cS!=c&&(this.cS=c,this.tA=this.lg=void 0)};a.prototype.tab=function(c){this.lg!==c&&(this.C="loading",this.lg=c,this.trigger(new k(m.mc,this.lg)))};a.prototype.KU=function(){"loaded"!==this.C&&(this.C="loaded",this.trigger(m.ea))};a.prototype.P$a=
function(){"loaded"!==this.C&&(this.C="error",this.trigger(m.Bc))};return a});define("ix",["require","lV","cA"],function(a){var d=a("lV"),l=a("cA");a=d.extend(l,function(m){l.call(this);this.pf=m;this.v=void 0});a.prototype.getType=function(){return this.pf};a.prototype.i7a=function(m){return void 0!==this.v&&this.v===m.v};a.qoa="map";a.roa="overlay";return a});
define("ky",["require","lV","ix"],function(a){var d=a("lV"),l=a("ix");a=d.extend(l,function(m,k,c){l.call(this,l.roa);this.UXa=m;this.Na=k;this.Qa=c});a.prototype.getX=function(){return this.Na};a.prototype.getY=function(){return this.Qa};a.ooa="image";a.noa="fov";return a});
define("mC",["require","lV","ky"],function(a){var d=a("lV"),l=a("ky");a=d.extend(l,function(m,k,c,h,f,b,e,g,n,q,p,r){l.call(this,l.ooa,c,h);this.v=m;this.Wd=k;this.gya=f;this.Lw=b;this.Mw=e;this.sa=g;this.wa=n;this.Rf=q;this.Vl=p;this.xm=r;this.cS=[k]});a.prototype.Yi=function(){return this.Wd};a.prototype.Fe=function(){return this.sa};a.prototype.Ve=function(){return this.wa};return a});
define("hD",["require","fq","L","gx","mC"],function(a){var d=a("fq"),l=a("L"),m=a("gx"),k=a("mC");a=d.define("HotspotMapOverlayImage",l,function(){l.call(this);this.Hw=void 0});a.prototype.getItem=function(){return this.nk()};a.prototype.nk=function(){void 0===this.Hw&&(this.Hw=this.u2());return this.Hw};a.prototype.u2=function(c){var h=this.get("image");return h?(h=m.Zr(h),new k(this,h.get("url"),this.get("x"),this.get("y"),c,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("O",["require","fq","L"],function(a){var d=a("fq"),l=a("L");return d.define("HotspotMapOverlayMap",l,function(){l.call(this)})});
define("gD",["require","mz","pB","fq","kT"],function(a){var d=a("mz"),l=a("pB"),m=a("fq"),k=a("kT");a=m.define("HotspotPanoramaOverlayImageBase",d,function(){d.call(this);this.sd=void 0});a.prototype.get=function(c,h){switch(c){case "playbackPositions":return void 0===this.sd&&(this.sd=k.Zia(this)),this.sd}return d.prototype.get.call(this,c,h)};a.prototype.set=function(c,h){var f=!1;switch(c){case "distance":case "hfov":case "vfov":case "pitch":case "rotationX":case "rotationY":case "roll":case "yaw":case "opacity":case "playbackPositions":this.sd=
void 0,f=!0}d.prototype.set.call(this,c,h);f&&"playbackPositions"!=c&&this.trigger(l.G("playbackPositions"))};return a});define("mk",["require","fq","gD"],function(a){var d=a("fq"),l=a("gD");return d.define("HotspotPanoramaOverlayImage",l,function(){l.call(this)})});define("Z",["require","fq","gD"],function(a){var d=a("fq"),l=a("gD");return d.define("HotspotPanoramaOverlayMap",l,function(){l.call(this)})});
define("lX",["require"],function(){function a(g){var n={};g=g.split(",");for(var q=0;q<g.length;q++)n[g[q]]=!0;return n}var d=/^<([-A-Za-z0-9_]+:?[-A-Za-z0-9_]*)((?:\s+[-A-Za-z0-9_]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,l=/^<\/([-A-Za-z0-9_]+:?[-A-Za-z0-9_]*)[^>]*>/,m=/([-A-Za-z0-9_]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,k=a("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"),c=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"),
h=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"),f=a("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),b=a("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),e=a("script,style");return function(g,n){function q(w,x,y,z){x=x.toLowerCase();if(c[x])for(;r.last()&&h[r.last()];)p("",r.last());f[x]&&
r.last()==x&&p("",x);(z=k[x]||!!z)||r.push(x);if(n.start){var B=[];y.replace(m,function(D,F,A,E,J){D=A?A:E?E:J?J:b[F]?F:"";B.push({name:F,value:D,wia:D.replace(/(^|[^\\])"/g,'$1\\"')})});n.start&&n.start(x,B,z)}}function p(w,x){if(x)for(x=x.toLowerCase(),w=r.length-1;0<=w&&r[w]!=x;w--);else w=0;if(0<=w){for(x=r.length-1;x>=w;x--)n.end&&n.end(r[x]);r.length=w}}var r=[],t=g;for(r.last=function(){return this[this.length-1]};g;){var u=!0;if(r.last()&&e[r.last()])g=g.replace(new RegExp("(.*?)</"+r.last()+
"[^>]*>"),function(w,x){x=x.replace(/\x3c!--(.*?)--\x3e/g,"$1").replace(/<!\[CDATA\[(.*?)]]\x3e/g,"$1");n.CS&&n.CS(x);return""}),p("",r.last());else{if(0==g.indexOf("\x3c!--")){var v=g.indexOf("--\x3e");0<=v&&(n.A4a&&n.A4a(g.substring(4,v)),g=g.substring(v+3),u=!1)}else if(0==g.indexOf("</")){if(v=g.match(l))g=g.substring(v[0].length),v[0].replace(l,p),u=!1}else 0==g.indexOf("<")&&(v=g.match(d))&&(g=g.substring(v[0].length),v[0].replace(d,q),u=!1);u&&(v=g.indexOf("<"),u=0>v?g:g.substring(0,v),g=0>
v?"":g.substring(v),n.CS&&n.CS(u))}if(g==t)throw"Parse Error: "+g;t=g}p()}});
define("fL","require jquery.mod er lV pB cI gF w lX".split(" "),function(a){var d=a("jquery.mod");a("er");var l=a("lV"),m=a("pB"),k=a("cI"),c=a("gF"),h=a("w"),f=a("lX"),b=l.extend(c,function(e){c.call(this);this.Jf=d(e);this.WQ=[];this.Uz=null});b.prototype.F7a=function(e){e&&0<=e.toLowerCase().indexOf("<script")?h.ZK()==h.QM?this.gVa(e):this.fVa(e):this.eVa(e)};b.prototype.eVa=function(e){this.Jf.empty();e&&this.Jf.append(e);this.Xza()};b.prototype.gVa=function(e){this.Jf.empty();var g=this.Jf,n=
null,q=[],p=null;new f(e,{start:function(r,t,u){if("script"==r){u=void 0;for(var v=0;v<t.length&&void 0===u;v++){var w=t[v];"src"==w.name&&(u=w.value)}p={parent:g,previousSibling:n,src:u,content:""}}else{var x={};for(v=0;v<t.length;v++)w=t[v],x[w.name]=w.value;t=d("<"+r+"/>");t.attr(x);g.append(t);u?n=t:(g=t,n=null)}},CS:function(r){p?p.content+=r:g.append(r)},end:function(r){"script"==r?(q.push(p),p=null):(n=g,g=g.parent())}});this.WQ=q;this.VY()};b.prototype.fVa=function(e){function g(){q++;return n+
q}this.Jf.empty();var n="fragment_"+l.F9a(6)+"_",q=0,p=g(),r=[p],t=void 0,u=[],v=null,w="";new f(e,{start:function(z,B,D){if("script"==z){D=void 0;for(z=0;z<B.length&&void 0===D;z++){var F=B[z];"src"==F.name&&(D=F.value)}v={parentClsName:r[r.length-1],previousSiblingClsName:t,src:D,content:""}}else{w+="<"+z;var A=g(),E=!1;for(z=0;z<B.length;z++)F=B[z],"class"==F.name&&(F.wia+=" "+A,E=!0),w+=" "+F.name+'="'+F.wia+'"';E||(w+=' class="'+A+'"');D?(w+="/>",t=A):(w+=">",r.push(A),t=void 0)}},CS:function(z){v?
v.content+=z:w+=z},end:function(z){"script"==z?(u.push(v),v=null):(t=r[r.length-1],r.pop())}});this.Jf.get(0).innerHTML=w;this.Jf.addClass(p);for(e=0;e<u.length;e++){var x=u[e],y=x.parentClsName;delete x.parentClsName;t=x.previousSiblingClsName;delete x.previousSiblingClsName;x.parent=d("."+y);x.previousSibling=t?d("."+t):null}this.Jf.removeClass(p);this.WQ=u;this.VY()};b.prototype.VY=function(){if(!this.Uz)if(0<this.WQ.length){this.Uz=this.WQ[0];this.WQ.splice(0,1);var e=this.Uz.src;if(e){var g=
this;b.VVa(e,function(){g.Yta()},function(){g.bWa()})}else{var n=this.Uz.parent;e=this.Uz.previousSibling;var q=e?e.next():n.children(":first");e=document.write;document.write=q.length?function(p){q.before(p)}:function(p){n.append(p)};d.globalEval(this.Uz.content);document.write=e;this.Yta()}}else this.Xza()};b.prototype.bWa=function(){this.Uz=null;this.VY()};b.prototype.Yta=function(){this.Uz=null;this.VY()};b.prototype.Xza=function(){this.trigger(new k(m.Gb))};b.Wta={};b.VVa=function(e,g,n){b.Wta[e]?
g.call(window):d.ajax({url:e,async:!1,dataType:"script",error:n,success:function(){b.Wta[e]=!0;g.call(window)}})};return b});
define("nt",["require","lV","pB","cI","gF"],function(a){var d=a("lV"),l=a("pB"),m=a("cI"),k=a("gF");a=d.extend(k,function(c,h){k.call(this);this.pVa=c;this.V=h;this.yj=null});a.prototype.bind=function(){var c=k.prototype.bind.apply(this,arguments);this.$R();return c};a.prototype.unbind=function(){var c=k.prototype.unbind.apply(this,arguments);this.$R();return c};a.prototype.start=function(){this.V=!0;this.$R()};a.prototype.stop=function(){this.V=!1;this.$R()};a.prototype.jQ=function(){this.trigger(new m(l.Ke))};
a.prototype.$R=function(){if(this.V&&this.r3(l.Ke)){if(null==this.yj){var c=this;this.yj=setTimeout(function(){c.yj=null;c.jQ();c.$R()},this.pVa)}}else null!=this.yj&&(clearTimeout(this.yj),this.yj=null)};return a});
define("lU","require jquery.mod er lV pB iN nF e fL ec nt".split(" "),function(a){var d=a("jquery.mod"),l=a("er"),m=a("lV"),k=a("pB"),c=a("iN"),h=a("nF"),f=a("e"),b=a("fL"),e=a("ec");a=a("nt");var g=m.extend(f,function(){f.call(this);this.Re("HTML");this.zD=g.hW;this.rxa=this.sxa=0;this.gza=(new Date).getTime();this.xX=this.Vj=null;this.aI=this.aI.bind(this);this.y8=[]});g.prototype.yb=function(){f.prototype.yb.call(this);this.h("content");this.h("horizontalAlign",h.ab);this.h("verticalAlign",h.se);
this.h("fontFamily");this.h("fontSize");this.h("fontColor");this.h("fontWeight");this.h("fontStyle");this.h("textAlign");this.h("textDecoration");this.h("textShadowBlurRadius",3);this.h("textShadowColor","#000000");this.h("textShadowHorizontalLength",0);this.h("textShadowOpacity",0);this.h("textShadowVerticalLength",0)};g.prototype.Pt=function(q){this.mb&&c.get(this.mb).L9a(this.aI);f.prototype.Pt.call(this,q);this.mb&&(c.get(this.mb).r3a(this.aI),c.get(this.mb).bL(this.aI))};g.prototype.Hb=function(){f.prototype.Hb.call(this);
if(!this.xX){this.Vj=document.createElement("div");this.xX=d(this.Vj);this.p$({position:"absolute",display:"inline",left:0,top:0,"box-sizing":"border-box"});var q=this.Yb();q.tM(!1);q.append(this.xX);this.gta=new b(this.xX);this.gta.bind(k.Gb,this.UUa,this,!0);this.bind(k.tc,this.hta,this)}};g.prototype.bb=function(){var q={},p=!1;this.L("visible")&&(p=!0);this.L("content")&&(p=this.B("content"),this.gta.F7a(p),this.S("content"),p=!0);if(this.L("width")||this.L("height"))p=!0;this.L("fontFamily")&&
(p=this.B("fontFamily"),l(p).isString()||(p=""),q.fontFamily=e.$x(p),this.S("fontFamily"),p=!0);this.L("fontSize")&&(p=this.B("fontSize"),l(p).isNumber()?p+="px":l(p).isString()||(p=""),q.fontSize=p,this.S("fontSize"),p=!0);this.L("fontColor")&&(p=this.B("fontColor"),l(p).isString()||(p=""),q.color=p,this.S("fontColor"),p=!0);if(this.L("fontWeight")){p=this.B("fontWeight");switch(p){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:p="normal"}q.fontWeight=p;this.S("fontWeight");p=!0}if(this.L("fontStyle")){p=this.B("fontStyle");switch(p){case "italic":case "normal":break;default:p="normal"}q.fontStyle=p;this.S("fontStyle");p=!0}if(this.L("textDecoration")){p=this.B("textDecoration");switch(p){case "underline":case "overline":case "line-through":case "none":break;default:p="none"}q.textDecoration=p;this.S("textDecoration");p=!0}if(this.L("textAlign")){p=this.B("textAlign");switch(p){case "left":case "right":case "center":case "justify":break;
default:p=""}q["text-align"]=p;this.S("textAlign");p=!0}var r=["textShadowColor","textShadowHorizontalLength","textShadowVerticalLength","textShadowBlurRadius","textShadowOpacity"];if(l(r).any(function(u){return this.L(u)},this)){var t={};l(r).each(function(u){t[u]=this.B(u);this.S(u)},this);q["-moz-text-shadow"]=q["-webkit-text-shadow"]=q["text-shadow"]=[t.textShadowHorizontalLength+"px",t.textShadowVerticalLength+"px",t.textShadowBlurRadius+"px","rgba("+parseInt("0x"+t.textShadowColor.substr(1,
2))+", "+parseInt("0x"+t.textShadowColor.substr(3,2))+", "+parseInt("0x"+t.textShadowColor.substr(5,2))+", "+t.textShadowOpacity+")"].join(" ");r=0==t.textShadowVerticalLength&&0==this.B("textShadowHorizontalLength")?135:45*Math.round(4*Math.atan2(t.textShadowHorizontalLength,-t.textShadowVerticalLength)/Math.PI);q.filter="progid:DXImageTransform.Microsoft.Shadow(color=#"+("00"+(255*t.textShadowOpacity).toString(16)).slice(-2)+t.textShadowColor.substr(1,6)+",direction="+r+")"}l(["paddingTop","paddingRight",
"paddingBottom","paddingLeft"]).any(function(u){return this.L(u)},this)&&(p=!0);this.p$(q);f.prototype.bb.call(this);p&&this.Cua()};g.prototype.Cua=function(){this.hta();this.fc();this.B("visible")&&this.B("content")?this.$Q(g.Boa):this.$Q(g.hW)};g.prototype.fB=function(q,p){for(p=q.target;p&&"A"!=p.tagName&&"BUTTON"!=p.tagName;)p=p.parentElement;p=!p;f.prototype.fB.call(this,q,p)};g.prototype.Kw=function(){f.prototype.Kw.call(this);var q=this.Yb();this.cm=this.Vj.clientWidth+q.yL()+q.zL();this.bm=
this.Vj.clientHeight+q.AL()+q.vL()};g.prototype.Mya=function(q){this.Faa()!=q&&(this.Vj.style.paddingLeft=q+"px",this.fc())};g.prototype.Faa=function(){return parseInt(this.Vj.style.paddingLeft)||0};g.prototype.Oya=function(q){this.Haa()!=q&&(this.Vj.style.paddingTop=q+"px",this.fc())};g.prototype.Haa=function(){return parseInt(this.Vj.style.paddingTop)||0};g.prototype.Nya=function(q){this.Gaa!=q&&(this.Vj.style.paddingRight=q+"px",this.fc())};g.prototype.Gaa=function(){return parseInt(this.Vj.style.paddingRight)||
0};g.prototype.Lya=function(q){this.Eaa()!=q&&(this.Vj.style.paddingBottom=q+"px",this.fc())};g.prototype.Eaa=function(){return parseInt(this.Vj.style.paddingBottom)||0};g.prototype.UUa=function(){this.y8=Array.prototype.slice.call(this.Vj.querySelectorAll("*[style]")).map(function(q){var p={};p.Sr=q;p.style=q.getAttribute("style");return p}).filter(function(q){return n.test(q.style)}).map(function(q){for(var p=q.style,r=[];;){var t=n.exec(p);if(t)r.push(function(u){return function(){return u}}(p.substr(0,
t.index+1))),r.push(function(u,v){switch(v){case "vw":return function(w){return Math.round(w*u)+"px"};case "vh":return function(w,x){return Math.round(x*u)+"px"};case "vmin":return function(w,x,y){return Math.round(y*u)+"px"};case "vmax":return function(w,x,y){return Math.round(y*u)+"px"}}}(parseFloat(t[1]),t[3].toLowerCase())),p=p.substr(t.index+t[0].length);else return r.push(function(u){return function(){return u}}(p)),q.functions=r,q}});this.mb&&c.get(this.mb).bL(this.aI)};g.prototype.aI=function(q,
p,r,t){0!=this.y8.length&&(this.y8.forEach(function(u){var v=u.functions.map(function(w){return w(q,p,r,t)}).join("");u.Sr.setAttribute("style",v)}),this.Cua())};g.prototype.hta=function(){var q={width:"auto",height:"auto"},p=this.Yb();if(!this.Saa()){this.cm!=this.sa&&this.fc();var r=this.sa-(p.yL()+p.zL());0<r&&(q.width=r+"px")}this.bta()||(this.bm!=this.wa&&this.fc(),p=this.wa-(p.AL()+p.vL()),0<p&&(q.height=p+"px"));this.p$(q)};g.prototype.dva=function(){var q=this.Vj.clientWidth,p=this.Vj.clientHeight;
this.sxa!=q||this.rxa!=p?(this.sxa=q,this.rxa=p,this.fc(),this.$Q(g.Boa)):(q=(new Date).getTime()-this.gza,q>g.QNa?this.$Q(g.DNa):q>g.PNa&&this.$Q(g.CNa))};g.prototype.eZa=function(){this.gza=(new Date).getTime()};g.prototype.$Q=function(q){this.zD==g.rdb&&this.eZa();this.zD!=q&&(this.zD!=g.hW&&g.kqa[this.zD].unbind(k.Ke,this.dva,this),this.zD=q,this.zD!=g.hW&&g.kqa[this.zD].bind(k.Ke,this.dva,this,!0))};g.prototype.p$=function(q){var p=this.Vj.style,r;for(r in q)p[r]=q[r]};var n=/[^\d]((\d*\.)?\d+)\s*(vmin|vmax|vw|vh)/i;
g.hW="stopped";g.DNa="slow";g.CNa="normal";g.Boa="fast";g.QNa=3E4;g.PNa=5E3;g.kqa={slow:new a(2E3,!0),normal:new a(500,!0),fast:new a(100,!0)};return g});define("kN",["require","lU","fq"],function(a){var d=a("lU");return a("fq").define("HTML",d,function(){d.call(this)})});define("b",["require","er","lV","T","d"],function(a){var d=a("er"),l=a("lV"),m=a("T");a=a("d");var k=l.extend(m,function(){m.call(this)});k.Ic={layout:a.sV};d.defaults(k.Ic,m.Ic);k.prototype.yb=function(){this.Io(k.Ic)};return k});
define("jr",["require","lV","il","b","lU"],function(a){var d=a("lV"),l=a("il"),m=a("b"),k=a("lU");a=d.extend(m,function(){m.call(this);this.kA=null;this.set("contentOpaque",!0)});a.prototype.yb=function(){m.prototype.yb.call(this);this.h("overflow",l.mq);this.h("html")};a.prototype.Hb=function(){m.prototype.Hb.call(this);null==this.kA&&(this.kA=new k,this.kA.ra({left:0,toolTipDisabled:!0}),this.Za(this.kA))};a.prototype.bb=function(){this.L("html")&&(this.kA.set("content",this.B("html")),this.S("html"));
this.xc(["paddingLeft","paddingTop","paddingRight","paddingBottom"],{},[this.kA],!0,!0);this.xc(["cursor"],{},[this.kA],!0,!1);m.prototype.bb.call(this);this.kA.set("width",this.Saa()?void 0:"100%")};return a});define("bD",["require","jr","fq"],function(a){var d=a("jr");return a("fq").define("HTMLText",d,function(){d.call(this)})});
define("my","require jquery.mod lV pB cI mV hM bi mN hh eo nk".split(" "),function(a){function d(r,t,u){return function(v){var w="mouse"==t?this.eA(v):this.bE(v);this.Cta(w)?r.call(this,v):"release"==u?r.call(this,v):this.LSa(w,v)}}var l=a("jquery.mod"),m=a("lV"),k=a("pB"),c=a("cI"),h=a("mV"),f=a("hM"),b=a("bi"),e=a("mN"),g=a("hh"),n=a("eo"),q=a("nk"),p=h.Fj("debug");a=m.extend(q,function(){this.Re("Button");q.call(this,3);this.set("ariaRole","button");this.set("autoRolledOver",!0);this.set("autoPressed",
!0);this.set("cursor",b.Le);this.set("scaleMode",e.Uh);this.t9=document.createElement("canvas");this.t9.width=1;this.t9.height=1;this.u9=this.t9.getContext("2d");this.u9.globalCompositeOperation="copy";this.Z$=!1;this.bind(k.Jb,this.YUa,this)});a.prototype.yb=function(){q.prototype.yb.call(this);this.h("buttonGroup");this.h("mode",n.Me);this.h("pressed");this.h("iconURL");this.h("transparencyActive");this.A("rollOverOpacity",g.aa,"opacity");this.A("rollOverIconURL",g.aa,"iconURL");this.A("pressedOpacity",
g.Bb,"opacity");this.A("pressedIconURL",g.Bb,"iconURL");this.A("pressedRollOverOpacity",g.lc,"opacity");this.A("pressedRollOverIconURL",g.lc,"iconURL")};a.prototype.gaa=d(q.prototype.gaa,"touch","capture");a.prototype.Vra=d(q.prototype.PSa,"touch");a.prototype.Xra=d(q.prototype.PSa,"touch","release");a.prototype.Vfa=d(q.prototype.Vfa,"touch","capture");a.prototype.Ufa=d(q.prototype.Ufa,"touch");a.prototype.fB=d(q.prototype.fB,"touch","release");a.prototype.Aca=d(q.prototype.Aca,"mouse","capture");
a.prototype.Eca=function(r){var t=this.eA(r);if(this.Cta(t)||this.Z$)q.prototype.Eca.call(this,r),q.prototype.set.call(this,"cursor",this.$qa);else{this.Z$=!0;if(t=this.Asa(t))l(t).trigger(this.vqa(r)),r.preventDefault(),r.stopImmediatePropagation();"pointer"==this.tsa(t)?q.prototype.set.call(this,"cursor",b.Le):q.prototype.set.call(this,"cursor",b.Ke);this.Z$=!1}};a.prototype.YUa=function(){q.prototype.set.call(this,"cursor",this.$qa)};a.prototype.lZ=d(q.prototype.lZ,"mouse","release");a.prototype.Cta=
function(r){if(!this.ic)return!1;if(this.get("transparencyActive"))return!0;var t=this.mb?this.mb.JA:1,u=this.ic.offset(),v=(r.PB-u.left)/t,w=this.ic.width();r=(r.QB-u.top)/t;t=this.ic.height();if(0<=v&&0<=r&&v<w&&r<t){if(p)return!0;v=v*this.IJ/w;w=r*this.HJ/t;this.u9.drawImage(this.ic.get(0),v,w,1,1,0,0,1,1);if(0<this.u9.getImageData(0,0,1,1).data[3])return!0}return!1};a.prototype.LSa=function(r,t){if(r=this.Asa(r))l(r).trigger(this.vqa(t)),t.preventDefault(),t.stopImmediatePropagation()};a.prototype.Asa=
function(r){this.Xd().style.pointerEvents="none";r=document.elementFromPoint(r.PB,r.QB);setTimeout(function(){this.Xd().style.pointerEvents=this.Psa()}.bind(this),0);return r};a.prototype.vqa=function(r){return l.extend(l.Event(r.type),{originalEvent:r.originalEvent,wheelDelta:r.wheelDelta,detail:r.detail,which:1,clientX:r.clientX,clientY:r.clientY,pageX:r.pageX,pageY:r.pageY,screenX:r.screenX,screenY:r.screenY})};a.prototype.tsa=function(r){if(r){var t=r.style.cursor;"inherit"==t&&(t=this.tsa(r.parentElement))}else t=
"default";return t};a.prototype.HN=function(){this.get("pressed")?(this.set("pressed",!1),this.trigger(new c(k.Hl))):(this.set("pressed",!0),this.trigger(new c(k.Oj)))};a.prototype.set=function(r,t){"cursor"===r&&(this.$qa=t);return q.prototype.set.call(this,r,t)};a.prototype.bb=function(){var r=!1;if(this.L("backgroundOpacityy")||this.L("backgroundColor"))r=!0;if(this.L("iconURL")){var t=this.B("iconURL");this.set("url",t);this.S("iconURL")}t=!1;this.L("mode")&&(this.B("mode")==n.Me?(this.unbind(k.ma,
this.HN,this,!0),this.set("autoPressed",!0)):(this.bind(k.ma,this.HN,this,!0),this.set("autoPressed",!1)),this.S("mode"),t=!0);if(t||this.L("pressed"))this.B("mode")==n.Rj?this.lK(1==this.B("pressed")):t&&this.lK(!1);this.L("buttonGroup")&&((t=this.B("buttonGroup"))?f.register(this,t):f.unregister(this),this.S("buttonGroup"));q.prototype.bb.call(this);r&&(r=this.dd(),0==r.kl()||0==r.FD.length)&&(r.Oh(.001),r.GIa(["#000000"]))};return a});
define("bs",["require","my","fq"],function(a){var d=a("my");return a("fq").define("IconButton",d,function(){d.call(this)})});define("nV",["require","fq","iO"],function(a){var d=a("fq"),l=a("iO");return d.define("IconHotspotMapOverlay",l,function(){l.call(this,!1)})});define("oS",["require","nk","fq"],function(a){var d=a("nk");a=a("fq").define("Image",d,function(){d.call(this)});a.prototype.set=function(l,m){d.prototype.set.call(this,l,m)};return a});
define("jF",["require","fq","pW"],function(a){var d=a("fq"),l=a("pW");return d.define("ImagePlaneModel3DObject",l,function(){l.call(this)})});define("mh",["require","fq","jf"],function(a){var d=a("fq"),l=a("jf");return d.define("InnerModel3DObject",l,function(){l.call(this)})});define("jK",["require","oU","fq"],function(a){var d=a("oU");return a("fq").define("Label",d,function(){d.call(this)})});
define("bS",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("LensFlarePanoramaOverlay",d,function(){d.call(this)})});define("cR",["require","fq","jf"],function(a){var d=a("fq"),l=a("jf");return d.define("LineModel3DObject",l,function(){l.call(this)})});define("pb",["require","fq","fn"],function(a){var d=a("fq"),l=a("fn");a=d.define("LivePanorama",l,function(){l.call(this)});a.prototype.fT=function(){return this.get("initialFrameIndex",0)};return a});
define("jZ",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("Light",d,function(){d.call(this)})});
define("dh",["require","lV","ix"],function(a){var d=a("lV"),l=a("ix");a=d.extend(l,function(m,k,c,h,f,b,e){l.call(this,l.qoa);this.v=m;this.Wd=k;this.sa=c;this.wa=h;this.Rf=f;this.U$=b;this.Wo=e.slice()});a.prototype.Du=function(){for(var m=[this.Wd],k=0;k<this.Wo.length;k++)m=m.concat(this.Wo[k].Du());return m};a.prototype.Yi=function(){return this.Wd};a.prototype.Fe=function(){return this.sa};a.prototype.Ve=function(){return this.wa};return a});
define("nR","require fq mN ey gx dh".split(" "),function(a){var d=a("fq"),l=a("mN"),m=a("ey"),k=a("gx"),c=a("dh");a=d.define("Map",m,function(){m.call(this);this.Hw=this.FQ=void 0});a.prototype.f$a=function(){this.Hw=this.FQ=void 0};a.prototype.DL=function(){return!(!this.get("image")||!k.DL(this.get("image")))};a.prototype.gG=function(){return this.get("image")&&k.gG(this.get("image"))};a.prototype.Zr=function(){return this.get("image")&&k.Zr(this.get("image"))};a.prototype.bEa=function(){void 0==
this.FQ&&(this.DL()?this.FQ=new c(this,this.gG().get("url"),this.get("width"),this.get("height"),this.get("scaleMode",l.wC),this.get("flipImageHorizontally",!1),[]):this.FQ=null);return this.FQ};a.prototype.nk=function(){if(void 0==this.Hw)if(this.get("image")){var h=Array.prototype.concat.apply([],this.get("overlays",[]).map(function(f){return f.o6a()}));this.Hw=new c(this,this.Zr().get("url"),this.get("width"),this.get("height"),this.get("scaleMode",l.wC),this.get("flipImageHorizontally",!1),h)}else this.Hw=
null;return this.Hw};a.prototype.Bu=function(){return[].concat(this.$X(this.bEa()),this.$X(this.nk()))};a.prototype.$X=function(h){return h?h.Du():[]};return a});define("lH",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("MapOverlay",d,function(){d.call(this)})});
define("km","require lV er pB cI gF eo hh".split(" "),function(a){var d=a("lV"),l=a("er"),m=a("pB"),k=a("cI"),c=a("gF"),h=a("eo"),f=a("hh");a=d.extend(c,function(b,e,g){c.call(this);this.zqa=b;this.tYa=e;this.Opa=g||h.Me;this.jj=[];this.uD=[];this.Hz={};this.Hz.mode=this.Opa;this.Opa==h.Rj&&(this.Hz.pressed=!1);this.zqa.bind(m.G(e),this.Exa,this);this.Exa()});a.prototype.Exa=function(){var b=this.zqa.get(this.tYa);b||(b=[]);l.isArray(b)||(b=[b]);this.SZa(b)};a.prototype.SZa=function(b){var e=l.difference(this.jj,
b);l(e).each(function(g){g.unbind(m.Oj,this.Rpa,this,!0);g.unbind(m.Hl,this.Spa,this,!0);g.unbind(m.ma,this.Npa,this,!0);g.unbind(m.hb,this.Ppa,this,!0);g.unbind(m.Eb,this.Qpa,this,!0);g.unbind(m.Gc,this.Upa,this,!0);g.unbind(m.Jb,this.Tpa,this,!0)},this);e=l.difference(b,this.jj);l(e).each(function(g){g.ra(this.Hz);g.bind(m.Oj,this.Rpa,this,!0);g.bind(m.Hl,this.Spa,this,!0);g.bind(m.ma,this.Npa,this,!0);g.bind(m.hb,this.Ppa,this,!0);g.bind(m.Eb,this.Qpa,this,!0);g.bind(m.Gc,this.Upa,this,!0);g.bind(m.Jb,
this.Tpa,this,!0)},this);this.jj=b;this.uD=this.uD.filter(function(g){return 0<=this.jj.indexOf(g)}.bind(this))};a.prototype.Rpa=function(){this.trigger(new k(m.Oj))};a.prototype.Spa=function(){this.trigger(new k(m.Hl))};a.prototype.Npa=function(){this.trigger(new k(m.ma))};a.prototype.Ppa=function(){this.trigger(new k(m.hb))};a.prototype.Qpa=function(){this.trigger(new k(m.Eb))};a.prototype.Upa=function(b){this.uD.push(b.source);this.el()};a.prototype.Tpa=function(b){this.uD=this.uD.filter(function(e){return e!=
b.source});this.el()};a.prototype.set=function(b,e){this.Hz[b]=e;this.jj.forEach(function(g){g.ra(this.Hz)}.bind(this));this.el()};a.prototype.el=function(){this.jj.forEach(function(b){b.get("state")==f.Bb&&0<=this.uD.indexOf(b)?b.set("state",f.lc):b.get("state")==f.lc&&0>this.uD.indexOf(b)&&b.set("state",f.Bb)}.bind(this))};return a});
define("lh",["require","exports","lV","z"],function(a,d,l,m){var k=function(){return function(){}}();return function(){function c(){}c.da=function(h,f,b,e){this.gpa(h,f,b,e,!1)};c.ju=function(h,f,b,e){this.gpa(h,f,b,e,!0)};c.gpa=function(h,f,b,e,g){function n(){for(var r=[],t=0;t<f.length;t++)try{r.push(h.get(f[t]))}catch(u){r.push(void 0),l.JT("BindingsHandler._addBinding",u)}b.apply(this,r)}f=l.toArray(f);g&&(n=l.Ip(n));var q=[];f.forEach(function(r){(r=m.Zu(h,r,n,this,!g))&&q.push(r)},this);var p=
new k;p.idb=q;p.host=h;p.properties=f;p.xT=b;this.Jha.push(p);e&&n()};c.ca=function(h,f,b){var e=[];this.Jha.forEach(function(g){g.xT==b&&g.host==h&&l.o7a(g.properties,l.toArray(f))?g.idb.forEach(function(n){n.mC()}):e.push(g)});this.Jha=e};c.Jha=[];return c}()});
define("gK","require er lV pB cI hh bi b e og oB".split(" "),function(a){var d=a("er"),l=a("lV"),m=a("pB"),k=a("cI"),c=a("hh"),h=a("bi"),f=a("b"),b=a("e");a("og");a("oB");var e=l.extend(f,function(){f.call(this);this.Re("PlaybackBar");this.nm=this.lg=null;this.hh=[];this.G_=!1;this.Rda=this.SE=void 0;this.Afa=!1});e.Ic={cursor:h.Le,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};d.defaults(e.Ic,f.Ic);e.prototype.yb=function(){this.Io(e.Ic)};e.prototype.Hb=function(){f.prototype.Hb.call(this);this.lg&&this.nm||
this.bind(m.tc,this.fYa,this,!0);null==this.lg&&(this.lg=new b,this.lg.ra({left:"0",height:"100%",cursor:h.Le}),this.Za(this.lg));null==this.nm&&(this.nm=new b,this.nm.ra({left:"0",cursor:h.Le}),this.nm.bind(m.tc,this.iYa,this,!0),this.nm.bind(m.hb,this.gYa,this,!0),this.Db().bind(m.Pb,this.kxa,this,!0),this.bind(m.ma,this.dYa,this,!0),this.nm.bind(m.Eb,this.hYa,this,!0),this.Za(this.nm));var n=this.get("steps")||0;if(this.hh.length!=n){for(;this.hh.length>n;)this.FRa(this.hh.pop());for(;this.hh.length<
n;)this.hh.push(this.wRa());this.xc(e.Yoa,e.e8,this.hh,!1,!0);this.RAa();this.Lga();this.io(this.nm,this.rb().length-1)}};e.prototype.wRa=function(){var n=new g;n.ra({cursor:h.Le});n.bind(m.ma,this.pza,this,!0);n.bind(m.tc,this.qza,this,!0);this.Za(n);return n};e.prototype.FRa=function(n){n.unbind(m.ma,this.pza,this,!0);n.unbind(m.tc,this.qza,this,!0);this.removeChild(n)};e.prototype.bb=function(){var n=!1;if(this.L("position")||this.L("duration"))this.S("position"),this.S("duration"),n=!0;this.L("selectedStep")&&
(this.S("selectedStep"),this.RAa());this.L("steps")&&(this.S("steps"),this.CT());this.xc(e.X7,e.nN,[this.lg],!0,!0);this.xc(e.MNa,e.Uoa,[this.nm],!0,!0);this.xc(e.Yoa,e.e8,this.hh,!0,!0);f.prototype.bb.call(this);n&&this.B1()};e.prototype.RAa=function(){var n=this.get("selectedStep");this.hh.forEach(function(q,p){q.TU(p===n)});this.nm.set("visible",void 0===n)};e.prototype.B1=function(){var n=this.Wa(),q=this.nm.Wa(),p=this.nm.Ab(),r=this.vO(),t=this.Lq(),u=t*n/r;n=Math.round((this.G_?this.SE:t)*
n/r-.5*q);n=Math.max(0,Math.min(n,this.Bf()-q));q=Math.round(.5*this.Af()-.5*p);this.nm.ra({left:n,top:q});this.lg.set("width",Math.round(u))};e.prototype.iYa=function(){this.B1()};e.prototype.gYa=function(n){this.G_=!0;this.Rda=n.pageX;this.SE=this.B("position")};e.prototype.kxa=function(n){if(this.G_){var q=n.pageX-this.Rda;this.Rda=n.pageX;n=this.Wa();var p=this.vO();this.SE=Math.max(0,Math.min(p,this.SE+p*q/n));this.B1();this.get("liveDragging")&&(this.set("position",this.SE),this.trigger(new k(m.ba)))}};
e.prototype.hYa=function(n){this.kxa(n);this.G_=!1;this.get("liveDragging")||(this.set("position",this.SE),this.trigger(new k(m.ba)));this.SE=void 0};e.prototype.dYa=function(n){if(!this.Afa){var q=this.Wa(),p=this.vO();this.set("position",p*n.x/q);this.trigger(new k(m.ba))}};e.prototype.qza=function(){this.Lga()};e.prototype.fYa=function(){this.Lga();this.B1()};e.prototype.Lga=function(){for(var n=this.Wa(),q=this.Ab(),p=this.Na,r=this.getParent().Wa()-(p+n),t=0,u=this.hh.length;t<u;t++){var v=this.hh[t],
w=v.Wa();v.ra({left:0==t&&0==p?0:t==u-1&&0==r?n-w:Math.round(n*t/(u-1)-.5*w),top:Math.round(.5*q-.5*v.Ab())})}};e.prototype.pza=function(n){n=this.hh.indexOf(n.source);var q=this.vO();this.set("position",q*n/(this.hh.length-1));this.Afa=!0;this.trigger(new k(m.ba));setTimeout(function(){this.Afa=!1}.bind(this),0)};e.prototype.vO=function(){var n=this.B("duration");return n?n:1};e.prototype.Lq=function(){return Math.max(0,Math.min(this.vO(),this.B("position")))};e.nN={barBackgroundColor:"backgroundColor",
barBackgroundColorDirection:"backgroundColorDirection",barBackgroundColorRatios:"backgroundColorRatios",barBorderColor:"borderColor",barBorderRadius:"borderRadius",barBorderSize:"borderSize",barOpacity:"opacity"};e.X7=d(e.nN).keys();e.Uoa={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"};e.MNa=d(e.Uoa).keys();e.e8={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"};e.Yoa=d(e.e8).keys();var g=l.extend(b,function(){b.call(this)});g.prototype.TU=function(n){this.gR(n)};g.prototype.yb=function(){b.prototype.yb.call(this);this.h("backgroundColor");this.h("backgroundColorDirection");this.h("backgroundColorRatios");this.h("borderColor");this.h("borderRadius");this.h("borderSize");this.h("opacity");this.h("width");
this.h("height");this.h("shadow");this.h("shadowBlurRadius");this.h("shadowColor");this.h("shadowHorizontalLength");this.h("shadowOpacity");this.h("shadowSpread");this.h("shadowVerticalLength");this.A("selectedBackgroundColor",c.ka,"backgroundColor");this.A("selectedBackgroundColorDirection",c.ka,"backgroundColorDirection");this.A("selectedBackgroundColorRatios",c.ka,"backgroundColorRatios");this.A("selectedBorderColor",c.ka,"borderColor");this.A("selectedBorderRadius",c.ka,"borderRadius");this.A("selectedBorderSize",
c.ka,"borderSize");this.A("selectedOpacity",c.ka,"opacity");this.A("selectedWidth",c.ka,"width");this.A("selectedHeight",c.ka,"height");this.A("selectedShadow",c.ka,"shadow");this.A("selectedShadowBlurRadius",c.ka,"shadowBlurRadius");this.A("selectedShadowColor",c.ka,"shadowColor");this.A("selectedShadowHorizontalLength",c.ka,"shadowHorizontalLength");this.A("selectedShadowOpacity",c.ka,"shadowOpacity");this.A("selectedShadowSpread",c.ka,"shadowSpread");this.A("selectedShadowVerticalLength",c.ka,
"shadowVerticalLength")};g.prototype.bb=function(){b.prototype.bb.call(this)};return e});
define("B",["require","er","lV","b","e"],function(a){var d=a("er"),l=a("lV"),m=a("b"),k=a("e"),c=l.extend(m,function(){m.call(this);this.Re("ProgressBar")});c.Ic={percent:0,backgroundColor:"#000000",barBackgroundColor:"#FFFFFF",barBackgroundColorDirection:void 0,barBackgroundColorRatios:void 0,barBorderColor:void 0,barBorderRadius:void 0,barBorderSize:void 0,barOpacity:void 0};d.defaults(c.Ic,m.Ic);c.prototype.yb=function(){this.Io(c.Ic)};c.prototype.Hb=function(){m.prototype.Hb.call(this);null==
this.lg&&(this.lg=new k,this.lg.ra({left:"0",width:"0%",height:"100%"}),this.Za(this.lg))};c.prototype.bb=function(){this.L("percent")&&(this.lg.set("width",Math.round(this.B("percent"))+"%"),this.S("percent"));this.xc(c.X7,c.nN,[this.lg],!0,!0);m.prototype.bb.call(this)};c.nN={barBackgroundColor:"backgroundColor",barBackgroundColorDirection:"backgroundColorDirection",barBackgroundColorRatios:"backgroundColorRatios",barBorderColor:"borderColor",barBorderRadius:"borderRadius",barBorderSize:"borderSize",
barOpacity:"opacity"};c.X7=d(c.nN).keys();return c});
define("gz","require mq w iF mV nO".split(" "),function(a){var d=a("mq"),l=a("w"),m=a("iF"),k=a("mV"),c=a("nO"),h={Ieb:function(p){return this.NL(p)||this.oFa(p)?!0:!1},Av:function(){var p=l.B9a();h.Av=function(){return p};return p},oFa:function(p){return"string"==typeof p&&m.is(p,m.wo)?!0:!1},Deb:function(p){return this.vja(p)||this.wja(p)?!0:!1},wja:function(p){return"string"==typeof p&&(m.is(p,m.oMa)||m.BB(p,m.pMa))?!0:!1},NL:function(p){return!!p&&!!p.tagName&&"VIDEO"==p.tagName},HL:function(p){return"string"==
typeof p&&m.is(p,m.HLS)||this.NL(p)&&m.is(p.currentSrc,m.HLS)?!0:!1},Hm:function(p){return"string"==typeof p&&m.is(p,m.wo)||this.NL(p)&&m.is(p.currentSrc,m.wo)?!0:!1},vja:function(p){return!!p&&!!p.tagName&&"IMG"==p.tagName},I7a:function(p){return!!p&&!!p.tagName&&"CANVAS"==p.tagName},yeb:function(p){return Math.pow(2,Math.round(Math.log(p)/Math.LN2))},Feb:function(p){return 0!==p&&0===(p&p-1)},dFa:function(){return l.browser()==l.Mj},Eeb:function(){return l.browser()==l.Yy},Bp:function(){return l.zd()==
l.yi}},f=l.zd()==l.Vy&&!l.Ef()&&11>l.N3a();h.hLa=function(p){return e||f&&p&&.2>p.currentTime?!0:!1};h.OEa=function(){return h.dFa()||h.Bp()};h.NEa=function(){return h.Bp()&&d.v7a&&11>l.jja()};var b=!1;h.$Ea=function(){b=!1};h.J7a=function(){return b};h.C$a=function(){b=!0};var e=k.Fj("vic");h.u9a=function(){h.Bp()&&(e=!0)};h.dEa=function(){return{alpha:!0,depth:!0,stencil:!1,antialias:d.d4a()?!0:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"high-performance",xrCompatible:!h.dFa()}};
h.$4a=function(p){if(2==d.EHa){var r=h.dEa();r=p.getContext("webgl2",r)}r||(r=h.dEa(),r=p.getContext("webgl",r)||p.getContext("experimental-webgl",r));return r};h.cia=function(p,r){r||(r=p.getSize(new THREE.Vector2));p=new THREE.WebGLRenderTarget(r.width,r.height,{minFilter:THREE.LinearFilter,magFilter:THREE.LinearFilter,format:THREE.RGBAFormat,type:THREE.HalfFloatType,samples:p.capabilities.isWebGL2?l.pb()?2:8:0});p.depthTexture=new THREE.DepthTexture;return p};h.Z4a=function(p){return new THREE.WebGLCubeRenderTarget(p,
{minFilter:THREE.LinearFilter,magFilter:THREE.LinearFilter,format:THREE.RGBAFormat,type:THREE.HalfFloatType})};h.getPixelRatio=function(){if(l.pb()){var p=0,r=0;try{p=window.top.innerWidth,r=window.top.innerHeight}catch(t){if(l.zd()==l.Vy&&1<window.devicePixelRatio)return window.devicePixelRatio}p=[Math.max(document.documentElement.clientWidth,p),Math.max(document.documentElement.clientHeight,r)].sort(function(t,u){return u-t});p=[q[0]/p[0],q[1]/p[1]].sort()[0];if(Infinity!==p)return p}else if(l.zd()==
l.hna&&l.browser()==l.po)return 1;return window.devicePixelRatio};h.ADa=function(p){if(!l.pb()||l.zd()!=l.Vy||!c.enabled()||!p)return h.getPixelRatio();p=[p.clientWidth,p.clientHeight].sort(function(r,t){return t-r});return[q[0]/p[0],q[1]/p[1]].sort()[0]};var g=!1,n=[];h.l5=function(p){g=p;n.forEach(function(r){r(p)})};h.K3a=function(p){n.push(p)};h.e8a=function(){return g};var q=[screen.width*window.devicePixelRatio,screen.height*window.devicePixelRatio].sort(function(p,r){return r-p});return h});
define("hV",["require","gz"],function(a){return a("gz")});define("nb",["require","exports"],function(){return function(){return function(){this.sB=this.nL=void 0}}()});
define("eS",["require","exports","hV","three.mod"],function(a,d,l,m){a=function(){function c(h,f,b,e){this.state=h;this.renderer=f;this.scene=b;this.camera=e;this.aia()}c.prototype.dispose=function(){this.Uha()};c.prototype.update=function(h,f){if(void 0!==this.state.sB)if(this.Lh.material.opacity=1-this.state.sB,h=null!=f.parent?f:h,this.Lh.parent!==h&&h.add(this.Lh),f.isPerspectiveCamera){this.Lh.position.z=1.01*-f.near;var b=this.renderer.getSize(new m.Vector2),e=b.height;h=this.I2.width;var g=
this.I2.height;f=e/(2*Math.tan(f.fov*k/2));f=Math.max(e/f,b.width/(f*h/g));this.Lh.scale.y=f;this.Lh.scale.x=f*h/g}else f.isOrthographicCamera&&(this.Lh.position.z=-(f.near+.1),this.renderer.getSize(new m.Vector2),this.Lh.scale.y=f.top-f.bottom,this.Lh.scale.x=f.right-f.left)};c.prototype.qf=function(){return this.scene};c.prototype.aia=function(){this.I2=this.k4a();this.Lh=this.R4a(this.I2)};c.prototype.k4a=function(){this.renderer.Bm=!0;var h=l.cia(this.renderer),f=this.renderer.getRenderTarget();
this.renderer.setRenderTarget(h);this.renderer.render(this.scene,this.camera);this.renderer.setRenderTarget(f);this.renderer.Bm=!1;return h};c.prototype.R4a=function(h){h=new m.SpriteMaterial({map:h.texture});h.sizeAttenuation=!1;h.transparent=!0;h.visible=!0;h.opacity=1;h.depthTest=!1;h.needsUpdate=!0;h=new m.Sprite(h);h.renderOrder=1E3;return h};c.prototype.Uha=function(){var h,f,b,e=this.Lh.material;null===(h=e.map)||void 0===h?void 0:h.dispose();null===(f=e.envMap)||void 0===f?void 0:f.dispose();
e.dispose();this.Lh.geometry.dispose();this.I2.dispose();null===(b=this.Lh.parent)||void 0===b?void 0:b.remove(this.Lh)};return c}();var k=Math.PI/180;return a});
define("mn",["require","exports","hV","kQ","three.mod"],function(a,d,l,m,k){a=function(){function f(b,e,g,n){this.state=b;this.renderer=e;this.scene=g;this.camera=n;this.aia();this.W4a()}f.prototype.dispose=function(){this.Uha();this.v4a()};f.prototype.update=function(){var b=void 0===this.state.sB?0:1-this.state.sB,e=void 0===this.state.nL?1:1-this.state.nL;b*=e;this.oL.material.opacity=1*e;this.Lh.children.forEach(function(g){g.material.opacity=b})};f.prototype.qf=function(){return this.scene};
f.prototype.aia=function(){this.Lh||(this.dDa=this.l4a(),this.Lh=this.F4a(this.dDa),m.Yn.add(this.Lh))};f.prototype.l4a=function(){var b=new k.Vector2(1024,1024),e=this.camera,g=this.renderer,n=this.scene,q=g.getRenderTarget(),p=g.getActiveCubeFace(),r=g.getActiveMipmapLevel(),t=g.xr.enabled,u=new k.PerspectiveCamera(90,1,e.near,e.far);u.matrixAutoUpdate=!1;u.layers=e.layers;this.renderer.Bm=!0;g.xr.enabled=!1;m.Yn.add(u);e=c.map(function(v){var w=l.cia(g,b);u.matrix.identity();u.matrix.multiply(h.makeRotationFromEuler(v));
u.updateMatrixWorld();g.setRenderTarget(w,0,0);g.render(n,u);return w});g.setRenderTarget(q,p,r);g.xr.enabled=t;this.renderer.Bm=!1;m.Yn.remove(u);return e};f.prototype.F4a=function(b){var e=new k.Group;c.forEach(function(g,n){var q=new k.PlaneGeometry(2,2);n=new k.MeshBasicMaterial({side:k.DoubleSide,depthTest:!1,transparent:!0,map:b[n].texture});q=new k.Mesh(q,n);q.matrixAutoUpdate=!1;q.renderOrder=1001;q.userData.f4=!0;q.matrix.identity();q.matrix.multiply(h.makeRotationFromEuler(g));q.matrix.multiply(h.makeTranslation(0,
0,-1));e.add(q)});return e};f.prototype.Uha=function(){var b;this.Lh.children.forEach(function(e){var g,n;e.material.dispose();null===(g=e.geometry)||void 0===g?void 0:g.dispose();null===(n=e.parent)||void 0===n?void 0:n.remove(e)});this.dDa.forEach(function(e){e.texture.dispose();e.dispose()});null===(b=this.Lh.parent)||void 0===b?void 0:b.remove(this.Lh)};f.prototype.W4a=function(){var b=new k.SphereGeometry(1,32,16,0,2*Math.PI,0,Math.PI),e=new k.MeshBasicMaterial({color:0,side:k.DoubleSide,depthTest:!1,
transparent:!0});b=new k.Mesh(b,e);b.renderOrder=1E3;b.userData.f4=!0;this.oL=b;m.Yn.add(this.oL)};f.prototype.v4a=function(){var b;this.oL.material.dispose();this.oL.geometry.dispose();null===(b=this.oL.parent)||void 0===b?void 0:b.remove(this.oL)};return f}();var c=[new k.Euler(0,0,0,"YXZ"),new k.Euler(0,-.5*Math.PI,0,"YXZ"),new k.Euler(0,-Math.PI,0,"YXZ"),new k.Euler(0,.5*Math.PI,0,"YXZ"),new k.Euler(.5*Math.PI,0,0,"YXZ"),new k.Euler(-.5*Math.PI,0,0,"YXZ")],h=new k.Matrix4;new k.Euler;return a});
define("jq","require exports pB nb eS mn kQ w ni".split(" "),function(a,d,l,m,k,c,h,f,b){return function(){function e(g){this.y5=this.x5=this.A5=this.B5=this.z5=this.C5=void 0;this.us=null;this.zja=!1;this.VS=void 0;this.renderer=g;this.Vu=new m;this.cHa=this.renderer.render.bind(g);this.renderer.render=this.render.bind(this);this.eHa=this.renderer.setSize.bind(g);this.renderer.setSize=this.setSize.bind(this);this.j9a=this.renderer.clear.bind(g);this.renderer.clear=this.clear.bind(this);this.dHa=
this.renderer.setRenderTarget.bind(g);this.renderer.setRenderTarget=this.setRenderTarget.bind(this);h.N.bind(l.ba,this.ze,this,!0);window.startFadeOut=this.dH.bind(this);window.setFadeOutPosition=this.TG.bind(this);window.endFadeOut=this.YF.bind(this)}e.prototype.dispose=function(){var g;h.N.unbind(l.ba,this.ze,this);null===(g=this.us)||void 0===g?void 0:g.dispose()};e.prototype.setSize=function(g,n,q){void 0===q&&(q=!0);!this.renderer.Bm&&this.nl()?(this.C5=g,this.z5=n,this.B5=q):this.eHa(g,n,q)};
e.prototype.setRenderTarget=function(g,n,q){void 0===n&&(n=0);void 0===q&&(q=0);this.nl()&&!this.h8a(g)?(this.A5=g,this.x5=n,this.y5=q):this.dHa(g,n,q)};e.prototype.h8a=function(g){return this.zja||this.renderer.Bm||g.isXRRenderTarget||g.textures&&0<g.textures.length&&g.textures[0].name&&g.textures[0].name.includes("PMREM")?!0:!1};e.prototype.render=function(g,n){var q;if(g.isScene){if(!this.renderer.Bm){if(this.us&&this.us.qf()===g&&g!==this.Q3)return;h.zla(this.renderer,g,n,this.rLa);if(this.nl()||
null===this.renderer.getRenderTarget()||(null===n||void 0===n?0:n.isPerspectiveCamera)&&(null===(q=this.renderer.getRenderTarget())||void 0===q?0:q.mFa))this.Q3=g,this.rFa=n,this.us&&this.us.update(g,n)}if(this.v5a(g,n))return}this.zja=!0;try{this.cHa(g,n)}catch(p){b.fv&&console.error("render error:",p)}this.zja=!1};e.prototype.clear=function(g,n,q){this.j9a(g,n,q)};e.prototype.ze=function(){this.nl()||(void 0!==this.C5&&void 0!==this.z5&&void 0!==this.B5&&(this.eHa(this.C5,this.z5,this.B5),this.B5=
this.z5=this.C5=void 0),void 0!==this.A5&&void 0!==this.x5&&void 0!==this.y5&&(this.dHa(this.A5,this.x5,this.y5),this.y5=this.x5=this.A5=void 0))};e.prototype.nl=function(){return h.isPresenting&&h.nh===this.renderer};e.prototype.dH=function(){this.Vu.sB=0;this.kV()};e.prototype.TG=function(g){this.Vu.sB=g};e.prototype.YF=function(){this.Vu.sB=void 0;this.kV()};e.prototype.CM=function(){this.Vu.nL=0;this.kV()};e.prototype.rM=function(g){this.Vu.nL=g;this.kV()};e.prototype.kL=function(){this.Vu.nL=
void 0;this.kV()};e.prototype.v5a=function(g,n){if(!h.isPresenting||0===this.VS)return!1;if(void 0===this.VS){if(f.jc()!=f.Gs&&f.jc()!=f.Zy)return this.VS=0,!1;this.VS=20}this.VS--;var q=n.near,p=n.far;n.near=Math.min(q,.1);n.far=Math.max(p,1E3);this.cHa(g,n);n.near=q;n.far=p;return!0};e.prototype.kV=function(){var g=this.Q3&&(h.isPresenting&&void 0!==this.Vu.nL||void 0!==this.Vu.sB);g!==!!this.us&&(g?this.nl()?this.us=new c(this.Vu,this.renderer,this.Q3,this.rFa):this.us=new k(this.Vu,this.renderer,
this.Q3,this.rFa):this.us&&(this.us.dispose(),this.us=null))};return e}()});
define("fW","require exports pB hV ni kQ jq three.mod nO".split(" "),function(a,d,l,m,k,c,h,f,b){return function(){function e(g){this.pS=!0;this.ts=this.renderer=null;this.qU=void 0;this.Jj=0;this.pS=g;this.container=document.createElement("div")}e.prototype.dispose=function(){this.Ca()};e.prototype.X1=function(){this.Jj++};e.prototype.h7a=function(){return 0<this.Jj};e.prototype.S4=function(){this.Jj--;0===this.Jj&&this.Ca()};e.prototype.hd=function(){return this.container};e.prototype.bs=function(){this.xJa();
return this.renderer};e.prototype.M5a=function(){this.lbb();return this.qB};e.prototype.N5a=function(){this.mbb();return this.Rr};e.prototype.Mbb=function(){this.Ala(e.Zna)};e.prototype.Lbb=function(){this.Ala(e.Yna)};e.prototype.Qbb=function(){this.Ala(e.$na)};e.prototype.dH=function(){var g;null===(g=this.ts)||void 0===g?void 0:g.dH()};e.prototype.TG=function(g){var n;null===(n=this.ts)||void 0===n?void 0:n.TG(g)};e.prototype.YF=function(){var g;null===(g=this.ts)||void 0===g?void 0:g.YF()};e.prototype.CM=
function(){this.xJa();this.ts.CM()};e.prototype.rM=function(g){this.ts.rM(g)};e.prototype.kL=function(){this.ts.kL()};e.prototype.lbb=function(){this.qB||(this.qB=new f.CSS3DRenderer,this.qB.domElement.style.position="absolute",this.qB.domElement.style.zIndex="0",this.container.prepend(this.qB.domElement))};e.prototype.xJa=function(){if(!this.renderer){var g={alpha:!0};k.cMa&&(g.precision="lowp");0<e.Xha.length?(g.context=e.Xha.pop(),g.canvas=g.context.canvas):(g.canvas=document.createElement("canvas"),
g.context=m.$4a(g.canvas));this.renderer=new f.WebGLRenderer(g);this.ts=new h(this.renderer);this.renderer.setAnimationLoop(null);this.renderer.setPixelRatio(m.getPixelRatio());this.renderer.debug.checkShaderErrors=k.fv;this.renderer.domElement.style.position="absolute";this.renderer.domElement.style.zIndex="1";this.renderer.domElement.style.pointerEvents="none";this.renderer.outputColorSpace=f.SRGBColorSpace;this.renderer.shadowMap.type=f.PCFShadowMap;this.Rr?this.container.insertBefore(this.renderer.domElement,
this.Rr.domElement):this.container.appendChild(this.renderer.domElement);this.aLa();c.I3a(this.renderer);b.N.bind(l.ba,this.tGa,this,!0)}};e.prototype.tGa=function(){setTimeout(function(){this.renderer&&this.renderer.setPixelRatio(m.ADa(this.renderer.domElement))}.bind(this),100)};e.prototype.Ala=function(g){this.qU!==g&&(this.qU=g,this.aLa())};e.prototype.aLa=function(){this.renderer&&(this.qU===e.Zna?(this.renderer.setClearColor(0,1),this.renderer.autoClear=!0,this.renderer.shadowMap.enabled=!1,
this.ts.rLa=c.ZV.A7):this.qU===e.Yna?(this.renderer.setClearColor(0,0),this.renderer.autoClear=!1,this.renderer.shadowMap.enabled=!0,this.ts.rLa=c.ZV.pna):this.qU===e.$na&&(this.renderer.setClearColor(0,0),this.renderer.autoClear=!1,this.renderer.shadowMap.enabled=!1))};e.prototype.mbb=function(){this.Rr||(this.Rr=new f.CSS3DRenderer,this.Rr.domElement.style.position="absolute",this.Rr.domElement.style.zIndex="2",this.Rr.domElement.style.pointerEvents="none",this.container.appendChild(this.Rr.domElement))};
e.prototype.Ca=function(){var g;this.Rr&&(this.container.removeChild(this.Rr.domElement),this.Rr=null);this.renderer&&(b.N.unbind(l.ba,this.tGa,this),c.Y9a(this.renderer),this.container.removeChild(this.renderer.domElement),e.Xha.push(this.renderer.getContext()),this.renderer.dispose(),this.renderer=null,null===(g=this.ts)||void 0===g?void 0:g.dispose(),this.ts=null);this.qB&&(this.container.removeChild(this.qB.domElement),this.qB=null)};e.Zna=0;e.Yna=1;e.$na=2;e.Xha=[];return e}()});
define("gm",["require","exports","pB","gF","w"],function(a,d,l,m,k){return function(c){function h(f,b){var e=c.call(this)||this;e.enabled=!1;e.d4=0;e.e4=0;e.parentElement=null;e.Wi=null;e.tl=null;e.DM=null;e.Jj=0;e.zc=f;e.parentElement=b;return e}Z(h,c);h.prototype.dispose=function(){this.sb(!1);this.parentElement=this.zc=null};h.prototype.X1=function(){this.Jj++;1<=this.Jj&&this.sb(!0)};h.prototype.S4=function(){this.Jj--;0>=this.Jj&&this.sb(!1)};h.prototype.sb=function(f){this.enabled!=f&&((this.enabled=
f)?(this.zc.qJa("Button"),this.M3a()):(this.zc.h$a(),this.Vha(),this.stop(),this.b$a()))};h.prototype.getX=function(){return this.d4};h.prototype.getY=function(){return this.e4};h.prototype.gs=function(f){this.mh(f);this.enabled&&(this.Yja=this.Wja=f.x,this.Zja=this.Xja=f.y,this.Zab())};h.prototype.OB=function(f){this.Yja=f.x;this.Zja=f.y;this.DM?this.pcb():this.Wi&&this.iV()};h.prototype.mh=function(){this.Vha();this.stop()};h.prototype.uGa=function(){this.mh()};h.prototype.xG=function(){this.W5=
Math.min(this.zc.Wa(),this.zc.Ab())/100};h.prototype.start=function(){this.H4a();this.trigger(l.uo);this.iV()};h.prototype.stop=function(){this.Wi&&(this.h5a(),this.trigger(l.Yf))};h.prototype.pcb=function(){var f=this.Yja-this.Wja,b=this.Zja-this.Xja;Math.sqrt(f*f+b*b)>this.W5*h.JLa&&this.Vha()};h.prototype.Zab=function(){this.DM=window.setTimeout(this.Pbb.bind(this),h.KLa)};h.prototype.Vha=function(){this.DM&&(clearTimeout(this.DM),this.DM=null)};h.prototype.H4a=function(){this.Wi=document.createElement("div");
this.Wi.setAttribute("tdvclass","Button");this.Wi.style.position="absolute";this.Wi.style.width=this.Wi.style.height=Math.round(2*h.Jma*this.W5)+"px";this.Wi.style.borderRadius="50%";this.Wi.style.backgroundColor="rgba(255, 255, 255, 0.5)";this.Wi.style.transform="translate(-50%, -50%)";this.Wi.style.zIndex="1000";this.Wi.style.left=this.Wja+"px";this.Wi.style.top=this.Xja+"px";this.parentElement.appendChild(this.Wi);this.tl=document.createElement("div");this.tl.setAttribute("tdvclass","Button");
this.tl.style.position="absolute";this.tl.style.width=this.tl.style.height=Math.round(2*h.WMa*this.W5)+"px";this.tl.style.borderRadius="50%";this.tl.style.backgroundColor="rgba(255, 255, 255, 0.5)";this.tl.style.transform="translate(-50%, -50%)";this.tl.style.zIndex="1000";this.Wi.appendChild(this.tl)};h.prototype.iV=function(){var f=this.Yja-this.Wja,b=this.Zja-this.Xja;if(0==f&&0==b)this.e4=this.d4=0;else{var e=Math.atan2(-b,f);f=Math.min(Math.sqrt(f*f+b*b)/(this.W5*h.Jma),h.vMa);this.d4=Math.cos(e)*
f;this.e4=Math.sin(e)*f}this.tl.style.left=(50+50*this.d4).toFixed(2)+"%";this.tl.style.top=(50-50*this.e4).toFixed(2)+"%";this.trigger(l.ba)};h.prototype.h5a=function(){var f,b;null===(f=this.tl.parentNode)||void 0===f?void 0:f.removeChild(this.tl);this.tl=null;null===(b=this.Wi.parentNode)||void 0===b?void 0:b.removeChild(this.Wi);this.Wi=null};h.prototype.Pbb=function(){this.DM=null;this.start()};h.prototype.M3a=function(){this.zc.bind(l.hb,this.gs,this,!0);this.zc.bind(l.Pb,this.OB,this,!0);this.zc.bind(l.Eb,
this.mh,this,!0);this.zc.bind(l.tc,this.xG,this,!0);this.zc.bind(l.gz,this.uGa,this,!0);this.xG()};h.prototype.b$a=function(){this.zc.unbind(l.hb,this.gs,this);this.zc.unbind(l.Pb,this.OB,this);this.zc.unbind(l.Eb,this.mh,this);this.zc.unbind(l.tc,this.xG,this);this.zc.unbind(l.gz,this.uGa,this)};h.JLa=k.pb()?5:.5;h.KLa=k.pb()?300:600;h.Jma=k.pb()?10:6.6;h.WMa=k.pb()?5:3.3;h.vMa=6;return h}(m)});
define("dM","require jquery.mod er pB nF bo ec".split(" "),function(a){function d(n){this.Zla=n;this.element=document.createElement("div");this.ima=document.createElement("span");this.element.appendChild(this.ima);this.ima.innerHTML=n.text.split("<br>").join("\n").split("\n").map(m).join("<br>");this.p2=!1}function l(n){this.M=n;this.UR=c.throttle(this.UR.bind(this),100);this.VR=c.throttle(this.VR.bind(this),100);this.xa=document.createElement("div");this.xa.style.position="absolute";this.xa.style.left=
0;this.xa.style.top=0;this.xa.style.right=0;this.xa.style.bottom=0;this.xa.style.zIndex=1;this.xa.style.cursor="inherit";this.xa.style.display="none";this.V7=k(this.xa);this.km=document.createElement("div");this.km.style.position="absolute";this.km.style.left=0;this.km.style.right=0;this.km.style.zIndex=1;this.km.style.cursor="inherit";this.xa.appendChild(this.km);this.oR=[];this.zR=[];this.ki=[];this.Ada={};this.LK=f.Ac;this.M.bind(h.G("subtitlesEnabled"),this.Kx,this);l.Qna.forEach(function(q){this.M.bind(h.G(q),
this.UR,this)}.bind(this));l.Rna.forEach(function(q){this.M.bind(h.G(q),this.VR,this)}.bind(this));this.Kx();this.UR();this.VR()}function m(n){g.innerHTML=n;return g.innerText}var k=a("jquery.mod"),c=a("er"),h=a("pB"),f=a("nF"),b=a("bo"),e=a("ec");l.prototype.clear=function(){this.Reb(null);this.M&&(this.M.unbind(h.G("subtitlesEnabled"),this.Kx,this),l.Qna.forEach(function(n){this.M.unbind(h.G(n),this.UR,this)}.bind(this)),l.Rna.forEach(function(n){this.M.unbind(h.G(n),this.VR,this)}.bind(this)),
this.M=null)};l.prototype.hd=function(){return this.V7};l.prototype.Xd=function(){return this.xa};l.prototype.zha=function(n){0>this.oR.indexOf(n)&&(this.oR.push(n),n.bind(h.G("activeSubtitles"),this.uZ,this,!0),this.uZ())};l.prototype.Lka=function(n){var q=this.oR.indexOf(n);0<=q&&(this.oR.splice(q,1),n.unbind(h.G("activeSubtitles"),this.uZ,this,!0),this.uZ())};l.prototype.uZ=function(){var n=[];this.oR.forEach(function(q){n=n.concat(q.get("activeSubtitles")||[])});this.L_a(n)};l.prototype.Kx=function(){this.V=
this.M.get("subtitlesEnabled");this.Mga()};l.prototype.UR=function(){this.LK=this.xO("subtitlesVerticalAlign",[f.Hc,f.se,f.Ac],f.Ac);this.km.style["text-align"]=this.xO("subtitlesHorizontalAlign",[f.ab,f.ub,f.$e],f.$e);this.km.style.bottom=this.LK==f.Ac?this.Gk("subtitlesBottom",0):"";this.km.style.top=this.LK==f.Hc?this.Gk("subtitlesTop",0):this.LK==f.se?"50%":"";this.km.style.transform=this.LK==f.se?"translate(0, -50%)":"";this.Mga()};l.prototype.VR=function(){var n={};n["background-color"]=this.Kaa("subtitlesBackgroundColor",
"subtitlesBackgroundOpacity");n.border=[this.Gk("subtitlesBorderSize"),"solid",this.Fi("subtitlesBorderColor")].join(" ");n["box-shadow"]=this.Fi("subtitlesShadow",!1)?[this.Gk("subtitlesShadowHorizontalLength"),this.Gk("subtitlesShadowVerticalLength"),this.Gk("subtitlesShadowBlurRadius"),this.Kaa("subtitlesShadowColor","subtitlesShadowOpacity","#000000",0)].join(" "):"";n.display="inline-block";n["font-family"]=e.$x(this.Fi("subtitlesFontFamily"));n["font-size"]=this.Gk("subtitlesFontSize");n.color=
this.Fi("subtitlesFontColor");n["font-weight"]=this.xO("subtitlesFontWeight","bold bolder lighter 100 200 300 400 500 600 700 800 900 normal".split(" "),"normal");n["font-style"]=this.xO("subtitlesFontStyle",["italic","normal"],"normal");n["margin-bottom"]=this.Gk("subtitlesGap");n.opacity=this.Fi("subtitlesOpacity");n["padding-top"]=this.Gk("subtitlesPaddingTop");n["padding-bottom"]=this.Gk("subtitlesPaddingBottom");n["padding-left"]=this.Gk("subtitlesPaddingLeft");n["padding-right"]=this.Gk("subtitlesPaddingRight");
n.position="relative";n["text-align"]=this.xO("subtitlesHorizontalAlign",["left","right","center"],"center");n["text-decoration"]=this.Fi("subtitlesTextDecoration",["underline","overline","line-through","none"],"none");n["text-shadow"]=[this.Gk("subtitlesTextShadowHorizontalLength"),this.Gk("subtitlesTextShadowVerticalLength"),this.Gk("subtitlesTextShadowBlurRadius"),this.Kaa("subtitlesTextShadowColor","subtitlesTextShadowOpacity","#000000",0)].join(" ");this.Ada=n;this.VOa()};l.prototype.L_a=function(n){this.zR=
n;this.Mga()};l.prototype.Mga=function(){for(var n=this.V?this.zR:[],q=this.ki.length-1;0<=q;q--){var p=this.ki[q];if(0<=n.indexOf(p.Zla))break;this.km.removeChild(p.element)}for(var r=[],t=!1;0<=q;q--)p=this.ki[q],!p.p2&&0>n.indexOf(p.Zla)&&(p.p2=!0,p.element.style.visibility="hidden",t=!0),r.splice(0,0,p);t&&b.requestFrame(this.yqa,this);this.ki=r;var u=this.ki.filter(function(v){return!v.p2}).map(function(v){return v.Zla});n.filter(function(v){return 0>u.indexOf(v)}).forEach(function(v){v=new d(v);
this.zpa(v);this.LK==f.Ac&&0<this.ki.length?this.km.insertBefore(v.element,this.ki[this.ki.length-1].element):this.km.appendChild(v.element);this.ki.push(v)}.bind(this));this.xa.style.display=0<this.ki.length?"block":"none"};l.prototype.yqa=function(n){var q=!1;n=Math.round(200*n/1E3);for(var p=0;p<this.ki.length;p++){var r=this.ki[p];if(r.p2)if(q=!0,n>=r.element.clientHeight)n-=r.element.clientHeight,this.km.removeChild(r.element),this.ki.splice(p,1),p--;else{r.element.style.height=r.element.clientHeight-
n+"px";break}}q&&b.requestFrame(this.yqa,this)};l.prototype.VOa=function(){this.ki.forEach(this.zpa.bind(this))};l.prototype.zpa=function(n){for(var q in this.Ada)n.ima.style[q]=this.Ada[q]};l.prototype.Fi=function(n,q){return this.M.get(n,q)};l.prototype.Gk=function(n,q){n=this.M.get(n,q);isNaN(n)||(n=Math.round(n)+"px");return n};l.prototype.xO=function(n,q,p){n=this.M.get(n);return 0>q.indexOf(n)?p:n};l.prototype.Kaa=function(n,q,p,r){n=this.M.get(n,p);q=this.M.get(q,r);return"rgba("+parseInt("0x"+
n.substr(1,2))+", "+parseInt("0x"+n.substr(3,2))+", "+parseInt("0x"+n.substr(5,2))+", "+q+")"};l.Qna=["subtitlesHorizontalAlign","subtitlesVerticalAlign","subtitlesTop","subtitlesBottom"];l.Rna="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 g=document.createElement("div");return l});
define("ml","require exports lh pB lx fq".split(" "),function(a,d,l,m,k,c){a=function(){function n(q){this.BM=new Map;this.vl=q}n.prototype.add=function(q){c.Ja("PanoramaPlayer",q)?this.BM.set(q,new h(this.vl,q)):c.Ja("VideoPlayer",q)?this.BM.set(q,new f(this.vl,q)):c.Ja("PhotoAlbumPlayer",q)?this.BM.set(q,new b(this.vl,q)):c.Ja("Audio",q)&&this.BM.set(q,new g(this.vl,q))};n.prototype.remove=function(q){var p=this.BM.get(q);p&&(p.clear(),this.BM.delete(q))};return n}();d=function(){function n(q,p){this.vl=
q;this.source=p}n.prototype.clear=function(){};return n}();var h=function(n){function q(p,r){p=n.call(this,p,r)||this;p.OF=new e(p.vl);p.Ff=null;p.source.bind(m.G("panorama"),p.kka,p,!0);p.kka();return p}Z(q,n);q.prototype.clear=function(){this.source&&(this.source.unbind(m.G("panorama"),this.kka,this),this.source=null,this.tf(null),this.OF.clear(),this.OF=null)};q.prototype.kka=function(){this.tf(this.source.get("panorama"))};q.prototype.tf=function(p){if(this.Ff!=p){this.Ff&&(this.Ff.unbind(m.G("audios"),
this.uG,this),this.vl.Lka(this.Ff));if(this.Ff=p)this.vl.zha(this.Ff),this.Ff.bind(m.G("audios"),this.uG,this,!0);this.uG()}};q.prototype.uG=function(){this.OF.cla(this.Ff&&this.Ff.get("audios")||[])};return q}(d),f=function(n){function q(p,r){p=n.call(this,p,r)||this;p.video=null;p.source.bind(m.G("video"),p.AG,p,!0);p.source.bind(m.Ae,p.AG,p,!0);p.AG();return p}Z(q,n);q.prototype.clear=function(){this.source&&(this.source.unbind(m.G("video"),this.AG,this),this.source.unbind(m.Ae,this.AG,this),this.source=
null,this.o5(null))};q.prototype.AG=function(){var p;this.o5((null===(p=this.source)||void 0===p?void 0:p.get("state"))!=k.U?this.source.get("video"):null)};q.prototype.o5=function(p){this.video!=p&&(this.video&&this.vl.Lka(this.video),(this.video=p)&&this.vl.zha(this.video))};return q}(d),b=function(n){function q(p,r){p=n.call(this,p,r)||this;p.wG=p.wG.bind(p);p.OF=new e(p.vl);p.TB=null;l.ju(p.source,"photoAlbum.playList.items",p.wG,!1);l.ju(p.source,"photoAlbum.playList.selectedIndex",p.wG,!1);
p.wG();return p}Z(q,n);q.prototype.clear=function(){this.source&&(l.ca(this.source,"photoAlbum.playList.items",this.wG),l.ca(this.source,"photoAlbum.playList.selectedIndex",this.wG),this.source=null,this.iJa(null),this.OF.clear(),this.OF=null)};q.prototype.wG=function(){var p=this.source.get("photoAlbum");p=(p=p?p.get("playList"):null)&&0<=p.get("selectedIndex")?p.get("items")[p.get("selectedIndex")]:null;this.iJa(p?p.get("media"):null)};q.prototype.iJa=function(p){this.TB!=p&&(this.TB&&this.TB.unbind(m.G("audios"),
this.uG,this),(this.TB=p)&&this.TB.bind(m.G("audios"),this.uG,this,!0),this.uG())};q.prototype.uG=function(){this.OF.cla(this.TB&&this.TB.get("audios")||[])};return q}(d),e=function(){function n(q){this.g2=[];this.f2=new Map;this.vl=q}n.prototype.clear=function(){this.cla([])};n.prototype.cla=function(q){this.g2!=q&&(this.g2.forEach(function(p){0<=q.indexOf(p)||(this.f2.get(p).clear(),this.f2.delete(p))}.bind(this)),this.g2=q,this.g2.forEach(function(p){this.f2.has(p)||this.f2.set(p,new g(this.vl,
p))}.bind(this)))};return n}(),g=function(n){function q(p,r){p=n.call(this,p,r)||this;p.VB=!1;p.source.bind(m.G("state"),p.eka,p,!0);p.eka();return p}Z(q,n);q.prototype.clear=function(){this.source&&(this.AIa(!1),this.source.unbind(m.G("state"),this.eka,this),this.source=null)};q.prototype.eka=function(){this.AIa(this.source.get("state")!=k.U)};q.prototype.AIa=function(p){this.VB!=p&&(this.VB&&this.vl.Lka(this.source),(this.VB=p)&&this.vl.zha(this.source))};return q}(d);return a});
define("bF","require er three.mod lV lh pB lx cI fq km gK B fW gm dM ml w kQ eo bi cZ hh T e".split(" "),function(a){function d(){function C(){w.WB==S&&w.Ru==U?T.bs().render(S,U):w.N.unbind(h.Vh,C,this)}w.X4=new b(h.Ndb);var L=E=new w.voa,T=J=new p,S=new m.Scene,U=new m.PerspectiveCamera;w.zla(T.bs(),S,U,w.ZV.A7);w.TS(T.bs(),L);w.N.bind(h.Vh,C,this,!0);w.X4=null}var l=a("er"),m=a("three.mod"),k=a("lV"),c=a("lh"),h=a("pB"),f=a("lx"),b=a("cI"),e=a("fq"),g=a("km"),n=a("gK"),q=a("B"),p=a("fW"),r=a("gm"),
t=a("dM"),u=a("ml"),v=a("w"),w=a("kQ"),x=a("eo"),y=a("bi"),z=a("cZ"),B=a("hh"),D=a("T"),F=a("e"),A=e.define("ViewerArea",D,function(){D.call(this);this.set("childrenInteractionEnabled",!0);this.set("contentOpaque",!0);this.set("creationPolicy",z.PC);this.set("subtitlesEnabled",!0);this.set("checkToolTipOcclusion",!0);this.set("isKeyboardTarget",!1);this.Yt=this.bP=this.Qq=this.Ri=this.UA=this.mt=this.fe=this.IX=this.ni=null;this.zR=new t(this);this.X0=new u(this.zR);this.Oda=this.Et=!1;this.Ni=f.U;
this.an=this.Ak=null;this.yn=!1;this.QQ=[];this.bind(A.Tna,this.qXa,this,!0);this.bind(A.Sna,this.pXa,this,!0);this.bind(h.hb,this.gwa,this);this.bind(h.hb,this.gwa,this);this.bind(h.Gc,this.KXa,this);this.bind(h.Jb,this.JXa,this);this.bind(h.kd,this.f_,this,!0);this.bind(h.cd,this.HXa,this,!0);this.jI=new g(this,"buttonPause",x.Rj);this.jI.bind(h.ma,this.LE,this);this.jI.set("state",B.Ke);this.kI=new g(this,"buttonPlay",x.Rj);this.kI.bind(h.ma,this.ME,this);this.kI.set("state",B.Ke);this.sD=new g(this,
"buttonPlayPause",x.Rj);this.sD.bind(h.ma,this.mXa,this);this.sD.set("state",B.Ke);this.mI=new g(this,"buttonStop",x.Rj);this.mI.bind(h.ma,this.GA,this);this.mI.set("state",B.Bb);this.FPa=new g(this,"buttonRestart",x.Me);this.FPa.bind(h.ma,this.FA,this);this.KW=new g(this,"buttonToggleSubtitles",x.Rj);this.KW.bind(h.Oj,function(){this.set("subtitlesEnabled",!0)},this,!0);this.KW.bind(h.Hl,function(){this.set("subtitlesEnabled",!1)},this,!0);this.bind(h.G("subtitlesEnabled"),function(){this.KW.set("pressed",
this.get("subtitlesEnabled"))},this);this.KW.set("pressed",this.get("subtitlesEnabled"));(new g(this,"buttonVRView",x.Me)).bind(h.ma,function(){this.set("viewMode","vr")},this,!0);this.sVa=k.Ip(this.U2a,this);this.bind(h.El,this.GXa,this,!0);this.bind(A.YV,this.IXa,this,!0);w.N.bind(h.ba,function(){this.set("viewMode",w.isPresenting?"vr":"standard");this.trigger(A.h7)},this,!0)});A.prototype.play=function(){this.ME()};A.prototype.pause=function(){this.LE()};A.prototype.stop=function(){this.GA()};
A.prototype.restart=function(){this.FA()};A.Ic={progressBackgroundColor:void 0,progressBackgroundColorDirection:void 0,progressBackgroundColorRatios:void 0,progressBackgroundOpacity:void 0,progressBarBackgroundColor:void 0,progressBarBackgroundColorDirection:void 0,progressBarBackgroundColorRatios:void 0,progressBarBorderColor:void 0,progressBarBorderRadius:void 0,progressBarBorderSize:void 0,progressBarOpacity:void 0,progressBorderColor:void 0,progressBorderRadius:void 0,progressBorderSize:void 0,
progressBottom:0,progressHeight:20,progressLeft:0,progressOpacity:void 0,progressPercent:0,progressRight:0,progressVisible:!1,externalPlaybackBar:void 0,externalProgressBar:void 0,playbackBarBackgroundColor:void 0,playbackBarBackgroundColorDirection:void 0,playbackBarBackgroundOpacity:void 0,playbackBarBorderColor:void 0,playbackBarBorderRadius:void 0,playbackBarBorderSize:void 0,playbackBarBottom:10,playbackBarHeight:void 0,playbackBarWidth:void 0,playbackBarLeft:void 0,playbackBarOpacity:void 0,
playbackBarRight:void 0,playbackBarLiveDragging:void 0,playbackBarDuration:100,playbackBarPosition:0,playbackBarRollOverDisplay:!1,plabackBarSteps:void 0,plabackBarSelectedStep:void 0,playbackBarVisible:!1,playbackBarProgressBackgroundColor:void 0,playbackBarProgressBackgroundColorDirection:void 0,playbackBarProgressBackgroundColorRatios:void 0,playbackBarProgressBorderColor:void 0,playbackBarProgressBorderRadius:void 0,playbackBarProgressBorderSize:void 0,playbackBarProgressOpacity:void 0,playbackBarHeadBackgroundColor:void 0,
playbackBarHeadBackgroundColorDirection:void 0,playbackBarHeadBackgroundColorRatios:void 0,playbackBarHeadBorderColor:void 0,playbackBarHeadBorderRadius:void 0,playbackBarHeadBorderSize:void 0,playbackBarHeadOpacity:void 0,playbackBarHeadWidth:void 0,playbackBarHeadHeight:void 0,playbackBarHeadShadow:void 0,playbackBarHeadShadowBlurRadius:void 0,playbackBarHeadShadowColor:void 0,playbackBarHeadShadowHorizontalLength:void 0,playbackBarHeadShadowOpacity:void 0,playbackBarHeadShadowSpread:void 0,playbackBarHeadShadowVerticalLength:void 0,
playbackBarStepBackgroundColor:void 0,playbackBarStepBackgroundColorDirection:void 0,playbackBarStepBackgroundColorRatios:void 0,playbackBarStepBorderColor:void 0,playbackBarStepBorderRadius:void 0,playbackBarStepBorderSize:void 0,playbackBarStepOpacity:void 0,playbackBarStepWidth:void 0,playbackBarStepHeight:void 0,playbackBarStepShadow:void 0,playbackBarStepShadowBlurRadius:void 0,playbackBarStepShadowColor:void 0,playbackBarStepShadowHorizontalLength:void 0,playbackBarStepShadowOpacity:void 0,
playbackBarStepShadowSpread:void 0,playbackBarStepShadowVerticalLength:void 0,playbackBarStepSelectedBackgroundColor:void 0,playbackBarStepSelectedBackgroundColorDirection:void 0,playbackBarStepSelectedBackgroundColorRatios:void 0,playbackBarStepSelectedBorderColor:void 0,playbackBarStepSelectedBorderRadius:void 0,playbackBarStepSelectedBorderSize:void 0,playbackBarStepSelectedOpacity:void 0,playbackBarStepSelectedWidth:void 0,playbackBarStepSelectedHeight:void 0,playbackBarStepSelectedShadow:void 0,
playbackBarStepSelectedShadowBlurRadius:void 0,playbackBarStepSelectedShadowColor:void 0,playbackBarStepSelectedShadowHorizontalLength:void 0,playbackBarStepSelectedShadowOpacity:void 0,playbackBarStepSelectedShadowSpread:void 0,playbackBarStepSelectedShadowVerticalLength:void 0,subtitlesBackgroundColor:"#000000",subtitlesBackgroundOpacity:1,subtitlesBorderColor:void 0,subtitlesBorderSize:0,subtitlesBottom:"10%",subtitlesFontFamily:void 0,subtitlesFontColor:"#ffffff",subtitlesFontSize:"12px",subtitlesFontStyle:void 0,
subtitlesFontWeight:void 0,subtitlesGap:10,subtitlesHorizontalAlign:"center",subtitlesOpacity:1,subtitlesPaddingTop:5,subtitlesPaddingBottom:5,subtitlesPaddingLeft:5,subtitlesPaddingRight:5,subtitlesShadow:!1,subtitlesShadowBlurRadius:void 0,subtitlesShadowHorizontalLength:0,subtitlesShadowVerticalLength:0,subtitlesShadowColor:"#000000",subtitlesShadowOpacity:0,subtitlesTextDecoration:void 0,subtitlesTextShadowBlurRadius:void 0,subtitlesTextShadowColor:"#000000",subtitlesTextShadowHorizontalLength:0,
subtitlesTextShadowOpacity:0,subtitlesTextShadowVerticalLength:0,subtitlesTop:void 0,subtitlesVerticalAlign:"bottom",transitionDuration:500,blendingTransitionDuration:void 0,disolveTransitionDuration:void 0,translationTransitionDuration:void 0,translationTransitionEnabled:!0,toolTipEnabled:!0};l.defaults(A.Ic,D.Ic);A.prototype.get=function(C,L){switch(C){case "viewMode":return w.isPresenting?"vr":"standard"}return D.prototype.get.call(this,C,L)};A.prototype.set=function(C,L){"playbackState"==C&&(L=
this.Ni,this.get(C)!=L&&(this.Oda=!0,this.sVa()));switch(C){case "toolTipEnabled":this.set("toolTipDisabled",!1===L);break;case "cardboardPointerDistance":this.set("vrPointerDistance",L);break;case "cardboardPointerColor":this.set("vrPointerColor",L);break;case "cardboardPointerSelectionColor":this.set("vrPointerSelectionColor",L);break;case "cardboardPointerSelectionTime":this.set("vrPointerSelectionTime",L);break;case "playbackBarVisible":case "playbackBarRollOverDisplay":this.YR();break;case "viewMode":this.Qd().h7a()&&
("vr"!=L||w.isPresenting?"vr"!=L&&w.isPresenting&&w.xia():w.TS(this.Qd().bs(),this.bja())),L=w.isPresenting?"vr":"standard"}D.prototype.set.call(this,C,L)};A.prototype.yb=function(){this.Io(A.Ic)};A.prototype.Hb=function(){D.prototype.Hb.call(this);null==this.UA&&(this.UA=new F,this.UA.set("width","100%"),this.UA.set("height","100%"),this.UA.set("interactionEnabled",!1),this.UA.set("toolTipDisabled",!0),this.Za(this.UA),this.UA.Yb().Xd().appendChild(this.Qd().hd()));null==this.Qq&&(this.Qq=new F,
this.Qq.set("width","100%"),this.Qq.set("height","100%"),this.Qq.set("toolTipDisabled",!0),this.Qq.set("interactionEnabled",!1),this.Za(this.Qq),k.defer(function(){this.Qq.set("cursor",y.pv)}.bind(this)),this.bP=new r(this,this.Qq.Yb().Xd()),this.bP.sb(!1));null==this.Yt&&(this.Yt=new F,this.Yt.set("width","100%"),this.Yt.set("height","100%"),this.Yt.set("toolTipDisabled",!0),this.Yt.set("interactionEnabled",!1),this.Za(this.Yt),this.Yt.Yb().Xd().appendChild(this.zR.Xd()));null==this.ni&&(this.ni=
new q,this.Za(this.ni));null==this.fe&&(this.fe=new n,this.fe.bind(h.ba,this.Lda,this,!0),this.Za(this.fe),this.YR())};A.prototype.bja=function(){if(this.oBa)return this.oBa;if(E){var C=E;E=null}else C=new w.voa;c.da(this,"vrGazePointerHideTime vrFoveation vrPointerColor vrPointerDistance vrPointerOverColor vrPointerSelectionColor vrPointerSelectionTime".split(" "),function(){C.zDa=this.get("vrGazePointerHideTime");C.tDa=this.get("vrFoveation");C.J4=this.get("vrPointerColor");C.uHa=this.get("vrPointerDistance");
C.xka=this.get("vrPointerOverColor");C.L4=this.get("vrPointerSelectionColor");C.yHa=this.get("vrPointerSelectionTime")}.bind(this),!0);return this.oBa=C};A.prototype.k6a=function(){return this.fe};A.prototype.Qd=function(){this.Ri||(J?(this.Ri=J,J=null):this.Ri=new p(this.get("aaEnabled")));return this.Ri};A.prototype.cj=function(){D.prototype.cj.call(this);for(var C=[],L=this.QQ.length-1;0<=L;L--)C.push(this.QQ[L].j);this.Yt&&C.push(this.Yt);this.Qq&&C.push(this.Qq);this.fe&&C.push(this.fe);this.ni&&
C.push(this.ni);var T=this.rb();C=C.filter(function(S){return 0<=T.indexOf(S)});T=T.filter(function(S){return-1==C.indexOf(S)}).concat(C);T.forEach(function(S,U){S&&this.Hia(S)!=U&&this.io(S,U)}.bind(this))};A.prototype.bb=function(){this.L("externalProgressBar")&&((this.IX=this.B("externalProgressBar"))?this.removeChild(this.ni):this.Za(this.ni),this.S("externalProgressBar"),l(A.Woa).each(function(L){this.lF(L)},this));this.xc(A.HNa,A.Loa,[this.ni],!0,!0);var C=[this.ni];this.IX&&C.push(this.IX);
this.xc(A.Woa,A.Xoa,C,!0,!0);this.L("externalPlaybackBar")&&(this.mt&&this.mt.unbind(h.ba,this.Lda,this,!0),(this.mt=this.B("externalPlaybackBar"))?this.removeChild(this.fe):this.Za(this.fe),this.YR(),this.mt&&this.mt.bind(h.ba,this.Lda,this,!0),this.S("externalPlaybackBar"),l(A.Soa).each(function(L){this.lF(L)},this));this.xc(A.GNa,A.Koa,[this.fe],!0,!0);C=[this.fe];this.mt&&C.push(this.mt);this.xc(A.Soa,A.Toa,C,!0,!0);D.prototype.bb.call(this)};A.prototype.U2a=function(){this.Oda&&(this.Oda=!1,
this.jI.set("state",this.Ni==f.Qb?B.Bb:B.Ke),this.kI.set("state",this.Ni==f.PLAYING||this.Ni==f.Qb?B.Bb:B.Ke),this.sD.set("state",this.Ni==f.PLAYING?B.Bb:B.Ke),this.mI.set("state",this.Ni==f.U?B.Bb:B.Ke))};A.prototype.wd=function(C){this.Ni=C;this.set("playbackState",C)};A.prototype.f_=function(){A.tj(this)};A.prototype.HXa=function(){A.sj(this)};A.prototype.LE=function(){this.Ni==f.Qb?this.Sk():this.ir()};A.prototype.ME=function(){this.Sk()};A.prototype.mXa=function(){this.Ni==f.PLAYING?this.ir():
this.Sk()};A.prototype.GA=function(){this.lp()};A.prototype.FA=function(){this.lp();this.Sk()};A.prototype.GXa=function(){if(!this.Ak||!this.Ak.Tha())switch(this.get("doubleClickAction")){case "toggle_fullscreen":var C=this.Db().qj;C&&C.kk()&&C.toggle()}};A.prototype.IXa=function(C){this.QQ.forEach(function(L){this.X0.remove(L)}.bind(this));this.QQ=C.data.players;this.QQ.forEach(function(L){this.X0.add(L)}.bind(this));this.Yd()};A.prototype.Sk=function(){this.an&&this.an.play()};A.prototype.ir=function(){this.an&&
this.an.pause()};A.prototype.lp=function(){this.an&&this.an.stop()};A.prototype.qXa=function(C){this.sya(C.data.player)};A.prototype.pXa=function(C){this.Ak==C.data.player&&this.sya(null)};A.prototype.gwa=function(){A.Mp(this)};A.prototype.KXa=function(){this.yn=!0;this.YR()};A.prototype.JXa=function(){this.yn=!1;this.YR()};A.prototype.YR=function(){this.fe&&this.fe.set("visible",this.get("playbackBarVisible")&&(this.yn||!this.get("playbackBarRollOverDisplay")||v.N5()))};A.prototype.sya=function(C){this.Ak!=
C&&(this.set("playbackBarVisible",!1),this.Ak&&this.Ak.Mp(!1),this.an&&this.an.unbind(h.G("state"),this.k8,this),this.pYa=this.Ak,(this.Ak=C)&&this.Ak.Mp(!!this.xn),(this.an=this.Ak&&this.Ak.NPa?this.Ak:null)&&this.an.bind(h.G("state"),this.k8,this,!0),this.k8())};A.prototype.Mp=function(C){this.xn=C;this.set("isKeyboardTarget",C);this.Ak&&this.Ak.Mp(!!this.xn)};A.prototype.gdb=function(){return!this.pYa};A.prototype.k8=function(){this.an?this.wd(this.an.get("state")):this.wd(f.U)};A.prototype.Lda=
function(){var C=(this.mt?this.mt:this.fe).get("position");this.trigger(new b(A.a7,{position:C}))};A.Loa={progressBackgroundColor:"backgroundColor",progressBackgroundColorDirection:"backgroundColorDirection",progressBackgroundColorRatios:"backgroundColorRatios",progressBackgroundOpacity:"backgroundOpacity",progressBarBackgroundColor:"barBackgroundColor",progressBarBackgroundColorDirection:"barBackgroundColorDirection",progressBarBackgroundColorRatios:"barBackgroundColorRatios",progressBarBorderColor:"barBorderColor",
progressBarBorderRadius:"barBorderRadius",progressBarBorderSize:"barBorderSize",progressBarOpacity:"barOpacity",progressBorderColor:"borderColor",progressBorderRadius:"borderRadius",progressBorderSize:"borderSize",progressHeight:"height",progressOpacity:"opacity",progressBottom:"bottom",progressLeft:"left",progressRight:"right"};A.HNa=l(A.Loa).keys();A.Xoa={progressPercent:"percent",progressVisible:"visible"};A.Woa=l(A.Xoa).keys();A.Koa={playbackBarBackgroundColor:"backgroundColor",playbackBarBackgroundColorDirection:"backgroundColorDirection",
playbackBarBackgroundOpacity:"backgroundOpacity",playbackBarBorderColor:"borderColor",playbackBarBorderRadius:"borderRadius",playbackBarBorderSize:"borderSize",playbackBarBottom:"bottom",playbackBarHeight:"height",playbackBarWidth:"width",playbackBarLeft:"left",playbackBarOpacity:"opacity",playbackBarRight:"right",playbackBarLiveDragging:"liveDragging",playbackBarProgressBackgroundColor:"barBackgroundColor",playbackBarProgressBackgroundColorDirection:"barBackgroundColorDirection",playbackBarProgressBackgroundColorRatios:"barBackgroundColorRatios",
playbackBarProgressBorderColor:"barBorderColor",playbackBarProgressBorderRadius:"barBorderRadius",playbackBarProgressBorderSize:"barBorderSize",playbackBarProgressOpacity:"barOpacity",playbackBarHeadBackgroundColor:"playheadBackgroundColor",playbackBarHeadBackgroundColorDirection:"playheadBackgroundColorDirection",playbackBarHeadBackgroundColorRatios:"playheadBackgroundColorRatios",playbackBarHeadBorderColor:"playheadBorderColor",playbackBarHeadBorderRadius:"playheadBorderRadius",playbackBarHeadBorderSize:"playheadBorderSize",
playbackBarHeadOpacity:"playheadOpacity",playbackBarHeadWidth:"playheadWidth",playbackBarHeadHeight:"playheadHeight",playbackBarHeadShadow:"playheadShadow",playbackBarHeadShadowBlurRadius:"playheadShadowBlurRadius",playbackBarHeadShadowColor:"playheadShadowColor",playbackBarHeadShadowHorizontalLength:"playheadShadowHorizontalLength",playbackBarHeadShadowOpacity:"playheadShadowOpacity",playbackBarHeadShadowSpread:"playheadShadowSpread",playbackBarHeadShadowVerticalLength:"playheadShadowVerticalLength",
playbackBarStepBackgroundColor:"stepBackgroundColor",playbackBarStepBackgroundColorDirection:"stepBackgroundColorDirection",playbackBarStepBackgroundColorRatios:"stepBackgroundColorRatios",playbackBarStepBorderColor:"stepBorderColor",playbackBarStepBorderRadius:"stepBorderRadius",playbackBarStepBorderSize:"stepBorderSize",playbackBarStepOpacity:"stepOpacity",playbackBarStepWidth:"stepWidth",playbackBarStepHeight:"stepHeight",playbackBarStepShadow:"stepShadow",playbackBarStepShadowBlurRadius:"stepShadowBlurRadius",
playbackBarStepShadowColor:"stepShadowColor",playbackBarStepShadowHorizontalLength:"stepShadowHorizontalLength",playbackBarStepShadowOpacity:"stepShadowOpacity",playbackBarStepShadowSpread:"stepShadowSpread",playbackBarStepShadowVerticalLength:"stepShadowVerticalLength",playbackBarSelectedStepBackgroundColor:"selectedStepBackgroundColor",playbackBarSelectedStepBackgroundColorDirection:"selectedStepBackgroundColorDirection",playbackBarSelectedStepBackgroundColorRatios:"selectedStepBackgroundColorRatios",
playbackBarSelectedStepBorderColor:"selectedStepBorderColor",playbackBarSelectedStepBorderRadius:"selectedStepBorderRadius",playbackBarSelectedStepBorderSize:"selectedStepBorderSize",playbackBarSelectedStepOpacity:"selectedStepOpacity",playbackBarSelectedStepWidth:"selectedStepWidth",playbackBarSelectedStepHeight:"selectedStepHeight",playbackBarSelectedStepShadow:"selectedStepShadow",playbackBarSelectedStepShadowBlurRadius:"selectedStepShadowBlurRadius",playbackBarSelectedStepShadowColor:"selectedStepShadowColor",
playbackBarSelectedStepShadowHorizontalLength:"selectedStepShadowHorizontalLength",playbackBarSelectedStepShadowOpacity:"selectedStepShadowOpacity",playbackBarSelectedStepShadowSpread:"selectedStepShadowSpread",playbackBarSelectedStepShadowVerticalLength:"selectedStepShadowVerticalLength"};A.GNa=l(A.Koa).keys();A.Toa={playbackBarDuration:"duration",playbackBarPosition:"position",playbackBarSteps:"steps",playbackBarSelectedStep:"selectedStep",playbackBarVisible:"visible"};A.Soa=l(A.Toa).keys();A.YV=
"requestByPlayer";A.Tna="playerShow";A.Sna="playerHide";A.a7="playbackBarPositionChange";A.h7="viewModeChange";A.tE=null;A.Mp=function(C){A.tE!=C&&(A.tE&&A.tE.Mp(!1),A.tE=C,A.tE&&A.tE.Mp(!0))};A.IF=[];A.tj=function(C){var L=A.IF.indexOf(C);-1<L&&A.IF.splice(L,1);A.IF.push(C);this.Mp(this.Qsa())};A.sj=function(C){var L=A.IF.indexOf(C);-1<L&&A.IF.splice(L,1);A.tE==C&&A.Mp(A.IF.length?this.Qsa():null)};A.Qsa=function(){var C=A.IF.slice();C.sort(function(L,T){var S=L.get("actualWidth")*L.get("actualHeight"),
U=T.get("actualWidth")*T.get("actualHeight");L=C.indexOf(L);T=C.indexOf(T);return S-U||L-T});return C[C.length-1]};var E=null,J=null;navigator.xr&&navigator.xr.addEventListener("sessiongranted",function(){d()});return A});
define("dn",["require","lV","mz","cI","bF"],function(a){var d=a("lV"),l=a("mz"),m=a("cI"),k=a("bF"),c=d.extend(l,function(h){l.call(this);this.NPa=h;this.nR=this.wA=null});c.th="mediaShow";c.Vm="mediaHide";c.prototype.Mp=function(){};c.prototype.Tha=function(){return!1};c.prototype.kR=function(h){this.wA!=h&&(this.wA&&this.kga(this.wA),(this.wA=h)&&this.U8(this.wA))};c.prototype.U8=function(h){h.bind(k.YV,this.kBa,this,!0);h.bind(k.a7,this.yQ,this)};c.prototype.kga=function(h){h.unbind(k.YV,this.kBa,
this);h.unbind(k.a7,this.yQ,this)};c.prototype.KG=function(h){this.wA.trigger(new m(k.YV,{players:h||[this]}))};c.prototype.kBa=function(h){0>h.data.players.indexOf(this)&&this.uK()};c.prototype.yQ=function(){};c.prototype.uK=function(){};c.prototype.sP=function(h){this.trigger(new m(c.th,{media:h}));this.nR=this.wA;this.nR.trigger(new m(k.Tna,{player:this}))};c.prototype.rP=function(h){this.trigger(new m(c.Vm,{media:h}));this.nR&&(this.nR.trigger(new m(k.Sna,{player:this})),this.nR=null)};return c});
define("kC",["require"],function(){return{wC:"constrained",hMa:"free_drag",ydb:"free_drag_and_rotation",J7:"sync_with_field_of_view"}});
define("li",["require","lV","kC","mN"],function(a){function d(){this.Ba=!0;this.Qa=this.Na=.5;this.rd=0;this.qb=1;this.Rf=m.Uh;this.Fn=l.wC;this.tca=this.wca=1;this.Pe=this.Qe=this.bn=this.cn=100;this.Qn=d.dD}a("lV");var l=a("kC"),m=a("mN");d.prototype.HEa=function(){return this.Qn!==d.dD};d.prototype.GEa=function(){return this.Qn&d.UH?!0:!1};d.prototype.IEa=function(){return this.Qn&d.VH?!0:!1};d.prototype.JEa=function(){return this.Qn&d.gD?!0:!1};d.prototype.FEa=function(){return this.Qn&d.cD?!0:
!1};d.prototype.getX=function(){this.Wn();return this.Na};d.prototype.getY=function(){this.Wn();return this.Qa};d.prototype.cs=function(){this.Wn();return this.qb};d.prototype.tL=function(){this.Wn();return this.rd};d.prototype.setConfiguration=function(k,c,h,f,b){this.Qe=k;this.Pe=c;this.Rf=h;this.wca=f;this.tca=b;this.Qa=this.Na=.5;this.rd=0;this.qb=f;this.Ba=!0};d.prototype.setPosition=function(k,c,h,f){this.Na=k;this.Qa=c;this.rd=h;this.qb=f;this.Ba=!0};d.prototype.ys=function(k){this.Fn=k;this.Ba=
!0};d.prototype.setSize=function(k,c){this.cn=k;this.bn=c;this.Ba=!0};d.prototype.Wn=function(){if(this.Ba){this.Ba=!1;var k=d.dD;this.qb>this.tca?(this.qb=this.tca,k|=d.INa):this.qb<this.wca&&(this.qb=this.wca,k|=d.JNa);if(this.Fn==l.wC){switch(this.Rf){case m.NONE:var c=this.Qe;var h=this.Pe;break;case m.bq:c=this.cn;h=this.Pe*this.cn/this.Qe;break;case m.xk:c=this.Qe*this.bn/this.Pe;h=this.bn;break;case m.Is:this.Qe*this.bn>this.Pe*this.cn?(c=this.Qe*this.bn/this.Pe,h=this.bn):(c=this.cn,h=this.Pe*
this.cn/this.Qe);break;default:case m.Uh:this.Qe*this.bn>this.Pe*this.cn?(c=this.cn,h=this.Pe*this.cn/this.Qe):(c=this.Qe*this.bn/this.Pe,h=this.bn)}c*=this.qb;h*=this.qb;var f=Math.min(.5*this.cn/c,.5);c=Math.max(1-.5*this.cn/c,.5);var b=Math.min(.5*this.bn/h,.5);h=Math.max(1-.5*this.bn/h,.5)}else f=0,c=1,b=0,h=1;this.Na<f?(this.Na=f,k|=d.UH):this.Na>c&&(this.Na=c,k|=d.VH);this.Qa<b?(this.Qa=b,k|=d.gD):this.Qa>h&&(this.Qa=h,k|=d.cD);this.Fn!=l.wC&&this.Fn!=l.hMa||0==this.rd||(this.rd=0,k|=d.ONa);
this.Qn=k}};d.dD=0;d.UH=1;d.VH=2;d.gD=4;d.cD=8;d.JNa=16;d.INa=32;d.ONa=64;return d});
define("gJ",["require"],function(){function a(){this.lO=.1;this.qX=this.P9=this.S9=this.R9=this.Z9=this.O9=this.X9=this.W9=this.oS=this.vha=this.jD=this.v8=this.mS=this.sha=this.lS=this.rha=0}a.prototype.a5=function(d){this.lO=d};a.prototype.eJa=function(d,l,m,k,c,h,f,b){this.rha=d;this.sha=l;this.v8=m;this.vha=k;this.lS+=c;this.mS+=h;this.jD+=f;this.oS+=b};a.prototype.rf=function(){return 0!=this.W9||0!=this.X9||0!=this.O9||0!=this.Z9||0!=this.rha||0!=this.sha||0!=this.v8||0!=this.vha||0!=this.lS||
0!=this.mS||0!=this.jD||0!=this.oS};a.prototype.Fb=function(d){d=1E3/d;this.R9=this.DX(this.W9/d,this.rha/d+this.lS,this.lO);this.S9=this.DX(this.X9/d,this.sha/d+this.mS,this.lO);this.P9=this.DX(this.O9/d,this.v8/d+this.jD,this.lO);this.qX=this.DX(this.Z9/d,this.vha/d+this.oS,this.lO);this.W9=this.R9*d;this.X9=this.S9*d;this.O9=this.P9*d;this.Z9=this.qX*d;this.oS=this.jD=this.mS=this.lS=0};a.prototype.DX=function(d,l,m){return 0==l?this.tg(d,l,m):l};a.prototype.tg=function(d,l,m){d=(l-d)*(1-m);.01>
Math.abs(d)&&(d=0);return l-d};return a});
define("gO","require lV pB cI gF mN".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cI"),k=a("gF");a("mN");var c=d.extend(k,function(){k.call(this);this.jO=7;this.oZ=this.Kba=!1;this.qZ=void 0;this.rd=0;this.qb=1;this.Pe=this.Qe=100;this.OY=1;this.Tda=!0;this.Uda=!1;this.o3a=!0;this.uha=!1;this.ib=null});c.prototype.BU=function(h){this.jO=h};c.prototype.Qc=function(h,f,b,e){this.rd=h;this.qb=f;this.Qe=b;this.Pe=e};c.prototype.Pab=function(h){this.Tda=h;this.w0(this.Tda&&!!this.ib)};c.prototype.vs=
function(h){this.ib!=h&&(this.w0(!1),this.hfa(!1),this.Cm(),this.ib=h,this.w0(this.Tda&&!!this.ib),this.hfa(this.o3a&&!!this.ib))};c.prototype.Cm=function(){this.w0(!1);this.hfa(!1);this.ib=null};c.prototype.w0=function(h){this.Uda!=h&&((this.Uda=h)?this.nPa():this.B1a())};c.prototype.hfa=function(h){this.uha!=h&&((this.uha=h)?this.qPa():this.D1a())};c.prototype.nPa=function(){this.ib.bind(l.hb,this.de,this,!0);this.ib.bind(l.Pb,this.ak,this,!0);this.ib.bind(l.Eb,this.bk,this,!0)};c.prototype.B1a=
function(){this.ib.unbind(l.hb,this.de,this);this.ib.unbind(l.Pb,this.ak,this);this.ib.unbind(l.Eb,this.bk,this)};c.prototype.qPa=function(){this.ib.bind(l.Os,this.AE,this,!0);this.ib.bind(l.DH,this.XD,this,!0)};c.prototype.D1a=function(){this.ib.unbind(l.Os,this.AE,this);this.ib.unbind(l.DH,this.XD,this)};c.prototype.de=function(h){this.k0a(h)};c.prototype.ak=function(h){this.JAa(h)};c.prototype.bk=function(){this.J$()};c.prototype.AE=function(h){this.Tga(h)};c.prototype.XD=function(h){this.Uga(h)};
c.prototype.k0a=function(h){this.Kba=!0;this.oZ=!1;this.qZ=h;this.JAa(h)};c.prototype.JAa=function(h){if(this.Kba){var f=h.pageX-this.qZ.pageX,b=h.pageY-this.qZ.pageY;this.oZ||(Math.sqrt(f*f+b*b)>this.jO?this.oZ=!0:f=b=0);this.oZ&&(this.qZ=h);h=this.rd*Math.PI/180;this.trigger(new m(c.Xp,{xDelta:-((f*Math.cos(h)+b*Math.sin(h))/this.Qe),yDelta:-((b*Math.cos(h)-f*Math.sin(h))/this.Pe)}))}};c.prototype.J$=function(){this.Kba=!1};c.prototype.Uga=function(h){if(this.OY!=h.scale){this.J$();var f=this.OY;
this.OY=h.scale;this.trigger(new m(c.aq,{zoomDelta:this.qb*this.OY/f-this.qb}))}};c.prototype.Tga=function(h){0!=h.delta&&(this.J$(),this.trigger(new m(c.aq,{zoomDelta:this.qb*h.NS*.1})))};c.Xp="position change";c.aq="zoom change";c.Kdb="vieport navigation";c.Jdb="relative navigation";c.Idb="relative exponential navigation";c.Hdb="dragging";return c});define("kl",["require"],function(){return{D7:"rotateClockwise",E7:"rotateCounterClockwise",Ev:"zoomIn",Fv:"zoomOut",Yf:"stop"}});
define("ol","require lV cI gF mN gJ gO kl pB".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("gF"),k=a("mN"),c=a("gJ"),h=a("gO"),f=a("kl");a("pB");var b=d.extend(m,function(e,g){m.call(this);this.j=e;this.pa=g;this.st=this.R_=this.V=!1;this.Qa=this.Na=.5;this.rd=0;this.qb=1;this.Pe=this.Qe=100;this.Rf=k.wC;this.oc=new c;this.vb=new h;this.j.No?(this.vb.BU(b.f8),this.oc.a5(b.g8)):(this.vb.BU(0),this.oc.a5(1));this.vb.bind(h.Xp,this.cXa,this,!0);this.vb.bind(h.aq,this.BA,this,!0)});b.prototype.clear=
function(){this.vb.unbind(h.Xp,this.Peb,this,!0);this.vb.unbind(h.aq,this.BA,this,!0);this.vb.Cm();this.j=this.pa=this.oc=this.vb=null};b.prototype.rk=function(e){switch(e){case f.D7:this.Zc(0,0,+b.a8,0,0,0,0,0);break;case f.E7:this.Zc(0,0,-b.a8,0,0,0,0,0);break;case f.Ev:this.Zc(0,0,0,+b.oN,0,0,0,0);break;case f.Fv:this.Zc(0,0,0,-b.oN,0,0,0,0);break;case f.Yf:this.Zc(0,0,0,0,0,0,0,0)}};b.prototype.setPosition=function(e,g,n,q,p,r){this.Na=e;this.Qa=g;this.rd=n;this.qb=q;this.Qe=p;this.Pe=r;this.vb.Qc(this.rd,
this.qb,this.Qe,this.Pe)};b.prototype.rf=function(){return this.V&&this.oc.rf()};b.prototype.Fb=function(e){this.oc.Fb(e);this.pa.setPosition(this.Na+this.oc.R9,this.Qa+this.oc.S9,this.rd+this.oc.P9,this.qb+this.oc.qX);this.Na=this.pa.getX();this.Qa=this.pa.getY();this.rd=this.pa.tL();this.qb=this.pa.cs()};b.prototype.FU=function(e){this.st=e;this.vb.Pab(!this.st)};b.prototype.sb=function(e){(this.V=e)?this.vb.vs(this.j.getParent()):this.vb.Cm()};b.prototype.cXa=function(e){this.Zc(0,0,0,0,e.data.xDelta,
e.data.yDelta,0,0)};b.prototype.BA=function(e){this.Zc(0,0,0,0,0,0,0,e.data.zoomDelta)};b.prototype.Zc=function(e,g,n,q,p,r,t,u){this.oc.eJa(e,g,n,q,p,r,t,u);this.pi()};b.prototype.pi=function(){this.trigger(new l(b.Th))};b.Th="position change request";b.f8=7;b.g8=.2;b.oN=.5;b.a8=30;return b});
define("ny","require lV cI gF pd bM gJ gO kl pB".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("gF"),k=a("pd"),c=a("bM"),h=a("gJ"),f=a("gO"),b=a("kl");a("pB");var e=d.extend(m,function(g,n){m.call(this);this.j=g;this.pa=n;this.V=!1;this.Qa=this.Na=.5;this.rd=0;this.qb=1;this.Pe=this.Qe=100;this.fa=null;this.E$=!0;this.gd=null;this.o_=0;this.$t=this.bl=this.Ex=void 0;this.oc=new h;this.vb=new f;this.j.No?(this.vb.BU(e.f8),this.oc.a5(e.g8)):(this.vb.BU(0),this.oc.a5(1));this.vb.bind(f.aq,this.BA,
this,!0)});e.prototype.vab=function(g,n){this.Qe=g;this.Pe=n;this.HK()};e.prototype.Jy=function(g){this.gd!=g&&(this.gd=g,this.o_=void 0,this.HK())};e.prototype.Np=function(g,n){this.gd==g&&(this.o_=n,this.HK())};e.prototype.HK=function(){if(this.gd&&void 0!=this.o_){var g=this.gd.get("x",0)/this.Qe;var n=this.gd.get("y",0)/this.Pe;var q=-(this.o_+this.gd.get("angle",0))}else q=n=g=void 0;this.$t!=q&&(this.$t=q,this.pi());if(this.Ex!=g||this.bl!=n)this.Ex=g,this.bl=n,this.rVa(),this.pi()};e.prototype.rVa=
function(){this.E$=!0;this.pi()};e.prototype.xF=function(){if(this.E$||this.fa&&this.fa.Xe())if(this.E$=!1,this.fa=null,void 0!=this.Ex&&void 0!=this.bl&&void 0!=this.$t){for(var g=this.$t-this.rd;180<g;)g-=360;for(;-180>g;)g+=360;this.Na!=this.Ex||this.Qa!=this.bl?this.fa=new k("quad_in_out",[new c("x",this.Na,this.Ex,1),new c("y",this.Qa,this.bl,1),new c("angleDif",g,g,360)],500):this.$t!=this.rd&&(this.fa=new k("quad_in_out",[new c("x",this.Na,this.Na,1),new c("y",this.Qa,this.Qa,1),new c("angleDif",
g,0,360)],500))}};e.prototype.clear=function(){this.vb.unbind(f.aq,this.BA,this,!0);this.vb.Cm();this.j=this.pa=this.fa=this.oc=this.vb=null};e.prototype.rk=function(g){switch(g){case b.Ev:this.Zc(+e.oN,0);break;case b.Fv:this.Zc(-e.oN,0);break;case b.Yf:this.Zc(0,0)}};e.prototype.setPosition=function(g,n,q,p,r,t){this.Na=g;this.Qa=n;this.rd=q;this.qb=p;this.vb.Qc(this.rd,this.qb,r,t)};e.prototype.rf=function(){return this.V&&(this.fa||this.oc.rf()||void 0!=this.Ex&&this.Na!=this.Ex||void 0!=this.bl&&
this.Qa!=this.bl||void 0!=this.$t&&this.rd!=this.$t)?!0:!1};e.prototype.Fb=function(g){this.xF();this.fa?(this.fa.Fb(g),this.Na=this.fa.eb("x"),this.Qa=this.fa.eb("y"),this.rd=this.$t-this.fa.eb("angleDif")):(void 0!=this.Ex&&(this.Na=this.Ex),void 0!=this.bl&&(this.Qa=this.bl),void 0!=this.$t&&(this.rd=this.$t));this.oc.Fb(g);this.pa.setPosition(this.Na,this.Qa,this.rd,this.qb+this.oc.qX);this.Na=this.pa.getX();this.Qa=this.pa.getY();this.rd=this.pa.tL();this.qb=this.pa.cs()};e.prototype.sb=function(g){(this.V=
g)?(this.vb.vs(this.j.getParent()),this.HK()):this.vb.Cm()};e.prototype.BA=function(g){this.Zc(0,g.data.zoomDelta)};e.prototype.Zc=function(g,n){this.oc.eJa(0,0,0,g,0,0,0,n);this.pi()};e.prototype.pi=function(){this.trigger(new l(e.Th))};e.Th="position change request";e.f8=7;e.g8=.2;e.oN=.5;e.a8=30;return e});
define("oJ","require lV cI gF kC mN li ol ny pB".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("gF"),k=a("kC"),c=a("mN"),h=a("li"),f=a("ol"),b=a("ny"),e=a("pB"),g=d.extend(m,function(n){m.call(this);this.j=n;this.j.bind(e.tc,this.Dc,this);this.Fn=k.wC;this.gd=null;this.Qa=this.Na=.5;this.rd=0;this.qb=1;this.Ua=null;this.g0=this.f0=this.iu=this.hu=!1;this.Sn=!0;this.V=!1;this.pa=new h;this.pa.ys(this.Fn);this.ec=new f(this.j,this.pa);this.ec.bind(f.Th,this.br,this,!0);this.Ui=new b(this.j,this.pa);
this.Ui.bind(b.Th,this.br,this,!0);this.T_()});g.prototype.clear=function(){this.ec.unbind(f.Th,this.br,this);this.ec.clear();this.ec=null;this.Ui.unbind(b.Th,this.br,this);this.Ui.clear();this.Ua=this.pa=this.Ui=null;this.j.unbind(e.tc,this.Dc,this);this.j=null};g.prototype.stop=function(){this.pe=this.Ua=null;this.V=!1;this.ec.sb(!1);this.Ui.sb(!1);this.vx(0,0,0)};g.prototype.start=function(n){var q=n.Ua,p=q.get("width",100),r=q.get("height",100),t=q.get("scaleMode",c.Uh),u=q.get("minimumZoomFactor",
1),v=q.get("maximumZoomFactor",1),w=q.get("initialZoomFactor",1);this.Ua=q;this.V=!0;this.pe=n.getItem();this.vx(0,0,0);this.Ui.vab(p,r);this.pa.setConfiguration(p,r,t,u,v);this.pa.setPosition(.5,.5,0,w);this.j.HU(this.pe,this.pa.getX(),this.pa.getY(),this.pa.tL(),this.pa.cs());this.T_()};g.prototype.rk=function(n){this.ec.rk(n);this.Ui.rk(n)};g.prototype.ys=function(n){this.Fn!=n&&(this.Fn=n,this.pa.ys(n),this.T_())};g.prototype.Jy=function(n){this.gd!=n&&(this.gd=n,this.Ui.Jy(n),this.T_())};g.prototype.FU=
function(n){this.ec&&this.ec.FU(n)};g.prototype.Np=function(n,q,p,r){this.Ui.Np(n,q,p,r)};g.prototype.Ay=function(n){this.V&&(this.Ui.rf()?(this.Ui.Fb(n),this.pm(this.Ui.Na,this.Ui.Qa,this.Ui.rd,this.Ui.qb),this.Sa()):this.ec.rf()?(this.ec.Fb(n),this.pm(this.ec.Na,this.ec.Qa,this.ec.rd,this.ec.qb),this.Sa()):this.vx(0,0,0))};g.prototype.Od=function(){if(this.pe){var n=this.j.iT(this.pe),q=this.j.jT(this.pe),p=this.j.g3(this.pe),r=this.j.RDa(this.pe),t=this.j.hT(this.pe),u=this.j.gT(this.pe),v=n-this.Na,
w=q-this.Qa,x=r-this.qb;this.Na=n;this.Qa=q;this.rd=p;this.qb=r;this.vx(v,w,x);this.Ui.setPosition(n,q,p,r,t,u);this.ec.setPosition(n,q,p,r,t,u)}};g.prototype.T_=function(){this.Fn==k.J7&&null!=this.gd&&this.gd.get("map")==this.Ua?(this.ec.sb(!1),this.Ui.sb(!0)):(this.ec.sb(!0),this.Ui.sb(!1))};g.prototype.br=function(){this.Sa()};g.prototype.Dc=function(){this.pa.setSize(this.j.Wa(),this.j.Ab());this.Sa()};g.prototype.Sa=function(){this.trigger(new l(g.Ob))};g.prototype.pm=function(n,q,p,r){this.j.HU(this.pe,
n,q,p,r)};g.prototype.vx=function(n,q,p){n=!1;this.iu!=0>p&&(this.iu=!this.iu,n=!0);this.hu!=0<p&&(this.hu=!this.hu,n=!0);this.f0!=0<this.jD&&(this.f0=!this.f0,n=!0);this.g0!=0>this.jD&&(this.g0=!this.g0,n=!0);this.Sn!=(0==p)&&(this.Sn=!this.Sn,n=!0);n&&this.trigger(new l(g.wk,{rotatingClockwise:this.f0,rotatingCounterClockwise:this.g0,zoomingIn:this.hu,zoomingOut:this.iu,stopped:this.Sn}))};g.Ob="request frame";g.wk="movement change";return g});
define("kp","require lV cI gF mN li".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("gF"),k=a("mN"),c=a("li"),h=d.extend(m,function(f,b){m.call(this);this.M=f;this.j=b;this.pa=new c;this.Pg=[];this.ua=h.Zh;this.Iq=this.Tj=this.Pl=null;this.ih=this.M.get("transitionDuration");this.um=void 0});h.prototype.ys=function(f){this.pa.ys(f)};h.prototype.QS=function(f){f.ET()&&this.n9();this.Pg.push(f);this.RZ()};h.prototype.hide=function(){this.n9();this.Pg.push(null);this.RZ()};h.prototype.clear=function(){this.ua=
h.Zh;this.n9();this.FYa();this.tea();this.j=null};h.prototype.Od=function(f){this.ua==h.Zh||this.ua!=h.Jl&&this.ua!=h.Zs||(this.um+=f,f=Math.min(1,this.um/this.ih),this.ua==h.Jl?this.j.xs(this.Iq,f):this.j.xs(this.uX,1-f),this.um<this.ih?this.Sa():this.ua==h.Jl?this.fSa():this.hSa())};h.prototype.RZ=function(){if(this.ua==h.Zh){for(;0<this.Pg.length&&this.COa(this.Pg[0],this.Tj);)this.Pg.shift();0<this.Pg.length&&this.vq()}};h.prototype.COa=function(f,b){return f==b||!!f&&!!b&&f.isEqual(b)};h.prototype.vq=
function(){!this.Tj||this.Pg[0]&&!this.Pg[0].ET()||this.Tj.Ua==(this.Pg[0]&&this.Pg[0].Ua)||this.trigger(new l(h.zC,{map:this.Tj.Ua}));"fade_out_fade_in"!=this.M.get("transitionMode","blending")||!this.Tj||this.Pg[0]&&!this.Pg[0].ET()?(this.Iq=(this.Pl=this.Pg.shift())&&this.Pl.getItem(),this.Pl?this.CN():this.Tj&&this.Dz()):this.Dz()};h.prototype.CN=function(){this.ZNa();this.Pl.ET()&&this.EZa();this.um=0;this.ua=h.Jl;this.Sa()};h.prototype.fSa=function(){this.tea();this.Tj=this.Pl;this.uX=this.Iq;
this.Iq=this.Pl=null;this.aA()};h.prototype.Dz=function(){this.um=0;this.ua=h.Zs;this.Sa()};h.prototype.hSa=function(){this.tea();this.Tj=null;this.aA()};h.prototype.aA=function(){this.ua=h.Zh;this.Tj&&this.Tj.ET()&&this.trigger(new l(h.AC,{map:this.Tj.Ua}));0==this.Pg.length?this.Tj?this.trigger(new l(h.N6,{level:this.Tj})):this.trigger(new l(h.y6)):this.vq()};h.prototype.EZa=function(){var f=this.Pl.Ua;this.Pl.mk();this.pa.setConfiguration(f.get("width",100),f.get("height",100),f.get("scaleMode",
k.Uh),f.get("minimumZoomFactor",1),f.get("maximumZoomFactor",1));this.pa.setPosition(.5,.5,0,f.get("initialZoomFactor",1));this.j.HU(this.Iq,this.pa.getX(),this.pa.getY(),this.pa.tL(),this.pa.cs())};h.prototype.Sa=function(){this.trigger(new l(h.Ob))};h.prototype.n9=function(){for(;0<this.Pg.length;){var f=this.Pg.shift();f&&this.j.Lj(f.getItem())}};h.prototype.ZNa=function(){this.Pl&&(this.j.yha(this.Iq),this.j.Pha(this.Iq),this.j.xs(this.Iq,0),this.trigger(new l(h.M6,{level:this.Pl})))};h.prototype.tea=
function(){this.Tj&&(this.j.removeItem(this.uX),this.trigger(new l(h.IV,{level:this.Tj})),this.j.Lj(this.uX),this.uX=this.Tj=null)};h.prototype.FYa=function(){this.Pl&&(this.j.removeItem(this.Iq),this.trigger(new l(h.IV,{level:this.Pl})),this.j.Lj(this.Iq),this.Iq=this.Pl=null)};h.Zh="stopped";h.Jl="blending";h.Zs="disolving";h.Ob="request frame";h.M6="level added";h.IV="level removed";h.N6="level fully displayed";h.y6="all pending maps hidden";h.AC="map show";h.zC="map hide";return h});
define("lI",["require"],function(){function a(d,l){this.Ua=d;this.Ya=d.get("image");this.pf=l;this.Fba=void 0}a.prototype.getItem=function(){switch(this.pf){case a.WV:return this.Ua.bEa();default:return this.Ua.nk()}};a.prototype.mk=function(){switch(this.pf){case a.WV:return this.Ua.gG();default:return this.Ua.Zr()}};a.prototype.ET=function(){return void 0===this.Fba?0==this.getIndex():this.Fba};a.prototype.gab=function(d){this.Fba=d};a.prototype.FT=function(){return this.pf==a.ina};a.prototype.isEqual=
function(d){return d&&this.Ua==d.map&&this.pf==d.type};a.prototype.getIndex=function(){return this.pf==a.WV||this.Ua.DL()?0:1};a.prototype.DDa=function(){return this.Ua.DL()?2:1};a.WV="preload";a.ina="load";return a});
define("jw","require lV lh pB cI gF lI w".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("cI"),c=a("gF"),h=a("lI"),f=a("w"),b=d.extend(c,function(e){c.call(this);this.j=e;this.Pg=[];this.cO=this.vE=this.$g=null;this.oE=!1;this.PY=null;this.HZ=d.Ip(this.HZ,this)});b.prototype.clear=function(){this.stop();this.j=null};b.prototype.HFa=function(e,g){if(this.PY!=e||g)this.stop(),this.Ua=e,this.Ua.f$a(),l.ju(this.Ua,"image.levels.url",this.HZ),g=[],e.DL()&&f.pb()&&g.push(new h(e,h.WV)),g.push(new h(e,
h.ina)),g=g.filter(function(n){return n.getItem().Yi()}),g.length&&(this.Pg=this.Pg.concat(g),this.RZ())};b.prototype.HZ=function(){this.reload()};b.prototype.reload=function(){this.HFa(this.Ua,!0)};b.prototype.stop=function(){l.ca(this.Ua,"image.levels.url",this.HZ);this.PY=this.Ua=null;this.Pg=[];this.uza();this.oE&&(this.oE=!1,this.hga(),this.j.Lj(this.$g.getItem()),this.$g=null,this.trigger(new k(b.JV)))};b.prototype.RZ=function(){this.oE||this.mca()};b.prototype.mca=function(){0<this.Pg.length?
(this.$g=this.Pg.shift(),this.oE||(this.oE=!0,this.trigger(new k(b.HV,{level:this.$g,percent:0}))),this.hPa(),this.j.co(this.$g.getItem()),this.j.I5(this.$g.getItem())&&this.Qca()):this.oE&&(this.oE=!1,this.trigger(new k(b.JV)))};b.prototype.Qca=function(){this.hga();this.b0a();this.$g=null;this.mca()};b.prototype.b0a=function(){this.uza();this.vE=this.$g;var e=this;this.cO=setTimeout(function(){e.cO=null;e.LWa()},500)};b.prototype.LWa=function(){var e=this.vE.Ua;this.vE.gab(e!=this.PY);this.PY=e;
this.trigger(new k(b.O6,{level:this.vE}));this.vE=null};b.prototype.uza=function(){null!=this.cO&&(clearTimeout(this.cO),this.cO=null,this.j.Lj(this.vE.getItem()),this.vE=null)};b.prototype.fva=function(){this.hga();this.$g=null;this.mca()};b.prototype.gva=function(e){this.trigger(new k(b.HV,{level:this.$g,percent:e.Ug}))};b.prototype.hPa=function(){var e=this.$g.getItem();e.bind(m.ea,this.Qca,this);e.bind(m.Bc,this.fva,this);e.bind(m.mc,this.gva,this)};b.prototype.hga=function(){var e=this.$g.getItem();
e.unbind(m.ea,this.Qca,this);e.unbind(m.Bc,this.fva,this);e.unbind(m.mc,this.gva,this)};b.HV="level loading progress";b.O6="level loaded";b.JV="load stopped";return b});
define("cU",["require"],function(){function a(d,l){this.x=d;this.y=l}a.prototype.rotate=function(d){var l=Math.cos(d);d=Math.sin(d);var m=this.x*d+this.y*l;this.x=this.x*l-this.y*d;this.y=m;return this};a.prototype.translate=function(d,l){this.x+=d;this.y+=l;return this};a.prototype.scale=function(d,l){this.x*=d;this.y*=l;return this};return a});
define("np",["require","mN","nF"],function(a){function d(k,c,h){this.xg=k;this.jza=c;this.hza=h;this.Rf=l.fz;this.Vl=m.$e;this.xm=m.se}var l=a("mN"),m=a("nF");d.prototype.hC=function(k){this.Rf=k};d.prototype.sM=function(k){this.Vl=k};d.prototype.yM=function(k){this.xm=k};d.prototype.iL=function(k,c,h){var f=this.jza,b=this.hza,e;switch(this.Rf){case l.NONE:var g=e=1;break;case l.Uh:e=g=Math.min(c/f,h/b);break;case l.Is:e=g=Math.max(c/f,h/b);break;case l.bq:e=g=c/f;break;case l.xk:e=g=h/b;break;default:e=
c/f,g=h/b}var n=Math.min(this.jza*e,c);e=Math.min(c/e,f);switch(this.Vl){case m.ab:f=c=0;break;case m.ub:c-=n;f-=e;break;default:c=.5*(c-n),f=.5*(f-e)}var q=Math.min(this.hza*g,h);g=Math.min(h/g,b);switch(this.xm){case m.Hc:b=h=0;break;case m.Ac:h-=q;b-=g;break;default:h=.5*(h-q),b=.5*(b-g)}k.drawImage(this.xg,Math.round(f),Math.round(b),Math.round(e+f-Math.round(f)),Math.round(g+b-Math.round(b)),Math.round(c),Math.round(h),Math.round(n+c-Math.round(c)),Math.round(q+h-Math.round(h)))};return d});
define("mW","require pB iy cU mD np".split(" "),function(a){function d(f,b,e,g){this.j=f;this.Ua=b;this.Qe=this.Ua.get("width");this.Pe=this.Ua.get("height");this.pe=this.Ua.nk();this.eta=e;this.Mo=g;this.dE=null;if(this.Mo){if(this.eK=this.eta.eK,this.sa=this.Mo.get("width"),this.wa=this.Mo.get("height"),this.Na=this.Mo.get("x",0),this.Qa=this.Mo.get("y",0),this.Lw=this.Mo.get("offsetX",0),this.Mw=this.Mo.get("offsetY",0),this.fb=this.Mo.Zr())this.gi=new c(m.Cl),this.gi.load(this.fb.get("url")),
this.gi.bind(l.ea,this.Mva,this)}else this.gi=null}var l=a("pB"),m=a("iy"),k=a("cU"),c=a("mD"),h=a("np");d.prototype.clear=function(){this.Mo=this.eta=this.pe=this.Ua=this.j=null;this.gi&&(this.gi.unbind(l.ea,this.Mva,this),this.gi.cancel(),this.gi=null);this.dE=null};d.prototype.UDa=function(f,b){this.fta=void 0;if(this.dE&&void 0!=f&&void 0!=b){var e=.5*this.j.Wa(),g=.5*this.j.Ab(),n=this.j.g3(this.pe)*Math.PI/180,q=this.j.hT(this.pe),p=this.j.gT(this.pe),r=this.j.iT(this.pe),t=this.j.jT(this.pe);
f=new k(f,b);f.translate(-e,-g);f.rotate(-n);f.scale(1/q,1/p);f.translate(r,t);f.scale(this.Qe,this.Pe);f.translate(-this.Na,-this.Qa);this.eK||(f.rotate(n),f.scale(q/this.Qe,p/this.Pe));f.translate(this.Lw,this.Mw);e=Math.round(f.x);g=Math.round(f.y);0<=e&&e<this.dE.width&&0<=g&&g<this.dE.height&&(e=4*(this.dE.width*g+e),g=this.dE.data,this.fta=0<g[e+3]?"#"+this.b9(g[e+0])+this.b9(g[e+1])+this.b9(g[e+2]):"transparent")}return this.fta};d.prototype.Mva=function(){var f=new h(this.gi.Cf(),this.fb.get("width"),
this.fb.get("height"));f.hC(this.Mo.get("scaleMode"));f.sM(this.Mo.get("horizontalAlign"));f.yM(this.Mo.get("verticalAlign"));var b=document.createElement("canvas");b.width=Math.round(this.sa);b.height=Math.round(this.wa);var e=b.getContext("2d");f.iL(e,b.width,b.height);this.dE=e.getImageData(0,0,b.width,b.height);b.width=b.height=0};d.prototype.b9=function(f){for(f=f.toString(16);2>f.length;)f="0"+f;return f};return d});
define("lC","require er lV pB cI gF oq mW bi pd bM".split(" "),function(a){var d=a("er"),l=a("lV"),m=a("pB"),k=a("cI"),c=a("gF"),h=a("oq"),f=a("mW"),b=a("bi"),e=a("pd"),g=a("bM"),n=l.extend(c,function(q,p,r){c.call(this);this.j=q;this.Ua=p;this.qc=r;this.Aa=this.qc.getItem();this.tr=this.qc.eEa();this.ur=this.qc.hEa();this.Bw=this.yn=void 0;this.M=this.j.getParent();this.M.bind(m.Pb,this.Pf,this);this.M.bind(m.Jb,this.WP,this);this.M.bind(m.hb,this.So,this);this.M.bind(m.Eb,this.Tw,this);this.M.bind(m.ma,
this.Sw,this);r.bind(m.G("selected"),this.Bwa,this);r.bind(m.G("enabled"),this.Zq,this);this.ZY=new f(this.j,this.Ua,this.qc,this.qc.get("map",null));this.aZ=new f(this.j,this.Ua,this.qc,this.qc.get("rollOverMap",this.qc.get("map",null)));this.bZ=new f(this.j,this.Ua,this.qc,this.qc.get("selectedMap",this.qc.get("rollOverMap",this.qc.get("map",null))));this.lY=new f(this.j,this.Ua,this.qc,this.qc.get("image",null));this.mY=new f(this.j,this.Ua,this.qc,this.qc.get("rollOverImage",this.qc.get("image",
null)));this.nY=new f(this.j,this.Ua,this.qc,this.qc.get("selectedImage",this.qc.get("rollOverImage",this.qc.get("image",null))));this.od=this.nd=void 0;this.CK=null;this.Mv=[];this.ct=[];this.NN=[];this.$h={};this.bua=[];this.vw=!1;this.Wga=this.qc.get("useHandCursor");this.fa=null;this.tK=void 0;this.p0=this.d0=this.GY=0;q=this.qc.get("areas",[]);for(p=0;p<q.length;p++){r=q[p];var t=r.get("mapColor");t&&(t=t.toLowerCase(),void 0===this.$h[t]&&(this.$h[t]=[],this.bua.push(t)),this.$h[t].push(r))}this.Aa&&
(this.j.W1(this.Ua.nk(),this.Aa),this.j.xs(this.Aa,this.GY));this.tr&&(this.j.W1(this.Ua.nk(),this.tr),this.j.xs(this.tr,this.d0));this.ur&&(this.j.W1(this.Ua.nk(),this.ur),this.j.xs(this.ur,this.p0));this.jR("none");this.tga();this.Dya(!1);this.Eya(this.qc.get("selected"))});n.prototype.clear=function(){this.M.unbind(m.Pb,this.Pf,this);this.M.unbind(m.Jb,this.WP,this);this.M.unbind(m.hb,this.So,this);this.M.unbind(m.Eb,this.Tw,this);this.M.unbind(m.ma,this.Sw,this);this.M=null;this.ZY&&this.ZY.clear();
this.ZY=null;this.aZ&&this.aZ.clear();this.aZ=null;this.bZ&&this.bZ.clear();this.bZ=null;this.lY&&this.lY.clear();this.lY=null;this.mY&&this.mY.clear();this.mY=null;this.nY&&this.nY.clear();this.nY=null;this.Mv=[];this.yn=!1;this.tga();this.ct=[];this.NN=[];this.$h={};this.zza();this.aS();this.Ua=this.j=null;this.qc.unbind(m.G("selected"),this.Bwa,this);this.ur=this.tr=this.Aa=this.qc=null};n.prototype.match=function(q){return this.qc==q};n.prototype.Od=function(q){this.dJ(!1);this.fa&&(this.fa.Fb(q),
this.GY=this.fa.eb("itemAlpha"),this.d0=this.fa.eb("rollOverItemAlpha"),this.p0=this.fa.eb("selectedItemAlpha"),this.Aa&&this.j.xs(this.Aa,this.GY),this.tr&&this.j.xs(this.tr,this.d0),this.ur&&this.j.xs(this.ur,this.p0),this.fa.Xe()?this.fa=null:this.Sa())};n.prototype.So=function(q){this.nd=q.x-this.M.Fm();this.od=q.y-this.M.vu();this.dJ(!0);this.ct=this.Mv.slice()};n.prototype.Pf=function(q){this.nd=q.x-this.M.Fm();this.od=q.y-this.M.vu();this.dJ(!0)};n.prototype.Tw=function(q){this.nd=q.x-this.M.Fm();
this.od=q.y-this.M.vu();this.dJ(!0);this.NN=d.intersection(this.ct,this.Mv);this.ct=[]};n.prototype.Sw=function(){this.NN&&(this.aga(this.NN,"click"),this.NN=[])};n.prototype.WP=function(){this.od=this.nd=void 0;this.dJ(!0);this.ct=this.Mv.slice()};n.prototype.Bwa=function(){this.Eya(this.qc.get("selected"))};n.prototype.Zq=function(){this.dJ(!0);this.Ag();this.Sa()};n.prototype.dJ=function(q){this.uta=!0;q?this.BK():this.JVa()||this.w0a()};n.prototype.w0a=function(){this.zza();var q=this;this.CK=
setTimeout(function(){q.CK=null;q.BK()},200)};n.prototype.JVa=function(){return this.CK?!0:!1};n.prototype.zza=function(){this.CK&&(clearTimeout(this.CK),this.CK=null)};n.prototype.BK=function(){if(this.uta){this.uta=!1;var q=this.Mv,p=this.TSa();this.Mv=p;this.M.No||(this.aga(d.difference(p,q),"rollOver"),this.Dya(0<p.length),this.aga(d.difference(q,p),"rollOut"),this.aS())}};n.prototype.aS=function(){for(var q="",p=0;p<this.Mv.length&&!q;p++){var r=this.Mv[p];r.get("toolTip")&&(q=r.get("toolTip"))}this.$b!=
q&&(this.$b&&this.j.y9a(this.$b),(this.$b=q)&&this.j.E9a(this.$b))};n.prototype.tga=function(){var q=this.yn&&(!1!==this.Wga||d(this.Mv).any(function(p){return!0===p.get("useHandCursor")}));this.vw!=q&&((this.vw=q)?this.j.Q4(b.Le):this.j.iM(b.Le))};n.prototype.TSa=function(){if(!1===this.qc.get("enabled"))return[];var q=[],p=this.Bw?this.bZ:this.yn?this.aZ:this.ZY;p&&(p=p.UDa(this.nd,this.od))&&(this.$h.any&&(q=q.concat(this.$h.any)),"transparent"==p&&this.$h.transparent&&(q=q.concat(this.$h.transparent)),
"transparent"!=p&&(q=this.$h[p]?q.concat(this.$h[p]):q.concat(this.$h[h.o$a(p,this.bua)]||[]),this.$h.image&&(q=q.concat(this.$h.image))));if(p=this.Bw?this.nY:this.yn?this.mY:this.lY)if(p=p.UDa(this.nd,this.od))this.$h.any&&(q=q.concat(this.$h.any)),"transparent"==p&&this.$h.transparent&&(q=q.concat(this.$h.transparent)),"transparent"!=p&&this.$h.image&&(q=q.concat(this.$h.image));p=[];for(var r=0;r<q.length;r++){var t=q[r];0>p.indexOf(t)&&p.push(t)}return p};n.prototype.aga=function(q,p){if(q)for(var r=
0;r<q.length;r++)q[r].trigger(new k(p))};n.prototype.JL=function(){return this.yn};n.prototype.Dya=function(q){this.yn!=q&&(this.yn=q,this.trigger(new k(n.I6)),this.Ag(),this.tga(),this.Sa())};n.prototype.Eya=function(q){this.Bw!=q&&(this.Bw=q,this.Ag(),this.Sa())};n.prototype.Ag=function(){!this.yn&&1==this.qc.get("rollOverDisplay")||!1===this.qc.get("enabled")?this.jR("none"):this.Bw?this.jR("selected"):this.yn?this.jR("roll over"):this.jR("visible")};n.prototype.jR=function(q){if(this.tK!=q){this.tK=
q;var p;if(d(["selected"]).contains(this.tK)&&this.ur){var r=1;q=p=0}else d(["selected","roll over"]).contains(this.tK)&&this.tr?(p=1,q=r=0):d(["selected","roll over","visible"]).contains(this.tK)?(q=1,r=p=0):q=r=p=0;var t=this.GY,u=this.d0,v=this.p0,w=Math.max(200*Math.abs(q-t),200*Math.abs(p-u),200*Math.abs(r-v));this.fa=new e("none"==this.tK?"quad_out":"quad_in",[new g("itemAlpha",t,q),new g("rollOverItemAlpha",u,p),new g("selectedItemAlpha",v,r)],w)}};n.prototype.Sa=function(){this.trigger(new k(n.Ob))};
n.Ob="request frame";n.I6="is over update";return n});define("nE",["require","lV","ky"],function(a){var d=a("lV"),l=a("ky");a=d.extend(l,function(m,k,c,h,f,b,e){l.call(this,l.noa,m,k);this.hVa=c;this.iVa=h;this.RXa=f;this.SXa=b;this.Tc=e;this.cS=[]});a.prototype.iy=function(){return this.Tc};return a});
define("fY","require lV pB cI gF cU nE".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cI"),k=a("gF"),c=a("cU"),h=a("nE"),f=d.extend(k,function(b,e,g){k.call(this);this.j=b;this.M=this.j.getParent();this.M.bind(l.hb,this.So,this,!0);this.M.bind(l.Pb,this.Pf,this,!0);this.M.bind(l.hq,this.WP,this,!0);this.Ua=e;this.Qe=this.Ua.get("width");this.Pe=this.Ua.get("height");this.wYa=Math.sqrt(this.Qe*this.Qe+this.Pe*this.Pe)*this.Ua.get("fieldOfViewOverlayRadiusScale",1);this.pe=this.Ua.nk();this.gd=
g;this.KJ=this.gd.get("x",0);this.LJ=this.gd.get("y",0);this.n_=this.gd.get("angle",0);this.Aa=this.gRa();this.st=!1;this.Ka=0;this.Xa=.5*Math.PI;this.de=!1;this.od=this.nd=void 0;this.j.W1(this.Ua.nk(),this.Aa)});f.prototype.hJa=function(b,e){this.Ka=b+this.n_-90;this.Xa=e;this.Sa()};f.prototype.clear=function(){this.M.unbind(l.hb,this.So,this);this.M.unbind(l.Pb,this.Pf,this);this.M.unbind(l.hq,this.WP,this);this.M=null;this.j.M9a(this.Ua.nk(),this.Aa);this.Aa=this.gd=this.pe=this.Ua=this.j=null};
f.prototype.Od=function(){this.j.jab(this.Aa,this.Ka,this.Xa)};f.prototype.gRa=function(){return new h(this.KJ,this.LJ,this.Ua.get("fieldOfViewOverlayInsideColor","#FFFFFF"),this.Ua.get("fieldOfViewOverlayInsideOpacity",0),this.Ua.get("fieldOfViewOverlayOutsideColor","#000000"),this.Ua.get("fieldOfViewOverlayOutsideOpacity",0),this.Ua.get("fieldOfViewOverlayRadiusScale",1))};f.prototype.Sa=function(){this.trigger(new m(f.Ob))};f.prototype.xga=function(){var b=!1;if(void 0!=this.nd&&void 0!=this.od){var e=
.5*this.j.Wa(),g=.5*this.j.Ab(),n=this.j.g3(this.pe)*Math.PI/180,q=this.j.hT(this.pe),p=this.j.gT(this.pe),r=this.j.iT(this.pe),t=this.j.jT(this.pe);b=new c(this.nd,this.od);b.translate(-e,-g);b.rotate(-n);b.scale(1/q,1/p);b.translate(r,t);b.scale(this.Qe,this.Pe);b.translate(-this.KJ,-this.LJ);b.rotate(-this.Ka*Math.PI/180);e=Math.round(180*Math.atan2(b.y,b.x)/Math.PI);b=Math.round(Math.sqrt(b.x*b.x+b.y*b.y))<=this.wYa&&Math.abs(e)<.5*this.Xa}this.st!=b&&(this.st=b,this.trigger(new m(f.s7,{inFOV:this.st})))};
f.prototype.x7a=function(){return this.st};f.prototype.So=function(b){this.nd=b.x;this.od=b.y;this.de=!0;this.xga()};f.prototype.Pf=function(b){this.de||(this.nd=b.x,this.od=b.y,this.xga())};f.prototype.WP=function(){this.od=this.nd=void 0;this.de=!1;this.xga()};f.Ob="request frame";f.s7="mouse in fov change";return f});
define("pn","require er lV cI gF iO lC fY".split(" "),function(a){var d=a("er"),l=a("lV"),m=a("cI"),k=a("gF"),c=a("iO"),h=a("lC"),f=a("fY"),b=l.extend(k,function(e){k.call(this);this.j=e;this.nP=[];this.yw=[];this.tn=[];this.Kn=this.gd=null});b.prototype.clear=function(){for(var e=0;e<this.yw.length;e++)this.yw[e].clear();for(e=0;e<this.tn.length;e++)this.tn[e].clear();this.j=this.nP=this.gd=this.tn=this.yw=null};b.prototype.QS=function(e){e.FT()&&this.kOa(e.Ua)};b.prototype.gja=function(e){e.FT()&&
this.PYa(e.Ua)};b.prototype.Jy=function(e){this.gd!=e&&(this.gd&&this.wea(this.gd.get("map")),this.gd=e,this.Kn=null,this.gd&&(e=this.gd.get("map"),this.Hba(e)&&this.jpa(e)))};b.prototype.Np=function(e,g,n,q){this.Kn={yaw:g,pitch:n,hfov:q};for(n=0;n<this.tn.length;n++){var p=this.tn[n];if(p.gd==e){p.hJa(g,q);break}}};b.prototype.kOa=function(e){this.Hba(e)&&(this.Nxa(e),this.wea(e));this.nP.push(e);this.cOa(e);this.jpa(e)};b.prototype.PYa=function(e){var g=this.nP.indexOf(e);0<=g&&this.nP.splice(g,
1);this.Hba(e)||(this.Nxa(e),this.wea(e))};b.prototype.Hba=function(e){return 0<=d(this.nP).indexOf(e)};b.prototype.Od=function(e){for(var g=0;g<this.yw.length;g++)this.yw[g].Od(e);for(g=0;g<this.tn.length;g++)this.tn[g].Od(e)};b.prototype.cOa=function(e){for(var g=e.get("overlays",[]),n=0;n<g.length;n++){var q=g[n];q instanceof c&&(q=new h(this.j,e,q),q.bind(h.Ob,this.Sa,this,!0),q.bind(h.I6,this.Gta,this,!0),this.yw.push(q))}};b.prototype.jpa=function(e){this.gd&&this.gd.get("map")==e&&!1!==this.gd.get("visible")&&
(e=new f(this.j,e,this.gd),e.bind(f.Ob,this.Sa,this,!0),e.bind(f.s7,this.CZ,this,!0),this.tn.push(e),this.Kn&&e.hJa(this.Kn.yaw,this.Kn.hfov));this.CZ()};b.prototype.Nxa=function(e){e=e.get("overlays",[]);for(var g=0;g<e.length;g++)for(var n=e[g],q=0;q<this.yw.length;q++){var p=this.yw[q];if(p.match(n)){p.unbind(h.Ob,this.Sa,this);p.unbind(h.I6,this.Gta,this);p.clear();this.yw.splice(q,1);break}}};b.prototype.wea=function(e){for(var g=0;g<this.tn.length;g++){var n=this.tn[g];if(n.Ua==e){n.unbind(f.Ob,
this.Sa,this);n.unbind(f.s7,this.CZ,this);n.clear();this.tn.splice(g,1);break}}this.CZ()};b.prototype.Gta=function(){};b.prototype.Sa=function(){this.trigger(new m(b.Ob))};b.prototype.CZ=function(){for(var e=!1,g=0;g<this.tn.length;g++)this.tn[g].x7a()&&(e=!0);this.trigger(new m(b.H6,{inFOV:e}))};b.Ob="request frame";b.H6="in fov change";return b});
define("ld","require lV pB cI gF kC cU".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cI"),k=a("gF"),c=a("kC"),h=a("cU"),f=d.extend(k,function(b){k.call(this);this.j=b;this.M=this.j.getParent();this.M.bind(l.Pb,this.Pf,this,!0);this.M.bind(l.hb,this.So,this,!0);this.M.bind(l.Eb,this.Tw,this,!0);this.Ua=null;this.pe=this.Pe=this.Qe=void 0;this.gd=null;this.n_=this.LJ=this.KJ=void 0;this.st=!1;this.od=this.nd=this.Fn=void 0;this.de=!1;this.Ka=0});f.prototype.clear=function(){this.M.unbind(l.Pb,
this.Pf,this);this.M.unbind(l.hb,this.So,this);this.M.unbind(l.Eb,this.Tw,this);this.j=this.gd=this.pe=this.Ua=this.M=null};f.prototype.FU=function(b){this.st=b;this.pga()};f.prototype.QS=function(b){b.FT()&&this.Hya(b.Ua)};f.prototype.gja=function(b){b.FT()&&this.Ua==b.Ua&&this.Hya(null)};f.prototype.Hya=function(b){this.Ua!=b&&((this.Ua=b)?(this.Qe=this.Ua.get("width"),this.Pe=this.Ua.get("height"),this.pe=this.Ua.nk()):(this.Pe=this.Qe=void 0,this.pe=null))};f.prototype.Jy=function(b){this.gd!=
b&&((this.gd=b)?(this.KJ=this.gd.get("x",0),this.LJ=this.gd.get("y",0),this.n_=this.gd.get("angle",0)):this.n_=this.LJ=this.KJ=void 0)};f.prototype.Np=function(b,e){this.gd==b&&(this.Ka=e)};f.prototype.ys=function(b){this.Fn=b};f.prototype.So=function(b){this.nd=b.x;this.od=b.y;this.de=!0;this.pga()};f.prototype.Pf=function(b){this.nd=b.x;this.od=b.y;this.Ei&&(b=this.Isa(),this.trigger(new m(f.xi,{yawDelta:b-this.rd})),this.rd=b)};f.prototype.Tw=function(b){this.nd=b.x;this.od=b.y;this.de=!1;this.pga()};
f.prototype.pga=function(){var b=this.de&&this.gd&&this.Ua&&(this.Fn==c.J7||this.st);this.Ei!=b&&(this.Ei=b)&&(this.rd=this.Isa())};f.prototype.Isa=function(){var b=.5*this.j.Wa(),e=.5*this.j.Ab(),g=new h(this.nd,this.od);g.translate(-b,-e);if(this.Fn==c.J7)return 180*-Math.atan2(g.y,g.x)/Math.PI;b=this.j.g3(this.pe)*Math.PI/180;e=this.j.hT(this.pe);var n=this.j.gT(this.pe),q=this.j.iT(this.pe),p=this.j.jT(this.pe);g.rotate(-b);g.scale(1/e,1/n);g.translate(q,p);g.scale(this.Qe,this.Pe);g.translate(-this.KJ,
-this.LJ);return 180*Math.atan2(g.y,g.x)/Math.PI};f.xi="request yaw change";return f});
define("nx",["require","lV","cI","gF","bo"],function(a){var d=a("lV"),l=a("cI"),m=a("gF"),k=a("bo"),c=d.extend(m,function(h){m.call(this);this.V=!0;this.UD=!1;this.j=h});c.prototype.clear=function(){this.V=!1;this.j=null};c.prototype.requestFrame=function(){this.UD||(this.UD=!0,k.requestFrame(this.ek,this))};c.prototype.ek=function(h){this.V&&(this.UD=!1,this.trigger(new l(c.Yp,{frameTime:h})),this.trigger(new l(c.Zp,{frameTime:h})),this.j.render())};c.Yp="frameStart";c.Zp="positionSet";return c});
define("dw","require lV pB cI gF oJ kp jw pn ld nx".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cI"),k=a("gF"),c=a("oJ"),h=a("kp"),f=a("jw"),b=a("pn"),e=a("ld"),g=a("nx"),n=d.extend(k,function(q,p){k.call(this);this.M=q;this.j=p;this.j.set("visible",!1);this.t_=null;this.wg=new g(this.j);this.oe=new f(this.j);this.Oa=new h(this.M,this.j);this.jb=new c(this.j);this.hr=new b(this.j);this.Ct=new e(this.j);this.M.bind(l.kd,this.f_,this,!0);this.wg.bind(g.Yp,this.DA,this,!0);this.wg.bind(g.Zp,
this.EA,this,!0);this.oe.bind(f.JV,this.SP,this);this.oe.bind(f.O6,this.Bva,this);this.oe.bind(f.HV,this.Cva,this);this.Oa.bind(h.Ob,this.df,this,!0);this.Oa.bind(h.M6,this.zva,this,!0);this.Oa.bind(h.IV,this.Dva,this,!0);this.Oa.bind(h.N6,this.Ava,this,!0);this.Oa.bind(h.zC,this.Pw,this,!0);this.Oa.bind(h.AC,this.zA,this,!0);this.Oa.bind(h.y6,this.Nua,this,!0);this.jb.bind(c.Ob,this.df,this,!0);this.jb.bind(c.wk,this.$q,this);this.hr.bind(b.Ob,this.df,this,!0);this.hr.bind(b.H6,this.pva,this,!0);
this.Ct.bind(e.xi,this.hQ,this,!0);this.Fra=!1});n.prototype.ys=function(q){this.jb.ys(q);this.Oa.ys(q);this.Ct.ys(q)};n.prototype.clear=function(){this.Fra=!0;this.oe.clear();this.wg.clear();this.jb.clear();this.Oa.clear();this.hr.clear();this.Ct.clear();this.M.unbind(l.kd,this.f_,this);this.oe.unbind(f.JV,this.SP,this);this.oe.unbind(f.O6,this.Bva,this);this.oe.unbind(f.HV,this.Cva,this);this.wg.unbind(g.Yp,this.DA,this);this.wg.unbind(g.Zp,this.EA,this);this.Oa.unbind(h.Ob,this.df,this);this.Oa.unbind(h.M6,
this.zva,this);this.Oa.unbind(h.IV,this.Dva,this);this.Oa.unbind(h.N6,this.Ava,this);this.Oa.unbind(h.zC,this.Pw,this);this.Oa.unbind(h.AC,this.zA,this);this.Oa.unbind(h.y6,this.Nua,this);this.jb.unbind(c.ZLa,this.df,this);this.jb.unbind(c.wk,this.$q,this);this.hr.unbind(b.Ob,this.df,this);this.hr.unbind(b.H6,this.pva,this);this.Ct.unbind(e.xi,this.hQ,this);this.M=this.j=this.Ct=this.hr=this.Oa=this.jb=this.wg=this.oe=null};n.prototype.f_=function(){this.t_&&(this.$Ia(this.t_),this.t_=null)};n.prototype.$Ia=
function(q){this.j.set("visible",!0);this.M.nA?this.oe.HFa(q):(this.oe.stop(),this.jb.stop(),this.Oa.hide(),this.t_=q)};n.prototype.Ey=function(){this.oe.stop();this.jb.stop();this.Oa.hide()};n.prototype.rk=function(q){this.jb.rk(q)};n.prototype.Jy=function(q){this.Fra||(this.jb.Jy(q),this.hr.Jy(q),this.Ct.Jy(q))};n.prototype.Np=function(q,p,r,t){this.jb.Np(q,p,r,t);this.hr.Np(q,p,r,t);this.Ct.Np(q,p,r,t)};n.prototype.Cva=function(q){var p=q.data.level;q=(q.data.percent+100*p.getIndex())/p.DDa();
this.trigger(new m(n.jv,{percent:q}))};n.prototype.Bva=function(q){this.j.set("visible",!0);q=q.data.level;this.jb.stop();this.Oa.QS(q)};n.prototype.SP=function(){this.trigger(new m(n.yC))};n.prototype.df=function(){this.wg.requestFrame()};n.prototype.DA=function(q){this.jb.Ay(q.data.frameTime)};n.prototype.EA=function(q){q=q.data.frameTime;this.Oa.Od(q);this.jb.Od(q);this.hr.Od(q)};n.prototype.zva=function(q){q=q.data.level;this.hr.QS(q);this.Ct.QS(q)};n.prototype.Dva=function(q){q=q.data.level;
this.hr.gja(q);this.Ct.gja(q)};n.prototype.Ava=function(q){q=q.data.level;q.FT()&&this.jb.start(q)};n.prototype.Nua=function(){this.j.set("visible",!1)};n.prototype.pva=function(q){q=q.data.inFOV;this.jb.FU(q);this.Ct.FU(q)};n.prototype.zA=function(q){this.trigger(new m(n.AC,{map:q.data.map}))};n.prototype.Pw=function(q){this.trigger(new m(n.zC,{map:q.data.map}))};n.prototype.$q=function(q){this.trigger(new m(n.wk,q.data))};n.prototype.hQ=function(q){this.trigger(new m(n.xi,{yawDelta:q.data.yawDelta}))};
n.wk="movementChange";n.yC="loadingEnd";n.jv="loadingProgress";n.AC="mapShow";n.zC="mapHide";n.xi="requestYawChange";return n});define("lq",["require","iy"],function(a){function d(){this.status=d.SV;this.progress=this.Jj=0;this.Fka=[]}a("iy");d.LOADING="loading";d.ea="loaded";d.SV="not loaded";return d});
define("lS","require er lV cI pB mD lq".split(" "),function(a){function d(){this.Hra={};this.Ch=[];this.vA=[];this.Cd={}}var l=a("er"),m=a("lV");a("cI");var k=a("pB"),c=a("mD"),h=a("lq");d.prototype.I5=function(f){f=f.Du();for(var b=0,e=f.length;b<e;b++)if(this.wO(f[b]).status!=h.ea)return!1;return!0};d.prototype.co=function(f,b){this.Ch.push(f);this.fOa(f,b)};d.prototype.Lj=function(f,b){var e=l(this.Ch).indexOf(f);0>e&&m.log("Unloading item not loaded");this.Ch.splice(e,1);this.MYa(f,b)};d.prototype.Cf=
function(f,b){return this.Cd[f].Cf(b)};d.prototype.fOa=function(f,b){this.vA.push(f);f=f.Du();for(var e=0,g=f.length;e<g;e++){var n=f[e],q=this.wO(n);q.Jj++;q.Fka.push(b);q.status==h.SV&&(q.status=h.LOADING,this.$Va(n,Math.min.apply(Math,q.Fka)))}this.EAa()};d.prototype.MYa=function(f,b){this.vA=l(this.vA).without(f);f=f.Du();for(var e=0,g=f.length;e<g;e++){var n=f[e],q=this.wO(n);q.Jj--;var p=q.Fka,r=p.indexOf(b);0<=r&&p.splice(r,1);0==q.Jj&&q.status!=h.SV&&(q.status=h.SV,q.progress=0,this.H1a(n))}};
d.prototype.EAa=function(f){f=(void 0==f?this.vA:this.Gsa(f)).slice();for(var b=0;b<f.length;b++){for(var e=f[b],g=e.Du(),n=0,q=0,p=g.length,r=0;r<g.length;r++){var t=this.wO(g[r]);n+=t.progress;t.status==h.ea&&q++}e.tab(n/p);q==p&&(e.KU(),this.vA=l(this.vA).without(e))}};d.prototype.wO=function(f){var b=this.Hra[f];b||(this.Hra[f]=b=new h);return b};d.prototype.Gsa=function(f){for(var b=[],e=0;e<this.vA.length;e++){var g=this.vA[e];l(g.Du()).contains(f)&&b.push(g)}return b};d.prototype.$Va=function(f,
b){b=new c(b);this.Cd[f]=b;b.bind(k.ea,this.TP,this,!0);b.bind(k.Bc,this.UP,this,!0);b.load(f)};d.prototype.H1a=function(f){var b=this.Cd[f];delete this.Cd[f];b.unbind(k.ea,this.TP,this);b.unbind(k.Bc,this.UP,this);b.cancel()};d.prototype.TP=function(f){f=f.source.Yi();var b=this.wO(f);b.progress=100;b.status=h.ea;this.EAa(f)};d.prototype.UP=function(f){f=f.source.Yi();for(var b=this.Gsa(f),e=0;e<b.length;e++){var g=b[e];this.Lj(g);g.P$a()}m.log("Error loading: "+f)};return d.instance=new d});
define("hY",["require","jquery.mod","w"],function(a){function d(m,k){this.Aa=m;this.ta=k;this.iP=0;this.Ot=this.Nt=.5;this.Zk=0;this.Mb=1;this.zr=this.Fw=this.wa=this.sa=0;this.Tc=1;this.yY=this.AY=!0;this.xa=l("<canvas/>");this.T=this.xa.get(0);this.Da=this.T.getContext("2d")}var l=a("jquery.mod");a=a("w");d.prototype.getItem=function(){return this.Aa};d.prototype.WS=function(m){return this.Aa==m?this:null};d.prototype.N2=function(m){return this.Aa==m?[this]:[]};d.prototype.Kh=function(){this.ta&&
this.ta.Oha(this)};d.prototype.gf=function(m){this.q_a(m)};d.prototype.Fya=function(m){this.iP!=m&&(this.iP=m,this.ta&&this.ta.C3())};d.prototype.q_a=function(m){this.Mb!=m&&(this.Mb=m,this.B3())};d.prototype.x0=function(m){this.Zk!=m&&(this.Zk=m,this.B3())};d.prototype.iR=function(m,k){if(this.sa!=m||this.wa!=k)this.sa=m,this.wa=k,this.y3()};d.prototype.pm=function(m,k){if(this.Fw!=m||this.zr!=k)this.Fw=m,this.zr=k,this.B3()};d.prototype.B3=function(){this.ta&&this.ta.z3()};d.prototype.xe=function(){this.AY=
!0};d.prototype.bb=function(){this.AY&&(this.AY=!1,this.jh())};d.prototype.jh=function(){};d.prototype.y3=function(){this.yY=!0;this.B3()};d.prototype.Qy=function(){if(this.yY){this.yY=!1;if(this.T.width!=this.sa||this.T.height!=this.wa)this.T.width=Math.round(this.sa),this.T.height=Math.round(this.wa);this.Da.clearRect(0,0,this.T.width,this.T.height);this.yg()}};d.prototype.yg=function(){};d.prototype.m5a=function(m){if(0<this.Mb&&1<=this.sa&&1<=this.wa){m.save();var k=Math.round(this.Fw),c=Math.round(this.zr),
h=Math.round(this.sa*this.Nt),f=Math.round(this.wa*this.Ot);m.scale(this.Tc,this.Tc);m.translate(k+h,c+f);m.rotate(this.Zk*Math.PI/180);m.globalAlpha=this.Mb;m.drawImage(this.T,-h,-f);m.restore()}};d.prototype.W2=function(){this.T.width=this.T.height=1;this.AY=this.yY=!0};d.jna=Math.min(window.devicePixelRatio||1,a.zd()==a.Vy?2:Infinity);d.qk=d.jna;d.tMa=a.zd()==a.yi?16E6:256E6;return d});
define("nw",["require","er","lV","hY"],function(a){var d=a("er"),l=a("lV"),m=a("hY");a=l.extend(m,function(k,c){m.call(this,k,c);this.Cc=[];this.U1=null;this.Qx=!0});a.prototype.wBa=function(k){k=this.G9(k);if(!k)throw"Container renderer can't create child renderer for an item";this.Cc.push(k);this.C3();this.z3()};a.prototype.G9=function(){};a.prototype.XHa=function(k){if(k=this.ru(k))this.Cc=d.without(this.Cc,k),this.C3(),this.z3()};a.prototype.WS=function(k){for(var c=m.prototype.WS.call(this,k),
h=0;h<this.Cc.length&&!c;h++)c=this.Cc[h].WS(k);return c};a.prototype.N2=function(k){for(var c=m.prototype.N2.call(this,k),h=0;h<this.Cc.length;h++)c=c.concat(this.Cc[h].N2(k));return c};a.prototype.ru=function(k){for(var c=null,h=0;h<this.Cc.length&&!c;h++)this.Cc[h].getItem()==k&&(c=this.Cc[h]);for(h=0;h<this.Cc.length&&!c;h++)this.Cc[h].getItem().i7a(k)&&(c=this.Cc[h]);return c};a.prototype.Oha=function(k){this.Cc=d.without(this.Cc,k);this.Cc.push(k);this.C3();this.z3()};a.prototype.C3=function(){this.Qx=
!0;this.xe()};a.prototype.z3=function(){this.y3()};a.prototype.bb=function(){m.prototype.bb.call(this);for(var k=0;k<this.Cc.length;k++)this.Cc[k].bb()};a.prototype.jh=function(){if(this.Qx){this.Qx=!1;for(var k=[],c=0;c<this.Cc.length;c++){var h=this.Cc[c];k.push({l:h.iP,z:c,r:h})}k.sort(function(f,b){return f.l==b.l?f.z-b.z:f.l-b.l});this.U1=[];for(c=0;c<k.length;c++)this.U1.push(k[c].r);this.y3()}m.prototype.jh.call(this)};a.prototype.Qy=function(){for(var k=0;k<this.Cc.length;k++)this.Cc[k].Qy();
m.prototype.Qy.call(this)};a.prototype.yg=function(){for(var k=0;k<this.U1.length;k++)this.U1[k].m5a(this.Da);m.prototype.yg.call(this)};a.prototype.W2=function(){for(var k=0;k<this.Cc.length;k++)this.Cc[k].W2();m.prototype.W2.call(this)};return a});define("Q",["require","lV","hY"],function(a){var d=a("lV"),l=a("hY");a=d.extend(l,function(m,k){l.call(this,m,k)});a.prototype.d5=function(){};return a});
define("jh",["require","lV","Q","w"],function(a){var d=a("lV"),l=a("Q"),m=a("w");a=d.extend(l,function(k,c){l.call(this,k,c);this.s_=this.ta.getItem().Fe();this.r_=this.ta.getItem().Ve();this.Tc=2;this.GI=0;this.Xa=.5*Math.PI;this.Bba=this.Cba=!0;this.am=1;this.zY=!0;this.Fya(1)});a.prototype.d5=function(k,c){this.am!=c&&(this.am=c,this.zY=!0,this.xe())};a.prototype.OIa=function(k,c){this.Xa!=c&&(this.Xa=c,this.Cba=!0,this.xe());this.GI!=k&&(this.GI=k,this.Bba=!0,this.xe())};a.prototype.jh=function(){this.Cba&&
(this.Cba=!1,this.y3());if(this.zY||this.Bba){this.Bba=this.zY=!1;this.Tc=Math.max(1,Math.ceil(Math.sqrt(this.s_*this.s_+this.r_*this.r_))/(m.zd()==m.yi?1024:4096));var k=this.am/this.Tc,c=this.Aa.getX()*k,h=this.Aa.getY()*k,f=Math.max(c,k*this.s_-c);k=Math.max(h,k*this.r_-h);f=2*Math.ceil(Math.sqrt(f*f+k*k));var b=this.GI*Math.PI/180;k=Math.cos(b);b=Math.sin(b);c=c-this.Nt*f-(.5-this.Nt)*f*k+(.5-this.Ot)*f*b;h=h-this.Ot*f-(.5-this.Ot)*f*k-(.5-this.Nt)*f*b;this.zY=!1;this.pm(c,h);this.iR(f,f);this.x0(this.GI)}l.prototype.jh.call(this)};
a.prototype.yg=function(){var k=this.Aa.iVa,c=this.Aa.SXa;if(0<c||0<k){var h=this.am*this.s_,f=this.am*this.r_;h=Math.ceil(Math.sqrt(h*h+f*f))*this.Aa.iy()/this.Tc;f=Math.round(.5*this.sa);var b=Math.round(.5*this.wa),e=this.Xa*Math.PI/180,g=.5*-e;e=g+e;0<c&&(this.Da.fillStyle=this.Aa.RXa,this.Da.globalAlpha=c,this.Da.rect(0,0,this.sa,this.wa),this.Da.fill(),this.Da.globalCompositeOperation="destination-out",this.Da.fillStyle="#FFFFFF",this.Da.globalAlpha=1,this.Da.beginPath(),this.Da.moveTo(f,b),
this.Da.arc(f,b,h,g,e,!1),this.Da.lineTo(f,b),this.Da.closePath(),this.Da.fill(),this.Da.globalCompositeOperation="source-over");0<k&&(this.Da.fillStyle=this.Aa.hVa,this.Da.globalAlpha=k,this.Da.beginPath(),this.Da.moveTo(f,b),this.Da.arc(f,b,h,g,e,!1),this.Da.lineTo(f,b),this.Da.closePath(),this.Da.fill())}l.prototype.yg.call(this)};return a});
define("k","require lV hY Q lS np".split(" "),function(a){var d=a("lV"),l=a("hY"),m=a("Q"),k=a("lS"),c=a("np");a=d.extend(m,function(h,f){m.call(this,h,f);this.Fya(this.Aa.gya?0:2);this.ic=k.Cf(this.Aa.Yi());this.j0=new c(this.ic,this.ic.width,this.ic.height);this.j0.hC(this.Aa.Rf);this.j0.yM(this.Aa.xm);this.j0.sM(this.Aa.Vl);this.lP=0;this.am=1;this.qca=!0});a.prototype.d5=function(h,f){if(this.lP!=h||this.am!=f)this.lP=h,this.am=f,this.qca=!0,this.xe()};a.prototype.jh=function(){if(this.qca){this.qca=
!1;var h=this.Aa.getX(),f=this.Aa.getY(),b=this.Aa.Fe(),e=this.Aa.Ve(),g=this.Aa.Lw,n=this.Aa.Mw;if(this.Aa.gya)this.x0(0),this.pm((h-g)*this.am,(f-n)*this.am),this.iR(b*this.am,e*this.am);else{b*=l.qk;e*=l.qk;g*=l.qk;n*=l.qk;var q=Math.cos(-this.lP*Math.PI/180),p=Math.sin(-this.lP*Math.PI/180);h=h*this.am-this.Nt*b-(g-this.Nt*b)*q+(n-this.Ot*e)*p;f=f*this.am-this.Ot*e-(n-this.Ot*e)*q-(g-this.Nt*b)*p;this.x0(-this.lP);this.pm(h,f);this.iR(b,e)}}m.prototype.jh.call(this)};a.prototype.yg=function(){this.j0.iL(this.Da,
this.T.width,this.T.height);m.prototype.yg.call(this)};return a});
define("iL","require lV mN lS ix ky jh k nw".split(" "),function(a){var d=a("lV"),l=a("mN"),m=a("lS"),k=a("ix"),c=a("ky"),h=a("jh"),f=a("k"),b=a("nw");a=d.extend(b,function(e,g){b.call(this,e,g,e.Wo);this.Rb=this.Aa.Fe();this.dc=this.Aa.Ve();this.Rf=this.Aa.Rf;this.KX=this.Aa.U$;this.Sd=this.Jd=100;this.w9=!0;this.Qa=this.Na=.5;this.rd=0;this.qb=1;this.DQ=!0;this.xf=1;this.ic=m.Cf(this.Aa.Yi())});a.prototype.G9=function(e){if(e.getType()!=k.roa)throw"Invalid item type";switch(e.UXa){case c.noa:e=
new h(e,this);break;case c.ooa:e=new f(e,this);break;default:e=null}e&&e.d5(this.rd,this.xf*this.qb);return e};a.prototype.getX=function(){return this.Na};a.prototype.getY=function(){return this.Qa};a.prototype.tL=function(){return this.rd};a.prototype.cs=function(){return this.qb};a.prototype.Wa=function(){return Math.round(this.Rb*this.qb*this.xf)};a.prototype.Ab=function(){return Math.round(this.dc*this.qb*this.xf)};a.prototype.QG=function(e,g){if(this.Jd!=e||this.Sd!=g)this.Jd=e,this.Sd=g,this.w9=
!0,this.xe()};a.prototype.setPosition=function(e,g,n,q){if(this.Na!=e||this.Qa!=g||this.rd!=n||this.qb!=q)this.Na=e,this.Qa=g,this.rd=n,this.qb=q,this.DQ=!0,this.xe()};a.prototype.jh=function(){if(this.w9){this.w9=!1;switch(this.Rf){case l.NONE:this.xf=1;break;case l.bq:this.xf=this.Jd/this.Rb;break;case l.xk:this.xf=this.Sd/this.dc;break;case l.Is:this.xf=this.Rb*this.Sd>this.dc*this.Jd?this.Sd/this.dc:this.Jd/this.Rb;break;default:this.xf=this.Rb*this.Sd>this.dc*this.Jd?this.Jd/this.Rb:this.Sd/
this.dc}this.DQ=!0}if(this.DQ){this.DQ=!1;var e=this.Wa(),g=this.Ab(),n=Math.cos(this.rd*Math.PI/180),q=Math.sin(this.rd*Math.PI/180);this.pm(.5*this.Jd-this.Nt*e+(this.Nt-this.Na)*n*e-(this.Ot-this.Qa)*q*g,.5*this.Sd-this.Ot*g+(this.Ot-this.Qa)*n*g+(this.Nt-this.Na)*q*e);this.x0(this.rd);this.iR(e,g);for(e=0;e<this.Cc.length;e++)this.Cc[e].d5(this.rd,this.xf*this.qb)}b.prototype.jh.call(this)};a.prototype.yg=function(){var e=Math.round(this.sa),g=Math.round(this.wa);this.KX?(this.Da.save(),this.Da.translate(e,
0),this.Da.scale(-1,1),this.Da.drawImage(this.ic,0,0,e,g),this.Da.restore()):this.Da.drawImage(this.ic,0,0,e,g);b.prototype.yg.call(this)};return a});
define("hq","require er lV ix nw iL".split(" "),function(a){a("er");var d=a("lV"),l=a("ix"),m=a("nw"),k=a("iL");a=d.extend(m,function(){m.call(this,null,null);this.i9=!0});a.prototype.hd=function(){return this.xa};a.prototype.render=function(){this.bb();this.Qy()};a.prototype.t6a=function(){for(var c=1,h=0;h<this.Cc.length;h++){var f=this.Cc[h];f=f.Wa()*f.Ab();c<f&&(c=f)}return c};a.prototype.G9=function(c){if(c.getType()!=l.qoa)throw"Invalid item type";c=new k(c,this);c.QG(this.sa,this.wa);c.setPosition(.5,
.5,0,1);return c};a.prototype.setSize=function(c,h){this.iR(c,h);this.i9=!0;this.xe()};a.prototype.jh=function(){if(this.i9){this.i9=!1;for(var c=0;c<this.Cc.length;c++)this.Cc[c].QG(this.sa,this.wa)}m.prototype.jh.call(this)};return a});
define("lb","require er lV pB iy lS hY hq kQ bi e".split(" "),function(a){var d=a("er"),l=a("lV"),m=a("pB"),k=a("iy"),c=a("lS"),h=a("hY"),f=a("hq"),b=a("kQ"),e=a("bi"),g=a("e");a=l.extend(g,function(){g.call(this);this.Re("Renderer");this.set("toolTipDisabled",!0);this.set("cursor",e.pv);this.Wz=[];this.tF=[];this.$b="";this.Dh=new f;this.Yb().append(this.Dh.hd());this.bind(m.tc,this.Dc,this,!0);this.bind(m.kd,this.tj,this,!0);this.bind(m.cd,this.sj,this,!0);b.N.bind(m.ba,this.Hga,this,!0);this.cF=
this.Cea=!1});a.prototype.co=function(n){c.co(n,k.Cl)};a.prototype.I5=function(n){return c.I5(n)};a.prototype.Lj=function(n){c.Lj(n,k.Cl)};a.prototype.yha=function(n){this.Dh.wBa(n)};a.prototype.removeItem=function(n){this.Dh.XHa(n)};a.prototype.W1=function(n,q){this.Dh.ru(n).wBa(q);this.Ega()};a.prototype.M9a=function(n,q){(n=this.Dh.ru(n))&&n.XHa(q)};a.prototype.Pha=function(n){this.Dh.WS(n).Kh()};a.prototype.xs=function(n,q){this.Dh.N2(n).forEach(function(p){p.gf(q)})};a.prototype.HU=function(n,
q,p,r,t){this.Dh.ru(n).setPosition(q,p,r,t);this.Ega()};a.prototype.Ega=function(){var n=this.Dh.t6a();n&&(h.qk=Math.min(h.jna,h.qk*Math.sqrt(h.tMa/n)),this.FAa())};a.prototype.jab=function(n,q,p){this.Dh.WS(n).OIa(q,p)};a.prototype.iT=function(n){return this.Dh.ru(n).getX()};a.prototype.jT=function(n){return this.Dh.ru(n).getY()};a.prototype.g3=function(n){return this.Dh.ru(n).tL()};a.prototype.RDa=function(n){return this.Dh.ru(n).cs()};a.prototype.hT=function(n){return this.Dh.ru(n).Wa()/h.qk};
a.prototype.gT=function(n){return this.Dh.ru(n).Ab()/h.qk};a.prototype.render=function(){this.cF&&this.Dh.render()};a.prototype.Q4=function(n){this.Wz.push(n);this.tAa()};a.prototype.iM=function(n){n=d(this.Wz).lastIndexOf(n);0<=n&&this.Wz.splice(n,1);this.tAa()};a.prototype.tAa=function(){var n=0<this.Wz.length?this.Wz[this.Wz.length-1]:e.Ke;this.getParent().set("cursor",n)};a.prototype.bX=function(){0<this.Wz.length&&(this.getParent().set("cursor",e.Ke),this.Wz=[])};a.prototype.E9a=function(n){this.tF.push(n);
this.aS()};a.prototype.y9a=function(n){n=d(this.tF).lastIndexOf(n);0<=n&&this.tF.splice(n,1);this.aS()};a.prototype.aS=function(){var n=0==this.tF.length?"":this.tF[this.tF.length-1]||"";this.$b!=n&&(this.$b=n,this.getParent().set("toolTip",this.$b))};a.prototype.lQa=function(){this.$b&&this.getParent().set("toolTip","");this.$b="";this.tF=[]};a.prototype.Pn=function(){this.lQa();this.bX();g.prototype.Pn.call(this)};a.prototype.Dc=function(){this.FAa();this.Ega()};a.prototype.FAa=function(){this.Dh.hd().css({transform:1!=
h.qk?"scale("+(1/h.qk).toFixed(3)+")":"none","transform-origin":"0% 0%"});this.Dh.setSize(this.Wa()*h.qk,this.Ab()*h.qk);this.render()};a.prototype.tj=function(){this.Cea=!0;this.Hga()};a.prototype.sj=function(){this.Cea=!1;this.Hga()};a.prototype.Hga=function(){var n=this.Cea&&!b.isPresenting;this.cF!=n&&((this.cF=n)?(this.Dc(),this.render()):this.Dh.W2())};return a});
define("R","require lV cI fq km dn dw kl lb pB eo hh".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("fq"),k=a("km"),c=a("dn"),h=a("dw"),f=a("kl"),b=a("lb"),e=a("pB"),g=a("eo"),n=a("hh"),q=m.define("MapPlayer",c,function(){c.call(this,"map");this.pZ=this.pca=this.ri=!1;this.Kn=this.gd=this.O=this.j=null;this.Hz={};for(var p in q.Gv)this.Hz[p]=this.MQa(p);this.Kd=d.Ip(this.jh,this)});q.prototype.stop=function(){this.Zc(f.Yf)};q.prototype.rotateClockwise=function(){this.Zc(f.D7)};q.prototype.rotateCounterClockwise=
function(){this.Zc(f.E7)};q.prototype.zoomIn=function(){this.Zc(f.Ev)};q.prototype.zoomOut=function(){this.Zc(f.Fv)};q.prototype.set=function(p,r){if(this.get(p)!=r){switch(p){case "map":this.pca=!0;this.Kd();break;case "viewerArea":this.ri=!0;this.Kd();break;case "panoramaMapLocation":this.Dda=!0;this.Kd();break;case "movementMode":this.pZ=!0,this.Kd()}c.prototype.set.call(this,p,r)}};q.prototype.MQa=function(p){var r=q.Gv[p];p=new k(this,p,g.Me);p.bind(e.hb,function(){this.Zc(r.movement)},this);
r.stopOnRelease&&p.bind(e.Eb,function(){this.Zc(f.Yf)},this);return p};q.prototype.H3a=function(p){this.Kn=null;this.set("map",p.get("map"));this.set("panoramaMapLocation",p)};q.prototype.V9a=function(p){this.get("panoramaMapLocation")==p&&(this.set("panoramaMapLocation",null),this.Kn=null)};q.prototype.Np=function(p,r,t,u){this.O&&this.O.Np(p,r,t,u);this.Kn={yaw:r,pitch:t,hfov:u}};q.prototype.jh=function(){this.ri&&(this.ri=!1,this.dw(),this.get("viewerArea")&&this.bw(),this.kR(this.get("viewerArea")));
if(this.O){if(this.pca){this.pca=!1;var p=this.get("map");p?(this.KG(),this.O.$Ia(p)):this.O.Ey();this.Dda=this.pZ=!0}this.Dda&&(this.Dda=!1,p=this.get("panoramaMapLocation"),this.O.Jy(p),p&&this.Kn&&this.O.Np(p,this.Kn.yaw,this.Kn.pitch,this.Kn.hfov));this.pZ&&(this.pZ=!1,this.O.ys(this.get("movementMode")))}};q.prototype.uK=function(){this.set("map",null)};q.prototype.bw=function(){var p=this.get("viewerArea");this.j=new b;this.j.ra({left:0,top:0,bottom:0,right:0});p.Za(this.j);this.O=new h(p,this.j);
this.O.bind(h.wk,this.$q,this);this.O.bind(h.jv,this.Ki,this);this.O.bind(h.yC,this.BJ,this);this.O.bind(h.AC,this.zA,this);this.O.bind(h.zC,this.Pw,this);this.O.bind(h.xi,this.hQ,this,!0)};q.prototype.dw=function(){this.j&&(this.O.unbind(h.wk,this.$q,this),this.O.unbind(h.jv,this.Ki,this),this.O.unbind(h.yC,this.BJ,this),this.O.unbind(h.AC,this.zA,this),this.O.unbind(h.zC,this.Pw,this),this.O.unbind(h.xi,this.hQ,this),this.O.clear(),this.j.getParent().removeChild(this.j),this.j=null)};q.prototype.zA=
function(p){this.sP(p.data.map)};q.prototype.Pw=function(p){this.rP(p.data.map)};q.prototype.$q=function(p){for(var r in q.Gv)this.Hz[r].set("state",p.data[q.Gv[r].pressedOn]?n.Bb:n.Ke);this.trigger(new l(e.tna,p.data))};q.prototype.hQ=function(p){this.trigger(new l(q.xi,{yawDelta:p.data.yawDelta}))};q.prototype.Ki=function(p){this.j.getParent().ra({progressPercent:p.data.percent,progressVisible:!0})};q.prototype.BJ=function(){this.j.getParent().set("progressVisible",!1)};q.prototype.Zc=function(p){this.O&&
this.O.rk(p)};q.Gv={buttonRotateClockwise:{movement:f.D7,pressedOn:"rotatingClockwise",stopOnRelease:!0},buttonRotateCounterClockwise:{movement:f.E7,pressedOn:"rotatingCounterClockwise",stopOnRelease:!0},buttonZoomIn:{movement:f.Ev,pressedOn:"zoomingIn",stopOnRelease:!0},buttonZoomOut:{movement:f.Fv,pressedOn:"zoomingOut",stopOnRelease:!0}};q.xi="requestYawChange";return q});
define("iM",["require","mz","pB","cI","fq"],function(a){var d=a("mz"),l=a("pB"),m=a("cI");a=a("fq").define("PlayListItem",d,function(){d.call(this);this.C="stopped"});a.prototype.get=function(k,c){return"state"==k?this.C:d.prototype.get.call(this,k,c)};a.prototype.start=function(){this.vcb()};a.prototype.vcb=function(){if("stopped"==this.C||"stopping"==this.C)this.C="starting",this.trigger(new m(l.uo))};a.prototype.nB=function(){this.HKa()};a.prototype.HKa=function(){if("starting"==this.C||"stopping"==
this.C)this.C="playing",this.trigger(new m(l.Tp))};a.prototype.stop=function(){this.HM()};a.prototype.HM=function(){if("playing"==this.C||"starting"==this.C)this.C="stopping",this.trigger(new m(l.Yf))};a.prototype.end=function(){this.IKa()};a.prototype.IKa=function(){if("stopping"==this.C||"starting"==this.C)this.C="stopped",this.trigger(new m(l.Gb))};return a});
define("qj",["require","fq","dn","iM"],function(a){var d=a("fq"),l=a("dn"),m=a("iM");a=d.define("MapPlayListItem",m,function(){m.call(this)});a.prototype.start=function(){m.prototype.start.call(this);var k=this.get("player");k&&(k.bind(l.th,this.zA,this),k.set("map",this.get("media")))};a.prototype.stop=function(){var k=this.get("player");k&&k.get("map")==this.get("media")&&k.set("map",null);m.prototype.stop.call(this)};a.prototype.zA=function(){this.get("player").unbind(l.th,this.zA,this);this.get("player").bind(l.Vm,
this.Pw,this);this.nB();this.get("player").get("map")!=this.get("media")&&this.Pw()};a.prototype.Pw=function(){this.get("player").unbind(l.Vm,this.Pw,this);this.stop();this.end()};return a});
define("gv",["require","pB","fq","kt"],function(a){var d=a("pB"),l=a("fq"),m=a("kt"),k=l.define("MeasureModel3DObject",m,function(){m.call(this);this.bind(d.G("mode"),function(){this.trigger(k.TLa)},this,!0);this.bind(d.G("distance"),function(){this.trigger(k.PLa)},this,!0)});k.TLa="modeChange";k.PLa="distanceChange";return k});define("dv",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("MeasureModel3DObjectPoint",d,function(){d.call(this)})});
define("ep",["require","fq","gs"],function(a){var d=a("fq"),l=a("gs");return d.define("OrbitModel3DCamera",l,function(){l.call(this)})});
define("pY",["require","exports","pB","gF"],function(a,d,l,m){var k=function(){return function(c){this.vCa=c;this.Ug=0;this.finished=!1}}();return function(c){function h(f){var b=c.call(this)||this;b.zn=new Map;b.JI=f||b;return b}Z(h,c);h.prototype.Q$a=function(f){if(this.JI=f)this.zj(),this.u1()};h.prototype.update=function(){this.zj();this.u1()};h.prototype.oCa=function(){this.zn.forEach(function(f,b){this.U_(b)}.bind(this));this.zn=new Map};h.prototype.Mh=function(){var f=0;this.zn.forEach(function(b){b.finished&&
f++});return f==this.zn.size};h.prototype.dispose=function(){this.oCa();this.zn.clear();this.JI=void 0};h.prototype.UK=function(f,b){void 0===b&&(b=1);if(this.zn.has(f))return f;this.zn.set(f,new k(b));this.hOa(f);return f};h.prototype.lM=function(f){this.zn.has(f)&&(this.zn["delete"](f),this.U_(f))};h.prototype.qu=function(f){void 0===f&&(f=1);var b=new m;return this.UK(b,f)};h.prototype.Dd=function(f){f=f.source;var b=this.zn.get(f);b&&(this.U_(f),b.Ug=100,b.finished=!0,this.zj(),this.u1())};h.prototype.Ki=
function(f){this.zn.get(f.source).Ug=f.data.percent;this.zj()};h.prototype.cg=function(f){f=f.source;this.U_(f);f=this.zn.get(f);f.finished=!0;f.Ug=100;this.JI.trigger(l.Bc);this.zj();this.u1()};h.prototype.zj=function(){var f=0,b=0;this.zn.forEach(function(e){b+=e.vCa;f+=e.Ug*e.vCa});this.JI.trigger(l.mc,{percent:b?f/b:100})};h.prototype.u1=function(){this.Mh()&&this.JI.trigger(l.ea)};h.prototype.hOa=function(f){f.bind(l.ea,this.Dd,this,!0);f.bind(l.mc,this.Ki,this,!0);f.bind(l.Bc,this.cg,this,!0)};
h.prototype.U_=function(f){f.unbind(l.ea,this.Dd,this);f.unbind(l.mc,this.Ki,this);f.unbind(l.Bc,this.cg,this)};return h}(m)});
define("cd","require pB lx fq ey ep pY".split(" "),function(a){function d(r,t){Array.isArray(t)?r.fromArray(t):r.copy(t);return r}function l(r,t){Array.isArray(t)?r.fromArray(t):r.copy(t);return r}function m(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 k=a("pB"),c=a("lx"),h=a("fq"),f=a("ey"),b=a("ep"),e=a("pY");a=h.define("Model3D",f,function(){f.call(this);this.set("camera",new b);this.set("geometryQuery",void 0);this.set("objectQuery",void 0);this.set("metadataQuery",
void 0);this.set("preload",!0)});a.prototype.Tka=function(){this.Qi&&(this.Qi.unbind(k.ea,this.FJ,this),this.Qi.dispose());this.Qi=new e;this.Qi.bind(k.ea,this.FJ,this,!0);this.Oe&&this.Oe.dispose();this.Oe=new e(this)};a.prototype.FJ=function(){this.trigger(k.VC)};a.prototype.h3=function(){this.Oe||this.Tka();return this.Oe};a.prototype.l3=function(){this.Qi||this.Tka();return this.Qi};a.prototype.pause=function(){this.get("state")==c.PLAYING&&this.set("state",c.Qb)};a.prototype.play=function(){this.set("state",
c.PLAYING)};a.prototype.stop=function(){this.set("state",c.U)};a.prototype.worldPositionToLocal=function(r,t){l(g,r);d(q,t);q.invert();g.applyMatrix4(q);return m(g,r)};a.prototype.getMatrixWorld=function(r){var t=this.get("objectQuery");return t&&t.WDa(r)};a.prototype.worldDirectionToLocal=function(r,t){l(g,r);d(p,t);q.extractRotation(p);q.invert();g.applyMatrix4(q);return m(g,r)};a.prototype.testIntersection=function(r,t){var u=this.get("geometryQuery");if(u)return l(g,r),l(n,t),u.gH(g,n)};a.prototype.getDistanceToFloor=
function(r){var t=this.get("geometryQuery");if(t)return l(g,r),t.X5a(g)};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.H4(r,t)};a.prototype.getScreenPosition=function(r,t){var u=this.get("projectionQuery");if(u)return u.aja(l(g,r),t)};var g=new THREE.Vector3,n=new THREE.Vector3,q=new THREE.Matrix4,p=new THREE.Matrix4;a.prototype.Bu=function(){return[]};return a});
define("bk",["require","mz","lx","pB","fq"],function(a){var d=a("mz"),l=a("lx"),m=a("pB");a=a("fq").define("Model3DAnimation",d,function(){d.call(this);this.bind(m.G("state"),function(){this.trigger(m.Ae)},this,!0)});a.prototype.pause=function(){this.get("state")==l.PLAYING&&this.set("state",l.Qb)};a.prototype.play=function(){this.set("currentDirection","forward");this.set("state",l.PLAYING)};a.prototype.reverse=function(){this.set("currentDirection","backward");this.set("state",l.PLAYING)};a.prototype.stop=
function(){this.set("currentTime",0);this.set("state",l.U)};return a});
define("hm",["require","mz","lx","fq","pB"],function(a){var d=a("mz"),l=a("lx"),m=a("fq"),k=a("pB");a=m.define("Model3DCameraSequence",d,function(){d.call(this);this.set("state",l.U);this.bind(k.G("state"),function(){this.trigger(k.Ae)},this,!0)});a.prototype.play=a.prototype.play=function(){this.set("state",l.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.get("state")==l.PLAYING&&this.set("state",l.Qb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",l.U)};return a});
define("ba",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("Model3DDisplayEffect",d,function(){d.call(this)})});
define("iZ","require lV pB cI km dn lx eo hh".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cI"),k=a("km"),c=a("dn"),h=a("lx"),f=a("eo"),b=a("hh");a=d.extend(c,function(){c.call(this,!0);this.Et=!1;this.sK=!0;this.C=h.U;this.sD=new k(this,"buttonPlayPause",f.Rj);this.sD.bind(l.Oj,this.nXa,this,!0);this.sD.bind(l.Hl,this.oXa,this,!0);this.jI=new k(this,"buttonPause",f.Me);this.jI.bind(l.ma,this.LE,this,!0);this.kI=new k(this,"buttonPlay",f.Me);this.kI.bind(l.ma,this.ME,this,!0);this.mI=new k(this,
"buttonStop",f.Me);this.mI.bind(l.ma,this.GA,this,!0);this.GPa=new k(this,"buttonRestart",f.Me);this.GPa.bind(l.ma,this.FA,this,!0);this.vta=d.Ip(this.v2a,this);this.vta()});a.prototype.set=function(e,g){"state"!=e&&c.prototype.set.call(this,e,g)};a.prototype.get=function(e,g){switch(e){case "state":return this.C}return c.prototype.get.call(this,e,g)};a.prototype.v2a=function(){this.sK&&(this.sK=!1,this.jI.set("state",this.C==h.Qb?b.Bb:b.Ke),this.kI.set("state",this.C==h.PLAYING||this.C==h.Qb?b.Bb:
b.Ke),this.sD.set("pressed",this.C==h.PLAYING),this.mI.set("state",this.C==h.U?b.Bb:b.Ke))};a.prototype.aB=function(e){this.Et!=e&&((this.Et=e)||this.wd(h.U))};a.prototype.wd=function(e){var g=this.C;this.C=e;c.prototype.set.call(this,"state",e);g!=this.C&&(this.sK=!0,this.vta(),this.trigger(new m(l.Ae,{oldState:g,state:this.C})))};a.prototype.LE=function(){this.Et&&(this.C==h.Qb?this.Sk():this.ir())};a.prototype.ME=function(){this.Et&&this.Sk()};a.prototype.nXa=function(){this.Et&&this.Sk()};a.prototype.oXa=
function(){this.Et&&this.ir()};a.prototype.GA=function(){this.Et&&this.lp()};a.prototype.FA=function(){this.Et&&(this.lp(),this.Sk())};a.prototype.Sk=function(){};a.prototype.ir=function(){};a.prototype.lp=function(){};return a});
define("eW",["require","lV","bo","cI","gF"],function(a){var d=a("lV"),l=a("bo"),m=a("cI"),k=a("gF"),c=d.extend(k,function(h,f){k.call(this);this.M=h;this.j=f;this.jr=null;this.ua=c.Zh;this.lj=this.Ci=null;this.Vn=this.ih=void 0;this.Xca=[]});c.prototype.display=function(h){this.jr=null;if(this.lj!=h||this.ua!=c.Zh)this.jr=h,this.$va()};c.prototype.hide=function(){this.jr="none";this.$va()};c.prototype.clear=function(){this.ua=c.Zh;this.jr=null;this.GYa();this.uea();this.j=null};c.prototype.Vg=function(h){for(;this.Xca.length;)this.Xca.shift()();
this.ua==c.Zh||this.ua!=c.Jl&&this.ua!=c.Zs&&this.ua!=c.Hv||(this.Vn+=h,h=Math.min(1,this.Vn/this.ih),this.ua==c.Jl?(this.Ci.set("opacity",h),this.M.Qd().rM(h)):this.ua==c.Hv?(this.M.Qd().rM(h),this.M.Qd().TG(h)):(this.M.Qd().TG(h),this.lj.set("opacity",1-h)),this.j.Ta(),this.Vn<this.ih?this.Sa():this.aA())};c.prototype.kT=function(){return this.lj&&this.j.kT(this.lj)||void 0};c.prototype.$va=function(){this.jr&&this.ua==c.Zh&&this.vq()};c.prototype.vq=function(){this.lj&&this.trigger(new m(c.BC,
{model:this.lj}));"fade_out_fade_in"==this.M.get("transitionMode","blending")&&this.lj?this.Dz():(this.Ci="none"==this.jr?null:this.jr,this.jr=null,this.Ci?this.lj?this.S8():this.CN():this.lj&&this.Dz())};c.prototype.CN=function(){this.ua=c.Jl;this.hpa();this.j.bJa(this.Ci);this.M.Qd().CM();this.Vn=0;this.ih=this.M.get("transitionDuration");this.Sa()};c.prototype.S8=function(){this.ua=c.Hv;this.M.Qd().dH();this.uea();this.hpa();this.j.bJa(this.Ci);this.M.Qd().CM();this.Vn=0;this.ih=2*this.M.get("transitionDuration");
this.Sa()};c.prototype.Dz=function(){this.ua=c.Zs;this.Ci=null;this.Vn=0;this.ih=this.M.get("transitionDuration");this.M.Qd().dH();this.Sa()};c.prototype.aA=function(){this.jr!=this.lj&&this.uea();this.lj=this.Ci;this.Ci=null;this.ua==c.Zs?this.M.Qd().YF():this.ua==c.Jl?this.M.Qd().kL():this.ua==c.Hv&&(this.M.Qd().kL(),this.M.Qd().YF());this.ua=c.Zh;this.lj?this.trigger(new m(c.CC,{model:this.lj})):this.jr||this.trigger(new m(c.z6));this.jr&&this.vq()};c.prototype.Sa=function(){l.requestFrame(this.Vg,
this)};c.prototype.hpa=function(){if(this.Ci){this.Ci.set("opacity",this.ua==c.Hv?1:.01);this.Ci.set("currentTime",0);this.j.zBa(this.Ci);this.trigger(new m(c.P6,{model:this.Ci}));var h=this.Ci;this.Xca.push(function(){this.trigger(new m(c.DC,{model:h}))}.bind(this))}};c.prototype.uea=function(){this.lj&&(this.j.Kka(this.lj),this.trigger(new m(c.KV,{model:this.lj})),this.lj=null)};c.prototype.GYa=function(){this.Ci&&(this.j.Kka(this.Ci),this.trigger(new m(c.KV,{model:this.Ci})),this.Ci=null)};c.Zh=
"stopped";c.Jl="blending";c.Hv="double blending";c.Zs="disolving";c.Ob="request frame";c.P6="model added";c.KV="model removed";c.DC="model start";c.CC="model show";c.BC="model hide";c.z6="all pending models hidden";return c});
define("da",["require","lV","gF","pB"],function(a){var d=a("lV"),l=a("gF"),m=a("pB");a=d.extend(l,function(k,c){l.call(this);this.M=k;this.j=c;this.Lg=null});a.prototype.clear=function(){this.stop();this.j=null};a.prototype.load=function(k){k!=this.Lg&&(this.stop(),this.j.e7a(k)?(this.cAa(k),this.j1(k)):(this.Lg=k,this.Lg.set("opacity",0),this.lPa(),this.j.zBa(this.Lg)))};a.prototype.stop=function(){this.Lg&&(this.jga(),this.j.Kka(this.Lg),this.Lg=null)};a.prototype.FJ=function(){this.gAa();this.cAa(this.Lg)};
a.prototype.Dd=function(){this.Lg.r3(m.VC)&&this.FJ();this.jga();var k=this.Lg;this.Lg=null;this.M.set("progressVisible",!1);this.j1(k)};a.prototype.cg=function(){this.jga();this.Lg=null;this.M.set("progressVisible",!1)};a.prototype.Ki=function(k){this.M.ra({progressPercent:k.data.percent,progressVisible:!0})};a.prototype.oPa=function(){this.Lg.bind(m.VC,this.FJ,this,!0)};a.prototype.gAa=function(){this.Lg.unbind(m.VC,this.FJ,this,!0)};a.prototype.lPa=function(){this.oPa();this.Lg.bind(m.ea,this.Dd,
this,!0);this.Lg.bind(m.mc,this.Ki,this,!0);this.Lg.bind(m.Bc,this.cg,this,!0)};a.prototype.jga=function(){this.gAa();this.Lg.unbind(m.ea,this.Dd,this,!0);this.Lg.unbind(m.mc,this.Ki,this,!0);this.Lg.unbind(m.Bc,this.cg,this,!0)};a.prototype.cAa=function(k){this.trigger(m.VC,{model:k})};a.prototype.j1=function(k){this.trigger(m.ea,{model:k})};a.prototype.c8a=function(){return this.Lg&&this.Lg.r3(m.VC)};a.Wma=m.VC;a.Tma=m.ea;return a});
define("hy","require lV pB cI gF lx".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cI"),k=a("gF"),c=a("lx"),h=d.extend(k,function(){k.call(this);this.ja=null;this.C=c.U});h.prototype.start=function(f){this.ja=f;this.ja.bind(l.G("camera"),this.Oca,this,!0);this.ja.bind(l.G("state"),this.mda,this,!0);this.ja.bind(l.G("currentTime"),this.b_,this,!0);this.ja.bind(l.G("duration"),this.b_,this,!0);this.mda();this.Oca()};h.prototype.end=function(){this.stop();this.Kb&&(this.Kb.unbind(l.G("state"),
this.IP,this,!0),this.Kb=null);this.ja&&(this.ja.unbind(l.G("camera"),this.Oca,this,!0),this.ja.unbind(l.G("state"),this.mda,this,!0),this.ja.unbind(l.G("currentTime"),this.b_,this,!0),this.ja.unbind(l.G("duration"),this.b_,this,!0),this.ja=null)};h.prototype.clear=function(){this.end()};h.prototype.play=function(){this.ja&&this.ja.set("state",c.PLAYING)};h.prototype.pause=function(){this.ja&&this.ja.set("state",c.Qb)};h.prototype.stop=function(){this.ja&&this.ja.set("state",c.U)};h.prototype.setTime=
function(f){this.ja&&this.ja.set("currentTime",f)};h.prototype.getTime=function(){return this.ja&&this.ja.get("currentTime")||void 0};h.prototype.mda=function(){var f=this.ja.get("state");this.C!=f&&(this.C=f,this.Kb&&this.Kb.set("state",f),this.trigger(new m(h.Uc,{state:this.C})))};h.prototype.b_=function(){this.trigger(new m(h.Nj,{model:this.ja,time:this.ja.get("currentTime"),duration:this.ja.get("duration")}));this.IP()};h.prototype.Oca=function(){this.Kb&&this.Kb.unbind(l.G("state"),this.IP,this,
!0);(this.Kb=this.ja.get("camera"))&&this.Kb.bind(l.G("state"),this.IP,this,!0);this.IP()};h.prototype.IP=function(){0===this.ja.get("duration")&&this.ja.set("state",this.Kb?this.Kb.get("state"):c.U)};h.Uc="playback state change";h.Nj="time change";return h});
define("eg","require lV lx cI gF eW da hy".split(" "),function(a){var d=a("lV"),l=a("lx"),m=a("cI"),k=a("gF"),c=a("eW"),h=a("da"),f=a("hy"),b=d.extend(k,function(e,g){k.call(this);this.M=e;this.j=g;this.j.set("visible",!1);this.oe=new h(this.M,this.j);this.Oa=new c(this.M,this.j);this.Ma=new f(this.j);this.oe.bind(h.Wma,this.Rva,this,!0);this.oe.bind(h.Tma,this.Rw,this,!0);this.Oa.bind(c.BC,this.AA,this,!0);this.Oa.bind(c.CC,this.hm,this,!0);this.Oa.bind(c.DC,this.VP,this,!0);this.Oa.bind(c.P6,this.Ova,
this,!0);this.Oa.bind(c.KV,this.Sva,this,!0);this.Oa.bind(c.z6,this.Oua,this,!0);this.Ma.bind(f.Uc,this.lf,this,!0);this.Ma.bind(f.Nj,this.dr,this,!0)});b.prototype.clear=function(){this.oe.clear();this.Oa.clear();this.Ma.clear();this.oe.unbind(h.Wma,this.Rva,this);this.oe.unbind(h.Tma,this.Rw,this);this.Oa.unbind(c.BC,this.AA,this);this.Oa.unbind(c.CC,this.hm,this);this.Oa.unbind(c.DC,this.VP,this);this.Oa.unbind(c.P6,this.Ova,this);this.Oa.unbind(c.KV,this.Sva,this);this.Oa.unbind(c.z6,this.Oua,
this);this.Ma.unbind(f.Uc,this.lf,this);this.Ma.unbind(f.Nj,this.dr,this);this.M=this.j=this.Ma=this.Oa=this.oe=null};b.prototype.yab=function(e){this.j.set("visible",!0);this.oe.load(e)};b.prototype.Ey=function(){this.oe.c8a()&&this.oe.stop();this.Oa.hide();this.Ma.end()};b.prototype.play=function(){this.Ma.play()};b.prototype.stop=function(){this.Ma.stop()};b.prototype.pause=function(){this.Ma.pause()};b.prototype.setTime=function(e){this.Ma.setTime(e)};b.prototype.getTime=function(){return this.Ma.getTime()};
b.prototype.kT=function(){return this.Oa.kT()};b.prototype.Rva=function(e){this.Oa.display(e.data.model)};b.prototype.Rw=function(){};b.prototype.Ova=function(e){this.Ma.start(e.data.model)};b.prototype.VP=function(e){e=e.data.model;this.j.set("visible",!0);this.trigger(new m(b.DC,{model:e}))};b.prototype.Sva=function(){};b.prototype.hm=function(e){e=e.data.model;e.get("autoplay")&&e.get("state")!=l.PLAYING&&e.set("state",l.PLAYING);this.trigger(new m(b.CC,{model:e}))};b.prototype.AA=function(e){this.trigger(new m(b.BC,
{model:e.data.model}))};b.prototype.Oua=function(){this.j.set("visible",!1)};b.prototype.dr=function(e){this.trigger(new m(b.Q6,e.data))};b.prototype.lf=function(e){this.trigger(new m(b.Uc,{state:e.data.state}))};b.CC="modelShow";b.BC="modelHide";b.xdb="modelEnd";b.DC="modelStart";b.Q6="videoTimeChange";b.Uc="playbackStateChange";return b});
define("ex",["require","exports"],function(){return function(){function a(){}a.prototype.clear=function(){};a.tb=function(d){this.id=d+"Component";this.not="!"+this.id};a.Vb=function(d){this.tb(d+"SystemState");this.K3=!0};a.K3=!1;return a}()});
define("fU",["require","exports","ex","three.mod"],function(a,d,l,m){var k;(function(c){var h=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.bias=0;G.TCa=500;G.intensity=1;G.scale=100;G.qFa=25;G.RFa=0;G.Mha=4;G.output=null;return G}Z(O,H);return O}(l);c.rH=h;h.tb("AmbientOcclusionEffect");var f=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.color="#ffffff";G.intensity=1;return G}Z(O,H);return O}(l);c.AmbientLight=f;f.tb("AmbientLight");var b=function(H){function O(){var G=
null!==H&&H.apply(this,arguments)||this;G.light=null;return G}Z(O,H);return O}(l);c.Wy=b;b.Vb("AmbientLight");var e=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.properties=null;return G}Z(O,H);return O}(l);c.Animation=e;e.tb("Animation");var g=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.$u=g;g.Vb("Animation");var n=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.xDa=!1;G.VJa=
!1;G.YU=2;return G}Z(O,H);return O}(l);c.tC=n;n.tb("AntialiasEffect");var q=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.u=[];G.renderOrder=null;G.N=null;return G}Z(O,H);return O}(l);c.Um=q;q.tb("Area");var p=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.u=[];return G}Z(O,H);return O}(l);c.Xy=p;p.Vb("Area");var r=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.d2=[];return G}Z(O,H);return O}(l);c.uC=r;r.Vb("AreaPoint");
var t=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(l);c.az=t;t.tb("Beacon");var u=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.position=null;return G}Z(O,H);return O}(l);c.bz=u;u.Vb("Beacon");var v=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.N=null;return G}Z(O,H);return O}(l);c.qo=v;v.tb("BeaconTracker");var w=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.position=null;
return G}Z(O,H);return O}(l);c.dv=w;w.Vb("BeaconTracker");var x=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.Bg=null;G.nIa=null;G.DB=!0;G.enabled=!0;G.locked=!1;G.fL=!0;G.hg=void 0;G.sk=0;return G}Z(O,H);return O}(l);c.tdb=x;var y=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.La=null;G.rotate=!1;return G}Z(O,H);return O}(l);c.wH=y;y.tb("CameraOffsetTransform");var z=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.La=null;
return G}Z(O,H);return O}(l);c.FLa=z;z.Vb("CameraOffsetTransform");var B=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.properties=null;return G}Z(O,H);return O}(l);c.xH=B;B.tb("CameraSequence");var D=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.ev=D;D.Vb("CameraSequence");var F=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.source=null;G.bH=null;G.opacity=1;G.isSprite=!1;G.hidden=
!1;G.depthTest=!0;return G}Z(O,H);return O}(l);c.hf=F;F.tb("CanvasMaterial");var A=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.cz=A;A.Vb("CanvasMaterial");var E=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(l);c.ZM=E;E.tb("Data");var J=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.target=null;return G}Z(O,H);return O}(l);c.DirectionalLight=J;J.tb("DirectionalLight");
var C=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.bo=null;return G}Z(O,H);return O}(l);c.Up=C;C.Vb("DirectionalLight");var L=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.N=null;G.direction=null;G.min=null;return G}Z(O,H);return O}(l);c.hv=L;L.tb("Draggable");var T=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.oia=null;return G}Z(O,H);return O}(l);c.dz=T;T.Vb("Draggable");var S=function(H){function O(){return null!==
H&&H.apply(this,arguments)||this}Z(O,H);return O}(l);c.Al=S;S.tb("Dragging");var U=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(x);c.NC=U;U.tb("FirstPersonControls");var X=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.Js=X;X.Vb("FirstPersonControls");var K=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.color="#ffffff";G.opacity=1;G.height=0;G.radius=1;G.renderOrder=
0;return G}Z(O,H);return O}(l);c.cq=K;K.tb("Floor");var N=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.floor=null;return G}Z(O,H);return O}(l);c.mv=N;N.Vb("Floor");var V=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.distance=0;G.AT=!1;G.x=0;G.y=0;G.z=0;return G}Z(O,H);return O}(l);c.nv=V;V.tb("FloorTransform");var W=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.Ks=W;W.Vb("FloorTransform");
var aa=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(x);c.OC=aa;aa.tb("FlyOverControls");var ca=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.ov=ca;ca.Vb("FlyOverControls");var ea=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.geometry=null;return G}Z(O,H);return O}(l);c.Geometry=ea;ea.tb("Geometry");var I=function(H){function O(){var G=null!==H&&H.apply(this,
arguments)||this;G.kCa="#ffffff";G.depthTest=!0;G.A2=10;G.tEa="#ffffff";G.size=10;return G}Z(O,H);return O}(l);c.Ls=I;I.tb("Grid");var P=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.grid=null;return G}Z(O,H);return O}(l);c.jz=P;P.Vb("Grid");var R=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.group=null;return G}Z(O,H);return O}(l);c.Group=R;R.tb("Group");var M=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.group=null;
return G}Z(O,H);return O}(l);c.EH=M;M.Vb("Group");var Q=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.properties=null;G.v3=null;G.N=null;G.Ep=null;G.priority=void 0;G.isSprite=!1;return G}Z(O,H);return O}(l);c.Bl=Q;Q.tb("ImageMaterial");var Y=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.kz=Y;Y.Vb("ImageMaterial");var ba=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.jIa=7;G.intensity=
1;return G}Z(O,H);return O}(l);c.dN=ba;ba.tb("MotionBlurEffect");var da=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.line=null;G.renderOrder=0;return G}Z(O,H);return O}(l);c.Line=da;da.tb("Line");var fa=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.line=null;return G}Z(O,H);return O}(l);c.nz=fa;fa.Vb("Line");var ha=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.color="#ffffff";G.opacity=1;G.width=1;G.transparent=!0;G.depthTest=
!0;return G}Z(O,H);return O}(l);c.uh=ha;ha.tb("LineMaterial");var ia=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.mz=ia;ia.Vb("LineMaterial");var ja=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.F=null;G.position=null;return G}Z(O,H);return O}(l);c.Ms=ja;ja.tb("LineToTransform");var ka=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(l);c.oz=ka;ka.Vb("LineToTransform");
var la=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.material=null;return G}Z(O,H);return O}(l);c.Material=la;la.tb("Material");var ma=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.name=null;return G}Z(O,H);return O}(l);c.rv=ma;ma.tb("MaterialVariant");var na=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.iq=na;na.Vb("MaterialVariant");var oa=function(H){function O(){var G=null!==
H&&H.apply(this,arguments)||this;G.Gp=null;G.renderOrder=0;return G}Z(O,H);return O}(l);c.Mesh=oa;oa.tb("Mesh");var pa=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.Gp=null;return G}Z(O,H);return O}(l);c.Ps=pa;pa.Vb("Mesh");var qa=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.properties=null;G.Sja=null;G.FHa=null;G.Ep=null;G.N=null;G.cja=null;G.zc=null;return G}Z(O,H);return O}(l);c.Xh=qa;qa.tb("Model");var ra=function(H){function O(){var G=null!==
H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.sv=ra;ra.Vb("Model");var sa=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(l);c.SC=sa;sa.tb("NotCollidable");var ta=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(l);c.IMa=ta;ta.Vb("NotCollidable");var ua=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.oma=!0;G.pma=!0;return G}Z(O,H);return O}(l);c.jq=ua;ua.tb("NotSelectable");
var va=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(l);c.TC=va;va.Vb("NotSelectable");var wa=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.qa=null;return G}Z(O,H);return O}(l);c.Object3D=wa;wa.tb("Object3D");var xa=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.id=null;G.container=null;return G}Z(O,H);return O}(l);c.KH=xa;xa.tb("Object3DId");var ya=function(H){function O(){var G=null!==H&&H.apply(this,
arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.tv=ya;ya.Vb("Object3DId");var za=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.sS=void 0;G.castShadow=void 0;G.receiveShadow=void 0;G.opacity=1;G.zS=void 0;G.N=null;return G}Z(O,H);return O}(l);c.vh=za;za.tb("ObjectTransform");var Aa=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(l);c.pz=Aa;Aa.Vb("ObjectTransform");var Ba=function(H){function O(){return null!==H&&H.apply(this,
arguments)||this}Z(O,H);return O}(x);c.UC=Ba;Ba.tb("OrbitControls");var Ca=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.vv=Ca;Ca.Vb("OrbitControls");var Da=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.width=100;G.height=100;return G}Z(O,H);return O}(l);c.OrthographicCamera=Da;Da.tb("OrthographicCamera");var Ea=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.camera=null;G.width=
void 0;G.height=void 0;return G}Z(O,H);return O}(l);c.Qs=Ea;Ea.Vb("OrthographicCamera");var Fa=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.F=null;G.attach=!1;G.id=null;return G}Z(O,H);return O}(l);c.lb=Fa;Fa.tb("Parent");var Ga=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.parent=null;G.Pd=null;G.id=void 0;G.attach=!1;return G}Z(O,H);return O}(l);c.Rs=Ga;Ga.Vb("Parent");var Ha=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||
this;G.width=100;G.height=100;G.fov=75;G.near=.01;G.far=100;G.OBa=!1;G.PBa=0;G.nl=!1;return G}Z(O,H);return O}(l);c.PerspectiveCamera=Ha;Ha.tb("PerspectiveCamera");var Ia=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.camera=null;G.tk=null;G.scene=null;G.boundingBox=null;G.Nha=null;G.F4=!1;G.width=void 0;G.height=void 0;G.fov=void 0;G.near=void 0;G.far=void 0;return G}Z(O,H);return O}(l);c.Pj=Ia;Ia.Vb("PerspectiveCamera");var Ja=function(H){function O(){var G=null!==H&&H.apply(this,
arguments)||this;G.sf=1;G.Gf=1;G.oh=1;G.scale=1;G.GB=void 0;G.HB=void 0;return G}Z(O,H);return O}(l);c.Qj=Ja;Ja.tb("PixelScaleTransform");var Ka=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(l);c.WC=Ka;Ka.Vb("PixelScaleTransform");var La=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.renderOrder=null;return G}Z(O,H);return O}(l);c.Plane=La;La.tb("Plane");var Ma=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;
G.manager=null;return G}Z(O,H);return O}(l);c.wv=Ma;Ma.Vb("Plane");var Na=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.La=null;G.N=null;G.matrixWorld=null;G.origin=new m.Vector3;G.direction=new m.Vector3;G.Xb=new m.Vector2;G.jH=!1;G.wCa=!1;G.Zi=!1;G.enabled=!0;return G}Z(O,H);return O}(l);c.Fc=Na;Na.tb("Pointer");var Oa=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.F=null;G.rotate=!0;G.N=null;return G}Z(O,H);return O}(l);c.yk=Oa;Oa.tb("PointerOverTransform");
var Pa=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.Ss=Pa;Pa.Vb("PointerOverTransform");var Qa=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.xv=Qa;Qa.Vb("PointerDragging");var Ra=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.yv=Ra;Ra.Vb("PointerSelection");var Sa=function(H){function O(){var G=
null!==H&&H.apply(this,arguments)||this;G.jC=null;G.VU=null;G.bV=null;return G}Z(O,H);return O}(l);c.Wm=Sa;Sa.tb("ProjectedMaterial");var Ta=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.jC=null;G.qa=null;G.zM=null;G.sy=null;G.material=null;G.UL=null;return G}Z(O,H);return O}(l);c.kq=Ta;Ta.Vb("ProjectedMaterial");var Ua=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.zc=null;G.renderer=null;G.yU=[];return G}Z(O,H);return O}(l);c.zi=Ua;Ua.tb("Renderer");
var Va=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.Ts=Va;Va.Vb("Renderer");var Wa=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.opacity=1;G.locked=!1;G.enabled=!0;G.scene=null;G.La=null;G.backgroundColor=null;G.Gha=null;G.QBa=null;G.environmentIntensity=1;G.aDa=null;G.uia=null;G.qDa=null;G.rDa=0;G.US=0;G.outputEncoding=null;G.I4=1;G.N=null;return G}Z(O,H);return O}(l);c.Scene=Wa;Wa.tb("Scene");var Xa=
function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.scene=null;G.manager=null;return G}Z(O,H);return O}(l);c.vo=Xa;Xa.Vb("Scene");var Ya=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.N=null;G.GM=!1;G.Ux=!0;G.Dy=!1;G.mH=!1;return G}Z(O,H);return O}(l);c.Id=Ya;Ya.tb("Selectable");var Za=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(l);c.XC=Za;Za.Vb("Selectable");var $a=function(H){function O(){var G=null!==H&&
H.apply(this,arguments)||this;G.color="#ffffff";G.opacity=1;G.depthTest=!0;G.doubleSided=!1;return G}Z(O,H);return O}(l);c.ld=$a;$a.tb("SolidMaterial");var ab=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.zv=ab;ab.Vb("SolidMaterial");var bb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.radius=1;G.widthSegments=32;G.heightSegments=16;G.renderOrder=0;return G}Z(O,H);return O}(l);c.Sphere=bb;bb.tb("Sphere");
var cb=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(l);c.YC=cb;cb.Vb("Sphere");var db=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(l);c.SpotLight=db;db.tb("SpotLight");var eb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.light=null;G.bo=null;return G}Z(O,H);return O}(l);c.Vs=eb;eb.Vb("SpotLight");var fb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.VK=.5;G.WK=
.5;G.height=100;G.width=100;G.scale=1;G.sizeAttenuation=!1;G.Ph=null;G.renderOrder=0;return G}Z(O,H);return O}(l);c.Sprite=fb;fb.tb("Sprite");var gb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.Ws=gb;gb.Vb("Sprite");var hb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.Rx=!1;G.positionX=0;G.positionY=0;G.positionZ=0;G.Rd=0;G.ud=0;G.He=0;G.Ge="XYZ";G.scale=1;G.sf=1;G.Gf=1;G.oh=1;G.translationX=0;G.translationY=
0;G.Je=0;G.easing=0;G.N=null;return G}Z(O,H);return O}(l);c.va=hb;hb.tb("Transform");var ib=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.Rx=!1;G.positionX=0;G.positionY=0;G.positionZ=0;G.Rd=0;G.ud=0;G.He=0;G.Ge="XYZ";G.scale=1;G.sf=1;G.Gf=1;G.oh=1;G.translationX=0;G.translationY=0;G.Je=0;return G}Z(O,H);return O}(l);c.Zf=ib;ib.Vb("Transform");var jb=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(l);c.aD=jb;jb.Vb("TransformEasing");
var kb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.translate=!0;G.rotate=!0;G.scale=!0;G.N=null;return G}Z(O,H);return O}(l);c.Xg=kb;kb.tb("TransformControls");var lb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.O5=null;G.Qu=null;G.zy=null;return G}Z(O,H);return O}(l);c.Il=lb;lb.Vb("TransformControls");var mb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.hg=void 0;return G}Z(O,H);return O}(x);c.Bv=mb;mb.tb("TransitionControls");
var nb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.Ys=nb;nb.Vb("TransitionControlsSystemState");var ob=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.properties=null;G.Ama=null;G.N=null;return G}Z(O,H);return O}(l);c.xo=ob;ob.tb("VideoMaterial");var pb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.uz=pb;pb.Vb("VideoMaterial");var qb=
function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.La=null;G.width=null;G.height=null;return G}Z(O,H);return O}(l);c.Ym=qb;qb.tb("Viewport");var rb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.La=null;G.properties=null;return G}Z(O,H);return O}(l);c.vz=rb;rb.tb("ViewportPlaneGeometry");var sb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.geometry=null;G.LJa=void 0;G.JJa=void 0;G.PEa=void 0;G.verticalAlign=void 0;G.kIa=void 0;
G.zIndex=void 0;return G}Z(O,H);return O}(l);c.Dv=sb;sb.Vb("ViewportPlaneGeometry");var tb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.hHa=1;G.XEa=.5;G.color="#000000";G.opacity=.5;return G}Z(O,H);return O}(l);c.QH=tb;tb.tb("VignetteEffect");var ub=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(l);c.zk=ub;ub.Vb("XRPerspectiveCamera");var vb=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(x);
c.RH=vb;vb.tb("XRDragControls");var wb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.pq=wb;wb.Vb("XRDragControlsSystemState");var xb=function(H){function O(){return null!==H&&H.apply(this,arguments)||this}Z(O,H);return O}(x);c.SH=xb;xb.tb("XRFlyControls");var yb=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.qq=yb;yb.Vb("XRFlyControlsSystemState");var zb=function(H){function O(){return null!==
H&&H.apply(this,arguments)||this}Z(O,H);return O}(x);c.TH=zb;zb.tb("XRTeleportControls");var Ab=function(H){function O(){var G=null!==H&&H.apply(this,arguments)||this;G.manager=null;return G}Z(O,H);return O}(l);c.rq=Ab;Ab.Vb("XRTeleportControlsSystemState")})(k||(k={}));return k});
define("kJ",["require","jquery.mod","w"],function(a){function d(){this.xa=l("<div/>");this.xa.css({position:"absolute",left:0,top:0,right:0,bottom:0,"z-index":0,"pointer-events":"none","background-color":"#ffffff"});this.xa.hide()}var l=a("jquery.mod"),m=a("w");d.prototype.hd=function(){return this.xa};d.prototype.trigger=function(){m.browser()!=m.sh&&this.xa.fadeIn(100).fadeOut(100)};return d});
define("mF",["require","exports"],function(){return function(){function a(d,l){this.P=d;this.tag=l||"Entity";this.id=this.tag+"_"+a.ST++;this.components={};this.pU={};this.$la=0}a.prototype.getComponent=function(d){return this.components[d.id]};a.prototype.J=function(d,l){void 0===l&&(l=!1);var m=this.components[d.id];m?this.P.n4a(this,d):l&&(m=this.I(d));return m};a.prototype.I=function(d){if(d.id in this.components)return this.components[d.id];d.K3&&this.$la++;var l=this.components[d.id]=new d;
this.P.v3a(this,d);return l};a.prototype.ia=function(d){var l;void 0===l&&(l=!1);d.id in this.components&&(d.K3&&this.$la--,l?this.components[d.id].clear():this.pU[d.id]=this.components[d.id],delete this.components[d.id],this.P.ZHa(this,d,l))};a.prototype.r4a=function(){for(var d in this.pU)this.pU[d].clear(),delete this.pU[d]};a.prototype.K9a=function(){for(var d in this.components){var l=this.components[d].constructor;l.K3||(this.pU[d]=this.components[d],delete this.components[d],this.P.ZHa(this,
l,!1))}};a.ST=0;return a}()});define("ci",["require","exports"],function(){return function(){function a(){this.id=a.sWa++;this.u=[]}a.sWa=0;return a}()});define("lr",["require","exports"],function(){return function(){function a(d,l){this.id=a.ST++;this.name=l;this.u=d.u;this.Nd=d.u.slice();this.Ea=[];this.pg=[]}a.prototype.o4a=function(){this.Nd.length&&(this.Nd=[]);this.Ea.length&&(this.Ea=[]);this.pg.length&&(this.pg=[])};a.ST=0;return a}()});
define("bw",["require","exports","ci","lr"],function(a,d,l,m){function k(f){return"string"==typeof f?f:f.id}function c(f,b){0>f.indexOf(b)&&f.push(b);return f}function h(f,b){b=f.indexOf(b);0<=b&&f.splice(b,1);return f}return function(){function f(){this.n7a={};this.H={};this.JG={};this.lL={};this.ay={};this.HG={};this.HS={};this.GG={}}f.prototype.la=function(b){this.HS[b.id]={};this.HS[b.not]={}};f.prototype.S4a=function(b,e){b=this.lUa(b);e=new m(b,e);this.JG[b.id].push(e);return e};f.prototype.lUa=
function(b){var e=this.E6a(b);if(e=this.n7a[e])return e;e=new l;this.H[e.id]=e;b=b.map(k);this.GG[e.id]={};for(var g=0;g<b.length;g++){var n=b[g];this.GG[e.id][n]=!0;this.HS[n][e.id]=!0}this.HG[e.id]={};this.JG[e.id]=[];return e};f.prototype.E6a=function(b){b=b.map(k);b.sort();return b.join("-")};f.prototype.H8a=function(b){this.lL[b.id]={};this.ay[b.id]={}};f.prototype.I8a=function(b){delete this.lL[b.id];delete this.ay[b.id]};f.prototype.C8a=function(b,e){var g=e.id,n=e.not;e=b.id;this.lL[e][g]=
!0;for(var q in this.ay[e])if(n in this.GG[q]){delete this.HG[q][e];delete this.ay[e][q];h(this.H[q].u,b);for(var p=this.JG[q],r=0,t=p.length;r<t;r++){var u=p[r];c(u.pg,b);h(u.Nd,b);h(u.Ea,b)}}for(q in this.HS[g])if(!(e in this.HG[q])){g=!0;for(var v in this.GG[q])if(n="!"!=v[0],(n?v:v.slice(1))in this.lL[e]!=n){g=!1;break}if(g)for(this.HG[q][e]=!0,this.ay[e][q]=!0,c(this.H[q].u,b),p=this.JG[q],r=0,t=p.length;r<t;r++)u=p[r],c(u.Nd,b),h(u.pg,b),h(u.Ea,b)}};f.prototype.E8a=function(b,e){var g=e.id,
n="!"+g;e=b.id;delete this.lL[e][g];for(var q in this.ay[e])if(g in this.GG[q]){delete this.HG[q][e];delete this.ay[e][q];h(this.H[q].u,b);for(var p=this.JG[q],r=0,t=p.length;r<t;r++){var u=p[r];c(u.pg,b);h(u.Nd,b);h(u.Ea,b)}}for(q in this.HS[n])if(!(e in this.HG[q])){g=!0;for(var v in this.GG[q])if(n="!"!=v[0],(n?v:v.slice(1))in this.lL[e]!=n){g=!1;break}if(g)for(this.HG[q][e]=!0,this.ay[e][q]=!0,this.H[q].u.push(b),p=this.JG[q],r=0,t=p.length;r<t;r++)u=p[r],c(u.Nd,b),h(u.pg,b),h(u.Ea,b)}};f.prototype.D8a=
function(b,e){e=e.id;var g=b.id,n;for(n in this.ay[g])if(e in this.GG[n]){g=this.JG[n];for(var q=0,p=g.length;q<p;q++)c(g[q].Ea,b)}};return f}()});
define("lN",["require","exports","bo","mF","bw"],function(a,d,l,m,k){return function(){function c(h){this.enabled=!0;this.u={};this.MS=[];this.components={};this.aV=[];this.IG=new k;this.F2=[];this.vka=!1;this.dU=h}c.prototype.b5=function(h){this.D5a=h};c.prototype.Ap=function(){return this.dU};c.prototype.la=function(h){this.components[h.id]=h;this.IG.la(h);return this};c.prototype.bd=function(h,f){var b=(new h).initialize(this,f,this.aV.length);this.aV.push(b);for(var e in h.H)b[e]=this.IG.S4a(h.H[e],
f+"."+e);this.aV.sort(function(g,n){return g.order-n.order});return this};c.prototype.Nc=function(h){h=new m(this,h);this.u[h.id]=h;this.IG.H8a(h);this.Ta();return h};c.prototype.Hd=function(h){h.id in this.u&&(delete this.u[h.id],this.MS.push(h),h.K9a(),this.Ta())};c.prototype.v3a=function(h,f){this.IG.C8a(h,f);this.Ta()};c.prototype.ZHa=function(h,f,b){this.IG.E8a(h,f);b||this.F2.push(h);this.Ta()};c.prototype.n4a=function(h,f){this.IG.D8a(h,f);this.Ta()};c.prototype.sb=function(h){this.enabled=
h;this.Ta()};c.prototype.Ta=function(){this.enabled&&!this.vka&&(this.vka=!0,l.requestFrame(this.update,this,this.D5a))};c.prototype.update=function(h){h=h||0;this.vka=!1;if(this.enabled){for(var f=(new Date).getTime(),b=0;b<this.aV.length;b++){var e=this.aV[b];e.Wc(h,f);for(var g in e.constructor.H)e[g].o4a()}for(b=0;b<this.F2.length;b++)this.F2[b].r4a();this.F2.length=0;for(b=this.MS.length-1;0<=b;b--)0==this.MS[b].$la&&(this.IG.I8a(this.MS[b]),this.MS.splice(b,1))}};return c}()});
define("mf",["require","exports"],function(){return function(){function a(){this.order=0;this.P=null;this.name=""}a.prototype.initialize=function(d,l,m){void 0===m&&(m=0);this.P=d;this.name=l;this.order=m;return this};a.prototype.Wc=function(){};return a}()});
define("cQ","require exports three.mod oq fU mf".split(" "),function(a,d,l,m,k,c){a=function(h){function f(){var b=h.call(this)||this;b.Wb=b.Wb.bind(b);b.Ib=b.Ib.bind(b);b.zf=b.zf.bind(b);b.kb=b.kb.bind(b);return b}Z(f,h);f.prototype.Wc=function(){this.EB.u.length&&this.EB.u.slice().forEach(this.Wb);this.FB.u.length&&this.FB.u.slice().forEach(this.kb);this.Nh.Ea.length&&this.Nh.Ea.slice().forEach(this.Ib);this.Nh.u.length&&this.Nh.u.slice().forEach(this.zf)};f.prototype.Wb=function(b){var e=b.I(k.Wy),
g=b.I(k.Object3D);e.light=g.qa=new l.AmbientLight;this.Ib(b)};f.prototype.Ib=function(b){var e=b.getComponent(k.AmbientLight);b=b.getComponent(k.Wy).light;b.color=m.Qp(e.color).convertLinearToSRGB();b.intensity=e.intensity*Math.PI;b.visible=0<b.intensity};f.prototype.zf=function(){};f.prototype.kb=function(b){var e=b.getComponent(k.Wy).light;e.parent&&e.parent.remove(e);b.ia(k.Wy);b.ia(k.Object3D)};f.H={};return f}(c);a.H={};a.H.EB=[k.AmbientLight,k.Wy.not];a.H.Nh=[k.AmbientLight,k.Wy];a.H.FB=[k.AmbientLight.not,
k.Wy];return a});
define("cm",["require","pB","lx"],function(a){function d(k,c,h,f,b){this.o=k;this.qe=c;this.qg=h;this.Bk=f;this.Ga=b;this.A0()}var l=a("pB"),m=a("lx");d.prototype.getAnimations=function(){return this.qg};d.prototype.bT=function(){return this.Bk};d.prototype.frame=function(k){this.C==m.PLAYING&&(this.Qt(this.xh.time+k/1E3),this.Ga())};d.prototype.dispose=function(){this.a1();this.xz=this.kD=this.xh=this.Ga=this.Bk=this.qg=this.qe=this.o=null};d.prototype.A0=function(){this.xh=new THREE.AnimationMixer(this.qe);this.Sb=
0;this.Cb=!1;this.kD=[];this.xz=[];for(var k=0;k<this.qg.length;k++){var c=this.qg[k],h="alternate"==c.get("animationDirection"),f=this.Sb;this.Sb+=this.Bk[k].duration*(h?2:1);this.xz.push({start:f,end:this.Sb});f=this.xh.clipAction(this.Bk[k]);h?f.setLoop(THREE.LoopPingPong,2):f.setLoop(THREE.LoopOnce,1);this.kD.push(f);c.set("state",m.U);c.set("currentTime",0);c.set("duration",this.Bk[k].duration)}this.C=m.U;this.Kl=void 0;this.o.bind(l.G("state"),this.Li,this,!0);this.o.bind(l.G("currentTime"),
this.DE,this,!0);this.o.bind(l.G("animationDirection"),this.iva,this,!0);this.o.set("duration",this.Sb);this.Qt(0);this.o.get("autoplay")&&this.o.set("state",m.PLAYING)};d.prototype.a1=function(){this.o.unbind(l.G("state"),this.Li,this,!0);this.o.unbind(l.G("currentTime"),this.DE,this,!0);this.o.unbind(l.G("animationDirection"),this.iva,this,!0);this.o.set("state",m.U);for(var k=0;k<this.qg.length;k++)this.kD[k].stop(),this.xh.uncacheClip(this.Bk[k]),this.qg[k].set("state",m.U),this.qg[k].set("currentTime",
0);this.o.set("duration",void 0);this.o.set("currentTime",void 0)};d.prototype.iva=function(){this.a1();this.A0()};d.prototype.Li=function(){var k=this.o.get("state");this.C!=k&&(this.C==m.U?k==m.Qb?this.o.set("state",m.U):k==m.PLAYING&&(this.C=m.PLAYING,this.Cb=!1,this.Qt(0),this.Ga()):this.C==m.PLAYING?k==m.U?(this.C=m.U,this.Cb&&"last"==this.o.get("finalFrame")?this.Qt(this.Sb):this.Qt(0)):k==m.Qb&&(this.C=m.Qb):this.C==m.Qb&&(k==m.PLAYING?(this.C=m.PLAYING,this.Ga()):k==m.U&&(this.C=m.U,this.Qt(0))),
void 0!==this.Kl&&this.qg[this.Kl].set("state",this.C),this.o.set("state",this.C))};d.prototype.DE=function(){var k=this.o.get("currentTime");this.xh.time!=k&&(this.C!=m.U&&this.Qt(k),this.o.set("currentTime",this.xh.time))};d.prototype.Qt=function(k){if(this.xh.time!=k||void 0===this.Kl)if(k>this.Sb)this.o.get("loop")?this.o.set("currentTime",k%this.Sb):(this.Cb=!0,this.o.trigger(l.Gb),this.o.set("state",m.U));else{for(var c=this.Kl||0;k>this.xz[c].end;)c++;for(;k<this.xz[c].start;)c--;if(this.Kl!==
c){for(var h=this.Kl||0;h<c;h++){var f=this.qg[h],b=this.kD[h],e=this.xz[h];"last"==f.get("finalFrame")&&"normal"==f.get("animationDirection")?(b.reset(),b.startAt(e.start),f.set("currentTime",f.get("duration")),b.clampWhenFinished=!0,b.play()):(f.set("currentTime",0),b.stop(),b.clampWhenFinished=!1);f.set("state",m.U)}f=this.qg[c];b=this.kD[c];e=this.xz[c];b.reset();b.startAt(e.start);b.clampWhenFinished="last"==f.get("finalFrame")&&"normal"==f.get("animationDirection");b.play();for(h=this.Kl||0;h>
c;h--)f=this.qg[h],b=this.kD[h],f.set("currentTime",0),b.stop();this.Kl=c}else b=this.kD[this.Kl],k<this.xh.time&&(b.reset(),b.startAt(this.xz[this.Kl].start)),b.paused=!1;this.xh.update(k-this.xh.time);f=this.qg[this.Kl];f.set("state",this.C);k=this.xh.time-this.xz[this.Kl].start;f=f.get("duration");c=k>f;this.qg[this.Kl].set("currentTime",c?2*f-k:k);this.qg[this.Kl].set("currentDirection",c?"backward":"forward");this.o.set("currentTime",this.xh.time);this.Ga()}};return d});
define("ke",["require","pB","lx"],function(a){function d(k,c,h,f,b){this.o=k;this.qe=c;this.qg=h;this.Bk=f;this.Ga=b;this.bda=this.bda.bind(this);this.Wca=this.Wca.bind(this);this.A0()}var l=a("pB"),m=a("lx");d.prototype.dispose=function(){this.a1();this.Ga=this.Bk=this.qg=this.qe=this.o=null};d.prototype.getAnimations=function(){return this.qg};d.prototype.bT=function(){return this.Bk};d.prototype.frame=function(k){0<this.Kv.length&&(this.xh.update(k/1E3),this.Kv.forEach(function(c){this.upa(c)}.bind(this)),
this.Ga())};d.prototype.A0=function(){this.xh=new THREE.AnimationMixer(this.qe);this.xh.addEventListener("loop",this.bda);this.xh.addEventListener("finished",this.Wca);this.Jv=new Map;this.sW=new Map;this.Kv=[];for(var k=0;k<this.qg.length;k++){var c=this.qg[k],h=this.Bk[k];this.sW.set(c,h);var f=this.xh.clipAction(h);this.Jv.set(c,f);c.set("duration",h.duration);c.set("currentTime",c.get("currentTime")||0);c.set("currentDirection","forward");c.bind(l.G("state"),this.Xua,this,!0);c.bind(l.G("animationDirection"),
this.Uua,this,!0);c.bind(l.G("currentTime"),this.Tua,this,!0);c.bind(l.G("currentDirection"),this.Sua,this,!0);c.bind(l.G("loop"),this.Wua,this,!0);c.bind(l.G("finalFrame"),this.Vua,this,!0);this.AK(c);this.jAa(c)}this.Ga()};d.prototype.a1=function(){for(var k=0;k<this.qg.length;k++){var c=this.qg[k];c.unbind(l.G("state"),this.Xua,this,!0);c.unbind(l.G("animationDirection"),this.Uua,this,!0);c.unbind(l.G("currentTime"),this.Tua,this,!0);c.unbind(l.G("currentDirection"),this.Sua,this,!0);c.unbind(l.G("loop"),
this.Wua,this,!0);c.unbind(l.G("finalFrame"),this.Vua,this,!0);this.Jv.get(c).stop();this.Jv["delete"](c);this.xh.uncacheClip(this.sW.get(c));this.sW["delete"](c);this.qg[k].set("state",m.U);this.qg[k].set("currentTime",0)}this.xh=this.sW=this.Jv=null};d.prototype.bda=function(k){this.Jv.forEach(function(c,h){k.action==c&&h.get("loop")&&h.trigger(l.lq)})};d.prototype.Wca=function(k){this.Jv.forEach(function(c,h){k.action==c&&(this.upa(h),h.set("state",m.U),"alternate"==h.get("animationDirection")&&
h.set("currentDirection","forward"==h.get("currentDirection")?"backward":"forward"),h.trigger(l.Gb))}.bind(this))};d.prototype.Uua=function(k){this.AK(k.source)};d.prototype.Wua=function(k){this.AK(k.source)};d.prototype.Vua=function(k){this.AK(k.source)};d.prototype.Sua=function(k){this.AK(k.source)};d.prototype.Tua=function(k){this.AK(k.source)};d.prototype.upa=function(k){this.spa=!0;var c=this.Jv.get(k),h="alternate"==k.get("animationDirection");h=0<c._loopCount&&1==c._loopCount%2&&h;k.set("currentDirection",
h?"backward":"forward");c=c.time;var f=k.get("duration");h?k.set("currentTime",f-c):k.set("currentTime",c);this.spa=!1};d.prototype.AK=function(k){if(!this.spa){var c=this.Jv.get(k),h="alternate"==k.get("animationDirection"),f="backward"==k.get("currentDirection")&&h,b=k.get("loop"),e="last"==k.get("finalFrame"),g=k.get("currentTime");k=k.get("duration");b?(c.loop=h?THREE.LoopPingPong:THREE.LoopRepeat,c.repetitions=Infinity,c.clampWhenFinished=!1):f?(c.loop=THREE.LoopPingPong,c.repetitions=2,c.clampWhenFinished=
!1):(c.loop=THREE.LoopOnce,c.repetitions=1,c.clampWhenFinished=e||h);h=!h||-1!=c._loopCount&&0!=c._loopCount%2?h&&1==c._loopCount%2?k-g:g:f?k+k-g:g;c.time!=h&&(c.time=h,c.paused&&c.enabled&&0==h&&c.stop());this.Ga()}};d.prototype.Xua=function(k){this.jAa(k.source)};d.prototype.jAa=function(k){var c=this.Jv.get(k),h=k.get("state");var f=0<=this.Kv.indexOf(k)?m.PLAYING:c.paused&&c.enabled&&c.time<k.get("duration")?m.Qb:m.U;f!=h&&(f==m.PLAYING?h==m.Qb?(this.Kv.splice(this.Kv.indexOf(k),1),c.paused=!0):
h==m.U&&(this.Kv.splice(this.Kv.indexOf(k),1),!c.paused&&c.enabled&&c.stop()):f==m.Qb?h==m.PLAYING?(this.Kv.push(k),c.paused=!1):h==m.U&&c.stop():f==m.U&&(h==m.PLAYING?(this.Kv.push(k),c.paused&&c.enabled&&"alternate"==k.get("animationDirection")&&"backward"==k.get("currentDirection")?c.paused=!1:(c.reset(),c.play(),c.fadeIn(.1))):h==m.Qb&&(c.play(),c.paused=!0,this.xh.update(0))),k.set("state",h),this.Ga())};return d});
define("lz",["require","exports"],function(){return function(){function a(){}a.Gm=function(d,l,m){return this.TF(d,l,m)};a.Sp=function(d,l,m){return this.TF(d,m,l)};a.TF=function(d,l,m){return 2*Math.atan(m*Math.tan(d*this.ZC*.5)/l)*this.lNa};a.lNa=180/Math.PI;a.ZC=Math.PI/180;return a}()});
define("cv",["require","exports","fU","lz","three.mod"],function(a,d,l,m,k){return function(){function c(){}c.Xc=function(h){return h?h.isObject3D?h:(h=h.getComponent(l.Object3D))?h.qa:null:null};c.getWorldPosition=function(h,f){f=f||new k.Vector3;h=this.Xc(h);if(!h)return null;f.setFromMatrixPosition(h.matrixWorld);return f};c.MU=function(h,f){(h=h.getComponent(l.Object3D))&&null!==h.qa&&(h=h.qa,h.matrixAutoUpdate=!1,h.matrixWorldNeedsUpdate=!1,f.Rx&&h.parent?(h.parent.updateWorldMatrix(!0,!1),h.matrix.copy(h.parent.matrixWorld).invert()):
h.matrix.identity(),h.matrix.multiply(this.V3.makeTranslation(f.translationX,f.translationY,f.Je)),h.matrix.multiply(this.V3.makeRotationFromEuler(this.o5a.set(f.Rd*this.ZC,f.ud*this.ZC,f.He*this.ZC,f.Ge))),h.matrix.multiply(this.V3.makeTranslation(f.positionX,f.positionY,f.positionZ)),h.matrix.multiply(this.V3.makeScale(f.scale*f.sf,f.scale*f.Gf,f.scale*f.oh)),h.updateMatrixWorld(!0),h.matrix.decompose(h.position,h.quaternion,h.scale))};c.bT=function(h){if(!h)return[];h=h.getComponent(l.Xh);return(h=
null===h||void 0===h?void 0:h.cja)?h.animations||[]:[]};c.dT=function(h){return h.getComponent(l.Qs)||h.getComponent(l.Pj)};c.Vr=function(h){var f=h.getComponent(l.Qs);return f?f.camera:(h=h.getComponent(l.Pj))?h.tk||h.camera:null};c.qf=function(h){return this.lT(this.Xc(h))};c.lT=function(h){for(;h&&!h.isScene;)h=h.parent;return h};c.Tab=function(h,f){h.userData.camera=f};c.Wab=function(h,f,b){h.userData.width=f;h.userData.height=b};c.Uab=function(h,f){h.userData.colorSpace!==f&&(h.userData.colorSpace=
f,this.xma(h))};c.Vab=function(h,f){h.userData.yDa!==f&&(h.userData.yDa=f,this.xma(h))};c.Cu=function(h){return h.userData.camera};c.oT=function(h){return h.userData.width};c.yB=function(h){return h.userData.height};c.nT=function(h){return h.userData.colorSpace};c.k5=function(h,f){h.userData.background!==f&&(h.userData.background=f,this.xma(h))};c.xma=function(h){if(h&&h.userData){var f=h.userData.background,b=h.userData.colorSpace,e=h.userData.yDa;f&&f.isColor?h.background=b==k.SRGBColorSpace||e?
f:f.clone().convertLinearToSRGB():(f&&f.isTexture&&(f.colorSpace=b==k.SRGBColorSpace?k.SRGBColorSpace:k.LinearSRGBColorSpace),h.background=f)}};c.s3a=function(h,f){var b=h.userData.Xla||(h.userData.Xla=[]);0<=b.indexOf(f)||(b.push(f),h.add(f),this.Q5(h))};c.UHa=function(h,f){var b=h.userData.Xla;if(b){var e=b.indexOf(f);0>e||(b.splice(e,1),h.remove(f))}};c.Q5=function(h){var f=h.userData.Xla;if(f){var b=.99*-h.far;f.forEach(function(e){e.position.z=b})}};c.u3a=function(h,f){var b=h.userData.Tla||
(h.userData.Tla=[]);0<=b.indexOf(f)||(b.push(f),h.add(f),this.QKa(h))};c.WHa=function(h,f){var b=h.userData.Tla;if(b){var e=b.indexOf(f);0>e||(b.splice(e,1),h.remove(f))}};c.QKa=function(h){var f=h.userData.Tla;if(f){var b=.99*h.far;f.forEach(function(e){e.scale.x=e.scale.y=e.scale.z=b})}};c.t3a=function(h,f){var b=h.userData.$ja||(h.userData.$ja=[]);0<=b.indexOf(f)||(b.push(f),h.add(f),this.PKa(h))};c.VHa=function(h,f){var b=h.userData.$ja;if(b){var e=b.indexOf(f);0>e||(b.splice(e,1),h.remove(f))}};
c.PKa=function(h){var f=h.userData.$ja;if(f){var b=1.001*h.near;f.forEach(function(e){e.position.z=-b;e.scale.x=e.scale.y=e.scale.z=2*Math.tan((1<h.aspect?m.Sp(h.fov,h.aspect,1):h.fov)*this.ZC*.5)*b*2}.bind(this))}};c.fG=function(h){if((h=this.Xc(h))&&h.parent){var f=this.qEa(h);if(f)return this.UT.setFromMatrixScale(h.parent.matrixWorld),f/Math.max(this.UT.x,this.UT.y,this.UT.z)}};c.qEa=function(h){if((h=this.Xc(h))&&h.parent){var f=this.lT(h);if(f){var b=this.Cu(f);if(b)return h.matrixWorld.decompose(this.objectPosition,
this.x8a,this.UT),this.objectPosition.applyMatrix4(b.matrixWorldInverse),this.Am.setFromMatrixScale(b.matrixWorld),2*Math.abs(this.objectPosition.z)*Math.tan(b.fov*this.ZC/2)*Math.max(this.Am.x,this.Am.y,this.Am.z)/this.yB(f)}}};c.uB=function(h,f){if(h.userData.id===f)return h;var b=null;if(h.children)for(var e=0;e<h.children.length&&!b;e++)b=this.uB(h.children[e],f);if(!b&&h.skeleton)for(e=0;e<h.skeleton.bones.length&&!b;e++)b=this.uB(h.skeleton.bones[e],f);return b};c.HDa=function(){this.ria||(this.ria=
new k.WebGLRenderer);return this.ria};c.wJa=function(h){this.nia||(this.nia=new k.DRACOLoader,this.nia.setDecoderPath(k.Oma));this.O3||(this.O3=new k.KTX2Loader,this.O3.setTranscoderPath(k.Gma),this.O3.detectSupport(this.HDa()));h.setKTX2Loader(this.O3);h.setMeshoptDecoder(k.MeshoptDecoder);h.setDRACOLoader(this.nia);return h};c.V3=new k.Matrix4;c.o5a=new k.Euler;c.objectPosition=new k.Vector3;c.x8a=new k.Quaternion;c.UT=new k.Vector3;c.Am=new k.Vector3;c.ZC=Math.PI/180;c.ria=null;return c}()});
define("D","require lh lx fU bk cm ke cv".split(" "),function(a){function d(g){this.m=g;this.Bk=this.qe=null;this.tW={};this.CX=new Map;this.xt=this.Ll=this.o=null;this.zg=!1;this.GP=this.GP.bind(this);this.update()}function l(g,n){if(g==n||!(null!=g&&0!=g.length||null!=n&&0!=n.length))return!0;if(null==g||null==n||g.length!=n.length)return!1;for(var q=0;q<g.length;q++)if(g[q]!=n[q])return!1;return!0}var m=a("lh"),k=a("lx"),c=a("fU"),h=a("bk"),f=a("cm"),b=a("ke"),e=a("cv");d.prototype.update=function(){var g=
this.m.getComponent(c.Animation);this.Ti(g&&g.properties)};d.prototype.frame=function(g,n){this.HK();this.zg&&(this.zg=!1,this.Ll&&this.Ll.frame(g,n),this.xt&&this.xt.frame(g,n))};d.prototype.dispose=function(){this.Ti(null)};d.prototype.Ti=function(g){this.o!=g&&(this.o&&(m.ca(this.o,["animations.autoplay"],this.GP),this.cZa()),(this.o=g)&&m.ju(this.o,["animations.autoplay"],this.GP),this.GP())};d.prototype.GP=function(){this.rAa()};d.prototype.HK=function(){if(!this.qe){var g=e.Xc(this.m),n=e.bT(this.m);
if(this.qe!=g||this.Bk!=n)this.qe=g,this.Bk=n,this.tW={},this.Bk.forEach(function(q){q.name&&(this.tW[q.name]=q)}.bind(this)),this.rAa()}};d.prototype.rAa=function(){var g=this.o&&this.o.get("animations")||[],n=this.Bk||[],q=n.slice(),p=[],r=[],t=[],u=[];g.length&&n.length&&g.forEach(function(v){var w=v.get("index"),x=v.get("name"),y;void 0!==w&&w<n.length?y=n[w]:void 0!==x&&x in this.tW&&(y=this.tW[x]);0<=q.indexOf(y)&&(q.splice(q.indexOf(y),1),v.get("autoplay")?(p.push(y),r.push(v)):(t.push(y),
u.push(v)))}.bind(this));this.o&&0==r.length&&0<q.length&&(r=q.map(function(v){if(this.CX.has(v))return this.CX.get(v);var w=new h;this.CX.set(v,w);return w}.bind(this)),p=q);l(this.Ll&&this.Ll.getAnimations()||[],r)&&l(this.Ll&&this.Ll.bT()||[],p)||(this.Ll&&(this.Ll.dispose(),this.Ll=null),0<r.length&&(this.Ll=new f(this.o,this.qe,r,p,this.Ga.bind(this))));l(this.xt&&this.xt.getAnimations()||[],u)&&l(this.xt&&this.xt.bT()||[],t)||(this.xt&&(this.xt.dispose(),this.xt=null),0<u.length&&(this.xt=new b(this.o,
this.qe,u,t,this.Ga.bind(this))))};d.prototype.cZa=function(){(this.o&&this.o.get("animations")||[]).forEach(function(g){g.set("state",k.U);g.set("currentTime",0)});this.CX.clear()};d.prototype.Ga=function(){this.zg||(this.zg=!0,this.m.P.Ta())};d.$a=function(g){g.I(c.$u).manager=new d(g)};d.Ca=function(g){var n=g.getComponent(c.$u);n.manager.dispose();n.manager=null;g.ia(c.$u)};d.update=function(g){g.getComponent(c.$u).manager.update()};d.frame=function(g,n,q){g.getComponent(c.$u).manager.frame(n,
q)};return d});
define("nL",["require","lV","mf","fU","D"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("D");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(c,h){this.GBa.u.length&&this.GBa.u.slice().forEach(k.$a);this.animations.Ea.length&&this.animations.Ea.slice().forEach(function(f){k.update(f,c,h)});this.animations.u.length&&this.animations.u.slice().forEach(function(f){k.frame(f,c,h)});this.HBa.u.length&&this.HBa.u.slice().forEach(k.Ca)};a.H={};a.H.GBa=[m.Animation,m.$u.not];
a.H.HBa=[m.Animation.not,m.$u];a.H.animations=[m.Animation,m.$u];return a});
define("fo",["require"],function(){function a(v,w,x,y,z){for(var B,D=0,F=w,A=x-y;F<x;F+=y)D+=(v[A]-v[F])*(v[F+1]+v[A+1]),A=F;if(z===0<D)for(z=w;z<x;z+=y)B=r(z,v[z],v[z+1],B);else for(z=x-y;z>=w;z-=y)B=r(z,v[z],v[z+1],B);B&&b(B,B.next)&&(t(B),B=B.next);return B}function d(v,w){if(!v)return v;w||(w=v);do{var x=!1;if(v.aKa||!b(v,v.next)&&0!==f(v.prev,v,v.next))v=v.next;else{t(v);v=w=v.prev;if(v===v.next)break;x=!0}}while(x||v!==w);return w}function l(v,w,x,y,z,B,D){if(v){if(!D&&B){var F=v,A=F;do 0===
A.z&&(A.z=c(A.x,A.y,y,z,B)),A.qs=A.prev,A=A.Nm=A.next;while(A!==F);A.qs.Nm=null;A.qs=null;F=A;var E,J,C,L,T=1;do{A=F;var S=F=null;for(J=0;A;){J++;var U=A;for(E=C=0;E<T&&(C++,U=U.Nm,U);E++);for(L=T;0<C||0<L&&U;)0!==C&&(0===L||!U||A.z<=U.z)?(E=A,A=A.Nm,C--):(E=U,U=U.Nm,L--),S?S.Nm=E:F=E,E.qs=S,S=E;A=U}S.Nm=null;T*=2}while(1<J)}for(F=v;v.prev!==v.next;){A=v.prev;U=v.next;if(B)S=m(v,y,z,B);else a:{var X=v;S=X.prev;L=X.next;if(0<=f(S,X,L))S=!1;else{J=S.x;C=X.x;T=L.x;E=S.y;X=X.y;var K=L.y,N=J<C?J<T?J:T:
C<T?C:T,V=E<X?E<K?E:K:X<K?X:K,W=J>C?J>T?J:T:C>T?C:T,aa=E>X?E>K?E:K:X>K?X:K;for(L=L.next;L!==S;){if(L.x>=N&&L.x<=W&&L.y>=V&&L.y<=aa&&h(J,E,C,X,T,K,L.x,L.y)&&0<=f(L.prev,L,L.next)){S=!1;break a}L=L.next}S=!0}}if(S)w.push(A.Rg/x|0),w.push(v.Rg/x|0),w.push(U.Rg/x|0),t(v),F=v=U.next;else if(v=U,v===F){if(D)if(1===D){v=d(v);D=w;F=x;A=v;do U=A.prev,S=A.next.next,!b(U,S)&&e(U,A,A.next,S)&&q(U,S)&&q(S,U)&&(D.push(U.Rg/F|0),D.push(A.Rg/F|0),D.push(S.Rg/F|0),t(A),t(A.next),A=v=S),A=A.next;while(A!==v);v=d(A);
l(v,w,x,y,z,B,2)}else{if(2===D)a:{D=v;do{for(F=D.next.next;F!==D.prev;){if(A=D.Rg!==F.Rg){A=D;U=F;if(S=A.next.Rg!==U.Rg&&A.prev.Rg!==U.Rg){b:{S=A;do{if(S.Rg!==A.Rg&&S.next.Rg!==A.Rg&&S.Rg!==U.Rg&&S.next.Rg!==U.Rg&&e(S,S.next,A,U)){S=!0;break b}S=S.next}while(S!==A);S=!1}S=!S}if(S){if(S=q(A,U)&&q(U,A)){S=A;J=!1;C=(A.x+U.x)/2;T=(A.y+U.y)/2;do S.y>T!==S.next.y>T&&S.next.y!==S.y&&C<(S.next.x-S.x)*(T-S.y)/(S.next.y-S.y)+S.x&&(J=!J),S=S.next;while(S!==A);S=J}S=S&&(f(A.prev,A,U.prev)||f(A,U.prev,U))||b(A,
U)&&0<f(A.prev,A,A.next)&&0<f(U.prev,U,U.next)}A=S}if(A){v=p(D,F);D=d(D,D.next);v=d(v,v.next);l(D,w,x,y,z,B,0);l(v,w,x,y,z,B,0);break a}F=F.next}D=D.next}while(D!==v)}}else l(d(v),w,x,y,z,B,1);break}}}}function m(v,w,x,y){var z=v.prev,B=v.next;if(0<=f(z,v,B))return!1;var D=z.x,F=v.x,A=B.x,E=z.y,J=v.y,C=B.y,L=D<F?D<A?D:A:F<A?F:A,T=E<J?E<C?E:C:J<C?J:C,S=D>F?D>A?D:A:F>A?F:A,U=E>J?E>C?E:C:J>C?J:C,X=c(L,T,w,x,y);w=c(S,U,w,x,y);x=v.qs;for(v=v.Nm;x&&x.z>=X&&v&&v.z<=w;){if(x.x>=L&&x.x<=S&&x.y>=T&&x.y<=U&&
x!==z&&x!==B&&h(D,E,F,J,A,C,x.x,x.y)&&0<=f(x.prev,x,x.next))return!1;x=x.qs;if(v.x>=L&&v.x<=S&&v.y>=T&&v.y<=U&&v!==z&&v!==B&&h(D,E,F,J,A,C,v.x,v.y)&&0<=f(v.prev,v,v.next))return!1;v=v.Nm}for(;x&&x.z>=X;){if(x.x>=L&&x.x<=S&&x.y>=T&&x.y<=U&&x!==z&&x!==B&&h(D,E,F,J,A,C,x.x,x.y)&&0<=f(x.prev,x,x.next))return!1;x=x.qs}for(;v&&v.z<=w;){if(v.x>=L&&v.x<=S&&v.y>=T&&v.y<=U&&v!==z&&v!==B&&h(D,E,F,J,A,C,v.x,v.y)&&0<=f(v.prev,v,v.next))return!1;v=v.Nm}return!0}function k(v,w){return v.x-w.x}function c(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 h(v,w,x,y,z,B,D,F){return(z-D)*(w-F)>=(v-D)*(B-F)&&(v-D)*(y-F)>=(x-D)*(w-F)&&(x-D)*(B-F)>=(z-D)*(y-F)}function f(v,w,x){return(w.y-v.y)*(x.x-w.x)-(w.x-v.x)*(x.y-w.y)}function b(v,w){return v.x===w.x&&v.y===w.y}function e(v,w,x,y){var z=n(f(v,w,x)),B=n(f(v,w,y)),D=n(f(x,y,v)),F=n(f(x,y,w));
return z!==B&&D!==F||0===z&&g(v,x,w)||0===B&&g(v,y,w)||0===D&&g(x,v,y)||0===F&&g(x,w,y)?!0:!1}function g(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 n(v){return 0<v?1:0>v?-1:0}function q(v,w){return 0>f(v.prev,v,v.next)?0<=f(v,w,v.next)&&0<=f(v,v.prev,w):0>f(v,w,v.prev)||0>f(v,v.next,w)}function p(v,w){var x=new u(v.Rg,v.x,v.y),y=new u(w.Rg,w.x,w.y),z=v.next,B=w.prev;v.next=w;w.prev=v;x.next=z;z.prev=x;y.next=x;x.prev=y;B.next=
y;y.prev=B;return y}function r(v,w,x,y){v=new u(v,w,x);y?(v.next=y.next,v.prev=y,y.next.prev=v,y.next=v):(v.prev=v,v.next=v);return v}function t(v){v.next.prev=v.prev;v.prev.next=v.next;v.qs&&(v.qs.Nm=v.Nm);v.Nm&&(v.Nm.qs=v.qs)}function u(v,w,x){this.Rg=v;this.x=w;this.y=x;this.next=this.prev=null;this.z=0;this.Nm=this.qs=null;this.aKa=!1}return function(v,w,x){x=x||2;var y=w&&w.length,z=y?w[0]*x:v.length,B=a(v,0,z,x,!0),D=[];if(!B||B.next===B.prev)return D;var F;if(y){var A=B;var E=x;B=[];var J;
y=0;for(J=w.length;y<J;y++){var C=w[y]*E;var L=y<J-1?w[y+1]*E:v.length;C=a(v,C,L,E,!1);C===C.next&&(C.aKa=!0);L=B;var T=L.push,S=C,U=C;do{if(S.x<U.x||S.x===U.x&&S.y<U.y)U=S;S=S.next}while(S!==C);T.call(L,U)}B.sort(k);for(y=0;y<B.length;y++){E=void 0;w=B[y];b:{J=A;C=w.x;L=w.y;T=-Infinity;do{if(L<=J.y&&L>=J.next.y&&J.next.y!==J.y&&(S=J.x+(L-J.y)*(J.next.x-J.x)/(J.next.y-J.y),S<=C&&S>T&&(T=S,E=J.x<J.next.x?J:J.next,S===C)))break b;J=J.next}while(J!==A);if(E){U=E;var X=E.x,K=E.y,N=Infinity;J=E;do{if(C>=
J.x&&J.x>=X&&C!==J.x&&h(L<K?C:T,L,X,K,L<K?T:C,L,J.x,J.y)){S=Math.abs(L-J.y)/(C-J.x);var V;if((V=q(J,w))&&!(V=S<N)&&(V=S===N)&&!(V=J.x>E.x)&&(V=J.x===E.x)){V=E;var W=J;V=0>f(V.prev,V,W.prev)&&0>f(W.next,V,V.next)}V&&(E=J,N=S)}J=J.next}while(J!==U)}else E=null}E&&(w=p(E,w),d(w,w.next),A=d(E,E.next))}B=A}if(v.length>80*x){var aa=F=v[0];var ca=y=v[1];for(A=x;A<z;A+=x)w=v[A],E=v[A+1],w<aa&&(aa=w),E<ca&&(ca=E),w>F&&(F=w),E>y&&(y=E);F=Math.max(F-aa,y-ca);F=0!==F?32767/F:0}l(B,D,x,aa,ca,F,0);return D}});
define("ov",["require","exports","three.mod"],function(a,d,l){return function(){function m(){}m.u6a=function(k){return k.userData.js||k.material};m.mB=function(k,c){if(k.material!=c&&k.userData.js!=c){var h=k.userData.NT,f=k.userData.Kja;this.uU(k);k.material=c;f?this.xCa(k):h&&this.tia(k);k.needsUpdate=!0}};m.tia=function(k,c){void 0===c&&(c=null);k.userData.NT||(k.userData.NT=!0,k.userData.js=k.material,k.material=c||this.y4a(k.material))};m.uU=function(k){k.userData.NT&&(this.i5a(k.material),k.material=
k.userData.js,delete k.userData.js,delete k.userData.NT,delete k.userData.Kja)};m.Bcb=function(k){if(k.userData.NT){var c=k.userData.js;k=k.material;k.side=c.side;k.depthTest=c.depthTest;k.map&&c.map&&(k.map.colorSpace=c.map.colorSpace);k.emissiveMap&&c.emissiveMap&&(k.emissiveMap.colorSpace=c.emissiveMap.colorSpace)}};m.xCa=function(k){this.W6a(k)||(this.uU(k),this.tia(k,this.x4a(k.material)),k.userData.Kja=!0)};m.W6a=function(k){return!(!k.userData.Kja&&k.material&&!this.G3(k.material))};m.G3=function(k){return Array.isArray(k)?
!!k.every(function(c){return m.G3(c)}):k?!(k.isMeshPhysicalMaterial||k.isMeshStandardMaterial):!1};m.x4a=function(k){return Array.isArray(k)?k.map(function(c){return m.tCa(c)}):k?this.tCa(k):k};m.tCa=function(k){return(new l.MeshBasicMaterial).copy(k)};m.y4a=function(k){return Array.isArray(k)?k.map(function(c){return c.clone()}):k?k.clone():k};m.i5a=function(k){Array.isArray(k)?k.forEach(function(c){c.dispose()}):k&&k.dispose()};return m}()});
define("p","require lV pB fo mf fU cv ov".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("fo"),k=a("mf"),c=a("fU"),h=a("cv"),f=a("ov");a=d.extend(k,function(){k.apply(this,arguments);this.Wb=this.Wb.bind(this);this.Ib=this.Ib.bind(this);this.kb=this.kb.bind(this);this.R5=this.R5.bind(this)});a.prototype.Wc=function(){this.KBa.u.length&&this.KBa.u.slice().forEach(this.Wb);this.JBa.Ea.length&&this.Acb(this.JBa.Ea.slice());this.areas.Ea.length&&this.areas.Ea.slice().forEach(this.Ib);this.LBa.u.length&&
this.LBa.u.slice().forEach(this.kb);this.MBa.u.length&&this.MBa.u.slice().forEach(this.kb)};a.prototype.Wb=function(C){C.I(c.Xy);this.Ib(C)};a.prototype.Ib=function(C){this.Icb(C);this.hV(C)};a.prototype.Acb=function(C){var L=[];C.forEach(function(T){T.getComponent(c.uC).d2.forEach(function(S){-1===L.indexOf(S)&&L.push(S)})});L.forEach(this.R5)};a.prototype.Icb=function(C){this.Ncb(C);this.R5(C)};a.prototype.Ncb=function(C){var L=C.getComponent(c.Um),T=L&&L.u||[],S=(L=C.getComponent(c.Xy))&&L.u||
[];S.forEach(function(U){if(-1===T.indexOf(U)){var X=U.getComponent(c.uC).d2.filter(function(K){return K!==K});0==X.length?U.ia(c.uC):U.J(c.uC).d2=X}});T.forEach(function(U){-1===S.indexOf(U)&&U.J(c.uC,!0).d2.push(C)})};var b=new THREE.Matrix4,e=[];a.prototype.R5=function(C){var L=C.getComponent(c.Um);for(L=L&&L.u||[];e.length<L.length;)e.push(new THREE.Vector3);var T=L.map(function(N,V){return N.getComponent(c.Object3D).qa.getWorldPosition(e[V])});T=T.filter(function(N,V){return 1E-4<N.distanceTo(T[(V+
1)%T.length])});L=this.K6a(T);if(0===L.length)this.ira(C),this.Uza(C);else{this.j_a(C,3*L.length);this.Pcb(C,e,L);b.copy(C.getComponent(c.Object3D).qa.matrixWorld).invert();e.forEach(function(N){N.applyMatrix4(b)});C=C.getComponent(c.Geometry);for(var S=C.geometry.attributes.position.array,U=0,X=0;U<L.length;){var K=e[L[U++]];S[X++]=K.x;S[X++]=K.y;S[X++]=K.z;K=e[L[U++]];S[X++]=K.x;S[X++]=K.y;S[X++]=K.z;K=e[L[U++]];S[X++]=K.x;S[X++]=K.y;S[X++]=K.z}C.geometry.attributes.position.needsUpdate=!0}};var g=
new THREE.Plane,n=new THREE.Vector3,q=new THREE.Vector3,p=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.K6a=function(C){if(3>C.length)return[];var L=C[0];for(var T=Number.NEGATIVE_INFINITY,S=1;S<C.length;++S){var U=L.distanceToSquared(C[S]);if(!(U<=T)){T=U;var X=C[S]}}if(0>=T)return[];r.set(L,X);T=Number.NEGATIVE_INFINITY;for(S=0;S<C.length;++S)if(U=r.closestPointToPoint(C[S],!0,t).distanceToSquared(C[S]),
!(U<=T)){T=U;var K=C[S]}if(0>=T)return[];g.setFromCoplanarPoints(L,X,K);for(S=0;S<C.length;++S)if(T=C[S],T!==L&&T!==X&&T!==K){u.copy(L).sub(T).normalize();v.copy(X).sub(T).normalize();w.copy(K).sub(T).normalize();T=u.dot(v);U=u.dot(w);var N=v.dot(w);T<U&&T<N?x.copy(u).cross(v):U<N?x.copy(u).cross(w):x.copy(v).cross(w);x.normalize();T=Math.abs(Math.acos(x.dot(g.normal)));T>.5*Math.PI&&(T=Math.PI-T);if(T>y)return[]}q.copy(C[1]).sub(C[0]).normalize();p.copy(g.normal).cross(q).normalize();L=[];for(S=
0;S<C.length;++S)g.projectPoint(C[S],n),L.push(n.dot(q),n.dot(p));return m(L,null,2)};var z=new THREE.Vector3,B=new THREE.Vector3,D=new THREE.Vector3,F=new THREE.Vector3,A=new THREE.Vector3,E=new THREE.Vector3,J=new THREE.Vector3;a.prototype.Pcb=function(C,L,T){var S=0;z.set(0,0,0);for(var U=0;U<T.length;){D.copy(L[T[U++]]);F.copy(L[T[U++]]);A.copy(L[T[U++]]);B.copy(D).add(F).add(A).divideScalar(3);var X=.5*J.subVectors(A,D).cross(E.subVectors(F,D)).length();B.multiplyScalar(X);z.add(B);S+=X}z.divideScalar(S);
L=C.J(c.va,!0);L.positionX=z.x;L.positionY=z.y;L.positionZ=z.z;h.MU(C,L);this.Uza(C,S)};a.prototype.Uza=function(C,L){(C=(C=C.J(c.Um))&&C.N)&&C.trigger(l.ba,{area:L})};a.prototype.hV=function(C){var L=C.getComponent(c.Object3D);if(L=L&&L.qa){var T=C.getComponent(c.Material).material;T&&f.mB(L,T);L.renderOrder=C.getComponent(c.Um).renderOrder}};a.prototype.ira=function(C){var L=C.getComponent(c.Geometry);L&&(L.geometry&&L.geometry.dispose(),C.ia(c.Geometry),C.getComponent(c.Object3D).qa.geometry=null);
if(L=C.getComponent(c.Object3D))L.qa&&L.qa.parent&&L.qa.parent.remove(L.qa),C.ia(c.Object3D)};a.prototype.j_a=function(C,L){var T=C.getComponent(c.Geometry);T&&T.geometry&&T.geometry.attributes.position.array.length===3*L||(T=C.J(c.Geometry,!0),T.geometry&&T.geometry.dispose(),T.geometry=this.LQa(L),L=C.getComponent(c.Object3D),L||(L=C.I(c.Object3D),L.qa=new THREE.Mesh,this.hV(C)),L.qa.geometry=T.geometry)};a.prototype.LQa=function(C){var L=new THREE.BufferGeometry,T=L.setAttribute,S=THREE.Float32BufferAttribute;
C*=3;for(var U=[],X=0;X<C;X++)U.push(0);T.call(L,"position",new S(U,3));return L};a.prototype.kb=function(C){this.ira(C);C.ia(c.Xy);C.ia(c.Object3D)};a.H={};a.H.KBa=[c.Material,c.Um,c.Xy.not];a.H.JBa=[c.Object3D,c.va,c.uC];a.H.areas=[c.Um,c.Material,c.Xy];a.H.LBa=[c.Um.not,c.Xy];a.H.MBa=[c.Material.not,c.Xy];return a});
define("nG","require lV pB mf fU cv".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("mf"),k=a("fU"),c=a("cv");a=d.extend(m,function(){m.apply(this,arguments);this.Jla=this.Jla.bind(this);this.G5=this.G5.bind(this);this.Ila=this.Ila.bind(this);this.F5=this.F5.bind(this);this.AS=new Map;this.gGa=new Map;this.h2=new Map;this.hGa=new Map});a.prototype.Wc=function(){this.RBa.u.length&&this.RBa.u.slice().forEach(this.Jla);this.SBa.u.length&&this.SBa.u.slice().forEach(this.G5);this.TBa.u.length&&this.TBa.u.slice().forEach(this.G5);
this.UBa.u.length&&this.UBa.u.slice().forEach(this.Ila);this.VBa.u.length&&this.VBa.u.slice().forEach(this.F5);this.WBa.u.length&&this.WBa.u.slice().forEach(this.F5);this.frame()};a.H={};a.H.RBa=[k.Object3D,k.qo,k.dv.not];a.H.W3a=[k.Object3D,k.qo,k.dv];a.H.SBa=[k.Object3D.not,k.dv];a.H.TBa=[k.qo.not,k.dv];a.H.UBa=[k.Object3D,k.az,k.bz.not];a.H.VBa=[k.Object3D.not,k.bz];a.H.WBa=[k.az.not,k.bz];a.prototype.frame=function(){0!=this.W3a.u.length&&this.h2.forEach(function(h,f){var b=this.AS.get(f)||[];
b.forEach(function(e){var g=e.getComponent(k.Object3D).qa;e.getComponent(k.bz).position.set(0,0,0).applyMatrix4(g.matrixWorld)});h.forEach(function(e){var g=e.getComponent(k.Object3D).qa;e.getComponent(k.dv).position.set(0,0,0).applyMatrix4(g.matrixWorld)});h.forEach(function(e){var g=e.getComponent(k.qo).N;e=this.cT(b,e.getComponent(k.dv).position);g.trigger(l.ba,{beacons:e})}.bind(this))}.bind(this))};a.prototype.K5a=function(h){return function(f){var b=this.AS.get(h.P)||[];return this.cT(b,f)}.bind(this)};
a.prototype.cT=function(h,f){h=h.map(function(b){return{entity:b,distance:f.distanceTo(b.getComponent(k.bz).position)}});h.sort(function(b,e){return b.distance-e.distance});return h};a.prototype.Jla=function(h){h.I(k.dv).position=new THREE.Vector3;this.hGa.set(h,c.Xc(h));var f=this.h2.get(h.P);f||this.h2.set(h.P,f=[]);0>f.indexOf(h)&&f.push(h);h.getComponent(k.qo).cT=this.K5a(h)};a.prototype.G5=function(h){var f=this.h2.get(h.P),b=f.indexOf(h);0<=b&&f.splice(b,1);this.hGa["delete"](h);h.ia(k.dv)};
a.prototype.Ila=function(h){h.I(k.bz).position=new THREE.Vector3;this.gGa.set(h,c.Xc(h));var f=this.AS.get(h.P);f||this.AS.set(h.P,f=[]);0>f.indexOf(h)&&f.push(h)};a.prototype.F5=function(h){var f=this.AS.get(h.P),b=f.indexOf(h);0<=b&&f.splice(b,1);this.gGa["delete"](h);h.ia(k.bz)};return a});
define("iw","require lV pB mf fU lz kQ cv".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("mf"),k=a("fU"),c=a("lz"),h=a("kQ"),f=a("cv");a=d.extend(m,function(){m.apply(this,arguments);this.Lla=this.Lla.bind(this);this.Mla=this.Mla.bind(this);this.S5=this.S5.bind(this);this.T5=this.T5.bind(this);this.dma=this.dma.bind(this);this.ema=this.ema.bind(this);h.N.bind(l.ba,this.ze,this,!0)});a.prototype.Wc=function(){this.fHa.u.length&&this.fHa.u.slice().forEach(this.Lla);this.lHa.u.length&&this.lHa.u.slice().forEach(this.Mla);
this.BG.Ea.length&&this.BG.Ea.slice().forEach(this.S5);this.ns.Ea.length&&this.ns.Ea.slice().forEach(this.T5);this.gHa.u.length&&this.gHa.u.slice().forEach(this.dma);this.mHa.u.length&&this.mHa.u.slice().forEach(this.ema)};a.prototype.ze=function(){this.ns.u.forEach(function(p){p.J(k.PerspectiveCamera)})};a.prototype.Lla=function(p){var r=p.J(k.OrthographicCamera),t=p.I(k.Qs);p.I(k.Object3D).qa=t.camera=r.camera=new THREE.OrthographicCamera;this.S5(p)};a.prototype.Mla=function(p){var r=p.J(k.PerspectiveCamera),
t=p.I(k.Pj);t.boundingBox=new THREE.Box3;t.F4=!0;p.I(k.Object3D).qa=t.camera=r.camera=new THREE.PerspectiveCamera;this.T5(p)};a.prototype.S5=function(p){var r=p.getComponent(k.OrthographicCamera);p=p.getComponent(k.Qs);p.width=r.width;p.height=r.height;p=p.camera;p.left=-.5*r.width;p.right=.5*r.width;p.top=.5*r.height;p.bottom=-.5*r.height;p.updateProjectionMatrix()};a.prototype.T5=function(p){var r=p.getComponent(k.PerspectiveCamera),t=p.getComponent(k.Pj);r.nl?(p.I(k.zk),t.width=h.framebufferWidth?
.5*h.framebufferWidth:r.width,t.height=h.framebufferHeight||r.height,p=t.tk=h.nh.xr.getCamera(),p.aspect=t.width/t.height,p.fov=t.fov=p&&p.cameras.length?2*Math.atan2(1,p.cameras[0].projectionMatrix.elements[5])*g:r.fov,p.near=t.near=.1,p.far=t.far=1E3,f.Q5(p)):(p.ia(k.zk),t.fov=r.fov,t.width=r.width,t.height=r.height,t.tk=null,p=t.camera,p.aspect=t.width/t.height,p.fov=t.width>t.height?c.Gm(t.fov,t.width,t.height):t.fov,p.near=t.near=r.near,p.far=t.far=r.far,f.Q5(p),t.camera.updateProjectionMatrix())};
a.prototype.dma=function(p){var r=p.getComponent(k.Qs);r.camera.parent&&r.camera.parent.remove(r.camera);r.camera=null;p.ia(k.Qs);p.ia(k.Object3D)};a.prototype.ema=function(p){var r=p.getComponent(k.Pj),t=r.camera;h.Geb&&t.parent&&t.parent.remove(t);r.camera=null;p.ia(k.Pj);p.ia(k.Object3D)};a.H={};a.H.fHa=[k.OrthographicCamera,k.Qs.not];a.H.gHa=[k.OrthographicCamera.not,k.Qs];a.H.lHa=[k.PerspectiveCamera,k.Pj.not];a.H.mHa=[k.PerspectiveCamera.not,k.Pj];a.H.BG=[k.OrthographicCamera,k.Qs];a.H.ns=[k.PerspectiveCamera,
k.Pj];a.sH=d.extend(m,function(){m.apply(this,arguments);this.wka=this.wka.bind(this)});a.sH.prototype.Wc=function(){this.ns.u.length&&this.ns.u.slice().forEach(this.wka)};a.sH.prototype.wka=function(p){var r=p.getComponent(k.PerspectiveCamera);if(r.OBa){var t=p.getComponent(k.Pj),u=t.scene||f.qf(p),v=t.camera;if(u&&v&&f.lT(v)===u){var w=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;if(r.nl)w=.1,x=1E3;else{var y=!1;t.F4&&(t.boundingBox=this.wQa(u,t.boundingBox),t.F4=!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;2>z;z++)for(var B=0;2>B;B++)for(var D=0;2>D;D++)q.set(u[0][z],u[1][B],u[2][D]).applyMatrix4(v.matrixWorldInverse),-q.z>x&&(x=-q.z),-q.z<w&&(w=-q.z);u=Math.max(r.PBa||0,0);z=.5*(w+x);w+=(w-z)*u;x+=(x-z)*u;x=Infinity==x||isNaN(x)?2E3:x;w=0<w?w:20<x?.1:.01}if(Math.abs(r.near-w)>e||Math.abs(r.far-x)>e)v.far=t.far=r.far=x,v.near=t.near=r.near=w,f.Q5(v),f.QKa(v),f.PKa(v),v.updateProjectionMatrix();y||t.Nha||(t.Nha=setTimeout(function(){t.Nha=
null;t.F4=!0;p.P&&p.P.Ta()},b))}}};a.sH.prototype.wQa=function(p,r){r||(r=new THREE.Box3);r.makeEmpty();p.traverse(function(t){if(t.boundingBox)var u=t.boundingBox;else{if(!t.geometry||t.isSprite||t.Hu||t.material&&!t.material.visible)return;t.updateWorldMatrix(!1,!1);u=t.geometry;null===u.boundingBox&&u.computeBoundingBox();u=u.boundingBox}n.copy(u);n.applyMatrix4(t.matrixWorld);r.union(n)});return r};var b=500,e=1E-4,g=180/Math.PI,n=new THREE.Box3,q=new THREE.Vector3;a.sH.H={};a.sH.H.ns=[k.PerspectiveCamera,
k.Pj];return a});
define("hp",["require","exports","three.mod","fU","cv"],function(a,d,l,m,k){a=function(){function e(){}e.e2=function(g,n,q){g.camera=n;n=q.getComponent(m.Fc);q=(q=k.Xc(q))&&q.matrixWorld;q||(q=n.matrixWorld);q?(g.ray.origin.copy(n.origin).applyMatrix4(q),g.ray.direction.copy(n.origin).add(n.direction).applyMatrix4(q).sub(g.ray.origin).normalize()):(g.ray.origin.copy(n.origin),g.ray.direction.copy(n.direction).normalize());return g};e.intersect=function(g,n){c.length=0;n.forEach(function(q){this.GHa(q);q.isSkinnedMesh&&
!q.userData.Iha&&(q.userData.Iha=q.geometry.boundingBox,q.geometry.boundingBox=f,q.userData.ZBa=q.geometry.boundingSphere,q.geometry.boundingSphere=b,c.push(q))}.bind(this));g.firstHitOnly=!0;n=n.filter(function(q){return(q.isScene||q.parent)&&(!q.isMesh||q.geometry)});h.length=0;h=g.intersectObjects(n,!1,h);c.forEach(function(q){q.geometry.boundingBox=q.userData.Iha;delete q.userData.Iha;q.geometry.boundingSphere=q.userData.ZBa;delete q.userData.ZBa});h=h.filter(function(q){return q.object.isLine?
!1:!0});1<h.length&&h.sort(function(q,p){var r=-q.object.renderOrder,t=-p.object.renderOrder;r==t&&(r=q.object.material&&!q.object.material.depthTest?0:1,t=p.object.material&&!p.object.material.depthTest?0:1);r==t&&(r=q.distance,t=p.distance);return r-t});return h};e.GHa=function(g){if(g.isMesh&&g.geometry&&g.geometry.attributes&&g.geometry.attributes.position&&!g.geometry.userData.XBa&&!g.isSkinnedMesh){try{g.geometry.computeBoundsTree()}catch(n){}g.geometry.userData.XBa=!0}};return e}();var c=[],
h=[],f=new l.Box3;f.min.x=f.min.y=f.min.z=-Infinity;f.max.x=f.max.y=f.max.z=Infinity;var b=new l.Sphere;b.center.x=b.center.y=b.center.z=0;b.radius=Infinity;return a});
define("mH",["require","exports","cv","hp","three.mod"],function(a,d,l,m,k){a=function(){function b(e){this.OG=null;this.MCa=new k.Vector3;this.lia=void 0;this.La=e}b.prototype.refresh=function(){this.OG=null};b.prototype.gH=function(e,g){return 0<this.intersect(e,g).length};b.prototype.H7a=function(e){var g=l.Vr(this.La);if(!g)return[];c.far=g.far;c.setFromCamera(e,g);return m.intersect(c,this.n3())};b.prototype.BT=function(e){var g=l.Vr(e.La||this.La);if(!g)return[];c.far=Infinity;c.camera=g;c.ray.origin.copy(e.origin);
c.ray.direction.copy(e.direction);e.matrixWorld&&c.ray.applyMatrix4(e.matrixWorld);return m.intersect(c,this.n3())};b.prototype.intersect=function(e,g){c.far=e.distanceTo(g);c.ray.origin.copy(e);c.ray.direction.copy(g).sub(e).normalize();return m.intersect(c,this.n3())};b.prototype.RS=function(e){if(this.MCa.equals(e)&&void 0!==this.lia)return this.lia;c.far=Infinity;c.ray.origin.copy(e);var g=[],n=[];this.n3().forEach(function(p){p.isGaussianCloud||p.Hu?n.push(p):g.push(p)});var q=Infinity;[g,n].forEach(function(p){(p==
n?f:[h]).forEach(function(r){c.ray.direction.copy(r);r=m.intersect(c,p);0!=r.length&&(r=e.y-r[0].point.y,r<q&&(q=r))})});if(Infinity==q)return Infinity;this.MCa.copy(e);return this.lia=q};b.prototype.n3=function(){if(this.OG)return this.OG;var e=l.qf(this.La);if(!e)return this.OG=[];var g=[];(b.TT.get(this.La.P)||[]).forEach(function(q){(q=l.Xc(q))&&g.push(q)});this.OG=[];for(e=[e];0<e.length;){var n=e.pop();n.userData.f4||n.isSprite||n.isLine||n.isSkinnedMesh||n.material&&!n.material.visible||-1!==
g.indexOf(n)||(n.children&&e.push.apply(e,n.children),this.OG.push(n))}return this.OG};b.Aab=function(e){this.TT.clear();e.forEach(function(g){this.TT.has(g.P)||this.TT.set(g.P,[]);this.TT.get(g.P).push(g)}.bind(this))};b.TT=new Map;return b}();var c=new k.Raycaster,h=new k.Vector3(0,-1,0),f=[(new k.Vector3(0,-1,.1)).normalize(),(new k.Vector3(0,-1,.1)).normalize().applyMatrix4((new k.Matrix4).makeRotationY(2*Math.PI/3)),(new k.Vector3(0,-1,.1)).normalize().applyMatrix4((new k.Matrix4).makeRotationY(2*
-Math.PI/3))];return a});
define("dY","require exports pB lx fq fU pd bM".split(" "),function(a,d,l,m,k,c,h,f){return function(){function b(e,g,n){this.F=e;this.properties=g;this.ph=n;this.Oka=0;this.CG=this.qy=void 0;this.E4=!1;this.f5(0);this.Aia=this.J2=this.zia=this.H2=this.state=void 0;this.Qc(m.U);this.ph.bind(l.G("state"),this.zG,this,!0);this.ph.bind(l.G("movementIndex"),this.GGa,this,!0)}b.prototype.KM=function(){this.ph.get("mandatory")||(this.m2(),this.ph.get("restartMovementOnUserInteraction")?this.state==m.PLAYING&&
(this.cKa(),this.Qc(m.Qb,!0)):this.state==m.PLAYING&&this.Qc(m.U))};b.prototype.$cb=function(){this.state==m.Qb&&this.E4&&this.ph.get("restartMovementOnUserInteraction")&&this.Obb()};b.prototype.frame=function(e){this.state==m.PLAYING&&null!==this.Te&&(this.Te.Aja()||0!=this.qy||this.ph.trigger(l.Tp),this.Te.Fb(e),this.Gcb(),this.properties.set("x",this.Te.eb("x")),this.properties.set("y",this.Te.eb("y")),this.properties.set("z",this.Te.eb("z")),this.properties.set("yaw",this.XB(this.Te.eb("yaw"),
-180,180)),this.properties.set("pitch",this.Te.eb("pitch")),this.properties.set("distance",this.Te.eb("distance")),this.properties.set("fov",this.Te.eb("fov")),this.properties.set("easing",0),e=this.ph.get("movements")[this.qy],e.set("position",this.Te.ll()),e.trigger(l.Vh),this.Te.Xe()&&(e.trigger(l.Gb),this.f5((this.qy+1)%this.ph.get("movements").length,!0),0==this.qy&&(this.Oka++,this.ph.trigger(l.lq),this.Oka==this.ph.get("repeat")&&(this.$Ha(),this.Qc(m.U),this.ph.trigger(l.Gb)))))};b.prototype.Gcb=
function(){var e=void 0!==this.H2&&void 0!==this.zia,g=void 0!==this.J2&&void 0!==this.Aia;if(e||g){var n=this.F.getComponent(c.lb).F;if(n){var q=this.Te.getTime(),p=this.Te.ui();n=n.J(c.Scene,!0);e=e&&q<this.H2?1-q/this.H2:0;g=g&&p-q<this.J2?1-(p-q)/this.J2:0;0<g||0<e?g>e?(n.mL=this.Aia,n.US=g):(n.mL=this.zia,n.US=e):(n.mL="#000000",n.US=0)}}};b.prototype.$Ha=function(){var e=this.F.getComponent(c.lb);if(e=e&&e.F)e.J(c.Scene).US=0};b.prototype.dispose=function(){this.m2();this.ph.unbind(l.G("state"),
this.zG,this);this.ph.unbind(l.G("movementIndex"),this.GGa,this);this.Qc(m.U)};b.prototype.zG=function(){var e=this.ph.get("state");this.state!=e&&(e==m.Qb&&this.state==m.U?this.ph.set("state",m.U):this.Qc(e))};b.prototype.Qc=function(e,g){void 0===g&&(g=void 0);this.state!=e&&(this.state=e,this.state==m.PLAYING?(this.m2(),this.E4=!1,this.zCa(),this.p4a()):this.state==m.Qb?(this.E4=!!g,this.cKa()):this.state==m.U&&(this.E4=!1,this.m2(),this.Oka=0,e=this.Te.getTime(),g=this.Te.ui(),0<e&&e<g&&this.$Ha(),
this.f5(0)));this.ph.set("state",this.state)};b.prototype.GGa=function(){this.f5(this.ph.get("movementIndex"))};b.prototype.f5=function(e,g){void 0===g&&(g=void 0);if(this.qy!==e||g)this.qy=e,this.zCa(),this.ph.set("movementIndex",this.qy),this.ph.get("movements")[this.qy].set("position",0)};b.prototype.Obb=function(){this.T4=setTimeout(function(){this.T4=null;this.Qc(m.PLAYING)}.bind(this),this.ph.get("restartMovementDelay"))};b.prototype.m2=function(){this.T4&&(clearTimeout(this.T4),this.T4=null)};
b.prototype.zCa=function(){var e=this.ph.get("movements")[this.qy],g=this.properties.get("x",this.properties.get("initialX",0)),n=this.properties.get("y",this.properties.get("initialY",0)),q=this.properties.get("z",this.properties.get("initialZ",0)),p=this.XB(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(k.Ja("TargetModel3DCameraMovement",e)){var v=e.get("targetX",g);var w=e.get("targetY",n);var x=e.get("targetZ",q);var y=e.get("targetYaw",p);var z=e.get("targetPitch",r);var B=e.get("targetFov",u);var D=e.get("targetDistance",t);switch(this.s5a(e)){case "left":y=this.XB(y,p-360,p);break;case "right":y=this.XB(y,p,p+360);break;case "longest":y=this.XB(y,p-180,p+180);y=y==p?p+360:y>=p?this.XB(y,p-360,p):this.XB(y,p,p+360);break;default:y=this.XB(y,p-180,p+180)}}else k.Ja("DistanceModel3DCameraMovement",
e)&&(v=g+e.get("xDelta",0),w=n+e.get("yDelta",0),x=q+e.get("zDelta",0),y=p+e.get("yawDelta",0),z=r+e.get("pitchDelta",0),B=u+e.get("fovDelta",0),D=t+e.get("distanceDelta",0));this.Te=new h(e.get("easing"),[new f("x",g,v,e.get("xSpeed")),new f("y",n,w,e.get("ySpeed")),new f("z",q,x,e.get("zSpeed")),new f("yaw",p,y,e.get("yawSpeed")),new f("pitch",r,z,e.get("pitchSpeed")),new f("fov",u,B,e.get("fovSpeed")),new f("distance",t,D,e.get("distanceSpeed"))],e.get("duration"));this.H2=e.get("fadeFromDuration");
this.zia=e.get("fadeFromColor");this.J2=e.get("fadeToDuration");this.Aia=e.get("fadeToColor")};b.prototype.p4a=function(){this.CG=void 0};b.prototype.cKa=function(){if(this.Te){this.CG=void 0;var e=this.Te&&this.Te.Kia("yaw");e&&(e.to>e.from?this.CG="right":e.to<e.from&&(this.CG="left"))}};b.prototype.s5a=function(e){e=e.get("yawPath");"longest"==e&&this.CG&&(e=this.CG);this.CG=void 0;return e};b.prototype.XB=function(e,g,n){for(;e<g;)e+=n-g;for(;e>n;)e-=n-g;return e};return b}()});
define("kP","require exports lh pB lx dY cv".split(" "),function(a,d,l,m,k,c,h){return function(){function f(b,e){this.F=b;this.properties=e;this.z4=this.z4.bind(this);this.w4=this.w4.bind(this);this.zG=this.zG.bind(this);this.ml=this.Fu=null;this.pM=[];this.Cg=null;this.nC=!1;this.Vx=new Map;l.da(this.properties,["userInteracting"],this.z4,!0);l.da(this.properties,["initialSequence","idleSequence","sequences.movements"],this.w4,!0);l.da(this.properties,["state"],this.zG,!0);this.ready=!1}f.prototype.frame=
function(b){if(!this.ready){var e=h.qf(this.F),g=0;e&&e.traverse(function(n){(n.isMesh||n.isSprite)&&g++});if(0<g)this.ready=!0,this.W8a();else return!1}this.Cg&&this.Vx.get(this.Cg).frame(b);(b=this.Cg&&this.Cg.get("state")==k.PLAYING)&&this.F.P.Ta();this.properties.set("controllingPosition",b)};f.prototype.dispose=function(){this.Cg&&this.Cg.get("mandatory")&&this.properties.set("inMandatorySequence",!1);this.Cg&&this.properties.set("controllingPosition",!1);l.ca(this.properties,["userInteracting"],
this.z4);l.ca(this.properties,["initialSequence","idleSequence","sequences.movements"],this.w4);l.ca(this.properties,["state"],this.zG);this.v5();this.ml&&this.hL(this.ml);this.Fu&&this.hL(this.Fu);this.pM.forEach(this.hL.bind(this));this.pM=[]};f.prototype.ZU=function(){this.nC||this.mG||!this.ml||this.Cg||!this.properties.get("timeToIdle")||(this.mG=setTimeout(function(){this.mG=null;this.K8a()}.bind(this),this.properties.get("timeToIdle")))};f.prototype.v5=function(){this.mG&&(clearTimeout(this.mG),
this.mG=null)};f.prototype.K8a=function(){this.ml&&this.ml.set("state",k.PLAYING)};f.prototype.W8a=function(){this.Fu?this.Fu.set("state",k.PLAYING):this.ZU()};f.prototype.zG=function(){this.Cg?this.Cg.set("state",this.properties.get("state")):this.properties.get("state")==k.PLAYING?(this.ZU(),this.mG||this.properties.set("state",k.U)):this.v5()};f.prototype.z4=function(){var b=this.properties.get("userInteracting");this.nC!=b&&(this.nC&&(this.Cg&&this.Vx.get(this.Cg).$cb(),!this.ml||this.Cg&&this.Cg!=
this.ml||this.ZU()),this.nC=b)&&(this.v5(),this.Cg&&this.Vx.get(this.Cg).KM())};f.prototype.w4=function(){var b=this.Xka(this.properties.get("initialSequence"));this.Fu!=b&&(this.Fu&&this.hL(this.Fu),(this.Fu=b)&&this.bia(this.Fu));b=this.Xka(this.properties.get("idleSequence"));this.ml!=b&&(this.ml&&this.hL(this.ml),(this.ml=b)&&this.bia(this.ml));var e=(this.properties.get("sequences")||[]).filter(this.Xka.bind(this));this.pM.forEach(function(n){0>e.indexOf(n)&&this.hL(n)}.bind(this));var g=this.pM;
this.pM=e;this.pM.forEach(function(n){0>g.indexOf(n)&&this.bia(n)}.bind(this));this.Cg||!this.ml||this.mG||this.ZU()};f.prototype.Xka=function(b){var e=b&&b.get("movements");return e&&0!=e.length?b:null};f.prototype.TGa=function(b){b=b.source;var e=b.get("state");e==k.PLAYING?(this.v5(),e=this.Cg,this.Cg=b,e&&e!=this.Cg&&e.set("state",k.U),this.properties.set("state",k.PLAYING),this.properties.set("inMandatorySequence",b.get("mandatory")),this.F.P.Ta()):e==k.Qb?b==this.Cg&&this.properties.set("state",
k.Qb):e==k.U&&b==this.Cg&&(this.properties.set("state",k.U),this.properties.set("inMandatorySequence",!1),this.Cg=null,b!=this.ml&&this.ZU())};f.prototype.bia=function(b){if(this.Vx.has(b))this.Vx.get(b);else{b.set("state",k.U);b.bind(m.G("state"),this.TGa,this,!0);var e=new c(this.F,this.properties,b);this.Vx.set(b,e)}};f.prototype.hL=function(b){this.Vx.has(b)&&(b.set("state",k.U),b.unbind(m.G("state"),this.TGa,this),this.Vx.get(b).dispose(),this.Vx["delete"](b))};return f}()});
define("fh",["require","exports","kP","fU"],function(a,d,l,m){return function(){function k(c){this.AU=this.properties=null;this.F=c;this.update()}k.prototype.update=function(){var c=this.F.getComponent(m.xH);this.uM(c&&c.properties)};k.prototype.uM=function(c){var h;this.properties&&(null===(h=this.AU)||void 0===h?void 0:h.dispose(),this.AU=null);if(this.properties=c)this.AU=new l(this.F,this.properties)};k.prototype.frame=function(c){this.AU&&this.AU.frame(c)};k.prototype.dispose=function(){this.uM(null)};
k.$a=function(c){c.I(m.ev).manager=new k(c)};k.update=function(c){c.getComponent(m.ev).manager.update()};k.frame=function(c,h,f){c.getComponent(m.ev).manager.frame(h,f)};k.Ca=function(c){c.getComponent(m.ev).manager.dispose();c.ia(m.ev)};return k}()});define("pm",["require","exports"],function(){return function(){function a(){}a.rja=function(d){return 0<=this.a6.indexOf(d)};a.mla=function(d){this.a6=[];d.forEach(function(l){l=l.P;0>this.a6.indexOf(l)&&this.a6.push(l)}.bind(this))};a.a6=[];return a}()});
define("lL",["require"],function(){return{ceb:function(){},deb:function(){},CY:function(){return this.o&&this.o.get("inMandatorySequence")||this.o&&!this.o.get("keyboardEnabled")?!0:!1},Xl:function(){return this.o&&this.o.get("inMandatorySequence")||this.o&&(!this.o.get("mouseEnabled")||this.o.get("mouseDisabled"))?!0:!1},xta:function(){return this.o&&this.o.get("doubleClickDisabled")?!0:!1},vva:function(){this.gJ()||this.pw||this.dBa()},uva:function(){this.gJ()||this.pw||this.cBa()},EJ:function(){this.zta()||
this.dBa()},DJ:function(){this.zta()||this.cBa()},dBa:function(){this.o&&this.o.set("userInteracting",!0)},cBa:function(){this.o&&this.o.set("userInteracting",!1)}}});
define("fI",["require","exports","cv","three.mod"],function(a,d,l,m){return function(){function k(c){this.matrixWorld=new m.Matrix4;this.KB=!1;this.timeout=null;this.F=c}k.prototype.uM=function(c,h){if(this.fH!=c||this.propertyName!=h)this.fH&&this.fH.set(this.propertyName,!1),this.fH=c,this.propertyName=h,this.fH&&this.fH.set(this.propertyName,this.KB)};k.prototype.tma=function(){var c=l.Xc(this.F),h=!!c&&!c.matrixWorld.equals(this.matrixWorld);h&&this.matrixWorld.copy(c.matrixWorld);this.jo(h);
this.timeout&&(clearTimeout(this.timeout),this.timeout=null);h&&(this.timeout=setTimeout(function(){this.timeout=null;this.jo(!1)}.bind(this),k.GMa))};k.prototype.Ca=function(){this.jo(!1);this.timeout&&clearTimeout(this.timeout)};k.prototype.jo=function(c){this.KB!=c&&(this.KB=c,this.fH&&this.fH.set(this.propertyName,c))};k.GMa=100;return k}()});
define("oO",["require","exports"],function(){return function(){function a(d){this.properties=d}a.prototype.OIa=function(d){this.properties.set("fov",this.TL(d,this.properties.get("minFov",.1),this.properties.get("maxFov",180)))};a.prototype.Sm=function(d){this.properties.set("yaw",this.Y4(this.l8a(d,this.properties.get("minYaw"),this.properties.get("maxYaw"),this.properties.get("yaw"))))};a.prototype.Ky=function(d){this.properties.set("pitch",this.TL(d,this.properties.get("minPitch",-90),this.properties.get("maxPitch",
90)))};a.prototype.setX=function(d){this.properties.set("x",this.TL(d,this.properties.get("minX"),this.properties.get("maxX")))};a.prototype.setY=function(d){this.properties.set("y",this.TL(d,this.properties.get("minY"),this.properties.get("maxY")))};a.prototype.setZ=function(d){this.properties.set("z",this.TL(d,this.properties.get("minZ"),this.properties.get("maxZ")))};a.prototype.SG=function(d){this.properties.set("distance",this.TL(d,this.properties.get("minDistance"),this.properties.get("maxDistance")))};
a.prototype.bj=function(d){this.properties.set("easing",d)};a.prototype.l8a=function(d,l,m,k){if(void 0!==l||void 0!==m){var c=this.Y4(d-k);if(void 0!==l&&0>c){if(this.Y4(k)+c<l)return l}else if(void 0!==m&&0<c&&this.Y4(k)+c>m)return m}return d};a.prototype.TL=function(d,l,m){if(isNaN(d))throw"invalid value";void 0!==l&&d<l&&(d=l);void 0!==m&&d>m&&(d=m);return d};a.prototype.Y4=function(d){for(;-180>d;)d+=360;for(;180<d;)d-=360;return d};return a}()});
define("pP",["require","jv"],function(a){var d=a("jv");return{Xba:function(l){this.KY=this.KY.bind(this);this.LY=this.LY.bind(this);this.TN=this.xj=!1;this.bg={};for(var m=0;m<l.length;m++)this.bg[l[m]]=!1;this.cP=0;this.MY=!1;this.dP(!0)},Yba:function(){this.dP(!1)},dP:function(l){this.MY!=l&&(this.MY&&(document.removeEventListener("keyup",this.LY),document.removeEventListener("keydown",this.KY)),this.MY=l)&&(document.addEventListener("keyup",this.LY),document.addEventListener("keydown",this.KY))},
zta:function(){return 0<this.cP},LY:function(l){if(!(d.ao()||this.CY&&this.CY())){var m=!1;this.xj!=l.shiftKey&&(this.xj=l.shiftKey,m=!0);this.TN!=l.ctrlKey&&(this.TN=l.ctrlKey,m=!0);!0===this.bg[l.code]&&(this.bg[l.code]=!1,m=!0,this.Ro&&this.Ro(l.code),this.cP--,0==this.cP&&this.uva&&this.uva());m&&this.RP&&this.RP()}},KY:function(l){if(!(d.ao()||this.CY&&this.CY())){var m=!1;this.xj!=l.shiftKey&&(this.xj=l.shiftKey,m=!0);this.TN!=l.ctrlKey&&(this.TN=l.ctrlKey,m=!0);!1===this.bg[l.code]&&(m=this.bg[l.code]=
!0,this.HE&&this.HE(l.code),this.cP++,1==this.cP&&this.vva&&this.vva());m&&this.RP&&this.RP()}},leb:function(){return this.xj},geb:function(){return this.TN}}});
define("ko",["require","exports","bi"],function(a,d,l){a=function(){function k(){this.ef=[]}k.prototype.vs=function(c){this.IIa(c);this.ib=c;this.a$=null};k.prototype.JIa=function(c){this.IIa(c?c.jEa():null);this.ib=null;this.a$=c};k.prototype.abb=function(c,h){this.ib&&this.ib.set("cursor",c);this.a$&&this.a$.Z4(c,h)};k.prototype.IIa=function(c){this.ue&&(this.ue.R9a(this),this.ue=void 0);c&&(this.ue=m.get(c),this.ue.B3a(this))};k.prototype.dispose=function(){this.vs(null);this.ef=[]};k.prototype.push=
function(c){this.ef.push(c);this.ue&&this.ue.update()};k.prototype.pop=function(c){for(var h=this.ef.length-1;0<=h;h--)if(this.ef[h]==c){this.ef.splice(h,1);this.ue&&this.ue.update();break}};k.prototype.has=function(c){return 0<=this.ef.indexOf(c)};k.prototype.top=function(){if(this.ef.length)return this.ef[this.ef.length-1]};k.prototype.all=function(){return this.ef};return k}();var m=function(){function k(c){this.ad=c;this.md=[]}k.prototype.B3a=function(c){this.md.push(c);this.update()};k.prototype.R9a=
function(c){this.md.splice(this.md.indexOf(c),1);this.update();0==this.md.length&&k.clear(this.ad)};k.prototype.update=function(){var c=this.wOa();var h=this.Oaa(l.$C)?l.$C:this.Oaa(l.Wh)?l.Wh:this.Oaa(l.Le)?l.Le:this.zr()||l.Ke;this.md.forEach(function(f){f.abb(h,c)})};k.prototype.Oaa=function(c){for(var h=this.md.length-1;0<=h;h--)if(this.md[h].has(c))return!0;return!1};k.prototype.wOa=function(){var c=[];this.md.forEach(function(h){h.all().forEach(function(f){0>c.indexOf(f)&&c.push(f)})});return c};
k.prototype.zr=function(){for(var c,h=this.md.length-1;0<=h&&void 0===c;h--)c=this.md[h].top();return c};k.get=function(c){var h=this.Ua.get(c);h||this.Ua.set(c,h=new k(c));return h};k.clear=function(c){this.Ua["delete"](c)};k.Ua=new Map;return k}();return a});
define("jW",["require","exports","pB","gF"],function(a,d,l,m){return function(k){function c(h){var f=k.call(this)||this;if(h instanceof HTMLElement)f.b4=h;else if("function"===typeof h.hd)f.b4=h.hd().get(0);else if(h.length&&h.get)f.b4=h.get(0);else throw Error("invalid element");f.t4=f.t4.bind(f);document.addEventListener("pointerlockchange",f.t4.bind(f),!1);return f}Z(c,k);c.prototype.dispose=function(){document.removeEventListener("pointerlockchange",this.t4)};c.prototype.lock=function(){if(!this.Cp())return this.b4.requestPointerLock()};
c.prototype.unlock=function(){this.Cp()&&document.exitPointerLock()};c.prototype.Cp=function(){return document.pointerLockElement===this.b4};c.prototype.t4=function(){this.trigger(l.ba)};c.Cp=function(){return null!==document.pointerLockElement};return c}(m)});
define("iz",["require","pB","ko","jW"],function(a){function d(h,f){var b=f.x-h.x;h=f.y-h.y;return Math.sqrt(b*b+h*h)}var l=a("pB"),m=a("ko"),k=a("jW"),c=180/Math.PI;return{Cca:function(){this.mZ=this.vP=this.pw=this.wt=!1;this.L_=this.Be=null;this.wY=new m;this.yP=null;this.eXa=this.oWa.bind(this)},Dca:function(){this.t0(null);this.wY.dispose()},pua:function(h){this.mp(h);if(!this.Xl||!this.Xl()){var f=this.fJ();this.wt||(this.wt=!0,f||this.EJ&&this.EJ());this.vP=!h.originalEvent||!h.originalEvent.buttons||
0===(h.originalEvent.buttons&2);this.L_=h;this.So&&this.So(h.x,h.y);this.LZ&&this.LZ(h.x,h.y)}},fJ:function(){return this.wt||this.pw||this.mZ},gJ:function(){return this.wt},heb:function(){return this.pw},ieb:function(){return this.vP},jeb:function(){return this.mZ},rua:function(h){this.mp(h);if(this.Xl&&this.Xl())this.wP(h);else if(this.Pf&&this.Pf(h.x,h.y),this.wt||this.pJ.Cp()){var f=void 0!==h.movementX?h.movementX:h.x-this.L_.x,b=void 0!==h.movementY?h.movementY:h.y-this.L_.y;this.pJ.Cp()&&(f*=
-1,b*=-1);this.L_=h;this.KZ&&this.KZ(f,b,h.x,h.y)}},wP:function(h){this.wt&&(h&&this.mp(h),this.vP=this.wt=!1,this.Tw&&this.Tw(this.nd,this.od),this.IE&&this.IE(),this.fJ()||this.DJ&&this.DJ())},lua:function(h){this.Xl&&this.Xl()||(this.mp(h),this.Sw&&this.Sw(h.x,h.y))},mua:function(h){this.Xl&&this.Xl()||this.xta&&this.xta()||(this.mp(h),this.CJ&&this.CJ(h.x,h.y))},sua:function(h){this.mp(h);if(!this.Xl||!this.Xl()){h=h.NS/10;var f=this.fJ();this.yP||(this.mZ=!0,this.fXa&&this.fXa(),f||this.EJ&&
this.EJ());this.MZ&&this.MZ(h);this.yP&&clearTimeout(this.yP);this.yP=setTimeout(this.eXa,100)}},oWa:function(){this.yP=null;this.dXa&&this.dXa();this.mZ=!1;this.fJ()||this.DJ&&this.DJ()},oua:function(h){if(!(this.Xl&&this.Xl()||2>h.touches.length)){var f=this.fJ();this.pw||(this.pw=!0,this.pWa(h.touches),f||this.EJ&&this.EJ());this.nva&&this.nva();this.wP()}},nua:function(h){this.Xl&&this.Xl()||2>h.touches.length||!this.pw||(this.tua(h.touches),this.Yca&&this.Yca(this.c1a,this.d1a,this.Xfa,this.e1a),
this.mva&&this.mva(this.vba,this.wba,this.LR,this.MR,1,this.Xfa,this.QO,this.Wfa,this.uba,this.KR))},Bca:function(){this.pw&&(this.pw=!1,this.Zca&&this.Zca());this.fJ()||this.DJ&&this.DJ()},pWa:function(h){this.uba=this.wba=this.vba=this.QO=this.Xfa=this.MR=this.LR=this.Wfa=this.KR=void 0;this.JR=h;this.tua(h)},tua:function(h){d(h[0],this.JR[0])+d(h[1],this.JR[1])>d(h[0],this.JR[1])+d(h[1],this.JR[0])&&(h=[h[1],h[0]]);var f=h[0];var b=h[1];f=Math.atan2(-(b.y-f.y),b.x-f.x)*c;b=d(h[0],h[1]);var e=(h[0].x+
h[1].x)/2,g=(h[0].y+h[1].y)/2;this.Xfa=void 0!==this.QO?b/this.QO:1;this.e1a=void 0!==this.KR?f-this.KR:0;this.KR=f;this.Wfa=b;this.c1a=void 0!==this.LR?e-this.LR:0;this.d1a=void 0!==this.MR?g-this.MR:0;this.LR=e;this.MR=g;void 0!==this.vba||(this.vba=this.LR);void 0!==this.wba||(this.wba=this.MR);void 0!==this.uba||(this.uba=this.KR);void 0!==this.QO||(this.QO=this.Wfa);this.JR=h},qua:function(){},jSa:function(){this.wP();this.Bca()},AO:function(){return this.Be?this.Be.Wa():100},$D:function(){return this.Be?
this.Be.Ab():100},sw:function(){return this.Be?Math.max(this.Be.Wa(),this.Be.Ab()):100},t0:function(h){this.Be!=h&&(this.Be&&(this.Be.unbind(l.hb,this.pua,this,!0),this.Be.unbind(l.Pb,this.rua,this,!0),this.Be.unbind(l.Eb,this.wP,this,!0),this.Be.unbind(l.ma,this.lua,this,!0),this.Be.unbind(l.El,this.mua,this,!0),this.Be.unbind(l.Os,this.sua,this,!0),this.Be.unbind(l.k7,this.nua,this,!0),this.Be.unbind(l.gz,this.oua,this,!0),this.Be.unbind(l.CH,this.Bca,this,!0),this.pJ.unbind(l.ba,this.qua,this,
!0),this.pJ.dispose(),this.pJ=null),this.Be=h,this.wY.vs(this.Be),this.Be&&(this.Be.bind(l.hb,this.pua,this,!0),this.Be.bind(l.Pb,this.rua,this,!0),this.Be.bind(l.Eb,this.wP,this,!0),this.Be.bind(l.ma,this.lua,this,!0),this.Be.bind(l.El,this.mua,this,!0),this.Be.bind(l.Os,this.sua,this,!0),this.Be.bind(l.k7,this.nua,this,!0),this.Be.bind(l.gz,this.oua,this,!0),this.Be.bind(l.CH,this.Bca,this,!0),this.pJ=new k(this.Be),this.pJ.bind(l.ba,this.qua,this,!0)))},xP:function(h){h.x=-1+2*h.x/this.AO();h.y=
1-2*h.y/this.$D();return h},mp:function(h){this.nd=h.x;this.od=h.y;this.qJ=h.pageX;this.rJ=h.pageY},YE:function(h){this.wY.push(h)},I_:function(h){this.wY.pop(h)}}});
define("kX",["require","pB"],function(a){var d=a("pB");return{mZa:function(){this.m0=!1;this.gp=null;this.sE=this.hJ=0;this.fF=!1;this.kya(!0)},nZa:function(){this.kya(!1);this.Tya(null)},kya:function(l){this.m0!=l&&((this.m0=l)||this.l0())},Tya:function(l){this.gp!=l&&(this.l0(),this.gp&&(this.gp.unbind(d.uo,this.lya,this,!0),this.gp.unbind(d.Yf,this.l0,this,!0),this.gp.unbind(d.ba,this.jya,this,!0),this.sE=this.hJ=0),this.gp=l)&&(this.gp.bind(d.uo,this.lya,this,!0),this.gp.bind(d.Yf,this.l0,this,
!0),this.gp.bind(d.ba,this.jya,this,!0))},lya:function(){!this.fF&&this.m0&&(this.fF=!0,this.Awa&&this.Awa())},jya:function(){this.fF&&(this.hJ=this.gp.getX(),this.sE=this.gp.getY(),this.ywa&&this.ywa())},l0:function(){this.fF&&(this.fF=!1,this.sE=this.hJ=0,this.zwa&&this.zwa())},keb:function(){return this.fF}}});
define("dX","require lV pB bt fU lL mH pm fI oO pP iz kX bi pd bM".split(" "),function(a){function d(N){this.gO=!1;this.v$=0;this.ora=!1;this.pra=N}function l(N){this.m=N;this.Vq=new g(N);this.Xba(y);this.Cca();this.mZa();this.oF=.025;this.dm=.25;this.iZ=this.jZ=this.kZ=this.WX=0;this.Fa=null;this.QW=this.g1=!1;this.wa=void 0;this.Ota=new THREE.Vector3(void 0,void 0,void 0);this.ot=[];this.iWa=5;this.eWa=10;this.Xv=new b(this.m);this.YE(t.hz);this.iJ={};[c.na.gj,c.na.Sh,c.na.ab,c.na.ub].forEach(function(V){this.iJ[V]=
new d(300)}.bind(this));[c.na.mo,c.na.Xm,c.na.so,c.na.Zm,c.na.Q,c.na.E].forEach(function(V){this.iJ[V]=new d(300)}.bind(this));this.update()}var m=a("lV"),k=a("pB"),c=a("bt"),h=a("fU"),f=a("lL"),b=a("mH"),e=a("pm"),g=a("fI"),n=a("oO"),q=a("pP"),p=a("iz"),r=a("kX"),t=a("bi"),u=a("pd"),v=a("bM");m.c2(l,[f,q,p,r]);l.prototype.update=function(){var N=this.m.getComponent(h.NC);this.Ti(N&&N.properties);this.Vq.uM(N&&N.properties,"moving");var V=(!N.fL||!e.rja(this.m.P))&&N.enabled;this.t0(N&&(V?N.Bg:null));
this.dP(!!N&&V&&N.DB);this.Tya(!!N&&V&&N.nIa);V||this.IE();V&&N.DB||(this.Cn=this.Bn=this.Hk=this.Yj=this.Ik=0)};l.prototype.frame=function(N){this.wVa()?this.KUa(N):this.LUa(N);this.xSa()};l.prototype.wVa=function(){return this.properties&&this.properties.get("playingSequence")||this.di};l.prototype.KUa=function(N){this.properties&&this.properties.get("playingSequence")||this.AOa(N)};l.prototype.AOa=function(N){this.di&&(this.di.Fb(N),this.Fa.setX(this.di.eb("x")),this.Fa.setY(this.di.eb("y")),this.Fa.setZ(this.di.eb("z")),
this.Fa.bj(0),this.di.Xe()&&(this.di=null),this.m.P.Ta())};var w=1E3/3600*8/1.7;l.prototype.LUa=function(N){J.set(this.o.get("x"),this.o.get("y"),this.o.get("z"));this.NTa(N,T,U);this.YTa(J,T,C);this.Fa.setX(C.x);this.Fa.setY(C.y);this.Fa.setZ(C.z);this.Fa.Sm(this.o.get("yaw")+U.x);this.Fa.Ky(this.o.get("pitch")+U.y);this.Fa.bj(this.dm);0==T.x&&0==T.y&&0==T.z&&0==U.x&&0==U.y||this.m.P.Ta()};l.prototype.xSa=function(){this.Q2a();this.O1a();this.Vq.tma();this.fF&&this.m.P.Ta();this.Xv.refresh()};l.prototype.NTa=
function(N,V,W){N/=1E3;var aa=this.xj?.2:1,ca=1.7*w;ca*=this.o.get("translationSpeed")*aa;var ea=this.o.get("rotationSpeed")*aa;aa=this.iZ;var I=this.jZ,P=this.kZ,R=this.WX;this.iZ=this.jZ=this.kZ=this.WX=0;var M=(aa*aa+I*I)/x;M=1<M?1/Math.sqrt(M):1;aa*=M;I*=M;var Q=F*Math.atan2(this.hJ,Math.abs(this.sE));M=Math.sqrt(this.hJ*this.hJ+this.sE*this.sE);var Y=Math.max(this.$D(),this.AO()),ba=this.o.get("fov")/Y*2;aa=-aa*ba*ea;I=I*ba*ea;P=25*-P*ca;ba=this.zO(c.na.mo,c.na.so)*ca;var da=this.zO(c.na.Zm,
c.na.Xm)*ca,fa=this.zO(c.na.Q,c.na.E)*ca,ha=this.zO(c.na.Sh,c.na.gj)*ea*30,ia=this.zO(c.na.ab,c.na.ub)*ea*30;R=3.4*R/Y;ea*=Q*M*.125;ca*=.5*-M*this.sE;(M=this.m.getComponent(h.va))&&(aa||I||P||ba||fa||da||ha||ia||ea||ca||R)?(A.makeRotationFromEuler(E.set(0,M.ud*D,0,M.Ge)),V.set(ba*N,fa*N+R,(da+ca+P)*N).applyMatrix4(A),W.set(aa+(ia+ea)*N,I+ha*N)):(V.set(0,0,0),W.set(0,0))};l.prototype.zO=function(N,V){N=this.iJ[N].getState();if(N===d.v6)return-3;if(N===d.Sh)return-1.5;V=this.iJ[V].getState();return V===
d.v6?3:V===d.Sh?1.5:0};l.prototype.YTa=function(N,V,W){W.copy(N).add(V);if(!W.equals(N)){var aa=!this.Ota.equals(N);this.zAa(W,aa);void 0!==this.wa&&0!==V.y&&(this.wa=Math.max(.595,this.wa+V.y));var ca=this.Xv.RS(W);(aa||Infinity==ca)&&this.gQa();var ea=Infinity!==ca?W.y-ca:void 0;if(this.o.get("keepHeight")&&Infinity!==ca){ca=this.yO();if(ea>(aa?ea:this.PTa(N))+this.o.get("maxStepHeight",.25*ca)){W.copy(N);return}W.y=(aa?ea:this.WTa(ea))+ca}if(this.o.get("collisionDetection")&&(S.copy(V).normalize().multiplyScalar(.1).add(W),
this.Xv.gH(N,S))){W.copy(N);return}void 0!==ea&&this.bOa(ea);this.Ota.copy(W)}};l.prototype.gQa=function(){this.ot=[]};l.prototype.PTa=function(N){return 0==this.ot.length?N:this.ot[this.ot.length-1]};l.prototype.WTa=function(N){return this.ot.length<this.iWa?N:this.ot.reduce((V,W)=>V+W,0)/this.ot.length};l.prototype.bOa=function(N){this.ot.push(N);this.ot.length>this.eWa&&this.ot.shift()};l.prototype.zAa=function(N,V){if(void 0===this.wa||V)N=this.Xv.RS(N),Infinity!==N&&(this.wa=N)};l.prototype.yO=
function(){return void 0===this.wa?1.7:this.wa};l.prototype.HE=function(N){this.m.P.Ta();this.iJ[N].ika()};l.prototype.Ro=function(N){this.iJ[N].jka()};l.prototype.LZ=function(){this.Ei=!0;this.YE(t.Wh)};l.prototype.CJ=function(N,V){if("translate"==this.o.get("doubleClickAction")&&(this.xP(K.set(N,V)),N=this.Xv.H7a(K),0!=N.length)){var W=N[0];N=J.set(this.o.get("x"),this.o.get("y"),this.o.get("z"));V=C.copy(W.point);this.zAa(N);var aa=this.yO();W.face&&W.face.normal?(W=L.copy(W.face.normal).transformDirection(W.object.matrixWorld),
W=Math.abs(Math.acos(W.dot(X)))<.25*Math.PI):W=V.y<N.y-.75*aa;if(W)V.y+=aa;else{T.copy(V).sub(N);W=T.length();var ca=2*aa;if(W<ca)return;V.sub(T.multiplyScalar(ca/W));V.y+=aa-this.Xv.RS(V)}this.Xv.gH(N,V)||Math.abs(aa-this.Xv.RS(V))>.05*aa||(this.di=new u("cubic_in_out",[new v("x",N.x,V.x),new v("y",N.y,V.y),new v("z",N.z,V.z)],1500),this.m.P.Ta())}};var x=2500;l.prototype.KZ=function(N,V){this.Ei&&(this.iZ+=N,this.jZ+=V,this.m.P.Ta())};l.prototype.IE=function(){this.Ei=!1;this.I_(t.Wh);this.m.P.Ta()};
l.prototype.MZ=function(N){this.kZ+=N;this.m.P.Ta()};l.prototype.Yca=function(N,V){this.WX+=V;this.m.P.Ta()};l.prototype.Awa=function(){this.jSa();this.YE(t.Wh)};l.prototype.ywa=function(){this.m.P.Ta()};l.prototype.zwa=function(){this.I_(t.Wh)};l.prototype.Ti=function(N){this.o!=N&&(this.o&&(this.Fa=null,z.forEach(function(V){this.o.unbind(k.G(V),this.pda,this,!0)}.bind(this)),B.forEach(function(V){this.o.unbind(k.G(V),this.Pca,this,!0)}.bind(this)),this.o.set("userInteracting",!1)),this.o=N)&&(this.Fa=
new n(this.o),z.forEach(function(V){this.o.bind(k.G(V),this.pda,this,!0)}.bind(this)),this.pda(),B.forEach(function(V){this.o.bind(k.G(V),this.Pca,this,!0)}.bind(this)),this.Pca(),this.o.set("userInteracting",!1))};l.prototype.pda=function(){this.g1||(this.g1=!0,this.m.P.Ta())};l.prototype.Q2a=function(){if(this.g1&&this.m&&this.o){this.g1=!1;var N=this.m.J(h.va,!0);N.translationX=this.o.get("x");N.translationY=this.o.get("y");N.Je=this.o.get("z");N.ud=-this.o.get("yaw");N.Rd=this.o.get("pitch");
N.He=0;N.Ge="YXZ";N.positionX=0;N.positionY=0;N.positionZ=0;N.easing=this.o.get("easing")}};l.prototype.Pca=function(){this.QW||(this.QW=!0,this.m.P.Ta())};l.prototype.O1a=function(){this.QW&&this.m&&this.o&&(this.QW=!1,this.m.J(h.PerspectiveCamera,!0).fov=this.o.get("fov"))};var y=[c.na.gj,c.na.Sh,c.na.ab,c.na.ub,c.na.mo,c.na.Xm,c.na.so,c.na.Zm,c.na.Q,c.na.E],z="minYaw maxYaw yaw minPitch maxPitch pitch minX maxX x minY maxY y minZ maxZ z distance easingSpeed".split(" "),B=["minFov","maxFov","fov"],
D=Math.PI/180,F=180/Math.PI,A=new THREE.Matrix4,E=new THREE.Euler,J=new THREE.Vector3,C=new THREE.Vector3,L=new THREE.Vector3,T=new THREE.Vector3,S=new THREE.Vector3,U=new THREE.Vector2,X=new THREE.Vector3(0,1,0),K=new THREE.Vector2;l.prototype.dispose=function(){this.Ti(null);this.Yba();this.Dca();this.nZa();this.Vq.Ca();this.Xv=null};l.$a=function(N){N.I(h.Js).manager=new l(N)};l.Ca=function(N){var V=N.getComponent(h.Js);V.manager.dispose();V.manager=null;N.ia(h.Js)};l.update=function(N){N.getComponent(h.Js).manager.update()};
l.frame=function(N,V,W){N.getComponent(h.Js).manager.frame(V,W)};d.prototype.ika=function(){this.gO||(this.gO=!0,this.ora=Date.now()-this.v$<this.pra,this.v$=Date.now())};d.prototype.jka=function(){this.gO&&(this.gO=!1)};d.prototype.getState=function(){return this.gO||Date.now()-this.v$<this.pra?this.ora?d.v6:d.Sh:d.gj};d.gj=0;d.Sh=1;d.v6=2;return l});
define("cg","require lV pB bt lz cv fU lL pm fI oO kP pP iz bi pd bM".split(" "),function(a){function d(M){this.m=M;this.Xba(S);this.Cca();this.Vq=new n(M);this.fd=w;this.lr=this.oj=null;this.oF=.025;this.dm=.25;this.oi=void 0;this.pF=1;this.Ik=this.Yj=this.Hk=this.Cn=this.Bn=0;this.Vk=[];this.lE=this.mE=this.nE=this.jE=this.iE=this.Zz=this.nj=this.iw=this.jw=this.lw=this.kw=this.hw=void 0;this.sba=1E3;this.IO=void 0;this.YI=0;this.Fa=null;this.YE(t.hz);this.update()}function l(M,Q){M=Q-M;180<M?M-=
360:-180>M&&(M+=360);return M}function m(){return(new Date).getTime()}var k=a("lV"),c=a("pB"),h=a("bt");a("lz");var f=a("cv"),b=a("fU"),e=a("lL"),g=a("pm"),n=a("fI"),q=a("oO");a("kP");var p=a("pP"),r=a("iz"),t=a("bi"),u=a("pd"),v=a("bM");k.c2(d,[e,p,r]);d.prototype.update=function(){var M=this.m.getComponent(b.OC);this.Ti(M&&M.properties);this.Vq.uM(M&&M.properties,"moving");var Q=(!M.fL||!g.rja(this.m.P))&&M.enabled;this.t0(M&&(Q?M.Bg:null));this.dP(!!M&&Q&&M.DB);Q||this.IE();Q&&M.DB||(this.Cn=this.Bn=
this.Hk=this.Yj=this.Ik=0)};d.prototype.frame=function(M){this.di&&(this.di.Fb(M),this.Fa.setX(this.di.eb("x")),this.Fa.setY(this.di.eb("y")),this.Fa.setZ(this.di.eb("z")),this.Fa.SG(this.di.eb("distance")),this.Fa.bj(0),this.di.Xe()&&(this.di=null));this.Jg&&(this.Jg=Math.max(0,this.Jg-M/this.sba),this.Fa.setX(this.o.get("x")+this.lE*this.Jg),this.Fa.setY(this.o.get("y")+this.mE*this.Jg),this.Fa.setZ(this.o.get("z")+this.nE*this.Jg),this.Fa.Sm(this.o.get("yaw")+this.jE*this.Jg),this.Fa.Ky(this.o.get("pitch")+
this.iE*this.Jg),this.Fa.bj(0),this.m.P.Ta(),0==this.Jg&&this.LQ());if(this.Cn||this.Bn||this.Hk||this.Yj||this.Ik){var Q=M/1E3;this.Hca(this.Hk*Q,this.Yj*Q,this.Ik*Q,this.Cn*Q,this.Bn*Q)}if(this.fd==w&&void 0!==this.bl&&!this.Yj&&this.o.get("keepHeight")&&void 0!==this.IO&&Math.abs(this.bl-this.o.get("y"))>W){this.YI=Math.max(this.YI-M,0);Q=this.o.get("y");var Y=this.bl-Q;this.Fa.setY(Q+Math.min(M*this.IO,Math.abs(Y))*(0<Y?1:-1));this.m.P.Ta()}this.fd!=w||!this.lr||this.Jg||this.di||(this.CD(),this.m.P.Ta());
this.Vq.tma()};d.prototype.RP=function(){this.yga()};d.prototype.yga=function(){var M=0!=this.Ik||0!=this.Yj||0!=this.Hk;this.Cn=this.Bn=this.Ik=this.Yj=this.Hk=0;var Q=this.bg[h.na.mo]?1:this.bg[h.na.so]?-1:0,Y=this.bg[h.na.Zm]?1:this.bg[h.na.Xm]?-1:0,ba=this.bg[h.na.Q]?1:this.bg[h.na.E]?-1:0,da=this.bg[h.na.gj]?1:this.bg[h.na.Sh]?-1:0,fa=this.bg[h.na.ab]?1:this.bg[h.na.ub]?-1:0;if(da||fa||Q||Y||ba){var ha=this.xj?.2:1;Q&&(this.Hk=-Q*ha*this.o.get("translationSpeed"));ba&&(this.Yj=-ba*ha*this.o.get("translationSpeed"));
Y&&(this.Ik=-Y*ha*this.o.get("translationSpeed"));fa&&(this.Cn=-fa*ha*100*this.o.get("rotationSpeed"));da&&(this.Bn=da*ha*100*this.o.get("rotationSpeed"));this.CD();this.m.P.Ta();this.qea();this.iSa();Q=0!=this.Ik||0!=this.Yj||0!=this.Hk;!M&&Q&&this.LQ()}};d.prototype.LZ=function(){this.Ei=!0;this.fd==F||this.fd==A||m()<this.Yra+500||(this.YE(t.Wh),this.fd=w)};d.prototype.KZ=function(M,Q,Y,ba){if(this.Ei&&!(this.fd==F||this.fd==A||m()<this.Yra+500)){var da=(M*M+Q*Q)/2500;da=1<da?1/Math.sqrt(da):1;
M*=da;Q*=da;da=this.TTa();this.fd!=da?(this.fd=da,this.fd==x?this.d0a(Y,ba):this.fd==y?this.mza():this.fd==z?this.r0a():this.fd==D&&this.p0a()):this.fd!=w&&(this.fd==x?this.W1a(M,Q,Y,ba):this.fd==y?this.C2a(M,Q):this.fd==z?this.E2a(M,Q):this.fd==D&&this.B2a(M,Q))}};d.prototype.IE=function(){this.I_(t.Wh);this.Ei=!1;this.fd!=w&&(this.fd=w,this.oj=null,this.kza(),this.qea(),this.ota(),this.m.P.Ta())};d.prototype.MZ=function(M){this.fd!=B?(this.fd=B,this.l0a()):this.n2a(M);this.Gca&&clearTimeout(this.Gca);
this.Gca=setTimeout(function(){this.Gca=null;this.fd==B&&(this.fd=w,this.Mt())}.bind(this),1E3)};d.prototype.mva=function(M,Q,Y,ba,da,fa,ha,ia,ja,ka){this.fd!=F&&this.fd!=A?(M=.05<Math.abs(fa-da),Y=5<l(ja,ka),Q=Math.abs(ba-Q)>.02*this.$D(),ja=10>Math.min(Math.abs(ja),180-Math.abs(ja),Math.abs(ka),180-Math.abs(ka)),ha=.2>ha/this.sw(),(M||Q)&&(ja||ha)?(this.fd=A,this.q0a()):!Y&&!M||ja&&ha||(this.fd=F,this.s0a())):this.fd==F?this.F2a(da,fa,ja,ka):this.fd==A&&this.D2a(Q,ba,da,fa)};d.prototype.Zca=function(){this.oj=
null;this.fd==F&&this.kza();this.fd=w;this.Yra=m();this.qea();this.ota();this.m.P.Ta()};d.prototype.CJ=function(M,Q){if("zoom"==this.o.get("doubleClickAction")){var Y=f.qf(this.m),ba=f.Vr(this.m);ba&&Y&&(I.set(M,Q),this.xP(I),M=this.RO(I,ba),0!=M.length&&(this.Mt(),this.CD(),M=M[0].point,E.setFromMatrixPosition(ba.matrixWorld),this.di=new u("quad_in_out",[new v("x",E.x,.5*(M.x+E.x)),new v("y",E.y,.5*(M.y+E.y)),new v("z",E.z,.5*(M.z+E.z)),new v("distance",0,0)],500)))}};d.prototype.TTa=function(){return this.vP?
this.xj?y:x:this.gJ()?this.xj?D:z:w};d.prototype.d0a=function(M,Q){this.aK();this.CD();this.HOa(M,Q);this.o.get("keepHeight")&&this.V0();this.m.P.Ta()};d.prototype.W1a=function(M,Q,Y,ba){var da=f.Vr(this.m);da&&(E.setFromMatrixPosition(da.matrixWorld),this.oj?(J.set(Y,ba,0),this.xP(J),J.unproject(da),M=this.oj.x-E.x,Q=this.oj.z-E.z,-2<Math.atan2(this.oj.y-E.y,Math.sqrt(Q*Q+M*M))*V?(L.copy(this.oj).applyMatrix4(da.matrixWorldInverse),T.copy(J).applyMatrix4(da.matrixWorldInverse),M=L.z/T.z,C.copy(T).multiplyScalar(M).applyMatrix4(da.matrixWorld).sub(this.oj),
0!=C.y&&this.Mt()):(M=(this.oj.y-E.y)/(J.y-E.y),C.copy(J).sub(E).multiplyScalar(M).add(E).sub(this.oj)),C.multiplyScalar(-1)):(aa.makeRotationFromEuler(P.set(0,-this.o.get("yaw")*N,0,"YXZ")),ca.set(-M*this.o.get("translationSpeed")/this.sw(),0,-Q*this.o.get("translationSpeed")/this.sw()).applyMatrix4(aa),C.copy(ca).multiplyScalar(10*this.pF)),this.Fa.setX(E.x+C.x),this.Fa.setY(E.y+C.y),this.Fa.setZ(E.z+C.z),this.EK(C.x,C.y,C.z,0,0),this.Fa.bj(this.dm))};d.prototype.mza=function(){this.aK();this.oj=
null;this.K8();this.Mt();this.m.P.Ta()};d.prototype.C2a=function(M,Q){var Y;Y||(Y=1);M=360*M/this.AO()*this.o.get("rotationSpeed");Q=180*-Q/this.$D()*this.o.get("rotationSpeed");this.Fa.Sm(this.o.get("yaw")+M);this.Fa.Ky(this.o.get("pitch")+Q);this.Fa.SG(this.Ida/Y);this.EK(0,0,0,M,Q);this.Fa.bj(this.dm);this.m.P.Ta()};d.prototype.r0a=function(){this.mza()};d.prototype.E2a=function(M,Q){var Y=f.Vr(this.m),ba=this.o.get("distance")||this.oi||1;Q=Q*ba*2*Math.tan(Y.fov*N/2)/this.$D();0!=Q&&this.Mt();
this.Fa.setY(this.o.get("y")+Q);M=360*M/this.AO()*this.o.get("rotationSpeed");this.Fa.Sm(this.o.get("yaw")+M);this.EK(0,Q,0,M,0);this.Fa.bj(this.dm)};d.prototype.p0a=function(){this.aK();this.CD();this.Mt();this.m.P.Ta()};d.prototype.B2a=function(M,Q){M=360*-M/this.AO()*this.o.get("rotationSpeed");Q=180*Q/this.$D()*this.o.get("rotationSpeed");this.Fa.Sm(this.o.get("yaw")+M);this.Fa.Ky(this.o.get("pitch")+Q);this.EK(0,0,0,M,Q);this.Fa.bj(this.dm);this.m.P.Ta()};d.prototype.l0a=function(){this.Mt();
this.aK();this.oj=null;this.CD();this.o.get("keepHeight")&&this.V0();this.m.P.Ta()};d.prototype.n2a=function(M){this.i_a(ca);ca.multiplyScalar(-M*this.o.get("translationSpeed")*(this.pF||1));this.oi&&this.Apa(this.oi+ca.y);this.Fa.setX(this.o.get("x")+ca.x);this.Fa.setY(this.o.get("y")+ca.y);this.Fa.setZ(this.o.get("z")+ca.z);this.Fa.bj(this.oF)};d.prototype.s0a=function(){this.aK();this.oj=null;this.K8();this.Mt();this.m.P.Ta();this.Gt=void 0};d.prototype.F2a=function(M,Q,Y,ba){void 0!==this.Gt||
(this.Gt=Y);Y=l(this.Gt,ba);this.Gt=ba;this.Fa.Sm(this.o.get("yaw")+Y);this.Fa.SG(this.Ida*M/Q);this.EK(0,0,0,Y,0);this.Fa.bj(this.dm);this.m.P.Ta()};d.prototype.q0a=function(){this.aK();this.oj=null;this.K8();this.Mt();this.m.P.Ta();this.N_=void 0};d.prototype.D2a=function(M,Q,Y,ba){void 0!==this.N_||(this.N_=M);M=180*-(Q-this.N_)/this.$D();this.N_=Q;this.Fa.Ky(this.o.get("pitch")+M);this.Fa.SG(this.Ida*Y/ba);this.EK(0,0,0,0,M);this.Fa.bj(this.dm);this.m.P.Ta()};d.prototype.HOa=function(M,Q){var Y=
f.qf(this.m),ba=f.Vr(this.m);this.oj=null;ba&&Y&&(I.set(M,Q),this.xP(I),M=this.RO(I,ba),M.length&&(this.oj=M[0].point))};d.prototype.K8=function(){this.lr=null;var M=f.qf(this.m),Q=f.Vr(this.m);Q&&M&&(I.set(0,0),M=this.RO(I,Q),M.length&&(this.lr=M[0].point),this.lr||(this.lr=(new THREE.Vector3).setFromMatrixPosition(Q.matrixWorld)),this.o.set("distance",E.setFromMatrixPosition(Q.matrixWorld).distanceTo(this.lr)),this.Ida=this.o.get("distance"),this.o.set("x",this.lr.x),this.o.set("y",this.lr.y),this.o.set("z",
this.lr.z),this.o.set("easing",0))};d.prototype.CD=function(){this.lr&&(this.lr=null,E.setFromMatrixPosition(f.Vr(this.m).matrixWorld),this.o.set("distance",0),this.o.set("x",E.x),this.o.set("y",E.y),this.o.set("z",E.z),this.o.set("easing",0))};var w="none",x="dragging",y="rotating",z="rotating yaw dragging y",B="moving front",D="rotating around camera",F="rotating yaw gesture",A="rotating pitch gesture",E=new THREE.Vector3,J=new THREE.Vector3,C=new THREE.Vector3,L=new THREE.Vector3,T=new THREE.Vector3;
d.prototype.Ti=function(M){this.o!=M&&(this.o&&(this.Fa=null,U.forEach(function(Q){this.o.unbind(c.G(Q),this.HAa,this,!1)}.bind(this)),X.forEach(function(Q){this.o.unbind(c.G(Q),this.Ox,this,!1)}.bind(this)),K.forEach(function(Q){this.o.unbind(c.G(Q),this.Cr,this,!1)}.bind(this)),this.o.set("userInteracting",!1)),this.o=M)&&(this.Fa=new q(this.o),U.forEach(function(Q){this.o.bind(c.G(Q),this.HAa,this,!1)}.bind(this)),X.forEach(function(Q){this.o.bind(c.G(Q),this.Ox,this,!1)}.bind(this)),K.forEach(function(Q){this.o.bind(c.G(Q),
this.Cr,this,!1)}.bind(this)),this.Ox(),this.Cr(),this.o.set("userInteracting",!1))};d.prototype.Ox=function(){if(this.m&&this.o){var M=this.m.J(b.va,!0);M.translationX=this.o.get("x");var Q=this.o.get("y")-M.translationY;Math.abs(Q)>W&&(M.translationY=this.o.get("y"),this.fd!=w||this.Hk||this.Yj||this.Ik||this.Cn||this.Bn||this.di||this.Jg||this.Mt());M.Je=this.o.get("z");M.ud=-this.o.get("yaw");M.Rd=this.o.get("pitch");M.He=0;M.Ge="YXZ";M.positionX=0;M.positionY=0;M.positionZ=this.o.get("distance");
M.easing=this.o.get("easing");(void 0!==this.o.get("minHeight")||this.o.get("keepHeight"))&&this.SAa()}};d.prototype.Cr=function(){this.m&&this.o&&(this.m.J(b.PerspectiveCamera,!0).fov=this.o.get("fov"))};d.prototype.Hca=function(M,Q,Y,ba,da){var fa=this.m.getComponent(b.va);fa&&(aa.makeRotationFromEuler(P.set(0,fa.ud*N,0,fa.Ge)),ca.set(M,Q,Y).applyMatrix4(aa).multiplyScalar(this.pF),void 0!==this.oi&&(this.oi+=ca.y,this.LQ()),this.Fa.setX(this.o.get("x")+ca.x),this.Fa.setY(this.o.get("y")+ca.y),
this.Fa.setZ(this.o.get("z")+ca.z),this.Fa.Sm(this.o.get("yaw")+ba),this.Fa.Ky(this.o.get("pitch")+da),this.Fa.bj(this.dm))};d.prototype.i_a=function(M){var Q=this.m.getComponent(b.va);Q&&(aa.makeRotationFromEuler(P.set(Q.Rd*N,Q.ud*N,Q.He*N,Q.Ge)),M.set(0,0,1).applyMatrix4(aa))};d.prototype.aK=function(){this.Zz=m();this.nj=1;this.iw=this.jw=this.lw=this.kw=this.hw=0;this.Jg=this.lE=this.mE=this.nE=this.jE=this.iE=void 0};d.prototype.EK=function(M,Q,Y,ba,da){var fa=m();this.nj=fa-this.Zz;this.Zz=
fa;this.iw=M;this.jw=Q;this.lw=Y;this.kw=ba;this.hw=da};d.prototype.kza=function(){this.nj&&(this.lE=this.iw/this.nj,this.mE=this.jw/this.nj,this.nE=this.lw/this.nj,this.jE=this.kw/this.nj,this.iE=this.hw/this.nj,this.Jg=1)};d.prototype.HAa=function(){void 0!==this.o.get("minHeight")&&(void 0===this.oi&&this.V0(),void 0!==this.oi&&this.oi<this.o.get("minHeight")&&(this.oi=this.o.get("minHeight")),this.SAa())};d.prototype.Mt=function(){this.oi=this.bl=void 0;this.MQ&&(clearTimeout(this.MQ),this.MQ=
null)};d.prototype.ota=function(){this.YI=2E3;this.IO=void 0;this.m.P.Ta()};d.prototype.iSa=function(){this.YI=0;this.IO=Infinity;this.m.P.Ta()};d.prototype.qea=function(){this.oj||void 0!==this.oi||this.MQ||(this.MQ=setTimeout(function(){this.MQ=null;this.V0()}.bind(this),0))};d.prototype.V0=function(){var M=this.yO();void 0!==M?this.Apa(M):this.LQ()};d.prototype.Apa=function(M){var Q=this.o.get("minHeight")||M;this.oi=Math.max(M,Q);this.LQ();this.bl=this.o.get("y")+this.oi-M};d.prototype.LQ=function(){if(this.oi)this.pF=
Math.min(10,Math.max(this.oi||0,.1));else{this.Lq(ca);this.zTa(ea);var M=this.Aba(ca,ea);this.pF=M.length?ca.distanceTo(M[0].point):ca.y-(this.o.get("minY")||0)}this.pF=Math.max(Math.abs(this.pF||0),.1)};d.prototype.SAa=function(){this.TAa||void 0===this.oi||(this.TAa=setTimeout(function(){this.TAa=null;var M=this.yO();void 0!==M&&void 0!==this.oi&&(M=this.oi-M,this.IO=0==this.YI?Infinity:Math.abs(M/this.YI),this.bl=this.o.get("y")+M,0!==M&&this.m.P.Ta())}.bind(this),0))};d.prototype.yO=function(){if(this.o)return this.Lq(ca),
this.dUa(ca.x,ca.y,ca.z)};d.prototype.dUa=function(M,Q,Y){var ba=this.Aba(ca.set(M,Q,Y),ea.set(0,-1,0));if(0<ba.length)return ba[0].distance;ba=this.Aba(ca.set(M,Q+1E3,Y),ea.set(0,-1,0));if(0<ba.length)return ba[ba.length-1].distance-1E3};d.prototype.Aba=function(M,Q){R.ray.origin.copy(M);R.ray.direction.copy(Q);return R.intersectObjects(this.aE(),!1)};d.prototype.RO=function(M,Q){R.setFromCamera(M,Q);return R.intersectObjects(this.aE(),!1)};d.prototype.aE=function(){var M=this.m&&f.qf(this.m);if(!M)return[];
var Q=[];M.traverse(function(Y){Y.isSprite||Y.isLine||Q.push(Y)});return Q};d.prototype.Lq=function(M){M.set(0,0,0);this.o&&(M.applyMatrix4(aa.makeTranslation(0,0,this.o.get("distance"))),M.applyMatrix4(aa.makeRotationFromEuler(P.set(this.o.get("pitch")*N,-this.o.get("yaw")*N,0*N,"YXZ"))),M.applyMatrix4(aa.makeTranslation(this.o.get("x"),this.o.get("y"),this.o.get("z"))))};d.prototype.zTa=function(M){this.o?(aa.makeRotationFromEuler(P.set(this.o.get("pitch")*N,-this.o.get("yaw")*N,0,"YXZ")),M.set(0,
0,-1).applyMatrix4(aa)):M.set(0,0,-1)};var S=[h.na.gj,h.na.Sh,h.na.ab,h.na.ub,h.na.mo,h.na.Xm,h.na.so,h.na.Zm,h.na.Q,h.na.E],U=["minHeight"],X="minYaw maxYaw yaw minPitch maxPitch pitch minX maxX x minY maxY y minZ maxZ z distance easingSpeed".split(" "),K=["minFov","maxFov","fov"],N=Math.PI/180,V=180/Math.PI,W=1E-6,aa=new THREE.Matrix4,ca=new THREE.Vector3(0,0,0),ea=new THREE.Vector3(0,0,0),I=new THREE.Vector2(0,0),P=new THREE.Euler,R=new THREE.Raycaster;d.prototype.dispose=function(){this.CD();
this.Ti(null);this.Yba();this.Dca();this.Vq.Ca()};d.$a=function(M){M.I(b.ov).manager=new d(M)};d.Ca=function(M){var Q=M.getComponent(b.ov);Q.manager.dispose();Q.manager=null;M.ia(b.ov)};d.update=function(M){M.getComponent(b.ov).manager.update()};d.frame=function(M,Q,Y){M.getComponent(b.ov).manager.frame(Q,Y)};return d});
define("oX","require lV pB bt fU cv lL pm fI oO pP iz bi".split(" "),function(a){function d(E){this.m=E;this.Xba(D);this.Cca();this.Vq=new e(E);this.Zk=new THREE.Matrix4;this.oF=.05;this.dm=.25;this.Hk=this.Yj=this.Ik=this.Cn=this.Bn=0;this.lE=this.mE=this.nE=this.jE=this.iE=this.Zz=this.nj=this.iw=this.jw=this.lw=this.kw=this.hw=void 0;this.sba=1E3;this.bya=720;this.Sza=4;this.Mta=720;this.Zba=2;this.Fa=null;this.YE(p.hz);this.update()}var l=a("lV"),m=a("pB"),k=a("bt"),c=a("fU"),h=a("cv"),f=a("lL"),
b=a("pm"),e=a("fI"),g=a("oO"),n=a("pP"),q=a("iz"),p=a("bi");l.c2(d,[f,n,q]);d.prototype.update=function(){var E=this.m.getComponent(c.UC);this.Ti(E&&E.properties);this.Vq.uM(E&&E.properties,"moving");var J=(!E.fL||!b.rja(this.m.P))&&E.enabled;this.t0(E&&(J?E.Bg:null));this.dP(!!E&&J&&E.DB);J||this.IE();J&&E.DB||(this.Cn=this.Bn=this.Hk=this.Yj=this.Ik=0)};d.prototype.frame=function(E){this.Jg&&(this.Jg=Math.max(0,this.Jg-E/this.sba),this.Fa.setX(this.o.get("x")+this.lE*this.Jg),this.Fa.setY(this.o.get("y")+
this.mE*this.Jg),this.Fa.setZ(this.o.get("z")+this.nE*this.Jg),this.Fa.Sm(this.o.get("yaw")+this.jE*this.Jg),this.Fa.Ky(this.o.get("pitch")+this.iE*this.Jg),this.m.P.Ta());if(this.Cn||this.Bn||this.Hk||this.Yj||this.Ik)E/=1E3,this.Hca(this.Hk*E,this.Yj*E,this.Ik*E,this.Cn*E,this.Bn*E);this.Vq.tma()};d.prototype.RP=function(){this.yga()};d.prototype.yga=function(){this.Cn=this.Bn=this.Ik=this.Yj=this.Hk=0;var E=this.bg[k.na.mo]?1:this.bg[k.na.so]?-1:0,J=this.bg[k.na.Zm]?1:this.bg[k.na.Xm]?-1:0,C=this.bg[k.na.Q]?
1:this.bg[k.na.E]?-1:0,L=this.bg[k.na.gj]?1:this.bg[k.na.Sh]?-1:0,T=this.bg[k.na.ab]?1:this.bg[k.na.ub]?-1:0;if(E||J||C||L||T){var S=this.xj?.2:1;E&&(this.Hk=-E*S*this.Zba*this.o.get("translationSpeed"));C&&(this.Yj=-C*S*this.Zba*this.o.get("translationSpeed"));J&&(this.Ik=-J*S*this.Zba*this.o.get("translationSpeed"));T&&(this.Cn=T*S*this.Mta*this.o.get("rotationSpeed"));L&&(this.Bn=-L*S*this.Mta*this.o.get("rotationSpeed"));this.m.P.Ta()}};d.prototype.LZ=function(){this.YE(p.Wh);this.Ei=!0;this.Zz=
(new Date).getTime();this.nj=1;this.iw=this.jw=this.lw=this.kw=this.hw=0;this.Jg=this.lE=this.mE=this.nE=this.jE=this.iE=void 0;this.m.P.Ta()};d.prototype.KZ=function(E,J){if(this.Ei){var C=(E*E+J*J)/2500;C=1<C?1/Math.sqrt(C):1;E*=C;J*=C;C=(new Date).getTime();this.nj=C-this.Zz;this.Zz=C;this.iw=this.jw=this.lw=this.kw=this.hw=0;C=this.vP;this.xj&&(C=!C);C?(this.kw=+E*this.o.get("rotationSpeed")*this.bya/this.sw(),this.hw=-J*this.o.get("rotationSpeed")*this.bya/this.sw(),this.aya(this.kw,this.hw)):
(this.ssa(E*this.Sza/this.sw(),J*this.Sza/this.sw(),u),this.iw=u.x,this.jw=u.y,this.lw=u.z,this.$fa(this.iw,this.jw,this.lw));this.Fa.bj(this.dm)}};d.prototype.ssa=function(E,J,C){var L=this.m.getComponent(c.va);C.set(-E*this.o.get("translationSpeed"),+J*this.o.get("translationSpeed"),0*this.o.get("translationSpeed"));C.applyMatrix4(z.makeRotationFromEuler(y.set(L.Rd*r,L.ud*r,L.He*r,L.Ge)));C.multiplyScalar(this.o.get("distance"))};d.prototype.IE=function(){this.I_(p.Wh);this.Ei&&(this.Ei=!1,this.nj&&
(this.lE=this.iw/this.nj,this.mE=this.jw/this.nj,this.nE=this.lw/this.nj,this.jE=this.kw/this.nj,this.iE=this.hw/this.nj,this.Jg=1,this.Fa.bj(this.dm)),this.Zz=void 0)};d.prototype.MZ=function(E){this.Fa.SG(this.o.get("distance")-E*this.o.get("distance")*this.o.get("translationSpeed"));this.Fa.bj(this.oF)};d.prototype.CJ=function(E,J){if("center"==this.o.get("doubleClickAction")){var C=h.qf(this.m),L=h.Vr(this.m);L&&C&&(w.set(E,J),this.xP(w),E=this.RO(w,L),0!=E.length&&(E=E[0].point,J=u.setFromMatrixPosition(L.matrixWorld).sub(E),
L=J.length(),x.setFromUnitVectors(v.set(0,0,1),J.normalize()),y.setFromQuaternion(x,"YXZ"),J=y.x*t,this.Fa.Sm(-y.y*t),this.Fa.Ky(J),this.Fa.SG(L),this.Fa.setX(E.x),this.Fa.setY(E.y),this.Fa.setZ(E.z),this.Fa.bj(this.oF)))}};d.prototype.nva=function(){this.pta=this.o.get("distance");this.Ei=!1};d.prototype.Yca=function(E,J,C){this.ssa(E/this.sw(),J/this.sw(),u);this.$fa(u.x,u.y,u.z);this.Fa.SG(this.pta/C);this.Fa.bj(this.dm)};d.prototype.Zca=function(){this.pta=this.o.get("distance")};d.prototype.Hca=
function(E,J,C,L,T){var S=this.m.getComponent(c.va);S&&(z.makeRotationFromEuler(y.set(0,S.ud*r,0,S.Ge)),u.set(E,J,C).applyMatrix4(z).multiplyScalar(this.o.get("distance")),this.$fa(u.x,u.y,u.z),this.aya(L,T),this.Fa.bj(this.dm))};d.prototype.$fa=function(E,J,C){this.Fa.setX(this.o.get("x")+E);this.Fa.setY(this.o.get("y")+J);this.Fa.setZ(this.o.get("z")+C)};d.prototype.aya=function(E,J){this.Fa.Sm(this.o.get("yaw")+E);this.Fa.Ky(this.o.get("pitch")+J)};d.prototype.Ti=function(E){this.o!=E&&(this.o&&
(this.Fa=null,F.forEach(function(J){this.o.unbind(m.G(J),this.Ox,this,!1)}.bind(this)),A.forEach(function(J){this.o.unbind(m.G(J),this.Cr,this,!1)}.bind(this)),this.o.set("userInteracting",!1)),this.o=E)&&(this.o.set("userInteracting",!1),this.Fa=new g(this.o),F.forEach(function(J){this.o.bind(m.G(J),this.Ox,this,!1)}.bind(this)),A.forEach(function(J){this.o.bind(m.G(J),this.Cr,this,!1)}.bind(this)),this.Ox(),this.Cr())};d.prototype.RO=function(E,J){B.setFromCamera(E,J);return B.intersectObjects(this.aE(),
!1)};d.prototype.aE=function(){var E=this.m&&h.qf(this.m);if(!E)return[];var J=[];E.traverse(function(C){C.isSprite||C.isLine||J.push(C)});return J};d.prototype.Ox=function(){if(this.m&&this.o){var E=this.m.J(c.va,!0);E.translationX=this.o.get("x");E.translationY=this.o.get("y");E.Je=this.o.get("z");E.ud=-this.o.get("yaw");E.Rd=this.o.get("pitch");E.He=0;E.Ge="YXZ";E.positionX=0;E.positionY=0;E.positionZ=this.o.get("distance");E.easing=this.o.get("easing")}};d.prototype.Cr=function(){this.m&&this.o&&
(this.m.J(c.PerspectiveCamera,!0).fov=this.o.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,B=new THREE.Raycaster,D=[k.na.gj,k.na.Sh,k.na.ab,k.na.ub,k.na.mo,k.na.Xm,k.na.so,k.na.Zm,k.na.Q,k.na.E],F="easing minYaw maxYaw yaw minPitch maxPitch pitch minDistance maxDistance distance minX maxX x minY maxY y minZ maxZ z".split(" "),A=["minFov","maxFov","fov"];d.prototype.dispose=
function(){this.Ti(null);this.Yba();this.Dca();this.Vq.Ca()};d.$a=function(E){E.I(c.vv).manager=new d(E)};d.Ca=function(E){var J=E.getComponent(c.vv);J.manager.dispose();J.manager=null;E.ia(c.vv)};d.update=function(E){E.getComponent(c.vv).manager.update()};d.frame=function(E,J,C){E.getComponent(c.vv).manager.frame(J,C)};return d});
define("id","require exports kQ cv fU three.mod".split(" "),function(a,d,l,m,k,c){a=function(){function b(e){this.F=e;this.properties=this.F.getComponent(k.Bv).properties;this.nl()&&this.V3a();this.update()}b.prototype.update=function(){this.properties=this.F.getComponent(k.Bv).properties;this.nl()||this.NBa()};b.prototype.frame=function(){this.nl()?this.U3a():this.NBa()};b.prototype.V3a=function(){var e=this.F.getComponent(k.Bv).hg||1;this.XCa();l.setPosition({x:this.properties.get("x"),y:this.properties.get("y"),
z:this.properties.get("z"),yaw:this.properties.get("yaw")});l.setScale(e)};b.prototype.U3a=function(){this.XCa();l.setPosition({x:this.properties.get("x"),y:this.properties.get("y"),z:this.properties.get("z"),yaw:void 0});this.properties.set("yaw",-h.setFromQuaternion(l.dg).y*f)};b.prototype.NBa=function(){var e=this.F.J(k.va,!0);e.translationX=this.properties.get("x");e.translationY=this.properties.get("y");e.Je=this.properties.get("z");e.ud=-this.properties.get("yaw");e.Rd=this.properties.get("pitch");
e.He=0;e.Ge="YXZ";e.positionX=0;e.positionY=0;e.positionZ=this.properties.get("distance",0);e.easing=0;this.F.J(k.PerspectiveCamera,!0).fov=this.properties.get("fov")};b.prototype.XCa=function(){var e=m.qf(this.F),g=this.F.getComponent(k.Pj);g=g&&g.camera;l.Ru!==g&&l.zla(l.nh,e,g,l.ZV.pna)};b.prototype.nl=function(){return this.F.getComponent(k.PerspectiveCamera).nl};b.$a=function(e){e.I(k.Ys).manager=new b(e)};b.update=function(e){e.getComponent(k.Ys).manager.update()};b.frame=function(e,g,n){e.getComponent(k.Ys).manager.frame(g,
n)};b.Ca=function(e){e.getComponent(k.Ys).manager=null;e.ia(k.Ys)};return b}();var h=new c.Euler,f=180/Math.PI;return a});
define("kV","require exports pB kQ mH fU three.mod".split(" "),function(a,d,l,m,k,c,h){a=function(){function y(z){this.locked=!0;this.Dp=!1;this.pia=this.il=this.ye=null;this.D2=new h.Matrix4;this.XF=new h.Vector3;this.gM=new Map;this.hg=1;this.kC=0;this.Ds=!1;this.sk=0;this.Bj=null;this.UB=new h.Vector3;this.td=new h.Vector3;this.c4=new h.Quaternion;this.lU=this.mU=this.nU=0;this.Sx=new h.Box3(new h.Vector3(-Infinity,-Infinity,-Infinity),new h.Vector3(Infinity,Infinity,Infinity));this.F=z;this.Gj=
this.Gj.bind(this);this.Or=new k(this.F);m.N.bind(l.ba,this.ze,this,!0);this.update()}y.prototype.update=function(){var z=this.F.getComponent(c.RH),B=(null===z||void 0===z?void 0:z.locked)||!1;!B&&this.locked&&(this.Dp=!0);this.locked=B;this.hg=(null===z||void 0===z?void 0:z.hg)||1;this.sk=null===z||void 0===z?void 0:z.sk;this.lC();this.properties=z.properties;this.locked||(m.setScale(this.hg),this.BS(),this.Gj());this.Dp&&(f.setFromQuaternion(m.nH),m.setPosition({pitch:f.x*w,roll:f.z*w}),this.NF())};
y.prototype.frame=function(z){if(!this.locked){this.Bs();this.mV();this.NF();if(!this.properties.get("controllingPosition")){this.td.copy(m.Ec);this.c4.copy(m.dg);var B;(B=this.tS())||(B=this.Cha(z));B||(B=this.uS(z));B&&(z={},m.Ec.equals(this.td)||(z.x=this.td.x,z.y=this.td.y,z.z=this.td.z),m.dg.equals(this.c4)||(f.setFromQuaternion(this.c4,"YXZ"),z.yaw=-f.y*w,z.pitch=f.x*w,z.roll=f.z*w),m.setPosition(z))}this.yS();this.YK();this.Dp=!1}};y.prototype.dispose=function(){m.N.unbind(l.ba,this.ze,this);
this.properties.set("userInteracting",!1);this.lC();this.mh();this.RU([])};y.prototype.lC=function(){y.lz.forEach(function(z){var B;null===(B=this.properties)||void 0===B?void 0:B.unbind(l.G(z),this.Gj,this)}.bind(this))};y.prototype.BS=function(){y.lz.forEach(function(z){var B;null===(B=this.properties)||void 0===B?void 0:B.bind(l.G(z),this.Gj,this,!0)}.bind(this))};y.prototype.Gj=function(){this.Sx.min.set(this.properties.get("minX",-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",
-Infinity));this.Sx.max.set(this.properties.get("maxX",Infinity),this.properties.get("maxY",Infinity),this.properties.get("maxZ",Infinity))};y.prototype.NF=function(){var z=this.properties.get("x"),B=this.properties.get("y"),D=this.properties.get("z"),F=this.properties.get("yaw"),A=this.properties.get("pitch"),E=this.properties.get("distance");if(z!==this.UB.x||B!==this.UB.y||D!==this.UB.z||F!==this.nU||A!==this.mU||E!==this.lU)this.UB.set(z,B,D),n.identity(),n.multiply(q.makeTranslation(z,B,D)),
n.multiply(q.makeRotationFromEuler(f.set(A*x,-F*x,0,"YXZ"))),n.multiply(q.makeTranslation(0,0,E)),n.decompose(e,b,g),f.setFromQuaternion(b,"YXZ"),m.setPosition({x:e.x,y:e.y,z:e.z,yaw:-f.y*w})};y.prototype.yS=function(){e.copy(m.Ec).sub(this.UB);var z=e.length();f.setFromQuaternion(b.setFromUnitVectors(u,e.multiplyScalar(1/z)),"YXZ");this.properties.set("x",this.UB.x);this.properties.set("y",this.UB.y);this.properties.set("z",this.UB.z);this.properties.set("yaw",-f.y*w);this.properties.set("pitch",
f.x*w);this.properties.set("roll",f.z*w);this.properties.set("distance",z)};y.prototype.YK=function(){this.nU=this.properties.get("yaw");this.mU=this.properties.get("pitch");this.lU=this.properties.get("distance")};y.prototype.Bs=function(){this.RU((y.qC.get(this.F.P)||[]).map(function(z){return z.getComponent(c.Fc)}))};y.prototype.RU=function(z){var B=[],D=[];this.gM.forEach(function(F){-1===z.indexOf(F)&&B.push(F)}.bind(this));z.forEach(function(F){this.gM.has(F.N)||D.push(F)}.bind(this));this.il&&
-1===z.indexOf(this.il)&&this.mh();B.forEach(function(F){this.oU(F.N);this.gM.delete(F.N)}.bind(this));D.forEach(function(F){this.rS(F.N);this.gM.set(F.N,F)}.bind(this));this.ye=z.find(function(F){return F.Zi})||null};y.prototype.rS=function(z){z.bind(l.ma,this.fs,this,!0);z.bind(l.hb,this.gs,this,!0)};y.prototype.oU=function(z){z.unbind(l.ma,this.fs,this);z.unbind(l.hb,this.gs,this)};y.prototype.ze=function(){this.F.J(c.pq)};y.prototype.fs=function(z){this.properties.get("inMandatorySequence")||
z.data.yT||"other"==z.data.type||this.properties.get("clickTranslationDisabled")||(z=this.gM.get(z.source),z=this.Or.BT(z),0!=z.length&&(this.Bj=z[0].point))};y.prototype.gs=function(z){if(!this.properties.get("inMandatorySequence")&&!this.properties.get("mouseDisabled")){this.mh();z=z.source;var B=this.gM.get(z),D=this.Or.BT(B);0!=D.length&&(this.il=B,this.pia=z,this.pia.bind(l.Eb,this.mh,this,!0),this.XF.copy(D[0].point),this.D2.copy(this.il.matrixWorld))}};y.prototype.mh=function(){this.il&&(this.il.N.unbind(l.Eb,
this.mh,this),this.il=this.pia=null)};y.prototype.tS=function(){if(!this.Bj)return!1;this.td.copy(this.Bj).sub(m.Ec).multiplyScalar(.5).add(m.Ec);this.Bj=null;return!0};y.prototype.uS=function(z){return this.vS()?!0:this.wS(z)?!0:!1};y.prototype.vS=function(){if(!this.ye)return!1;if(0===this.ye.Xb.y&&0===this.ye.Xb.x)return this.kC=Date.now(),this.Ds=!1;if(this.Ds)return!0;var z=Math.sqrt(this.ye.Xb.y*this.ye.Xb.y+this.ye.Xb.x*this.ye.Xb.x)*this.properties.get("rotationSpeed",1),B=Math.atan2(-this.ye.Xb.y,
this.ye.Xb.x),D=Math.abs(B)<.25*Math.PI;B=Math.abs(B)>.75*Math.PI;return 0!==this.sk&&.95<z&&(D||B)&&100>Date.now()-this.kC?(this.Ds=!0,z=this.sk*(B?-1:1),z=-f.setFromQuaternion(m.dg,"YXZ").y*w+z,m.setPosition({yaw:z}),!0):!1};y.prototype.wS=function(z){if(!this.ye||0===this.ye.Xb.y&&0===this.ye.Xb.x)return!1;z=4E3/3600/this.hg*this.properties.get("translationSpeed",1)*(this.ye.jH?3:1)*z/1E3;var B=e.set(0,0,-1).applyQuaternion(m.dg),D=g.set(1,0,0).applyQuaternion(m.dg);B.normalize().multiplyScalar(-this.ye.Xb.y*
z);D.normalize().multiplyScalar(this.ye.Xb.x*z);this.td.set(m.Ec.x+B.x+D.x,m.Ec.y+B.y+D.y,m.Ec.z+B.z+D.z);return!0};y.prototype.Cha=function(z){if(!this.il)return!1;this.Dha(z);z=n.copy(this.D2);var B=q.copy(this.il.matrixWorld);B=r.copy(p.compose(m.Ec,m.dg,v)).invert().multiply(B);t.copy(z).multiply(B.invert()).decompose(this.td,this.c4,e);return!0};y.prototype.Dha=function(z){if(!this.il||0===this.il.Xb.y&&0===this.il.Xb.x)return!1;z=90*z/1E3*this.properties.get("rotationSpeed",1);var B=p.makeRotationFromQuaternion(b.setFromRotationMatrix(this.D2)),
D=r.copy(B).invert(),F=q.identity();F.multiply(n.makeTranslation(this.XF.x,this.XF.y,this.XF.z));F.multiply(B);F.multiply(n.makeRotationFromEuler(f.set(this.il.Xb.y*z*x,this.il.Xb.x*z*x,0,"YXZ")));F.multiply(D);F.multiply(n.makeTranslation(-this.XF.x,-this.XF.y,-this.XF.z));this.D2.premultiply(F);return!0};y.prototype.mV=function(){this.properties.get("inMandatorySequence")?this.properties.set("userInteracting",!1):this.il?this.properties.set("userInteracting",!0):this.Bj?this.properties.set("userInteracting",
!0):!this.ye||0===this.ye.Xb.y&&0===this.ye.Xb.x?this.properties.set("userInteracting",!1):this.properties.set("userInteracting",!0)};y.YG=function(z,B){this.qC.set(z,B)};y.$a=function(z){z.I(c.pq).manager=new y(z)};y.update=function(z){z.getComponent(c.pq).manager.update()};y.frame=function(z,B,D){z.getComponent(c.pq).manager.frame(B,D)};y.Ca=function(z){var B=z.getComponent(c.pq);B.manager.dispose();B.manager=null;z.ia(c.pq)};y.qC=new Map;y.lz="minX maxX minY maxY minZ maxZ".split(" ");return y}();
var f=new h.Euler(0,0,0,"YXZ"),b=new h.Quaternion,e=new h.Vector3,g=new h.Vector3,n=new h.Matrix4,q=new h.Matrix4,p=new h.Matrix4,r=new h.Matrix4,t=new h.Matrix4,u=new h.Vector3(0,0,1),v=new h.Vector3(1,1,1),w=180/Math.PI,x=Math.PI/180;return a});
define("hw","require exports pB kQ mH fU three.mod".split(" "),function(a,d,l,m,k,c,h){a=function(){function x(y){this.locked=!0;this.Dp=!1;this.aj=this.wU=this.ye=null;this.Vja=new h.Matrix4;this.EG=[];this.hg=1;this.kC=0;this.Ds=!1;this.sk=0;this.Bj=null;this.Dma=!1;this.td=new h.Vector3;this.lU=this.mU=this.nU=this.KHa=this.JHa=this.IHa=0;this.Sx=new h.Box3(new h.Vector3(-Infinity,-Infinity,-Infinity),new h.Vector3(Infinity,Infinity,Infinity));this.F=y;this.Gj=this.Gj.bind(this);this.Or=new k(this.F);
m.N.bind(l.ba,this.ze,this,!0);this.update()}x.prototype.update=function(){var y=this.F.getComponent(c.SH),z=(null===y||void 0===y?void 0:y.locked)||!1;!z&&this.locked&&(this.Dp=!0);this.locked=z;this.hg=(null===y||void 0===y?void 0:y.hg)||1;this.sk=null===y||void 0===y?void 0:y.sk;this.lC();this.properties=y.properties;this.locked||(m.setScale(this.hg),this.BS(),this.Gj());this.Dp&&(f.setFromQuaternion(m.nH),m.setPosition({pitch:f.x*v,roll:f.z*v}),this.NF(!0))};x.prototype.frame=function(y){if(!this.locked){this.Bs();
this.mV();this.NF(!1);if(!this.properties.get("controllingPosition")){this.td.copy(m.Ec);var z=this.LB=-f.setFromQuaternion(m.dg).y*v;var B=this.tS();this.Dma&&this.aj&&this.Vja.copy(this.aj.matrixWorld);this.Dma=!1;B||(B=this.Dma=this.Dha(y));B||(B=this.Cha(y));B||(B=this.uS(y));B&&(y={},m.Ec.equals(this.td)||(y.x=this.td.x,y.y=this.td.y,y.z=this.td.z),this.LB!=z&&(y.yaw=this.LB),m.setPosition(y))}this.yS();this.YK();this.Dp=!1}};x.prototype.dispose=function(){m.N.unbind(l.ba,this.ze,this);this.properties.set("userInteracting",
!1);this.lC();this.mh();this.RU([])};x.prototype.lC=function(){x.lz.forEach(function(y){var z;null===(z=this.properties)||void 0===z?void 0:z.unbind(l.G(y),this.Gj,this)}.bind(this))};x.prototype.BS=function(){x.lz.forEach(function(y){var z;null===(z=this.properties)||void 0===z?void 0:z.bind(l.G(y),this.Gj,this,!0)}.bind(this))};x.prototype.Gj=function(){this.Sx.min.set(this.properties.get("minX",-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",-Infinity));this.Sx.max.set(this.properties.get("maxX",
Infinity),this.properties.get("maxY",Infinity),this.properties.get("maxZ",Infinity))};x.prototype.NF=function(y){var z=this.properties.get("x"),B=this.properties.get("y"),D=this.properties.get("z"),F=this.properties.get("controllingPosition"),A=this.properties.get("yaw"),E=this.properties.get("pitch"),J=this.properties.get("distance");if(z!==this.IHa||B!==this.JHa||D!==this.KHa||A!==this.nU||E!==this.mU||J!==this.lU)n.identity(),n.multiply(q.makeTranslation(z,B,D)),n.multiply(q.makeRotationFromEuler(f.set(E*
w,-A*w,0,"YXZ"))),n.multiply(q.makeTranslation(0,0,J)),n.decompose(e,b,g),f.setFromQuaternion(b,"YXZ"),m.setPosition({x:e.x,y:e.y,z:e.z,yaw:!y||F?void 0:-f.y*v})};x.prototype.yS=function(){this.properties.set("x",m.Ec.x);this.properties.set("y",m.Ec.y);this.properties.set("z",m.Ec.z);f.setFromQuaternion(m.dg);this.properties.set("yaw",-f.y*v);this.properties.set("pitch",f.x*v);this.properties.set("roll",f.z*v);this.properties.set("distance",0)};x.prototype.YK=function(){this.IHa=this.properties.get("x");
this.JHa=this.properties.get("y");this.KHa=this.properties.get("z");this.nU=this.properties.get("yaw");this.mU=this.properties.get("pitch");this.lU=this.properties.get("distance")};x.prototype.Bs=function(){this.RU((x.qC.get(this.F.P)||[]).map(function(y){return y.getComponent(c.Fc)}))};x.prototype.RU=function(y){var z=[],B=[];this.EG.forEach(function(D){-1===y.indexOf(D)&&z.push(D)}.bind(this));y.forEach(function(D){-1===this.EG.indexOf(D)&&B.push(D)}.bind(this));this.aj&&-1===y.indexOf(this.aj)&&
this.mh();z.forEach(function(D){this.oU(D);this.EG.splice(this.EG.indexOf(D),1)}.bind(this));B.forEach(function(D){this.rS(D);this.EG.push(D)}.bind(this));this.ye=y.find(function(D){return D.Zi})||null;this.wU=y.find(function(D){return!D.Zi})||this.ye};x.prototype.rS=function(y){y.N.bind(l.hb,this.gs,this,!0);y.N.bind(l.ma,this.fs,this,!0)};x.prototype.oU=function(y){y.N.unbind(l.hb,this.gs,this);y.N.unbind(l.ma,this.fs,this)};x.prototype.ze=function(){this.F.J(c.qq)};x.prototype.fs=function(y){if(!(this.properties.get("inMandatorySequence")||
y.data.yT||"other"==y.data.type||this.properties.get("clickTranslationDisabled"))){var z=this.EG.find(function(B){return y.source===B.N});z&&(z=this.Or.BT(z),0!=z.length&&(this.Bj=z[0].point))}};x.prototype.gs=function(y){if(!this.properties.get("inMandatorySequence")&&!this.properties.get("mouseDisabled")){this.mh();var z=this.EG.find(function(B){return y.source===B.N});z&&(this.aj=z,this.aj.N.bind(l.Eb,this.mh,this,!0),this.Vja.copy(this.aj.matrixWorld),z=this.Or.BT(z),0!=z.length&&(this.JB=(new h.Vector3).copy(z[0].point)))}};
x.prototype.mh=function(){this.aj&&(this.aj.N.unbind(l.Eb,this.mh,this),this.JB=this.aj=null)};x.prototype.tS=function(){if(!this.Bj)return!1;this.td.copy(this.Bj).sub(m.Ec).multiplyScalar(.5).add(m.Ec);this.Bj=null;return!0};x.prototype.uS=function(y){return this.vS()?!0:this.wS(y)?!0:!1};x.prototype.vS=function(){var y=this.wU;if(!y)return!1;if(0===y.Xb.y&&0===y.Xb.x)return this.kC=Date.now(),this.Ds=!1;if(this.Ds)return!0;var z=Math.sqrt(y.Xb.y*y.Xb.y+y.Xb.x*y.Xb.x),B=Math.atan2(-y.Xb.y,y.Xb.x);
y=Math.abs(B)<.25*Math.PI;B=Math.abs(B)>.75*Math.PI;return 0!==this.sk&&.95<z&&(y||B)&&100>Date.now()-this.kC?(this.Ds=!0,this.LB+=this.sk*(B?-1:1),!0):!1};x.prototype.wS=function(y){if(!this.ye||0===this.ye.Xb.y&&0===this.ye.Xb.x)return!1;y=1E4/3600/this.hg*this.properties.get("translationSpeed",1)*(this.ye.jH?3:1)*y/1E3;this.ye.matrixWorld.decompose(e,b,g);var z=e.set(0,0,-1).applyQuaternion(b),B=g.set(1,0,0).applyQuaternion(b);z.normalize().multiplyScalar(-this.ye.Xb.y*y);B.normalize().multiplyScalar(this.ye.Xb.x*
y);this.td.set(m.Ec.x+z.x+B.x,m.Ec.y+z.y+B.y,m.Ec.z+z.z+B.z);return!0};x.prototype.Cha=function(){if(!this.aj)return!1;var y=this.rCa(n.copy(this.Vja)),z=this.rCa(q.copy(this.aj.matrixWorld));z=r.copy(p.compose(m.Ec,m.dg,u)).invert().multiply(z);t.copy(y).multiply(z.invert()).decompose(this.td,b,e);this.LB=-f.setFromQuaternion(b).y*v;return!0};x.prototype.rCa=function(y){return y.decompose(e,b,g).compose(e,b.identity(),g)};x.prototype.Dha=function(y){if(!this.aj||!this.JB||0===this.aj.Xb.y&&0===this.aj.Xb.x)return!1;
y=90*y/1E3;var z=n.compose(m.Ec,m.dg,u),B=q.identity();B.multiply(p.makeTranslation(this.JB.x,this.JB.y,this.JB.z));B.multiply(p.makeRotationY(-this.LB*w));B.multiply(p.makeRotationFromEuler(f.set(this.aj.Xb.y*y*w,this.aj.Xb.x*y*w,0,"YXZ")));B.multiply(p.makeRotationY(this.LB*w));B.multiply(p.makeTranslation(-this.JB.x,-this.JB.y,-this.JB.z));z.premultiply(B);z.decompose(this.td,b,e);this.LB=-f.setFromQuaternion(b).y*v;return!0};x.prototype.mV=function(){this.properties.get("inMandatorySequence")?
this.properties.set("userInteracting",!1):this.aj?this.properties.set("userInteracting",!0):this.Bj?this.properties.set("userInteracting",!0):!this.ye||0===this.ye.Xb.y&&0===this.ye.Xb.x?this.properties.set("userInteracting",!1):this.properties.set("userInteracting",!0)};x.YG=function(y,z){this.qC.set(y,z)};x.$a=function(y){y.I(c.qq).manager=new x(y)};x.update=function(y){y.getComponent(c.qq).manager.update()};x.frame=function(y,z,B){y.getComponent(c.qq).manager.frame(z,B)};x.Ca=function(y){var z=
y.getComponent(c.qq);z.manager.dispose();z.manager=null;y.ia(c.qq)};x.qC=new Map;x.lz="minX maxX minY maxY minZ maxZ".split(" ");return x}();var f=new h.Euler(0,0,0,"YXZ");new h.Euler(0,0,0,"YXZ");var b=new h.Quaternion,e=new h.Vector3,g=new h.Vector3,n=new h.Matrix4,q=new h.Matrix4,p=new h.Matrix4,r=new h.Matrix4,t=new h.Matrix4,u=new h.Vector3(1,1,1),v=180/Math.PI,w=Math.PI/180;return a});
define("dP","require exports pB kQ mH fU three.mod".split(" "),function(a,d,l,m,k,c,h){a=function(){function r(t){this.locked=!0;this.Dp=!1;this.wU=this.zy=this.Jp=null;this.hg=1;this.kC=0;this.Ds=!1;this.sk=0;this.Bj=null;this.td=new h.Vector3;this.YS=[];this.rs=new h.Vector3;this.Sx=new h.Box3(new h.Vector3(-Infinity,-Infinity,-Infinity),new h.Vector3(Infinity,Infinity,Infinity));this.F=t;this.Gj=this.Gj.bind(this);this.Or=new k(this.F);m.N.bind(l.ba,this.ze,this,!0);this.update()}r.prototype.update=
function(){var t=this.F.getComponent(c.TH),u=(null===t||void 0===t?void 0:t.locked)||!1;!u&&this.locked&&(this.Dp=!0);this.locked=u;this.hg=(null===t||void 0===t?void 0:t.hg)||1;this.sk=null===t||void 0===t?void 0:t.sk;this.lC();this.properties=t.properties;this.locked||(m.setScale(this.hg),this.BS(),this.Gj());this.Dp&&(f.setFromQuaternion(m.nH),m.setPosition({x:this.properties.get("x"),y:this.properties.get("y"),z:this.properties.get("z"),yaw:this.properties.get("yaw"),pitch:f.x*p,roll:f.z*p}))};
r.prototype.lC=function(){r.lz.forEach(function(t){var u;null===(u=this.properties)||void 0===u?void 0:u.unbind(l.G(t),this.Gj,this)}.bind(this))};r.prototype.BS=function(){r.lz.forEach(function(t){var u;null===(u=this.properties)||void 0===u?void 0:u.bind(l.G(t),this.Gj,this,!0)}.bind(this))};r.prototype.Gj=function(){this.Sx.min.set(this.properties.get("minX",-Infinity),this.properties.get("minY",-Infinity),this.properties.get("minZ",-Infinity));this.Sx.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.Bs(),this.mV(),this.NF(),this.properties.get("controllingPosition")||(this.td.copy(m.Ec),this.tS()||this.uS(t),this.td.y=this.IBa(this.rs.y,this.m3(this.td.x,this.td.y,this.td.z),t),this.c5a()&&(this.td.copy(this.rs),this.td.y=this.IBa(this.rs.y,this.m3(this.td.x,this.td.y,this.td.z),t)),this.Sx.clampPoint(this.td,this.td),m.Ec.equals(this.td)||m.setPosition({x:this.td.x,y:this.td.y,
z:this.td.z,Ra:void 0})),this.yS(),this.YK(),this.e$a(),this.Dp=!1)};r.prototype.e$a=function(){this.Or.refresh();this.YS.forEach(function(t){t.y=NaN})};r.prototype.dispose=function(){m.N.unbind(l.ba,this.ze,this);this.properties.set("userInteracting",!1);this.lC()};r.prototype.NF=function(){var t=this.properties.get("x"),u=this.properties.get("y"),v=this.properties.get("z");if(this.rs.x!==t||this.rs.y!==u||this.rs.z!==v)this.properties.get("controllingPosition")||(u=this.m3(t,u,v)),m.setPosition({x:t,
y:u,z:v,yaw:void 0}),this.YK()};r.prototype.yS=function(){this.properties.set("x",m.Ec.x);this.properties.set("y",m.Ec.y);this.properties.set("z",m.Ec.z);f.setFromQuaternion(m.dg);this.properties.set("yaw",-f.y*p);this.properties.set("pitch",f.x*p);this.properties.set("roll",f.z*p)};r.prototype.YK=function(){this.rs.copy(m.Ec);this.HHa=this.Mia(this.rs)};r.prototype.Bs=function(){var t=null,u=null;(r.qC.get(this.F.P)||[]).forEach(function(v){v=v.getComponent(c.Fc);v.Zi?t=v:u=v});this.Nab(t,u)};r.prototype.Nab=
function(t,u){this.Jp=t;this.wU=u;t=t?t.N:null;this.zy!==t&&(this.zy&&this.oU(this.zy),(this.zy=t)&&this.rS(this.zy))};r.prototype.rS=function(t){t.bind(l.ma,this.fs,this,!0)};r.prototype.oU=function(t){t.unbind(l.ma,this.fs,this)};r.prototype.ze=function(){this.F.J(c.rq)};r.prototype.fs=function(t){if(this.Jp&&this.properties&&!this.properties.get("inMandatorySequence")&&!t.data.yT&&"other"!=t.data.type&&!this.properties.get("clickTranslationDisabled")&&"translate"==this.properties.get("doubleClickAction")&&
(t=this.Or.BT(this.Jp),0!=t.length)){var u=t[0];if(u.face&&u.face.normal){t=b.copy(m.Ec);var v=e.copy(u.point);u=g.copy(u.face.normal).transformDirection(u.object.matrixWorld);if(Math.abs(Math.acos(u.dot(q)))<.25*Math.PI)v.y+=this.d3();else{u=n.copy(v).sub(t);var w=u.length(),x=.5*this.d3();if(w<x)return;v.sub(u.multiplyScalar(x/w))}v.y=this.m3(v.x,v.y,v.z);this.Or.gH(t,v)||(this.Bj=new h.Vector3(v.x,v.y,v.z))}}};r.prototype.tS=function(){if(!this.Bj)return!1;this.td.copy(this.Bj);this.Bj=null;return!0};
r.prototype.uS=function(t){return this.vS()?!0:this.wS(t)?!0:!1};r.prototype.vS=function(){var t=this.wU;if(!t)return!1;if(0===t.Xb.y&&0===t.Xb.x)return this.kC=Date.now(),this.Ds=!1;if(this.Ds)return!0;var u=Math.sqrt(t.Xb.y*t.Xb.y+t.Xb.x*t.Xb.x),v=Math.atan2(-t.Xb.y,t.Xb.x);t=Math.abs(v)<.25*Math.PI;v=Math.abs(v)>.75*Math.PI;return 0!==this.sk&&.95<u&&(t||v)&&100>Date.now()-this.kC?(this.Ds=!0,u=this.sk*(v?-1:1),u=-f.setFromQuaternion(m.dg,"YXZ").y*p+u,m.setPosition({x:void 0,y:void 0,z:void 0,
yaw:u}),!0):!1};r.prototype.wS=function(t){if(!this.Jp||0===this.Jp.Xb.y&&0===this.Jp.Xb.x)return!1;t=4E3/3600/this.hg*this.properties.get("translationSpeed",1)*(this.Jp.jH?3:1)*t/1E3;var u=b.set(0,0,-1).applyQuaternion(m.dg),v=e.crossVectors(u,q);u.y=0;v.y=0;u.normalize().multiplyScalar(-this.Jp.Xb.y*t);v.normalize().multiplyScalar(this.Jp.Xb.x*t);this.td.set(m.Ec.x+u.x+v.x,m.Ec.y,m.Ec.z+u.z+v.z);return!0};r.prototype.mV=function(){this.properties.get("inMandatorySequence")?this.properties.set("userInteracting",
!1):this.Bj?this.properties.set("userInteracting",!0):!this.Jp||0===this.Jp.Xb.y&&0===this.Jp.Xb.x?this.properties.set("userInteracting",!1):this.properties.set("userInteracting",!0)};r.prototype.c5a=function(){if(!this.properties.get("collisionDetection"))return!1;var t=b,u=e;t.copy(this.td).sub(this.rs);u.copy(this.rs).add(t.setLength(t.length()+.2/this.hg));if(this.Or.gH(this.rs,u))return!0;t=this.properties.get("maxStepHeight");void 0===t&&(t=.25*this.d3());u=this.Mia(this.td);return-Infinity<
this.HHa&&-Infinity<u&&this.HHa+t<u?!0:!1};r.prototype.IBa=function(t,u,v){var w=u-t,x=Math.abs(w);v=2/this.hg*(v/1E3);return v>x?u:t+w*v/x};r.prototype.m3=function(t,u,v){t=this.Dp?-Infinity:this.Mia(b.set(t,u,v));return-Infinity===t?u:t+this.d3()};r.prototype.Mia=function(t){var u=this.YS.findIndex(function(w){return w.x==t.x&&w.z==t.z&&!isNaN(w.y)});if(-1!==u)return this.YS[u].y;u=this.Or.RS(t);var v=this.YS.find(function(w){return isNaN(w.y)});v||this.YS.push(v=new h.Vector3);v.set(t.x,t.y-u,
t.z);return v.y};r.prototype.d3=function(){return m.aCa/this.hg};r.YG=function(t,u){this.qC.set(t,u)};r.$a=function(t){t.I(c.rq).manager=new r(t)};r.update=function(t){t.getComponent(c.rq).manager.update()};r.frame=function(t,u,v){t.getComponent(c.rq).manager.frame(u,v)};r.Ca=function(t){var u=t.getComponent(c.rq);u.manager.dispose();u.manager=null;t.ia(c.rq)};r.qC=new Map;r.lz="minX maxX minY maxY minZ maxZ".split(" ");return r}();var f=new h.Euler(0,0,0,"YXZ"),b=new h.Vector3,e=new h.Vector3,g=
new h.Vector3,n=new h.Vector3,q=new h.Vector3(0,1,0),p=180/Math.PI;return a});
define("hz","require lV mf fU mH fh pm dX cg oX id kV hw dP".split(" "),function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("mH"),c=a("fh"),h=a("pm"),f=a("dX"),b=a("cg"),e=a("oX"),g=a("id"),n=a("kV"),q=a("hw"),p=a("dP");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(r,t){(this.bka.Nd.length||this.bka.pg.length)&&k.Aab(this.bka.u);this.cCa.u.length&&this.cCa.u.slice().forEach(c.$a);this.l2.Ea.length&&this.l2.Ea.slice().forEach(c.update);this.l2.u.length&&this.l2.u.slice().forEach(function(u){c.frame(u,
r,t)});this.dCa.u.length&&this.dCa.u.slice().forEach(c.Ca);this.oDa.u.length&&this.oDa.u.slice().forEach(b.$a);this.ZS.Ea.length&&this.ZS.Ea.slice().forEach(b.update);this.ZS.u.length&&this.ZS.u.slice().forEach(function(u){b.frame(u,r,t)});this.pDa.u.length&&this.pDa.u.slice().forEach(b.Ca);this.gDa.u.length&&this.gDa.u.slice().forEach(f.$a);this.XS.Ea.length&&this.XS.Ea.slice().forEach(f.update);this.XS.u.length&&this.XS.u.slice().forEach(function(u){f.frame(u,r,t)});this.hDa.u.length&&this.hDa.u.slice().forEach(f.Ca);
this.iDa.u.length&&this.iDa.u.slice().forEach(f.Ca);this.ZGa.u.length&&this.ZGa.u.slice().forEach(e.$a);this.aU.Ea.length&&this.aU.Ea.slice().forEach(e.update);this.aU.u.length&&this.aU.u.slice().forEach(function(u){e.frame(u,r,t)});this.$Ga.u.length&&this.$Ga.u.slice().forEach(e.Ca);p.YG(this.P,this.Ij.u.slice());this.sLa.u.length&&this.sLa.u.slice().forEach(p.$a);this.rV.Ea.length&&this.rV.Ea.slice().forEach(p.update);this.rV.u.length&&this.rV.u.slice().forEach(function(u){p.frame(u,r,t)});this.tLa.u.length&&
this.tLa.u.slice().forEach(p.Ca);this.uLa.u.length&&this.uLa.u.slice().forEach(p.Ca);n.YG(this.P,this.Ij.u.slice());this.lLa.u.length&&this.lLa.u.slice().forEach(n.$a);this.pV.Ea.length&&this.pV.Ea.slice().forEach(n.update);this.pV.u.length&&this.pV.u.slice().forEach(function(u){n.frame(u,r,t)});this.mLa.u.length&&this.mLa.u.slice().forEach(n.Ca);this.nLa.u.length&&this.nLa.u.slice().forEach(n.Ca);q.YG(this.P,this.Ij.u.slice());this.oLa.u.length&&this.oLa.u.slice().forEach(q.$a);this.qV.Ea.length&&
this.qV.Ea.slice().forEach(q.update);this.qV.u.length&&this.qV.u.slice().forEach(function(u){q.frame(u,r,t)});this.pLa.u.length&&this.pLa.u.slice().forEach(q.Ca);this.qLa.u.length&&this.qLa.u.slice().forEach(q.Ca);this.BKa.u.length&&this.BKa.u.slice().forEach(g.$a);this.EM.Ea.length&&this.EM.Ea.slice().forEach(g.update);this.EM.Nd.length&&this.EM.Nd.slice().forEach(g.update);this.EM.u.length&&this.EM.u.slice().forEach(function(u){g.frame(u,r,t)});this.CKa.u.length&&this.CKa.u.slice().forEach(g.Ca);
this.DKa.u.length&&this.DKa.u.slice().forEach(g.Ca);if(this.Xx.Nd.length||this.Xx.pg.length)h.mla(this.Xx.u),this.XS.u.slice().forEach(f.update),this.ZS.u.slice().forEach(b.update),this.aU.u.slice().forEach(e.update),this.pV.u.slice().forEach(n.update),this.qV.u.slice().forEach(q.update),this.rV.u.slice().forEach(p.update)};a.H={};a.H.Ij=[m.Fc];a.H.Xx=[m.Al];a.H.bka=[m.SC];a.H.gDa=[m.NC,m.zk.not,m.Js.not];a.H.XS=[m.NC,m.zk.not,m.Js];a.H.hDa=[m.NC.not,m.Js];a.H.iDa=[m.zk,m.Js];a.H.BKa=[m.Bv,m.Pj,m.Ys.not];
a.H.EM=[m.Bv,m.Pj,m.Ys];a.H.CKa=[m.Pj.not,m.Ys];a.H.DKa=[m.Bv.not,m.Ys];a.H.sLa=[m.zk,m.TH,m.rq.not];a.H.rV=[m.zk,m.TH,m.rq];a.H.tLa=[m.TH.not,m.rq];a.H.uLa=[m.zk.not,m.rq];a.H.lLa=[m.zk,m.RH,m.pq.not];a.H.pV=[m.zk,m.RH,m.pq];a.H.mLa=[m.RH.not,m.pq];a.H.nLa=[m.zk.not,m.pq];a.H.oLa=[m.zk,m.SH,m.qq.not];a.H.qV=[m.zk,m.SH,m.qq];a.H.pLa=[m.SH.not,m.qq];a.H.qLa=[m.zk.not,m.qq];a.H.oDa=[m.OC,m.ov.not];a.H.ZS=[m.OC,m.ov];a.H.pDa=[m.OC.not,m.ov];a.H.ZGa=[m.UC,m.vv.not];a.H.aU=[m.UC,m.vv];a.H.$Ga=[m.UC.not,
m.vv];a.H.cCa=[m.xH,m.ev.not];a.H.l2=[m.xH,m.ev];a.H.dCa=[m.xH.not,m.ev];return a});
define("ic","require exports three.mod fU mf kQ".split(" "),function(a,d,l,m,k,c){a=function(p){function r(){var t=p.call(this)||this;t.zf=t.zf.bind(t);return t}Z(r,p);r.prototype.Wc=function(){this.u.u.length&&this.u.u.slice().forEach(this.zf)};r.prototype.zf=function(t){var u=t.getComponent(m.Object3D);if(u&&u.qa&&u.qa.parent){u=u.qa;var v=t.getComponent(m.wH);if(v.La){var w=v.La,x=w.getComponent(m.PerspectiveCamera);(w=w.getComponent(m.Object3D))&&w.qa&&(w=w.qa,w.updateMatrixWorld(!0),x.nl?(b.copy(c.Ec),
n.copy(c.dg)):w.matrixWorld.decompose(b,n,g),v.rotate||n.identity(),h.copy(u.parent.matrixWorld).invert(),f.compose(b,n,g.set(1,1,1)).premultiply(h),f.decompose(b,n,g.set(1,1,1)),e.setFromQuaternion(n,"YXZ"),t=t.J(m.va),t.translationX=b.x,t.translationY=b.y,t.Je=b.z,t.Rd=0,t.ud=e.y*q,t.He=0)}}};r.H={};return r}(k);a.H={};a.H.u=[m.wH,m.Object3D,m.va];var h=new l.Matrix4,f=new l.Matrix4,b=new l.Vector3,e=new l.Euler,g=new l.Vector3,n=new l.Quaternion,q=180/Math.PI;return a});
define("jp",["require","fU","cv"],function(a){function d(k){this.m=k;this.iza=this.ya=null;this.wa=this.sa=void 0;this.update()}var l=a("fU"),m=a("cv");d.prototype.update=function(){var k=this.m.getComponent(l.hf),c=k.source&&k.source.width||0,h=k.source&&k.source.height||0;!this.ya||!!this.ya.isSpriteMaterial==k.isSprite&&this.sa==c&&this.wa==h||(this.ya.map.dispose(),this.ya.dispose(),this.ya=null);this.sa=c;this.wa=h;this.ya||(k.isSprite?(this.ya=new THREE.SpriteMaterial,this.ya.sizeAttenuation=
!1):this.ya=new THREE.MeshBasicMaterial,this.ya.map=new THREE.Texture,this.ya.transparent=!0,this.m.I(l.Material).material=this.ya);this.ya.map.image!=k.source&&(this.ya.map.image=k.source,this.ya.map.needsUpdate=!0);this.iza!=k.bH&&(this.iza=k.bH,this.ya.map.needsUpdate=!0);this.ya.opacity=k.opacity||0;this.ya.depthTest=!!k.depthTest;this.ya.visible=0<this.ya.opacity&&!k.hidden;this.ya.needsUpdate=!0;if(k.colorSpace)var f=k.colorSpace;else(k=m.qf(this.m))&&(f=m.nT(k));this.ya.map&&f&&(this.ya.map.colorSpace=
f);this.m.P.Ta()};d.prototype.dispose=function(){this.ya&&(this.ya.map.dispose(),this.ya.map=null,this.ya.dispose(),this.ya=null,this.m.ia(l.Material));this.m=null};d.$a=function(k){k.I(l.cz).manager=new d(k)};d.Ca=function(k){var c=k.getComponent(l.cz);c.manager.dispose();c.manager=null;k.ia(l.cz)};d.update=function(k){k.getComponent(l.cz).manager.update()};return d});
define("iP",["require","lV","mf","fU","jp"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("jp");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.Jm.u.length&&this.Jm.u.slice().forEach(k.$a);this.materials.Ea.length&&this.materials.Ea.slice().forEach(k.update);this.Km.u.length&&this.Km.u.slice().forEach(k.Ca)};a.H={};a.H.Jm=[m.hf,m.cz.not];a.H.materials=[m.hf,m.cz];a.H.Km=[m.hf.not,m.cz];return a});
define("oF",["require","exports","three.mod","cv"],function(a,d,l,m){a=function(){function e(g){this.light=g;g=new l.EdgesGeometry(new l.PlaneGeometry(2,2));var n=new l.LineBasicMaterial({color:16711680,linewidth:1,depthTest:!1,transparent:!0});this.Eg=new l.LineSegments(g,n);g=(new l.BufferGeometry).setFromPoints([new l.Vector3,new l.Vector3]);n=new l.LineBasicMaterial({color:65280,depthTest:!1,transparent:!0});this.line=new l.Line(g,n);this.light.add(this.Eg);this.light.add(this.line)}e.prototype.update=
function(){var g=this.qf();this.Eg.parent!=g&&(this.Eg.parent&&(this.Eg.parent.remove(this.Eg),this.line.parent.remove(this.line)),g&&(g.add(this.Eg),g.add(this.line)));if(g){this.Eg.material.color!=this.light.color&&(this.Eg.material.color=this.light.color,this.Eg.material.needsUpdate=!0,this.line.material.color=this.light.color,this.line.material.needsUpdate=!0);this.light.updateMatrixWorld(!0);k.setFromMatrixPosition(this.light.matrixWorld);this.light.target.updateMatrixWorld(!0);c.setFromMatrixPosition(this.light.target.matrixWorld);
h.copy(c).sub(k).normalize();b.y=Math.atan2(h.x,h.z);b.x=-Math.atan2(h.y,Math.sqrt(h.x*h.x+h.z*h.z));b.z=0;b.order="YXZ";f.setFromEuler(b);g=m.yB(g);this.Eg.quaternion.copy(f);var n=m.fG(this.line)*g*2/7;h.setLength(n).multiplyScalar(-1);n=this.line.geometry.attributes.position;n.setXYZ(0,0,0,0);n.setXYZ(1,h.x,h.y,h.z);n.needsUpdate=!0;this.Eg.position.copy(h);this.Eg.updateMatrixWorld(!0);g=m.fG(this.Eg)*g/7;this.Eg.scale.set(g,g,g);this.Eg.updateMatrixWorld(!0)}};e.prototype.dispose=function(){this.Eg.geometry.dispose();
this.Eg.material.dispose();this.Eg.parent&&this.Eg.parent.remove(this.Eg);this.line.geometry.dispose();this.line.material.dispose();this.line.parent&&this.line.parent.remove(this.line)};e.prototype.qf=function(){for(var g=this.light.parent;g&&!g.isScene;)g=g.parent;return g};return e}();var k=new l.Vector3,c=new l.Vector3,h=new l.Vector3,f=new l.Quaternion,b=new l.Euler;return a});
define("hr","require exports three.mod oq fU mf cv oF".split(" "),function(a,d,l,m,k,c,h,f){function b(n,q){q.makeEmpty();var p=new l.Box3;n.traverse(function(r){if(r.geometry&&!r.isSprite&&!r.isLine){r.updateWorldMatrix(!1,!1);var t=r.geometry;null===t.boundingBox&&t.computeBoundingBox();p.copy(t.boundingBox);p.applyMatrix4(r.matrixWorld);q.union(p)}});return q}a=function(n){function q(){var p=n.call(this)||this;p.Wb=p.Wb.bind(p);p.Ib=p.Ib.bind(p);p.zf=p.zf.bind(p);p.kb=p.kb.bind(p);return p}Z(q,
n);q.prototype.Wc=function(){this.EB.u.length&&this.EB.u.slice().forEach(this.Wb);this.FB.u.length&&this.FB.u.slice().forEach(this.kb);this.Nh.Ea.length&&this.Nh.Ea.slice().forEach(this.Ib);this.Nh.u.length&&this.Nh.u.slice().forEach(this.zf)};q.prototype.Wb=function(p){var r=p.I(k.Up),t=p.I(k.Object3D);r.light=t.qa=new l.DirectionalLight;this.Ib(p)};q.prototype.Ib=function(p){var r=p.getComponent(k.DirectionalLight),t=p.getComponent(k.Up),u=t.light;u.color=m.Qp(r.color).convertLinearToSRGB();u.intensity=
r.intensity*Math.PI;u.visible=0<u.intensity;u.castShadow=0<u.intensity&&r.castShadow;var v=u.castShadow?r.Rla: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.Sla;u.shadow.bias=r.Qla;r.PS!=!!t.bo&&(t=p.J(k.Up),r.PS?t.bo=new f(u):(t.bo.dispose(),t.bo=null))};q.prototype.zf=function(p){this.Ucb(p);this.rma(p)};q.prototype.Ucb=function(p){var r=p.getComponent(k.DirectionalLight);if((p=p.getComponent(k.Up).light)&&
p.castShadow){var t=h.Xc(r.target);if(t){var u=p.shadow.camera,v=b(t,e);t=Number.POSITIVE_INFINITY;for(var w=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,z=Number.POSITIVE_INFINITY,B=Number.NEGATIVE_INFINITY,D=0;2>D;D++)for(var F=0;2>F;F++)for(var A=0;2>A;A++)g.set(0==D?v.min.x:v.max.x,0==F?v.min.y:v.max.y,0==A?v.min.z:v.max.z).applyMatrix4(u.matrixWorldInverse),g.x<t&&(t=g.x),g.x>w&&(w=g.x),g.y>x&&(x=g.y),g.y<y&&(y=g.y),-g.z>B&&(B=-g.z),-g.z<z&&(z=-g.z);r=r.Abb||
0;v=.5*(z+B);z+=(z-v)*r;B+=(B-v)*r;v=.5*(t+w);t+=(t-v)*r;w+=(w-v)*r;v=.5*(x+y);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!=B)p.shadow.camera.left=t,p.shadow.camera.top=x,p.shadow.camera.right=w,p.shadow.camera.bottom=y,p.shadow.camera.near=z,p.shadow.camera.far=B,p.shadow.camera.updateProjectionMatrix(),p.shadow.needsUpdate=!0}}};q.prototype.rma=function(p){(p=(p=p.getComponent(k.Up))&&p.bo)&&p.update()};q.prototype.kb=function(p){var r=p.getComponent(k.Up),
t=r&&r.bo;t&&t.dispose();(r=r.light)&&r.parent&&r.parent.remove(r);p.ia(k.Up);p.ia(k.Object3D)};q.H={};return q}(c);a.H={};a.H.EB=[k.DirectionalLight,k.Up.not];a.H.Nh=[k.DirectionalLight,k.Up];a.H.FB=[k.DirectionalLight.not,k.Up];var e=new l.Box3,g=new l.Vector3;return a});
define("el",["require","pB","fU","cv","bi"],function(a){function d(x){this.Qg=x;this.ue=this.rn=null;this.iO=!1;this.update()}var l=a("pB"),m=a("fU"),k=a("cv"),c=a("bi");d.prototype.update=function(){var x=this.Qg.getComponent(m.Fc);this.cR(x&&x.enabled?x.ZF:null);this.bR(x&&x.enabled?x.z2:null)};d.prototype.frame=function(){this.yf()};d.prototype.cR=function(x){this.rn!=x&&(this.rn&&this.rn.unbind(l.Pb,this.Pf,this,!0),(this.rn=x)&&this.rn.bind(l.Pb,this.Pf,this,!0))};d.prototype.bR=function(x){this.ue!=
x&&(this.ue&&this.iO&&this.ue.pop(c.Wh),(this.ue=x)&&this.iO&&this.ue.push(c.Wh))};d.prototype.Pf=function(){var x=v.get(this.Qg.P);x&&0!=x.length&&this.Qg.P.Ta()};d.prototype.yf=function(){var x=v.get(this.Qg.P),y=x&&x.length||0;this.zya(0<y);if(0!=y&&(y=this.Qg.getComponent(m.Fc))){var z=k.Xc(this.Qg);z?(h.copy(y.origin).applyMatrix4(z.matrixWorld),f.copy(y.origin).add(y.direction).applyMatrix4(z.matrixWorld).sub(h).normalize()):(h.copy(y.origin),f.copy(y.direction).normalize());for(y=0;y<x.length;y++){z=
x[y];var B=z.getComponent(m.hv),D=z.getComponent(m.dz),F=w.get(z);F&&B&&D&&(D.PCa||(D.PCa=(new THREE.Vector3).setFromMatrixPosition(F.matrixWorld)),b.copy(D.PCa),e.copy(B.direction),this.VTa(b,e,h,f,g),D.oia||(D.oia=(new THREE.Vector3).copy(g).sub(b)),g.sub(D.oia),B.min&&0>n.copy(g).sub(B.min).dot(B.direction)&&g.copy(B.min),g.applyMatrix4(q.copy(F.parent.matrixWorld).invert()),z=z.J(m.va),p.multiply(q.makeTranslation(z.translationX,z.translationY,z.Je).invert()),p.multiply(q.makeRotationFromEuler(r.set(z.Rd*
u,z.ud*u,z.He*u,z.Ge)).invert()),g.applyMatrix4(q),z.positionX=g.x,z.positionY=g.y,z.positionZ=g.z)}}};d.prototype.zya=function(x){this.iO!=x&&(this.iO=x,this.ue&&(this.iO?this.ue.push(c.Wh):this.ue.pop(c.Wh)))};d.prototype.VTa=function(x,y,z,B,D){t.copy(x).sub(z);z=y.dot(B);var F=B.dot(B),A=y.dot(y);B=t.dot(B);var E=t.dot(y);D.copy(x);x=z*z-F*A;0!=x&&D.addScaledVector(y,(F*E-B*z)/x)};var h=new THREE.Vector3,f=new THREE.Vector3,b=new THREE.Vector3,e=new THREE.Vector3,g=new THREE.Vector3,n=new THREE.Vector3,
q=new THREE.Matrix4,p=new THREE.Matrix4,r=new THREE.Euler,t=new THREE.Vector3,u=Math.PI/180;d.prototype.dispose=function(){this.zya(!1);this.cR(null);this.bR(null);this.m=null};d.Nla=function(x){x.I(m.xv).manager=new d(x)};d.fma=function(x){var y=x.getComponent(m.xv);y.manager.dispose();y.manager=null;x.ia(m.xv)};d.Bs=function(x){x.getComponent(m.xv).manager.update()};d.frame=function(x){x.getComponent(m.xv).manager.frame()};var v=new Map,w=new Map;d.nbb=function(x){x.I(m.dz);x.I(m.Al);d.TKa(x)};
d.TKa=function(x){var y=k.Xc(x);w.set(x,y);var z=v.get(x.P);z||v.set(x.P,z=[]);y&&(y=z,0>y.indexOf(x)&&y.push(x))};d.gKa=function(x){var y=v.get(x.P),z=y.indexOf(x);0<=z&&y.splice(z,1);w["delete"](x);x.ia(m.dz);x.ia(m.Al)};return d});
define("lF",["require","lV","mf","fU","el"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("el");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.fU.u.length&&this.fU.u.slice().forEach(k.Nla);this.Ij.Ea.length&&this.Ij.Ea.slice().forEach(k.Bs);this.Ij.u.length&&this.Ij.u.slice().forEach(k.frame);this.gU.u.length&&this.gU.u.slice().forEach(k.fma);this.OCa.u.length&&this.OCa.u.slice().forEach(k.nbb);this.NCa.u.length&&this.NCa.u.slice().forEach(k.TKa);this.QCa.u.length&&
this.QCa.u.slice().forEach(k.gKa);this.RCa.u.length&&this.RCa.u.slice().forEach(k.gKa)};a.H={};a.H.fU=[m.Fc,m.xv.not];a.H.Ij=[m.Fc,m.xv];a.H.gU=[m.Fc.not,m.xv];a.H.OCa=[m.Object3D,m.hv,m.dz.not];a.H.NCa=[m.Object3D,m.hv,m.dz];a.H.QCa=[m.Object3D.not,m.dz];a.H.RCa=[m.hv.not,m.dz];return a});
define("gP","require exports three.mod oq fU mf".split(" "),function(a,d,l,m,k,c){a=function(b){function e(){var g=b.call(this)||this;g.Wb=g.Wb.bind(g);g.Ib=g.Ib.bind(g);g.kb=g.kb.bind(g);g.zf=g.zf.bind(g);return g}Z(e,b);e.prototype.Wc=function(){this.mDa.u.length&&this.mDa.u.slice().forEach(this.Wb);this.nDa.u.length&&this.nDa.u.slice().forEach(this.kb);this.P2.Ea.length&&this.P2.Ea.slice().forEach(this.Ib);this.P2.u.length&&this.P2.u.slice().forEach(this.zf)};e.prototype.Wb=function(g){var n=g.I(k.mv),
q=g.I(k.Object3D);n.floor=q.qa=this.I4a();this.hV(g,!0)};e.prototype.Ib=function(g){this.hV(g)};e.prototype.kb=function(g){var n=g.getComponent(k.mv).floor;n.parent&&n.parent.remove(n);n.geometry.dispose();n.material.dispose();g.ia(k.mv);g.ia(k.Object3D)};e.prototype.zf=function(g){this.S$a(g)};e.prototype.S$a=function(g){var n=g.getComponent(k.cq),q=(g=(g=g.getComponent(k.mv))&&g.floor)&&g.parent&&g.parent.matrixWorld;if(q){f.setFromMatrixScale(q);var p=Math.max(Math.abs(f.x),Math.abs(f.y),Math.abs(f.z));
g.matrix.identity();g.matrix.multiply(h.makeScale(n.radius/p,n.radius/p,n.radius/p));g.matrix.multiply(h.extractRotation(q).invert());g.matrix.multiply(h.makeTranslation(0,n.height/n.radius,0));g.matrix.multiply(h.makeRotationX(.5*-Math.PI));g.updateMatrixWorld(!0)}};e.prototype.I4a=function(){var g=new l.CircleGeometry(1,128);g=new l.Mesh(g);g.receiveShadow=!0;g.needsUpdate=!0;g.matrixAutoUpdate=!1;g.castShadow=!1;return g};e.prototype.hV=function(g,n){void 0===n&&(n=!1);var q=g.getComponent(k.cq);
g=g.getComponent(k.mv).floor;var p="transparent"==q.color,r=g.material&&g.material.isShadowMaterial||!1;g.material&&(n||r!=p)&&(g.material.dispose(),g.material=null);p?g.material||(g.material=new l.ShadowMaterial):(g.material||(g.material=new l.MeshStandardMaterial,g.material.defines.USE_UV="",g.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)},g.material.roughness=1,g.material.metalness=0,g.material.envMapIntensity=0,g.material.transparent=!0),g.material.color=m.Qp(q.color));g.material.needsUpdate=!0;g.material.opacity=q.opacity;g.renderOrder=q.renderOrder};e.H={};return e}(c);a.H={};a.H.mDa=[k.cq,k.mv.not];a.H.P2=[k.cq,k.mv];a.H.nDa=[k.cq.not,k.mv];var h=new l.Matrix4,f=new l.Vector3;return a});
define("lu",["require","fU","cv"],function(a){function d(w){this.m=w;this.Xda=!1}var l=a("fU"),m=a("cv");d.prototype.update=function(){this.Xda=!1};d.prototype.frame=function(){this.yf()};d.prototype.yf=function(){if(!this.Xda&&(this.Va=this.Va||m.qf(this.m))){var w=m.Xc(this.m),x=w&&w.parent;if(x&&x.matrixWorld){var y=[];this.Va.traverse(function(F){F.isSprite||F.isLine||F==w||y.push(F)});var z=this.m.J(l.nv);g.set(z.x,z.y,z.z).applyMatrix4(x.matrixWorld);e.ray.origin.set(g.x,g.y,g.z);e.ray.direction.set(0,
-1,0);var B=e.intersectObjects(y,!1);if(0!=B.length){var D=B[0];h.copy(x.matrixWorld).invert();B=this.m.J(l.va,!0);f.setFromMatrixPosition(x.matrixWorld);k.copy(D.object.matrixWorld);b.setFromMatrixPosition(k);c.copy(k).invert();!z.AT&&D.face&&D.face.normal?p.copy(D.face.normal).applyMatrix4(k).sub(b).add(f):p.copy(f).add(r);p.applyMatrix4(h).normalize();u.setFromUnitVectors(q,p);t.setFromQuaternion(u,B.Ge);B.Rd=t.x*v;B.ud=t.y*v;B.He=t.z*v;g.copy(D.point).applyMatrix4(h);B.translationX=g.x;B.translationY=
g.y;B.Je=g.z;n.setFromMatrixScale(h);x=Math.max(n.x,n.y,n.z);B.positionX=0;B.positionY=0;B.positionZ=x*z.distance;this.Xda=!0}}}};d.prototype.dispose=function(){};var k=new THREE.Matrix4,c=new THREE.Matrix4,h=new THREE.Matrix4,f=new THREE.Vector3,b=new THREE.Vector3,e=new THREE.Raycaster,g=new THREE.Vector3,n=new THREE.Vector3;new THREE.Matrix4;new THREE.Matrix4;var q=new THREE.Vector3(0,0,1),p=new THREE.Vector3,r=new THREE.Vector3(0,1,0),t=new THREE.Euler,u=new THREE.Quaternion,v=180/Math.PI;d.$a=
function(w){w.I(l.Ks).manager=new d(w)};d.Ca=function(w){var x=w.getComponent(l.Ks);x.manager.dispose();x.manager=null;w.ia(l.Ks)};d.frame=function(w){w.getComponent(l.Ks).manager.frame()};d.update=function(w){w.getComponent(l.Ks).manager.update()};return d});
define("im",["require","lV","mf","fU","lu"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("lu");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.jDa.u.length&&this.jDa.u.slice().forEach(k.$a);this.O2.Ea.length&&this.O2.u.slice().forEach(k.update);this.O2.u.length&&this.O2.u.slice().forEach(k.frame);this.kDa.u.length&&this.kDa.u.slice().forEach(k.Ca);this.lDa.u.length&&this.lDa.u.slice().forEach(k.Ca)};a.H={};a.H.jDa=[m.Object3D,m.nv,m.Ks.not];a.H.O2=[m.Object3D,
m.nv,m.Ks];a.H.kDa=[m.Object3D.not,m.Ks];a.H.lDa=[m.nv.not,m.Ks];return a});define("gH",["require","fU"],function(a){var d=a("fU");return{$a:function(l){var m=l.I(d.EH),k=l.I(d.Object3D);l.I(d.va);l=l.J(d.Group);k.qa=m.group=l.group=new THREE.Group},Ca:function(l){l.getComponent(d.EH).group=null;l.ia(d.EH);l.ia(d.Object3D)}}});
define("ma",["require","lV","mf","fU","gH"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("gH");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.yEa.u.length&&this.yEa.u.slice().forEach(k.$a);this.zEa.u.length&&this.zEa.u.slice().forEach(k.Ca)};a.H={};a.H.yEa=[m.Group,m.EH.not];a.H.zEa=[m.Group.not,m.EH];return a});
define("mM","require lV oq mf fU cv ov".split(" "),function(a){var d=a("lV"),l=a("oq"),m=a("mf"),k=a("fU");a("cv");a("ov");a=d.extend(m,function(){m.apply(this,arguments);this.Wb=this.Wb.bind(this);this.Ib=this.Ib.bind(this);this.kb=this.kb.bind(this)});a.prototype.Wc=function(){this.vEa.u.length&&this.vEa.u.slice().forEach(this.Wb);this.uEa.Ea.length&&this.uEa.Ea.slice().forEach(this.Ib);this.wEa.u.length&&this.wEa.u.slice().forEach(this.kb)};a.prototype.Wb=function(c){var h=c.getComponent(k.Ls);
h=new THREE.LineSegments(this.ACa(h),this.Qr(h));c.I(k.Object3D).qa=c.I(k.jz).grid=h};a.prototype.Ib=function(c){var h=c.getComponent(k.Ls);c=c.getComponent(k.jz).grid;c.geometry=this.ACa(h);c.material=this.Qr(h)};a.prototype.kb=function(c){var h=c.getComponent(k.jz).grid;h.material.dispose();h.geometry.dispose();c.ia(k.Object3D);c.ia(k.jz)};a.prototype.ACa=function(c){var h=l.Qp(c.kCa),f=l.Qp(c.tEa),b=c.A2/2,e=c.size/c.A2,g=c.size/2,n=[],q=[];for(let r=0,t=0,u=-g;r<=c.A2;r++,u+=e){n.push(-g,0,u,
g,0,u);n.push(u,0,-g,u,0,g);var p=r===b?h:f;p.toArray(q,t);t+=3;p.toArray(q,t);t+=3;p.toArray(q,t);t+=3;p.toArray(q,t);t+=3}c=new THREE.BufferGeometry;c.setAttribute("position",new THREE.Float32BufferAttribute(n,3));c.setAttribute("color",new THREE.Float32BufferAttribute(q,3));return c};a.prototype.Qr=function(c){var h=new THREE.LineBasicMaterial;h.depthTest=c.depthTest;h.toneMapped=!1;h.vertexColors=!0;return h};a.H={};a.H.vEa=[k.Ls,k.jz.not];a.H.uEa=[k.Ls,k.jz];a.H.wEa=[k.Ls.not,k.jz];return a});
define("bn","require lV pB lx cI gF bo".split(" "),function(a){function d(g,n,q,p){this.kja=g;this.src=g.src;this.U4=n;this.FS=q;this.T2=p;this.frameWidth=this.kja.width/this.FS;this.frameHeight=this.kja.height/this.U4}var l=a("lV"),m=a("pB"),k=a("lx");a("cI");var c=a("gF"),h=a("bo");a=l.extend(c,function(g,n,q,p,r,t,u){c.call(this);this.un=r;this.Bh=new d(g,n,q,r);this.Sxa=t;this.ola(p);this.S$=u;this.T=document.createElement("canvas");this.T.width=this.Bh.frameWidth;this.T.height=this.Bh.frameHeight;
this.Da=this.T.getContext("2d");this.Da.globalCompositeOperation="copy";this.C=k.U;this.Z_=this.ln=0;this.pX=void 0;this.fi=f.request(this.Bh);this.fi.bind(m.ba,this.Wj,this,!0);this.Wj()});a.prototype.ola=function(g){if(this.bf!==g){var n=this.IR;this.bf=g;this.IR=this.bf*this.Bh.T2;this.T$=this.IR-.1*this.bf;void 0!==n&&(this.ln=this.ln/n*this.IR)}};a.prototype.NIa=function(g){this.S$!==g&&(this.S$=g,this.Wj())};a.prototype.Qc=function(g){if(this.C!=g){if(g==k.Qb){if(this.C!=k.PLAYING)return}else g==
k.PLAYING?this.C==k.U&&(this.ln=this.Z_=0,this.Wj()):g!=k.U||0==this.ln&&0!=this.Z_||(this.ln=this.T$,this.Wj());this.C=g;h.requestFrame(this.ek,this);this.trigger(m.Ae)}};a.prototype.getState=function(){return this.C};a.prototype.ek=function(g){this.C==k.PLAYING&&(this.ln=Math.min(this.ln+g,this.fi.fi.length*this.bf),this.ln>=this.IR&&(this.Z_++,this.Sxa&&this.Z_==this.Sxa?(this.Qc(k.U),this.ln=this.T$,this.trigger(m.Gb)):(this.ln%=this.IR,this.trigger(m.lq))),this.Wj(),this.C==k.PLAYING&&h.requestFrame(this.ek,
this))};a.prototype.clear=function(){this.Qc(k.U);this.T.width=this.T.height=0;this.T=null;f.release(this.Bh);this.Bh=null};a.prototype.eg=function(){return this.T};a.prototype.Wj=function(){var g=this.S$&&this.ln>=this.T$?0:Math.floor(this.ln/this.bf);this.pX!=g&&g<this.fi.fi.length&&(this.pX=g,this.Da.drawImage(this.fi.get(this.pX),0,0),this.trigger(m.ba,{frameIndex:this.pX}))};d.prototype.isEqual=function(g){return this.src==g.src&&this.U4==g.U4&&(this.FS=g.FS)&&(this.frameWidth=g.frameWidth)&&
(this.frameHeight=g.frameHeight)&&(this.T2=g.T2)};var f={$j:[],NNa:2E3,request:function(g){g=this.Fi(g);g.Jj++;this.vza(g);return g.frames},release:function(g){g=this.Fi(g);g.Jj--;0==g.Jj&&this.c0a(g)},Fi:function(g){for(var n=0;n<this.$j.length;n++)if(this.$j[n].E5a.isEqual(g))return this.$j[n];n={};n.E5a=g;n.frames=new b(g);n.Jj=0;this.$j.push(n);return n},c0a:function(g){this.vza(g);g.hia=setTimeout(function(){f.ERa(g)},f.NNa)},vza:function(g){g.hia&&(clearTimeout(g.hia),g.hia=null)},ERa:function(g){this.$j.splice(this.$j.indexOf(g),
1);g.frames.clear()}},b=l.extend(c,function(g){c.call(this);this.Bh=g;this.fi=[];e.add(this)});b.prototype.clear=function(){e.remove(this);this.fi.forEach(function(g){g.width=0;g.height=0});this.fi=null};b.prototype.get=function(g){return this.fi[g]};b.prototype.r5a=function(){var g=this.fi.length%this.Bh.FS,n=Math.floor(this.fi.length/this.Bh.FS)%this.Bh.U4,q=document.createElement("canvas");q.width=this.Bh.frameWidth;q.height=this.Bh.frameHeight;var p=q.getContext("2d");p.globalCompositeOperation=
"copy";p.drawImage(this.Bh.kja,g*this.Bh.frameWidth,n*this.Bh.frameHeight,this.Bh.frameWidth,this.Bh.frameHeight,0,0,this.Bh.frameWidth,this.Bh.frameHeight);b.CSa(q);this.fi.push(q);this.trigger(m.ba)};b.CSa=function(){var g=document.createElement("canvas");g.width=1;g.height=1;var n=g.getContext("2d");return function(q){n.drawImage(q,0,0,1,1,0,0,1,1)}}();var e={$j:[],Rfa:null,add:function(g){this.$j.push(g);this.iya()},remove:function(g){this.$j=this.$j.filter(function(n){return n!=g})},iya:function(){this.Rfa||
(this.Rfa=setTimeout(function(){this.Rfa=null;this.jQ()}.bind(this),40))},jQ:function(){if(0!=this.$j.length){for(var g=(new Date).getTime()+10;(new Date).getTime()<g;){var n=this.$j.filter(function(q){return 0==q.fi.length});n=0<n.length?n[0]:this.$j[0];n.r5a();if(n.fi.length==n.Bh.T2&&(this.$j.splice(this.$j.indexOf(n),1),0==this.$j.length))return}this.iya()}}};return a});
define("pw",["require","pB","lx"],function(a){function d(k,c){this.Ad=k;this.uc=c;this.Ub=!1;this.m8();this.p8();this.GE()}var l=a("pB"),m=a("lx");d.prototype.clear=function(){this.rea();this.xea();this.Ad.get("autoplay")||this.Ad.set("state",m.U);this.Ad=null;this.uc.Qc(m.U);this.uc=null};d.prototype.Ze=function(k){this.Ub!=k&&(this.Ub=k,this.bu())};d.prototype.GE=function(){this.uc.Qc(this.Ad.get("state"))};d.prototype.OP=function(){this.bu()};d.prototype.QP=function(){this.uc.ola(this.Ad.get("frameDuration"))};
d.prototype.PP=function(){this.uc.NIa("first"==this.Ad.get("finalFrame"))};d.prototype.MP=function(){this.Ad.trigger(l.lq)};d.prototype.LP=function(){this.Ad.trigger(l.Gb)};d.prototype.NP=function(){this.Ad.set("state",this.uc.getState())};d.prototype.bu=function(){this.Ad.get("autoplay")&&this.uc.Qc(this.Ub?m.PLAYING:m.U)};d.prototype.m8=function(){this.Ad.bind(l.G("state"),this.GE,this,!0);this.Ad.bind(l.G("autoplay"),this.OP,this,!0);this.Ad.bind(l.G("frameDuration"),this.QP,this,!0);this.Ad.bind(l.G("finalFrame"),
this.PP,this,!0)};d.prototype.rea=function(){this.Ad.unbind(l.G("state"),this.GE,this,!0);this.Ad.unbind(l.G("autoplay"),this.OP,this,!0);this.Ad.unbind(l.G("frameDuration"),this.QP,this,!0);this.Ad.unbind(l.G("finalFrame"),this.PP,this,!0)};d.prototype.p8=function(){this.uc.bind(l.lq,this.MP,this,!0);this.uc.bind(l.Gb,this.LP,this,!0);this.uc.bind(l.Ae,this.NP,this,!0)};d.prototype.xea=function(){this.uc.unbind(l.lq,this.MP,this,!0);this.uc.unbind(l.Gb,this.LP,this,!0);this.uc.unbind(l.Ae,this.NP,
this,!0)};return d});
define("eQ",["require","pB","fq","bn","pw"],function(a){function d(h,f,b,e){this.ce=h;this.ic=f;this.Ia=b;this.Ga=e.bind(this);m.Ja("AnimatedImageResource",this.ce)?(this.uc=new k(this.ic,this.ce.get("rowCount",1),this.ce.get("colCount",1),this.ce.get("frameDuration"),this.ce.get("frameCount",this.ce.get("rowCount",1)*this.ce.get("colCount",1)),this.ce.get("repeat"),"first"==this.ce.get("finalFrame")),this.Ia.image=this.uc.eg(),this.uc.bind(l.ba,this.NO,this,!0),this.Bo=new c(this.ce,this.uc)):this.Ia.image=
this.ic;this.Ia.needsUpdate=!0;this.Ga()}var l=a("pB"),m=a("fq"),k=a("bn"),c=a("pw");d.prototype.Ze=function(h){this.Bo&&this.Bo.Ze(h)};d.prototype.dispose=function(){this.Bo&&(this.Bo.clear(),this.Bo=null);this.uc&&(this.uc.unbind(l.ba,this.NO,this,!0),this.uc.clear(),this.uc=null);this.Ia=this.ic=this.ce=null};d.prototype.NO=function(){this.Ia.needsUpdate=!0;this.Ga()};return d});
define("eV",["require"],function(){var a={},d=null;a.FDa=function(){if(!d){var l=document.createElement("canvas");l.width=128;l.height=128;l.getContext("2d").clearRect(0,0,l.width,l.height);d=l}return d};return a});
define("kU",["require","lz","nF","mN"],function(a){var d=a("lz"),l=a("nF"),m=a("mN"),k=180/Math.PI,c=Math.PI/180;return{e3:function(h,f,b,e,g,n,q){f||(f=h*e/b);g||(g=m.fz);var p={};switch(g){case m.fz:p.width=h;p.height=f;break;case m.NONE:p.width=b;p.height=e;break;case m.Uh:p.width=Math.min(f*b/e,h);p.height=Math.min(h*e/b,f);break;case m.Is:p.width=Math.max(f*b/e,h);p.height=Math.max(h*e/b,f);break;case m.bq:p.width=h;p.height=h*e/b;break;case m.xk:p.width=f*b/e,p.height=f}p.width>h?(p.Py=h/p.width,
p.eV=n==l.ab?0:n==l.ub?1-p.Py:.5*(1-p.Py),p.width=h):(p.eV=0,p.Py=1);p.height>f?(p.Ry=f/p.height,p.nV=q==l.Hc?1-p.Ry:q==l.Ac?0:.5*(1-p.Ry),p.height=f):(p.nV=0,p.Ry=1);return p},Wia:function(h,f,b,e,g,n,q,p){f||(f=d.Gm(h,b,e));g||(g=m.fz);n||(n=4096/360);var r={};switch(g){case m.fz:r.We=h;r.Cs=f;break;case m.NONE:r.We=2*Math.atan2(.5*b,45*n)*k;r.Cs=d.Gm(r.We,b,e);break;case m.Uh:r.We=Math.min(d.Sp(f,b,e),h);r.Cs=Math.min(d.Gm(h,b,e),f);break;case m.Is:r.We=Math.max(d.Sp(f,b,e),h);r.Cs=Math.max(d.Gm(h,
b,e),f);break;case m.bq:r.We=h;r.Cs=d.Gm(h,b,e);break;case m.xk:r.We=d.Sp(f,b,e),r.Cs=f}r.We>h?(r.Py=Math.tan(.5*h*c)*b/Math.tan(.5*r.We*c)/b,r.eV=q==l.ab?0:q==l.ub?1-r.Py:.5*(1-r.Py),r.We=h):(r.eV=0,r.Py=1);r.Cs>f?(r.Ry=Math.tan(.5*f*c)*e/Math.tan(.5*r.Cs*c)/e,r.nV=p==l.Hc?1-r.Ry:p==l.Ac?0:.5*(1-r.Ry),r.Cs=f):(r.nV=0,r.Ry=1);return r}}});
define("kA","require lh pB cI fq cA lS eQ eV fU pd bM kU".split(" "),function(a){function d(v){this.m=v;this.ZA=this.ZA.bind(this);this.Ga=this.Ga.bind(this);this.Vi=this.Vi.bind(this);v=v.getComponent(g.Bl);this.eh=v.Ep;this.ne=v.N;this.ce=this.o=null;this.KVa=v.isSprite;this.zg=!1;this.pn=this.fb=null;this.mw=0;this.nfa=this.g$=this.Mb=this.GX=this.V=void 0;this.Yea(v.v3);this.Ti(v.properties)}var l=a("lh"),m=a("pB"),k=a("cI"),c=a("fq"),h=a("cA"),f=a("lS"),b=a("eQ"),e=a("eV"),g=a("fU"),n=a("pd"),
q=a("bM"),p=a("kU"),r=["height","scaleMode","width"],t=["levels.url","levels.width","levels.height"],u="depthTest enabled encoding hidden side opacity".split(" ");d.prototype.frame=function(v){var w=this.m.getComponent(g.Bl);this.Yea(w.v3);this.Ti(w.properties);this.pn&&(this.pn.Fb(v),this.mw=this.pn.eb("alpha"),this.Cga(),this.pn.Xe()&&(this.pn=null),this.m.P.Ta());this.zg&&(this.zg=!1)};d.prototype.ZA=function(){if(this.ce&&this.o){var v=this.ce&&this.ce.get("levels")||[];v=v.filter(function(E){return!!E.get("url")});
var w=1,x=1;c.Ja("AnimatedImageResource",this.ce)&&(w=this.ce.get("rowCount"),x=this.ce.get("colCount"));var y=null;if(0<v.length){v.sort(function(E,J){return J.get("width")-E.get("width")});y=this.o.get("width");var z=this.o.get("height"),B=this.o.get("scaleMode","fill"),D=v[0].get("width")/x,F=v[0].get("height")/w,A=p.e3(y,z,D,F,B);y=v.reduce(function(E,J){return!E||E.get("width")>J.get("width")&&J.get("width")/x>=A.width&&J.get("height")/w>=A.height?J:E})}this.dR(y)}};d.prototype.dR=function(v){this.fb!=
v&&(this.fb&&(this.ORa(),this.l$(),this.wX(),this.Jq(),this.zg=!1),this.fb=v)&&(this.Dq(),this.aw(),this.ZN(),this.zg=!1,this.Ga())};d.prototype.ZN=function(){this.Md||(this.Md=new h,this.Md.wM([this.fb.get("url")]),this.Md.bind(m.ea,this.Dd,this,!0),this.Md.bind(m.mc,this.Fva,this,!0),this.Md.bind(m.Bc,this.cg,this,!0),this.Ht=this.m.getComponent(g.Bl).priority,f.co(this.Md,this.Ht))};d.prototype.Jq=function(){this.Md&&(this.Md.unbind(m.ea,this.Dd,this,!0),this.Md.unbind(m.mc,this.Fva,this,!0),this.Md.unbind(m.Bc,
this.cg,this,!0),f.Lj(this.Md,this.Ht),this.Md=null)};d.prototype.Dd=function(){this.xRa();this.dga(new k(m.ea))};d.prototype.Fva=function(v){this.dga(new k(m.mc,{percent:v.Ug}))};d.prototype.cg=function(){this.dga(new k(m.Bc))};d.prototype.dga=function(v){this.eh&&this.eh.trigger(v)};d.prototype.Ga=function(){this.zg||(this.zg=!0,this.m.P.Ta())};d.prototype.Dq=function(){this.Ia=new THREE.Texture;this.Ia.image=e.FDa();this.Ia.generateMipmaps=!0;this.Ia.minFilter=THREE.LinearMipMapLinearFilter};d.prototype.wX=
function(){this.Ia&&(this.Ia.dispose(),this.Ia=null)};d.prototype.aw=function(){this.KVa?(this.ya=new THREE.SpriteMaterial({map:this.Ia}),this.ya.sizeAttenuation=!0):this.ya=new THREE.MeshBasicMaterial({map:this.Ia});this.ya.transparent=!0;this.ya.needsUpdate=!0;this.m.I(g.Material).material=this.ya;this.ypa(0);this.m.J(g.vh,!0);this.m.J(g.Material,!0);this.Vi(!0)};d.prototype.Vi=function(v){var w=this.o.get("enabled")&&!this.o.get("hidden")&&!!this.pp,x=this.V!==w;if(x||v){this.V=w;w=this.mw;var y=
this.V?1:0,z=this.o.get("hidden")?0:200;this.pn=w!==y?new n("linear",[new q("alpha",w,y,void 0)],Math.abs(w-y)*z):null;this.Cga()}w=this.o.get("encoding");if(this.GX!==w||v)this.GX=w,this.N2a();w=this.o.get("depthTest");if(this.g$!==w||v)this.g$=w,this.j2a();w=this.o.get("opacity");if(this.Mb!==w||v)this.Mb=w,this.Cga();w=this.o.get("side");if(this.nfa!==w||v)this.nfa=w,this.k2a();x&&this.ne&&this.ne.trigger(this.V?m.kd:m.cd)};d.prototype.N2a=function(){if(this.ya&&(this.ya.map||this.ya.emissiveMap)){var v=
"srgb"==this.GX?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;this.ya.map&&(this.ya.map.colorSpace=v);this.ya.emissiveMap&&(this.ya.emissiveMap.colorSpace=v);this.ya.needsUpdate=!0}this.m.J(g.vh,!0);this.Ga()};d.prototype.j2a=function(){this.ya&&(this.ya.depthTest=this.g$);this.m.J(g.vh,!0);this.Ga()};d.prototype.Cga=function(){this.ya&&this.ypa((this.Mb||0)*this.mw);this.pp&&this.pp.Ze(0<this.Mb);this.Ga()};d.prototype.ypa=function(v){this.ya.opacity=v;this.ya.visible=0<this.ya.opacity;this.ya.isShaderMaterial&&
this.ya.uniforms.opacity&&(this.ya.uniforms.opacity.value=v);this.m.J(g.vh,!0)};d.prototype.k2a=function(){if(this.ya)switch(this.nfa){case "back":this.ya.side=THREE.BackSide;break;case "double":this.ya.side=THREE.DoubleSide;break;default:this.ya.side=THREE.FrontSide}this.m.J(g.vh,!0);this.Ga()};d.prototype.l$=function(){this.ya&&(this.ya.dispose(),this.ya=null,this.m.ia(g.Material))};d.prototype.xRa=function(){this.pp=new b(this.ce,f.Cf(this.fb.get("url")),this.Ia,this.Ga);this.Vi(!0)};d.prototype.ORa=
function(){this.pp&&(this.pp.dispose(),this.pp=null)};d.prototype.Yea=function(v){this.ce!=v&&(this.ce&&l.ca(this.ce,t,this.ZA),(this.ce=v)&&l.da(this.ce,t,this.ZA,!1),this.ZA())};d.prototype.Ti=function(v){if(this.o!=v){this.o&&(l.ca(this.o,r,this.ZA),l.ca(this.o,u,this.Vi));if(this.o=v)l.da(this.o,r,this.ZA,!1),l.da(this.o,u,this.Vi,!1);this.ZA()}};d.prototype.dispose=function(){this.dR(null);this.Yea(null);this.Ti(null);this.m=this.eh=null};d.$a=function(v){v.I(g.kz).manager=new d(v)};d.Ca=function(v){var w=
v.getComponent(g.kz);w.manager.dispose();w.manager=null;v.ia(g.kz)};d.frame=function(v,w){v.getComponent(g.kz).manager.frame(w)};return d});
define("nl",["require","lV","mf","fU","kA"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("kA");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(c,h){this.Km.u.length&&this.Km.u.slice().forEach(k.Ca);this.Jm.u.length&&this.Jm.u.slice().forEach(k.$a);this.materials.u.length&&this.materials.u.slice().forEach(function(f){k.frame(f,c,h)})};a.H={};a.H.Jm=[m.Bl,m.kz.not];a.H.materials=[m.Bl,m.kz];a.H.Km=[m.Bl.not,m.kz];return a});
define("K",["require","oq","fU"],function(a){function d(k){this.m=k;this.ya=null;this.update()}var l=a("oq"),m=a("fU");d.prototype.update=function(){this.ya||(this.ya=new THREE.LineBasicMaterial,this.m.I(m.Material).material=this.ya);var k=this.m.getComponent(m.uh);this.ya.color=l.Qp(k.color||"#ffffff");this.ya.lineWidth=k.width||1;this.ya.opacity=k.opacity||0;this.ya.transparent=k.transparent;this.ya.depthTest=!!k.depthTest;this.ya.visible=0<this.ya.opacity;this.ya.needsUpdate=!0};d.prototype.dispose=
function(){this.ya&&(this.ya.dispose(),this.ya=null,this.m.ia(m.Material));this.m=null};d.$a=function(k){k.I(m.mz).manager=new d(k)};d.Ca=function(k){var c=k.getComponent(m.mz);c.manager.dispose();c.manager=null;k.ia(m.mz)};d.update=function(k){k.getComponent(m.mz).manager.update()};return d});
define("ju",["require","lV","mf","fU","K"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("K");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.Jm.u.length&&this.Jm.u.slice().forEach(k.$a);this.materials.Ea.length&&this.materials.Ea.slice().forEach(k.update);this.Km.u.length&&this.Km.u.slice().forEach(k.Ca)};a.H={};a.H.Jm=[m.uh,m.mz.not];a.H.materials=[m.uh,m.mz];a.H.Km=[m.uh.not,m.mz];return a});
define("pk","require lV mf fU cv ov".split(" "),function(a){var d=a("lV"),l=a("mf"),m=a("fU");a("cv");var k=a("ov");a=d.extend(l,function(){l.apply(this,arguments);this.Wb=this.Wb.bind(this);this.Ib=this.Ib.bind(this);this.kb=this.kb.bind(this)});a.prototype.Wc=function(){this.DFa.u.length&&this.DFa.u.slice().forEach(this.Wb);this.lines.Ea.length&&this.lines.Ea.slice().forEach(this.Ib);this.EFa.u.length&&this.EFa.u.slice().forEach(this.kb);this.FFa.u.length&&this.FFa.u.slice().forEach(this.kb);this.GFa.u.length&&
this.GFa.u.slice().forEach(this.kb)};a.prototype.Wb=function(c){c.I(m.Object3D).qa=new THREE.LineSegments;c.I(m.nz);c.I(m.va);if(!c.getComponent(m.Geometry)){var h=(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,1)]);h.userData.cFa=!0;c.I(m.Geometry).geometry=h}this.Ib(c)};a.prototype.Ib=function(c){var h=c.getComponent(m.Object3D).qa;k.mB(h,c.getComponent(m.Material).material);var f=c.getComponent(m.Geometry).geometry;h.geometry!=f&&(h.geometry&&f.userData.cFa&&
h.geometry.dispose(),h.geometry=f,h.needsUpdate=!0);c=c.getComponent(m.Line).renderOrder||0;h.renderOrder!=c&&(h.renderOrder=c,h.needsUpdate=!0)};a.prototype.kb=function(c){c.ia(m.nz);c.ia(m.Geometry);var h=c.getComponent(m.Object3D);h&&(h=h.qa,h.geometry&&h.geometry.userData.cFa&&h.geometry.dispose(),h.geometry=null,k.mB(h,null),c.ia(m.Object3D))};a.H={};a.H.DFa=[m.Line,m.Material,m.nz.not];a.H.lines=[m.Line,m.Geometry,m.Material,m.nz];a.H.EFa=[m.Line.not,m.nz];a.H.FFa=[m.Material.not,m.nz];a.H.GFa=
[m.Geometry.not,m.nz];return a});
define("gj",["require","lV","mf","fU","cv"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("cv");a=d.extend(l,function(){l.apply(this,arguments);this.Wb=this.Wb.bind(this);this.kb=this.kb.bind(this);this.zf=this.zf.bind(this)});a.prototype.Wc=function(){this.zFa.u.length&&this.zFa.u.slice().forEach(this.Wb);this.yFa.u.length&&this.yFa.u.slice().forEach(this.zf);this.AFa.u.length&&this.AFa.u.slice().forEach(this.kb);this.BFa.u.length&&this.BFa.u.slice().forEach(this.kb);this.CFa.u.length&&this.CFa.u.slice().forEach(this.kb)};
a.prototype.Wb=function(n){n.I(m.oz)};a.prototype.kb=function(n){n.ia(m.oz)};var c=new THREE.Matrix4,h=new THREE.Quaternion,f=new THREE.Vector3,b=new THREE.Vector3(0,0,1),e=new THREE.Euler,g=180/Math.PI;a.prototype.zf=function(n){var q=n.getComponent(m.va);if(q){var p=k.Xc(n);if(p&&p.parent){var r=n.getComponent(m.Ms),t=r.F;if(t){r=k.Xc(t);if(!r||!r.parent)return;f.setFromMatrixPosition(r.matrixWorld)}else if(r.position)f.copy(r.position);else return;c.copy(p.parent.matrixWorld).invert();f.applyMatrix4(c);
f.x-=q.translationX;f.y-=q.translationY;f.z-=q.Je;p=f.length();h.setFromUnitVectors(b,f.normalize());e.setFromQuaternion(h,q.Ge);e.x*=g;e.y*=g;e.z*=g;if(q.scale!=p||q.Rd!=e.x||q.ud!=e.y||q.He!=e.z)q=n.J(m.va),q.scale=p,q.Rd=e.x,q.ud=e.y,q.He=e.z,k.MU(n,q),n.P.Ta()}}};a.H={};a.H.zFa=[m.Object3D,m.Ms,m.oz.not];a.H.yFa=[m.Object3D,m.Ms,m.oz,m.va];a.H.AFa=[m.Object3D.not,m.oz];a.H.BFa=[m.Ms.not,m.oz];a.H.CFa=[m.va.not,m.oz];return a});
define("ff","require lV pB kQ mf fU cv ov".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("kQ"),k=a("mf"),c=a("fU"),h=a("cv"),f=a("ov");a=d.extend(k,function(){k.apply(this,arguments);this.Wb=this.Wb.bind(this);this.kb=this.kb.bind(this);this.Ib=this.Ib.bind(this)});a.prototype.Wc=function(){this.lGa.u.length&&this.lGa.u.slice().forEach(this.Wb);this.cka.Ea.length&&this.cka.Ea.slice().forEach(this.Ib);this.mGa.u.length&&this.mGa.u.slice().forEach(this.kb);this.nGa.u.length&&this.nGa.u.slice().forEach(this.kb)};
a.prototype.Wb=function(b){b.I(c.pz);this.cka.u.forEach(function(e){this.tVa(e,b)&&this.O_(h.Xc(e))}.bind(this));this.Ib(b)};a.prototype.Ib=function(b){var e=b.getComponent(c.vh);if(b=h.Xc(b))this.$Oa(b,e),this.O_(b),this.je(b,e)};a.prototype.kb=function(b){b.ia(c.pz);var e=h.Xc(b);e&&(this.mQa(e),this.O_(e),b.ia(c.pz))};a.prototype.$Oa=function(b,e){b.userData.YGa=e.opacity;b.userData.sS=e.sS;b.userData.castShadow=e.castShadow;b.userData.receiveShadow=e.receiveShadow;b.userData.zS=e.zS};a.prototype.mQa=
function(b){b.userData.YGa=void 0;b.userData.sS=void 0;b.userData.castShadow=void 0;b.userData.receiveShadow=void 0;b.userData.zS=void 0};a.prototype.O_=function(b){if(m.Aj!=b&&!b.Hu){var e=this.jsa(b),g=this.eTa(b),n=this.gTa(b),q=this.hTa(b),p=this.fTa(b);if(b.material){if(void 0===e&&!0!==p)f.uU(b);else{var r=b.userData.js||b.material,t=f.G3(r),u=f.G3(b.material),v=r.opacity;r=r.transparent;!0!==p&&u&&!t?f.uU(b):!0!==p||u||f.xCa(b);void 0!==v&&(t=v*(void 0===e?1:e),u=0<t,r=1>t?!0:r,b.material.opacity!==
t||b.material.visible!==u||b.material.transparent!==r)&&(f.tia(b),b.material.opacity=t,b.material.transparent=r,b.material.visible=u,b.material.needsUpdate=!0);f.Bcb(b)}var w=this.QSa(g);(null==b.material.map?[]:Array.isArray(b.material.map)?b.material.map:[b.material.map]).forEach(function(x){x.anisotropy!==w&&(x.anisotropy=w,x.needsUpdate=!0)})}b.isMesh&&(void 0!==n&&b.castShadow!==n&&(b.castShadow=n),void 0!==q&&b.receiveShadow!==q&&(b.receiveShadow=q));b.children&&b.children.forEach(function(x){x.userData.B7a=
e;x.userData.y7a=g;x.userData.A7a=n;x.userData.C7a=q;x.userData.z7a=p;this.O_(x)}.bind(this))}};a.prototype.QSa=function(b){return 1+Math.round((b||0)*(h.HDa().capabilities.getMaxAnisotropy()-1))};a.prototype.jsa=function(b){var e=b.userData.YGa;b=b.userData.B7a;if(void 0!==b||void 0!==e)if(e=(void 0!==b?b:1)*(void 0!==e?e:1),1!==e)return e};a.prototype.eTa=function(b){var e=b.userData.sS;if(void 0!==e)return e;b=b.userData.y7a;if(void 0!==b)return b};a.prototype.gTa=function(b){var e=b.userData.castShadow;
if(void 0!==e)return e;b=b.userData.A7a;if(void 0!==b)return b};a.prototype.hTa=function(b){var e=b.userData.receiveShadow;if(void 0!==e)return e;b=b.userData.C7a;if(void 0!==b)return b};a.prototype.fTa=function(b){var e=b.userData.zS;if(void 0!==e)return e;b=b.userData.z7a;if(void 0!==b)return b};a.prototype.je=function(b,e){var g=this.jsa(b);void 0!==g&&(g=0<g,b.userData.ddb!==g&&(b.userData.ddb=g,e.N&&e.N.trigger(g?l.kd:l.cd)))};a.prototype.tVa=function(b,e){b=h.Xc(b);e=h.Xc(e);if(!b||!e)return!1;
for(e=e.parent;e;){if(e===b)return!0;e=e.parent}return!1};a.H={};a.H.lGa=[c.vh,c.Object3D,c.pz.not];a.H.cka=[c.vh,c.Object3D,c.pz];a.H.mGa=[c.vh.not,c.pz];a.H.nGa=[c.Object3D.not,c.pz];return a});
define("pu",["require","fU","ov"],function(a){function d(k){this.m=k;this.bha=this.Sl=this.qe=null;this.KK=-1}var l=a("fU"),m=a("ov");d.prototype.frame=function(){if(!this.Sl&&(this.Sl=this.m.getComponent(l.Xh).cja)){var k=this.Sl.userData&&this.Sl.userData.gltfExtensions&&this.Sl.userData.gltfExtensions.KHR_materials_variants;this.bha=k&&k.variants||[];this.update()}};d.prototype.update=function(){if(this.bha){var k=this.m.getComponent(l.rv).name,c=this.bha.findIndex(function(f){return f.name==k}),
h=this.Sl.scene;this.qe!=h?(this.qe&&this.Xxa(this.qe),this.qe=h,this.KK=c,this.qe&&this.Yya(this.qe,this.KK)):this.KK!=c&&(this.KK=c,this.qe&&this.Yya(this.qe,this.KK));this.m.P.Ta()}};d.prototype.Xxa=function(k){this.Bpa(k,-1)};d.prototype.Yya=function(k,c){this.aWa(k,c,function(){this.qe==k&&this.KK==c&&this.Bpa(k,c)}.bind(this))};d.prototype.aWa=function(k,c,h){var f=[];k.traverse(function(b){var e=b.isMesh&&b.userData.gltfExtensions&&b.userData.gltfExtensions.KHR_materials_variants;if(e=e&&e.mappings){b.userData.k9a||
(b.userData.k9a=m.u6a(b));b.userData.oC||(b.userData.oC={});for(var g=null,n=e.length-1;0<=n&&!g;--n)-1!=e[n].variants.indexOf(c)&&(g=e[n]);g&&f.push(this.Sl.parser.getDependency("material",g.material).then(function(q){b.userData.oC[c]||(b.userData.oC[c]=q)}))}}.bind(this));Promise.all(f).then(function(){h(k,c)})};d.prototype.Bpa=function(k,c){k.traverse(function(h){if(h.userData.oC){var f=h.userData.oC[c];f&&(m.mB(h,f),this.Sl.parser.assignFinalMaterial(h),this.m.J(l.vh,!0))}}.bind(this));this.m.P.Ta()};
d.prototype.dispose=function(){this.qe&&(this.Xxa(this.qe),this.m.J(l.vh,!0),this.qe=null)};d.$a=function(k){k.I(l.iq).manager=new d(k)};d.Ca=function(k){var c=k.getComponent(l.iq);c.manager.dispose();c.manager=null;k.ia(l.iq)};d.update=function(k){k.getComponent(l.iq).manager.update()};d.frame=function(k){k.getComponent(l.iq).manager.frame()};return d});
define("hZ",["require","lV","mf","fU","pu"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("pu");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.KFa.u.length&&this.KFa.u.slice().forEach(k.$a);this.U3.u.length&&this.U3.u.slice().forEach(k.frame);this.U3.Ea.length&&this.U3.Ea.slice().forEach(k.update);this.LFa.u.length&&this.LFa.u.slice().forEach(k.Ca);this.MFa.u.length&&this.MFa.u.slice().forEach(k.Ca);this.NFa.u.length&&this.NFa.u.slice().forEach(k.Ca)};a.H={};
a.H.KFa=[m.rv,m.Xh,m.Object3D,m.iq.not];a.H.U3=[m.rv,m.Xh,m.Object3D,m.iq];a.H.LFa=[m.rv.not,m.iq];a.H.MFa=[m.Object3D.not,m.iq];a.H.NFa=[m.Xh.not,m.iq];return a});
define("ip",["require","fU"],function(a){var d=a("fU");return{$a:function(l){var m=l.I(d.Ps);l.I(d.va);var k=l.J(d.Mesh);l.I(d.Object3D).qa=m.Gp=k.Gp=new THREE.Mesh(l.getComponent(d.Geometry).geometry,l.getComponent(d.Material).material);k.Gp.renderOrder=k.renderOrder},update:function(l){var m=l.J(d.Ps);m.Gp.geometry=l.getComponent(d.Geometry).geometry;m.Gp.material=l.getComponent(d.Material).material;m.Gp.renderOrder=l.getComponent(d.Mesh).renderOrder},Ca:function(l){l.getComponent(d.Ps).Gp=null;
l.ia(d.Ps);l.ia(d.Object3D)}}});
define("f",["require","lV","mf","fU","ip"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("ip");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.QFa.u.length&&this.QFa.u.slice().forEach(k.$a);this.PFa.Ea.length&&this.PFa.Ea.slice().forEach(k.update);this.Y3.u.length&&this.Y3.u.slice().forEach(k.Ca);this.r8a.u.length&&this.Y3.u.slice().forEach(k.Ca);this.s8a.u.length&&this.Y3.u.slice().forEach(k.Ca)};a.H={};a.H.QFa=[m.Mesh,m.Geometry,m.Material,m.Ps.not];a.H.PFa=
[m.Mesh,m.Geometry,m.Material,m.Ps];a.H.Y3=[m.Mesh.not,m.Ps];a.H.r8a=[m.Geometry.not,m.Ps];a.H.s8a=[m.Material.not,m.Ps];return a});
define("dU",["require","exports","pB","gF","bB"],function(a,d,l,m,k){return function(c){function h(f,b){var e=c.call(this)||this;e.bp=null;e.Mpa=null;e.Kz=!1;e.lJ=null;e.Wd=f;e.Ht=b;e.Kt=new Request(f);e.uR=e.uR.bind(e);e.wD=e.wD.bind(e);return e}Z(h,c);h.prototype.start=function(){this.lJ||(this.Kz=!1,this.lJ=k.add(this.Wd,this.Ht,this.uR,this.wD))};h.prototype.uR=function(){0===this.Wd.indexOf("filesystem:")?this.qSa():this.rSa()};h.prototype.qSa=function(){var f=this,b=new XMLHttpRequest;b.open("GET",
this.Wd,!0);b.responseType="arraybuffer";b.onload=function(){f.Iva(b.response);b.onload=b.onerror=null};b.onerror=function(){f.Eva();b.onload=b.onerror=null};b.send()};h.prototype.rSa=function(){var f=this;fetch(this.Kt).then(function(b){function e(t){void 0===t&&(t=null);if(t=t||r)t.close(),r=null,f.bp=null}function g(t){var u;return null===(u=f.bp.read().then(function(v){var w=null===v||void 0===v?void 0:v.value;w&&(p+=w.byteLength,t.enqueue(w));v&&v.done&&(q&&p<q?t.error("connection closed prematurely"):
(q=p,e(t)));void 0!==q&&f.trigger(l.mc,{totalBytes:q,bytesLoaded:p,percent:p<q?100*p/q:100})}))||void 0===u?void 0:u.catch(function(v){console.log("Error reading response",v);t.error(v)})}if(f.Kz)return b.body.getReader().cancel(),Promise.reject("cancel requested before server responded.");if(!b.ok)return Promise.resolve(b);var n=b.headers.get("content-length")||b.headers.get("x-content-length"),q,p=0;null!==n&&(q=parseInt(n,10));f.bp=b.body.getReader();var r=null;return new Response(new ReadableStream({start:function(t){f.Kz?
t.close():r=t},pull:function(t){return g(t)},cancel:function(){return e()}}))}).then(function(b){return b.arrayBuffer()}).then(function(b){f.Iva(b)}).catch(function(){f.Eva()})};h.prototype.cancel=function(){this.lJ&&(this.lJ.cancel(),this.lJ=null)};h.prototype.wD=function(){this.Kz=!0;this.bp&&(this.bp.cancel(),this.bp=null)};h.prototype.Iva=function(f){var b;this.Mpa=f;null===(b=this.lJ)||void 0===b?void 0:b.loaded();this.trigger(l.ea,{buffer:f})};h.prototype.Eva=function(){this.cancel();this.trigger(l.Bc)};
h.prototype.getData=function(){return this.Mpa};return h}(m)});
define("cu","require exports three.mod pB iy gF cv hp gz mq dU ni mV fU".split(" "),function(a,d,l,m,k,c,h,f,b,e,g,n,q,p){return function(r){function t(u){var v=r.call(this)||this;v.type=t.TYPE;v.DG=[];v.SB=[];v.IFa=0;v.F=u;v.lka=v.lka.bind(v);v.mka=v.mka.bind(v);v.BL=h.wJa(new l.GLTFLoader);return v}Z(t,r);t.prototype.Nia=function(){return this.Sl?this.Sl.scene:null};t.prototype.start=function(u){this.url=u;this.vJa();this.Ur.start()};t.prototype.update=function(){if(0!=this.DG.length||0!=this.SB.length)if(b.e8a())this.F.P.Ta();
else{for(var u=Date.now()+8,v=this.F.getComponent(p.Xh).zc.Qd().bs();0<this.SB.length&&Date.now()<u;){var w=this.SB.shift();v&&v.initTexture(w)}for(;0<this.DG.length&&Date.now()<u;)f.GHa(this.DG.shift());0==this.DG.length&&0==this.SB.length?this.JKa():this.F.P.Ta()}};t.prototype.dispose=function(){this.hKa()};t.prototype.vJa=function(){this.Ur=new g(this.url,k.QC);this.w3a()};t.prototype.hKa=function(){this.Ur&&(this.Q9a(),this.Ur.cancel())};t.prototype.w3a=function(){this.Ur.bind(m.ea,this.YL,this,
!0);this.Ur.bind(m.mc,this.$L,this,!0);this.Ur.bind(m.Bc,this.ZL,this,!0)};t.prototype.Q9a=function(){this.Ur.unbind(m.ea,this.YL,this);this.Ur.unbind(m.mc,this.$L,this);this.Ur.unbind(m.Bc,this.ZL,this)};t.prototype.YL=function(){this.BL.parse(this.Ur.getData(),q.getDirectory(this.url),this.lka,this.mka)};t.prototype.$L=function(u){this.trigger(m.mc,u.data)};t.prototype.ZL=function(){2>this.IFa?(this.IFa++,this.hKa(),this.vJa(),this.Ur.start()):this.trigger(m.Bc)};t.prototype.mka=function(u){n.fv&&
u&&u.message&&console.error(u.message);this.trigger(m.Bc)};t.prototype.lka=function(u){this.BL&&(this.DG=[],this.SB=[],u.scene.traverse(function(v){if(v.isMesh){var w=v.material;w&&(1==e.EHa&&w.isMeshPhysicalMaterial&&(v.material=w=(new l.MeshStandardMaterial).copy(w)),w.depthWrite=!w.transparent,w=this.r6a(w),this.SB=this.SB.concat(w))}this.DG.push(v)}.bind(this)),this.Sl=u,0==this.DG.length&&0==this.SB.length?this.JKa():this.F.P.Ta())};t.prototype.JKa=function(){this.trigger(m.INIT);this.trigger(m.ea)};
t.prototype.r6a=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}(c)});
define("cj",["require","exports","pB","gF","cF"],function(a,d,l,m,k){return function(c){function h(f){var b=c.call(this)||this;b.type=h.TYPE;b.Ej=null;b.zB=null;b.url="";b.rB=null;b.Em=null;b.MF=null;b.cH=null;b.properties=f;b.YL=b.YL.bind(b);b.$L=b.$L.bind(b);b.ZL=b.ZL.bind(b);b.ZT=b.ZT.bind(b);return b}Z(h,c);h.prototype.Nia=function(){return this.Ej};h.prototype.start=function(f){this.url=f;k.GS.Mh()?this.XJa():k.GS.load(this.M8a,this)};h.prototype.update=function(){(!this.zB||this.Em&&this.Em.state==
TDV.GS.StateFx.PLAYING)&&this.trigger(l.ba)};h.prototype.dispose=function(){this.MF&&(this.properties.unbind(l.G("antialiasingLevel"),this.dka,this),this.MF.dispose(),this.MF=null);this.cH&&(this.properties.unbind(l.G("sphericalHarmonicsMaxDegree"),this.pka,this),this.cH.dispose(),this.cH=null);this.properties.unbind(l.G("displayEffect"),this.gka,this);this.zB&&(this.Ej.remove(this.zB),this.zB=null);this.Ej&&(this.Ej.removeEventListener("refresh",this.ZT),this.Ej.dispose(),this.Ej=null);this.url=
""};h.prototype.M8a=function(){this.url&&this.XJa()};h.prototype.XJa=function(){this.Ej=new TDV.GS.GaussianSplattingGroup;this.Ej.addEventListener("refresh",this.ZT);this.Ej.renderOrder=0;this.Ej.Hu=!0;this.MF=new TDV.GS.AntialiasingFx;this.cH=new TDV.GS.SphericalHarmonicsFx;this.Ej.fx=(this.Ej.fx||[]).concat([this.MF,this.cH]);this.properties.bind(l.G("antialiasingLevel"),this.dka,this,!1);this.properties.bind(l.G("sphericalHarmonicsMaxDegree"),this.pka,this,!1);this.properties.bind(l.G("displayEffect"),
this.gka,this,!1);this.dka();this.pka();this.gka();(new TDV.GS.GaussianCloudLoader).load(this.url,this.YL,this.$L,this.ZL)};h.prototype.YL=function(f){this.Ej&&(this.zB=f,this.Ej.add(f),this.trigger(l.INIT),this.trigger(l.ea))};h.prototype.$L=function(f){var b=f.total;f=f.loaded;this.trigger(l.mc,{totalBytes:b,bytesLoaded:f,percent:f<b?100*f/b:100})};h.prototype.ZL=function(){this.trigger(l.Bc)};h.prototype.gka=function(){var f=this.properties.get("displayEffect");if(this.rB!=f&&this.Ej){var b=this.Ej.fx;
this.Em&&(b=b.filter(function(e){return e!=this.Em}.bind(this)),this.Em.dispose(),this.Em=null);if(this.rB=f)this.Em=new TDV.GS.RadialFadeInAnimationFx,this.Em.sparseFadeFactor=this.rB.get("sparseFadeFactor"),this.Em.denseFadeFactor=this.rB.get("denseFadeFactor"),this.Em.denseTimeDelay=this.rB.get("denseTimeDelay"),this.Em.speedFactor=this.rB.get("speedFactor"),this.Em.minimumPointSize=this.rB.get("minimumPointSize"),b=b.concat([this.Em]),this.Em.play(),this.ZT();this.Ej.fx=b}};h.prototype.ZT=function(){this.trigger(l.ba)};
h.prototype.dka=function(){this.MF&&(this.MF.value=this.properties.get("antialiasingLevel"),this.trigger(l.ba))};h.prototype.pka=function(){this.cH&&(this.cH.maxDegree=this.properties.get("sphericalHarmonicsMaxDegree"),this.trigger(l.ba))};h.TYPE="gs";return h}(m)});
define("ot","require exports three.mod pB gF cv ov mV".split(" "),function(a,d,l,m,k,c,h,f){a=function(p){function r(){var t=p.call(this)||this;t.type=r.TYPE;t.re=null;t.BL=null;t.camera=null;t.xp=null;t.width=void 0;t.height=void 0;t.Mh=!1;t.b2=null;t.session=null;t.config=null;return t}Z(r,p);r.prototype.Nia=function(){return this.re?this.re.group:null};r.prototype.H$a=function(t){this.config=t};r.prototype.start=function(t){this.b2=this.I5a(t);this.re=new l.TDTiles.TilesRenderer(t);this.BL=c.wJa(new l.GLTFLoader(this.re.manager));
this.re.manager.addHandler(/\.gltf$/,this.BL);this.config&&(this.re.maxDepth=this.config.maxDepth,this.re.loadSiblings=this.config.loadSiblings,this.re.parseQueue.maxJobs=this.config.tka,this.re.downloadQueue.maxJobs=this.config.mia,this.re.lruCache.minSize=this.config.Ija,this.re.lruCache.maxSize=this.config.Hja,this.re.errorTarget=this.config.errorTarget,this.re.errorThreshold=this.config.errorThreshold);f.qja(t)&&(this.re.fetchOptions.mode="cors");this.re.onLoadModel=this.onLoadModel.bind(this);
this.re.onDisposeModel=this.onDisposeModel.bind(this);this.re.onLoadTileSet=this.onLoadTileSet.bind(this);this.re.onTileVisibilityChange=this.onTileVisibilityChange.bind(this);this.re.preprocessURL=this.V8a.bind(this);this.trigger(m.INIT)};r.prototype.dispose=function(){this.re&&(this.BL=null,this.re.dispose(),this.re=null,this.xp&&this.xp.removeFromParent(),this.session=this.b2=null)};r.prototype.setCamera=function(t){this.camera!==t&&(this.camera=t,this.OKa(),this.updateCamera())};r.prototype.setSize=
function(t,u){if(this.width!==t||this.height!==u)this.width=t,this.height=u,this.Qcb()};r.prototype.update=function(){this.camera&&this.width&&this.height&&(this.OKa(),this.re.update())};r.prototype.I5a=function(t){return(new window.URL(t)).searchParams.get("key")||null};r.prototype.I6a=function(t){return(new window.URL(t)).searchParams.get("session")||null};r.prototype.updateCamera=function(){this.re&&this.camera&&(this.re.setCamera(this.camera),this.re.setCamera(this.xp))};r.prototype.OKa=function(){this.camera&&
(this.xp||(this.xp=new l.OrthographicCamera(-1,1,-1,1),this.xp.matrixAutoUpdate=!1),this.xp.parent!==this.camera&&this.camera.add(this.xp),this.camera.updateMatrixWorld(!0),q.setFromMatrixPosition(this.camera.matrixWorld),n.copy(q).y-=this.camera.far,n.applyMatrix4(b.copy(this.camera.matrixWorld).invert()),g.random().cross(n).normalize(),this.xp.matrix.lookAt(e,n,g),this.xp.near=this.camera.near,this.xp.far=this.camera.far)};r.prototype.Qcb=function(){this.re&&this.camera&&this.width&&this.height&&
(this.re.setResolution(this.camera,this.width,this.height),this.re.setResolution(this.xp,1,1))};r.prototype.V8a=function(t){t=new window.URL(t);/^http/.test(t.protocol)&&(this.b2&&t.searchParams.append("key",this.b2),this.session&&t.searchParams.append("session",this.session));return t.toString()};r.prototype.onLoadModel=function(){this.Mh||(this.Mh=!0,this.trigger(m.ea));this.trigger(m.ba)};r.prototype.onDisposeModel=function(t){t.traverse(function(u){u instanceof l.Mesh&&h.uU(u)})};r.prototype.onTileVisibilityChange=
function(t,u,v){v&&this.trigger(m.ba)};r.prototype.onLoadTileSet=function(){null==this.session&&this.re.traverse(function(t){return t.content&&t.content.uri?(this.session=this.I6a(t.content.uri),!0):!1}.bind(this));this.trigger(m.ba)};r.TYPE="tiles";return r}(k);var b=new l.Matrix4,e=new l.Vector3,g=new l.Vector3,n=new l.Vector3,q=new l.Vector3;return a});
define("hN",["require","exports"],function(){return function(){function a(){this.errorTarget=6;this.maxDepth=this.errorThreshold=Infinity;this.loadSiblings=!0;this.mia=6;this.tka=3;this.Ija=600;this.Hja=800}a.J4a=function(d){var l=new a;l.errorTarget=d.get("errorTarget",l.errorTarget);l.errorThreshold=d.get("errorThreshold",l.errorThreshold);l.maxDepth=d.get("maxDepth",l.maxDepth);l.loadSiblings=d.get("loadSiblings",l.loadSiblings);l.mia=d.get("downloadMaxJobs",l.mia);l.tka=d.get("parseMaxJobs",l.tka);
l.Ija=d.get("lruCacheMinSize",l.Ija);l.Hja=d.get("lruCacheMaxSize",l.Hja);return l};return a}()});
define("nN",["require","hp"],function(a){function d(f){this.ja=f}var l=a("hp"),m=new THREE.Raycaster,k=new THREE.Vector3,c=new THREE.Vector3(0,-1,0),h=new THREE.Vector3(0,1,0);d.prototype.gH=function(f,b){m.ray.origin.copy(f);k.copy(b).sub(f);var e=k.length();k.normalize();m.ray.direction.copy(k);f=this.aE();return 0<l.intersect(m,f).filter(function(g){if(g.distance>=.98*e||!g.object.visible)return!1;g=Array.isArray(g.object.material)&&g.face?g.object.material[g.face.materialIndex]:g.object.material;
return!g||g.visible}).length};d.prototype.X5a=function(f){m.ray.origin.copy(f);m.ray.direction.copy(c);f=this.aE();var b=l.intersect(m,f);if(0<b.length)return b[0].distance;m.ray.direction.copy(h);b=l.intersect(m,f);if(0<b.length)return-b[0].distance};d.prototype.aE=function(){var f=[];this.ja.traverse(function(b){b.isSprite||b.isLine||f.push(b)});return f};return d});
define("kd",["require","exports"],function(){return function(){function a(d){this.zB=d}a.prototype.getMetadata=function(){return this.zB.metadata};return a}()});define("be",["require","cv"],function(a){function d(m,k){this.nb=m;this.GUa=k}var l=a("cv");d.prototype.WDa=function(m){return(m=this.Xc(m))&&m.matrixWorld};d.prototype.Xc=function(m){return m?l.uB(this.GUa,m):l.Xc(this.nb)};return d});
define("et",["require","cv"],function(a){function d(b,e,g){this.nb=b;this.uWa=e;this.OSa=g}var l=a("cv"),m=new THREE.Vector3,k=new THREE.Vector3,c=new THREE.Vector3,h=new THREE.Frustum,f=new THREE.Matrix4;d.prototype.aja=function(b,e){e=this.uWa.WDa(e);if(!e)return null;k.copy(b).applyMatrix4(e);var g=(b=l.Xc(this.nb))&&l.lT(b);b=g&&l.Cu(g);if(!b)return null;f.identity().multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);h.setFromProjectionMatrix(f);if(!h.containsPoint(k))return null;e=(g&&
l.oT(g))/2;g=(g&&l.yB(g))/2;m.copy(k).project(b);e=m.x*e+e;g=-(m.y*g)+g;c.setFromMatrixPosition(b.matrixWorld);b=this.OSa.gH(c,k);return{x:Math.round(e),y:Math.round(g),visible:!b}};return d});
define("eO","require pB mX cu cj ot hN nN kd be et cv fU w iF mV".split(" "),function(a){function d(u,v,w,x){this.m=u;this.Lo=v;u=this.m.getComponent(p.Xh);this.o=u.properties;this.Qi=x;this.Oe=w;this.ne=this.Qi.qu(1);this.Oe.UK(this.ne,1);this.Ha=this.Sl=null;w=this.AUa(u.Sja);this.ed=this.jRa(w);this.jOa();this.ed.type===h.TYPE&&this.ed.H$a(f.J4a(u.Sja));this.ed.start(w)}var l=a("pB"),m=a("mX"),k=a("cu"),c=a("cj"),h=a("ot"),f=a("hN"),b=a("nN"),e=a("kd"),g=a("be"),n=a("et"),q=a("cv"),p=a("fU"),r=
a("w"),t=a("iF");a("mV");d.prototype.jRa=function(u){return t.is(u,t.ana)?new c(this.o):t.is(u,t.ANa)?new h:new k(this.m)};d.prototype.AUa=function(u){var v=u.get("levels");if(!w&&r.pb())var w=(w=v.find(function(x){return-1<x.get("tags").indexOf(m.bW)}))&&w.get("url");w||v.length&&(w=v[0].get("url"));w||(w=u.get("url"));return w};d.prototype.update=function(){};d.prototype.frame=function(){this.ed.type===h.TYPE?this.P2a():this.ed.type===k.TYPE?this.a2a():this.ed.type===c.TYPE&&this.b2a()};d.prototype.P2a=
function(){var u=q.qf(this.m),v=u&&q.Cu(u);v&&(this.ed.setCamera(v),this.ed.setSize(q.oT(u),q.yB(u)),this.ed.update())};d.prototype.a2a=function(){this.ed.update()};d.prototype.b2a=function(){this.ed.update()};d.prototype.jOa=function(){this.ed.bind(l.INIT,this.qva,this,!0);this.ed.bind(l.ea,this.Dd,this,!0);this.ed.bind(l.Bc,this.cg,this,!0);this.ed.bind(l.mc,this.Ki,this,!0);this.ed.bind(l.ba,this.Jva,this,!0)};d.prototype.OYa=function(){this.ed.unbind(l.INIT,this.qva,this);this.ed.unbind(l.ea,
this.Dd,this);this.ed.unbind(l.Bc,this.cg,this);this.ed.unbind(l.mc,this.Ki,this);this.ed.unbind(l.ba,this.Jva,this)};d.prototype.qva=function(){this.Ha=this.ed.Nia();this.Lo.I(p.Object3D).qa=this.Ha;var u=this.ed.type==k.TYPE,v=this.ed.type==c.TYPE;this.NOa(this.Ha,u||v);v=this.m.J(p.Xh,!0);v.cja=u?this.ed.Sl:null;this.m.J(p.Animation,!0).properties=v.properties};d.prototype.Dd=function(){this.o.set("geometryQuery",new b(this.Ha));this.o.set("objectQuery",new g(this.m,this.Ha));this.o.set("projectionQuery",
new n(this.m,this.o.get("objectQuery"),this.o.get("geometryQuery")));this.ed.type==c.TYPE&&this.o.set("metadataQuery",new e(this.ed.zB));this.j1();this.m.J(p.vh)};d.prototype.Ki=function(u){this.ne.trigger(l.mc,u.data)};d.prototype.cg=function(){this.ne.trigger(l.Bc)};d.prototype.Jva=function(){this.m.J(p.Object3D,!0)};d.prototype.j1=function(){this.o.set("isLoaded",!0);this.ne.trigger(l.ea)};d.prototype.NOa=function(u,v){void 0===u.userData.id&&(u.userData.id="root");if(!1!==v)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){void 0===y.userData.id&&(y.userData.id=x.userData.id+"/"+z);w.push(y)})}};d.prototype.dispose=function(){this.Ha&&(this.ed.type!=c.TYPE&&this.Ha.traverse(function(u){function v(y){y&&0>w.indexOf(y)&&w.push(y)}var w=[];v(u.material);v(u.userData.js);if(u.userData.oC)for(var x in u.userData.oC)v(u.userData.oC[x]);w.forEach(function(y){y.dispose();Object.keys(y).forEach(function(z){(z=
y[z])&&"object"===typeof z&&"minFilter"in z&&z.dispose()})});u.geometry&&u.geometry.userData.XBa&&u.geometry.disposeBoundsTree();u.geometry&&u.geometry.dispose()}),this.Ha=null,this.Lo.ia(p.Object3D));this.ed&&(this.OYa(),this.ed.dispose(),this.ed=null);this.ne&&(this.Oe.lM(this.ne),this.Qi.lM(this.ne),this.Oe=this.ne=null);this.o&&(this.o.set("geometryQuery",null),this.o.set("objectQuery",null),this.o.set("isLoaded",!1),this.o=null)};return d});
define("o","require lh pB gF fU cv".split(" "),function(a){function d(p,r,t){this.nb=p;this.m=r;this.K=t;this.Lk=this.Lk.bind(this);this.Ng=this.Ng.bind(this);this.Uw=this.Uw.bind(this);this.we=null;this.V=!1;this.Q_=[1,1,1,1,1,1];this.nw=[];this.sg=[this.PK=this.Cq(),this.OK=this.Cq(),this.RK=this.Cq(),this.QK=this.Cq(),this.TK=this.Cq(),this.SK=this.Cq()];this.sg.forEach(function(u){u=u.J(c.ld);u.opacity=.5;u.depthTest=!1}.bind(this));l.da(this.K,g,this.Ng,!0);l.da(this.K,n,this.Lk,!0);l.da(this.K,
q,this.Uw,!0)}var l=a("lh"),m=a("pB"),k=a("gF"),c=a("fU"),h=a("cv");d.prototype.frame=function(){if(this.V&&(this.s_a(this.sg.map(function(A){return h.fG(A)||1})),this.we)){var p=h.Xc(this.m),r=h.Xc(this.UI(this.we));if(p&&r){b.copy(p.matrixWorld).invert();f.setFromMatrixPosition(r.matrixWorld).applyMatrix4(b);p=this.K.get("x");r=this.K.get("y");var t=this.K.get("z"),u=this.K.get("width"),v=this.K.get("height"),w=this.K.get("depth"),x=0,y=0,z=0,B=0,D=0,F=0;switch(this.we){case this.PK:B=f.x-.5*u;
x=.5*B;break;case this.OK:B=-f.x-.5*u;x=.5*-B;break;case this.RK:D=f.y-.5*v;y=.5*D;break;case this.QK:D=-f.y-.5*v;y=.5*-D;break;case this.TK:F=f.z-.5*w;z=.5*F;break;case this.SK:F=-f.z-.5*w,z=.5*-F}this.K.set("x",p+x);this.K.set("width",u+B);this.K.set("y",r+y);this.K.set("height",v+D);this.K.set("z",t+z);this.K.set("depth",w+F)}}};var f=new THREE.Vector3,b=new THREE.Matrix4;d.prototype.Cq=function(){var p=this.nb.P.Nc("DraggingSphere");this.nw.push(p);p.I(c.Mesh).renderOrder=101;p.I(c.Geometry).geometry=
new THREE.SphereGeometry;p.I(c.ld);return p};d.prototype.Ng=function(){this.PK.J(c.ld).color=this.K.get("draggableXControlsColor");this.OK.J(c.ld).color=this.K.get("draggableXControlsColor");this.RK.J(c.ld).color=this.K.get("draggableYControlsColor");this.QK.J(c.ld).color=this.K.get("draggableYControlsColor");this.TK.J(c.ld).color=this.K.get("draggableZControlsColor");this.SK.J(c.ld).color=this.K.get("draggableZControlsColor");var p=this.K.get("draggableSphereRadius");this.sg.forEach(function(r,t){r.J(c.va,
!0).scale=p*this.Q_[t]}.bind(this))};d.prototype.Lk=function(){this.PK.J(c.va,!0).positionX=this.K.get("width")/2;this.OK.J(c.va,!0).positionX=-this.K.get("width")/2;this.RK.J(c.va,!0).positionY=this.K.get("height")/2;this.QK.J(c.va,!0).positionY=-this.K.get("height")/2;this.TK.J(c.va,!0).positionZ=this.K.get("depth")/2;this.SK.J(c.va,!0).positionZ=-this.K.get("depth")/2};d.prototype.Uw=function(){var p=this.K.get("sizeDraggable");this.V!=p&&(this.V=p,this.sg.forEach(function(r){p?(r.I(c.lb).F=this.m,
this.sg.forEach(function(t){t=t.I(c.Id);t.Dy=!0;t.Ux=!0;t.N=new k;t.N.bind(m.Gc,this.vJ,this,!0);t.N.bind(m.Jb,this.Tca,this,!0);t.N.bind(m.hb,this.Rca,this,!0);t.N.bind(m.Eb,this.Sca,this,!0)}.bind(this))):(r.ia(c.lb),this.sg.forEach(function(t){t.ia(c.Id)}.bind(this)))}.bind(this)))};d.prototype.s_a=function(p){for(var r=!1,t=0;t<this.Q_.length&&!r;t++)r=this.Q_[t]!=p[t];r&&(this.Q_=p,this.Ng())};d.prototype.vJ=function(p){(p=this.qw(p))&&p!=this.we&&(p.J(c.ld).opacity=1)};d.prototype.Tca=function(p){(p=
this.qw(p))&&p!=this.we&&(p.J(c.ld).opacity=.5)};d.prototype.qw=function(p){p=this.sg.map(function(r){return r.getComponent(c.Id).N}).indexOf(p.source);return-1==p?null:this.sg[p]};d.prototype.Rca=function(p){p=this.qw(p);this.hR(p)};d.prototype.Sca=function(p){p=this.qw(p);p==this.we&&(this.hR(null),this.Lk(),(p=-1!=this.sg.indexOf(p))&&this.K.trigger(m.Gl),p&&this.K.trigger(m.coa))};d.prototype.hR=function(p){this.we&&(this.we.J(c.ld).opacity=.5,this.UI(this.we).ia(c.hv));if(this.we=p)this.we.J(c.ld).opacity=
1,p=this.UI(this.we).I(c.hv),p.direction=this.uTa(this.we),p.min=this.vTa(this.we)};d.prototype.uTa=function(p){var r=h.getWorldPosition(this.m);return h.getWorldPosition(p).sub(r)};d.prototype.UI=function(p){return-1!=this.sg.indexOf(p)?p:null};d.prototype.vTa=function(p){var r=this.ZTa(p);if(r){r=h.getWorldPosition(r);var t=h.getWorldPosition(p).sub(r);switch(p){case this.PK:case this.OK:var u=this.K.get("minWidth");break;case this.RK:case this.QK:u=this.K.get("minHeight");break;case this.TK:case this.SK:u=
this.K.get("minDepth")}return r.add(t.setLength(u||e))}};d.prototype.ZTa=function(p){switch(p){case this.PK:return this.OK;case this.OK:return this.PK;case this.RK:return this.QK;case this.QK:return this.RK;case this.TK:return this.SK;case this.SK:return this.TK}return null};d.prototype.dispose=function(){l.ca(this.K,g,this.Ng);l.ca(this.K,n,this.Lk);l.ca(this.K,q,this.Uw);var p=this.nb.P;this.nw.forEach(function(r){p.Hd(r)});this.K=this.nb=this.sg=this.m=this.nw=null};var e=1E-6,g=["draggableSphereRadius",
"draggableXControlsColor","draggableYControlsColor","draggableZControlsColor"],n="depth height x y z width".split(" "),q=["sizeDraggable"];return d});
define("cB","require lh pB gF fU o".split(" "),function(a){function d(g,n,q){this.nb=g;this.K=q;this.Lk=this.Lk.bind(this);this.Ng=this.Ng.bind(this);this.Vw=this.Vw.bind(this);this.m=this.JQa();g=this.m.I(c.lb);g.F=this.nb;g.id=this.K.get("parentId");this.ft=this.E9();this.ft.I(c.lb).F=this.m;this.pO=this.XQa();this.pO.I(c.lb).F=this.m;this.nw=[this.m,this.ft,this.pO];this.A$=new h(this.nb,this.m,this.K);g=this.m.I(c.Id);g.Ux=!0;g.Dy=!0;g.N=this.K;l.da(this.K,f,this.Ng,!0);l.da(this.K,b,this.Lk,
!0);l.da(this.K,e,this.Vw,!0);this.K.trigger(m.kd)}var l=a("lh"),m=a("pB"),k=a("gF"),c=a("fU"),h=a("o");d.prototype.frame=function(){this.A$.frame()};d.prototype.JQa=function(){var g=this.nb.P.Nc("Box");g.I(c.Group);return g};d.prototype.E9=function(){var g=this.nb.P.Nc("BoxBorder");g.I(c.Line);g.I(c.Geometry).geometry=this.KQa();g.I(c.uh);return g};d.prototype.XQa=function(){var g=this.nb.P.Nc("BoxFace");g.I(c.Mesh);var n=g.I(c.vh);n.castShadow=!1;n.receiveShadow=!1;g.I(c.Geometry).geometry=new THREE.BoxGeometry(1,
1,1);g.I(c.ld);return g};d.prototype.KQa=function(){var g=[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(g)};d.prototype.Ng=function(){var g=this.ft.J(c.uh);g.color=this.K.get("lineColor");g.opacity=this.K.get("lineOpacity");g.width=this.K.get("lineWidth");g.depthTest=this.K.get("depthTest");g=this.pO.J(c.ld);g.color=
this.K.get("faceColor");g.opacity=this.K.get("faceOpacity");g.depthTest=this.K.get("depthTest");g=this.m.J(c.Id,!0);g.mH=this.K.get("useHandCursor");g.GM=this.K.get("transparentAreaActive")};d.prototype.Lk=function(){var g=this.m.J(c.va,!0);g.positionX=this.K.get("x");g.positionY=this.K.get("y");g.positionZ=this.K.get("z");g=this.ft.J(c.va,!0);var n=this.pO.J(c.va,!0);n.sf=g.sf=this.K.get("width");n.Gf=g.Gf=this.K.get("height");n.oh=g.oh=this.K.get("depth")};d.prototype.Vw=function(){if(this.K.get("positionDraggable")){var g=
this.m.J(c.Xg,!0);g.N||(g.N=new k,g.N.bind(m.ba,this.rl,this,!0));g.translate=this.K.get("positionDraggable")||!1;g.rotate=!1;g.scale=!1}else(g=this.m.getComponent(c.Xg))&&g.N.unbind(m.ba,this.rl,this),this.m.ia(c.Xg)};d.prototype.rl=function(g){this.K.set({x:g.data.position.x,y:g.data.position.y,z:g.data.position.z});this.K.trigger(m.Gl)};d.prototype.dispose=function(){this.A$.dispose();this.A$=null;l.ca(this.K,e,this.Vw);l.ca(this.K,f,this.Ng);l.ca(this.K,b,this.Lk);var g=this.nb.P;this.nw.forEach(function(n){g.Hd(n)});
this.nb=this.pO=this.ft=this.m=this.nw=null;this.K.trigger(m.cd);this.K=null};var f=["transparentAreaActive","useHandCursor"],b="depth height x y z width".split(" "),e=["positionDraggable"];return d});
define("cS","require lh pB gF fU cv".split(" "),function(a){function d(w,x,y){this.nb=w;this.m=x;this.K=y;this.JE=this.JE.bind(this);this.Ng=this.Ng.bind(this);this.Uw=this.Uw.bind(this);this.we=null;this.V=!1;this.gW=this.It=1;this.ht=this.nb.P.Nc("DraggingSize2DContainer");this.ht.I(c.Group);this.ht.I(c.va);this.sg=[this.oca=this.Cq(),this.hca=this.Cq(),this.Jea=this.Cq(),this.pea=this.Cq()];this.sg.forEach(function(z){z.I(c.va);z=z.J(c.ld);z.color="#ffffff";z.opacity=.5;z.depthTest=!1}.bind(this));
this.ft=this.E9();this.nw=[this.ht,this.ft].concat(this.sg);[this.ft].concat(this.sg).forEach(function(z){z.I(c.lb).F=this.ht}.bind(this));l.da(this.K,u,this.JE,!0);l.da(this.K,t,this.Ng,!0);l.da(this.K,v,this.Uw,!0)}var l=a("lh"),m=a("pB"),k=a("gF"),c=a("fU"),h=a("cv"),f=new THREE.Matrix4,b=new THREE.Vector3,e=new THREE.Vector3,g=new THREE.Quaternion,n=new THREE.Vector3,q=new THREE.Vector3,p=new THREE.Euler,r=180/Math.PI;d.prototype.frame=function(){if(this.V){var w=h.Xc(this.ht),x=w&&h.lT(w),y=
x&&h.Cu(x);if(y){if(this.we){var z=h.oT(x);x=h.yB(x);h.getWorldPosition(this.m,q).project(y);q.x=(q.x+1)*z*.5;q.y=(1-q.y)*x*.5;h.getWorldPosition(this.we,n).project(y);n.x=(n.x+1)*z*.5;n.y=(1-n.y)*x*.5;z=this.K.get("anchorX");x=this.K.get("anchorY");var B,D,F=q.x-n.x,A=n.y-q.y,E=-F,J=-A;this.hca===this.we&&(0<z||1>x)?F>A?B=F/z:D=A/(1-x):this.pea===this.we&&(1>z||1>x)?E>A?B=E/(1-z):D=A/(1-x):this.oca===this.we&&(0<z||0<x)?F>J?B=F/z:D=J/x:this.Jea===this.we&&(1>z||0<x)&&(E>J?B=E/(1-z):D=J/x);void 0!==
D&&void 0===B?B=D*this.tpa:void 0!==B&&void 0===D&&(D=B/this.tpa);void 0!==B&&void 0!==D&&(z=this.K.get("sizeAttenuation")?this.It/this.gW:1,this.K.set("width",this.sa=B*z),this.K.set("height",this.wa=D*z))}B=this.ht.getComponent(c.va);f.copy(w.parent.matrixWorld).invert().multiply(y.matrixWorld).decompose(b,g,e);p.setFromQuaternion(g,B.Ge);p.x*=r;p.y*=r;p.z*=r;if(B.Rd!=p.x||B.ud!=p.y||B.He!=p.z)B=this.ht.J(c.va),B.Rd=p.x,B.ud=p.y,B.He=p.z;w.parent.getWorldScale(b);this.uZa(1/Math.max(b.x,b.y,b.z));
this.$ea(h.fG(this.ht)||1)}}};d.prototype.L1a=function(w,x){null!=this.mga&&clearTimeout(this.mga);this.mga=setTimeout(function(){this.mga=null;if(this.sa!==w||this.wa!==x)this.sa=w,this.wa=x,this.tpa=this.sa/this.wa}.bind(this),100)};d.prototype.Cq=function(){var w=this.nb.P.Nc("DraggingSphere");w.I(c.Mesh).renderOrder=2;w.I(c.Geometry).geometry=new THREE.SphereGeometry;w.I(c.ld);return w};d.prototype.E9=function(){var w=this.nb.P.Nc("BoxBorder");w.I(c.Line);w.I(c.Geometry).geometry=this.vRa();var x=
w.I(c.uh);x.color="#0000ff";x.depthTest=!1;x.width=1;return w};d.prototype.vRa=function(){var w=[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(w)};d.prototype.Ng=function(){var w=this.ft.J(c.uh);w.color=this.K.get("draggableLineColor");w.opacity=this.K.get("draggableLineOpacity");
w.width=this.K.get("draggableLineWidth");this.sg.forEach(function(x){x.J(c.ld).color=this.K.get("draggableSphereColor");x.J(c.va).scale=this.K.get("draggableSphereRadius")*this.It}.bind(this))};d.prototype.$ea=function(w){this.It!=w&&(this.It=w,this.JE(),this.Ng())};d.prototype.uZa=function(w){this.gW!=w&&(this.gW=w,this.JE(),this.Ng())};d.prototype.JE=function(){var w=this.K.get("anchorX"),x=this.K.get("anchorY"),y=this.K.get("width"),z=this.K.get("height"),B=this.K.get("sizeAttenuation")?this.gW:
this.It,D=this.oca.J(c.va,!0);D.positionX=-w*y*B;D.positionY=x*z*B;D=this.Jea.J(c.va,!0);D.positionX=(1-w)*y*B;D.positionY=x*z*B;D=this.hca.J(c.va,!0);D.positionX=-w*y*B;D.positionY=(x-1)*z*B;D=this.pea.J(c.va,!0);D.positionX=(1-w)*y*B;D.positionY=(x-1)*z*B;D=this.ft.J(c.va,!0);D.positionX=(.5-w)*y*B;D.positionY=(x-.5)*z*B;D.sf=y*B;D.Gf=z*B;this.L1a(y,z)};d.prototype.Uw=function(){var w=this.K.get("sizeDraggable");this.V!=w&&((this.V=w)?(this.ht.I(c.lb).F=this.m,this.sg.forEach(function(x){x=x.I(c.Id);
x.Dy=!0;x.Ux=!0;x.N=new k;x.N.bind(m.Gc,this.vJ,this,!0);x.N.bind(m.Jb,this.Tca,this,!0);x.N.bind(m.hb,this.Rca,this,!0);x.N.bind(m.Eb,this.Sca,this,!0)}.bind(this))):(this.ht.ia(c.lb),this.sg.forEach(function(x){x.ia(c.Id)}.bind(this))))};d.prototype.vJ=function(w){(w=this.qw(w))&&w!=this.we&&(w.J(c.ld).opacity=1)};d.prototype.Tca=function(w){(w=this.qw(w))&&w!=this.we&&(w.J(c.ld).opacity=.5)};d.prototype.Rca=function(w){w=this.qw(w);this.hR(w)};d.prototype.Sca=function(w){(w=this.qw(w))&&w==this.we&&
(this.hR(null),this.JE(),(w=-1!=this.sg.indexOf(w))&&this.K.trigger(m.Gl),w&&this.K.trigger(m.coa))};d.prototype.qw=function(w){w=this.sg.map(function(x){return x.getComponent(c.Id).N}).indexOf(w.source);if(-1==w)return null;w=this.sg[w];return this.EVa(w)?w:null};d.prototype.EVa=function(w){var x=this.K.get("anchorX"),y=this.K.get("anchorY");return this.hca===w&&(0<x||0<y)||this.pea===w&&(1>x||0<y)||this.oca===w&&(0<x||1>y)||this.Jea===w&&(1>x||1>y)?!0:!1};d.prototype.hR=function(w){this.we&&(this.we.J(c.ld).opacity=
.5,this.UI(this.we).ia(c.hv));if(this.we=w){this.we.J(c.ld).opacity=1;var x=this.UI(this.we).I(c.hv),y=h.getWorldPosition(this.m);w=h.getWorldPosition(w);w=(new THREE.Vector3).copy(w).sub(y);var z=Math.min(w.length(),10*this.It);y=(new THREE.Vector3).copy(y).add(b.copy(w).setLength(z));x.direction=w;x.min=y}};d.prototype.UI=function(w){return-1!=this.sg.indexOf(w)?w:null};d.prototype.dispose=function(){l.ca(this.K,u,this.JE);l.ca(this.K,t,this.Ng);l.ca(this.K,v,this.Uw);var w=this.nb.P;this.nw.forEach(function(x){w.Hd(x)});
this.K=this.nb=this.sg=this.m=this.nw=null};var t=["draggableLineColor","draggableLineOpacity","draggableLineWidth","draggableSphereColor","draggableSphereRadius"],u="anchorX anchorY height sizeAttenuation x y z width".split(" "),v=["sizeDraggable"];return d});
define("iE","require lh pB iy gF fU cS cv".split(" "),function(a){function d(x,y,z,B,D){this.nb=x;this.Oe=z;this.Qi=B;this.K=D;this.Lk=this.Lk.bind(this);this.ZP=this.ZP.bind(this);this.Ng=this.Ng.bind(this);this.PZ=this.PZ.bind(this);this.Vw=this.Vw.bind(this);this.eh=this.Oe.qu(1);this.Xpa=new THREE.Vector3;this.NW=new THREE.Euler;this.K.get("preload")&&this.Qi.UK(this.eh);this.m=this.nb.P.Nc("SpriteContainer");this.m.I(h.Group);x=this.m.I(h.lb);x.F=this.nb;x.id=this.K.get("parentId");this.OR=this.nb.P.Nc("TranslationSpriteContainer");
this.OR.I(h.Group);this.OR.I(h.lb).F=this.m;this.Ut=this.nb.P.Nc("Sprite");this.Ut.I(h.lb).F=this.OR;x=this.Ut.I(h.Bl);x.properties=this.K;x.v3=this.K.get("image");x.N=this.K;x.Ep=this.eh;x.isSprite=!0;x.priority=this.K.get("preload")?k.QC:k.qna;this.Ut.I(h.Id).N=this.K;this.Ut.I(h.az);this.Ut.I(h.ZM).object=this.K;this.ica=!1;this.It=1E-4;this.Gw=this.m.P.Nc("TranslationLine");this.Gw.I(h.Line);this.Gw.I(h.uh);this.z$=new f(this.nb,this.OR,this.K);l.da(this.K,w,this.Vw,!0);l.da(this.K,r,this.Lk,
!0);l.da(this.K,u,this.ZP,!0);l.da(this.K,v,this.Ng,!0);l.da(this.K,t,this.PZ,!0)}var l=a("lh"),m=a("pB"),k=a("iy"),c=a("gF"),h=a("fU"),f=a("cS"),b=a("cv");d.prototype.frame=function(){this.z$.frame();this.$ea(b.fG(this.m)||1E-4)};d.prototype.Lk=function(){this.m.I(h.lb).id!=this.K.get("parentId")&&(this.m.J(h.lb).id=this.K.get("parentId"));var x=this.m.J(h.va,!0);x.translationX=this.K.get("x");x.translationY=this.K.get("y");x.Je=this.K.get("z")};d.prototype.$ea=function(x){this.It!=x&&(this.It=x,
this.K.set("worldPixelScale",b.qEa(this.m)),this.ZP())};d.prototype.ZP=function(){var x=this.m.J(h.va,!0),y=this.OR.J(h.va,!0),z=this.Gw.J(h.va,!0),B=this.K.get("translationLength");n.set(this.K.get("translationX"),this.K.get("translationY"),this.K.get("translationZ"));B=void 0!==B?B*this.It:n.length();if(this.Xpa.equals(n)){var D=this.NW.x;var F=this.NW.y;var A=this.NW.z}else e.setFromUnitVectors(q,n.normalize()),F=Math.atan2(n.x,n.z),D=-Math.atan2(n.y,Math.sqrt(n.x*n.x+n.z*n.z)),A=0;y.translationX=
0;y.translationX=0;y.translationY=0;y.Je=B;z.scale=B;x.Rd=D*p;x.ud=F*p;x.He=A*p;x.Ge="YXZ";this.DAa()};var e=new THREE.Quaternion,g=new THREE.Euler,n=new THREE.Vector3,q=new THREE.Vector3(0,0,1),p=180/Math.PI;d.prototype.Ng=function(){var x=this.Ut.J(h.Id,!0);x.mH=this.K.get("useHandCursor");x.GM=this.K.get("transparentAreaActive");x.Ux=this.K.get("clickEnabled");x.Dy=this.K.get("rollOverEnabled");x=this.Gw.J(h.uh);x.color=this.K.get("translationLineColor");x.depthTest=this.K.get("depthTest");x.opacity=
this.K.get("hidden")?0:this.K.get("translationLineOpacity");x.transparent=!1;x.width=this.K.get("translationLineWidth");this.DAa();x=this.Gw.J(h.Line,!0);var y=this.Ut.J(h.Sprite,!0);x.renderOrder=y.renderOrder=this.K.get("depthTest")?0:2};d.prototype.PZ=function(){var x=this.Ut.J(h.Sprite,!0);x.VK=this.K.get("anchorX");x.WK=this.K.get("anchorY");x.width=this.K.get("width");x.height=this.K.get("height");x.scale=this.K.get("scale");x.sizeAttenuation=this.K.get("sizeAttenuation")};d.prototype.Vw=function(){if(this.K.get("positionDraggable")||
this.K.get("translationDraggable")){var x=this.m.J(h.Xg,!0);x.N||(x.N=new c,x.N.bind(m.ba,this.rl,this,!0));x.translate=this.K.get("positionDraggable")||!1;x.rotate=this.K.get("translationDraggable")||!1;x.scale=!1}else(x=this.m.getComponent(h.Xg))&&x.N.unbind(m.ba,this.rl,this),this.m.ia(h.Xg)};d.prototype.rl=function(x){var y=n.set(this.K.get("translationX"),this.K.get("translationY"),this.K.get("translationZ")).length();g.setFromQuaternion(x.data.quaternion,this.m.getComponent(h.va).Ge);n.copy(q).setLength(y).applyQuaternion(x.data.quaternion);
this.Xpa.copy(n);this.NW.copy(g);this.K.set({x:x.data.position.x,y:x.data.position.y,z:x.data.position.z,translationX:n.x,translationY:n.y,translationZ:n.z});this.K.trigger(m.Gl)};d.prototype.DAa=function(){var x=this.K.get("translationLineVisible")&&0<this.K.get("translationLineOpacity")&&(0!=this.K.get("translationX")||0!=this.K.get("translationY")||0!=this.K.get("translationZ"));this.ica!=x&&((this.ica=x)?this.Gw.I(h.lb).F=this.m:this.Gw.ia(h.lb))};d.prototype.dispose=function(){this.z$.dispose();
this.z$=null;l.ca(this.K,w,this.Vw);l.ca(this.K,r,this.Lk);l.ca(this.K,u,this.ZP);l.ca(this.K,v,this.Ng);l.ca(this.K,t,this.PZ);this.Oe.lM(this.eh);this.Qi.lM(this.eh);this.eh=this.Qi=this.Oe=null;var x=this.nb.P;this.nb=null;x.Hd(this.Ut);this.Ut=null;x.Hd(this.Gw);this.Gw=null;x.Hd(this.m);this.K=this.m=null};var r=["parentId","x","y","z"],t="anchorX anchorY width height scale sizeAttenuation".split(" "),u=["translationX","translationY","translationZ","translationLength"],v="clickEnabled depthTest hidden rollOverEnabled transparentAreaActive translationLineColor translationLineOpacity translationLineVisible translationLineWidth useHandCursor".split(" "),
w=["positionDraggable","translationDraggable"];return d});define("gr",["require","fq","cB","iE"],function(a){var d=a("fq"),l=a("cB"),m=a("iE");return{create:function(k,c,h,f,b){return d.Ja("SpriteModel3DObject",b)?new m(k,c,h,f,b):d.Ja("BoxModel3DObject",b)?new l(k,c,b):null}}});
define("lB",["require","lh","pY","fU","gr"],function(a){function d(h,f,b,e){this.m=h;this.Lo=f;this.Oe=b;this.Qi=e;this.Iua=new m(this.Qi.qu(.1));this.Hua=new m(this.Oe.qu(.1));this.KE=this.KE.bind(this);this.Px=h.P;this.o=this.m.getComponent(k.Xh).properties;this.Ha=(h=this.m.getComponent(k.Object3D))&&h.qa;this.dk=[];this.tZ=new Map;l.da(this.o,["objects.enabled"],this.KE,!0)}var l=a("lh"),m=a("pY"),k=a("fU"),c=a("gr");d.prototype.update=function(){var h=this.m.getComponent(k.Object3D);h=h&&h.qa;
if(this.Ha!==h){var f=this.Ha;this.Ha=h;this.z1(!!f)}};d.prototype.frame=function(){this.tZ.forEach(function(h){h&&h.frame&&h.frame()})};d.prototype.dispose=function(){this.Ha=null;l.ca(this.o,["objects.enabled"],this.KE);this.Kya([])};d.prototype.KE=function(){this.z1()};d.prototype.z1=function(h){var f=this.o.get("objects").filter(function(b){return b.get("enabled")});this.Kya(f,h);this.Iua.update();this.Hua.update()};d.prototype.Kya=function(h,f){if(this.dk!=h||f)this.dk.forEach(function(b){(f||
0>h.indexOf(b))&&this.RYa(b)}.bind(this)),h.forEach(function(b){(f||0>this.dk.indexOf(b))&&this.lOa(b)}.bind(this)),this.dk=h};d.prototype.lOa=function(h){this.tZ.set(h,c.create(this.m,this.Lo,this.Hua,this.Iua,h))};d.prototype.RYa=function(h){var f=this.tZ.get(h);f&&f.dispose();this.tZ["delete"](h)};return d});
define("kO",["require","pB","fU"],function(a){function d(h,f){this.m=h;this.Lo=f;this.Eh=this.Ha=this.o=null;this.Ti(this.m.getComponent(m.Xh).properties);this.update()}var l=a("pB"),m=a("fU");d.prototype.frame=function(){this.update()};d.prototype.update=function(){var h=this.Lo.getComponent(m.Object3D);h=h&&h.qa;this.Ha!=h&&(this.Ha=h,this.mD())};d.prototype.Ti=function(h){this.o&&k.forEach(function(f){this.o.unbind(l.G(f),this.mD,this,!1)}.bind(this));if(this.o=h)k.forEach(function(f){this.o.bind(l.G(f),
this.mD,this,!1)}.bind(this)),this.mD()};d.prototype.mD=function(){this.Jya(this.o.get("model"));this.Ha&&this.m.P.Ta()};d.prototype.Jya=function(h){this.Eh!=h&&(this.Eh&&c.forEach(function(f){this.Eh.unbind(l.G(f),this.J8,this,!1)}.bind(this)),this.Eh=h)&&(c.forEach(function(f){this.Eh.bind(l.G(f),this.J8,this,!1)}.bind(this)),this.J8())};d.prototype.J8=function(){var h=this.Lo.J(m.va,!0);h.positionX=this.Eh.get("positionX");h.positionY=this.Eh.get("positionY");h.positionZ=this.Eh.get("positionZ");
h.Ge=this.Eh.get("rotationOrder");h.Rd=this.Eh.get("rotationX");h.ud=this.Eh.get("rotationY");h.He=this.Eh.get("rotationZ");h.scale=this.Eh.get("scale");h.sf=this.Eh.get("invertX")?-1:1;h.Gf=this.Eh.get("invertY")?-1:1;h.oh=this.Eh.get("invertZ")?-1:1;h.translationX=this.Eh.get("translationX");h.translationY=this.Eh.get("translationY");h.Je=this.Eh.get("translationZ")};d.prototype.dispose=function(){this.Ha=null;this.Jya(null);this.Ti(null)};var k=["model"],c="invertX invertY invertZ positionX positionY positionZ rotationOrder rotationX rotationY rotationZ scale translationX translationY translationZ".split(" ");
return d});
define("bY","require pB cI pY fU eO lB kO".split(" "),function(a){function d(e){this.m=e;this.m.I(c.Group);e=this.m.getComponent(c.Xh);this.Lo=e.QF;this.Qi=new k(e.FHa);this.Oe=new k(e.Ep);this.ne=e.N;this.ed=new h(this.m,this.Lo,this.Oe,this.Qi);this.dk=new f(this.m,this.Lo,this.Oe,this.Qi);this.o=new b(this.m,this.Lo)}var l=a("pB"),m=a("cI"),k=a("pY"),c=a("fU"),h=a("eO"),f=a("lB"),b=a("kO");d.prototype.update=function(){this.ed.update();this.dk.update();this.o.update()};d.prototype.frame=function(){this.ed.frame();
this.dk.frame();this.o.frame();this.ne.trigger(new m(l.Vh))};d.prototype.dispose=function(){this.ed&&(this.ed.dispose(),this.ed=null);this.dk&&(this.dk.dispose(),this.dk=null);this.o&&(this.o.dispose(),this.o=null);this.Oe&&(this.Oe.dispose(),this.Oe=null);this.ne=this.Lo=null};d.$a=function(e){e.I(c.sv).manager=new d(e)};d.Ca=function(e){var g=e.getComponent(c.sv);g.manager.dispose();g.manager=null;e.ia(c.sv)};d.update=function(e){e.getComponent(c.sv).manager.update()};d.frame=function(e){e.getComponent(c.sv).manager.frame()};
return d});define("lE",["require","lV","mf","fU","bY"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("bY");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.TFa.u.length&&this.TFa.u.slice().forEach(k.$a);this.Z3.Ea.length&&this.Z3.Ea.slice().forEach(k.update);this.Z3.u.length&&this.Z3.u.slice().forEach(k.frame);this.UFa.u.length&&this.UFa.u.slice().forEach(k.Ca)};a.H={};a.H.TFa=[m.Xh,m.sv.not];a.H.Z3=[m.Xh,m.sv];a.H.UFa=[m.Xh.not,m.sv];return a});
define("cq",["require","fU","cv"],function(a){function d(k){this.m=k;this.qe=null}var l=a("fU"),m=a("cv");d.prototype.frame=function(){if(!this.qe){var k=this.m.getComponent(l.KH),c=m.Xc(k.container);if(this.qe=c&&k.id&&m.uB(c,k.id)||null)this.m.I(l.Object3D).qa=this.qe,this.m.P.Ta()}};d.prototype.update=function(){this.qe&&(this.m.ia(l.Object3D),this.qe=null)};d.prototype.dispose=function(){this.qe&&(this.m.ia(l.Object3D),this.qe=null)};d.$a=function(k){k.I(l.tv).manager=new d(k)};d.Ca=function(k){var c=
k.getComponent(l.tv);c.manager.dispose();c.manager=null;k.ia(l.tv)};d.frame=function(k){k.getComponent(l.tv).manager.frame()};d.update=function(k){k.getComponent(l.tv).manager.update()};return d});
define("hA",["require","lV","mf","fU","cq"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("cq");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.jGa.u.length&&this.jGa.u.slice().forEach(k.$a);this.g4.Ea.length&&this.g4.Ea.slice().forEach(k.update);this.g4.u.length&&this.g4.u.slice().forEach(k.frame);this.kGa.u.length&&this.kGa.u.slice().forEach(k.Ca)};a.H={};a.H.jGa=[m.KH,m.tv.not];a.H.g4=[m.KH,m.tv];a.H.kGa=[m.KH.not,m.tv];return a});
define("oG",["require","fU","ov"],function(a){function d(k){this.m=k;this.WD=new THREE.PlaneGeometry;this.gua=this.m.I(l.Object3D).qa=new THREE.Mesh(this.WD);this.update()}var l=a("fU"),m=a("ov");d.prototype.update=function(){var k=this.m.getComponent(l.Material).material;k&&m.mB(this.gua,k);this.gua.renderOrder=this.m.getComponent(l.Plane).renderOrder};d.prototype.dispose=function(){this.WD.dispose();this.WD=null};d.$a=function(k){k.I(l.wv).manager=new d(k)};d.Ca=function(k){var c=k.getComponent(l.wv);
c.manager.dispose();c.manager=null;k.ia(l.wv);k.ia(l.Object3D)};d.update=function(k){k.getComponent(l.wv).manager.update()};return d});
define("hv",["require","lV","mf","fU","oG"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("oG");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.cU.u.length&&this.cU.u.slice().forEach(k.$a);this.planes.Ea.length&&this.planes.Ea.slice().forEach(k.update);this.sHa.u.length&&this.sHa.u.slice().forEach(k.Ca);this.tHa.u.length&&this.tHa.u.slice().forEach(k.Ca)};a.H={};a.H.cU=[m.Material,m.Plane,m.wv.not];a.H.planes=[m.Plane,m.Material,m.wv];a.H.sHa=[m.Plane.not,m.wv];
a.H.tHa=[m.Material.not,m.wv];return a});
define("io",["require","fU","cv"],function(a){var d=a("fU"),l=a("cv");return{$a:function(m){var k=m.getComponent(d.lb),c=l.Xc(k.F);if(c){var h=m.I(d.Rs);h.parent=c;k.id&&(c=c&&l.uB(c,k.id));h.id=k.id;h.Pd=l.Xc(m);h.attach=k.attach;c&&h.Pd&&(h.attach?c.attach(h.Pd):c.add(h.Pd))}},update:function(m){var k=m.getComponent(d.lb),c=m.getComponent(d.Rs),h=l.Xc(k.F),f=l.Xc(m);if(c.parent!=h||c.Pd!=f||k.id!=c.id||k.attach!=c.attach||f&&h&&!f.parent)c=m.J(d.Rs),c.Pd&&c.Pd.parent&&(k.F.J(d.Object3D),c.Pd.parent.remove(c.Pd)),
c.parent=h,k.id&&(h=h&&l.uB(h,k.id)),c.id=k.id,c.Pd=f,c.attach=k.attach,h&&c.Pd&&(c.attach?h.attach(c.Pd):h.add(c.Pd),(k=m.getComponent(d.va))&&l.MU(m,k))},Ca:function(m){var k=m.getComponent(d.Rs);k.Pd&&k.Pd.parent&&k.Pd.parent.remove(k.Pd);k.parent=null;k.Pd=null;k.id=void 0;m.ia(d.Rs)}}});
define("nv",["require","lV","mf","fU","io"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("io");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.VT.u.length&&this.VT.u.slice().forEach(k.$a);this.es.u.length&&this.es.u.slice().forEach(k.update);this.es.Ea.length&&this.es.Ea.slice().forEach(k.update);this.es.Nd.length&&this.es.Nd.slice().forEach(k.update);this.lCa.u.length&&this.lCa.u.slice().forEach(k.Ca);this.mCa.u.length&&this.mCa.u.slice().forEach(k.Ca)};a.H=
{};a.H.VT=[m.Object3D,m.lb,m.Rs.not];a.H.es=[m.Object3D,m.lb,m.Rs];a.H.lCa=[m.Object3D.not,m.lb,m.Rs];a.H.mCa=[m.lb.not,m.Rs];return a});
define("dr",["require","lV","mf","fU","cv"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("cv");a=d.extend(l,function(){l.apply(this,arguments);this.Wb=this.Wb.bind(this);this.kb=this.kb.bind(this);this.zf=this.zf.bind(this)});a.prototype.Wc=function(){this.oHa.u.length&&this.oHa.u.slice().forEach(this.Wb);this.nHa.u.length&&this.nHa.u.slice().forEach(this.zf);this.pHa.u.length&&this.pHa.u.slice().forEach(this.kb);this.qHa.u.length&&this.qHa.u.slice().forEach(this.kb)};a.prototype.Wb=function(f){f.I(m.WC)};
a.prototype.kb=function(f){f.ia(m.WC)};var c=new THREE.Matrix4,h=new THREE.Vector3;a.prototype.zf=function(f){var b=f.getComponent(m.Qj),e=f.getComponent(m.va);if(e){var g=f.getComponent(m.Object3D).qa;if(g&&g.parent){var n=f.getComponent(m.Zf),q=1E-7;n&&(q=k.fG(f)||q);c.copy(g.parent.matrixWorld).invert();h.setFromMatrixScale(c);g=Math.max(h.x,h.y,h.z);n&&n.Rx&&(q/=g,g=1);n=b.scale*g;void 0!==b.GB&&(n=Math.min(b.GB*q,n));void 0!==b.HB&&(n=Math.max(b.HB*q,n));if(e.scale!=n||e.sf!=b.sf||e.Gf!=b.Gf||
e.oh!=b.oh)e=f.J(m.va),e.scale=n,e.sf=b.sf,e.Gf=b.Gf,e.oh=b.oh}}};a.H={};a.H.oHa=[m.Object3D,m.Qj,m.WC.not];a.H.nHa=[m.Object3D,m.Qj,m.WC];a.H.pHa=[m.Object3D.not,m.WC];a.H.qHa=[m.Qj.not,m.WC];return a});
define("ea",["require","pB","fU","cv"],function(a){function d(u){this.m=u;this.EP=new THREE.Vector3;this.gb=new THREE.Vector3;this.tba=this.pd=this.Yfa=!1;this.SJ=null;this.update()}var l=a("pB"),m=a("fU"),k=a("cv");d.prototype.update=function(){this.tda=this.m.getComponent(m.yk).F};d.prototype.frame=function(){this.LAa();this.Ox()};d.prototype.LAa=function(){var u=(t.get(this.m.P)||[]).map(function(v){return v.getComponent(m.Fc)}).filter(function(v){return v&&v.N}).reduce(function(v,w){return!v||
!v.Zi&&w.Zi?w:v},null);u=u&&u.N;this.SJ!==u&&(this.SJ&&this.VYa(this.SJ),(this.SJ=u)&&this.qOa(this.SJ))};d.prototype.qOa=function(u){u.bind(l.Pb,this.Pf,this,!0);u.bind(l.Jb,this.cr,this,!0)};d.prototype.VYa=function(u){u.unbind(l.Pb,this.Pf,this);u.unbind(l.Jb,this.cr,this)};d.prototype.Pf=function(u){if(this.tda&&k.uB(k.Xc(this.tda),u.data.objectId)&&["mesh","gs"].includes(u.data.type)){var v=this.pd;this.pd=!0;var w=k.Xc(this.m);if((w=w&&w.parent)&&w.matrixWorld){var x=this.m.getComponent(m.yk);
x&&(h.setFromMatrixPosition(w.matrixWorld),f.copy(w.matrixWorld).invert(),b.fromArray(u.data.objectMatrixWorld),c.setFromMatrixPosition(b),e.copy(b).invert(),x.rotate?u.data.normal?this.EP.copy(u.data.normal).applyMatrix4(b).sub(c).add(h):this.EP.copy(u.data.cameraPosition):this.EP.copy(q),this.EP.applyMatrix4(f).normalize(),this.gb.copy(u.data.position).applyMatrix4(f),this.Yfa=!0,this.m.P.Ta(),v||(u=(x=this.m.getComponent(m.yk))&&x.N)&&u.trigger(l.Gc))}}else this.cr()};var c=new THREE.Vector3,h=
new THREE.Vector3,f=new THREE.Matrix4,b=new THREE.Matrix4,e=new THREE.Matrix4;d.prototype.cr=function(){if(this.pd){this.pd=!1;this.m.P.Ta();var u=this.m.getComponent(m.yk);(u=u&&u.N)&&u.trigger(l.Jb)}};d.prototype.Ox=function(){if(this.Yfa||this.pd){this.Yfa=!1;var u=this.m.J(m.va,!0);u.positionX=0;u.positionY=0;u.positionZ=0;g.setFromUnitVectors(n,this.EP);p.setFromQuaternion(g,u.Ge);u.Rd=p.x*r;u.ud=p.y*r;u.He=p.z*r;u.translationX=this.gb.x;u.translationY=this.gb.y;u.Je=this.gb.z;u.easing=this.tba?
.4:0;this.tba||(k.MU(this.m,u),this.tba=!0)}};var g=new THREE.Quaternion,n=new THREE.Vector3(0,0,1),q=new THREE.Vector3(0,1,0),p=new THREE.Euler,r=180/Math.PI;d.prototype.dispose=function(){this.tda=null;this.LAa()};d.YG=function(u,v){t.set(u,v)};var t=new Map;d.$a=function(u){u.I(m.Ss).manager=new d(u)};d.Ca=function(u){var v=u.getComponent(m.Ss);v.manager.dispose();v.manager=null;u.ia(m.Ss)};d.frame=function(u){u.getComponent(m.Ss).manager.frame()};d.update=function(u){u.getComponent(m.Ss).manager.update()};
return d});
define("iY",["require","lV","mf","fU","ea"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("ea");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){k.YG(this.P,this.Ij.u.slice());this.vHa.u.length&&this.vHa.u.slice().forEach(k.$a);this.K4.Ea.length&&this.K4.u.slice().forEach(k.update);this.K4.u.length&&this.K4.u.slice().forEach(k.frame);this.wHa.u.length&&this.wHa.u.slice().forEach(k.Ca);this.xHa.u.length&&this.xHa.u.slice().forEach(k.Ca)};a.H={};a.H.Ij=[m.Fc];a.H.vHa=
[m.Object3D,m.yk,m.Ss.not];a.H.K4=[m.Object3D,m.yk,m.Ss];a.H.wHa=[m.Object3D.not,m.Ss];a.H.xHa=[m.yk.not,m.Ss];return a});
define("bb",["require"],function(){var a={ro:function(){this.Ibb=this.KJa=this.Hbb=this.t5=this.s5=this.r5=0;this.Ula=!1;this.WU=new THREE.CubeTexture;this.bcb=this.fKa=this.acb=this.E5=this.targetY=this.targetX=this.q5=0;this.ama=!1;this.cV=new THREE.CubeTexture;this.D5=0;this.Ge="XYZ"},xeb:function(){return new a.ro},create:function(m){var k=new THREE.ShaderMaterial;k.uniforms={sCube:{value:m.WU},sPos:{value:new THREE.Vector3},sRot:{value:new THREE.Matrix4},sEnabled:{value:!1},sCoef:{value:0},tCube:{value:m.cV},
tPos:{value:new THREE.Vector3},tRot:{value:new THREE.Matrix4},tEnabled:{value:!1},tCoef:{value:0}};k.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}";
k.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}";k.side=THREE.DoubleSide;k.depthWrite=!0;k.transparent=!0;k.needsUpdate=!0;this.update(k,m);return k},update:function(m,k){m.uniforms.sCube.value=k.WU;m.uniforms.sPos.value.set(k.r5,k.s5,k.t5);m.uniforms.sRot.value.makeRotationFromEuler(d.set(k.Hbb*l,k.KJa*l,k.Ibb*l,k.Ge));m.uniforms.sEnabled.value=
k.Ula&&0<k.q5;m.uniforms.sCoef.value=k.q5;m.uniforms.tCube.value=k.cV;m.uniforms.tPos.value.set(k.targetX,k.targetY,k.E5);m.uniforms.tRot.value.makeRotationFromEuler(d.set(k.acb*l,k.fKa*l,k.bcb*l,k.Ge));m.uniforms.tEnabled.value=k.ama&&0<k.D5;m.uniforms.tCoef.value=k.D5;m.needsUpdate=!0;return m}},d=new THREE.Euler,l=Math.PI/180;return a});
define("mO","require lV lz mf fU bb cv".split(" "),function(a){var d=a("lV");a("lz");var l=a("mf"),m=a("fU"),k=a("bb"),c=a("cv");a=d.extend(l,function(){l.apply(this,arguments);this.Wb=this.Wb.bind(this);this.kb=this.kb.bind(this);this.Ib=this.Ib.bind(this)});a.prototype.Wc=function(){this.NHa.u.length&&this.NHa.u.slice().forEach(this.kb);this.OHa.u.length&&this.OHa.u.slice().forEach(this.kb);this.MHa.u.length&&this.MHa.u.slice().forEach(this.Wb);this.LHa.Ea.length&&this.LHa.Ea.slice().forEach(this.Ib)};
a.prototype.Wb=function(f){var b=f.getComponent(m.Wm),e=(b=b&&b.jC)&&c.Xc(b),g=c.qf(b);if(e&&g){var n=f.I(m.kq);n.jC=b;n.UL=new k.ro;n.material=this.aw(n.UL);n.qa=this.rQa(e,n.material);n.zM=this.IQa(n.material);n.sy=this.pRa(n.material);n.colorSpace=c.nT(g);f.I(m.Object3D).qa=n.qa;this.Ib(f)}};a.prototype.Ib=function(f){this.Vi(f);this.M2a(f);this.L2a(f);this.o2a(f)};a.prototype.kb=function(f){var b=f.getComponent(m.kq),e=c.Xc(b.jC);e&&(e.visible=!0);b.qa&&b.qa.traverse(function(g){g.material==b.material&&
(g.material=h)});b.zM&&((e=b.zM.parent)&&c.WHa(e,b.zM),b.zM=null);b.sy&&((e=b.sy.parent)&&c.VHa(e,b.sy),b.sy=null);b.material&&(b.UL.WU=null,b.UL.cV=null,b.UL=null,b.material.dispose(),b.material=null);f.ia(m.kq);f.ia(m.Object3D)};a.prototype.Vi=function(f){var b=f.getComponent(m.Wm);f=f.getComponent(m.kq);var e=f.UL;b.VU?(e.WU!=b.VU&&(e.WU=b.VU),e.r5=b.r5,e.s5=b.s5,e.t5=b.t5,e.KJa=b.XU,e.q5=b.IJa,e.Ula=!0):(e.Ula=!1,e.q5=0);b.bV?(e.cV!=b.bV&&(e.cV=b.bV),e.targetX=b.targetX,e.targetY=b.targetY,e.E5=
b.E5,e.fKa=b.ccb,e.D5=b.dKa,e.ama=!0):(e.ama=!1,e.D5=0);k.update(f.material,e)};a.prototype.M2a=function(f){f=f.getComponent(m.Wm);var b=c.Xc(f.jC);b&&(b.visible=0<(1-(f.VU?f.IJa:0))*(1-(f.bV?f.dKa:0)))};a.prototype.L2a=function(f){var b=f.getComponent(m.Wm),e=f.getComponent(m.kq).zM;!!e.parent!=b.GJa&&(f=(f=c.qf(f)||c.qf(b.jC))&&c.Cu(f),b.GJa?f&&c.u3a(f,e):f&&c.WHa(f,e))};a.prototype.o2a=function(f){var b=f.getComponent(m.Wm),e=f.getComponent(m.kq).sy;!!e.parent!=b.sy&&(f=(f=c.qf(f)||c.qf(b.jC))&&
c.Cu(f),b.sy?f&&c.t3a(f,e):c.VHa(f,e))};var h=new THREE.MeshBasicMaterial;a.prototype.aw=function(f){f=k.create(f);f.polygonOffset=!0;f.polygonOffsetUnits=1;f.polygonOffsetFactor=-10;f.needsUpdate=!0;return f};a.prototype.rQa=function(f,b){if(this.Kra(f))return new THREE.Object3D;var e=new Map;f.traverse(function(r){if(r.material&&r.userData){var t={};r.material&&(t.material=r.material,r.material=b);r.userData&&(t.userData=r.userData,r.userData={});var u=r.children.filter(function(v){return!this.Kra(v)}.bind(this));
r.children.length!=u.length&&(t.children=r.children,r.children=u);e.set(r,t)}}.bind(this));var g=f.clone();e.forEach(function(r,t){r.material&&(t.material=r.material);r.userData&&(t.userData=r.userData);r.children&&(t.children=r.children)});for(f=[[f,g]];f.length;){var n=f.shift(),q=n[0];n=n[1];q.re&&(n.re=q.re);for(var p=0;p<q.children.length;p++)f.push([q.children[p],n.children[p]])}return g};a.prototype.Kra=function(f){return f.Hu||f.isGaussianCloud};a.prototype.IQa=function(f){return new THREE.Mesh(new THREE.BoxGeometry(2,
2,2),f)};a.prototype.pRa=function(f){f=new THREE.Mesh(new THREE.PlaneGeometry(1,1),f);f.renderOrder=10;return f};a.H={};a.H.MHa=[m.Wm,m.kq.not];a.H.LHa=[m.Wm,m.Object3D,m.kq];a.H.NHa=[m.Wm.not,m.kq];a.H.OHa=[m.Object3D.not,m.kq];return a});
define("eZ",["require","fU","pd","bM"],function(a){function d(c){this.m=c;this.enabled=!1;this.pn=null;this.mw=0;this.passes=[];this.ql=this.sl=!1;this.jf=null;this.wa=this.sa=100}var l=a("fU"),m=a("pd"),k=a("bM");d.prototype.dispose=function(){this.jf&&(this.jf.saoRenderTarget.dispose(),this.jf.blurIntermediateRenderTarget.dispose(),this.jf.beautyRenderTarget.dispose(),this.jf.normalRenderTarget.dispose(),this.jf.depthRenderTarget.dispose(),this.jf.depthMaterial.dispose(),this.jf.normalMaterial.dispose(),
this.jf.saoMaterial.dispose(),this.jf.vBlurMaterial.dispose(),this.jf.hBlurMaterial.dispose(),this.jf.materialCopy.dispose(),this.jf.depthCopy.dispose(),this.jf=null)};d.prototype.update=function(c,h,f,b,e){var g=this.m.getComponent(l.rH),n=!!g;if(this.sl=this.enabled!=n)(this.enabled=n)?(!this.jf&&c&&h&&(this.jf=new THREE.SAOPass(c,h,!1,!0)),this.pn=new m("linear",[new k("alpha",0,1,void 0)],g.TCa),this.mw=0,this.passes=[this.jf],this.ql=!0):(this.passes=[],this.ql=!1);this.enabled&&(this.pn&&(this.pn.Fb(e),
this.mw=this.pn.eb("alpha"),1==this.mw&&(this.pn=null),this.m.P.Ta()),null!==g.output&&(this.jf.params.output=g.output),this.jf.params.saoBias=g.bias/g.scale,this.jf.params.saoIntensity=this.mw*g.intensity,this.jf.params.saoScale=g.scale,this.jf.params.saoKernelRadius=g.qFa,this.jf.params.saoMinResolution=g.RFa/1E3,this.jf.params.saoBlur=0<g.Mha,this.jf.params.saoBlurRadius=g.Mha,this.jf.params.saoBlurStdDev=8,this.jf.params.saoBlurDepthCutoff=.01,(this.sa!=f||this.wa!=b)&&this.jf.setSize(this.sa=
f,this.wa=b))};return d});
define("s",["require","fU"],function(a){function d(m){this.m=m;this.enabled=!1;this.passes=[];this.ql=this.sl=!1;this.$s=null}var l=a("fU");d.prototype.dispose=function(){this.$s&&(this.$s.material.dispose(),this.$s=null)};d.prototype.update=function(m,k,c,h){m=this.m.getComponent(l.tC);m=!!m&&m.xDa;if(this.sl=this.enabled!=m)(this.enabled=m)?(this.$s||(this.$s=new THREE.ShaderPass(THREE.FXAAShader),this.$s.needsSwap=!0),this.passes=[this.$s],this.ql=!0):(this.passes=[],this.ql=!1);!this.enabled||
this.sa==c&&this.wa==h||(this.sa=c,this.wa=h,this.$s.material.uniforms.resolution.value.x=1/this.sa,this.$s.material.uniforms.resolution.value.y=1/this.wa,this.$s.setSize(c,h))};return d});
define("gt",["require","fU"],function(a){function d(m){this.m=m;this.enabled=!1;this.oM=void 0;this.pn=null;this.mw=0;this.passes=[];this.ql=this.sl=!1;this.ii=null;this.$da=new THREE.Matrix4;this.cea=new THREE.Matrix4;this.Zda=new THREE.Vector3}var l=a("fU");d.prototype.dispose=function(){this.ii&&(this.ii.dispose(),this.ii=null)};d.prototype.update=function(m,k){var c=this.m.getComponent(l.dN),h=!!c,f=c?c.jIa:void 0;if(this.sl=this.enabled!=h||this.oM!=f)(this.enabled=h)?(this.oM!=f&&this.ii&&(this.ii.dispose(),
this.ii=null),!this.ii&&m&&k&&(this.ii=new THREE.MotionBlurPass(this.oM=f),this.ii.needsSwap=!0,this.$da.copy(k.matrixWorldInverse),this.cea.copy(k.projectionMatrix),this.Zda.copy(k.position)),this.passes=[this.ii],this.ql=!0):(this.passes=[],this.ql=!1);this.enabled&&(this.ii.uniforms.inverseProjectionMatrix.value.copy(k.projectionMatrix).invert(),this.ii.uniforms.near.value=k.near,this.ii.uniforms.far.value=k.far,this.ii.uniforms.depthLimit.value=.99,this.ii.uniforms.clipToWorldMatrix.value.copy(k.matrixWorld).multiply(this.ii.uniforms.inverseProjectionMatrix.value),
this.ii.uniforms.previousWorldToClipMatrix.value.copy(this.cea).multiply(this.$da),this.ii.uniforms.cameraMove.value.copy(k.position).sub(this.Zda),this.ii.uniforms.velocityFactor.value=c.intensity);this.$da.copy(k.matrixWorldInverse);this.cea.copy(k.projectionMatrix);this.Zda.copy(k.position)};return d});
define("eT",["require","oq","fU"],function(a){function d(m){this.m=m;this.enabled=!0;this.passes=[];this.aka=this.ql=this.sl=!1;this.L0=void 0;this.bi=this.qr=this.al=null}a("oq");var l=a("fU");d.prototype.dispose=function(){this.al&&(this.al.dispose(),this.al=null);this.qr&&(this.qr=null);this.bi&&(this.bi.material.dispose(),this.bi=null)};d.prototype.update=function(m,k,c,h,f,b){f=this.m.getComponent(l.tC);b=!!f&&f.VJa&&b;if(this.sl=this.L0!==b)(this.L0=b)?(this.al||(this.al=new THREE.SSAARenderPass(m,
k),this.al.sampleLevel=f.YU,this.al.needsSwap=!0,this.al.clear=!0,this.al.clearColor=65793,this.al.clearAlpha=0),this.bi||(this.bi=new THREE.ShaderPass(THREE.CopyShader),this.bi.needsSwap=!0),this.passes=[this.al,this.bi],this.aka=this.ql=!0):(this.qr||(this.qr=new THREE.RenderPass,this.qr.clear=!0,this.qr.clearColor=65793,this.qr.clearAlpha=0),this.passes=[this.qr],this.aka=this.ql=!1);this.L0?(this.al.scene=m,this.al.camera=k,this.al.sampleLevel=f.YU,this.bi.uniforms.opacity.value=Math.pow(2,Math.round(5<
f.YU?5:f.YU)),this.al.setSize(c,h)):(this.qr.scene=m,this.qr.camera=k,this.qr.setSize(c,h))};return d});
define("oi",["require","oq","fU"],function(a){function d(c){this.m=c;this.enabled=!1;this.passes=[];this.ql=this.sl=!1;this.Hr=null;this.Jc=void 0}var l=a("oq"),m=a("fU");d.prototype.dispose=function(){this.Hr&&(this.Hr.material.dispose(),this.Hr=null)};d.prototype.update=function(){var c=this.m.getComponent(m.QH),h=!!c;if(this.sl=this.enabled!=h)(this.enabled=h)?(this.Hr||(this.Hr=new THREE.ShaderPass(k),this.Hr.needsSwap=!0),this.passes=[this.Hr],this.ql=!0):(this.passes=[],this.ql=!1);this.enabled&&
(this.Hr.uniforms.innerRadius.value=c.XEa,this.Hr.uniforms.outerRadius.value=c.hHa,this.Hr.uniforms.opacity.value=c.opacity,this.Jc!==c.color&&(this.Jc=c.color,this.Hr.uniforms.color.value=l.Qp(this.Jc)))};var k={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 d});
define("hl","require eZ s gt eT oi cv".split(" "),function(a){function d(b){this.qd=b;this.Va=this.Kb=this.Lf=null;this.wa=this.sa=void 0;this.OQ=null;this.h$=!0;this.bi=this.pt=this.j=null;this.EX=[new c(b),new l(b),new k(b),new h(b),new m(b)];this.sZ=!1}var l=a("eZ"),m=a("s"),k=a("gt"),c=a("eT"),h=a("oi"),f=a("cv");d.prototype.dispose=function(){this.j&&(this.j.domElement.style.backgroundColor=void 0);for(;this.EX.length;)this.EX.pop().dispose();this.k$();this.pt&&(this.pt.material.dispose(),this.pt=
null);this.bi&&(this.bi.material.dispose(),this.bi=null)};d.prototype.setSize=function(b,e){if(this.sa!=b||this.wa!=e)this.sa=b,this.wa=e,this.Lf&&this.Lf.setSize(this.sa,this.wa),this.j&&!this.j.xr.isPresenting&&this.j.setSize(this.sa,this.wa)};d.prototype.Xu=function(b){this.Va=b};d.prototype.setCamera=function(b){this.Kb=b};d.prototype.setRenderTarget=function(b){this.OQ!=b&&(this.OQ=b,this.k$())};d.prototype.L$a=function(b){this.h$!=b&&(this.h$=b,this.Lf&&(this.Lf.renderToScreen=b))};d.prototype.j5=
function(b){this.j!=b&&(this.j=b,this.j.setSize(this.sa,this.wa),this.k$())};d.prototype.render=function(b){this.T_a();this.Y1a(b);this.j.domElement.style.backgroundColor=this.sZ?"#000000":void 0;this.Lf.renderTarget1.mFa=!0;this.Lf.renderTarget2.mFa=!0;this.Lf.render()};d.prototype.T_a=function(){this.Lf||(this.Lf=new THREE.EffectComposer(this.j,this.OQ||void 0),this.Lf.renderToScreen=this.h$,this.Lf.setSize(this.sa,this.wa))};d.prototype.Y1a=function(b){var e=!1,g=!1;this.sZ=!1;this.EX.forEach(function(q){q.update(this.Va,
this.Kb,this.sa,this.wa,b,this.Lf.renderToScreen);e||(e=q.sl);g||(g=q.ql);this.sZ||(this.sZ=q.aka)}.bind(this));g=g&&this.j.outputColorSpace==THREE.SRGBColorSpace&&this.Lf.renderToScreen;f.Vab(this.Va,g);g&&!this.pt?(this.pt=new THREE.ShaderPass(THREE.GammaCorrectionShader),e=this.pt.needsSwap=!0):this.pt&&(this.pt.enabled=g);this.Lf.renderToScreen||this.bi?this.bi&&(this.bi.enabled=!this.Lf.renderToScreen):(this.bi=new THREE.ShaderPass(THREE.CopyShader),e=this.bi.needsSwap=!0);if(e){var n=[];this.EX.forEach(function(q){n=
n.concat(q.passes)});this.pt&&n.push(this.pt);for(this.bi&&n.push(this.bi);0<this.Lf.passes.length;)this.Lf.removePass(this.Lf.passes[this.Lf.passes.length-1]);n.forEach(function(q){this.Lf.addPass(q)}.bind(this))}};d.prototype.k$=function(){this.Lf&&(this.Lf.renderTarget1!=this.OQ&&this.Lf.renderTarget1.dispose(),this.Lf.renderTarget2!=this.OQ&&this.Lf.renderTarget2.dispose(),this.Lf=null)};return d});
define("dp","require pB kQ fU cv gz hl".split(" "),function(a){function d(n){this.nma=this.nma.bind(this);this.Ie=n;this.opacity=0;this.height=this.width=void 0;this.renderTarget=null;this.scene=void 0;this.hya=!1;this.Mea=!0;this.xU=this.camera=void 0;this.bF=!1;this.g_=void 0;this.yc=new f(n);this.update()}var l=a("pB"),m=a("kQ"),k=a("fU"),c=a("cv"),h=a("gz"),f=a("hl");d.prototype.update=function(){var n=this.Ie.getComponent(k.Scene);this.opacity=n&&n.opacity||0;this.hya=n?n.locked:!1;this.Mea=
n?n.enabled:!0;var q=n&&n.scene;this.scene!=q&&(this.scene=q,this.bF=!0,this.yc.Xu(this.scene));var p=(q=n&&n.La)&&c.dT(q),r=p&&p.width;p=p&&p.height;if(this.width!=r||this.height!=p)this.width=r,this.height=p,this.bF=!0,this.yc.setSize(this.width,this.height);n=n&&"srgb"==n.outputColorSpace?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;this.g_!=n&&(this.g_=n,this.bF=!0,c.Uab(this.scene,n));n=q&&c.Vr(q);this.camera!=n&&(this.camera=n,this.bF=!0,this.yc.setCamera(this.camera));q=q&&c.dT(q).camera;
this.xU!=q&&(this.xU=q);this.scene&&(c.Tab(this.scene,this.camera),c.Wab(this.scene,m.isPresenting?2048:this.width,m.isPresenting?2048:this.height));return this};d.prototype.render=function(n,q,p){if((q||this.bF||!this.hya)&&this.Mea){this.renderTarget||(this.renderTarget=h.cia(n));q?(n.xr.isPresenting||n.setRenderTarget(null),this.bF=!0):(n.setRenderTarget(this.renderTarget),this.renderTarget.texture.colorSpace=this.g_,this.bF=!1);n.outputColorSpace=this.g_;var r=this.Ie.getComponent(k.Scene),t=
h.ADa(n.domElement);r&&1!==r.I4&&(t*=r.I4);n.getPixelRatio()!=t&&n.setPixelRatio(t);this.s7a(n);n.xr.isPresenting?n.render(this.scene,this.xU):(this.yc.setRenderTarget(this.renderTarget),this.yc.L$a(q),this.yc.j5(n),this.yc.render(p));this.j$a(n);(r=this.Ie.getComponent(k.Scene))&&r.N&&r.N.trigger(l.Vh)}};d.prototype.s7a=function(n){var q=[],p=[];this.scene.traverse(function(r){r.Hu||r.isGaussianCloud?q.push(r):r.visible&&r.material&&r.material.transparent&&r.material.depthTest&&0>=r.renderOrder&&
-100<=r.renderOrder&&0<r.material.opacity&&p.push(r)});b.camera=this.xU;b.ray.origin.setFromMatrixPosition(this.xU.matrixWorld);b.firstHitOnly=!0;p.forEach(function(r){g.setFromMatrixPosition(r.matrixWorld).sub(b.ray.origin);b.ray.direction.copy(g).normalize();var t=g.length();b.far=t;e.length=0;e=b.intersectObjects(q,!1,e);0<e.length&&e[0].distance<t&&(r.visible=!1,r.userData.GKa=!0)});this.sbb(n)};d.prototype.j$a=function(n){this.icb(n);this.scene.traverse(function(q){q.userData.GKa&&(q.visible=
!0,delete q.userData.GKa)})};d.prototype.sbb=function(n){n.setTransparentSort(this.nma)};d.prototype.icb=function(n){n.setTransparentSort(null)};d.prototype.nma=function(n,q){return n.dja!==q.dja?n.dja-q.dja:n.renderOrder!==q.renderOrder?n.renderOrder-q.renderOrder:n.object.Hu||q.object.Hu?(n.object.Hu?-1:1)-(q.object.Hu?-1:1):n.z!==q.z?q.z-n.z:n.id-q.id};var b=new THREE.Raycaster,e=[],g=new THREE.Vector3;d.prototype.isVisible=function(){return this.scene&&this.camera&&0<this.opacity&&this.Mea};d.prototype.dispose=
function(){this.camera=this.scene=this.Ie=null;this.yc&&(this.yc.dispose(),this.yc=null);this.renderTarget&&(this.renderTarget.dispose(),this.renderTarget=null)};return d});
define("gc",["require","pB","kQ","fU","dp"],function(a){function d(h){this.m=h;this.sx=[];this.Ri=null;this.Q_a();this.O_a()}var l=a("pB"),m=a("kQ"),k=a("fU"),c=a("dp");d.prototype.frame=function(h){var f=!!this.j&&m.nh==this.j;if(!m.isPresenting||f){var b=this.m.getComponent(k.zi).yU.map(function(n){for(var q=0;q<this.sx.length;q++)if(this.sx[q].Ie==n)return this.sx[q].update();return new c(n)}.bind(this));this.sx.filter(function(n){return 0>b.indexOf(n)}).forEach(function(n){n.dispose()});this.sx=
b;var e=this.sx.filter(function(n){return n.isVisible()});if(0<e.length){f&&e.reduce(function(n,q){return n.opacity>q.opacity?n:q});var g=1==e.length&&1<=e[0].opacity||f;e.forEach(function(n){n.render(this.j,g,h)}.bind(this));g||this.$Ya(e.slice(0,2))}f&&this.m.P.Ta()}};d.prototype.$Ya=function(h){this.jn.material.uniforms.t1.value=h[0].renderTarget.texture;this.jn.material.uniforms.o1.value=h[0].opacity;1<h.length?(this.jn.material.uniforms.useT2.value=1,this.jn.material.uniforms.t2.value=h[1].renderTarget.texture,
this.jn.material.uniforms.o2.value=h[1].opacity):this.jn.material.uniforms.useT2.value=0;this.j.setSize(h[0].width,h[0].height);this.j.setRenderTarget(null);this.j.setClearColor(0,0);this.j.clear();this.j.render(this.DN,this.V8)};d.prototype.dispose=function(){for(;this.sx.length;)this.sx.shift().dispose();this.sx=null;this.M0a();this.O0a()};d.prototype.Q_a=function(){var h=this.m.J(k.zi);this.Ri=h.zc.Qd();this.Ri.X1();h.renderer=this.Ri.bs();this.j=h.renderer;m.N.bind(l.ba,this.rBa,this,!0)};d.prototype.O0a=
function(){m.N.unbind(l.ba,this.rBa,this);this.j=null;this.Ri.S4();this.Ri=null};d.prototype.rBa=function(){this.m.P.Ta()};d.prototype.O_a=function(){this.DN=new THREE.Scene;this.V8=new THREE.OrthographicCamera(window.innerWidth/-2,window.innerWidth/2,window.innerHeight/2,window.innerHeight/-2,-10,10);this.DN.add(this.V8);this.jn=new THREE.Mesh(new THREE.PlaneGeometry(window.innerWidth,window.innerHeight),this.HQa());this.DN.add(this.jn)};d.prototype.M0a=function(){this.DN.remove(this.jn);this.jn.geometry.dispose();
this.jn.geometry=null;this.jn.material.dispose();this.DN=this.V8=this.jn=this.jn.material=null};d.prototype.HQa=function(){var h=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}"});
h.transparent=!0;return h};d.$a=function(h){h.I(k.Ts).manager=new d(h)};d.Ca=function(h){var f=h.getComponent(k.Ts);f.manager.dispose();f.manager=null;h.ia(k.Ts)};d.update=function(h){h.getComponent(k.Ts).manager.update()};d.frame=function(h,f,b){h.getComponent(k.Ts).manager.frame(f,b)};return d});
define("mb",["require","lV","mf","fU","gc"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("gc");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(c,h){this.bIa.u.length&&this.bIa.u.slice().forEach(k.$a);this.Pm.u.length&&this.Pm.u.slice().forEach(function(f){k.frame(f,c,h)});this.cIa.u.length&&this.cIa.u.slice().forEach(k.Ca)};a.H={};a.H.bIa=[m.zi,m.Ts.not];a.H.cIa=[m.zi.not,m.Ts];a.H.Pm=[m.zi,m.Ts];return a});
define("kx","require lV pB gF ix cv iy lS".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("gF"),k=a("ix"),c=a("cv"),h=a("iy"),f=a("lS");a=d.extend(m,function(e,g){m.call(this);this.Wd=e;this.Va=g;this.Aa=new k;this.Aa.wM([this.Wd]);this.Aa.bind(l.ea,this.Dd,this,!1);this.Aa.bind(l.Bc,this.cg,this,!1);this.$c=null;this.Mb=0;f.co(this.Aa,h.QC)});a.prototype.Oh=function(e){this.Mb!==e&&(this.Mb=e,this.$c&&(this.$c.material.opacity=this.Mb,this.$c.material.visible=0<this.Mb,this.$c.material.needsUpdate=
!0))};a.prototype.Mh=function(){return!!this.$c};a.prototype.Dd=function(){this.uRa();this.trigger(l.ea)};a.prototype.cg=function(){this.trigger(l.Bc)};a.prototype.uRa=function(){var e=new THREE.Texture;e.image=f.Cf(this.Wd);e.generateMipmaps=!0;e.minFilter=THREE.LinearMipMapLinearFilter;e.needsUpdate=!0;e=new THREE.SpriteMaterial({map:e});e.sizeAttenuation=!1;e.transparent=!0;e.visible=0<this.Mb;e.opacity=this.Mb;e.polygonOffset=!0;e.polygonOffsetUnits=1;e.polygonOffsetFactor=-10;this.$c=new THREE.Sprite(e);
this.$c.renderOrder=-1E3};a.prototype.update=function(){if(this.$c){var e=c.Cu(this.Va);this.$c.parent!=e&&(this.$c.parent&&c.UHa(this.$c.parent,this.$c),e&&c.s3a(e,this.$c));if(e){var g=c.yB(this.Va),n=this.$c.material.map.image.width,q=this.$c.material.map.image.height;e=g/(2*Math.tan(e.fov*b/2));g=Math.max(g/e,c.oT(this.Va)/(e*n/q));this.$c.scale.y!=g&&(this.$c.scale.y=g,this.$c.scale.x=g*n/q)}n=c.nT(this.Va);this.$c.material.map.colorSpace!=n&&(this.$c.material.map.colorSpace=n,this.$c.material.needsUpdate=
!0)}};a.prototype.dispose=function(){this.$c&&(this.$c.parent&&c.UHa(this.$c.parent,this.$c),this.$c.material.map.dispose(),this.$c.material.dispose(),this.$c=null);this.Aa&&f.Lj(this.Aa,h.QC)};var b=Math.PI/180;return a});
define("bP","require pB fU kx pd bM".split(" "),function(a){function d(f,b){this.m=f;this.eh=b;this.Qv=void 0;this.Ii=this.gn=this.fa=this.Va=null;this.update()}var l=a("pB"),m=a("fU"),k=a("kx"),c=a("pd"),h=a("bM");d.prototype.frame=function(f){this.fa&&this.xF(f);this.gn&&this.gn.update();this.Ii&&this.Ii.update()};d.prototype.update=function(){var f=this.m.getComponent(m.Scene);this.Va=f.scene;if(!this.Va){if(!f.scene)return;this.Va=f.scene}f=f.Gha||null;this.Qv===f||this.fa||(this.fO(this.Ii),
this.Ii=null,(this.Qv=f)?this.Ii=this.GQa(this.Qv):(this.XN(),this.eh.trigger(l.ea)))};d.prototype.xF=function(f){this.fa.Fb(f);this.gn&&this.gn.Oh(Math.min(1,Math.max(0,this.fa.eb("alpha"))));this.Ii&&this.Ii.Oh(Math.min(1,Math.max(0,this.fa.eb("nextAlpha"))));this.fa.Xe()&&(this.fa=null,this.gn&&(this.fO(this.gn),this.gn=null),this.gn=this.Ii,this.Ii=null,this.update());this.m.P.Ta()};d.prototype.kda=function(){this.Ii.unbind(l.ea,this.kda,this,!0);this.Ii.unbind(l.Bc,this.lda,this,!0);this.XN();
this.eh.trigger(l.ea)};d.prototype.lda=function(){this.fO(this.Ii);this.Ii=null;this.XN();this.eh.trigger(l.ea)};d.prototype.XN=function(){this.Ii&&this.gn?this.fa=new c("linear",[new h("nextAlpha",0,2,void 0),new h("alpha",2,0,void 0)],600):this.Ii?this.fa=new c("linear",[new h("nextAlpha",0,1,void 0)],300):this.gn&&(this.fa=new c("linear",[new h("alpha",1,0,void 0)],300));this.m.P.Ta()};d.prototype.GQa=function(f){f=new k(f,this.Va);this.gPa(f);f.Oh(0);return f};d.prototype.fO=function(f){f&&(this.z1a(f),
f.dispose())};d.prototype.gPa=function(f){f.bind(l.ea,this.kda,this,!0);f.bind(l.Bc,this.lda,this,!0)};d.prototype.z1a=function(f){f.unbind(l.ea,this.kda,this,!0);f.unbind(l.Bc,this.lda,this,!0)};d.prototype.dispose=function(){this.gn&&(this.fO(this.gn),this.gn=null);this.Ii&&(this.fO(this.Ii),this.Ii=null)};return d});
define("me","require pB iy oq pY fU cv mD kQ".split(" "),function(a){function d(g,n){this.m=g;this.OD=void 0;this.M$=1;this.k0=this.hK=this.gK=this.Cz=this.nD=this.Qv=void 0;this.Kb=this.j=this.Va=null;this.eh=n;this.Oe=new c(this.eh);this.Cd=[new b(m.QC),new b(m.QC)];this.Cd.forEach(function(q){q.bind(l.ea,this.Dd,this,!0);q.bind(l.Bc,this.cg,this,!0)}.bind(this));this.Wya([]);this.update()}var l=a("pB"),m=a("iy"),k=a("oq"),c=a("pY"),h=a("fU"),f=a("cv"),b=a("mD"),e=a("kQ");d.prototype.frame=function(){if(this.Va){var g=
d.G6a(this.m.P,this.Va);this.j!=g&&(this.j&&(this.fw(),this.vX()),this.j=g)&&(this.oa(),this.Aga())}};d.prototype.update=function(){var g=this.m.getComponent(h.Scene),n=!1,q=!1,p=g.aDa||null;this.OD!==p&&(this.OD=p,q=!0);p=g.Gha||null;this.Qv!==p&&(this.Qv=p,q=!0);p=g.QBa||null;this.nD!==p&&(this.nD=p,q=!0);q&&(this.XAa(),this.Aga(),n=!0);this.Cz!==g.backgroundColor&&(this.Cz=g.backgroundColor,n=!0);this.Va!==g.scene&&(this.Va=g.scene,n=!0);this.M$!==g.environmentIntensity&&(this.M$=g.environmentIntensity,
n=!0);n&&this.oa()};d.prototype.XAa=function(){this.Wya(this.BUa())};d.prototype.BUa=function(){var g=[];this.OD&&-1==g.indexOf(this.OD)&&g.push(this.OD);!this.Qv&&this.nD&&-1==g.indexOf(this.nD)&&g.push(this.nD);if(this.Va&&this.Va.background&&this.Va.background.image&&this.Va.background.image.src){var n=this.Va.background.image.src;-1==g.indexOf(n)&&g.push(n)}return g};d.prototype.Wya=function(g){var n=[],q=[];this.Cd.forEach(function(p){var r=p.Yi();0>g.indexOf(r)?(p.cancel(),n.push(p)):q.push(r)});
g.forEach(function(p){0>q.indexOf(p)&&n.shift().load(p)})};d.prototype.Aga=function(){var g=0;this.Oe.oCa();this.Cd.forEach(function(n){n.Yi()&&!n.Mh()&&(this.Oe.UK(n),g++)}.bind(this));0==g&&this.eh&&this.eh.trigger(l.ea)};d.prototype.dispose=function(){this.Cd.forEach(function(g){g.cancel();g.unbind(l.ea,this.Dd,this,!0);g.unbind(l.Bc,this.cg,this,!0)}.bind(this));this.m&&(this.vX(),this.fw(),this.m=null)};d.prototype.Dd=function(){this.oa();this.Aga()};d.prototype.oa=function(){if(this.Va&&this.j){this.Va.environmentIntensity=
this.M$;if(this.OD){var g=this.Fsa(this.OD);g&&this.IOa(g)}else this.vX();this.Qv?this.fw():this.nD?(g=this.Fsa(this.nD))&&this.vpa(g):this.Cz?this.vpa(void 0,this.Cz):this.fw();this.XAa();this.m.P.Ta()}};d.prototype.Fsa=function(g){for(var n=0;n<this.Cd.length;n++)if(this.Cd[n].Mh()&&this.Cd[n].Yi()==g)return this.Cd[n];return null};d.prototype.vpa=function(g,n){if(this.Va){if(g){var q=g&&g.Yi()||void 0;if(q==this.hK)return;this.fw();f.k5(this.Va,this.Dq(g,!1));this.hK=q;this.gK=void 0}n&&n!=this.gK&&
(this.fw(),f.k5(this.Va,"transparent"==n?null:k.Qp(n)),this.gK=n,this.hK=void 0)}};d.prototype.fw=function(){this.Va&&(this.gK||this.hK)&&(this.hK&&(this.Va.background.dispose(),f.k5(this.Va,null),this.hK=void 0),this.gK&&(f.k5(this.Va,null),this.gK=void 0))};d.prototype.IOa=function(g){if(this.Va){var n=g&&g.Yi()||void 0;n!=this.k0&&(this.vX(),this.Va.environment=this.Dq(g,e.isPresenting?!1:!0),this.k0=n)}};d.prototype.vX=function(){this.Va&&this.k0&&(this.Va.environment.dispose(),this.Va.environment=
null,this.k0=void 0)};d.prototype.Dq=function(g,n){return 6>Math.round(g.Fe()/g.Ve())?this.WQa(g,n):this.RQa(g,n)};d.prototype.WQa=function(g,n){var q=new THREE.Texture;q.image=g.Cf();q.colorSpace=f.nT(this.Va);q.mapping=THREE.EquirectangularReflectionMapping;q.needsUpdate=!0;return n?(this.j.Bm=!0,g=new THREE.PMREMGenerator(this.j),q=g.fromEquirectangular(q).texture,g.dispose(),this.j.Bm=!1,q):q};d.prototype.RQa=function(g,n){for(var q=Array(6),p=g.Fe()/6,r=g.Ve(),t=0;6>t;t++){var u=document.createElement("canvas");
u.width=p;u.height=r;u.getContext("2d").drawImage(g.Cf(),t*p,0,p,r,0,0,p,r);q[t]=u}g=new THREE.CubeTexture;g.images=[q[1],q[3],q[4],q[5],q[0],q[2]];g.colorSpace=f.nT(this.Va);g.needsUpdate=!0;return n?(this.j.Bm=!0,n=new THREE.PMREMGenerator(this.j),q=n.fromCubemap(g).texture,n.dispose(),this.j.Bm=!1,q):g};d.prototype.cg=function(){this.m.getComponent(h.Scene).scene.environment=null;this.m.P.Ta()};d.Rxa=new Map;d.Bla=function(g,n){d.Rxa.set(g,n||[])};d.G6a=function(g,n){g=d.Rxa.get(g)||[];for(var q=
0;q<g.length;q++){var p=g[q].getComponent(h.zi);if(p&&0<p.yU.filter(function(r){return r.getComponent(h.Scene).scene==n}).length)return p.renderer}return null};return d});
define("ka","require exports oq kQ fU cv three.mod".split(" "),function(a,d,l,m,k,c,h){a=function(){function b(e){this.opacity=this.mL=void 0;this.F=e}b.prototype.frame=function(){var e=this.F.getComponent(k.Scene),g=e.scene,n=g&&c.Cu(g),q=e.mL;e=e.US;!m.isPresenting&&n&&q&&0<e?(this.Q4a(),this.Wcb(g,n),this.Vcb(q,e)):(this.opacity=this.mL=void 0,this.sCa())};b.prototype.update=function(){};b.prototype.Wcb=function(e,g){this.Ph.parent!=g&&g.add(this.Ph);var n=c.oT(e);e=c.yB(e);g.isPerspectiveCamera?
(this.Ph.position.z=1.01*-g.near,g=e/(2*Math.tan(g.fov*f/2)),g=Math.max(e/g,n/(g*n/e)),this.Ph.scale.y=g,this.Ph.scale.x=g*n/e):g.isOrthographicCamera&&(this.Ph.position.z=-(g.near+1),this.Ph.scale.y=g.top-g.bottom,this.Ph.scale.x=g.right-g.left)};b.prototype.Vcb=function(e,g){this.mL!==e&&this.opacity!==g&&(this.Ph.material.color=l.Qp(e),this.Ph.material.opacity=g,this.Ph.material.needsUpdate=!0)};b.prototype.Q4a=function(){if(!this.Ph){var e=new h.SpriteMaterial;e.depthTest=!1;e.renderOrder=1E3;
e.sizeAttenuation=!1;e.transparent=!0;e.visible=!0;e.opacity=0;e.needsUpdate=!0;this.Ph=new h.Sprite(e);this.Ph.renderOrder=1E3}};b.prototype.sCa=function(){var e,g,n;if(this.Ph){var q=this.Ph.material;null===(e=q.map)||void 0===e?void 0:e.dispose();null===(g=q.envMap)||void 0===g?void 0:g.dispose();q.dispose();this.Ph.geometry.dispose();null===(n=this.Ph.parent)||void 0===n?void 0:n.remove(this.Ph)}};b.prototype.dispose=function(){this.sCa()};return b}();var f=Math.PI/180;return a});
define("go",["require","exports","oq","fU","three.mod"],function(a,d,l,m,k){return function(){function c(h){this.F=h}c.prototype.update=function(){var h=this.F.getComponent(m.Scene),f=h.scene,b=h.rDa;h=l.Qp(h.qDa||"#ffffff");0<b?null==f.fog?f.fog=new k.FogExp2(h,b):(f.fog.color=h,f.fog.density=b):f.fog=null};c.prototype.dispose=function(){var h=this.F.getComponent(m.Scene);h&&h.scene&&(h.scene.fog=null)};return c}()});
define("ig","require fU pY bP me ka go".split(" "),function(a){function d(b){this.m=b;this.eh=null;var e=this.m.J(l.Scene),g=this.m.J(l.vo);this.m.I(l.Object3D).qa=g.scene=e.scene=new THREE.Scene;this.Oe=new m;this.nO=new c(b,this.Oe.qu());this.te=new k(b,this.Oe.qu());this.LX=new f(b);this.Lra=new h(b)}var l=a("fU"),m=a("pY"),k=a("bP"),c=a("me"),h=a("ka"),f=a("go");d.prototype.frame=function(b){this.nO.frame(b);this.te.frame(b)};d.prototype.yia=function(b){this.Lra.frame(b)};d.prototype.update=function(){this.nO.update();
this.te.update();this.LX.update();this.Lra.update();this.i2a()};d.prototype.i2a=function(){var b=this.m.getComponent(l.Scene);this.eh!=b.uia&&(this.eh=b.uia,this.Oe.Q$a(this.eh))};d.prototype.dispose=function(){this.Oe&&(this.Oe.dispose(),this.Oe=null);this.te&&(this.te.dispose(),this.te=null);this.nO&&(this.nO.dispose(),this.nO=null);this.LX&&(this.LX.dispose(),this.LX=null);this.m&&(this.m=null)};d.$a=function(b){b.I(l.vo).manager=new d(b)};d.Ca=function(b){var e=b.getComponent(l.vo);e.manager.dispose();
e.manager=null;b.ia(l.vo);b.ia(l.Object3D)};d.frame=function(b,e){b.getComponent(l.vo).manager.frame(e)};d.yia=function(b,e){(b=b.getComponent(l.vo))&&b.manager&&b&&b.manager.yia(e)};d.update=function(b){b.getComponent(l.vo).manager.update()};d.Bla=function(b,e){c.Bla(b,e)};return d});
define("fi",["require","lV","mf","fU","ig"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("ig");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(c){this.lIa.u.length&&this.lIa.u.slice().forEach(k.$a);this.scenes.Ea.length&&this.scenes.Ea.slice().forEach(k.update);this.scenes.u.length&&this.scenes.u.slice().forEach(function(h){k.frame(h,c)});k.Bla(this.P,this.Pm.u.slice());this.mIa.u.length&&this.mIa.u.slice().forEach(k.Ca)};a.H={};a.H.lIa=[m.Scene,m.vo.not];a.H.scenes=
[m.Scene,m.vo];a.H.mIa=[m.Scene.not,m.vo];a.H.Pm=[m.zi,m.Ts];a.OV=d.extend(l,function(){l.apply(this,arguments)});a.OV.prototype.Wc=function(c){this.scenes.u.length&&this.scenes.u.slice().forEach(function(h){k.yia(h,c)})};a.OV.H={};a.OV.H.scenes=[m.Scene,m.vo];return a});
define("eN",["require","w"],function(a){function d(f){this.xg=f;"CANVAS"==f.tagName?(this.T=f,this.Tc=1):(this.T=document.createElement("canvas"),this.Tc=k.zd()==k.yi?.5:1,this.T.width=Math.round(f.width*this.Tc),this.T.height=Math.round(f.height*this.Tc));this.Da=this.T.getContext("2d");this.Da.globalCompositeOperation="copy";this.T!=f&&this.Da.drawImage(f,0,0,f.width,f.height,0,0,this.T.width,this.T.height)}function l(f,b,e){0>f?f=e==THREE.RepeatWrapping?b+f%b:e==THREE.MirroredRepeatWrapping?0==
Math.floor(Math.abs(f/b))%2?Math.abs(f%b):b-1+f%b:0:f>=b&&(f=e==THREE.RepeatWrapping?f%b:e==THREE.MirroredRepeatWrapping?1==Math.floor(f/b)%2?b-1-f%b:f%b:b-1);return f}function m(f,b,e){try{if(f instanceof CanvasRenderingContext2D)return f.getImageData(b,e,1,1).data;if(f.tagName&&"CANVAS"==f.tagName)return f.DVa?[0,0,0,0]:f.getContext("2d").getImageData(b,e,1,1).data;c.drawImage(f,b,e,1,1,0,0,1,1);return c.getImageData(0,0,1,1).data}catch(g){return[0,0,0,0]}}var k=a("w");d.prototype.transparent=function(f,
b){return d.transparent(this.Da,Math.round(f*this.Tc),Math.round(b*this.Tc))};d.prototype.My=function(f,b){return d.My(this.Da,Math.round(f*this.Tc),Math.round(b*this.Tc))};d.prototype.info=function(f,b){return d.info(this.Da,Math.round(f*this.Tc),Math.round(b*this.Tc))};d.prototype.dispose=function(){this.T!=this.xg&&(this.T.width=this.T.height=0);this.xg=this.T=this.Da=null};d.rcb=function(f,b,e){if(!f.image||!f.image.width||!f.image.height)return!0;b=l(Math.round(b*f.image.width),f.image.width,
f.wrapS);e=l(Math.round((1-e)*f.image.height),f.image.height,f.wrapT);return!d.transparent(f.image,b,e)};d.transparent=function(f,b,e){return!d.My(f,b,e)};d.My=function(f,b,e){return!f.tagName||f.tagName&&"VIDEO"==f.tagName?!0:0<m(f,b,e)[3]};d.info=function(f,b,e){f=m(f,b,e);b=f[3];return{My:0<b,opacity:b,color:"#"+h[f[0]]+h[f[1]]+h[f[2]]}};a=document.createElement("canvas");a.width=a.height=1;var c=a.getContext("2d");c.globalCompositeOperation="copy";var h=function(){for(var f=Array(256),b=0;16>
b;b++)f[b]="0"+b.toString(16);for(;256>b;b++)f[b]=b.toString(16);return f}();return d});
define("pe","require pB eN fU cv hp bi".split(" "),function(a){function d(A){this.Qg=A;this.iK=this.ow=this.ue=this.rn=null;this.DP=void 0;this.vw=!1;this.update()}function l(A,E,J,C){this.F=A;this.qa=E;this.point=J;this.normal=C}function m(A){return{x:A.x,y:A.y,z:A.z}}function k(A,E,J,C){var L=E.P,T=A.get(L);T||A.set(L,T=[]);A=T.indexOf(E);J&&0>A?T.push(E):!J&&0<=A&&T.splice(A,1);C.delete(L)}var c=a("pB"),h=a("eN"),f=a("fU"),b=a("cv"),e=a("hp"),g=a("bi");d.prototype.update=function(){var A=this.Qg.getComponent(f.Fc);
A.ps=this;this.cR(A&&A.enabled?A.ZF:null);this.bR(A&&A.enabled?A.z2:null)};d.prototype.frame=function(){this.hQa();var A=this.Qg.getComponent(f.Fc);A&&A.wCa?this.xwa():this.tx(p)};d.prototype.cR=function(A){if(this.rn!=A){if(this.rn)for(var E in u)this.rn.unbind(E,this.ne,this);if(this.rn=A)for(E in u)this.rn.bind(E,this.ne,this,!0)}};d.prototype.ne=function(A){var E=this.Qg.getComponent(f.Fc);E&&E.enabled&&(E=u[A.name])&&E.call(this,A)};d.prototype.bR=function(A){this.ue!=A&&(this.ue&&this.vw&&this.ue.pop(g.Le),
(this.ue=A)&&this.vw&&this.ue.push(g.Le))};d.prototype.Pf=function(A){this.mp(A);this.gJ&&-1==v.indexOf(this.Qg.P)&&-1==w.indexOf(this.Qg.P)?this.tx(p):this.tx(q)};d.prototype.Sw=function(A){this.mp(A);(A=this.kaa())&&this.m1(c.ma,A)};d.prototype.CJ=function(A){this.mp(A);(A=this.kaa())&&this.m1(c.El,A)};d.prototype.So=function(A){this.gJ=!0;this.mp(A);if(A=this.kaa())this.L$=A.F,this.O$=A.F.getComponent(f.Id).N,this.m1(c.hb,A)};d.prototype.Tw=function(A){this.gJ=!1;this.mp(A);if(this.L$)var E=(E=
this.L$.getComponent(f.Id))&&E.N;!E&&this.O$&&(E=this.O$);this.O$=this.L$=null;E&&(A=this.dsa(),E.trigger(c.Eb,A),E=this.Qg.getComponent(f.Fc),E.N&&E.N.trigger(c.Eb,A))};d.prototype.mp=function(A){this.nd=A.x;this.od=A.y;this.qJ=A.pageX;this.rJ=A.pageY};d.prototype.tx=function(A){var E=(new Date).getTime()+A;this.DP&&E>=this.DP||(this.DP=E,clearTimeout(this.iK),this.iK=setTimeout(function(){this.iK=null;this.DP=void 0;this.xwa()}.bind(this),A))};d.prototype.xwa=function(){var A=this.oUa();this.Aya(A&&
A.F);A&&this.m1(c.Pb,A)};d.prototype.H4=function(A,E,J){var C=this.nd,L=this.od,T=this.qJ,S=this.rJ;this.rJ=this.qJ=this.od=this.nd=void 0;A=this.vaa(A,[]);E=this.oaa(A,E,J);var U;E&&(U=this.Ssa(E));this.nd=C;this.od=L;this.qJ=T;this.rJ=S;return U};d.prototype.oUa=function(){var A=this.Qg.getComponent(f.Fc);if(!A)return null;var E=this.nUa();return this.oaa(E,A.origin,A.direction)||null};d.prototype.kaa=function(){var A=this.Qg.getComponent(f.Fc);if(!A)return null;var E=this.lTa();return this.oaa(E,
A.origin,A.direction)||null};d.prototype.Aya=function(A){if(this.ow!=A){if(null!=this.ow!=(null!=A)){var E=this.Qg.getComponent(f.Fc);E&&E.N&&E.N.trigger(A?c.Gc:c.Jb)}this.ow&&this.aAa(this.ow,c.Jb);(this.ow=A)&&this.aAa(this.ow,c.Gc);A=this.ow&&this.ow.getComponent(f.Id);A=!!A&&A.mH;this.vw!=A&&(this.vw=A,this.ue&&(this.vw?this.ue.push(g.Le):this.ue.pop(g.Le)))}};d.prototype.oaa=function(A,E,J){var C=Array.from(A.keys());E=this.oVa(C,E,J);for(J=0;J<E.length;J++){C=E[J];var L=C.point,T=C.object,S=
C.face&&C.face.normal,U=A.get(T),X=U&&U.getComponent(f.Id);if(X){var K=Array.isArray(T.material)&&C.face?T.material[C.face.materialIndex]:T.material;if(!K||K.visible)if(X.GM||!K||!K.map||h.rcb(K.map,C.uv.x,C.uv.y))return T.isSkinnedMesh&&(T=this.ASa(T.skeleton.bones,L)),new l(U,T,L,S)}}return null};d.prototype.lTa=function(){var A=this.Qg.P,E=D.get(A);if(!E){E=x.get(A);var J=z.get(A);E=this.vaa(E,J);D.set(A,E)}return E};d.prototype.nUa=function(){var A=this.Qg.P,E=F.get(A);if(!E){E=y.get(A);var J=
B.get(A);E=this.vaa(E,J);F.set(A,E)}return E};d.prototype.vaa=function(A,E){var J=(E&&E.map(function(T){return b.Xc(T)}).filter(function(T){return!!T})||[]).slice(),C=new Map;A&&A.forEach(function(T){var S=b.Xc(T);S&&-1==J.indexOf(S)&&(J.push(S),C.set(T,S))});var L=new Map;C.forEach(function(T,S){for(var U=[T];U.length;){var X=U.shift();if(X==T||-1==J.indexOf(X))L.set(X,S),X.children&&(U=U.concat(X.children))}});return L};d.prototype.oVa=function(A,E,J){t.camera=this.ksa();var C=b.Xc(this.Qg);C=C&&
C.matrixWorld;C||(C=(C=this.Qg.getComponent(f.Fc))&&C.matrixWorld);C?(t.ray.origin.copy(E).applyMatrix4(C),t.ray.direction.copy(E).add(J).applyMatrix4(C).sub(t.ray.origin).normalize()):(t.ray.origin.copy(E),t.ray.direction.copy(J).normalize());return e.intersect(t,A)};d.prototype.m1=function(A,E){var J=this.Ssa(E);E=E.F.getComponent(f.Id);J.yT=E&&E.N.yT(A)||!1;E.N&&E.N.trigger(A,J);E=this.Qg.getComponent(f.Fc);E.N&&E.N.trigger(A,J)};d.prototype.dsa=function(){var A={};void 0!==this.nd&&void 0!==this.od&&
(A.x=this.nd,A.y=this.od);void 0!==this.qJ&&void 0!==this.rJ&&(A.pageX=this.qJ,A.pageY=this.rJ);return A};d.prototype.Ssa=function(A){var E=this.dsa(),J=A.qa,C=A.point;A=A.normal;E.position=m(C);var L=this.ksa();E.cameraPosition=m(L?r.setFromMatrixPosition(L.matrixWorld):r.set(0,0,0));L=J;for(var T=E;;){T.object=L.userData.id;T.name=L.name;T.type=L.isMesh?"mesh":L.isBone?"bone":L.Hu||L.isGaussianCloud?"gs":"other";T.localPosition=m(L.worldToLocal(r.copy(C)));r.setFromMatrixScale(L.matrixWorld);T.localScale=
Math.max(r.x,r.y,r.z);T.objectMatrixWorld=J.matrixWorld.toArray();A&&(T.normal=m(n(J,A,L,r)));if(!L.parent||!L.parent.userData.id)break;L=L.parent;T=T.parent={}}return E};var n=function(){var A=new THREE.Vector3,E=new THREE.Matrix4;return function(J,C,L,T){T.copy(C);if(J==L)return T;T.applyMatrix4(J.matrixWorld);T.sub(A.setFromMatrixPosition(J.matrixWorld));T.add(A.setFromMatrixPosition(L.matrixWorld));T.applyMatrix4(E.copy(L.matrixWorld).invert()).normalize();return T}}();d.prototype.ksa=function(){if(this.NX.camera)return this.NX.camera;
var A=this.Qg.getComponent(f.Fc);A=A&&A.La;this.NX.camera=A&&b.Vr(A);return this.NX.camera};d.prototype.hQa=function(){this.NX={}};d.prototype.aAa=function(A,E){(A=(A=A.getComponent(f.Id))&&A.N)&&A.trigger(E)};d.prototype.ASa=function(A,E){var J=null,C=Infinity;for(A=A.slice();A.length;){var L=A.shift(),T=E.distanceTo(L.getWorldPosition(r));T<C&&(J=L,C=T);A.unshift.apply(A,L.children)}return J};d.prototype.dispose=function(){this.iK&&(clearTimeout(this.iK),this.iK=null,this.DP=void 0);this.cR(null);
this.bR(null);this.Aya(null)};var q=16,p=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[c.Pb]=d.prototype.Pf;u[c.ma]=d.prototype.Sw;u[c.El]=d.prototype.CJ;u[c.hb]=d.prototype.So;u[c.Eb]=d.prototype.Tw;d.Nla=function(A){A.I(f.yv).manager=new d(A)};d.fma=function(A){var E=A.getComponent(f.yv);E.manager.dispose();E.manager=null;A.ia(f.yv)};
d.frame=function(A){A.getComponent(f.yv).manager.frame()};d.Bs=function(A){A.getComponent(f.yv).manager.update()};d.rbb=function(A){A.I(f.XC);d.cLa(A)};d.cLa=function(A){var E=b.Xc(A),J=A.getComponent(f.Id);k(x,A,E&&J.Ux,D);k(y,A,E&&J.Dy,F)};d.lKa=function(A){k(x,A,!1,D);k(y,A,!1,F);A.ia(f.XC)};d.qbb=function(A){A.I(f.TC);d.ZKa(A)};d.ZKa=function(A){var E=b.Xc(A),J=A.getComponent(f.jq);k(z,A,E&&J.oma,D);k(B,A,E&&J.pma,F)};d.kKa=function(A){k(B,A,!1,F);k(z,A,!1,D);A.ia(f.TC)};var v=[];d.Oab=function(A){v=
[];A.forEach(function(E){0>v.indexOf(E.P)&&v.push(E.P)})};var w=[];d.mla=function(A){w=[];A.forEach(function(E){0>w.indexOf(E.P)&&w.push(E.P)})};var x=new Map,y=new Map,z=new Map,B=new Map,D=new Map,F=new Map;return d});
define("oh",["require","lV","mf","fU","pe"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("pe");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.fU.u.length&&this.fU.u.slice().forEach(k.Nla);this.Ij.Ea.length&&this.Ij.Ea.slice().forEach(k.Bs);this.Ij.u.length&&this.Ij.u.slice().forEach(k.frame);this.gU.u.length&&this.gU.u.slice().forEach(k.fma);this.tIa.u.length&&this.tIa.u.slice().forEach(k.rbb);this.sIa.u.length&&this.sIa.Ea.slice().forEach(k.cLa);this.uIa.u.length&&
this.uIa.u.slice().forEach(k.lKa);this.vIa.u.length&&this.vIa.u.slice().forEach(k.lKa);this.dGa.u.length&&this.dGa.u.slice().forEach(k.qbb);this.cGa.u.length&&this.cGa.Ea.slice().forEach(k.ZKa);this.eGa.u.length&&this.eGa.u.slice().forEach(k.kKa);this.fGa.u.length&&this.fGa.u.slice().forEach(k.kKa);(this.yka.Nd.length||this.yka.pg.length)&&k.Oab(this.yka.u);(this.Xx.Nd.length||this.Xx.pg.length)&&k.mla(this.Xx.u)};a.H={};a.H.Xx=[m.Al];a.H.yka=[m.yk];a.H.fU=[m.Fc,m.yv.not];a.H.Ij=[m.Fc,m.yv];a.H.gU=
[m.Fc.not,m.yv];a.H.tIa=[m.Object3D,m.Id,m.XC.not];a.H.sIa=[m.Object3D,m.Id,m.XC];a.H.uIa=[m.Object3D.not,m.XC];a.H.vIa=[m.Id.not,m.XC];a.H.dGa=[m.Object3D,m.jq,m.TC.not];a.H.cGa=[m.Object3D,m.jq,m.TC];a.H.eGa=[m.Object3D.not,m.TC];a.H.fGa=[m.jq.not,m.TC];return a});
define("hO","require exports three.mod oq fU mf cv".split(" "),function(a,d,l,m,k,c,h){a=function(f){function b(){var e=f.call(this)||this;e.Wb=e.Wb.bind(e);e.Ib=e.Ib.bind(e);e.zf=e.zf.bind(e);e.kb=e.kb.bind(e);return e}Z(b,f);b.prototype.Wc=function(){this.EB.u.length&&this.EB.u.slice().forEach(this.Wb);this.FB.u.length&&this.FB.u.slice().forEach(this.kb);this.Nh.Ea.length&&this.Nh.Ea.slice().forEach(this.Ib);this.Nh.u.length&&this.Nh.u.slice().forEach(this.zf)};b.prototype.Wb=function(e){var g=
e.I(k.Vs),n=e.I(k.Object3D);g.light=n.qa=new l.SpotLight;this.Ib(e)};b.prototype.Ib=function(e){var g=e.getComponent(k.SpotLight),n=e.getComponent(k.Vs),q=n.light;q.color=m.Qp(g.color).convertLinearToSRGB();q.intensity=g.intensity*Math.PI;q.visible=0<q.intensity;q.castShadow=0<q.intensity&&g.castShadow;q.distance=g.distance;q.angle=g.angle*Math.PI/180;q.penumbra=g.penumbra;q.decay=g.decay;q.target.position.set(0,0,1);q.add(q.target);var p=q.castShadow?g.Rla:16;p!=q.shadow.mapSize.width&&(q.shadow.dispose(),
q.shadow=q.shadow.clone(),q.shadow.mapSize.width=q.shadow.mapSize.height=p);q.shadow.bias=g.Qla;q.shadow.radius=g.Sla;g.PS!=!!n.bo&&(n=e.J(k.Vs),g.PS?n.bo=new l.SpotLightHelper(q):(n.bo.dispose(),n.bo=null))};b.prototype.zf=function(e){this.rma(e)};b.prototype.rma=function(e){var g=e.getComponent(k.Vs);if(g=g&&g.bo)e=h.qf(e),g.parent!=e&&(g.parent&&g.parent.remove(g),e&&e.add(g)),g.update()};b.prototype.kb=function(e){var g=e.getComponent(k.Vs),n=g&&g.bo;n&&n.parent&&n.parent.remove(n);n&&n.dispose();
g=g.light;g.parent&&g.parent.remove(g);e.ia(k.Vs);e.ia(k.Object3D)};b.H={};return b}(c);a.H={};a.H.EB=[k.SpotLight,k.Vs.not];a.H.Nh=[k.SpotLight,k.Vs];a.H.FB=[k.SpotLight.not,k.Vs];return a});
define("jV",["require","oq","fU"],function(a){function d(k){this.m=k;this.ya=null;this.update()}var l=a("oq"),m=a("fU");d.prototype.update=function(){this.ya||(this.ya=new THREE.MeshBasicMaterial,this.ya.transparent=!0,this.m.I(m.Material).material=this.ya);var k=this.m.getComponent(m.ld);this.ya.color=l.Qp(k.color||"#ffffff");this.ya.opacity=k.opacity||0;this.ya.depthTest=!!k.depthTest;this.ya.side=k.doubleSided?THREE.DoubleSide:THREE.FrontSide;this.ya.visible=0<this.ya.opacity;this.ya.needsUpdate=
!0};d.prototype.dispose=function(){this.ya&&(this.ya.dispose(),this.ya=null,this.m.ia(m.Material));this.m=null};d.$a=function(k){k.I(m.zv).manager=new d(k)};d.Ca=function(k){var c=k.getComponent(m.zv);c.manager.dispose();c.manager=null;k.ia(m.zv)};d.update=function(k){k.getComponent(m.zv).manager.update()};return d});
define("iU",["require","lV","mf","fU","jV"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("jV");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.Jm.u.length&&this.Jm.u.slice().forEach(k.$a);this.materials.Ea.length&&this.materials.Ea.slice().forEach(k.update);this.Km.u.length&&this.Km.u.slice().forEach(k.Ca)};a.H={};a.H.Jm=[m.ld,m.zv.not];a.H.materials=[m.ld,m.zv];a.H.Km=[m.ld.not,m.zv];return a});
define("lJ",["require","lV","mf","fU","ov"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("ov");a=d.extend(l,function(){l.apply(this,arguments);this.Wb=this.Wb.bind(this);this.Ib=this.Ib.bind(this);this.kb=this.kb.bind(this)});a.prototype.Wc=function(){this.OJa.u.length&&this.OJa.u.slice().forEach(this.Wb);this.NJa.Ea.length&&this.NJa.Ea.slice().forEach(this.Ib);this.PJa.u.length&&this.PJa.u.slice().forEach(this.kb);this.QJa.u.length&&this.QJa.u.slice().forEach(this.kb)};a.prototype.Wb=function(c){c.I(m.Object3D).qa=
new THREE.Mesh(new THREE.SphereGeometry);c.I(m.YC);this.Ib(c)};a.prototype.Ib=function(c){var h=c.getComponent(m.Object3D).qa;k.mB(h,c.getComponent(m.Material).material);c=c.getComponent(m.Sphere);var f=h.geometry;if(f.radius!=c.radius||f.widthSegments!=c.widthSegments||f.heightSegments!=c.heightSegments)f.dispose(),f=new THREE.SphereGeometry(c.radius,c.widthSegments,c.heightSegments),h.geometry=f,h.needsUpdate=!0;c=c.renderOrder||0;h.renderOrder!=c&&(h.renderOrder=c,h.needsUpdate=!0)};a.prototype.kb=
function(c){var h=c.getComponent(m.Object3D);(h=h&&h.qa)&&h.geometry&&(h.geometry.dispose(),h.geometry=null);h&&k.mB(h,null);c.ia(m.YC);c.ia(m.Object3D)};a.H={};a.H.OJa=[m.Sphere,m.Material,m.YC.not];a.H.NJa=[m.Sphere,m.Material,m.YC];a.H.PJa=[m.Sphere.not,m.YC];a.H.QJa=[m.Material.not,m.YC];return a});
define("mB",["require","kQ","fU","cv","ov"],function(a){function d(f){this.m=f;this.Va=null;this.e9=90;this.f9=100;this.sa=this.wa=void 0;this.C0=!1;this.Tc=1;this.$c=this.m.J(l.Sprite).Ph=this.m.J(l.Object3D,!0).qa=new THREE.Sprite;this.$c.material.opacity=0;this.Vi();this.update();this.frame()}a("kQ");var l=a("fU"),m=a("cv"),k=a("ov");d.prototype.update=function(){var f=this.m.getComponent(l.Sprite);this.wa=f.height;this.sa=f.width;this.C0=f.sizeAttenuation;this.$c.center.x=f.VK;this.$c.center.y=
1-f.WK;this.Tc=f.scale;this.wm();this.$c.needsUpdate=!0};d.prototype.frame=function(){this.Va||(this.Va=m.qf(this.m));this.Cr();this.Vi();this.wm()};d.prototype.Cr=function(){if(this.Va){var f=m.Cu(this.Va);if(f&&f.isPerspectiveCamera){var b=m.yB(this.Va);if(this.e9!=f.fov||this.f9!=b)this.e9=f.fov,this.f9=b,this.wm(),this.$c.needsUpdate=!0}}};d.prototype.Vi=function(){var f=this.Va?this.m.getComponent(l.Material).material:null;f&&k.mB(this.$c,f);this.$c.renderOrder=this.m.getComponent(l.Sprite).renderOrder;
this.$c.material&&this.$c.material.sizeAttenuation!=this.C0&&(this.$c.material.sizeAttenuation=this.C0,this.$c.material.needsUpdate=!0)};d.prototype.wm=function(){var f=this.wa;this.C0||(f/=this.f9/(2*Math.tan(this.e9*h/2)));var b=this.Tc;this.$c.parent&&(this.$c.parent.getWorldScale(c),b/=Math.max(c.x,c.y,c.z));f*=b;b=f*this.sa/this.wa;var e=this.m.getComponent(l.va)||this.m.I(l.va);if(e.sf!=b||e.Gf!=f||1!=e.oh)e=this.m.J(l.va,!0),e.sf=b,e.Gf=f,e.oh=1};var c=new THREE.Vector3,h=Math.PI/180;d.prototype.dispose=
function(){};d.$a=function(f){f.I(l.Ws).manager=new d(f)};d.Ca=function(f){var b=f.getComponent(l.Ws);b.manager.dispose();b.manager=null;f.ia(l.Ws);f.ia(l.Object3D)};d.update=function(f){f.getComponent(l.Ws).manager.update()};d.frame=function(f){f.getComponent(l.Ws).manager.frame()};return d});
define("eM",["require","lV","mf","fU","mB"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("mB");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.SJa.u.length&&this.SJa.u.slice().forEach(k.$a);this.u5.Ea.length&&this.u5.u.slice().forEach(k.update);this.u5.u.length&&this.u5.u.slice().forEach(k.frame);this.TJa.u.length&&this.TJa.u.slice().forEach(k.Ca);this.UJa.u.length&&this.UJa.u.slice().forEach(k.Ca)};a.H={};a.H.SJa=[m.Material,m.Sprite,m.Ws.not];a.H.u5=[m.Sprite,
m.Material,m.Ws];a.H.TJa=[m.Sprite.not,m.Ws];a.H.UJa=[m.Material.not,m.Ws];return a});
define("hF","require lV pB cI mf fU cv".split(" "),function(a){function d(g,n,q){for(;g<n-180;)g+=360;for(;g>n+180;)g-=360;return l(g,n,q)}function l(g,n,q){if(!q)return n;g=(n-g)*(1-q);1E-5>Math.abs(g)&&(g=0);return n-g}var m=a("lV"),k=a("pB"),c=a("cI"),h=a("mf"),f=a("fU"),b=a("cv");a=m.extend(h,function(){h.apply(this,arguments);this.Wb=this.Wb.bind(this);this.Ib=this.Ib.bind(this);this.kb=this.kb.bind(this)});a.prototype.Wc=function(g,n){this.VT.u.length&&this.VT.u.slice().forEach(this.Wb);this.es.Nd.length&&
this.es.Nd.slice().forEach(function(q){this.Ib(q,g,n)}.bind(this));this.es.Ea.length&&this.es.Ea.slice().forEach(function(q){this.Ib(q,g,n)}.bind(this));this.oGa.u.length&&this.oGa.u.slice().forEach(function(q){this.Ib(q,g,n)}.bind(this));this.ZCa.u.length&&this.ZCa.u.slice().forEach(this.kb);this.$Ca.u.length&&this.$Ca.u.slice().forEach(this.kb)};a.prototype.Wb=function(g){var n=g.getComponent(f.va),q=g.I(f.Zf);q.positionX=n.positionX;q.positionY=n.positionY;q.positionZ=n.positionZ;q.Rd=n.Rd;q.ud=
n.ud;q.He=n.He;q.Ge=n.Ge;q.scale=n.scale;q.sf=n.sf;q.Gf=n.Gf;q.oh=n.oh;q.translationX=n.translationX;q.translationY=n.translationY;q.Je=n.Je;this.updateMatrixWorld(g)};a.prototype.Ib=function(g){var n=g.getComponent(f.va),q=g.getComponent(f.Zf),p=n.easing||0;p?g.getComponent(f.aD)||g.I(f.aD):g.ia(f.aD);var r=null;n.Rx!==q.Rx&&(r||(r=g.J(f.Zf)),r.Rx=n.Rx);n.positionX!==q.positionX&&(r||(r=g.J(f.Zf)),r.positionX=l(r.positionX,n.positionX,p));n.positionY!==q.positionY&&(r||(r=g.J(f.Zf)),r.positionY=
l(r.positionY,n.positionY,p));n.positionZ!==q.positionZ&&(r||(r=g.J(f.Zf)),r.positionZ=l(r.positionZ,n.positionZ,p));n.Rd!==q.Rd&&(r||(r=g.J(f.Zf)),r.Rd=d(r.Rd,n.Rd,p));n.ud!==q.ud&&(r||(r=g.J(f.Zf)),r.ud=d(r.ud,n.ud,p));n.He!==q.He&&(r||(r=g.J(f.Zf)),r.He=d(r.He,n.He,p));n.scale!==q.scale&&(r||(r=g.J(f.Zf)),r.scale=n.scale);n.sf!==q.sf&&(r||(r=g.J(f.Zf)),r.sf=n.sf);n.Gf!==q.Gf&&(r||(r=g.J(f.Zf)),r.Gf=n.Gf);n.oh!==q.oh&&(r||(r=g.J(f.Zf)),r.oh=n.oh);n.translationX!==q.translationX&&(r||(r=g.J(f.Zf)),
r.translationX=l(r.translationX,n.translationX,p));n.translationY!==q.translationY&&(r||(r=g.J(f.Zf)),r.translationY=l(r.translationY,n.translationY,p));n.Je!==q.Je&&(r||(r=g.J(f.Zf)),r.Je=l(r.Je,n.Je,p));r?this.updateMatrixWorld(g):g.ia(f.aD)};var e=new THREE.Vector3;a.prototype.updateMatrixWorld=function(g){b.MU(g,g.getComponent(f.Zf));var n=g.getComponent(f.va).N;n&&(b.getWorldPosition(g,e),g={position:{}},g.position.x=e.x,g.position.y=e.y,g.position.z=e.z,n.trigger(new c(k.Gl,g)))};a.prototype.kb=
function(g){g.ia(f.Zf);g.ia(f.aD)};a.H={};a.H.es=[f.Object3D,f.va,f.Zf];a.H.VT=[f.Object3D,f.va,f.Zf.not];a.H.oGa=[f.Object3D,f.va,f.Zf,f.aD];a.H.ZCa=[f.Object3D.not,f.va,f.Zf];a.H.$Ca=[f.va.not,f.Zf];return a});
define("jA",["require","three.mod"],function(a){const d=a("three.mod");class l extends d.Object3D{constructor(r){function t(K,N){K=new d.TorusGeometry(K,.0075,3,64,N*Math.PI*2);K.rotateY(Math.PI/2);K.rotateX(Math.PI/2);return K}function u(K){const N=new d.Object3D;for(const W in K)for(let aa=K[W].length;aa--;){const ca=K[W][aa][0].clone();var V=K[W][aa][1];const ea=K[W][aa][2],I=K[W][aa][3],P=K[W][aa][4];ca.name=W;ca.tag=P;V&&ca.position.set(V[0],V[1],V[2]);ea&&ca.rotation.set(ea[0],ea[1],ea[2]);
I&&ca.scale.set(I[0],I[1],I[2]);ca.updateMatrix();V=ca.geometry.clone();V.applyMatrix4(ca.matrix);ca.geometry=V;ca.renderOrder=100;ca.position.set(0,0,0);ca.rotation.set(0,0,0);ca.scale.set(1,1,1);N.add(ca)}return N}super();this.type="TransformControlsGizmo";this.properties=r;var v=new d.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),w=new d.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0});r=v.clone();r.opacity=.15;w=w.clone();
w.opacity=.5;var x=v.clone();x.color.setHex(16711680);const y=v.clone();y.color.setHex(65280);const z=v.clone();z.color.setHex(255);const B=v.clone();B.color.setHex(16711680);B.opacity=.5;const D=v.clone();D.color.setHex(65280);D.opacity=.5;const F=v.clone();F.color.setHex(255);F.opacity=.5;const A=v.clone();A.opacity=.25;var E=v.clone();E.color.setHex(16776960);E.opacity=.25;v.clone().color.setHex(16776960);var J=v.clone();J.color.setHex(7895160);var C=new d.CylinderGeometry(0,.04,.1,12);C.translate(0,
.05,0);const L=new d.BoxGeometry(.08,.08,.08);L.translate(0,.04,0);v=new d.BufferGeometry;v.setAttribute("position",new d.Float32BufferAttribute([0,0,0,1,0,0,0,0,0,0,0,0],3));const T=new d.CylinderGeometry(.0075,.0075,.5,3);T.translate(0,.25,0);C={X:[[new d.Mesh(C,x),[.5,0,0],[0,0,-Math.PI/2]],[new d.Mesh(C,x),[-.5,0,0],[0,0,Math.PI/2]],[new d.Mesh(T,x),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new d.Mesh(C,y),[0,.5,0]],[new d.Mesh(C,y),[0,-.5,0],[Math.PI,0,0]],[new d.Mesh(T,y)]],Z:[[new d.Mesh(C,z),[0,0,.5],
[Math.PI/2,0,0]],[new d.Mesh(C,z),[0,0,-.5],[-Math.PI/2,0,0]],[new d.Mesh(T,z),null,[Math.PI/2,0,0]]],XYZ:[[new d.Mesh(new d.OctahedronGeometry(.1,0),A.clone()),[0,0,0]]],XY:[[new d.Mesh(new d.BoxGeometry(.15,.15,.01),F.clone()),[.15,.15,0]]],YZ:[[new d.Mesh(new d.BoxGeometry(.15,.15,.01),B.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new d.Mesh(new d.BoxGeometry(.15,.15,.01),D.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]};const S={X:[[new d.Mesh(new d.CylinderGeometry(.2,0,.6,4),r),[.3,0,0],[0,0,-Math.PI/
2]],[new d.Mesh(new d.CylinderGeometry(.2,0,.6,4),r),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new d.Mesh(new d.CylinderGeometry(.2,0,.6,4),r),[0,.3,0]],[new d.Mesh(new d.CylinderGeometry(.2,0,.6,4),r),[0,-.3,0],[0,0,Math.PI]]],Z:[[new d.Mesh(new d.CylinderGeometry(.2,0,.6,4),r),[0,0,.3],[Math.PI/2,0,0]],[new d.Mesh(new d.CylinderGeometry(.2,0,.6,4),r),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new d.Mesh(new d.OctahedronGeometry(.2,0),r)]],XY:[[new d.Mesh(new d.BoxGeometry(.2,.2,.01),r),[.15,.15,0]]],YZ:[[new d.Mesh(new d.BoxGeometry(.2,
.2,.01),r),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new d.Mesh(new d.BoxGeometry(.2,.2,.01),r),[.15,0,.15],[-Math.PI/2,0,0]]]},U={START:[[new d.Mesh(new d.OctahedronGeometry(.01,2),w),null,null,null,"helper"]],END:[[new d.Mesh(new d.OctahedronGeometry(.01,2),w),null,null,null,"helper"]],DELTA:[[new d.Line(function(){const K=new d.BufferGeometry;K.setAttribute("position",new d.Float32BufferAttribute([0,0,0,1,1,1],3));return K}(),w),null,null,null,"helper"]],X:[[new d.Line(v,w.clone()),[-1E3,0,0],null,[1E6,
1,1],"helper"]],Y:[[new d.Line(v,w.clone()),[0,-1E3,0],[0,0,Math.PI/2],[1E6,1,1],"helper"]],Z:[[new d.Line(v,w.clone()),[0,0,-1E3],[0,-Math.PI/2,0],[1E6,1,1],"helper"]]};E={XYZE:[[new d.Mesh(t(.5,1),J),null,[0,Math.PI/2,0]]],X:[[new d.Mesh(t(.5,.5),x)]],Y:[[new d.Mesh(t(.5,.5),y),null,[0,0,-Math.PI/2]]],Z:[[new d.Mesh(t(.5,.5),z),null,[0,Math.PI/2,0]]],E:[[new d.Mesh(t(.75,1),E),null,[0,Math.PI/2,0]]]};J={AXIS:[[new d.Line(v,w.clone()),[-1E3,0,0],null,[1E6,1,1],"helper"]]};const X={XYZE:[[new d.Mesh(new d.SphereGeometry(.25,
10,8),r)]],X:[[new d.Mesh(new d.TorusGeometry(.5,.1,4,24),r),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new d.Mesh(new d.TorusGeometry(.5,.1,4,24),r),[0,0,0],[Math.PI/2,0,0]]],Z:[[new d.Mesh(new d.TorusGeometry(.5,.1,4,24),r),[0,0,0],[0,0,-Math.PI/2]]],E:[[new d.Mesh(new d.TorusGeometry(.75,.1,2,24),r)]]};x={X:[[new d.Mesh(L,x),[.5,0,0],[0,0,-Math.PI/2]],[new d.Mesh(T,x),[0,0,0],[0,0,-Math.PI/2]],[new d.Mesh(L,x),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new d.Mesh(L,y),[0,.5,0]],[new d.Mesh(T,y)],[new d.Mesh(L,
y),[0,-.5,0],[0,0,Math.PI]]],Z:[[new d.Mesh(L,z),[0,0,.5],[Math.PI/2,0,0]],[new d.Mesh(T,z),[0,0,0],[Math.PI/2,0,0]],[new d.Mesh(L,z),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new d.Mesh(new d.BoxGeometry(.15,.15,.01),F),[.15,.15,0]]],YZ:[[new d.Mesh(new d.BoxGeometry(.15,.15,.01),B),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new d.Mesh(new d.BoxGeometry(.15,.15,.01),D),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new d.Mesh(new d.BoxGeometry(.1,.1,.1),A.clone())]]};r={X:[[new d.Mesh(new d.CylinderGeometry(.2,0,.6,4),r),
[.3,0,0],[0,0,-Math.PI/2]],[new d.Mesh(new d.CylinderGeometry(.2,0,.6,4),r),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new d.Mesh(new d.CylinderGeometry(.2,0,.6,4),r),[0,.3,0]],[new d.Mesh(new d.CylinderGeometry(.2,0,.6,4),r),[0,-.3,0],[0,0,Math.PI]]],Z:[[new d.Mesh(new d.CylinderGeometry(.2,0,.6,4),r),[0,0,.3],[Math.PI/2,0,0]],[new d.Mesh(new d.CylinderGeometry(.2,0,.6,4),r),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new d.Mesh(new d.BoxGeometry(.2,.2,.01),r),[.15,.15,0]]],YZ:[[new d.Mesh(new d.BoxGeometry(.2,.2,.01),
r),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new d.Mesh(new d.BoxGeometry(.2,.2,.01),r),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new d.Mesh(new d.BoxGeometry(.2,.2,.2),r),[0,0,0]]]};w={X:[[new d.Line(v,w.clone()),[-1E3,0,0],null,[1E6,1,1],"helper"]],Y:[[new d.Line(v,w.clone()),[0,-1E3,0],[0,0,Math.PI/2],[1E6,1,1],"helper"]],Z:[[new d.Line(v,w.clone()),[0,0,-1E3],[0,-Math.PI/2,0],[1E6,1,1],"helper"]]};this.jy={};this.ps={};this.kG={};this.add(this.jy.translate=u(C));this.add(this.jy.rotate=u(E));this.add(this.jy.scale=
u(x));this.add(this.ps.translate=u(S));this.add(this.ps.rotate=u(X));this.add(this.ps.scale=u(r));this.add(this.kG.translate=u(U));this.add(this.kG.rotate=u(J));this.add(this.kG.scale=u(w));this.ps.translate.visible=!1;this.ps.rotate.visible=!1;this.ps.scale.visible=!1}updateMatrixWorld(r){const t="local"===("scale"===this.properties.mode?"local":this.properties.Wla)?this.properties.pH:g;this.jy.translate.visible="translate"===this.properties.mode;this.jy.rotate.visible="rotate"===this.properties.mode;
this.jy.scale.visible="scale"===this.properties.mode;this.kG.translate.visible="translate"===this.properties.mode;this.kG.rotate.visible="rotate"===this.properties.mode;this.kG.scale.visible="scale"===this.properties.mode;let u=[];u=u.concat(this.ps[this.properties.mode].children);u=u.concat(this.jy[this.properties.mode].children);u=u.concat(this.kG[this.properties.mode].children);for(let w=0;w<u.length;w++){const x=u[w];x.visible=!0;x.rotation.set(0,0,0);x.position.copy(this.properties.Sy);var v=
void 0;this.properties.camera.isOrthographicCamera?(v=this.properties.camera,v=(v.top-v.bottom)/v.zoom):(v=this.properties.camera,v=this.properties.Sy.distanceTo(this.properties.Ec)*Math.min(1.9*Math.tan(Math.PI*v.fov/360)/v.zoom,7));x.scale.set(1,1,1).multiplyScalar(v*this.properties.size/4);"helper"===x.tag?(x.visible=!1,"AXIS"===x.name?(x.visible=!!this.properties.axis,"X"===this.properties.axis&&(k.setFromEuler(c.set(0,0,0)),x.quaternion.copy(t).multiply(k),.9<Math.abs(h.copy(n).applyQuaternion(t).dot(this.properties.eye))&&
(x.visible=!1)),"Y"===this.properties.axis&&(k.setFromEuler(c.set(0,0,Math.PI/2)),x.quaternion.copy(t).multiply(k),.9<Math.abs(h.copy(q).applyQuaternion(t).dot(this.properties.eye))&&(x.visible=!1)),"Z"===this.properties.axis&&(k.setFromEuler(c.set(0,Math.PI/2,0)),x.quaternion.copy(t).multiply(k),.9<Math.abs(h.copy(p).applyQuaternion(t).dot(this.properties.eye))&&(x.visible=!1)),"XYZE"===this.properties.axis&&(k.setFromEuler(c.set(0,Math.PI/2,0)),h.copy(this.properties.YB),x.quaternion.setFromRotationMatrix(b.lookAt(f,
h,q)),x.quaternion.multiply(k),x.visible=this.properties.Dj),"E"===this.properties.axis&&(x.visible=!1)):"START"===x.name?(x.position.copy(this.properties.oH),x.visible=this.properties.Dj):"END"===x.name?(x.position.copy(this.properties.Sy),x.visible=this.properties.Dj):"DELTA"===x.name?(x.position.copy(this.properties.oH),x.quaternion.copy(this.properties.Ema),m.set(1E-10,1E-10,1E-10).add(this.properties.oH).sub(this.properties.Sy).multiplyScalar(-1),m.applyQuaternion(this.properties.Ema.clone().invert()),
x.scale.copy(m),x.visible=this.properties.Dj):(x.quaternion.copy(t),this.properties.Dj?x.position.copy(this.properties.oH):x.position.copy(this.properties.Sy),this.properties.axis&&(x.visible=-1!==this.properties.axis.search(x.name)))):(x.quaternion.copy(t),"translate"===this.properties.mode||"scale"===this.properties.mode?("X"===x.name&&.99<Math.abs(h.copy(n).applyQuaternion(t).dot(this.properties.eye))&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),"Y"===x.name&&.99<Math.abs(h.copy(q).applyQuaternion(t).dot(this.properties.eye))&&
(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),"Z"===x.name&&.99<Math.abs(h.copy(p).applyQuaternion(t).dot(this.properties.eye))&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),"XY"===x.name&&.2>Math.abs(h.copy(p).applyQuaternion(t).dot(this.properties.eye))&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),"YZ"===x.name&&.2>Math.abs(h.copy(n).applyQuaternion(t).dot(this.properties.eye))&&(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1),"XZ"===x.name&&.2>Math.abs(h.copy(q).applyQuaternion(t).dot(this.properties.eye))&&
(x.scale.set(1E-10,1E-10,1E-10),x.visible=!1)):"rotate"===this.properties.mode&&(e.copy(t),h.copy(this.properties.eye).applyQuaternion(k.copy(t).invert()),-1!==x.name.search("E")&&x.quaternion.setFromRotationMatrix(b.lookAt(this.properties.eye,f,q)),"X"===x.name&&(k.setFromAxisAngle(n,Math.atan2(-h.y,h.z)),k.multiplyQuaternions(e,k),x.quaternion.copy(k)),"Y"===x.name&&(k.setFromAxisAngle(q,Math.atan2(h.x,h.z)),k.multiplyQuaternions(e,k),x.quaternion.copy(k)),"Z"===x.name&&(k.setFromAxisAngle(p,Math.atan2(h.y,
h.x)),k.multiplyQuaternions(e,k),x.quaternion.copy(k))),x.visible=x.visible&&(-1===x.name.indexOf("X")||this.properties.DJa),x.visible=x.visible&&(-1===x.name.indexOf("Y")||this.properties.EJa),x.visible=x.visible&&(-1===x.name.indexOf("Z")||this.properties.FJa),x.visible=x.visible&&(-1===x.name.indexOf("E")||this.properties.DJa&&this.properties.EJa&&this.properties.FJa),x.material.Jc=x.material.Jc||x.material.color.clone(),x.material.Mb=x.material.Mb||x.material.opacity,x.material.color.copy(x.material.Jc),
x.material.opacity=x.material.Mb,this.properties.enabled&&this.properties.axis&&(x.name===this.properties.axis?(x.material.color.setHex(16776960),x.material.opacity=1):this.properties.axis.split("").some(function(y){return x.name===y})&&(x.material.color.setHex(16776960),x.material.opacity=1)))}super.updateMatrixWorld(r)}}const m=new d.Vector3,k=new d.Quaternion,c=new d.Euler,h=new d.Vector3(0,1,0),f=new d.Vector3(0,0,0),b=new d.Matrix4,e=new d.Quaternion,g=new d.Quaternion,n=new d.Vector3(1,0,0),
q=new d.Vector3(0,1,0),p=new d.Vector3(0,0,1);return l});
define("lj",["require","three.mod"],function(a){const d=a("three.mod");class l extends d.Mesh{constructor(r){super(new d.PlaneGeometry(1E5,1E5,2,2),new d.MeshBasicMaterial({visible:!1,wireframe:!0,side:d.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1}));this.properties=r;this.type="TransformControlsPlane"}updateMatrixWorld(r){let t=this.properties.Wla;this.position.copy(this.properties.Sy);"scale"===this.properties.mode&&(t="local");n.copy(b).applyQuaternion("local"===t?this.properties.pH:c);
q.copy(e).applyQuaternion("local"===t?this.properties.pH:c);p.copy(g).applyQuaternion("local"===t?this.properties.pH:c);k.copy(q);switch(this.properties.mode){case "translate":case "scale":switch(this.properties.axis){case "X":k.copy(this.properties.eye).cross(n);h.copy(n).cross(k);break;case "Y":k.copy(this.properties.eye).cross(q);h.copy(q).cross(k);break;case "Z":k.copy(this.properties.eye).cross(p);h.copy(p).cross(k);break;case "XY":h.copy(p);break;case "YZ":h.copy(n);break;case "XZ":k.copy(p);
h.copy(q);break;case "XYZ":case "E":h.set(0,0,0)}break;default:h.set(0,0,0)}0===h.length()?this.quaternion.copy(this.properties.bCa):(f.lookAt(m.set(0,0,0),h,k),this.quaternion.setFromRotationMatrix(f));super.updateMatrixWorld(r)}}const m=new d.Vector3,k=new d.Vector3(0,1,0),c=new d.Quaternion,h=new d.Vector3,f=new d.Matrix4,b=new d.Vector3(1,0,0),e=new d.Vector3(0,1,0),g=new d.Vector3(0,0,1),n=new d.Vector3,q=new d.Vector3,p=new d.Vector3;return l});
define("bf",["require","three.mod","jA","lj"],function(a){function d(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 l=a("three.mod"),m=a("jA"),k=a("lj");const c=new l.Vector3,h=new l.Vector3,f=new l.Quaternion,b={X:new l.Vector3(1,0,0),Y:new l.Vector3(0,1,0),Z:new l.Vector3(0,0,1)},e={type:"change"},g={type:"mouseDown",mode:null},n={type:"mouseUp",mode:null},q={type:"objectChange"};class p extends l.Object3D{constructor(r){super();this.camera=
r;this.visible=!1;this.jy=r=new m(this);this.add(r);this.Eg=r=new k(this);this.add(r);this.object=void 0;this.enabled=!0;this.axis=null;this.mode="translate";this.Dj=!1;this.Uu=this.Vka=this.lo=null;this.Wla="world";this.size=1;this.FJa=this.EJa=this.DJa=!0;this.offset=new l.Vector3;this.YJa=new l.Vector3;this.VCa=new l.Vector3;this.Am=new l.Vector3;this.n9a=new l.Vector3;this.kHa=new l.Quaternion;this.rka=new l.Quaternion;this.ska=new l.Vector3;this.kdb=new l.Vector3;this.Z5=new l.Quaternion;this.jdb=
new l.Vector3;this.Aka=new l.Vector3;this.FG=new l.Quaternion;this.Zka=new l.Vector3;this.Sy=new l.Vector3;this.oH=new l.Vector3;this.pH=new l.Quaternion;this.Ema=new l.Quaternion;this.Ec=new l.Vector3;this.bCa=new l.Quaternion;this.yy=new l.Vector3;this.xy=new l.Vector3;this.YB=new l.Vector3;this.rotationAngle=0;this.eye=new l.Vector3}updateMatrixWorld(r=!1){void 0!==this.object&&(this.object.updateMatrixWorld(),null===this.object.parent?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):
this.object.parent.matrixWorld.decompose(this.n9a,this.kHa,this.ska),this.object.matrixWorld.decompose(this.Sy,this.pH,this.jdb),this.rka.copy(this.kHa).invert(),this.Z5.copy(this.pH).invert());this.camera.updateMatrixWorld();this.camera.matrixWorld.decompose(this.Ec,this.bCa,this.Am);this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye):this.eye.copy(this.Ec).sub(this.Sy).normalize();super.updateMatrixWorld(r)}v9a(r){if(void 0!==this.object&&!0!==this.Dj&&null!==this.axis){if(r=
d(this.Eg,r,!0))this.object.updateMatrixWorld(),this.object.parent&&this.object.parent.updateMatrixWorld(),this.Aka.copy(this.object.position),this.FG.copy(this.object.quaternion),this.Zka.copy(this.object.scale),this.object.matrixWorld.decompose(this.oH,this.Ema,this.kdb),this.yy.copy(r.point).sub(this.oH);this.Dj=!0;g.mode=this.mode;this.dispatchEvent(g)}}w9a(r){if(!1===this.Dj){var t=d(this.jy.ps[this.mode],r);this.axis=t?t.object.name:null}else{t=this.axis;var u=this.mode,v=this.object,w=this.Wla;
if("scale"===u)w="local";else if("E"===t||"XYZE"===t||"XYZ"===t)w="world";if(void 0!==v&&null!==t&&!1!==this.Dj&&(r=d(this.Eg,r,!0))){this.xy.copy(r.point).sub(this.oH);if("translate"===u)this.offset.copy(this.xy).sub(this.yy),"local"===w&&"XYZ"!==t&&this.offset.applyQuaternion(this.Z5),-1===t.indexOf("X")&&(this.offset.x=0),-1===t.indexOf("Y")&&(this.offset.y=0),-1===t.indexOf("Z")&&(this.offset.z=0),"local"===w&&"XYZ"!==t?this.offset.applyQuaternion(this.FG).divide(this.ska):this.offset.applyQuaternion(this.rka).divide(this.ska),
v.position.copy(this.offset).add(this.Aka),this.lo&&("local"===w&&(v.position.applyQuaternion(f.copy(this.FG).invert()),-1!==t.search("X")&&(v.position.x=Math.round(v.position.x/this.lo)*this.lo),-1!==t.search("Y")&&(v.position.y=Math.round(v.position.y/this.lo)*this.lo),-1!==t.search("Z")&&(v.position.z=Math.round(v.position.z/this.lo)*this.lo),v.position.applyQuaternion(this.FG)),"world"===w&&(v.parent&&v.position.add(c.setFromMatrixPosition(v.parent.matrixWorld)),-1!==t.search("X")&&(v.position.x=
Math.round(v.position.x/this.lo)*this.lo),-1!==t.search("Y")&&(v.position.y=Math.round(v.position.y/this.lo)*this.lo),-1!==t.search("Z")&&(v.position.z=Math.round(v.position.z/this.lo)*this.lo),v.parent&&v.position.sub(c.setFromMatrixPosition(v.parent.matrixWorld))));else if("scale"===u)-1!==t.search("XYZ")?(w=this.xy.length()/this.yy.length(),0>this.xy.dot(this.yy)&&(w*=-1),h.set(w,w,w)):(c.copy(this.yy),h.copy(this.xy),c.applyQuaternion(this.Z5),h.applyQuaternion(this.Z5),h.divide(c),-1===t.search("X")&&
(h.x=1),-1===t.search("Y")&&(h.y=1),-1===t.search("Z")&&(h.z=1)),v.scale.copy(this.Zka).multiply(h),this.Uu&&(-1!==t.search("X")&&(v.scale.x=Math.round(v.scale.x/this.Uu)*this.Uu||this.Uu),-1!==t.search("Y")&&(v.scale.y=Math.round(v.scale.y/this.Uu)*this.Uu||this.Uu),-1!==t.search("Z")&&(v.scale.z=Math.round(v.scale.z/this.Uu)*this.Uu||this.Uu));else if("rotate"===u){this.offset.copy(this.xy).sub(this.yy);u=20/this.Sy.distanceTo(c.setFromMatrixPosition(this.camera.matrixWorld));r=!1;if("XYZE"===t)this.YB.copy(this.offset).cross(this.eye).normalize(),
this.rotationAngle=this.offset.dot(c.copy(this.YB).cross(this.eye))*u;else if("X"===t||"Y"===t||"Z"===t)this.YB.copy(b[t]),c.copy(b[t]),"local"===w&&c.applyQuaternion(this.pH),c.cross(this.eye),0===c.length()?r=!0:this.rotationAngle=this.offset.dot(c.normalize())*u;if("E"===t||r)this.YB.copy(this.eye),this.rotationAngle=this.xy.angleTo(this.yy),this.YJa.copy(this.yy).normalize(),this.VCa.copy(this.xy).normalize(),this.rotationAngle*=0>this.VCa.cross(this.YJa).dot(this.eye)?1:-1;this.Vka&&(this.rotationAngle=
Math.round(this.rotationAngle/this.Vka)*this.Vka);"local"===w&&"E"!==t&&"XYZE"!==t?(v.quaternion.copy(this.FG),v.quaternion.multiply(f.setFromAxisAngle(this.YB,this.rotationAngle)).normalize()):(this.YB.applyQuaternion(this.rka),v.quaternion.copy(f.setFromAxisAngle(this.YB,this.rotationAngle)),v.quaternion.multiply(this.FG).normalize())}this.dispatchEvent(e);this.dispatchEvent(q)}}}AHa(){this.Dj&&null!==this.axis&&(n.mode=this.mode,this.dispatchEvent(n));this.Dj=!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.Dj&&(this.object.position.copy(this.Aka),this.object.quaternion.copy(this.FG),this.object.scale.copy(this.Zka),this.dispatchEvent(e),this.dispatchEvent(q),this.yy.copy(this.xy))}setSize(r){this.size=r}}return p});
define("fE","require exports three.mod pB cI fU mf hp cv bf".split(" "),function(a,d,l,m,k,c,h,f,b,e){function g(v){var w=this,x=w.getComponent(c.Il),y=w.getComponent(c.Xg),z=x.O5;x=x.Qu;if(z&&x)if(p.SCa.find(function(D){return D!=w}))z.Dj&&z.AHa(f.e2(u,z.camera,x));else{var B=x.getComponent(c.Fc).ZF;v.name==m.hb?(z.v9a(f.e2(u,z.camera,x)),B.unbind(m.ma,g,w),z.Dj&&B.bind(m.ma,g,w,!0)):v.name==m.Eb?z.AHa(f.e2(u,z.camera,x)):v.name==m.Pb?(B.unbind(m.ma,g,w),z.w9a(f.e2(u,z.camera,x))):v.name==m.ma&&
(x=q(y),z.mode=x[(x.indexOf(z.mode)+1)%x.length]);z.Dj&&!w.getComponent(c.Al)?w.I(c.Al):!z.Dj&&w.getComponent(c.Al)&&w.ia(c.Al);y.N&&z.Dj&&v.name==m.Pb&&(t.multiplyMatrices(z.object.parent.matrixWorld,r),y.N.trigger(new k(m.ba,{position:z.object.position,quaternion:z.object.quaternion,scale:n(z.object.scale),matrix:r,matrixWorld:t})))}}function n(v){var w=Math.abs(v.x-v.y)+Math.abs(v.x-v.z),x=Math.abs(v.y-v.x)+Math.abs(v.y-v.z),y=Math.abs(v.z-v.x)+Math.abs(v.z-v.y);if(!(w>x&&w>y)){if(x>w&&x>y)return v.y;
if(y>w&&y>x)return v.z}return v.x}function q(v){var w=[];v.translate&&w.push("translate");v.rotate&&w.push("rotate");v.scale&&w.push("scale");0==w.length&&w.push("translate");return w}var p=function(v){function w(){var x=v.call(this)||this;x.Wb=x.Wb.bind(x);x.Ib=x.Ib.bind(x);x.kb=x.kb.bind(x);return x}Z(w,v);w.prototype.Wc=function(){this.yKa.u.length&&this.yKa.u.slice().forEach(this.Wb);this.zKa.u.length&&this.zKa.u.slice().forEach(this.kb);this.AKa.u.length&&this.AKa.u.slice().forEach(this.kb);
this.xKa.u.length&&this.xKa.u.slice().forEach(this.Ib);w.SCa=this.Xx.u};w.prototype.Wb=function(x){x.I(c.Il)};w.prototype.Ib=function(x){this.Zcb(x);this.Bs(x)};w.prototype.Zcb=function(x){var y=x.getComponent(c.Object3D).qa,z=b.qf(x),B=z&&b.Cu(z),D=x.getComponent(c.Xg),F=x.getComponent(c.Il).O5;F&&y&&F.camera===B&&F.parent===z||(F&&(F.object.parent.remove(F.object),F.detach(),F.dispose()),F=null,B&&y&&z&&(F=new e(B),F.attach(new l.Object3D),z.add(F)),x.J(c.Il).O5=F);F&&y&&(y.parent!=F.object.parent&&
(F.object.parent&&F.object.parent.remove(F.object),y.parent&&y.parent.add(F.object)),x=q(D),-1==x.indexOf(F.mode)&&(F.mode=x[0]),F.object.matrix.copy(y.matrix),F.object.matrix.decompose(F.object.position,F.object.quaternion,F.object.scale))};w.prototype.Bs=function(x){var y=x.getComponent(c.Il),z=this.p6a(x),B=z&&z.getComponent(c.Fc).ZF||null,D=(y=y.Qu)&&y.getComponent(c.Fc).ZF||null;z!=y&&(D&&(D.unbind(m.hb,g,x),D.unbind(m.Eb,g,x),D.unbind(m.Pb,g,x),D.unbind(m.ma,g,x)),x.J(c.Il).zy=B)&&(B.bind(m.hb,
g,x,!0),B.bind(m.Eb,g,x,!0),B.bind(m.Pb,g,x,!0));z!=y&&(x.J(c.Il).Qu=z)};w.prototype.p6a=function(x){return this.Ij.u.reduce(function(y,z){if(z.P!==x.P)return y;if(!y)return z;var B=z.getComponent(c.Fc);return!y.getComponent(c.Fc).Zi&&B.Zi?z:y})};w.prototype.kb=function(x){var y=x.getComponent(c.Il),z=y&&y.O5;z&&(z.object.parent.remove(z.object),z.detach(),z.dispose());if(y=y.zy)y.unbind(m.hb,g,x),y.unbind(m.Eb,g,x),y.unbind(m.Pb,g,x),y.unbind(m.ma,g,x);x.ia(c.Il)};w.H={};w.SCa=[];return w}(h),r=
new l.Matrix4,t=new l.Matrix4,u=new l.Raycaster;p.H.Xx=[c.Al];p.H.Ij=[c.Fc];p.H.xKa=[c.Object3D,c.Xg,c.Il];p.H.yKa=[c.Object3D,c.Xg,c.Il.not];p.H.zKa=[c.Object3D.not,c.Il];p.H.AKa=[c.Xg.not,c.Il];return p});
define("gM",["require","pB","lx","cI","oW"],function(a){function d(h,f,b,e){this.ha=h;this.o=f;this.ne=b;this.Ga=e;this.Vd=h.Db();this.Kf=this.o.get("currentTime");this.C=this.o.get("state");this.Jk=this.o.get("loop");this.F_=this.Vd.get("mute");this.rZ=this.o.get("mute");this.C=this.o.get("autoplay")?m.PLAYING:m.Qb;this.o8();this.o.set("state",this.C);this.ha.Vf(this.F_||this.rZ);this.ha.setLoop(this.Jk);this.ha.setCurrentTime(this.Kf);this.ha.Qc(this.C)}var l=a("pB"),m=a("lx"),k=a("cI"),c=a("oW");
d.prototype.dispose=function(){this.vea()};d.prototype.qwa=function(){var h=this.o.get("currentTime",0);this.Kf!=h&&this.ha.setCurrentTime(this.Kf=h)};d.prototype.uwa=function(){var h=this.o.get("state",m.U);this.C!=h&&this.ha.Qc(this.C=h)};d.prototype.swa=function(){var h=this.o.get("mute",!1);this.rZ!=h&&this.ha.Vf(this.F_||(this.rZ=h))};d.prototype.rwa=function(){var h=this.o.get("loop",!1);this.Jk!=h&&this.ha.setLoop(this.Jk=h)};d.prototype.fQ=function(){var h=this.Vd.get("mute",!1);this.F_!=
h&&this.ha.Vf((this.F_=h)||this.rZ)};d.prototype.mQ=function(){this.o.set("currentTime",this.Kf=this.ha.getCurrentTime())};d.prototype.kQ=function(){this.o.set("duration",this.ha.ui())};d.prototype.lQ=function(){this.o.set("state",this.C=this.ha.getState());this.Ga()};d.prototype.nQ=function(){this.ne.trigger(new k(l.Gb))};d.prototype.o8=function(){this.Vd.bind(l.G("mute"),this.fQ,this,!0);this.ha.bind(c.Wf,this.mQ,this,!0);this.ha.bind(c.dj,this.kQ,this,!0);this.ha.bind(l.Ae,this.lQ,this,!0);this.ha.bind(l.Gb,
this.nQ,this,!0);this.o.bind(l.G("currentTime"),this.qwa,this,!0);this.o.bind(l.G("state"),this.uwa,this,!0);this.o.bind(l.G("mute"),this.swa,this,!0);this.o.bind(l.G("loop"),this.rwa,this,!0)};d.prototype.vea=function(){this.Vd.unbind(l.G("mute"),this.fQ,this,!0);this.ha.unbind(c.Wf,this.mQ,this,!0);this.ha.unbind(c.dj,this.kQ,this,!0);this.ha.unbind(l.Ae,this.lQ,this,!0);this.ha.unbind(l.Gb,this.nQ,this,!0);this.o.unbind(l.G("currentTime"),this.qwa,this,!0);this.o.unbind(l.G("state"),this.uwa,this,
!0);this.o.unbind(l.G("mute"),this.swa,this,!0);this.o.unbind(l.G("loop"),this.rwa,this,!0)};return d});
define("x","require pB lx iy cA lS eV gz w".split(" "),function(a){function d(g,n,q,p){this.GX=e.browser()==e.Fs?THREE.LinearSRGBColorSpace:"srgb"==n.get("encoding","srgb")?THREE.SRGBColorSpace:THREE.LinearSRGBColorSpace;this.Dq();this.ha=g;this.o=n;this.fb=q;this.Ga=p;this.WJ=this.fb.get("posterURL");this.iBa=this.fb.get("url");this.sa=this.fb.get("width");this.wa=this.fb.get("height");this.ag=null;this.qF=this.rF=void 0;this.Vta();this.fb.bind(l.G("posterURL"),this.owa,this,!0);this.Ga();this.Da=
this.T=null}var l=a("pB"),m=a("lx"),k=a("iy"),c=a("cA"),h=a("lS"),f=a("eV"),b=a("gz"),e=a("w");d.prototype.update=function(){var g=this.ha.b3();g.isEmpty()&&(g=null);if(g&&(!this.ag||this.ag&&!this.ag.isEqual(g))){this.ag=g;g=this.ag.kt;var n=b.NL(g);n&&(g.width=g.videoWidth||this.sa,g.height=g.videoHeight||this.wa);!this.T&&this.iBa&&b.hLa(this.iBa)&&(this.T=document.createElement("canvas"),this.T.width=this.sa,this.T.height=this.wa,this.Da=this.T.getContext("2d"));this.T&&n&&(this.Da.drawImage(g,
0,0,this.T.width,this.T.height),g=this.T);this.Vya(g)}else!this.ag&&this.hx&&this.Ia.image!=this.hx&&this.Vya(this.hx);(this.Ia.needsUpdate||this.ha.getState()==m.PLAYING)&&this.Ga()};d.prototype.owa=function(){this.z_a(this.fb.get("posterURL"))};d.prototype.z_a=function(g){this.WJ!=g&&(this.hAa(),this.WJ=g,this.Vta())};d.prototype.Vta=function(){this.WJ&&(this.hx=null,this.VJ=new c,this.VJ.wM([this.WJ]),this.VJ.bind(l.ea,this.nwa,this,!0),h.co(this.VJ,this.o.get("loadPriority",k.Cl)))};d.prototype.hAa=
function(){this.WJ&&(this.VJ.unbind(l.ea,this.nwa,this,!0),h.Lj(this.VJ,this.o.get("loadPriority",k.Cl)),this.hx=this.VJ=null)};d.prototype.nwa=function(){this.hx=h.Cf(this.WJ);if(this.hx.width!=this.sa||this.hx.height!=this.wa){var g=document.createElement("canvas"),n=g.getContext("2d");g.width=this.sa;g.height=this.wa;n.drawImage(this.hx,0,0,this.sa,this.wa);this.hx=g}this.Ga()};d.prototype.Vya=function(g){this.Ia&&this.rF==g.width&&this.qF==g.height?this.Ia.image=g:this.Dq(g);this.Ia.needsUpdate=
!0};d.prototype.Dq=function(g){this.wX();this.Ia=new THREE.Texture;this.Ia.image=g||f.FDa();this.rF=this.Ia.image.width;this.qF=this.Ia.image.height;this.Ia.generateMipmaps=!1;this.Ia.minFilter=THREE.LinearFilter;this.Ia.magFilter=THREE.LinearFilter;this.Ia.format=THREE.RGBAFormat};d.prototype.wX=function(){this.Ia&&(this.qF=this.rF=void 0,this.Ia.dispose(),this.Ia=null)};d.prototype.dispose=function(){this.hAa();this.fb.unbind(l.G("posterURL"),this.owa,this,!0);this.Da=this.fb=null;this.T&&(this.T=
this.T.width=this.T.height=0);this.wX();this.Ga=this.kh=this.ha=null};d.prototype.o3=function(){return this.Ia};return d});
define("ds","require exports lh pB iy cA lS three.mod".split(" "),function(a,d,l,m,k,c,h,f){var b=["alphaMap"];return function(){function e(g,n,q){this.t$a=function(p){this.a2!=p&&(this.NKa(),this.a2=p,this.m8a())};this.properties=g;this.level=n;this.Ta=q;this.p4=this.p4.bind(this);l.da(this.level,b,this.p4,!0)}e.prototype.dispose=function(){l.ca(this.level,b,this.p4);this.NKa();this.k5a()};e.prototype.o3=function(){return this.texture};e.prototype.p4=function(){this.t$a(this.level.get("alphaMapURL"))};
e.prototype.m8a=function(){this.a2&&(this.LF=new c,this.LF.wM([this.a2]),this.LF.bind(m.ea,this.pGa,this,!0),h.co(this.LF,this.properties.get("loadPriority",k.Cl)))};e.prototype.NKa=function(){this.LF&&(this.LF.unbind(m.ea,this.pGa,this,!0),h.Lj(this.LF,this.properties.get("loadPriority",k.Cl)),this.EBa=this.LF=null)};e.prototype.pGa=function(){this.EBa=h.Cf(this.a2);this.createTexture();this.Ta()};e.prototype.createTexture=function(){this.texture=new f.Texture;this.texture.image=this.EBa;this.texture.generateMipmaps=
!1;this.texture.minFilter=f.LinearFilter;this.texture.magFilter=f.LinearFilter;this.texture.format=f.RGBAFormat;this.texture.needsUpdate=!0};e.prototype.k5a=function(){this.texture&&(this.texture.dispose(),this.texture=null)};return e}()});
define("lm",["require","w","gz"],function(a){a("w");var d=a("gz");return{GLa:function(){this.blending=0;this.QL=void 0;this.HJa=this.threshold=0},uNa:function(){this.HL=!1;this.height=this.width=100},create:function(l,m,k){var c=l.HL&&d.OEa(),h=l.HL&&d.NEa(),f=void 0,b=!c,e={uniforms:{},transparent:!0};e.uniforms.text1={type:"sampler2D",value:null};e.uniforms.textAlpha={type:"sampler2D",value:null};e.uniforms.validTextAlpha={type:"bool",value:!1};e.uniforms.opacity={type:"float",value:1};e.vertexShader=
["varying vec2 vUV;\nvoid main() {","\tvUV = vec2( uv.x, "+(c?"1.0 - uv.y":"uv.y")+");","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"].join("\n");if(h||m.blending||m.QL){c=[];var g=[];c=c.concat(["uniform sampler2D text1;","uniform sampler2D textAlpha;","uniform bool validTextAlpha;","uniform float opacity;","varying vec2 vUV;"]);g=g.concat(["   vec4 color = texture2D(text1, vUV);","   float alpha = color.a * opacity;","   if (validTextAlpha)","       alpha *= texture2D(textAlpha, vUV).r;"]);
m.blending&&(f=.5*Math.min(l.width,l.height)*m.blending,e.uniforms.blendingLimit={type:"v2",value:new THREE.Vector2(f/l.width,f/l.height)},c=c.concat(["uniform vec2 blendingLimit;"]),g=g.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(",")));
m.QL&&(e.uniforms.chromaColor={type:"v3",value:new THREE.Vector3(parseInt(m.QL.substr(1,2),16)/255,parseInt(m.QL.substr(3,2),16)/255,parseInt(m.QL.substr(5,2),16)/255)},e.uniforms.chromaThreshold={type:"f",value:m.threshold},e.uniforms.chromaSmoothing={type:"f",value:m.HJa},c=c.concat(["uniform vec3 chromaColor;","uniform float chromaThreshold;","uniform float chromaSmoothing;"]),g=g.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("{")));
g=g.concat(["\tgl_FragColor = vec4(color"+(h?".bgr":".rgb")+", alpha);"]);f=THREE.RGBAFormat;e.fragmentShader=[].concat(c,["void main() {"],g,[],["}"]).join("\n")}else e.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}";
l=new THREE.ShaderMaterial(e);l.transparent=!0;l.depthWrite=!0;l.side=THREE.FrontSide;l.depthTest=!0;l.needsUpdate=!0;l.userData.sKa=b;l.userData.tKa=f;this.lV(l,k);return l},lV:function(l,m){l.uniforms.text1.value!==m&&(void 0!==l.userData.sKa&&(m.flipY=l.userData.sKa),void 0!==l.userData.tKa&&(m.format=l.userData.tKa),l.uniforms.text1.value=m)},zcb:function(l,m){l.uniforms.textAlpha.value!==m&&(l.uniforms.textAlpha.value=m,l.uniforms.validTextAlpha.value=!!m)}}});
define("bm","require lh pB lx gM x ds lm gz fU oV oW".split(" "),function(a){function d(p){this.m=p;this.DZ=this.DZ.bind(this);p=p.getComponent(g.xo);this.ne=p.N;this.o=p.properties;this.M1=p.Ama;this.Vd=this.m.P.Ap();this.Ga=this.Ga.bind(this);this.zg=!1;this.fb=null;l.da(this.M1,["levels.url","levels.srcObject","levels.width","levels.height"],this.DZ,!0)}var l=a("lh"),m=a("pB"),k=a("lx"),c=a("gM"),h=a("x"),f=a("ds"),b=a("lm"),e=a("gz"),g=a("fU"),n=a("oV"),q=a("oW");d.prototype.update=function(){this.zg&&
(this.zg=!1,this.pp.update(),b.lV(this.ya,this.pp.o3()),b.zcb(this.ya,this.r8.o3()))};d.prototype.DZ=function(){this.dR(q.mk(this.M1))};d.prototype.dR=function(p){p=p&&(p.get("url")||p.get("srcObject"))?p:null;this.fb!=p&&(this.fb&&(this.hBa.dispose(),this.hBa=null,this.o.unbind(m.G("opacity"),this.twa,this,!0),this.l$(),this.pp.dispose(),this.pp=null,this.r8.dispose(),this.r8=null,this.QRa(),this.zg=!1),this.fb=p)&&(this.ARa(),this.hBa=new c(this.ha,this.o,this.ne,this.Ga),this.pp=new h(this.ha,
this.o,this.fb,this.Ga),this.r8=new f(this.o,this.fb,this.Ga),this.aw(),this.o.bind(m.G("opacity"),this.twa,this,!0),this.Iya(this.Mb=this.o.get("opacity",1)),this.zg=!1,this.Ga())};d.prototype.Ga=function(){this.zg||(this.zg=!0,this.m.P.Ta())};d.prototype.ARa=function(){this.ha=new q(this.m.P.Ap(),this.M1);this.rm=new n(this.o,this.ha)};d.prototype.QRa=function(){this.ha.Qc(k.U);this.ha.clear();this.ha=null;this.rm.clear();this.rm=null};d.prototype.aw=function(){var p=new b.uNa;p.HL=!this.fb.get("srcObject")&&
e.HL(this.fb.get("url"));p.width=this.fb.get("width");p.height=this.fb.get("height");var r=new b.GLa;r.blending=this.o.get("blending",0);r.QL=this.o.get("chromaColor");r.threshold=this.o.get("chromaThreshold",0);r.HJa=this.o.get("chromaSmoothing",0);this.ya=b.create(p,r,this.pp.o3());this.m.I(g.Material).material=this.ya};d.prototype.l$=function(){this.ya.dispose();this.ya=null;this.m.ia(g.Material)};d.prototype.dispose=function(){this.dR(null);this.o.set("state",k.U);this.m=this.ne=this.o=this.Vd=
null;l.ca(this.M1,["levels.url","levels.srcObject","levels.width","levels.height"],this.DZ)};d.prototype.twa=function(){var p=this.o.get("opacity");this.Mb!=p&&(this.Iya(this.Mb=p),this.Ga())};d.prototype.Iya=function(p){this.ya.opacity=p;this.ya.isShaderMaterial&&this.ya.uniforms.opacity&&(this.ya.uniforms.opacity.value=p)};d.$a=function(p){p.I(g.uz).manager=new d(p)};d.Ca=function(p){var r=p.getComponent(g.uz);r.manager.dispose();r.manager=null;p.ia(g.uz)};d.update=function(p){p.getComponent(g.uz).manager.update()};
return d});define("eI",["require","lV","mf","fU","bm"],function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("bm");a=d.extend(l,function(){l.apply(this,arguments)});a.prototype.Wc=function(){this.Jm.u.length&&this.Jm.u.slice().forEach(k.$a);this.Km.u.length&&this.Km.u.slice().forEach(k.Ca);this.materials.u.length&&this.materials.u.slice().forEach(k.update)};a.H={};a.H.Jm=[m.xo,m.uz.not];a.H.materials=[m.xo,m.uz];a.H.Km=[m.xo.not,m.uz];return a});
define("ps",["require","lV","mf","cv","fU"],function(a){var d=a("lV"),l=a("mf"),m=a("cv"),k=a("fU");a=d.extend(l,function(){l.apply(this,arguments);this.gfa=this.gfa.bind(this);this.IK=this.IK.bind(this)});a.prototype.Wc=function(){this.Bma.Nd.length&&this.Bma.Nd.slice().forEach(this.gfa);this.BG.Ea.length&&this.BG.Ea.slice().forEach(this.IK);this.ns.Ea.length&&this.ns.Ea.slice().forEach(this.IK);this.BG.Nd.length&&this.BG.Nd.slice().forEach(this.IK);this.ns.Nd.length&&this.ns.Nd.slice().forEach(this.IK)};
a.prototype.gfa=function(c){var h=c.getComponent(k.Ym),f=m.dT(h.La),b=f&&f.width||100;f=f&&f.height||100;if(h.width!=b||h.height!=f)h=c.J(k.Ym),h.width=b,h.height=f};a.prototype.IK=function(c){var h=m.dT(c);this.Bma.u.forEach(function(f){if(f.getComponent(k.Ym).La==c){var b=f.getComponent(k.Ym);if(b.width!=h.width||b.height!=h.height)b=f.J(k.Ym),b.width=h.width,b.height=h.height}})};a.H={};a.H.Bma=[k.Ym];a.H.BG=[k.OrthographicCamera];a.H.ns=[k.PerspectiveCamera];return a});
define("ej",["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,d,l,m,k,c,h,f,b,e,g,n,q,p,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]=d;t[10]=t[1]=l;t[11]=t[2]=m;v[6]=v[0]=k;v[7]=v[1]=c;t[3]=t[0]+g;t[4]=t[1]+n;t[5]=t[2]+q;v[2]=v[0];v[3]=v[1]+p;t[12]=t[6]=t[3]+h;t[13]=t[7]=t[4]+f;t[14]=t[8]=t[5]+b;v[8]=v[4]=v[2]+e;v[9]=v[5]=v[3];t[15]=t[12]-g;t[16]=t[13]-n;t[17]=t[14]-q;v[10]=v[8];v[11]=v[9]-p;d=f*q-b*n;b=b*g-h*q;h=h*n-f*g;f=1/Math.sqrt(d*d+b*b+h*h);u[0]=u[3]=u[6]=u[9]=u[12]=u[15]=d*f;u[1]=u[4]=u[7]=u[10]=u[13]=u[16]=b*f;u[2]=u[5]=u[8]=u[11]=u[14]=u[17]=h*f;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("pf",["require","pB","lY"],function(a){function d(k,c,h){this.Nq=k;this.o=c;this.Naa=h;this.i0=this.i0.bind(this);this.cI=void 0;this.o.forEach(function(f){this.Nq.bind(l.G(f),this.JP,this,!0)}.bind(this));this.i0()}var l=a("pB"),m=a("lY");d.prototype.stop=function(){this.o.forEach(function(k){this.Nq.unbind(l.G(k),this.JP,this,!0)}.bind(this));this.cI&&(m.cancel(this.cI),this.cI=void 0)};d.prototype.JP=function(){this.cI||(this.cI=m.ZB(this.i0))};d.prototype.i0=function(){this.cI=void 0;var k=
this.Nq;this.Naa.apply(window,this.o.map(function(c){return k.get(c)}))};return d});
define("fM","require lV mf fU ej pf cv nF mN".split(" "),function(a){var d=a("lV"),l=a("mf"),m=a("fU"),k=a("ej"),c=a("pf"),h=a("cv"),f=a("nF"),b=a("mN"),e=d.extend(l,function(){l.apply(this,arguments);this.ffa=this.ffa.bind(this);this.Fga=this.Fga.bind(this);this.Jfa=this.Jfa.bind(this)});e.prototype.Wc=function(){this.cU.u.length&&this.cU.u.slice().forEach(this.ffa);this.planes.Ea.length&&this.planes.Ea.slice().forEach(this.Fga);this.rHa.u.length&&this.rHa.u.slice().forEach(this.Jfa)};e.prototype.ffa=
function(g){var n=g.getComponent(m.vz),q=g.I(m.Ym);q.La=n.La;var p=h.dT(n.La);p&&(q.width=p.width,q.height=p.height);q=g.I(m.Dv);q.geometry=k.create();q.PHa=new c(n.properties,"width height horizontalAlign verticalAlign scaleMode zIndex".split(" "),function(r,t,u,v,w,x){var y=g.J(m.Dv);y.LJa=r;y.JJa=t;y.PEa=u;y.verticalAlign=v;y.kIa=w;y.zIndex=x});g.I(m.Geometry).geometry=q.geometry};e.prototype.Jfa=function(g){var n=g.getComponent(m.Dv);n.geometry.dispose();n.geometry=null;n.PHa.stop();n.PHa=null;
g.ia(m.Geometry);g.ia(m.Ym);g.ia(m.Dv)};e.prototype.Fga=function(g){var n=g.getComponent(m.Dv),q=g.getComponent(m.Ym),p=q.width,r=q.height,t=n.LJa,u=n.JJa;switch(n.kIa){case b.NONE:q=t;var v=u;break;case b.bq:q=p;v=u*p/t;break;case b.xk:v=r;q=t*r/u;break;case b.Is:t*r>u*p?(v=r,q=t*r/u):(q=p,v=u*p/t);break;default:t*r>u*p?(q=p,v=u*p/t):(v=r,q=t*r/u)}switch(n.PEa){case f.ab:p=.5*-p;break;case f.ub:p=.5*p-q;break;default:p=.5*-q}switch(n.verticalAlign){case f.Hc:r=.5*r-v;break;case f.Ac:r=.5*-r;break;
default:r=.5*-v}t=n.zIndex-e.xMa;k.set(n.geometry,p,r,0,0,0,q,0,0,1,0,v,0,1,0);g.J(m.va,!0).positionZ=t;g.P.Ta()};e.xMa=100;e.H={};e.H.cU=[m.vz,m.Dv.not];e.H.planes=[m.vz,m.Dv,m.Ym];e.H.rHa=[m.vz.not,m.Dv];return e});
define("ji","require cQ nL p nG iw hz ic iP hr lF gP im ma mM nl ju pk gj ff hZ f lE hA hv nv dr iY mO mb fi oh hO iU lJ eM hF fE eI ps fM".split(" "),function(a){var d=a("cQ"),l=a("nL"),m=a("p"),k=a("nG"),c=a("iw"),h=a("hz"),f=a("ic"),b=a("iP"),e=a("hr"),g=a("lF"),n=a("gP"),q=a("im"),p=a("ma"),r=a("mM"),t=a("nl"),u=a("ju"),v=a("pk"),w=a("gj"),x=a("ff"),y=a("hZ"),z=a("f"),B=a("lE"),D=a("hA"),F=a("hv"),A=a("nv"),E=a("dr"),J=a("iY"),C=a("mO"),L=a("mb"),T=a("fi"),S=a("oh"),U=a("hO"),X=a("iU"),K=a("lJ"),
N=a("eM"),V=a("hF"),W=a("fE"),aa=a("eI"),ca=a("ps");a=a("fM");var ea={};ea.AmbientLight=d;ea.Animation=l;ea.Um=m;ea.az=k;ea.Camera=c;ea.ELa=h;ea.wH=f;ea.hf=b;ea.DirectionalLight=e;ea.Al=g;ea.cq=n;ea.nv=q;ea.Ls=r;ea.Group=p;ea.Bl=t;ea.uh=u;ea.Line=v;ea.Ms=w;ea.vh=x;ea.rv=y;ea.Mesh=z;ea.Xh=B;ea.MMa=D;ea.lb=A;ea.Plane=F;ea.Qj=E;ea.yk=J;ea.Wm=C;ea.zi=L;ea.Scene=T;ea.Selection=S;ea.ld=X;ea.Sphere=K;ea.SpotLight=U;ea.Sprite=N;ea.va=V;ea.Xg=W;ea.xo=aa;ea.Ym=ca;ea.vz=a;return ea});
define("oC",["require","w"],function(a){var d=a("w");return{vKa:function(l,m){m||(m="screenshot.jpg");a:{try{var k=l.toDataURL("image/jpeg");break a}catch(b){}k=void 0}if(!k)return!1;var c=k;l=document.createElement("a");if("string"===typeof l.download)document.body.appendChild(l),l.download=m,l.href=c,l.click(),document.body.removeChild(l);else if(d.browser()==d.Yy){l=window.navigator;k=l.msSaveOrOpenBlob;c=atob(c.split(",")[1]);for(var h=[],f=0;f<c.length;f++)h.push(c.charCodeAt(f));c=new Blob([new Uint8Array(h)],
{type:"image/jpeg"});k.call(l,c,m)}else window.location.replace(c);return!0}}});
define("gG","require lV pB e cl kJ lN fU ji oC".split(" "),function(a){function d(p){return p.map(function(r){return String.fromCharCode(r)}).join("")}var l=a("lV"),m=a("pB"),k=a("e"),c=a("cl"),h=a("kJ"),f=a("lN"),b=a("fU"),e=a("ji"),g=a("oC");a=l.extend(k,function(p,r,t){k.call(this);this.Vd=p;this.M=r;this.k3a=t;this.Px=(new f(p)).la(b.rH).la(b.AmbientLight).la(b.Wy).la(b.Animation).la(b.$u).la(b.tC).la(b.Um).la(b.Xy).la(b.uC).la(b.az).la(b.bz).la(b.qo).la(b.dv).la(b.hf).la(b.cz).la(b.xH).la(b.ev).la(b.wH).la(b.FLa).la(b.DirectionalLight).la(b.Up).la(b.hv).la(b.dz).la(b.Al).la(b.NC).la(b.Js).la(b.OC).la(b.ov).la(b.cq).la(b.mv).la(b.nv).la(b.Ks).la(b.Geometry).la(b.Ls).la(b.jz).la(b.Group).la(b.EH).la(b.Bl).la(b.kz).la(b.Line).la(b.uh).la(b.mz).la(b.Ms).la(b.oz).la(b.nz).la(b.Material).la(b.vh).la(b.pz).la(b.rv).la(b.iq).la(b.Mesh).la(b.Ps).la(b.Xh).la(b.sv).la(b.SC).la(b.IMa).la(b.jq).la(b.TC).la(b.Object3D).la(b.KH).la(b.tv).la(b.UC).la(b.vv).la(b.OrthographicCamera).la(b.Qs).la(b.PerspectiveCamera).la(b.Pj).la(b.lb).la(b.Rs).la(b.Qj).la(b.WC).la(b.Plane).la(b.wv).la(b.Fc).la(b.xv).la(b.yk).la(b.Ss).la(b.yv).la(b.Wm).la(b.kq).la(b.ld).la(b.zv).la(b.va).la(b.aD).la(b.Zf).la(b.Xg).la(b.Il).la(b.zi).la(b.Ts).la(b.Scene).la(b.vo).la(b.Id).la(b.XC).la(b.Sphere).la(b.YC).la(b.SpotLight).la(b.Vs).la(b.Sprite).la(b.Ws).la(b.ld).la(b.zv).la(b.Bv).la(b.Ys).la(b.xo).la(b.uz).la(b.Ym).la(b.vz).la(b.Dv).la(b.QH).la(b.zk).la(b.RH).la(b.pq).la(b.SH).la(b.qq).la(b.TH).la(b.rq).bd(e.Camera,"Camera").bd(e.Ym,
"Viewport").bd(e.Bl,"ImageMaterial").bd(e.hf,"CanvasMaterial").bd(e.uh,"LineMaterial").bd(e.ld,"SolidMaterial").bd(e.xo,"VideoMaterial").bd(e.rv,"MaterialVariant").bd(e.vz,"ViewportPlaneGeometry").bd(e.Ls,"Grid").bd(e.Group,"Group").bd(e.Line,"Line").bd(e.Mesh,"Mesh").bd(e.Plane,"Plane").bd(e.cq,"Floor").bd(e.Sphere,"Sphere").bd(e.Sprite,"Sprite").bd(e.Xh,"Model").bd(e.Wm,"ProjectedMaterial").bd(e.AmbientLight,"AmbientLight").bd(e.DirectionalLight,"DirectionalLight").bd(e.SpotLight,"SpotLight").bd(e.Scene,
"Scene").bd(e.lb,"Parent").bd(e.MMa,"ObjectId").bd(e.Animation,"Animation").bd(e.wH,"CameraOffsetTransform").bd(e.vh,"ObjectTransform").bd(e.nv,"FloorTransform").bd(e.ELa,"CameraControls").bd(e.Al,"Dragging").bd(e.Selection,"Selection").bd(e.yk,"PointerOverTransform").bd(e.Qj,"PixelScaleTransform").bd(e.va,"Transform").bd(e.Xg,"TransformControls").bd(e.Um,"Area").bd(e.Ms,"LineToTransform").bd(e.Camera.sH,"CameraAutoNearFar").bd(e.Scene.OV,"SceneFade").bd(e.az,"Beacon").bd(e.zi,"Renderer");this.j=
this.Px.Nc("Renderer");this.eF=[];this.lfa=!1;this.sO=new h;this.Yb().append(this.sO.hd());this.bind(m.kd,this.tj,this,!0);this.bind(m.cd,this.sj,this,!0)});a.prototype.Nc=function(p){return this.Px.Nc(p)};a.prototype.Hd=function(p){this.Px.Hd(p)};a.prototype.Ta=function(){this.Px.Ta()};a.prototype.ABa=function(p){!(0<=this.eF.indexOf(p))&&(this.eF.push(p),p=this.j.J(b.zi))&&(p.yU=this.eF.slice())};a.prototype.Z9a=function(p){p=this.eF.indexOf(p);!(0>p)&&(this.eF.splice(p,1),p=this.j.J(b.zi))&&(p.yU=
this.eF.slice())};a.prototype.b5=function(p){this.Px.b5(p)};a.prototype.sb=function(p){this.Px.sb(p)};a.prototype.MG=function(){this.sO.trigger();this.Px.update();return g.vKa(this.j.getComponent(b.zi).renderer.domElement)};a.prototype.Sha=function(){this.Px.update();return this.j.getComponent(b.zi).renderer.domElement.toDataURL("image/png")};a.prototype.tj=function(){this.W_a()};a.prototype.sj=function(){this.P0a()};a.prototype.W_a=function(){var p=this.j.getComponent(b.zi);if(!p&&(p=this.j.I(b.zi),
p.zc=this.M,p.yU=this.eF.slice(),this.Vd.get(n)&&this.k3a)){this.kS=document.createElement("div");for(var r in q)this.kS.style[r]=q[r];this.Yb().Bha(this.kS)}};a.prototype.P0a=function(){this.j.getComponent(b.zi)&&(this.kS&&this.Yb().O9a(this.kS),this.kS=null,this.j.ia(b.zi))};var n=d([119,97,116,101,114,109,97,114,107]),q={};q[d([104,101,105,103,104,116])]=d([49,48,48,37]);q[d([119,105,100,116,104])]=d([49,48,48,37]);q[d([112,111,115,105,116,105,111,110])]=d([97,98,115,111,108,117,116,101]);q[d([116,
111,112])]=0;q[d([108,101,102,116])]=0;q[d([98,97,99,107,103,114,111,117,110,100,73,109,97,103,101])]=d([117,114,108,40,34])+c.vNa+d([34,41]);q[d([98,97,99,107,103,114,111,117,110,100,80,111,115,105,116,105,111,110])]=d([99,101,110,116,101,114]);q[d([98,97,99,107,103,114,111,117,110,100,83,105,122,101])]=d([99,111,110,116,97,105,110]);q[d([112,111,105,110,116,101,114,69,118,101,110,116,115])]=d([110,111,110,101]);q[d([98,97,99,107,103,114,111,117,110,100,82,101,112,101,97,116])]=d([110,111,45,114,
101,112,101,97,116]);q[d([111,112,97,99,105,116,121])]=.5;return a});
define("eY","require exports lh pB fq fU kQ".split(" "),function(a,d,l,m,k,c,h){var f=["autoNearFar","autoNearFarTolerance","near","far","userInteracting"],b=["inTransition"],e={OrbitModel3DCamera:c.UC,FirstPersonModel3DCamera:c.NC,FlyOverModel3DCamera:c.OC},g={FirstPersonModel3DCamera:c.TH,OrbitModel3DCamera:c.RH,FlyOverModel3DCamera:c.SH};return function(){function n(q,p,r){this.renderer=q;this.model=p;this.La=r;this.zc=this.renderer.M;this.camera=null;this.ng=this.ng.bind(this);this.m4=this.m4.bind(this);
this.renderer.bind(m.tc,this.xG,this,!0);this.model.bind(m.G("camera"),this.fka,this,!0);this.zc.bind(m.G("isKeyboardTarget"),this.hka,this,!0);h.N.bind(m.ba,this.ze,this,!0);this.fka();this.ze();this.hka();this.xG()}n.prototype.Wu=function(q){for(var p in e){var r=this.La.J(e[p]);r&&(r.locked=q)}for(p in g)if(r=this.La.J(g[p]))r.locked=q};n.prototype.sb=function(q){for(var p in e){var r=this.La.J(e[p]);r&&(r.enabled=q)}};n.prototype.dispose=function(){this.setCamera(null);this.model.unbind(m.G("camera"),
this.fka,this);this.zc.unbind(m.G("isKeyboardTarget"),this.hka,this);this.renderer.unbind(m.tc,this.xG,this);h.N.unbind(m.ba,this.ze,this)};n.prototype.ze=function(){this.La.J(c.PerspectiveCamera,!0).nl=h.nh==this.zc.Qd().bs()};n.prototype.fka=function(){this.setCamera(this.model.get("camera"))};n.prototype.setCamera=function(q){if(this.camera!==q){this.camera&&(this.iC(!1),l.ca(this.camera,f,this.ng),l.ca(this.camera,b,this.m4),this.camera.set("inTransition",!1));if(this.camera=q)l.da(this.camera,
f,this.ng,!0),l.da(this.camera,b,this.m4,!0),this.Q3a(),this.La.J(c.xH,!0).properties=this.camera;this.RKa()}};n.prototype.RKa=function(){var q,p,r,t=!!this.camera&&this.camera.get("inTransition");t?r=this.La.J(c.Bv,!0):this.La.ia(c.Bv);for(var u in e){var v=e[u];!t&&this.camera&&k.Ja(u,this.camera)?q=this.La.J(v,!0):this.La.ia(v);(v=g[u])&&(!t&&this.camera&&k.Ja(u,this.camera)?p=this.La.J(v,!0):this.La.ia(v))}q&&(q.properties=this.camera,q.Bg=this.renderer.getParent(),q.nIa=this.zc.bP,q.DB=this.zc.get("isKeyboardTarget"));
r&&(r.properties=this.camera,r.hg=this.model.get("worldUnitToMeters"));p&&(p.properties=this.camera,p.hg=this.model.get("worldUnitToMeters"),p.sk=this.zc.get("vrThumbstickRotationStep"))};n.prototype.hka=function(){var q=this.U5a();q&&(q.DB=this.zc.get("isKeyboardTarget"))};n.prototype.U5a=function(){if(!this.camera)return null;var q=null,p;for(p in e){var r=e[p];this.camera&&k.Ja(p,this.camera)&&(q=this.La.J(r,!0))}return q};n.prototype.ng=function(){if(this.camera){var q=this.La.J(c.PerspectiveCamera,
!0);q.OBa=this.camera.get("autoNearFar");q.PBa=this.camera.get("autoNearFarTolerance");q.near=this.camera.get("near");q.far=this.camera.get("far");this.iC(this.camera.get("userInteracting"))}};n.prototype.m4=function(){this.RKa()};n.prototype.xG=function(){var q=this.La.J(c.PerspectiveCamera,!0);q.width=this.renderer.Bf();q.height=this.renderer.Af()};n.prototype.Q3a=function(){var q=this.camera;q.set("fov",q.get("initialFov"));q.set("x",q.get("initialX"));q.set("y",q.get("initialY"));q.set("z",q.get("initialZ"));
q.set("distance",q.get("initialDistance",0));q.set("yaw",q.get("initialYaw"));q.set("pitch",q.get("initialPitch"))};n.prototype.iC=function(q){this.nC!=q&&(this.nC=q,this.camera&&this.camera.trigger(this.nC?m.toa:m.soa))};return n}()});define("je",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("OrbitLight",d,function(){d.call(this)})});
define("oz",["require","exports","lh"],function(a,d,l){return function(){function m(){this.WT=this.WT.bind(this);this.P4=this.object=null;this.elements=[];this.SS=new Map;this.CHa=this.pg=this.Nd=this.filter=null}m.prototype.aH=function(k,c){this.dispose();this.object=k;this.P4=c;l.da(this.object,[this.P4],this.WT,!0)};m.prototype.WT=function(k){k=k||[];this.filter&&(k=k.filter(this.filter));var c=this.elements,h=this.elements=k;c.forEach(function(f,b){var e=h.indexOf(f);if(-1==e){var g=this.SS.get(f);
this.SS["delete"](f);this.pg&&this.pg(f,g)}else e!=b&&(g=this.SS.get(f),this.CHa&&(b=this.CHa(f,e,g,b),b!=g&&this.SS.set(f,b)))}.bind(this));h.forEach(function(f,b){-1==c.indexOf(f)&&this.Nd&&(b=this.Nd(f,b),this.SS.set(f,b))}.bind(this))};m.prototype.dispose=function(){this.object&&(l.ca(this.object,[this.P4],this.WT),this.WT([]),this.P4=this.object=null)};return m}()});
define("mP",["require","exports","lh","fU"],function(a,d,l,m){var k=["color","intensity"];return function(){function c(h,f,b,e,g){this.ng=this.ng.bind(this);this.object=h;this.model=f;this.kc=b;this.Ie=e;this.La=g;this.F=b.P.Nc("AmbientLight");this.F.I(m.AmbientLight);this.F.I(m.lb).F=this.Ie;l.da(this.object,k,this.ng,!0)}c.prototype.dispose=function(){l.ca(this.object,k,this.ng);this.F&&(this.F.P.Hd(this.F),this.F=null)};c.prototype.ng=function(){var h=this.F.J(m.AmbientLight);h.color=this.object.get("color");
h.intensity=this.object.get("intensity")};return c}()});
define("eD","require exports three.mod lh pB gF fU".split(" "),function(a,d,l,m,k,c,h){a=function(){function p(r,t,u,v,w){this.ng=this.ng.bind(this);this.object=r;this.model=t;this.kc=u;this.Ie=v;this.La=w;this.F=this.kc.P.Nc("OrbitLight");this.F.I(h.DirectionalLight).target=this.kc;this.F.I(h.lb);r=this.F.I(h.va);r.Ge="YXZ";r.positionZ=10;this.LG=null;m.da(this.object,f,this.ng,!0)}p.prototype.dispose=function(){m.ca(this.object,f,this.ng);this.F&&(this.F.P.Hd(this.F),this.F=null);this.LG&&(this.LG.dispose(),
this.LG=null)};p.prototype.ng=function(){var r=this.F.J(h.DirectionalLight);r.castShadow=this.object.get("castShadow");r.color=this.object.get("color");r.PS=this.object.get("displayHelper");r.intensity=this.object.get("intensity");r.mode=this.object.get("mode");var t="fixed_to_target"==this.object.get("mode")?this.Ie:this.La;this.F.getComponent(h.lb).F!=t&&(this.F.J(h.lb).F=t);t=this.object.get("yaw");var u=-this.object.get("pitch"),v=this.F.getComponent(h.va);if(v.Rd!=u||v.ud!=t)v=this.F.J(h.va),
v.Rd=u,v.ud=t;r.Qla=this.object.get("shadowBias");r.Sla=this.object.get("shadowRadius");r.Rla=this.object.get("shadowMapSize");r.Abb=this.object.get("shadowTolerance");this.object.get("rotationDraggable")!=!!this.LG&&(this.object.get("rotationDraggable")?this.LG=new b(this.object,this.model,this.kc):(this.LG.dispose(),this.LG=null))};return p}();var f="castShadow color displayHelper intensity mode pitch yaw rotationDraggable shadowBias shadowRadius shadowMapSize shadowTolerance".split(" "),b=function(){function p(r,
t,u){this.aM=this.aM.bind(this);this.object=r;this.model=t;this.kc=u;this.N=new c;this.N.bind(k.ba,this.rl,this,!0);this.Nu=this.kc.P.Nc("OrbitLightTransformControls");this.Nu.I(h.va).Ge="YXZ";this.Nu.I(h.Group);this.Nu.I(h.lb).F=this.kc;this.ky=this.kc.P.Nc("OrbitLightTransformControlsInner");this.ky.I(h.va).Ge="YXZ";this.ky.I(h.Group);this.ky.I(h.lb).F=this.Nu;r=this.ky.I(h.Xg);r.translate=!1;r.rotate=!0;r.scale=!1;r.N=this.N;m.da(this.object,e,this.aM,!0);m.da(this.model,g,this.aM,!0)}p.prototype.dispose=
function(){m.ca(this.object,e,this.aM);m.ca(this.model,g,this.aM);this.Nu&&(this.Nu.P.Hd(this.Nu),this.Nu=null);this.ky&&(this.ky.P.Hd(this.ky),this.ky=null)};p.prototype.aM=function(){if("fixed_to_target"==this.object.get("mode")){var r=this.Nu.J(h.va);r.ud=0;r.Rd=0}else r=this.Nu.J(h.va),r.ud=-this.model.get("camera").get("yaw"),r.Rd=this.model.get("camera").get("pitch");r.He=0;r=this.ky.J(h.va);r.ud=this.object.get("yaw");r.Rd=-this.object.get("pitch");r.He=0};p.prototype.rl=function(r){n.setFromQuaternion(r.data.quaternion,
"YXZ");this.object.set({yaw:n.y*q,pitch:-n.x*q});this.object.trigger(k.Gl)};return p}(),e=["mode","yaw","pitch"],g=["camera.yaw","camera.pitch"],n=new l.Euler,q=180/Math.PI;return a});
define("fQ","require exports three.mod lh pB gF fU".split(" "),function(a,d,l,m,k,c,h){a=function(){function g(n,q,p,r,t){this.ng=this.ng.bind(this);this.object=n;this.model=q;this.kc=p;this.Ie=r;this.La=t;this.F=p.P.Nc("SpotLight");this.F.I(h.SpotLight);this.F.I(h.lb).F=this.Ie;this.F.I(h.va).Ge="YXZ";this.Rp=new c;this.Rp.bind(k.ba,this.rl,this,!0);m.da(this.object,f,this.ng,!0)}g.prototype.dispose=function(){m.ca(this.object,f,this.ng);this.F.P.Hd(this.F);this.F=null};g.prototype.ng=function(){var n=
this.F.J(h.SpotLight);n.color=this.object.get("color");n.intensity=this.object.get("intensity");n.distance=this.object.get("distance");n.PS=this.object.get("displayHelper");n.angle=this.object.get("angle");n.penumbra=this.object.get("penumbra");n.decay=this.object.get("decay");n.castShadow=this.object.get("castShadow");n.Rla=this.object.get("shadowMapSize");n.Qla=this.object.get("shadowBias");n.Sla=this.object.get("shadowRadius");n=this.object.get("yaw");var q=-this.object.get("pitch"),p=this.F.getComponent(h.va);
if(p.Rd!=q||p.ud!=n||p.positionX!=this.object.get("x")||p.positionY!=this.object.get("y")||p.positionZ!=this.object.get("z"))p=this.F.J(h.va),p.Rd=q,p.ud=n,p.translationX=this.object.get("x"),p.translationY=this.object.get("y"),p.Je=this.object.get("z");this.object.get("rotationDraggable")||this.object.get("positionDraggable")?(n=this.F.J(h.Xg,!0),n.N=this.Rp,n.rotate=this.object.get("rotationDraggable"),n.translate=this.object.get("positionDraggable"),n.scale=!1):this.F.ia(h.Xg)};g.prototype.rl=
function(n){b.setFromQuaternion(n.data.quaternion,"YXZ");this.object.set({x:n.data.position.x,y:n.data.position.y,z:n.data.position.z,yaw:b.y*e,pitch:-b.x*e});this.object.trigger(k.Gl)};return g}();var f="color intensity distance angle penumbra displayHelper decay castShadow shadowMapSize shadowBias shadowRadius x y z pitch yaw rotationDraggable positionDraggable".split(" "),b=new l.Euler,e=180/Math.PI;return a});
define("nr","require exports fq mP eD fQ".split(" "),function(a,d,l,m,k,c){return function(){function h(){}h.Zha=function(f,b,e,g,n){return l.Ja("AmbientLight",f)?new m(f,b,e,g,n):l.Ja("OrbitLight",f)?new k(f,b,e,g,n):l.Ja("SpotLight",f)?new c(f,b,e,g,n):null};return h}()});
define("ng","require exports w je oz nr".split(" "),function(a,d,l,m,k,c){return function(){function h(f,b,e,g){this.qia=this.Yx=null;this.model=f;this.kc=b;this.Ie=e;this.La=g;this.T3=new k;this.T3.Nd=this.wGa.bind(this);this.T3.pg=this.xGa.bind(this);this.T3.aH(this.model,"lights");this.O3a()}h.prototype.dispose=function(){this.T3.dispose();this.W9a()};h.prototype.wGa=function(f){return c.Zha(f,this.model,this.kc,this.Ie,this.La)};h.prototype.xGa=function(f,b){b.dispose()};h.prototype.O3a=function(){var f,
b,e,g;l.Ef()&&this.model.get("backgroundPanoramaURL")&&(this.Yx=new m,null===(f=this.Yx)||void 0===f?void 0:f.set("intensity",.001),null===(b=this.Yx)||void 0===b?void 0:b.set("castShadow",!0),null===(e=this.Yx)||void 0===e?void 0:e.set("shadowMapWidth",64),null===(g=this.Yx)||void 0===g?void 0:g.set("shadowTolerance",4),this.qia=this.wGa(this.Yx))};h.prototype.W9a=function(){this.Yx&&(this.xGa(this.Yx,this.qia),this.qia=this.Yx=null)};return h}()});
define("j",["require","exports","lh","fU"],function(a,d,l,m){var k=["floorColor","floorHeight","floorOpacity","floorRadius"];return function(){function c(h,f,b){this.model=h;this.object=f;this.kc=b;this.ng=this.ng.bind(this);this.F=b.P.Nc("Floor");this.F.I(m.cq);this.F.I(m.lb).F=this.kc;l.da(this.object,k,this.ng,!0)}c.prototype.dispose=function(){l.ca(this.object,k,this.ng);this.F.P.Hd(this.F);this.F=null};c.prototype.ng=function(){var h=this.object.get("floorColor"),f=this.object.get("floorOpacity"),
b=this.object.get("floorHeight"),e=this.object.get("floorRadius");if(h&&0<f){var g=this.F.J(m.cq,!0);g.color=h;g.opacity=f;g.height=b;g.radius=e;g.renderOrder=this.model==this.object?-1:0}else this.F.ia(m.cq)};return c}()});
define("gg",["require","exports","fq"],function(a,d,l){return function(){function m(){}m.ss=function(k,c){m.V1[k]=c};m.V6a=function(k){for(var c in m.V1)if(l.Ja(c,k))return!0;return!1};m.Zha=function(k,c,h,f,b){for(var e in m.V1)if(l.Ja(e,k))return new m.V1[e](k,c,h,f,b);return null};m.V1={};return m}()});
define("pZ",["require","exports","oz","gg"],function(a,d,l,m){return function(){function k(c,h,f,b,e){this.k$a=c;this.model=h;this.kc=f;this.Rja=b;this.renderer=e;this.filter=this.filter.bind(this);this.Nd=this.Nd.bind(this);this.pg=this.pg.bind(this);this.tG=new l;this.tG.filter=this.filter;this.tG.Nd=this.Nd;this.tG.pg=this.pg;this.tG.aH(this.model,"objects")}k.prototype.filter=function(c){return m.V6a(c)?!0:!1};k.prototype.Nd=function(c){return m.Zha(c,this.k$a,this.kc,this.Rja,this.renderer)};
k.prototype.pg=function(c,h){h.dispose()};k.prototype.dispose=function(){this.tG.dispose()};return k}()});
define("H",["require","exports","pB","fq"],function(a,d,l,m){return function(){function k(c,h){this.uP=c.uP;this.ja=h;this.dk=[];this.uP.bind(l.G("spritesEnabled"),this.Hwa,this,!0);this.ja.bind(l.G("objects"),this.KE,this,!0);this.oa()}k.prototype.dispose=function(){this.uP.unbind(l.G("spritesEnabled"),this.Hwa,this);this.ja.unbind(l.G("objects"),this.KE,this);this.dk.forEach(function(c){c.qla(!1)});this.dk=[]};k.prototype.Hwa=function(){this.oa()};k.prototype.KE=function(){this.oa()};k.prototype.oa=
function(){var c=[];!1===this.uP.get("spritesEnabled")&&c.push("SpriteModel3DObject");var h=this.ja.get("objects");this.dk.forEach(function(f){-1==h.indexOf(f)&&f.qla(!1)});this.dk=h;this.dk.forEach(function(f){var b=c.some(function(e){return m.Ja(e,f)});f.qla(b)})};return k}()});
define("by",["require","exports","lh"],function(a,d,l){var m=["camera","objects","postprocessing"],k=["userInteracting","moving"];return function(){function c(h){this.model=h;this.camera=null;this.vi=[];this.vG=this.vG.bind(this);this.i4=this.i4.bind(this);l.da(this.model,m,this.vG,!0)}c.prototype.dispose=function(){this.dC([])};c.prototype.vG=function(){this.setCamera(this.model.get("camera"));this.dC([].concat(this.model.get("objects"),this.model.get("postprocessing")))};c.prototype.setCamera=function(h){this.camera!==
h&&(this.camera&&l.ca(this.camera,k,this.i4),(this.camera=h)&&l.da(this.camera,k,this.i4,!0))};c.prototype.i4=function(){this.IM()};c.prototype.dC=function(h){this.vi!=h&&(h||(h=[]),this.vi&&this.vi.forEach(function(f){-1==h.indexOf(f)&&(f.iC&&f.iC(!1),f.jo&&f.jo(!1))}.bind(this)),this.vi=h,this.IM())};c.prototype.IM=function(){if(this.vi&&this.camera){var h=this.camera.get("userInteracting"),f=this.camera.get("moving");this.vi.forEach(function(b){b.iC&&b.iC(h);b.jo&&b.jo(f)}.bind(this))}};return c}()});
define("dx",["require","exports","lh","pB","kQ"],function(a,d,l,m,k){var c=["objects"];return function(){function h(f){this.model=f;this.vi=[];this.vG=this.vG.bind(this);k.N.bind(m.ba,this.IM,this,!0);l.da(this.model,c,this.vG,!0)}h.prototype.dispose=function(){k.N.unbind(m.ba,this.IM,this);this.dC([])};h.prototype.vG=function(){this.dC([].concat(this.model.get("objects")))};h.prototype.dC=function(f){this.vi!=f&&(f||(f=[]),this.vi&&this.vi.forEach(function(b){-1==f.indexOf(b)&&(b.c5&&b.c5(!0),b.Gy&&
b.Gy(!1))}.bind(this)),this.vi=f,this.IM())};h.prototype.IM=function(){if(this.vi){var f=!k.isPresenting,b=k.isPresenting;this.vi.forEach(function(e){e.c5&&e.c5(f);e.Gy&&e.Gy(b)}.bind(this))}};return h}()});
define("nZ","require exports lh fU j pZ H by dx".split(" "),function(a,d,l,m,k,c,h,f,b){var e=["variant"];return function(){function g(n,q,p,r){this.object=n;this.model=q;this.cM=p;this.renderer=r;this.A4=this.A4.bind(this);this.F=this.cM.P.Nc("Model");n=this.F.I(m.Xh);this.QF=n.QF=this.cM.P.Nc("ModelContent");this.QF.I(m.lb).F=this.F;n.N=this.object;this.object.get("preload")&&(n.FHa=this.model.l3().qu());n.Ep=this.model.h3().qu();n.Sja=this.object.get("model");n.properties=this.object;n.zc=this.renderer.M;
n=this.F.I(m.Id);n.N=this.object;n.Ux=!0;n.Dy=!0;this.F.I(m.lb).F=this.cM;this.F.I(m.va);l.da(this.object,e,this.A4,!0);this.tG=new c(this.model,this.object,this.F,this.QF,this.renderer);this.Jbb=new h(this.renderer,this.object);this.adb=new f(this.model);this.mdb=new b(this.model);this.B5a=new k(this.model,this.object,this.F)}g.prototype.wu=function(){return this.F};g.prototype.dispose=function(){l.ca(this.object,e,this.A4);this.F.P.Hd(this.QF);this.F.P.Hd(this.F);this.tG.dispose();this.Jbb.dispose();
this.adb.dispose();this.mdb.dispose();this.B5a.dispose()};g.prototype.A4=function(){var n=this.object.get("variant");n?this.F.J(m.rv,!0).name=n:this.F.ia(m.rv)};return g}()});
define("ef","require exports lh pB iy fU three.mod".split(" "),function(a,d,l,m,k,c,h){var f=["collidable"],b="canvas canvasTimestamp encoding depthTest hidden opacity".split(" "),e=["image"],g=["color","depthTest","opacity","width"],n=["parentId"],q=["maxWorldToPixelScale","minWorldToPixelScale","scale"],p="x y z normalX normalY normalZ upX upY upZ width height attachToParent".split(" "),r=new h.Matrix4,t=new h.Vector3,u=new h.Vector3,v=new h.Vector3,w=new h.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"],B=["castShadow","receiveShadow"],D=["color","depthTest","hidden","opacity"],F=["video"],A=["hidden","enabled","opacity"];return{yH:function(E){return function(J){function C(){return null!==J&&J.apply(this,arguments)||this}Z(C,J);C.prototype.Lc=function(){J.prototype.Lc.call(this);l.da(this.object,f,this.rGa||(this.rGa=this.B8a.bind(this)),!0)};C.prototype.Mc=function(){l.ca(this.object,f,this.rGa);J.prototype.Mc.call(this)};
C.prototype.B8a=function(){this.object.get("collidable")?this.F.ia(c.SC):this.F.I(c.SC)};return C}(E)},hf:function(E){return function(J){function C(){return null!==J&&J.apply(this,arguments)||this}Z(C,J);C.prototype.Lc=function(){J.prototype.Lc.call(this);this.F.I(c.hf);l.da(this.object,b,this.qGa||(this.qGa=this.A8a.bind(this)),!0)};C.prototype.Mc=function(){l.ca(this.object,b,this.qGa);J.prototype.Mc.call(this)};C.prototype.A8a=function(){var L=this.F.J(c.hf);L.source=this.object.get("canvas");
L.bH=this.object.get("canvasTimestamp");L.opacity=this.object.get("opacity");L.isSprite=!1;L.hidden=this.object.get("hidden");L.depthTest=this.object.get("depthTest");L.colorSpace="srgb"==this.object.get("encoding")?h.SRGBColorSpace:h.LinearSRGBColorSpace};return C}(E)},Bl:function(E){return function(J){function C(){return null!==J&&J.apply(this,arguments)||this}Z(C,J);C.prototype.Lc=function(){J.prototype.Lc.call(this);this.Ep=this.model.h3().qu(.1);this.object.get("preload")&&this.model.l3().UK(this.Ep,
.1);var L=this.F.I(c.Bl);L.properties=this.object;L.N=this.object;L.isSprite=!1;L.priority=this.object.get("preload")?k.QC:k.qna;L.Ep=this.Ep;l.da(this.object,e,this.vGa||(this.vGa=this.L8a.bind(this)),!0)};C.prototype.Mc=function(){this.model.h3().lM(this.Ep);this.model.l3().lM(this.Ep);l.ca(this.object,e,this.vGa);J.prototype.Mc.call(this)};C.prototype.L8a=function(){this.F.J(c.Bl).v3=this.object.get("image")};return C}(E)},uh:function(E){return function(J){function C(){return null!==J&&J.apply(this,
arguments)||this}Z(C,J);C.prototype.Lc=function(){J.prototype.Lc.call(this);this.F.I(c.uh);l.da(this.object,g,this.yGa||(this.yGa=this.N8a.bind(this)),!0)};C.prototype.Mc=function(){l.ca(this.object,g,this.yGa);J.prototype.Mc.call(this)};C.prototype.N8a=function(){var L=this.F.J(c.uh);L.color=this.object.get("color");L.opacity=this.object.get("opacity");L.depthTest=this.object.get("depthTest");L.width=this.object.get("width")};return C}(E)},Plane:function(E){return function(J){function C(){return null!==
J&&J.apply(this,arguments)||this}Z(C,J);C.prototype.Lc=function(){J.prototype.Lc.call(this);this.F.I(c.Plane);this.F.I(c.va);l.da(this.object,p,this.NGa||(this.NGa=this.T8a.bind(this)),!0)};C.prototype.Mc=function(){l.ca(this.object,p,this.NGa);J.prototype.Mc.call(this)};C.prototype.T8a=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 L=this.F.J(c.va);L.Rx=this.object.get("attachToParent");L.translationX=this.object.get("x",0);L.translationY=this.object.get("y",0);L.Je=this.object.get("z",0);L.sf=this.object.get("width",1);L.Gf=this.object.get("height",1);L.Rd=w.x*x;L.ud=w.y*x;L.He=w.z*x;L.positionX=0;L.positionY=0;L.positionZ=0};return C}(E)},lb:function(E){return function(J){function C(){return null!==J&&J.apply(this,arguments)||this}Z(C,J);C.prototype.Lc=function(){J.prototype.Lc.call(this);
this.F.I(c.lb).F=this.kc;l.da(this.object,n,this.KGa||(this.KGa=this.R8a.bind(this)),!0)};C.prototype.Mc=function(){l.ca(this.object,n,this.KGa);J.prototype.Mc.call(this)};C.prototype.R8a=function(){this.F.J(c.lb).id=this.object.get("parentId")};return C}(E)},YMa:function(E){return function(J){function C(){return null!==J&&J.apply(this,arguments)||this}Z(C,J);C.prototype.Lc=function(){J.prototype.Lc.call(this);l.da(this.object,q,this.MGa||(this.MGa=this.S8a.bind(this)),!0)};C.prototype.Mc=function(){l.ca(this.object,
q,this.MGa);J.prototype.Mc.call(this)};C.prototype.S8a=function(){var L=this.object.get("maxWorldToPixelScale"),T=this.object.get("minWorldToPixelScale");if(void 0!==L||void 0!==T){var S=this.F.J(c.Qj,!0);S.GB=L;S.HB=T;S.sf=S.Gf=S.oh=this.object.get("scale")}else null===(S=this.F)||void 0===S?void 0:S.ia(c.Qj)};return C}(E)},Xna:function(E){return function(J){function C(){return null!==J&&J.apply(this,arguments)||this}Z(C,J);C.prototype.Lc=function(){J.prototype.Lc.call(this);this.F.I(c.va);l.da(this.object,
y,this.RGa||(this.RGa=this.U8a.bind(this)),!0)};C.prototype.Mc=function(){l.ca(this.object,y,this.RGa);J.prototype.Mc.call(this)};C.prototype.U8a=function(){var L=this.F.J(c.va);L.Rx=this.object.get("attachToParent");L.positionX=this.object.get("x",this.object.get("positionX",0));L.positionY=this.object.get("y",this.object.get("positionY",0));L.positionZ=this.object.get("z",this.object.get("positionZ",0));L.Ge=this.object.get("rotationOrder","XYZ");L.Rd=this.object.get("rotationX",0);L.ud=this.object.get("rotationY",
0);L.He=this.object.get("rotationZ",0);L.scale=this.object.get("scale",1);L.translationX=this.object.get("translationX",0);L.translationY=this.object.get("translationY",0);L.Je=this.object.get("translationZ",0)};return C}(E)},Id:function(E){return function(J){function C(){return null!==J&&J.apply(this,arguments)||this}Z(C,J);C.prototype.Lc=function(){J.prototype.Lc.call(this);l.da(this.object,z,this.SGa||(this.SGa=this.Y8a.bind(this)),!0)};C.prototype.Mc=function(){l.ca(this.object,z,this.SGa);J.prototype.Mc.call(this)};
C.prototype.Y8a=function(){var L=this.object.get("clickEnabled"),T=this.object.get("rollOverEnabled");if(!1!==L&&!1!==T)this.F.ia(c.jq);else{var S=this.F.I(c.jq);S.oma=!1===L;S.pma=!1===T}!1===L&&!1===T?this.F.ia(c.Id):(S=this.F.J(c.Id,!0),S.mH=this.object.get("useHandCursor"),S.GM=this.object.get("transparentAreaActive"),S.N=this.object,S.Ux=!!L,S.Dy=!!T)};return C}(E)},OH:function(E){return function(J){function C(){return null!==J&&J.apply(this,arguments)||this}Z(C,J);C.prototype.Lc=function(){J.prototype.Lc.call(this);
l.da(this.object,B,this.UGa||(this.UGa=this.d9a.bind(this)),!0)};C.prototype.Mc=function(){l.ca(this.object,B,this.UGa);J.prototype.Mc.call(this)};C.prototype.d9a=function(){var L=this.F.J(c.vh,!0);L.castShadow=this.object.get("castShadow");L.receiveShadow=this.object.get("receiveShadow")};return C}(E)},ld:function(E){return function(J){function C(){return null!==J&&J.apply(this,arguments)||this}Z(C,J);C.prototype.Lc=function(){J.prototype.Lc.call(this);this.F.I(c.ld);this.visible=!1;l.da(this.object,
D,this.VGa||(this.VGa=this.e9a.bind(this)),!0)};C.prototype.Mc=function(){l.ca(this.object,D,this.VGa);this.Ze(!1);J.prototype.Mc.call(this)};C.prototype.e9a=function(){var L=this.F.J(c.ld);L.color=this.object.get("color");L.opacity=this.object.get("hidden")?0:this.object.get("opacity");L.depthTest=this.object.get("depthTest");this.Ze(0<L.opacity)};C.prototype.Ze=function(L){this.visible!=L&&((this.visible=L)?this.object.trigger(m.kd):this.object.trigger(m.cd))};return C}(E)},xo:function(E){return function(J){function C(){return null!==
J&&J.apply(this,arguments)||this}Z(C,J);C.prototype.Lc=function(){J.prototype.Lc.call(this);var L=this.F.I(c.xo);L.properties=this.object;L.N=this.object;l.da(this.object,F,this.WGa||(this.WGa=this.AG.bind(this)),!0)};C.prototype.Mc=function(){l.ca(this.object,F,this.WGa);J.prototype.Mc.call(this)};C.prototype.AG=function(){this.F.J(c.xo).Ama=this.object.get("video")};return C}(E)},eW:function(E){return function(J){function C(){return null!==J&&J.apply(this,arguments)||this}Z(C,J);C.prototype.Lc=
function(){J.prototype.Lc.call(this);l.da(this.object,A,this.XGa||(this.XGa=this.g9a.bind(this)),!0)};C.prototype.Mc=function(){l.ca(this.object,A,this.XGa);J.prototype.Mc.call(this)};C.prototype.g9a=function(){var L=this.F.J(c.vh,!0);L.opacity=this.object.get("enabled")&&!this.object.get("hidden")?this.object.get("opacity"):0;L.N=this.object};return C}(E)}}});
define("ki","require exports three.mod lh pB gF nZ ef fU".split(" "),function(a,d,l,m,k,c,h,f,b){a=function(q){function p(r,t,u,v){r=q.call(this,r,t,u,v)||this;r.vy=r.vy.bind(r);r.kc=r.F;r.Rp=new c;r.Rp.bind(k.ba,r.rl,r,!0);m.da(r.object,e,r.vy,!0);r.Lc();return r}Z(p,q);p.prototype.Lc=function(){};p.prototype.Mc=function(){};p.prototype.dispose=function(){m.ca(this.object,e,this.vy);this.Rp.unbind(k.ba,this.rl,this);this.Rp=null;this.Mc();q.prototype.dispose.call(this)};p.prototype.rl=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);g.setFromQuaternion(r.data.quaternion,t.get("rotationOrder"));t.set("rotationX",g.x*n);t.set("rotationY",g.y*n);t.set("rotationZ",g.z*n);.001<r.data.scale&&t.set("scale",r.data.scale);this.object.trigger(k.Gl)};p.prototype.vy=function(){if(this.object.get("positionDraggable")||this.object.get("rotationDraggable")||this.object.get("scaleDraggable")){var r=
this.QF.J(b.Xg,!0);r.translate=this.object.get("positionDraggable")||!1;r.rotate=this.object.get("rotationDraggable")||!1;r.scale=this.object.get("scaleDraggable")||!1;r.N=this.Rp}else this.QF.ia(b.Xg)};return p}(h);var e=["positionDraggable","rotationDraggable","scaleDraggable"],g=new l.Euler,n=180/Math.PI;return f.OH(a)});
define("bZ",["require","exports","ec"],function(a,d,l){function m(h,f,b){void 0===b&&(b=null);c.style.fontFamily=l.$x(f.fontFamily);c.style.fontSize=f.fontSize;c.style.fontWeight=f.fontWeight;c.style.fontStyle=f.fontStyle;c.innerHTML=h;document.body.appendChild(c);var e=new k(Math.ceil(c.clientWidth),Math.ceil(c.clientHeight));document.body.removeChild(c);b&&(b.font=f.fontSize+" "+l.$x(f.fontFamily),h=b.measureText(h).width,0<h&&(e.height*=h/e.width,e.width=h));return e}var k=function(){return function(h,
f){this.width=h;this.height=f}}(),c=document.createElement("div");c.style.display="inline-block";c.style.margin="0";c.style.padding="0";c.style.whiteSpace="nowrap";m.L7=function(){return function(){this.fontFamily="Arial";this.fontSize="12px";this.fontWeight="400";this.fontStyle="normal"}}();return m});
define("jd",["require","exports","bZ","ec"],function(a,d,l,m){var k=function(){function h(f,b,e){this.Dg=f;this.item=b;this.label=b.get("label");this.fontFamily=this.Dg.get("fontFamily","Arial");this.fontSize=Math.round(12*e)+"px";this.backgroundColor=this.Dg.get("backgroundColor","#000000");this.hIa=this.Dg.get("rollOverBackgroundColor",this.backgroundColor);this.q$a=this.Dg.get("selectedBackgroundColor",this.hIa);this.sDa=this.Dg.get("fontColor","#000000");this.iIa=this.Dg.get("rollOverFontColor",
this.sDa);this.r$a=this.Dg.get("selectedFontColor",this.iIa);this.pKa=this.oKa=this.qKa=this.rKa=this.height=this.width=this.left=this.top=0;this.status=!1;this.oja=!0}h.prototype.Xcb=function(){var f=new l.L7;f.fontFamily=this.fontFamily;f.fontSize=this.fontSize;f=l(this.label,f);this.rKa=f.width;this.qKa=f.height};h.prototype.$ab=function(f){this.status!==f&&(this.status=f,this.oja=!0)};h.prototype.l5a=function(f){if(this.oja){this.oja=!1;switch(this.status){case "over":var b=this.hIa;var e=this.iIa;
break;case "selected":b=this.q$a;e=this.r$a;break;default:b=this.backgroundColor,e=this.sDa}f.clearRect(this.left,this.top,this.width,this.height);f.fillStyle=b;f.fillRect(this.left,this.top,this.width,this.height);f.fillStyle=e;f.font=this.fontSize+" "+m.$x(this.fontFamily);f.textBaseline="middle";f.textAlign="center";f.fillText(this.label,Math.round(this.oKa),Math.round(this.pKa));return!0}return!1};return h}(),c=180/Math.PI;return function(){function h(f,b){this.Dg=f;this.items=b.map(this.L4a.bind(this));
this.OL=this.PL=this.Lr=this.Mr=0;this.cj();this.canvas=document.createElement("canvas");this.canvas.width=this.Mr;this.canvas.height=this.Lr;this.context=this.canvas.getContext("2d");this.selectedIndex=this.Ou=-1}h.prototype.L4a=function(f){return new k(this.Dg,f,3)};h.prototype.Q6a=function(f){return this.Mr/3*f/300};h.prototype.h6a=function(f){return this.Lr/3*f/300};h.prototype.Ee=function(){return 2*Math.atan2(this.Mr/3*.5,300)*c};h.prototype.Fe=function(){return this.Mr};h.prototype.Ve=function(){return this.Lr};
h.prototype.eg=function(){return this.canvas};h.prototype.cj=function(){var f=0,b=0;this.items.forEach(function(q){q.Xcb();f=Math.max(q.rKa,f);b=Math.max(q.qKa,b)}.bind(this));this.PL=f+30;this.OL=b+30;var e=0,g=0,n=0;this.OT=20;20<this.items.length&&(this.OT=Math.ceil(this.items.length/Math.ceil(this.items.length/20)));this.items.forEach(function(q){n>=this.OT&&(n=0,g+=this.PL,e=0);q.left=g;q.top=e;q.oKa=g+.5*this.PL;q.pKa=e+.5*this.OL;q.width=this.PL;q.height=this.OL;n+=1;e+=this.OL}.bind(this));
this.Mr=Math.ceil(this.items.length/this.OT)*this.PL;this.Lr=Math.min(this.OT,this.items.length)*this.OL};h.prototype.update=function(){for(var f=!1,b=0;b<this.items.length;b++)this.items[b].$ab(this.Ou==b?"over":this.selectedIndex==b?"selected":"normal"),f=this.items[b].l5a(this.context)||f;return f};h.prototype.Ria=function(f,b){var e=-1;0<=f&&f<this.Mr&&0<=b&&b<this.Lr&&(e=Math.floor(f/this.PL)*this.OT+Math.floor(b/this.OL),e>=this.items.length&&(e=-1));return e};h.prototype.eC=function(f){this.Ou=
f};h.prototype.Yu=function(f){this.selectedIndex=f};h.prototype.clear=function(){this.items=this.canvas=this.context=this.Dg=null};return h}()});
define("bl","require exports three.mod lh pB jd gF kQ fU pd bM bo".split(" "),function(a,d,l,m,k,c,h,f,b,e,g,n){function q(z){return f.isPresenting?-u.setFromQuaternion(f.nH,"YXZ").y*x:z.get("camera").get("yaw")}function p(z){return f.isPresenting?u.setFromQuaternion(f.nH,"YXZ").x*x:z.get("camera").get("pitch")}a=function(){function z(B,D,F){this.model=B;this.kc=D;this.La=F;this.C4=this.C4.bind(this);this.Lm=[];this.VL=[];this.JL=!1;f.N.bind(k.ba,this.ze,this,!0);m.da(this.model,["xrMenu"],this.C4,
!0)}z.prototype.dispose=function(){m.ca(this.model,["xrMenu"],this.C4);f.N.unbind(k.ba,this.ze,this);this.Ca()};z.prototype.ze=function(){this.YKa()};z.prototype.C4=function(){this.YKa()};z.prototype.YKa=function(){var B=f.isPresenting?this.model.get("xrMenu"):null;B!=this.Dg&&(this.Dg&&this.Ca(),(this.Dg=B)&&this.$a())};z.prototype.$a=function(){this.lu=this.La.P.Nc("CameraOffsetGroup");this.lu.I(b.Group);this.lu.I(b.va).easing=0;var B=this.lu.I(b.wH);B.La=this.La;B.rotate=!1;this.lu.I(b.lb).F=this.kc;
this.Ku=new r(this.model,this.Dg,this.lu);this.Ku.bind(k.ma,this.O8a,this,!0);this.Ku.bind(k.Jb,this.P8a,this,!0);this.Ku.bind(k.Gc,this.Q8a,this,!0)};z.prototype.O8a=function(){this.WJa();this.yBa(this.Dg,0);this.Ku.Ze(!1)};z.prototype.yBa=function(B,D){for(;this.Lm.length>D;)this.jia(this.Lm.pop());this.Lm.push(this.M4a(B))};z.prototype.uCa=function(){for(this.Ku.Ze(!0);this.Lm.length;)this.jia(this.Lm.pop())};z.prototype.M4a=function(B){B=new t(this.model,this.Dg,B,this.lu,0<this.Lm.length?this.Lm[this.Lm.length-
1]:this.Ku);if(0<this.Lm.length){var D=this.Lm[this.Lm.length-1];var F=D.Oc();D=D.Pc()+D.Ee()/2+1+B.Ee()/2;B.setPosition(D,F)}else D=q(this.model),F=p(this.model);B.setPosition(D,F);B.Oja.get("children",[]).forEach(function(A){A.bind(k.ma,this.CGa,this,!0)},this);B.bind(k.Gc,this.BGa,this,!0);B.bind(k.Jb,this.AGa,this,!0);return B};z.prototype.jia=function(B){B.Oja.get("children",[]).forEach(function(D){D.unbind(k.ma,this.CGa,this)},this);B.unbind(k.Gc,this.BGa,this);B.unbind(k.Jb,this.AGa,this);
this.Jka(B);B.dispose()};z.prototype.CGa=function(B){B=B.source;if(B.get("children",[]).length){var D=this.y5a(B);this.yBa(B,D+1)}else this.uCa()};z.prototype.BGa=function(B){this.G3a(B.source)};z.prototype.AGa=function(B){this.Jka(B.source)};z.prototype.Q8a=function(){this.JM()};z.prototype.P8a=function(){this.JM()};z.prototype.G3a=function(B){this.Jka(B);this.VL.push(B);0<this.VL.length&&this.Sbb();this.JM()};z.prototype.Jka=function(B){this.VL=this.VL.filter(function(D){return D!=B});0==this.VL.length&&
this.WJa();this.JM()};z.prototype.JM=function(){this.VIa(0<this.VL.length||this.Ku.JL())};z.prototype.VIa=function(B){this.JL!==B&&((this.JL=B)?(this.model.get("camera").FIa(!0),this.model.get("camera").dJa(!0),this.g5&&(clearTimeout(this.g5),this.g5=0)):this.g5=setTimeout(function(){this.g5=0;this.model.get("camera").FIa(!1);this.model.get("camera").dJa(!1)}.bind(this),100))};z.prototype.WJa=function(){this.n2||(this.n2=setTimeout(this.uCa.bind(this),3E3))};z.prototype.Sbb=function(){this.n2&&(clearTimeout(this.n2),
this.n2=0)};z.prototype.y5a=function(B){return this.Lm.findIndex(function(D){return 0<=D.Oja.get("children",[]).indexOf(B)?!0:!1})};z.prototype.Ca=function(){this.lu&&(this.lu.P.Hd(this.lu),this.lu=null);this.Ku&&(this.Ku.dispose(),this.Ku=null);for(;this.Lm.length;)this.jia(this.Lm.pop());this.VIa(!1)};return z}();h=function(z){function B(D,F,A,E,J){var C=z.call(this)||this;C.model=D;C.Dg=F;C.X3=A;C.cM=E;C.Lu=new c(C.Dg,C.X3);C.Ra=0;C.pitch=0;C.Te=new e("linear",[new g("coef",0,1)],150);C.Ou=-1;
C.selectedIndex=-1;C.wi=!1;J?(C.XU=null===J||void 0===J?void 0:J.Pc(),C.Vla=null===J||void 0===J?void 0:J.Oc()):(C.XU=q(C.model),C.Vla=p(C.model));C.F=C.cM.P.Nc("MenuItems");C.F.I(b.Plane).renderOrder=0;C.F.I(b.lb).F=C.cM;C.F.I(b.va).Ge="YXZ";D=C.F.I(b.hf);D.source=C.Lu.eg();D.isSprite=!1;D.hidden=!1;D.depthTest=!1;C.F.I(b.SC);D=C.F.I(b.Id);D.mH=!0;D.GM=!1;D.N=C;D.Ux=!0;D.Dy=!0;C.uFa=Date.now();C.bind(k.Pb,C.OB,C,!0);C.bind(k.Gc,C.$T,C,!0);C.bind(k.Jb,C.hs,C,!0);C.bind(k.ma,C.FGa,C,!0);f.N.bind(k.tV,
C.MB,C,!0);n.requestFrame(C.eo,C);C.Qy();C.lH();C.MB();return C}Z(B,z);B.prototype.dispose=function(){this.unbind(k.Pb,this.OB,this);this.unbind(k.Gc,this.$T,this);this.unbind(k.Jb,this.hs,this);this.unbind(k.ma,this.FGa,this);f.N.unbind(k.tV,this.MB,this);n.jCa(this.eo,this);this.F.P.Hd(this.F)};B.prototype.Pc=function(){return this.Ra};B.prototype.Oc=function(){return this.pitch};B.prototype.Ee=function(){return this.Lu.Ee()};B.prototype.gEa=function(){return this.selectedIndex};B.prototype.JL=
function(){return this.wi};B.prototype.setPosition=function(D,F){this.Ra=D;this.pitch=F;this.iV()};B.prototype.OB=function(D){this.eC(this.JDa(D))};B.prototype.$T=function(){this.wi=!0;this.lH()};B.prototype.hs=function(){this.wi=!1;this.eC(-1);this.lH()};B.prototype.FGa=function(D){D=this.JDa(D);this.Yu(D);this.X3[D].trigger(k.ma)};B.prototype.JDa=function(D){var F=(D.data.localPosition.x+.5)*this.Lu.Fe();D=(.5-D.data.localPosition.y)*this.Lu.Ve();return this.Lu.Ria(F,D)};B.prototype.eo=function(){f.isPresenting||
this.MB();n.requestFrame(this.eo,this)};B.prototype.MB=function(){if(this.Te){var D=Date.now();this.Te.Fb(D-this.uFa);this.uFa=D;this.Te.Xe()&&(this.Te=null);this.lH()}this.iV()};B.prototype.setScale=function(D){this.F.getComponent(b.va).scale!=D&&(this.F.J(b.va).scale=D)};B.prototype.Oh=function(D){this.F.getComponent(b.hf).opacity!=D&&(this.F.J(b.hf).opacity=D)};B.prototype.eC=function(D){this.Ou!=D&&(0<=this.Ou&&this.X3[this.Ou].trigger(k.Jb),this.Ou=D,0<=this.Ou&&this.X3[this.Ou].trigger(k.Gc),
this.Qy())};B.prototype.Yu=function(D){this.selectedIndex!=D&&(this.selectedIndex=D,this.Qy())};B.prototype.Qy=function(){this.Lu.Yu(this.selectedIndex);this.Lu.eC(this.Ou);this.Lu.update()&&(this.F.J(b.hf).bH=Date.now())};B.prototype.iV=function(){var D=this.Dg.get("distance")/this.model.get("worldUnitToMeters",1),F=this.F.J(b.va);v.identity();v.multiply(w.makeRotationFromQuaternion(f.dg,"YXZ"));v.multiply(w.makeRotationFromQuaternion(f.nH,"YXZ").invert());var A=this.Ra,E=this.pitch;if(this.Te){var J=
this.Te.eb("coef");for(A-=this.XU;180<A;)A-=360;for(;-180>A;)A+=360;E-=this.Vla;A=this.XU+A*J;E=this.Vla+E*J}v.multiply(w.makeRotationFromEuler(u.set(E*y,-A*y,0,"YXZ"),"YXZ"));u.setFromRotationMatrix(v,F.Ge);F.Rd=u.x*x;F.ud=u.y*x;F.He=u.z*x;F.positionZ=-D;F.sf=this.Lu.Q6a(D);F.Gf=this.Lu.h6a(D)};B.prototype.lH=function(){};return B}(h);var r=function(z){function B(D,F,A){D=z.call(this,D,F,[F],A,null)||this;D.visible=!0;D.F.I(b.va).easing=.01;D.XL=D.XL.bind(D);m.da(D.model,["camera.pitch","camera.yaw"],
D.XL,!0);return D}Z(B,z);B.prototype.dispose=function(){z.prototype.dispose.call(this);m.ca(this.model,["camera.pitch","camera.yaw"],this.XL)};B.prototype.Ze=function(D){this.visible!==D&&(this.visible=D,this.visible||(this.eC(-1),this.Yu(-1)),D=!this.visible,this.F.getComponent(b.hf).hidden!==D&&(this.F.J(b.hf).hidden=D,this.XL()))};B.prototype.XL=function(){this.visible&&(this.setPosition(q(this.model),this.kEa()),this.lH())};B.prototype.MB=function(){this.XL();z.prototype.MB.call(this)};B.prototype.lH=
function(){var D=this.Dg.get("opacity",.5),F=this.Dg.get("rollOverOpacity",D);D=this.wi?F:D;var A=.66,E=this.model.get("camera"),J=p(this.model);E=Math.abs(J-this.kEa())/(.5*E.get("fov"));1>E&&(A+=(1-E)*(1-A),D+=(1-E)*(F-D));D*=this.Te?this.Te.eb("coef"):1;this.Oh(Math.min(1,Math.max(0,D)));this.setScale(A);this.Qy()};B.prototype.kEa=function(){var D=p(this.model);return Math.min(90,Math.max(-90,40-D))};return B}(h),t=function(z){function B(D,F,A,E,J){D=z.call(this,D,F,A.get("children",[]),E,J)||
this;D.Oja=A;return D}Z(B,z);B.prototype.lH=function(){var D=this.Dg.get("opacity",.5),F=this.Dg.get("rollOverOpacity",D);D=this.wi?F:D;D*=this.Te?this.Te.eb("coef"):1;this.Oh(Math.min(1,Math.max(0,D)))};return B}(h),u=new l.Euler,v=new l.Matrix4,w=new l.Matrix4,x=180/Math.PI,y=Math.PI/180;return a});
define("hb",["require","exports","lh","pB"],function(a,d,l,m){return function(){function k(c,h){this.renderer=c;this.model=h;this.zc=this.renderer.M;this.q4=this.q4.bind(this);this.vi=[];this.Oy="";this.Mu=null;this.$a()}k.prototype.dispose=function(){this.Ca()};k.prototype.$a=function(){l.da(this.model,"objects",this.q4,!0);this.model.bind(m.Gc,this.EGa,this,!0);this.model.bind(m.Jb,this.DGa,this,!0)};k.prototype.Ca=function(){this.model.unbind(m.Gc,this.EGa,this);this.model.unbind(m.Jb,this.DGa,
this);l.ca(this.model,"objects",this.q4);this.dC([]);this.Mu&&this.hs(this.Mu)};k.prototype.q4=function(){this.dC(this.model.get("objects"))};k.prototype.dC=function(c){this.vi!=c&&(this.vi.forEach(function(h){h.unbind(m.Gc,this.JGa,this);h.unbind(m.Jb,this.IGa,this);h.unbind(m.cd,this.HGa,this)}.bind(this)),this.Mu&&0<=this.vi.indexOf(this.Mu)&&0>c.indexOf(this.Mu)&&this.hs(this.Mu),this.vi=c,this.vi.forEach(function(h){h.bind(m.Gc,this.JGa,this,!0);h.bind(m.Jb,this.IGa,this,!0);h.bind(m.cd,this.HGa,
this,!0)}.bind(this)))};k.prototype.JGa=function(c){c=c.source;this.$T(c,c.get("toolTip"))};k.prototype.IGa=function(c){this.hs(c.source)};k.prototype.HGa=function(c){this.hs(c.source)};k.prototype.EGa=function(){this.$T(this.model,this.model.get("toolTip"))};k.prototype.DGa=function(){this.hs(this.model)};k.prototype.hs=function(c){this.Mu==c&&(this.Mu=null,this.tJa(""))};k.prototype.$T=function(c,h){this.Mu!=c&&(this.Mu=c,this.tJa(h||""))};k.prototype.tJa=function(c){this.Oy!=c&&(this.Oy=c,this.zc.set("toolTip",
this.Oy))};return k}()});
define("mv",["require"],function(){function a(d){this.Jc=this.qt(d.get("surfaceReticleColor"));this.ux=this.qt(d.get("surfaceReticleSelectionColor"));this.Mb=d.get("surfaceReticleOpacity");this.sZa=d.get("surfaceReticleSelectionOpacity");this.Ml=this.Yg=128;this.PXa=.456;this.QXa=.088;this.dVa=.18;this.T=document.createElement("canvas");this.T.width=this.Yg;this.T.height=this.Ml;this.Da=this.T.getContext("2d");this.Da.fillStyle="red";this.Da.imageSmoothingEnabled=!0;this.Da.fillRect(0,0,this.Yg,this.Ml);
this.pd=this.Wv=!1;this.jJ=this.h_=void 0;this.lD=0}a.prototype.laa=function(){return this.Yk(NaN*this.ux[0]+NaN*this.Jc[0],NaN*this.ux[1]+NaN*this.Jc[1])};a.prototype.qt=function(d){d=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(d);return[parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16)]};a.prototype.Yk=function(d,l){return"rgba("+d.join(",")+", "+l+")"};a.prototype.setPosition=function(d){this.gb!=d&&(this.gb=d,this.Ba=!0)};a.prototype.Fe=function(){return this.Yg};a.prototype.Ve=function(){return this.Ml};
a.prototype.eg=function(){return this.T};a.prototype.update=function(){if(!this.Ba)return!1;this.Ba=!1;this.Da.clearRect(0,0,this.Yg,this.Ml);var d=[this.ux[0]*this.gb+(1-this.gb)*this.Jc[0],this.ux[1]*this.gb+(1-this.gb)*this.Jc[1],this.ux[2]*this.gb+(1-this.gb)*this.Jc[2]],l=this.sZa*this.gb+(1-this.gb)*this.Mb;this.Da.strokeStyle=this.Yk(d,l);this.Da.fillStyle=this.Yk(d,l*this.gb);this.Da.beginPath();this.Da.lineWidth=this.Yg*this.QXa;this.Da.arc(.5*this.Yg,.5*this.Yg,this.Yg*this.PXa,0,2*Math.PI,
!1);this.Da.stroke();this.Da.beginPath();this.Da.arc(.5*this.Yg,.5*this.Yg,this.Yg*this.dVa,0,2*Math.PI,!1);this.Da.fill();return!0};return a});define("hK",["require","mv"],function(a){return a("mv")});
define("jc","require lh pB gF hK w kQ fU".split(" "),function(a){function d(n,q,p){this.ja=n;this.nb=q;this.j=p;this.M=this.j.M;this.Qw=this.Qw.bind(this);this.Zw=this.Zw.bind(this);this.pd=void 0;this.ja.bind(m.G("surfaceSelectionEnabled"),this.I$,this,!0);this.I$()}var l=a("lh"),m=a("pB"),k=a("gF"),c=a("hK"),h=a("w"),f=a("kQ"),b=a("fU");d.prototype.I$=function(){var n=this.ja.get("surfaceSelectionEnabled");!!this.m!=n&&(n?this.ND():this.Gq())};d.prototype.ND=function(){if(!this.m){this.m=this.nb.P.Nc("PointerReticle");
this.m.I(b.Plane).renderOrder=2;this.m.I(b.yk).F=this.nb;this.m.I(b.jq);this.m.I(b.SC);this.m.I(b.lb).F=this.nb;var n=this.m.I(b.qo);n.N=new k;n.N.bind(m.ba,this.HP,this,!0);l.da(this.ja,e,this.Qw,!0);this.Zt=new c(this.M);this.Zt.setPosition(0);this.Zt.update();n=this.m.I(b.hf);n.source=this.Zt.eg();n.depthTest=!1;l.da(this.ja,g,this.Zw,!0);f.N.bind(m.ba,this.GJ,this,!0);this.ne=null;this.kF(!1)}};d.prototype.Gq=function(){this.m&&(this.ne&&(this.ne.trigger(m.Jb),this.ne=null),l.ca(this.ja,g,this.Zw),
this.fR(null),this.m.getComponent(b.qo).N.unbind(m.ba,this.HP,this,!0),this.nb.P.Hd(this.m),this.Zt=this.m=null,f.N.unbind(m.ba,this.GJ,this),l.ca(this.ja,e,this.Qw))};d.prototype.Qw=function(){var n=this.m.J(b.Qj,!0);n.sf=n.Gf=2;n.scale=this.ja.get("surfaceReticleRadius");n.GB=this.ja.get("surfaceReticleMaxRadius");n.HB=this.ja.get("surfaceReticleMinRadius")};d.prototype.HP=function(n){n=this.ysa(n.data.beacons);var q=this.esa(n);0==q&&(n=null);this.DZa(n);this.UZa(q)};d.prototype.Zw=function(){this.fR(this.ja&&
this.ja.get("pointer"))};d.prototype.fR=function(n){this.ge!==n&&(this.ge&&(this.ge.unbind(m.ma,this.Sw,this,!0),this.ge.unbind(m.Pb,this.Pf,this,!0),this.ge.unbind(m.Jb,this.cr,this,!0)),this.ge=n)&&(this.ge.bind(m.ma,this.Sw,this,!0),this.ge.bind(m.Pb,this.Pf,this,!0),this.ge.bind(m.Jb,this.cr,this,!0))};d.prototype.Sw=function(n){var q=null;if(h.pb()&&!f.isPresenting){var p=this.m.getComponent(b.qo);p&&p.cT&&n.data.position&&(n=p.cT((new THREE.Vector3).copy(n.data.position)),n=this.ysa(n),0!=this.esa(n)&&
(q=this.iaa(n)))}else q=this.ne;q&&q.trigger(m.ma)};d.prototype.Pf=function(n){this.kF("other"==n.data.type?!1:!0)};d.prototype.cr=function(){this.kF(!1)};d.prototype.kF=function(n){this.pd!==n&&(this.pd=n,this.dl())};d.prototype.GJ=function(){this.dl()};d.prototype.dl=function(){this.m.J(b.hf).opacity=h.pb()&&!f.isPresenting||!this.pd?0:1};d.prototype.DZa=function(n){n=this.iaa(n);this.ne!=n&&(this.ne&&this.ne.trigger(m.Jb),(this.ne=n)&&this.ne.trigger(m.Gc))};d.prototype.ysa=function(n){if(!n)return null;
for(var q=0;q<n.length;q++)if(this.iaa(n[q]))return n[q];return null};d.prototype.esa=function(n){if(!n)return 0;var q=this.m.getComponent(b.va);return q?Math.max(0,1-n.distance/(this.ja.get("surfaceSelectionCoef")*q.scale*q.sf)):0};d.prototype.iaa=function(n){return(n=(n=n&&n.entity)&&n.getComponent(b.ZM))&&n.Ybb||null};d.prototype.UZa=function(n){this.Zt.setPosition(n);this.Zt.update()&&(this.m.J(b.hf).bH=(new Date).getTime())};d.prototype.dispose=function(){this.Gq();this.ja.unbind(m.G("surfaceSelectionEnabled"),
this.I$,this,!0)};var e=["surfaceReticleRadius","surfaceReticleMaxRadius","surfaceReticleMinRadius"],g=["pointer"];return d});
define("lK",["require","lh","pB","gF","fU"],function(a){function d(f,b,e){this.ja=f;this.nb=b;this.Bq=e;this.V=!1;this.JZ=this.JZ.bind(this);l.da(this.ja,h,this.JZ,!0)}var l=a("lh"),m=a("pB"),k=a("gF"),c=a("fU");d.prototype.JZ=function(){var f=!!this.ja.get("maxNearestObjectsVisible");this.V!=f&&(this.V&&this.Gq(),(this.V=f)&&this.ND())};d.prototype.ND=function(){var f=this.Bq.I(c.qo);f.N=new k;f.N.bind(m.ba,this.HP,this,!0);this.nb.P.Ta()};d.prototype.Gq=function(){this.Bq.getComponent(c.qo).N.unbind(m.ba,
this.HP,this,!0);this.Bq.ia(c.qo);this.ja.get("objects").forEach(function(f){f.get("hideBasedOnDistance")&&f.rla(!1)})};d.prototype.HP=function(f){var b=0,e=this.ja.get("maxNearestObjectsVisible");f.data.beacons.forEach(function(g){if(g=this.YSa(g))g.get("hideBasedOnDistance")?(g.rla(b>=e),b++):g.rla(!1)}.bind(this))};d.prototype.YSa=function(f){f=(f=f.entity.getComponent(c.ZM))&&f.object;f.get&&void 0!==f.get("hideBasedOnDistance")||(f=null);return f};d.prototype.dispose=function(){l.ca(this.ja,
h,this.JZ);this.V&&(this.V=!1,this.Gq())};var h=["maxNearestObjectsVisible"];return d});
define("fX","require lV lh pB gF fU".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("gF"),c=a("fU");a=d.extend(k,function(f,b){k.call(this);this.Ld=f;this.nb=b;this.Qf=this.Qf.bind(this);this.m=null;this.fl=0;this.Ub=!1;this.BQ=[];this.Ld.bind(m.G("areaOpacity"),this.Xva,this);this.Kx()});a.prototype.i5=function(f){this.BQ.forEach(function(b){b.unbind(m.kd,this.je,this,!0);b.unbind(m.cd,this.je,this,!0)}.bind(this));this.BQ=f;this.BQ.forEach(function(b){b.bind(m.kd,this.je,this,!0);
b.bind(m.cd,this.je,this,!0)}.bind(this));this.kAa();this.je()};a.prototype.dispose=function(){this.Ld.unbind(m.G("areaOpacity"),this.Xva,this);this.Fx()};a.prototype.wu=function(){return this.m};a.prototype.isVisible=function(){return this.Ub};a.prototype.Xva=function(){this.Kx();this.dl()};a.prototype.Kx=function(){0<this.Ld.get("areaOpacity")?this.bB():this.Fx()};a.prototype.bB=function(){if(!this.m){this.m=this.nb.P.Nc("MeasureArea");var f=new k;f.bind(m.ba,this.yA,this,!0);this.m.I(c.Um).N=f;
this.m.I(c.ld);this.m.I(c.lb).F=this.nb;l.da(this.Ld,h,this.Qf,!0);this.kAa()}};a.prototype.Fx=function(){this.m&&(this.m.getComponent(c.Um).N.unbind(m.ba,this.yA,this,!0),l.ca(this.Ld,h,this.Qf),this.m.P.Hd(this.m),this.m=null)};a.prototype.Rt=function(f){this.Ub!=f&&((this.Ub=f)?(this.hp(1),this.trigger(m.kd)):(this.hp(0),this.trigger(m.cd)))};a.prototype.je=function(){this.Rt(this.BQ.every(function(f){return f.isVisible()}))};a.prototype.yA=function(f){this.Ld.set("area",f.data.area)};a.prototype.Qf=
function(){if(this.m){var f=this.m.J(c.ld);f.color=this.Ld.get("areaColor");f.depthTest=this.Ld.get("depthTest");f.doubleSided=!0;this.dl()}};a.prototype.hp=function(f){this.fl!=f&&(this.fl=f,this.dl())};a.prototype.dl=function(){this.m&&(this.m.J(c.ld).opacity=this.Ld.get("areaOpacity")*Math.max(1E-4,this.fl))};a.prototype.kAa=function(){this.m&&(this.m.J(c.Um).u=this.BQ.map(function(f){return f.wu()}))};var h=["areaColor","areaOpacity","depthTest"];return a});
define("fH",["require","bZ","ec"],function(a){function d(){this.X$=this.qt("#ffffff");this.Cz=this.qt("#000000");this.Ml=this.Yg=0;this.T=document.createElement("canvas");this.Da=this.T.getContext("2d");this.Da.imageSmoothingQuality="high";this.Xt=new l.L7;this.Y$=this.QI=void 0;this.t8=this.u8=.5;this.Gr=void 0;this.zK=d.r7;this.Jx=void 0;this.xM(0)}var l=a("bZ"),m=a("ec");d.ena="imperial area";d.fna="imperial length";d.mna="metric area";d.r7="metric length";d.prototype.dispose=function(){this.T.width=
this.T.height=0;this.T=null};d.prototype.T$a=function(k){this.X$!=k&&(this.X$=k,this.Ba=!0)};d.prototype.v$a=function(k){this.Cz!=k&&(this.Cz=k,this.Ba=!0)};d.prototype.U$a=function(k){this.Y$!=k&&(this.Y$=k,this.Ba=!0)};d.prototype.V$a=function(k){this.QI!=k&&(this.QI=k,this.Ba=!0)};d.prototype.ala=function(){.5!=this.Xt.VK&&(this.t8=.5,this.Ba=!0)};d.prototype.bla=function(k){this.Xt.WK!=k&&(this.u8=k,this.Ba=!0)};d.prototype.xM=function(k){this.Gr!=k&&(this.Gr=k,this.zga())};d.prototype.dbb=function(k){this.zK!=
k&&(this.zK=k,this.zga())};d.prototype.ebb=function(k){this.Jx!=k&&(this.Jx=k,this.zga())};d.prototype.zga=function(){if(void 0===this.Jx)this.Pa=this.Gr.toFixed(2);else if(this.zK==d.r7){var k=this.Gr*this.Jx;this.Pa=1<=k?k.toFixed(2)+"m":(100*k).toFixed(2)+"cm"}else this.zK==d.mna?(k=this.Gr*this.Jx*this.Jx,this.Pa=.1<=k?k.toFixed(2)+"m\u00b2":(1E4*k).toFixed(2)+"cm\u00b2"):this.zK==d.fna?(k=this.Gr*this.Jx*1.0936,this.Pa=1760<k?(k/1760).toFixed(2)+"mi":100<=k?k.toFixed(2)+"yd":1<=3*k?(3*k).toFixed(2)+
"ft":(36*k).toFixed(2)+"in"):this.zK==d.ena&&(k=this.Gr*this.Jx*this.Jx*10.76364864,this.Pa=1<=k?k.toFixed(2)+"ft\u00b2":(144*k).toFixed(2)+"in\u00b2");this.Ba=!0};d.prototype.qt=function(k){k=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(k);return[parseInt(k[1],16),parseInt(k[2],16),parseInt(k[3],16)]};d.prototype.Yk=function(k,c){return"rgba("+k.join(",")+", "+c+")"};d.prototype.Fe=function(){return this.Yg};d.prototype.Ve=function(){return this.Ml};d.prototype.eg=function(){return this.T};d.prototype.update=
function(){if(!this.Ba)return!1;this.Ba=!1;this.Xt.fontFamily=this.Y$||"Arial";this.Xt.fontSize=this.QI?"string"==typeof this.QI?this.QI:this.QI+"px":"30px";var k=l(this.Pa,this.Xt),c=this.qt(this.X$),h=this.qt(this.Cz),f=k.width;k=k.height;var b=.5*k,e=.3*k,g=b+f+.5*k,n=e+k+.2*k,q=.5*n;this.T.width=this.T.height=this.Yg=this.Ml=Math.max(128,Math.pow(2,Math.ceil(Math.log(Math.max(g,n))/Math.LN2)));var p=this.Yg*this.t8-g*this.t8,r=this.Ml*this.u8-n*this.u8;this.qI();this.Da.save();this.Da.translate(p,
r);this.Da.fillStyle=this.Yk(h,1);this.Da.beginPath();this.Da.moveTo(0,q);this.Da.quadraticCurveTo(0,0,q,0);this.Da.lineTo(g-q,0);this.Da.quadraticCurveTo(g,0,g,q);this.Da.quadraticCurveTo(g,n,g-q,n);this.Da.lineTo(q,n);this.Da.quadraticCurveTo(0,n,0,n-q);this.Da.closePath();this.Da.fill();this.Da.fillStyle=this.Yk(c,1);this.Da.font=this.Xt.fontSize+" '"+this.Xt.fontFamily+"'";this.Da.font=this.Xt.fontSize+(isNaN(this.Xt.fontSize)?"":"px")+" "+m.$x(this.Xt.fontFamily);this.Da.textBaseline="middle";
this.Da.textAlign="center";this.Da.fillText(this.Pa,Math.round(b+.5*f),Math.round(e+.5*k));this.Da.restore();return!0};d.prototype.qI=function(){this.Da.clearRect(0,0,this.Yg,this.Ml)};return d});
define("fR","require lV lh pB gF fU fH eF".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("gF"),c=a("fU"),h=a("fH"),f=a("eF");a=d.extend(k,function(e,g,n){k.call(this);this.zca=e;this.Ld=g;this.nb=n;this.Qf=this.Qf.bind(this);this.jp=this.m=null;this.fl=0;this.Ub=!1;this.W0=this.yh=this.OA=this.sA=null;this.Gr=void 0;this.hi=new h;this.zca.bind(m.G("worldUnitToMeters"),this.qda,this,!0);this.Ld.bind(m.G("units"),this.cda,this,!0);this.bB()});a.prototype.ZIa=function(e){this.v0(e,null,
null)};a.prototype.Lab=function(e){this.v0(null,e,null)};a.prototype.u$a=function(e){this.v0(null,null,e)};a.prototype.v0=function(e,g,n){if(this.OA!=g||this.sA!=e||this.yh!=n)[this.sA,this.OA,this.yh].forEach(function(q){q&&q.unbind(m.kd,this.je,this,!0);q&&q.unbind(m.cd,this.je,this,!0)}.bind(this)),this.Fx(),this.sA=e,this.OA=g,this.yh=n,this.bB(),this.Qf(),this.yg(!0),[this.sA,this.OA,this.yh].forEach(function(q){q&&q.bind(m.kd,this.je,this,!0);q&&q.bind(m.cd,this.je,this,!0)}.bind(this)),this.sA?
(this.m.J(c.lb).F=this.sA.wu(),this.m.J(c.va).Je=.5,e=this.m.J(c.Sprite),e.VK=.5,e.WK=.5,this.hi.ala(),this.hi.bla(.5)):this.OA?(this.m.J(c.lb).F=this.OA.wu(),this.m.J(c.va).Je=0,e=this.m.J(c.Sprite),e.VK=.5,e.WK=1.1,this.hi.ala(),this.hi.bla(1)):this.yh?(this.m.J(c.lb).F=this.yh.wu(),this.m.J(c.va).Je=0,e=this.m.J(c.Sprite),e.VK=.5,e.WK=.5,this.hi.ala(),this.hi.bla(.5)):this.m.J(c.lb).F=null,this.je(),this.cda(),this.qda()};a.gNa="partialDistance";a.foa="distance";a.fNa="area";a.prototype.setStyle=
function(e){this.W0!=e&&(this.W0=e,this.Qf())};a.prototype.xM=function(e){void 0!==e&&this.Gr!==e&&(this.Gr=e,this.hi.xM(e),this.yg(),this.je())};a.prototype.dispose=function(){this.zca.unbind(m.G("worldUnitToMeters"),this.qda,this,!0);this.Ld.unbind(m.G("units"),this.cda,this,!0);this.v0(null,null);this.hi.dispose();this.hi=null;this.Fx()};a.prototype.qda=function(){this.hi.ebb(this.zca.get("worldUnitToMeters"));this.yg()};a.prototype.cda=function(){var e=this.Ld.get("units"),g=!!this.yh;this.hi.dbb("imperial"==
e?g?h.ena:h.fna:g?h.mna:h.r7);this.yg()};a.prototype.bB=function(){if(!this.m){this.m=this.nb.P.Nc("MeasureLabel");this.m.I(c.Sprite).renderOrder=2;this.m.I(c.jq);var e=this.m.I(c.hf);e.source=this.hi.eg();e.isSprite=!0;l.da(this.Ld,b,this.Qf,!0);this.m.I(c.va);this.m.I(c.lb)}};a.prototype.Fx=function(){this.m&&(l.ca(this.Ld,b,this.Qf),this.m.P.Hd(this.m),this.m=null)};a.prototype.isVisible=function(){return this.Ub};a.prototype.Rt=function(e){this.Ub!=e&&((this.Ub=e)?(this.P_a(),this.trigger(m.kd)):
(this.N0a(),this.hp(0),this.trigger(m.cd)))};a.prototype.je=function(){this.Rt(0<this.Gr&&(this.sA&&this.sA.isVisible()||this.OA&&this.OA.isVisible()||this.yh&&this.yh.isVisible()))};a.prototype.P_a=function(){this.jp||(this.jp=new f,this.jp.set("duration",300),this.jp.bind(f.E6,this.Gwa,this,!0),this.jp.bind(f.vk,this.Fwa,this,!0),this.jp.play())};a.prototype.N0a=function(){this.jp&&(this.jp.unbind(f.E6,this.Gwa,this,!0),this.jp.unbind(f.vk,this.Fwa,this,!0),this.jp.stop(),this.jp=null)};a.prototype.Gwa=
function(){this.hp(2*this.jp.ll()-1)};a.prototype.Fwa=function(){this.hp(1)};a.prototype.Qf=function(){this.m.J(c.hf).depthTest=this.XI("depthTest");this.hi.T$a(this.XI("labelFontColor"));this.hi.v$a(this.XI("labelBackgroundColor"));this.hi.U$a(this.XI("labelFontFamily"));this.hi.V$a(this.XI("labelFontSize"));this.dl();this.yg()};a.prototype.XI=function(e){var g;this.W0&&(g=this.Ld.get(this.W0+e[0].toUpperCase()+e.substr(1)));void 0===g&&(g=this.Ld.get(e));return g};a.prototype.yg=function(e){if(this.hi.update()||
e){e=this.m.J(c.hf);var g=this.m.J(c.Sprite);e.bH=(new Date).getTime();g.width=this.hi.Fe();g.height=this.hi.Ve()}};a.prototype.hp=function(e){this.fl!=e&&(this.fl=e,this.dl())};a.prototype.dl=function(){this.m.J(c.hf).opacity=this.XI("labelOpacity")*Math.max(1E-4,this.fl)};var b="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("dS","require lV lh pB gF fU".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("gF"),c=a("fU");a=d.extend(k,function(f,b){k.call(this);this.Ld=f;this.nb=b;this.sm=this.qm=null;this.Qf=this.Qf.bind(this);this.m=null;this.fl=0;this.Ub=!1;this.bB()});a.prototype.i5=function(f,b){if(this.qm!=f||this.sm!=b)this.qm&&this.qm.unbind(m.kd,this.je,this,!0),this.qm&&this.qm.unbind(m.cd,this.je,this,!0),this.sm&&this.sm.unbind(m.kd,this.je,this,!0),this.sm&&this.sm.unbind(m.cd,this.je,this,
!0),this.qm=f,this.sm=b,this.qm&&this.qm.bind(m.kd,this.je,this,!0),this.qm&&this.qm.bind(m.cd,this.je,this,!0),this.sm&&this.sm.bind(m.kd,this.je,this,!0),this.sm&&this.sm.bind(m.cd,this.je,this,!0),this.m.J(c.lb,!0).F=this.qm&&this.qm.wu(),this.m.J(c.Ms,!0).F=this.sm&&this.sm.wu(),this.je()};a.prototype.wu=function(){return this.m};a.prototype.dispose=function(){this.i5(null,null);this.Fx()};a.prototype.bB=function(){this.m||(this.m=this.nb.P.Nc("MeasureLine"),this.m.I(c.Line),this.m.I(c.uh),this.m.I(c.va),
l.da(this.Ld,h,this.Qf,!0))};a.prototype.Fx=function(){this.m&&(l.ca(this.Ld,h,this.Qf),this.m.P.Hd(this.m),this.m=null)};a.prototype.isVisible=function(){return this.Ub};a.prototype.Rt=function(f){this.Ub!=f&&((this.Ub=f)?(this.hp(1),this.trigger(m.kd)):(this.hp(0),this.trigger(m.cd)))};a.prototype.je=function(){this.Rt(this.qm&&this.qm.isVisible()&&this.sm&&this.sm.isVisible())};a.prototype.Qf=function(){var f=this.m.J(c.uh);f.color=this.Ld.get("lineColor");f.depthTest=this.Ld.get("depthTest");
f.width=this.Ld.get("lineWidth");f.depthTest=this.Ld.get("depthTest");this.dl()};a.prototype.hp=function(f){this.fl!=f&&(this.fl=f,this.dl())};a.prototype.dl=function(){this.m.J(c.uh).opacity=this.Ld.get("lineOpacity")*Math.max(1E-4,this.fl)};var h=["depthTest","lineColor","lineOpacity","lineWidth"];return a});
define("oY","require lV lh pB gF fU".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("gF"),c=a("fU");a=d.extend(k,function(e,g,n,q){k.call(this);this.Ld=e;this.ja=g;this.nb=n;this.mr=q;this.QZ=this.QZ.bind(this);this.Qf=this.Qf.bind(this);this.Hn=this.Hn.bind(this);this.m=null;this.Ei=this.VQ=this.pd=this.Bz=!1;this.fl=0;this.Ub=!1;this.bB();l.da(this.Ld,h,this.QZ,!0);l.da(this.Ld,b,this.Qf,!0);l.ju(this.mr,f,this.Hn,!0);this.bind(m.Gl,this.mwa,this,!0);this.bind(m.Gc,this.VZ,this,!0);
this.bind(m.Jb,this.cr,this,!0);this.Hn();this.s3()&&this.Rt(!0)});a.prototype.dispose=function(){l.ca(this.Ld,h,this.QZ);l.ca(this.Ld,b,this.Qf);l.ca(this.mr,f,this.Hn);this.unbind(m.Gl,this.mwa,this,!0);this.unbind(m.Gc,this.VZ,this,!0);this.unbind(m.Jb,this.cr,this,!0);this.Fx()};a.prototype.wu=function(){return this.m};a.prototype.zIa=function(e){this.Bz!==e&&((this.Bz=e)?(e=this.m.I(c.yk),e.F=this.nb,e.rotate=!1,e.N=new k,this.Rt(!0),e.N.bind(m.Gc,this.vJ,this,!0)):((e=this.m.getComponent(c.yk))&&
e.N.unbind(m.Gc,this.vJ,this,!0),this.m.ia(c.yk),e=this.ja.worldPositionToLocal([this.x,this.y,this.z],this.ja.getMatrixWorld()),this.HIa(e[0],e[1],e[2])),this.iB(),this.Kga())};a.prototype.MIa=function(e){void 0===e&&(e=!1);this.Ei!==e&&((this.Ei=e)?this.m.I(c.Al):this.m.ia(c.Al))};a.prototype.Sab=function(e){this.VQ!==e&&(this.VQ=e,this.Kga(),this.pd=!1,this.iB())};a.prototype.HIa=function(e,g,n){this.mr.set("x",e);this.mr.set("y",g);this.mr.set("z",n);this.Rt(this.s3())};a.prototype.bB=function(){this.m=
this.nb.P.Nc("MeasurePoint");this.m.I(c.Sphere);this.m.I(c.ld);this.m.I(c.Id).N=this;this.m.I(c.jq);this.m.I(c.va).N=this;this.m.I(c.Qj);this.m.I(c.lb).F=this.nb;this.Kga();this.dl();this.iB()};a.prototype.Fx=function(){this.m.P.Hd(this.m);this.m=null};a.prototype.isVisible=function(){return this.Ub};a.prototype.Rt=function(e){this.Ub!=e&&((this.Ub=e)?(this.hp(1),this.trigger(m.kd)):(this.hp(0),this.trigger(m.cd)))};a.prototype.Kga=function(){var e=this.m.J(c.Id);e.mH=this.VQ;e.Dy=this.VQ;e.Ux=!this.Bz;
e=this.m.J(c.jq,!0);e.pma=!this.VQ||this.Bz;e.oma=this.Bz};a.prototype.vJ=function(){this.Rt(!0)};a.prototype.VZ=function(){this.pd=!0;this.iB()};a.prototype.cr=function(){this.pd=!1;this.iB()};a.prototype.QZ=function(){this.m.J(c.lb).id=this.Ld.get("parentId")};a.prototype.Qf=function(){if(this.m){var e=this.m.J(c.Qj);e.sf=e.Gf=e.oh=1;e.GB=this.Ld.get("pointMaxRadius");e.HB=this.Ld.get("pointMinRadius");e.scale=this.Ld.get("pointRadius")||1;this.m.J(c.ld).depthTest=this.Ld.get("depthTest");this.iB()}};
a.prototype.iB=function(){if(this.m){var e=this.Bz?"pointDragColor":this.pd?"pointOverColor":"pointColor";this.m.J(c.ld).color=this.Ld.get(e)}};a.prototype.hp=function(e){this.fl!=e&&(this.fl=e,this.dl())};a.prototype.dl=function(){this.m.J(c.ld).opacity=Math.max(1E-4,this.fl)};a.prototype.mwa=function(e){this.x=e.data.position.x;this.y=e.data.position.y;this.z=e.data.position.z};a.prototype.Hn=function(){if(this.s3()&&this.m){var e=this.m.J(c.va,!0);e.positionX=e.positionY=e.positionZ=0;e.Rd=e.ud=
e.He=0;e.translationX=this.mr.get("x");e.translationY=this.mr.get("y");e.Je=this.mr.get("z")}};a.prototype.s3=function(){var e=this.mr.get("x"),g=this.mr.get("y"),n=this.mr.get("z");return void 0!==e&&void 0!==g||void 0!==n};a.prototype.distanceTo=function(e){var g=this.x-e.x,n=this.y-e.y;e=this.z-e.z;return Math.sqrt(g*g+n*n+e*e)};var h=["parentId"],f=["x","y","z"],b="depthTest mode pointDragColor pointColor pointOverColor pointMaxRadius pointMinRadius pointRadius".split(" ");return a});
define("eG","require lh pB bt fX fR dS oY w".split(" "),function(a){function d(u,v,w,x,y){this.K=u;this.ja=v;this.nb=w;this.j=y;this.M=this.j.M;this.Zq=this.Zq.bind(this);this.TZ=this.TZ.bind(this);this.IZ=this.IZ.bind(this);this.d_=this.d_.bind(this);this.zJ=this.zJ.bind(this);this.yA=this.yA.bind(this);this.Zw=this.Zw.bind(this);this.Ro=this.Ro.bind(this);this.ge=null;this.Si=new Map;this.AQ=new Map;this.Sq=[];this.uE=[];this.NJ=new Map;this.Fh=[];this.Pi=null;this.p1();this.pf=this.fd=void 0;this.V=
!1;l.da(this.K,["enabled"],this.Zq,!0)}var l=a("lh"),m=a("pB"),k=a("bt"),c=a("fX"),h=a("fR"),f=a("dS"),b=a("oY"),e=a("w");d.prototype.dispose=function(){this.Gq();l.ca(this.K,["enabled"],this.Zq);this.Pi=this.Fh=this.uE=this.Sq=this.AQ=this.Si=null;this.p1();this.pf=this.fd=null};d.prototype.Zq=function(){this.K.get("enabled")?this.ND():this.Gq()};d.prototype.ND=function(){this.V||(this.V=!0,this.DQa(),this.Rqa(this.K),document.addEventListener("keyup",this.Ro),l.da(this.K,g,this.TZ,!0),l.da(this.K,
q,this.d_,!0),l.da(this.K,n,this.IZ,!0),l.da(this.K,p,this.zJ,!0),l.da(this.K,r,this.yA,!0),l.da(this.ja,t,this.Zw,!0))};d.prototype.Gq=function(){this.V&&(this.V=!1,this.Qya([]),this.mra(this.K),this.KRa(),document.removeEventListener("keyup",this.Ro),l.ca(this.K,g,this.TZ),l.ca(this.K,q,this.d_),l.ca(this.K,n,this.IZ),l.ca(this.K,p,this.zJ),l.ca(this.K,r,this.yA),l.ca(this.ja,t,this.Zw),this.fR(null))};d.prototype.Zw=function(){this.fR(this.ja&&this.ja.get("pointer"))};d.prototype.fR=function(u){this.ge!==
u&&(this.ge&&(this.ge.unbind(m.ma,this.Pva,this,!0),this.ge.unbind(m.El,this.Qva,this,!0)),this.ge=u)&&(this.ge.bind(m.ma,this.Pva,this,!0),this.ge.bind(m.El,this.Qva,this,!0))};d.prototype.TZ=function(){this.Qya(this.K.get("points"))};d.prototype.IZ=function(){var u=this.K.get("mode");if(u!=this.fd){switch(this.fd){case "create":1>this.Fh.length||this.Pi&&2>this.Fh.length?u="create":this.UYa(this.Pi);break;case "edit":"create"==u?"single"===this.K.get("type")&&0<this.Fh.length?u="edit":this.qW():
this.wx(null);break;case "view":"create"===u&&("single"===this.K.get("type")&&0<this.Fh.length?u="view":this.qW());break;default:"create"==u&&("single"===this.K.get("type")&&0<this.Fh.length&&this.Qaa(this.uw(-1))?u="edit":this.wx(this.uw(-1),!1))}this.fd=u;this.K.set("mode",this.fd);this.MAa()}};d.prototype.d_=function(){var u=this.K.get("type");u!==this.pf&&(this.pf=u,"single"===this.pf&&1<this.Fh.length&&this.K.set("points",this.qeb.slice(0,1)))};d.prototype.zJ=function(){this.BAa();this.n1()};
d.prototype.yA=function(){var u=this.yaa(this.yh);u&&u.xM(this.K.get("area"))};d.prototype.Ro=function(u){u.which==k.GV&&this.M.get("isKeyboardTarget")&&("create"==this.K.get("mode")?this.K.set("mode","edit"):"edit"==this.fd&&this.wx(null))};d.prototype.qW=function(){this.pOa();this.wx(this.uw(-1),!1)};d.prototype.VO=function(){return e.pb()&&!e.Ef()};d.prototype.pOa=function(){var u=this.M.get("application").Dm("MeasureModel3DObjectPoint");if(!this.VO()){var v=this.uw(-1);v&&this.Qaa(v)&&(u.set("x",
v.get("x")),u.set("y",v.get("y")),u.set("z",v.get("z")))}this.K.set("points",this.Fh.concat([u]))};d.prototype.uw=function(u){var v=[this.K].concat(this.Fh);return 0>u&&0<v.length-u?v[v.length+u]:0<=u&&u<v.length?v[u]:null};d.prototype.UYa=function(u){this.K.set("points",this.Fh.filter(function(v){return v!=u}))};d.prototype.Qaa=function(u){return!!u&&this.Si.get(u).s3()};d.prototype.Pva=function(u){if("other"!=u.data.type)if("create"==this.K.get("mode")){if(this.Pi){var v=this.Pi;this.wx(null);this.JOa(v,
u)}"single"==this.pf&&0<this.Fh.length?this.K.set("mode","edit"):this.qW()}else"edit"==this.K.get("mode")&&this.wx(null)};d.prototype.Qva=function(){"create"==this.K.get("mode")&&this.VO()&&this.K.set("mode","edit")};d.prototype.iwa=function(){"create"==this.K.get("mode")&&this.K.set("mode","edit")};d.prototype.hwa=function(u){if("create"==this.K.get("mode")){var v=this.uw(-2);u=this.AQ.get(u.source);v==u?this.K.set("mode","edit"):(v=this.Pi,this.wx(null),v.set("x",u.get("x")),v.set("y",u.get("y")),
v.set("z",u.get("z")),v=this.uw(0),u==v?this.K.set("mode","edit"):this.qW())}};d.prototype.jwa=function(u){"edit"==this.K.get("mode")&&this.wx(this.AQ.get(u.source),!0)};d.prototype.kwa=function(){"edit"==this.K.get("mode")&&this.wx(null)};d.prototype.lwa=function(){this.n1()};d.prototype.n1=function(){for(var u=[],v=this.uw(0),w=this.Jaa(),x=0;x<w.length;x++){var y=w[x];v=this.Si.get(v);var z=this.Si.get(y);z=v.distanceTo(z);(v=this.yaa(this.Sq[x]))&&v.xM(z);u.push(z);v=y}u=u.reduce(function(B,D){return B+
D},0);(v=this.yaa(this.Si.get(w[w.length-1])))&&v.xM(u);this.K.set("distance",isNaN(u)?void 0:u)};d.prototype.JOa=function(u,v){if(v=v&&v.data.position)v=this.ja.worldPositionToLocal(v,this.ja.getMatrixWorld()),this.Si.get(u).HIa(v.x,v.y,v.z)};d.prototype.wx=function(u,v){v||(v=!1);if(this.Pi!==u){if(this.Pi){var w=this.Si.get(this.Pi);w.MIa(!1);w.zIa(!1)}if(this.Pi=u)w=this.Si.get(this.Pi),w.MIa(v),w.zIa(v||!this.VO());this.CAa();this.MAa();this.p1()}};d.prototype.Qya=function(u){this.Fh!=u&&(this.Fh.forEach(function(v){-1==
u.indexOf(v)&&this.mra(v)}.bind(this)),this.Fh=u,this.Pi&&this.Fh.indexOf(this.Pi)&&(this.Pi=null),this.p1(),this.Fh.forEach(function(v){this.Rqa(v)}.bind(this)),this.CAa(),this.BAa(),this.K1a(),this.n1())};d.prototype.Jaa=function(){return this.Fh.filter(function(u){return this.Qaa(u)||this.Si.get(u).Bz}.bind(this))};d.prototype.CAa=function(){for(;this.Fh.length<this.Sq.length;)this.NRa();for(;this.Fh.length>this.Sq.length;)this.iRa();for(var u=!0,v=0;v<this.Fh.length;v++){var w=this.uw(v),x=this.uw(v+
1);w==this.Pi&&(u=!1);var y=u?x:w;this.Sq[v].i5(this.Si.get(u?w:x),this.Si.get(y))}};d.prototype.BAa=function(){this.F1a();var u=this.Jaa(),v=1==u.length;this.K.get("displayPartialDistanceLabel")&&!v&&this.Sq.forEach(function(w){var x=this.UY(w);x.ZIa(w);x.setStyle(h.gNa)}.bind(this));this.K.get("displayDistanceLabel")&&(v?(u=this.UY(this.Sq[0]),u.ZIa(this.Sq[0]),u.setStyle(h.foa)):1<u.length&&(v=this.Si.get(u[u.length-1]),u=this.UY(v),u.Lab(v),u.setStyle(h.foa)));this.K.get("displayAreaLabel")&&
this.yh&&(u=this.UY(this.yh),u.u$a(this.yh),u.setStyle(h.fNa));this.PRa();this.n1();this.yA()};d.prototype.MAa=function(){var u=!this.Pi&&"view"!=this.fd;this.Si.forEach(function(v){v.Sab(u)})};d.prototype.K1a=function(){this.yh&&this.yh.i5([this.K].concat(this.Jaa()).map(function(u){return this.Si.get(u)}.bind(this)))};d.prototype.Rqa=function(u){var v=this.Si.get(u);v||(v=new b(this.K,this.ja,this.nb,u),this.Si.set(u,v),this.AQ.set(v,u),v.bind(m.El,this.iwa,this,!0),v.bind(m.ma,this.hwa,this,!0),
v.bind(m.hb,this.jwa,this,!0),v.bind(m.Eb,this.kwa,this,!0),v.bind(m.Gl,this.lwa,this,!1))};d.prototype.mra=function(u){var v=this.Si.get(u);v&&(v.unbind(m.Gl,this.lwa,this,!1),v.unbind(m.El,this.iwa,this,!0),v.unbind(m.ma,this.hwa,this,!0),v.unbind(m.hb,this.jwa,this,!0),v.unbind(m.Eb,this.kwa,this,!0),v.dispose(),this.Si["delete"](u),this.AQ["delete"](v))};d.prototype.iRa=function(){var u=new f(this.K,this.nb);this.Sq.push(u)};d.prototype.NRa=function(){0!=this.Sq.length&&this.Sq.pop().dispose()};
d.prototype.hRa=function(){var u=new h(this.ja,this.K,this.nb);this.uE.push(u);return u};d.prototype.F1a=function(){this.NJ.clear()};d.prototype.UY=function(u){var v=this.uE.length>this.NJ.size?this.uE[this.NJ.size]:this.hRa();this.NJ.set(u,v);return v};d.prototype.yaa=function(u){return this.NJ.get(u)};d.prototype.PRa=function(){for(;this.uE.length>this.NJ.size;)this.MRa()};d.prototype.MRa=function(){0!=this.uE.length&&this.uE.pop().dispose()};d.prototype.DQa=function(){this.yh||(this.yh=new c(this.K,
this.nb))};d.prototype.KRa=function(){this.yh&&(this.yh.dispose(),this.yh=null)};d.prototype.p1=function(){this.K.set("draggingPoint",!!this.Pi)};var g=["points"],n=["mode"],q=["type"],p=["displayAreaLabel","displayDistanceLabel","displayPartialDistanceLabel"],r=["area"],t=["pointer"];return d});
define("ez",["require","exports","lh","ef"],function(a,d,l,m){a=function(){function k(c,h,f,b,e){this.object=c;this.model=h;this.kc=f;this.renderer=e;this.le=this.le.bind(this);this.enabled=!1;this.F=null;l.da(this.object,["enabled"],this.le,!0)}k.prototype.Lc=function(){};k.prototype.Mc=function(){};k.prototype.dispose=function(){this.disable();l.ca(this.object,["enabled"],this.le)};k.prototype.le=function(){this.object.get("enabled")?this.enable():this.disable()};k.prototype.enable=function(){this.enabled||
(this.enabled=!0,this.F=this.kc.P.Nc("CanvasPlane"),this.Lc())};k.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Mc(),this.F.P.Hd(this.F),this.F=null)};return k}();a=m.Id(a);a=m.yH(a);a=m.hf(a);a=m.eW(a);a=m.OH(a);a=m.lb(a);return a=m.Plane(a)});
define("eX","require exports three.mod lh pB gF fU nZ ef".split(" "),function(a,d,l,m,k,c,h,f,b){a=function(q){function p(r,t,u,v,w){r=q.call(this,r,t,u,w)||this;r.vy=r.vy.bind(r);r.kc=u;r.Rp=new c;r.Rp.bind(k.ba,r.rl,r,!0);r.F.I(h.az);r.F.I(h.ZM).object=r.object;m.da(r.object,e,r.vy,!0);r.Lc();return r}Z(p,q);p.prototype.Lc=function(){};p.prototype.Mc=function(){};p.prototype.dispose=function(){m.ca(this.object,e,this.vy);this.Rp.unbind(k.ba,this.rl,this);this.Rp=null;this.Mc();q.prototype.dispose.call(this)};
p.prototype.rl=function(r){g.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:g.x*n,rotationY:g.y*n,rotationZ:g.z*n,scale:Math.max(r.data.scale,.001)});this.object.trigger(k.Gl)};p.prototype.vy=function(){if(this.object.get("positionDraggable")||this.object.get("rotationDraggable")||this.object.get("scaleDraggable")){var r=this.F.J(h.Xg,!0);r.translate=
this.object.get("positionDraggable")||!1;r.rotate=this.object.get("rotationDraggable")||!1;r.scale=this.object.get("scaleDraggable")||!1;r.N=this.Rp}else this.F.ia(h.Xg)};return p}(f);var e=["positionDraggable","rotationDraggable","scaleDraggable"],g=new l.Euler,n=180/Math.PI;l=b.Id(a);l=b.eW(l);l=b.yH(l);l=b.OH(l);l=b.lb(l);l=b.YMa(l);return l=b.Xna(l)});
define("cP",["require","exports","lh","ef"],function(a,d,l,m){a=function(){function k(c,h,f,b,e){this.object=c;this.model=h;this.kc=f;this.renderer=e;this.le=this.le.bind(this);this.enabled=!1;this.F=null;l.da(this.object,["enabled"],this.le,!0)}k.prototype.Lc=function(){};k.prototype.Mc=function(){};k.prototype.dispose=function(){this.disable();l.ca(this.object,["enabled"],this.le)};k.prototype.le=function(){this.object.get("enabled")?this.enable():this.disable()};k.prototype.enable=function(){this.enabled||
(this.enabled=!0,this.F=this.kc.P.Nc("ImagePlane"),this.Lc())};k.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Mc(),this.F.P.Hd(this.F),this.F=null)};return k}();a=m.Id(a);a=m.yH(a);a=m.Bl(a);a=m.OH(a);a=m.lb(a);return a=m.Plane(a)});
define("cO",["require","exports","lh","fU","ef"],function(a,d,l,m,k){var c=["objectId"];a=function(){function h(f,b,e,g,n){this.object=f;this.model=b;this.kc=e;this.renderer=n;this.F=this.kc.P.Nc("InnerObject");this.OZ=this.OZ.bind(this);l.da(this.object,c,this.OZ,!0);this.Lc()}h.prototype.Lc=function(){};h.prototype.Mc=function(){};h.prototype.OZ=function(){var f=this.F.J(m.KH,!0);f.id=this.object.get("objectId");f.container=this.kc};h.prototype.dispose=function(){this.Mc();l.ca(this.object,c,this.OZ);
this.kc.P.Hd(this.F);this.F=null};return h}();a=k.Id(a);a=k.yH(a);a=k.OH(a);return a=k.eW(a)});
define("ob","require exports lh fU ef three.mod".split(" "),function(a,d,l,m,k,c){var h=["x","y","z"],f=["targetX","targetY","targetZ"];a=function(){function b(e,g,n,q,p){this.object=e;this.model=g;this.kc=n;this.renderer=p;this.le=this.le.bind(this);this.r4=this.r4.bind(this);this.y4=this.y4.bind(this);this.enabled=!1;this.F=null;l.da(this.object,["enabled"],this.le,!0)}b.prototype.Lc=function(){};b.prototype.Mc=function(){};b.prototype.dispose=function(){this.disable();l.ca(this.object,["enabled"],
this.le)};b.prototype.le=function(){this.object.get("enabled")?this.enable():this.disable()};b.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.kc.P.Nc("Line"),this.F.I(m.va),this.F.I(m.Line),this.F.I(m.Ms).position=new c.Vector3,l.da(this.object,h,this.r4,!0),l.da(this.object,f,this.y4,!0),this.Lc())};b.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Mc(),l.ca(this.object,h,this.r4),l.ca(this.object,f,this.y4),this.F.P.Hd(this.F),this.F=null)};b.prototype.r4=
function(){var e=this.F.J(m.va);e.translationX=this.object.get("x",0);e.translationY=this.object.get("y",0);e.Je=this.object.get("z",0)};b.prototype.y4=function(){var e=this.F.J(m.Ms);e.position.x=this.object.get("targetX");e.position.y=this.object.get("targetY");e.position.z=this.object.get("targetZ")};return b}();a=k.Id(a);a=k.uh(a);return a=k.lb(a)});
define("ln",["require","exports","lh","fU","ef"],function(a,d,l,m,k){var c=["x","y","z"],h="divisions centerLinesColor depthTest gridColor opacity size".split(" ");a=function(){function f(b,e,g,n,q){this.object=b;this.model=e;this.kc=g;this.renderer=q;this.le=this.le.bind(this);this.u4=this.u4.bind(this);this.o4=this.o4.bind(this);this.enabled=!1;this.F=null;l.da(this.object,["enabled"],this.le,!0)}f.prototype.Lc=function(){};f.prototype.Mc=function(){};f.prototype.dispose=function(){this.disable();
l.ca(this.object,["enabled"],this.le)};f.prototype.le=function(){this.object.get("enabled")?this.enable():this.disable()};f.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.kc.P.Nc("HorizonGrid"),this.F.I(m.va),this.F.I(m.Ls),l.da(this.object,c,this.u4,!0),l.da(this.object,h,this.o4,!0),this.Lc())};f.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Mc(),l.ca(this.object,c,this.u4),l.ca(this.object,h,this.o4),this.F.P.Hd(this.F),this.F=null)};f.prototype.u4=function(){var b=
this.F.J(m.va);b.translationX=this.object.get("x",0);b.translationY=this.object.get("y",0);b.Je=this.object.get("z",0)};f.prototype.o4=function(){var b=this.F.J(m.Ls);b.kCa=this.object.get("centerLinesColor");b.depthTest=this.object.get("depthTest");b.A2=this.object.get("divisions");b.tEa=this.object.get("gridColor");b.size=this.object.get("size")};return f}();a=k.eW(a);return a=k.lb(a)});
define("fv",["require","exports","lh","fU","ef"],function(a,d,l,m,k){var c=["radius","maxRadius","minRadius"];a=function(){function h(f,b,e,g,n){this.object=f;this.model=b;this.kc=e;this.renderer=n;this.le=this.le.bind(this);this.x4=this.x4.bind(this);this.enabled=!1;this.F=null;l.da(this.object,["enabled"],this.le,!0)}h.prototype.Lc=function(){};h.prototype.Mc=function(){};h.prototype.dispose=function(){this.disable();l.ca(this.object,["enabled"],this.le)};h.prototype.le=function(){this.object.get("enabled")?
this.enable():this.disable()};h.prototype.enable=function(){this.enabled||(this.enabled=!0,this.F=this.kc.P.Nc("Sphere"),this.F.I(m.Sphere),this.F.I(m.Qj),l.da(this.object,c,this.x4,!0),this.Lc())};h.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Mc(),l.ca(this.object,c,this.x4),this.F.P.Hd(this.F),this.F=null)};h.prototype.x4=function(){var f=this.F.J(m.Qj);f.sf=f.Gf=f.oh=1;f.scale=this.object.get("radius");f.GB=this.object.get("maxRadius");f.HB=this.object.get("minRadius")};return h}();
a=k.Id(a);a=k.yH(a);a=k.ld(a);a=k.lb(a);return a=k.Xna(a)});
define("oI",["require","exports","lh","fU","ef"],function(a,d,l,m,k){var c="cameraBox skyBox sourceAlpha sourceCubeTexture sourceX sourceY sourceYaw sourceZ targetAlpha targetCubeTexture targetX targetY targetYaw targetZ".split(" ");a=function(){function h(f,b,e,g,n){this.object=f;this.model=b;this.kc=e;this.Rja=g;this.renderer=n;this.le=this.le.bind(this);this.v4=this.v4.bind(this);this.enabled=!1;this.F=null;l.da(this.object,["enabled"],this.le,!0)}h.prototype.Lc=function(){};h.prototype.Mc=function(){};
h.prototype.dispose=function(){this.disable();l.ca(this.object,["enabled"],this.le)};h.prototype.le=function(){this.object.get("enabled")?this.enable():this.disable()};h.prototype.enable=function(){if(!this.enabled){this.enabled=!0;this.F=this.kc.P.Nc("ProjectedMaterial");this.F.I(m.Wm);var f=this.F.I(m.lb);f.F=this.kc;f.attach=!0;l.da(this.object,c,this.v4,!0);this.Lc()}};h.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Mc(),l.ca(this.object,c,this.v4),this.F.P.Hd(this.F),this.F=
null)};h.prototype.v4=function(){var f=this.F.J(m.Wm);f.sy=this.object.get("nearPlane")||!1;f.GJa=this.object.get("skyBox")||!1;f.IJa=this.object.get("sourceAlpha")||0;f.jC=this.Rja;f.r5=this.object.get("sourceX")||0;f.s5=this.object.get("sourceY")||0;f.t5=this.object.get("sourceZ")||0;f.XU=this.object.get("sourceYaw")||0;f.VU=this.object.get("sourceCubeTexture");f.dKa=this.object.get("targetAlpha")||0;f.targetX=this.object.get("targetX")||0;f.targetY=this.object.get("targetY")||0;f.E5=this.object.get("targetZ")||
0;f.ccb=this.object.get("targetYaw")||0;f.bV=this.object.get("targetCubeTexture")};return h}();return k.lb(a)});
define("kZ",["require","lh","pB","hK","fU"],function(a){function d(e,g,n,q,p){this.K=e;this.ja=g;this.nb=n;this.j=p;this.M=this.j.M;this.Zq=this.Zq.bind(this);this.Qw=this.Qw.bind(this);this.Hn=this.Hn.bind(this);this.Qf=this.Qf.bind(this);this.xca=this.nb.getComponent(c.Xh).Ep;this.xca.bind(m.ea,this.Rw,this,!1);this.yca=this.iua=!1;this.Zt=new k(this.M);this.Zt.setPosition(0);this.Zt.update();this.m=null;l.da(this.K,["enabled"],this.Zq,!0)}var l=a("lh"),m=a("pB"),k=a("hK"),c=a("fU");d.prototype.Zq=
function(){this.K.get("enabled")?this.ND():this.Gq()};d.prototype.ND=function(){if(!this.m){this.m=this.nb.P.Nc("Reticle");var e=this.m.I(c.lb);e.F=this.nb;e.id=this.K.get("parentId");this.m.I(c.Plane).renderOrder=2;this.m.I(c.hf).source=this.Zt.eg();this.m.I(c.az);e=this.m.I(c.ZM);e.Ybb=this.K;e.object=this.K;l.da(this.ja,b,this.Qw,!0);l.da(this.K,h,this.Hn,!0);l.da(this.K,f,this.Qf,!0)}};d.prototype.Gq=function(){this.m&&(this.nb.P.Hd(this.m),this.m=null,l.ca(this.ja,b,this.Qw),l.ca(this.K,h,this.Hn),
l.ca(this.K,f,this.Qf))};d.prototype.Qw=function(){var e=this.m.J(c.Qj,!0);e.sf=e.Gf=2;e.scale=this.ja.get("surfaceReticleRadius");e.GB=this.ja.get("surfaceReticleMaxRadius");e.HB=this.ja.get("surfaceReticleMinRadius");this.IAa()};d.prototype.Hn=function(){var e=this.m.J(c.nv,!0);e.x=this.K.get("x");e.y=this.K.get("y");e.z=this.K.get("z");e.distance=this.K.get("distance");e.AT=this.K.get("horizontal")};d.prototype.Qf=function(){var e=this.m.J(c.Id,!0);e.mH=this.K.get("useHandCursor");e.GM=this.K.get("transparentAreaActive");
e.N=this.K;e=this.m.J(c.hf);e.opacity=this.K.get("opacity");e.hidden=this.K.get("hidden");e.depthTest=this.K.get("depthTest")};d.prototype.Rw=function(){this.iua=!0;this.IAa()};d.prototype.IAa=function(){var e=this.iua&&.5<this.ja.get("opacity");this.yca!=e&&(this.yca=e)&&this.m&&this.m.J(c.nv)};d.prototype.dispose=function(){this.Gq();l.ca(this.K,["enabled"],this.Zq);this.xca.unbind(m.ea,this.Rw,this,!1);this.xca=null};var h=["distance","horizontal","x","y","z"],f=["depthTest","hidden","opacity",
"transparentAreaActive","useHandCursor"],b=["opacity","surfaceReticleRadius","surfaceReticleMaxRadius","surfaceReticleMinRadius","surfaceSelectionEnabled"];return d});
define("gw",["require","exports","lh","ef"],function(a,d,l,m){a=function(){function k(c,h,f,b,e){this.object=c;this.model=h;this.kc=f;this.renderer=e;this.le=this.le.bind(this);this.enabled=!1;this.F=null;l.da(this.object,["enabled"],this.le,!0)}k.prototype.Lc=function(){};k.prototype.Mc=function(){};k.prototype.dispose=function(){this.disable();l.ca(this.object,["enabled"],this.le)};k.prototype.le=function(){this.object.get("enabled")?this.enable():this.disable()};k.prototype.enable=function(){this.enabled||
(this.enabled=!0,this.F=this.kc.P.Nc("VideoPlane"),this.Lc())};k.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.Mc(),this.F.P.Hd(this.F),this.F=null)};return k}();a=m.Id(a);a=m.yH(a);a=m.xo(a);a=m.lb(a);a=m.OH(a);return a=m.Plane(a)});
define("hi","require exports eG ez eX cP cO ob ln fv gg oI kZ gw".split(" "),function(a,d,l,m,k,c,h,f,b,e,g,n,q,p){g.ss("MeasureModel3DObject",l);g.ss("ChildModel3DObject",k);g.ss("HorizonGridModel3DObject",b);g.ss("CanvasPlaneModel3DObject",m);g.ss("ImagePlaneModel3DObject",c);g.ss("InnerModel3DObject",h);g.ss("LineModel3DObject",f);g.ss("ProjectedMaterialModel3DObject",n);g.ss("SphereModel3DObject",e);g.ss("SurfaceReticleModel3DObject",q);g.ss("VideoPlaneModel3DObject",p);return g});
define("ii","require exports lh pB bt pF gF w lV jW fq".split(" "),function(a,d,l,m,k,c,h,f,b,e,g){return function(n){function q(p,r,t,u,v){var w=n.call(this)||this;w.sG=[];w.vBa=0;w.uBa=0;w.C2=!1;w.UCa=!1;w.Cja=!1;w.tFa=0;w.renderer=p;w.Es=r;w.model=t;w.kc=u;w.La=v;w.Kr=w.Kr.bind(w);w.j2=w.j2.bind(w);w.gia=b.Ip(w.gia,w);w.py=w.py.bind(w);w.N3=w.N3.bind(w);w.M3=w.M3.bind(w);w.zc=w.renderer.M;w.Bg=w.renderer.getParent();w.enabled=!0;w.type=q.cN;w.$a();return w}Z(q,n);q.prototype.getType=function(){return this.type};
q.prototype.sb=function(p){this.enabled=p};q.prototype.dispose=function(){this.Ca()};q.prototype.$a=function(){this.Bg.bind(m.Pb,this.Kr,this,!0);this.Bg.bind(m.ma,this.tBa,this,!0);l.ju(this.model,["camera.lockMouse"],this.j2,!0);l.ju(this.model,["objects"],this.py,!0);this.pl=new e(this.Bg.hd());this.pl.bind(m.ba,this.YFa,this,!0);document.addEventListener("keyup",this.N3);document.addEventListener("keydown",this.M3);this.zs(q.cN)};q.prototype.Ca=function(){this.Bg.unbind(m.Pb,this.Kr,this);this.Bg.unbind(m.ma,
this.tBa,this);l.ca(this.model,["camera.lockMouse"],this.j2);l.ca(this.model,["objects"],this.py);this.NU([]);this.pl.unbind(m.ba,this.YFa,this);this.pl.Cp()&&this.pl.unlock();this.XIa(!1);this.pl.dispose();document.removeEventListener("keyup",this.N3);document.removeEventListener("keydown",this.M3)};q.prototype.j2=function(){this.IT=!f.pb()&&this.model.get("camera").get("lockMouse");!this.IT&&this.pl.Cp()&&this.pl.unlock();this.XKa()};q.prototype.XKa=function(){this.XIa((!this.C2||!this.UCa)&&(f.pb()||
!this.IT))};q.prototype.XIa=function(p){this.Cja!=p&&((this.Cja=p)?this.zc.bP.X1():this.zc.bP.S4())};q.prototype.Kr=function(){this.pl.Cp()||this.zs(q.cN)};q.prototype.M3=function(p){-1!=q.BMa.indexOf(p.code)&&(this.type==q.cN&&this.zs(q.j7),this.IT&&!this.pl.Cp()&&this.pl.lock())};q.prototype.N3=function(p){p.code==k.na.NH&&(p=(new Date).getTime(),this.KKa(m.ma),500>p-this.tFa&&this.KKa(m.El),this.tFa=p)};q.prototype.KKa=function(p){var r=this.zc.Wa()/2,t=this.zc.Ab()/2;p=new c(p,r,t,r,t,0,0,void 0);
this.Bg.trigger(p)};q.prototype.tBa=function(){this.uBa=(new Date).getTime();this.IT&&!this.pl.Cp()?this.pl.lock():this.gia()};q.prototype.w4a=function(){this.IT&&this.pl.Cp()&&this.pl.unlock()};q.prototype.YFa=function(){this.pl.Cp()?this.zs(q.j7):this.zs(q.cN)};q.prototype.py=function(){this.NU(this.model.get("objects",[]))};q.prototype.NU=function(p){var r=this;this.sG.forEach(function(t){t.unbind(m.ma,r.iGa,r)});this.sG=p;this.sG.forEach(function(t){t.bind(m.ma,r.iGa,r,!0);g.Ja("MeasureModel3DObject",
t)&&(t.bind(m.G("draggingPoint"),r.PT,r,!0),t.bind(m.G("mode"),r.PT,r,!0))});this.PT()};q.prototype.iGa=function(p){p.source.get("useHandCursor")&&(this.vBa=(new Date).getTime())};q.prototype.PT=function(){var p=!1,r=!1;this.sG.forEach(function(u){g.Ja("MeasureModel3DObject",u)&&(r=r||!!u.get("draggingPoint"),p=p||"edit"==u.get("mode")&&!!u.get("draggingPoint"))});this.UCa=p;var t=this.model.get("camera");r!=this.C2&&(this.C2=r,setTimeout(function(){t.N$a(this.C2)}.bind(this),0));this.XKa()};q.prototype.gia=
function(){100<Math.abs(this.uBa-this.vBa)&&this.w4a()};q.prototype.zs=function(p){this.type!==p&&(this.type=p,this.trigger(m.ba))};q.cN="mouse";q.j7="gaze";q.BMa=[k.na.gj,k.na.Sh,k.na.ab,k.na.ub,k.na.mo,k.na.so,k.na.Zm,k.na.Xm,k.na.E,k.na.Q];return q}(h)});
define("fk","require exports three.mod lh pB mt ko fU bi bo".split(" "),function(a,d,l,m,k,c,h,f,b,e){var g=new l.Vector3(0,0,0),n=new l.Vector3(0,0,-1);a=function(){function p(r,t,u,v,w,x){this.renderer=r;this.Es=t;this.model=u;this.Ie=v;this.kc=w;this.La=x;this.jV=this.jV.bind(this);this.By=this.By.bind(this);this.Tx=this.Tx.bind(this);this.zc=this.renderer.M;this.Bg=this.renderer.getParent();this.Pu=this.model.get("application").Dm("Model3DPointer");this.$a()}p.prototype.sb=function(r){var t=this.La.J(f.Fc);
t&&(t.enabled=r)};p.prototype.dispose=function(){this.Ca()};p.prototype.$a=function(){this.nM=new c(this.zc.bja());this.H5a=new q(this.Bg,this.nM);this.$n=new h;this.$n.JIa(this.H5a);var r=this.La.I(f.Fc);r.La=this.La;r.origin=g;r.direction=n;r.ZF=this.Bg;r.z2=this.$n;r.N=this.Pu;this.zc.set("toolTipCentered",!0);this.model.set("pointer",this.Pu);this.gbb();this.Ola();this.$n.push(b.$C);e.requestFrame(this.jV)};p.prototype.Ca=function(){this.$n.pop(b.$C);this.ecb();this.gma();this.zc.set("toolTipCentered",
!1);this.zc.set("toolTipCenteredOffsetY",void 0);this.model.set("pointer",void 0);this.La.ia(f.Fc);this.$n.dispose();e.jCa(this.jV)};p.prototype.Ola=function(){this.ho=this.kc.P.Nc("GazeReticle");this.ho.I(f.lb).F=this.La;this.ho.I(f.Plane).renderOrder=2;this.ho.I(f.SC);var r=this.ho.I(f.hf);r.source=this.nM.eg();r.depthTest=!1;this.ho.I(f.va).Je=-1;this.renderer.bind(k.tc,this.By,this,!0);this.By();this.xS(this.La.getComponent(f.Fc),this.Pu)};p.prototype.xS=function(r,t){t.set("originX",r.origin.x);
t.set("originY",r.origin.y);t.set("originZ",r.origin.z);t.set("directionX",r.direction.x);t.set("directionY",r.direction.y);t.set("directionZ",r.direction.z)};p.prototype.gma=function(){this.ho&&(this.ho.P.Hd(this.ho),this.ho=null)};p.prototype.Scb=function(){if(this.ho){var r=this.ho.J(f.Qj,!0);r.sf=r.Gf=2;var t=Math.min(this.zc.Wa(),this.zc.Ab())/100;r.HB=r.GB=Math.round(4*t);this.zc.set("toolTipCenteredOffsetY",2*t)}};p.prototype.jV=function(r){this.ho&&this.nM.update(r)&&(this.ho.J(f.hf).bH=(new Date).getTime());
e.requestFrame(this.jV)};p.prototype.By=function(){this.Scb()};p.prototype.gbb=function(){m.ju(this.model,"camera",this.Tx,!0)};p.prototype.ecb=function(){m.ca(this.model,"camera",this.Tx);this.KIa(!0)};p.prototype.Tx=function(){this.KIa(!1)};p.prototype.KIa=function(r){var t=this.La.J(f.NC);t&&(t.fL=r);(t=this.La.J(f.OC))&&(t.fL=r);(t=this.La.J(f.UC))&&(t.fL=r)};return p}();var q=function(){function p(r,t){this.Bg=r;this.nM=t}p.prototype.jEa=function(){return this.Bg};p.prototype.Z4=function(r,t){-1<
t.indexOf(b.Le)?this.nM.WG(!0):this.nM.WG(!1)};return p}();return a});
define("cw","require exports three.mod lh pB gF ko fU kQ bi fq".split(" "),function(a,d,l,m,k,c,h,f,b,e,g){a=function(){function t(u,v,w,x,y,z){this.sG=[];this.QT=[];this.renderer=u;this.Es=v;this.model=w;this.Ie=x;this.kc=y;this.La=z;this.py=this.py.bind(this);this.hU=[];this.enabled=!1;this.$a()}t.prototype.sb=function(u){this.enabled!==u&&((this.enabled=u)?m.ju(this.model,["objects"],this.py,!0):(m.ca(this.model,["objects"],this.py),this.NU([])))};t.prototype.dispose=function(){this.Ca()};t.prototype.$a=
function(){b.N.bind(k.Vh,this.NB,this,!0)};t.prototype.Ca=function(){b.N.unbind(k.Vh,this.NB,this);this.lJa([])};t.prototype.NB=function(){this.lJa(b.og)};t.prototype.lJa=function(u){this.enabled||(u=[]);var v=this.hU;this.hU=u.map(function(x){var y=v.findIndex(function(z){return z.rc==x});return-1!==y?v.splice(y,1)[0]:new n(x,this.model,this.Ie,this.La)}.bind(this));v.forEach(function(x){x.dispose()});this.hU.forEach(function(x){x.sb(this.enabled);x.update()}.bind(this));var w=this.hU.reduce(function(x,
y){return!x||x.B2<y.B2?y:x},null);this.hU.forEach(function(x){x.uab(x===w)});this.model.set("pointer",null!==w?w.Mm:void 0)};t.prototype.py=function(){this.NU(this.model.get("objects",[]))};t.prototype.NU=function(u){this.sG=u;this.PT()};t.prototype.PT=function(){this.QT.forEach(function(u){u.unbind(k.G("mode"),this.Mja,this)}.bind(this));this.QT=[];this.QT=this.sG.filter(function(u){return g.Ja("MeasureModel3DObject",u)});this.QT.forEach(function(u){u.bind(k.G("mode"),this.Mja,this,!0)}.bind(this));
this.Mja()};t.prototype.Mja=function(){var u=!1,v=!1;this.QT.forEach(function(w){v=v||"create"==w.get("mode");u=u||"edit"==w.get("mode")}.bind(this));this.model.get("camera").E$a(v)};return t}();var n=function(){function t(u,v,w,x){this.B2=this.Wha=0;this.rc=u;this.model=v;this.Ie=w;this.La=x;this.B2=this.Wha="right"===this.rc.handedness?1:0;this.Mm=this.model.get("application").Dm("Model3DPointer");this.Zi=this.enabled=!1;this.$a()}t.prototype.update=function(){this.Ocb();b.yla(this.rc,this.fia.wi,
this.fia.wi,this.model.get("surfaceSelectionEnabled")&&(this.V7a||this.X7a||this.W7a)?void 0:this.distance);b.kJa(this.rc,!this.Zi||!this.enabled)};t.prototype.sb=function(u){this.enabled!==u&&(this.enabled=u,u=this.Qu.J(f.Fc,!0))&&(u.enabled=this.enabled)};t.prototype.uab=function(u){this.Zi!==u&&(this.Zi=u,u=this.Qu.J(f.Fc,!0))&&(u.Zi=this.Zi)};t.prototype.dispose=function(){this.Ca()};t.prototype.$a=function(){this.fia=new r(this.Mm);this.$n=new h;this.$n.JIa(this.fia);this.eU=new c;this.Qu=this.Ie.P.Nc("Pointer");
var u=this.Qu.J(f.Fc,!0);u.wCa=!0;u.matrixWorld=new l.Matrix4;u.La=this.La;u.ZF=this.eU;u.z2=this.$n;u.N=this.Mm;u.enabled=this.enabled;b.N.bind(k.rz,this.PGa,this,!0);b.N.bind(k.MH,this.QGa,this,!0);b.N.bind(k.Xf,this.OGa,this,!0);this.Mm.bind(k.hb,this.gs,this,!0);this.Mm.bind(k.Eb,this.mh,this,!0);this.Mm.bind(k.Pb,this.OB,this,!0);this.Mm.bind(k.Jb,this.hs,this,!0)};t.prototype.Ca=function(){this.Mm.unbind(k.hb,this.gs,this);this.Mm.unbind(k.Eb,this.mh,this);this.Mm.unbind(k.Pb,this.OB,this);
this.Mm.unbind(k.Jb,this.hs,this);this.Qu.P.Hd(this.Qu);this.$n.dispose();b.N.unbind(k.rz,this.PGa,this);b.N.unbind(k.MH,this.QGa,this);b.N.unbind(k.Xf,this.OGa,this)};t.prototype.Ocb=function(){var u=this.Qu.J(f.Fc,!0);u.matrixWorld.copy(this.rc.matrixWorld);u.origin.copy(this.rc.ray.origin);u.direction.copy(this.rc.ray.direction);u.Xb.copy(this.rc.Xb);u.jH=this.rc.jH;this.xS(u,this.Mm)};t.prototype.xS=function(u,v){p.origin.set(u.origin);p.direction.set(u.direction);p.applyMatrix4(u.matrixWorld);
v.set("originX",u.origin.x);v.set("originY",u.origin.y);v.set("originZ",u.origin.z);v.set("directionX",u.direction.x);v.set("directionY",u.direction.y);v.set("directionZ",u.direction.z)};t.prototype.OGa=function(u){u.data.pointerState===this.rc&&(u=300>Date.now()-this.Wha,this.Wha=Date.now(),this.eU.trigger(k.ma),u&&this.eU.trigger(k.El))};t.prototype.PGa=function(u){u.data.pointerState===this.rc&&(this.B2=Date.now(),this.eU.trigger(k.hb))};t.prototype.QGa=function(u){u.data.pointerState===this.rc&&
this.eU.trigger(k.Eb)};t.prototype.OB=function(u){this.LIa(u);this.fJa(u)};t.prototype.LIa=function(u){u.data.position?(u=u.data.position,p.copy(this.rc.ray).applyMatrix4(this.rc.matrixWorld),this.distance=p.origin.distanceTo(q.set(u.x,u.y,u.z))):this.distance=void 0};t.prototype.fJa=function(u){this.X7a="mesh"==u.data.type;this.V7a="bone"==u.data.type;this.W7a="gs"==u.data.type};t.prototype.gs=function(u){this.LIa(u);this.fJa(u)};t.prototype.mh=function(){this.distance=void 0};t.prototype.hs=function(){this.distance=
void 0};return t}(),q=new l.Vector3,p=new l.Ray,r=function(){function t(u){this.Mm=u}t.prototype.jEa=function(){return this.Mm};t.prototype.Z4=function(u,v){this.wi=-1<v.indexOf(e.Le)};return t}();return a});
define("pi","require exports three.mod lh pB ko lz fU".split(" "),function(a,d,l,m,k,c,h,f){var b=new l.Vector3(0,0,0),e=Math.PI/180,g=new l.Vector3;return function(){function n(q,p,r,t,u,v){this.renderer=q;this.Es=p;this.model=r;this.Ie=t;this.kc=u;this.La=v;this.S2=this.S2.bind(this);this.By=this.By.bind(this);this.Kr=this.Kr.bind(this);this.zc=this.renderer.M;this.Bg=this.renderer.getParent();this.Pu=this.model.get("application").Dm("Model3DPointer");this.enabled=!0;this.$a()}n.prototype.sb=function(q){this.enabled=
q;var p=this.La.J(f.Fc);p&&(p.enabled=q)};n.prototype.dispose=function(){this.Ca()};n.prototype.$a=function(){var q=this.La.I(f.Fc);q.La=this.La;q.origin=b;q.direction=new l.Vector3;q.ZF=this.Bg;q.N=this.Pu;this.$n=new c;this.$n.vs(this.Bg);q.z2=this.$n;q.enabled=this.enabled;m.da(this.model,["camera.fov"],this.S2,!0);this.renderer.bind(k.tc,this.By,this,!0);this.Bg.X3a(k.hb,this.Kr,this);this.Bg.bind(k.Pb,this.Kr,this,!0);this.model.set("picker",this);this.model.set("pointer",this.Pu)};n.prototype.Ca=
function(){m.ca(this.model,["camera.fov"],this.S2);this.renderer.unbind(k.tc,this.By,this);this.Bg.unbind(k.hb,this.Kr,this);this.Bg.unbind(k.Pb,this.Kr,this);this.La.ia(f.Fc);this.$n.dispose();this.model.set("picker",void 0);this.model.set("pointer",void 0)};n.prototype.By=function(){this.sma()};n.prototype.S2=function(){this.sma()};n.prototype.Kr=function(q){this.v8a=q.x;this.w8a=q.y;this.sma()};n.prototype.sma=function(){var q=this.La.J(f.Fc);this.YDa(this.v8a,this.w8a,q.direction);this.xS(q,this.Pu)};
n.prototype.xS=function(q,p){p.set("originX",q.origin.x);p.set("originY",q.origin.y);p.set("originZ",q.origin.z);p.set("directionX",q.direction.x);p.set("directionY",q.direction.y);p.set("directionZ",q.direction.z)};n.prototype.YDa=function(q,p,r){var t;r=r||new l.Vector3;var u=(null===(t=this.model.get("camera"))||void 0===t?void 0:t.get("fov"))||90;t=this.zc.Wa();var v=this.zc.Ab();void 0===q&&(q=t/2);void 0===p&&(p=v/2);r.set(q-t/2,v/2-p,-t/(2*Math.tan((t>v?u:h.Sp(u,t,v))*e/2))).normalize();return r};
n.prototype.H4=function(q,p){var r=this.La.getComponent(f.Fc);if(r&&r.ps)return r.ps.H4([this.kc],b,this.YDa(q,p,g))};return n}()});
define("ne","require exports lh pB ii fk cw pi kQ".split(" "),function(a,d,l,m,k,c,h,f,b){return function(){function e(g,n,q,p,r,t){this.renderer=g;this.Es=n;this.model=q;this.Ie=p;this.kc=r;this.La=t;this.enabled=!0;this.Tx=this.Tx.bind(this);this.$a()}e.prototype.sb=function(g){var n;this.enabled=g;null===(n=this.VF)||void 0===n?void 0:n.sb(this.enabled)};e.prototype.dispose=function(){this.Ca()};e.prototype.$a=function(){l.da(this.model,"camera",this.Tx,!1);b.N.bind(m.ba,this.kLa,this,!0);this.uma()};
e.prototype.Ca=function(){l.ca(this.model,"camera",this.Tx);b.N.unbind(m.ba,this.kLa,this);this.zs("none");this.iKa()};e.prototype.Tx=function(){this.uma()};e.prototype.kLa=function(){this.uma()};e.prototype.uma=function(){b.isPresenting?this.zs("xr"):"FirstPersonModel3DCamera"==this.model.get("camera").get("class")?this.pbb():(this.iKa(),this.zs("mouse"))};e.prototype.pbb=function(){this.pL||(this.pL=new k(this.renderer,this.Es,this.model,this.kc,this.La),this.pL.bind(m.ba,this.sGa,this,!0),this.sGa())};
e.prototype.iKa=function(){var g;this.pL&&(null===(g=this.pL)||void 0===g?void 0:g.dispose(),this.pL=void 0)};e.prototype.sGa=function(){var g;switch(null===(g=this.pL)||void 0===g?void 0:g.getType()){case k.j7:this.zs("gaze");break;default:this.zs("mouse")}};e.prototype.zs=function(g){var n;if(this.type!==g){this.VF&&this.VF.dispose();this.type=g;switch(this.type){case "mouse":this.VF=new f(this.renderer,this.Es,this.model,this.Ie,this.kc,this.La);break;case "gaze":this.VF=new c(this.renderer,this.Es,
this.model,this.Ie,this.kc,this.La);break;case "xr":this.VF=new h(this.renderer,this.Es,this.model,this.Ie,this.kc,this.La);break;default:this.VF=void 0}null===(n=this.VF)||void 0===n?void 0:n.sb(this.enabled)}};return e}()});
define("lg",["require","lh","fU"],function(a){function d(c,h){this.yc=c;this.qd=h;this.V=!1;this.ji=this.ji.bind(this);l.da(this.yc,k,this.ji,!0)}var l=a("lh"),m=a("fU");d.prototype.ji=function(){var c=this.yc.get("enabled")&&!this.yc.get("disabled");this.V!=c&&(this.V&&this.qd.ia(m.rH),(this.V=c)&&this.qd.I(m.rH));this.V&&(c=this.qd.J(m.rH),c.TCa=this.yc.get("easingDuration"),c.bias=this.yc.get("bias"),c.intensity=this.yc.get("intensity"),c.scale=this.yc.get("scale"),c.qFa=this.yc.get("kernelRadius"),
c.RFa=this.yc.get("minResolution"),c.Mha=this.yc.get("blurRadius"),c.output="ao"==this.yc.get("output")?THREE.SAOPass.OUTPUT.SAO:THREE.SAOPass.OUTPUT.Default)};d.prototype.dispose=function(){this.qd.ia(m.rH);this.qd=null;l.ca(this.yc,k,this.ji)};var k="disabled enabled bias easingDuration intensity scale kernelRadius minResolution blurRadius output".split(" ");return d});
define("E",["require","lh","fU"],function(a){function d(c,h){this.yc=c;this.qd=h;this.V=!1;this.ji=this.ji.bind(this);l.da(this.yc,k,this.ji,!0)}var l=a("lh"),m=a("fU");d.prototype.ji=function(){var c=this.yc.get("enabled")&&!this.yc.get("disabled");this.V!=c&&(this.V&&this.qd.ia(m.tC),(this.V=c)&&this.qd.I(m.tC));this.V&&(c=this.qd.J(m.tC),c.xDa="fxaa"==this.yc.get("mode"),c.VJa="ssaa"==this.yc.get("mode"),c.YU=this.yc.get("ssaaSampleLevel"))};d.prototype.dispose=function(){this.qd.ia(m.tC);this.qd=
null;l.ca(this.yc,k,this.ji)};var k=["disabled","enabled","mode","ssaaSampleLevel"];return d});
define("lp",["require","lh","fU"],function(a){function d(c,h){this.yc=c;this.qd=h;this.V=!1;this.ji=this.ji.bind(this);l.da(this.yc,k,this.ji,!0)}var l=a("lh"),m=a("fU");d.prototype.ji=function(){var c=this.yc.get("enabled")&&!this.yc.get("disabled");this.V!=c&&(this.V&&this.qd.ia(m.dN),(this.V=c)&&this.qd.I(m.dN));this.V&&(c=this.qd.J(m.dN),c.jIa=this.yc.get("samples"),c.intensity=this.yc.get("intensity"))};d.prototype.dispose=function(){this.qd.ia(m.dN);this.qd=null;l.ca(this.yc,k,this.ji)};var k=
["disabled","enabled","samples","intensity"];return d});
define("hg",["require","lh","fU"],function(a){function d(c,h){this.yc=c;this.qd=h;this.ji=this.ji.bind(this);l.da(this.yc,k,this.ji,!0)}var l=a("lh"),m=a("fU");d.prototype.ji=function(){var c=this.yc.get("enabled")&&!this.yc.get("disabled");this.V!=c&&(this.V&&this.qd.ia(m.QH),(this.V=c)&&this.qd.I(m.QH));this.V&&(c=this.qd.J(m.QH),c.XEa=this.yc.get("innerRadius"),c.hHa=this.yc.get("outerRadius"),c.color=this.yc.get("color"),c.opacity=this.yc.get("opacity"))};d.prototype.dispose=function(){this.qd.ia(m.QH);
this.qd=null;l.ca(this.yc,k,this.ji)};var k="enabled disabled opacity color innerRadius outerRadius".split(" ");return d});
define("m","require exports oz lg E lp hg fq".split(" "),function(a,d,l,m,k,c,h,f){return function(){function b(e,g){this.model=e;this.Ie=g;this.filter=this.filter.bind(this);this.Nd=this.Nd.bind(this);this.pg=this.pg.bind(this);this.jU=new l;this.jU.filter=this.filter;this.jU.Nd=this.Nd;this.jU.pg=this.pg;this.jU.aH(this.model,"postprocessing")}b.prototype.filter=function(e){return f.Ja("AmbientOcclusionModel3DPostprocessing",e)||f.Ja("AntialiasModel3DPostprocessing",e)||f.Ja("MotionBlurModel3DPostprocessing",
e)||f.Ja("VignetteModel3DPostprocessing",e)};b.prototype.Nd=function(e){return f.Ja("AmbientOcclusionModel3DPostprocessing",e)?new m(e,this.Ie):f.Ja("AntialiasModel3DPostprocessing",e)?new k(e,this.Ie):f.Ja("MotionBlurModel3DPostprocessing",e)?new c(e,this.Ie):f.Ja("VignetteModel3DPostprocessing",e)?new h(e,this.Ie):null};b.prototype.pg=function(e,g){g.dispose()};b.prototype.dispose=function(){this.jU.dispose()};return b}()});
define("jX",["require","exports"],function(){var a=function(){function d(){}d.D7a=function(){for(var l=0;l<=d.q7;l++)d.Cia.push(0);window.requestAnimationFrame(d.eo)};d.LDa=function(){return d.frameRate};d.eo=function(l){0!==d.rG&&(d.Cia[Math.min(Math.round(1E3/(l-d.rG)),d.q7)]++,d.oM++);d.rG=l;d.oM<d.wMa?window.requestAnimationFrame(d.eo):d.Y3a()};d.Y3a=function(){for(var l=0,m=0,k=30;k<=d.q7;k+=10){for(var c=0,h=-5;5>=h;h++)c+=d.Cia[k+h];c>l&&(l=c,m=k)}d.frameRate=m};d.q7=200;d.wMa=60;d.Cia=[];
d.rG=0;d.oM=0;d.frameRate=60;return d}();a.D7a();return a});
define("oZ","require exports lh pB gF ni fU jX".split(" "),function(a,d,l,m,k,c,h,f){a=function(){function g(n,q){this.KB=this.enabled=!1;this.$Fa=this.aGa=0;this.model=n;this.Ie=q;this.hma=this.hma.bind(this);this.h4=this.h4.bind(this);this.s4=this.s4.bind(this);l.da(this.model,"pixelRatioMinScale",this.s4,!0)}g.prototype.dispose=function(){this.disable();l.ca(this.model,"pixelRatioMinScale",this.s4)};g.prototype.s4=function(){this.disable();1>this.model.get("pixelRatioMinScale")&&this.enable()};
g.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.jo(!1),this.fM.unbind(m.ba,this.LGa,this),l.ca(this.model,"camera.x camera.y camera.z camera.yaw camera.pitch camera.fov camera.distance".split(" "),this.h4),this.fM.dispose())};g.prototype.enable=function(){this.enabled||(this.enabled=!0,this.fM=new b(this.model.get("pixelRatioMinScale")),this.fM.bind(m.ba,this.LGa,this,!0),l.da(this.model,"camera.x camera.y camera.z camera.yaw camera.pitch camera.fov camera.distance".split(" "),
this.h4,!0))};g.prototype.h4=function(){this.aGa=Date.now();this.jo(!0)};g.prototype.hma=function(){Date.now()-this.aGa>g.Lna&&this.jo(!1)};g.prototype.jo=function(n){this.KB!==n&&((this.KB=n)?(this.$Fa=window.setInterval(this.hma,g.Lna),this.fM.enable()):(window.clearInterval(this.$Fa),this.fM.disable()),this.bLa())};g.prototype.LGa=function(){this.bLa()};g.prototype.bLa=function(){var n=this.KB&&this.enabled?this.fM.iy():1;this.Ie.getComponent(h.Scene).I4!=n&&(this.Ie.J(h.Scene).I4=n)};g.Lna=100;
return g}();var b=function(g){function n(q){var p=g.call(this)||this;p.$B=[];p.RL=0;p.eo=p.eo.bind(p);p.T3a(q);p.reset();return p}Z(n,g);n.prototype.T3a=function(q){for(var p=1;p>q;p-=.1)this.$B.push(p);Math.abs(q-this.$B[this.$B.length-1])>e&&this.$B.push(q);c.fv&&console.log("steps = ["+this.$B.map(function(r){return r.toFixed(2)}).join(", ")+"]")};n.prototype.reset=function(){this.disable();this.rG=0;this.NG=.5;this.Dja=0;this.scale=.5*this.$B.length;this.Yka=Math.floor(this.scale);this.pCa();
this.enable()};n.prototype.enable=function(){!this.RL&&this.NG>n.nna&&(this.RL=window.requestAnimationFrame(this.eo))};n.prototype.disable=function(){this.RL&&(window.cancelAnimationFrame(this.RL),this.RL=0)};n.prototype.iy=function(){return this.$B[this.Yka]};n.prototype.dispose=function(){this.disable()};n.prototype.eo=function(q){0!==this.rG&&(this.Hcb(q-this.rG),this.Mcb());this.rG=q;this.RL=this.NG>n.nna?window.requestAnimationFrame(this.eo):0};n.prototype.Hcb=function(q){for(this.$S.push(q);this.$S.length>
n.gMa;)this.$S.shift(),this.PF=this.$S.reduce(function(p,r){return p+r},0)/this.$S.length};n.prototype.pCa=function(){this.$S=[];this.PF=void 0};n.prototype.Mcb=function(){if(void 0!==this.PF){var q=1E3/f.LDa(),p=q*n.zMa;q=Math.max(1E3/n.AMa,q*n.uMa);if(this.PF<=q)var r=-1;else if(this.PF>p)r=1;else{c.fv&&console.log("["+p.toFixed(2)+" > "+this.PF.toFixed(2)+" > "+q.toFixed(2)+"]");return}this.Dja&&this.Dja!==r&&(this.NG*=n.$Ma);this.Dja=r;this.scale=Math.min(Math.max(this.scale+r*this.NG,0),this.$B.length-
1);1==r?c.fv&&console.log("["+this.PF.toFixed(2)+" > "+p.toFixed(2)+"]",this.scale.toFixed(2),"("+(r*this.NG).toFixed(2)+")"):-1==r&&c.fv&&console.log("["+this.PF.toFixed(2)+" <= "+q.toFixed(2)+"]",this.scale.toFixed(2),"("+(r*this.NG).toFixed(2)+")");p=Math.round(this.scale);this.Yka!==p&&(this.pCa(),this.Yka=p,this.trigger(m.ba))}};n.zMa=1.5;n.uMa=1.1;n.gMa=15;n.$Ma=.75;n.nna=.01;n.AMa=60;return n}(k),e=1E-6;return a});
define("oy","require pB fU cv eY ng ki bl hb jc lK hi ne m oZ kQ".split(" "),function(a){function d(w,x,y){this.j=w;this.yd=x;this.ja=y;this.M=this.j.M;this.V=!0;this.mta=!1;this.ja.Tka();this.qd=this.yd.Nc("Scene");w=this.qd.I(m.Scene);w.uia=this.ja.h3().UK(this.ja.l3().qu(.1),.1);w.N=this.ja;w.locked=!0;this.hua=new f(this.ja,this.ja,this.qd,this.j);this.nb=this.hua.wu();w.La=this.Bq=this.yd.Nc("PerspectiveCamera");this.Bq.I(m.lb).F=this.qd;this.PW=new c(this.j,this.ja,this.Bq);this.PW.Wu(!0);this.gWa=
new b(this.ja,this.nb,this.Bq);this.lZa=new r(this.ja,this.qd);this.UVa=new h(this.ja,this.nb,this.qd,this.Bq);this.lxa=new q(this.j,this.yd,this.ja,this.qd,this.nb,this.Bq);v.forEach(function(z){this.ja.bind(l.G(z),this.dda,this,!0)}.bind(this));this.nYa=new p(this.ja,this.qd);this.yd.ABa(this.qd);this.rWa=new n(this.ja,this.nb,this.Bq);this.H0a=new g(this.ja,this.nb,this.j);this.Y0a=new e(this.j,this.ja);t.N.bind(l.ba,this.GJ,this,!0);this.dda();this.GJ()}var l=a("pB"),m=a("fU"),k=a("cv"),c=a("eY"),
h=a("ng"),f=a("ki"),b=a("bl"),e=a("hb"),g=a("jc"),n=a("lK");a("hi");var q=a("ne"),p=a("m"),r=a("oZ"),t=a("kQ");d.prototype.Wu=function(w){this.qd.J(m.Scene).locked=w;this.PW.Wu(w)};d.prototype.sb=function(w){this.V!==w&&(this.V=w,this.Kx())};d.prototype.GJ=function(){this.mta=t.nh==this.M.Qd().bs();this.Kx()};d.prototype.Kx=function(){var w=(this.ja.get("camera").get("xrEnabled")||this.ja.get("camera").get("vrEnabled"))&&!this.ja.get(u);w=this.V&&(!this.mta||w);this.qd.J(m.Scene).enabled=w;this.lxa.sb(w);
this.PW.sb(w)};d.prototype.dispose=function(){v.forEach(function(w){this.ja.unbind(l.G(w),this.dda,this,!0)}.bind(this));this.ja.unbind(l.G("camera"),this.meb,this,!0);t.N.unbind(l.ba,this.GJ,this);this.lZa.dispose();this.gWa.dispose();this.hua.dispose();this.PW.dispose();this.UVa.dispose();this.lxa.dispose();this.nYa.dispose();this.H0a.dispose();this.rWa.dispose();this.Y0a.dispose();this.yd.Z9a(this.qd);this.yd.Hd(this.qd);this.yd.Hd(this.Bq)};d.prototype.x6a=function(){return this.nb?k.fG(this.nb):
void 0};d.prototype.dda=function(){var w=this.qd.J(m.Scene);w.opacity=this.ja.get("opacity");w.aDa=this.ja.get("environmentURL");w.Gha=this.ja.get("backgroundImageURL");w.QBa=this.ja.get("backgroundPanoramaURL");w.backgroundColor=this.ja.get("backgroundColor");w.outputColorSpace=this.ja.get("encoding");w.qDa=this.ja.get("fogColor");w.rDa=this.ja.get("fogDensity");w.environmentIntensity=this.ja.get("environmentIntensity");w=this.ja.get("anisotropicFilteringLevel");var x=this.ja.get("bakedTextures");
if(0!=w||x){var y=this.qd.J(m.vh,!0);y.sS=w;y.zS=x}else this.qd.ia(m.vh)};var u=function(w){return w.map(function(x){return String.fromCharCode(x)}).join("")}([119,97,116,101,114,109,97,114,107]),v="anisotropicFilteringLevel bakedTextures environmentURL backgroundImageURL backgroundPanoramaURL backgroundColor fogColor fogDensity opacity encoding environmentIntensity".split(" ");return d});
define("lQ","require lV fU gG oy bi d T".split(" "),function(a){var d=a("lV");a("fU");var l=a("gG"),m=a("oy"),k=a("bi"),c=a("d"),h=a("T");a=d.extend(h,function(f,b,e){h.call(this);this.Vd=f;this.M=b;this.uP=e;this.Re("Renderer");this.set("toolTipDisabled",!0);this.set("cursor",k.pv);this.set("layout",c.sV);this.yd=null;this.V=!0;this.yE=[];this.fK=new Map});a.prototype.Hb=function(){h.prototype.Hb.call(this);null==this.yd&&(this.yd=new l(this.Vd,this.M,!0),this.yd.ra({left:0,top:0,right:0,bottom:0,
cursor:k.pv,toolTipDisabled:!0}),this.yd.sb(this.V),this.Za(this.yd),this.yE.forEach(this.Xya.bind(this)))};a.prototype.sb=function(f){this.V!==f&&(this.V=f,this.yd&&this.yd.sb(this.V),this.set("interactionEnabled",this.V))};a.prototype.Ta=function(){this.yd&&this.yd.Ta()};a.prototype.e7a=function(f){return 0<=this.yE.indexOf(f)};a.prototype.zBa=function(f){0<=this.yE.indexOf(f)||(this.yE.push(f),this.yd&&this.Xya(f))};a.prototype.Kka=function(f){var b=this.yE.indexOf(f);0>b||(this.yE.splice(b,1),
this.yd&&this.Fza(f),0===this.yE.length&&this.sb(!0))};a.prototype.bJa=function(f){(f=this.fK.get(f))&&f.Wu(!1)};a.prototype.aJa=function(f,b){(f=this.fK.get(f))&&f.sb(b)};a.prototype.kT=function(f){return(f=this.fK.get(f))?f.x6a():void 0};a.prototype.MG=function(){return this.yd&&this.yd.MG()};a.prototype.Sha=function(){return this.yd&&this.yd.Sha()};a.prototype.Xya=function(f){this.Fza(f);this.fK.set(f,new m(this,this.yd,f))};a.prototype.Fza=function(f){var b=this.fK.get(f);b&&(this.fK["delete"](f),
b.dispose())};return a});
define("bO","require lV pB cI fq km iZ eg lQ eo".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cI"),k=a("fq"),c=a("km"),h=a("iZ"),f=a("eg"),b=a("lQ"),e=a("eo"),g=k.define("Model3DPlayer",h,function(){h.call(this,"model");this.Hq=this.hZ=this.ri=!1;this.O=this.j=null;this.Sb=this.Se=0;this.Kd=d.Ip(this.jh,this);this.Z8=new c(this,"buttonToggleSprites",e.Rj);this.Z8.bind(l.Oj,function(){this.set("spritesEnabled",!0)},this);this.Z8.bind(l.Hl,function(){this.set("spritesEnabled",!1)},this);this.Z8.set("pressed",
this.get("spritesEnabled"))});g.prototype.play=function(){this.ME()};g.prototype.pause=function(){this.LE()};g.prototype.stop=function(){this.GA()};g.prototype.restart=function(){this.FA()};g.prototype.getModelPixelScale=function(){return this.STa()};g.prototype.captureToDataURL=function(){return this.j&&this.j.Sha()};g.prototype.saveScreenshot=function(){return this.j&&this.j.MG()};g.prototype.set=function(n,q){if(this.get(n)!=q){switch(n){case "model":this.hZ=!0;this.set("requesterPlayer",null);
this.Kd();break;case "viewerArea":this.ri=!0;this.Kd();break;case "displayPlaybackBar":this.Hq=!0,this.Kd()}h.prototype.set.call(this,n,q)}};g.prototype.get=function(n,q){switch(n){case "currentTime":return this.O&&this.O.getTime()||0}return h.prototype.get.call(this,n,q)};g.prototype.jh=function(){this.ri&&(this.ri=!1,this.dw(),this.get("viewerArea")&&this.bw(),this.kR(this.get("viewerArea")),this.hZ=!0);var n=!1;if(this.j&&(this.hZ||this.P0)){var q=this.get("model");if(q&&!this.j.Db()){this.Kd();
return}this.hZ=!1;this.Sb=this.Se=0;n=!0;q?(this.get("viewerArea").Qd().Lbb(),this.KG(this.get("requesterPlayer")?[this.get("requesterPlayer"),this]:[this]),this.O.yab(q)):this.O.Ey()}this.Hq&&(this.Hq=!1,n=!0);n&&this.Nx()};g.prototype.uK=function(){this.set("model",null)};g.prototype.bw=function(){var n=this.get("application"),q=this.get("viewerArea");this.j=new b(n,q,this);this.j.ra({left:0,top:0,bottom:0,right:0});q.Za(this.j);this.O=new f(q,this.j);this.O.bind(f.CC,this.hm,this);this.O.bind(f.BC,
this.AA,this);this.O.bind(f.DC,this.VP,this);this.O.bind(f.Q6,this.Uva,this,!0);this.O.bind(f.Uc,this.lf,this);this.aB(!0)};g.prototype.dw=function(){this.j&&(this.O.unbind(f.CC,this.hm,this),this.O.unbind(f.BC,this.AA,this),this.O.unbind(f.DC,this.VP,this),this.O.unbind(f.Q6,this.Uva,this,!0),this.O.unbind(f.Uc,this.lf,this),this.O.clear(),this.j.getParent().removeChild(this.j),this.j=null,this.aB(!1))};g.prototype.lf=function(n){this.wd(n.data.state)};g.prototype.hm=function(n){var q=this.get("viewerArea");
this.fe=q&&q.fe;this.sP(n.data.model);this.Nx()};g.prototype.VP=function(n){this.trigger(new m(g.SLa,{model:n.data.model}))};g.prototype.AA=function(n){this.fe=null;this.rP(n.data.model)};g.prototype.Uva=function(n){this.Se=n.data.time;this.Sb=n.data.duration;this.Nx()};g.prototype.Tha=function(){var n=this.get("model");return(n=(n=n&&n.get("camera"))&&n.get("doubleClickAction"))&&"none"!=n?!0:!1};g.prototype.yQ=function(n){this.gF(n.data.position)};g.prototype.Sk=function(){this.O&&this.O.play()};
g.prototype.lp=function(){this.O&&this.O.stop()};g.prototype.ir=function(){this.O&&this.O.pause()};g.prototype.gF=function(n){this.O&&this.O.setTime(n)};g.prototype.STa=function(){return this.O&&this.O.kT()};g.prototype.Nx=function(){if(this.j){var n=this.j.getParent();0<this.Sb&&this.get("displayPlaybackBar")?n.ra({playbackBarPosition:this.Se,playbackBarDuration:this.Sb,playbackBarVisible:!0}):n.set("playbackBarVisible",!1)}};g.SLa="preloadMediaShow";return g});
define("pV","require pB lx fq dn iM".split(" "),function(a){var d=a("pB"),l=a("lx"),m=a("fq"),k=a("dn"),c=a("iM");a=m.define("Model3DPlayListItem",c,function(){c.call(this)});a.prototype.start=function(){c.prototype.start.call(this);var h=this.get("player");h&&(h.bind(k.th,this.hm,this),h.get("model")==this.get("media")&&this.get("media").get("isLoaded")?this.hm():h.set("model",this.get("media")))};a.prototype.stop=function(){var h=this.get("player");h&&(h.unbind(k.th,this.hm,this),h.get("model")==
this.get("media")&&h.set("model",null));c.prototype.stop.call(this)};a.prototype.hm=function(h){h&&h.data.media!=this.get("media")||(this.get("player").unbind(k.th,this.hm,this),this.get("player").bind(k.Vm,this.AA,this),this.c3a())};a.prototype.c3a=function(){var h=this.get("media").get("camera").get("sequences",[]).find(function(f){return f.get("internal")&&f.get("state")==l.PLAYING});h?h.bind(d.Gb,this.Jwa,this,!0):this.nB()};a.prototype.Jwa=function(h){h.source.unbind(d.Gb,this.Jwa,this,!0);this.nB()};
a.prototype.AA=function(h){h.data.media==this.get("media")&&(this.get("player").unbind(k.Vm,this.AA,this),this.stop(),this.end())};return a});define("qi",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("Model3DPointer",d,function(){d.call(this)})});define("jb",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("Menu",d,function(){d.call(this)})});define("q",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("MenuItem",d,function(){d.call(this)})});
define("dT",["require","fq","fu"],function(a){var d=a("fq"),l=a("fu");return d.define("MotionBlurModel3DPostprocessing",l,function(){l.call(this)})});define("lf",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("MovementPhotoCamera",d,function(){d.call(this)})});define("pR",["require"],function(){var a={xC:"drag_acceleration",gv:"drag_rotation"};a.rna=a.xC;a.joa=a.gv;return a});
define("pS",["require","lV","cI"],function(a){var d=a("lV"),l=a("cI");return d.extend(l,function(m){l.call(this,m);this.eM=this.NM=this.wy=this.Uy=0})});define("oj",["require","lV","cI"],function(a){var d=a("lV"),l=a("cI");return d.extend(l,function(m){l.call(this,m);this.fja=this.q7a=0})});
define("fF","require lV er pB cI gF pR pS oj".split(" "),function(a){function d(q,p){return q*p}function l(q,p){var r=0<p?1:-1;return r*(Math.pow(q,r*p)-1)/(q-1)}function m(q,p){return Math.min(Math.max(q/p,-1),1)}var k=a("lV");a("er");var c=a("pB"),h=a("cI"),f=a("gF"),b=a("pR"),e=a("pS"),g=a("oj"),n=k.extend(f,function(){f.call(this);this.dua=this.eua=1800;this.nWa=this.b1a=0;this.UO=!1;this.fp=void 0;this.zE=b.rna;this.Rza=b.joa;this.jO=0;this.h0=void 0;this.vp=!1;this.gI=null;this.cE=3;this.Xa=
90;this.y$=this.nF=this.Tc=1;this.fe=this.ib=null;this.xQ=!1});n.prototype.setCamera=function(q){this.eua=q.get("manualRotationSpeed");this.dua=q.get("manualRotationSpeed");this.cE=q.get("manualZoomSpeed");this.y$=q.get("draggingFactor")};n.prototype.cC=function(q){this.zE=q;this.Jga()};n.prototype.$G=function(q){this.Rza=q;this.Jga()};n.prototype.UG=function(q){this.Xa=q;this.nF=this.Xa/90};n.prototype.vs=function(q){this.Cm();if(q){this.ib=q;if(this.fe=q.k6a&&q.fe)this.fe.bind(c.hb,this.hxa,this,
!0),this.fe.bind(c.Eb,this.ixa,this,!0);this.ib.bind(c.hb,this.de,this,!0);this.ib.bind(c.Pb,this.ak,this,!0);this.ib.bind(c.Eb,this.bk,this,!0);this.ib.bind(c.Os,this.AE,this,!0);!1!==this.ib.Db().get("settings").get(TDV.PlayerSettings.TMa)&&this.ib.bind(c.DH,this.XD,this,!0);this.ib.bind(c.gz,this.Zra,this,!0);this.ib.bind(c.CH,this.Wra,this,!0);this.Jga()}};n.prototype.Cm=function(){null!=this.ib&&(this.fe&&(this.fe.unbind(c.hb,this.hxa,this),this.fe.unbind(c.Eb,this.ixa,this),this.fe=null),this.ib.unbind(c.hb,
this.de,this),this.ib.unbind(c.Pb,this.ak,this),this.ib.unbind(c.Eb,this.bk,this),this.ib.unbind(c.Os,this.AE,this),this.ib.unbind(c.DH,this.XD,this),this.ib.unbind(c.gz,this.Zra,this),this.ib.unbind(c.CH,this.Wra,this),this.ib=null,this.HX())};n.prototype.Jga=function(){this.ib&&(this.ib.No?(this.h0=this.Rza,this.jO=this.b1a):(this.h0=this.zE,this.jO=this.nWa))};n.prototype.hxa=function(){this.xQ=!0};n.prototype.ixa=function(){this.xQ=!1};n.prototype.de=function(q){this.xQ||(this.t0a(q),this.yfa())};
n.prototype.ak=function(q){this.xQ||this.GK(q)};n.prototype.bk=function(){this.xQ||(this.K$(),this.HX())};n.prototype.AE=function(q){this.Tga(q);this.yfa(500)};n.prototype.Zra=function(){this.yfa()};n.prototype.XD=function(q){this.Uga(q)};n.prototype.Wra=function(){this.HX()};n.prototype.t0a=function(q){this.UO=!0;this.fp=q;this.GK(q)};n.prototype.GK=function(q){if(this.UO)switch(this.h0){case b.xC:this.H2a(q);break;case b.gv:this.G2a(q)}};n.prototype.H2a=function(q){var p=this.QAa,r=q.x-this.fp.x;
r=+d(l(10,m(3>Math.abs(r)?0:r,this.ib.Wa())),this.eua*this.nF);q=q.y-this.fp.y;p.call(this,r,-d(l(10,m(3>Math.abs(q)?0:q,this.ib.Ab())),this.dua*this.nF))};n.prototype.G2a=function(q){this.Iga(-d(m(q.x-this.fp.x,this.ib.Wa()),this.Xa*this.y$),+d(m(q.y-this.fp.y,this.ib.Wa()),this.Xa*this.y$));this.fp=q};n.prototype.K$=function(){if(this.UO)switch(this.UO=!1,this.h0){case b.xC:this.QAa(0,0)}};n.prototype.QAa=function(q,p){var r=new e(n.lv);r.Uy=q;r.wy=p;this.trigger(r)};n.prototype.Iga=function(q,
p){var r=new e(n.lv);r.NM=q;r.eM=p;this.trigger(r)};n.prototype.Uga=function(q){if(this.Tc!=q.scale){this.K$();var p=this.Tc;this.Tc=q.scale;q=new g(n.aq);q.fja=this.Xa*p/this.Tc-this.Xa;this.trigger(q)}};n.prototype.Tga=function(q){if(0!=q.delta){this.K$();var p=new g(n.aq);p.fja=this.Xa*-q.delta*this.cE/100;this.trigger(p)}};n.prototype.yfa=function(q){var p=null!=this.gI;this.sza();if(q&&(p||!this.vp)){var r=this;this.gI=setTimeout(function(){r.gI=null;r.HX()},q)}this.vp||(this.vp=!0,this.trigger(new h(n.fj)))};
n.prototype.HX=function(){this.sza();this.vp&&(this.vp=!1,this.trigger(new h(n.ej)))};n.prototype.sza=function(){null!=this.gI&&(clearTimeout(this.gI),this.gI=null)};n.lv="rotation change";n.aq="zoom change";n.fj="user interaction start";n.ej="user interaction end";return n});
define("dI",["require","w"],function(a){function d(){this.oF=m.pb()?.066:.1;this.qWa=.5;this.e0a=m.pb()?.066:.1;this.n3a=.1;this.N0=this.T0=!1;this.reset()}function l(k,c,h){k=(c-k)*(1-h);.01>Math.abs(k)&&(k=0);return c-k}var m=a("w");d.prototype.reset=function(){this.Xqa=this.Q9=this.zI=this.Tz=this.bO=this.U9=this.T9=this.Y9=this.ZI=this.cE=this.c0=this.e0=this.kr=this.wQ=this.gu=this.nS=0};d.prototype.Dla=function(k,c,h,f,b,e,g,n,q){return this.nS!=k||(this.wQ=c)||this.e0!=h||0!=f||0!=b||this.N0!=
g||this.zua!=n||this.T0!=q?(this.nS=k,this.wQ=c,this.e0=h,this.gu+=f,this.kr+=b,this.c0+=e,this.N0=g,this.zua=n,this.T0=q,!0):!1};d.prototype.xbb=function(k,c){return this.cE!=k||0!=c?(this.cE=k,this.ZI+=c,!0):!1};d.prototype.rf=function(){return 0!=this.Y9||0!=this.T9||0!=this.U9||0!=this.bO||0!=this.nS||0!=this.wQ||0!=this.e0||0!=this.cE||0!=this.gu||0!=this.kr||0!=this.ZI};d.prototype.Fb=function(k){k=1E3/k;var c=this.Y9/k,h=this.nS/k+this.gu;this.gu=0;var f=this.T9/k,b=this.wQ/k+this.kr;this.kr=
0;var e=this.U9/k,g=this.e0/k+this.c0;this.c0=0;var n=this.cE+this.ZI*k;this.ZI=0;var q=0==h&&0==b&&0==g,p=0==c&&0==f&&0==e;this.N0&&p&&!q||this.T0&&q&&!p||this.zua&&!q&&!p?(q=q?this.oF:p?this.e0a:this.qWa,this.Tz=l(c,h,q),this.zI=l(f,b,q),this.Q9=l(e,g,q)):(this.Tz=h,this.zI=b,this.Q9=g);c=0==this.bO;h=0==n;this.bO=this.N0&&c&&!h||this.T0&&h&&!c?l(this.bO,n,this.n3a):n;this.Y9=this.Tz*k;this.T9=this.zI*k;this.U9=this.Q9*k;this.Xqa=this.bO/k};return d});
define("dm","require jquery.mod lV e fF dI bo pB".split(" "),function(a){var d=a("jquery.mod"),l=a("lV"),m=a("e"),k=a("fF"),c=a("dI"),h=a("bo"),f=a("pB");a=l.extend(m,function(){m.call(this);this.Re("Renderer");this.T=d("<canvas></canvas>");this.T.css({position:"absolute",left:0,top:0});this.Yb().append(this.T);this.lA=null;this.Ka=this.cJ=this.aJ=this.bJ=0;this.Uk=!1;this.jYa=150;this.MO=0;this.wn=null;this.bind(f.tc,this.Dc,this,!0);this.vb=new k;this.vb.Qeb(720);this.vb.BU(0);this.vb.cC("drag_rotation");
this.vb.UG(360);this.vb.bind(k.lv,this.wXa,this);this.oc=new c});a.prototype.eab=function(b,e,g){this.lA=b;this.bJ=e;this.aJ=g;this.cJ=Math.floor(this.lA.length*this.Ka/360);this.Gea();this.vb.vs(this);this.Sa()};a.prototype.q4a=function(){this.lA=null;this.Wt();this.Gea();this.vb.Cm()};a.prototype.play=function(){this.Uk=!0;this.Sa()};a.prototype.wXa=function(b){this.Wt();this.oc.Dla(b.Uy,b.wy,0,b.NM,b.eM,0,!1,!0);this.Sa()};a.prototype.$ca=function(){this.play()};a.prototype.ek=function(b){this.lA&&
(this.oc.rf()?(this.Uk=!1,this.oc.Fb(b),this.opa(this.oc.Tz),this.Sa()):this.Uk?(this.opa(this.jYa*b/1E3),this.Sa()):this.eJ()||this.vR())};a.prototype.Sm=function(b){for(this.Ka=b;0>this.Ka;)this.Ka+=360;for(;360<=this.Ka;)this.Ka-=360;this.d2a()};a.prototype.d2a=function(){if(this.lA){var b=Math.floor(this.lA.length*this.Ka/360);this.cJ!=b&&(this.cJ=b,this.Ixa())}};a.prototype.opa=function(b){this.Sm(this.Ka+b)};a.prototype.Dc=function(){this.Gea()};a.prototype.Gea=function(){var b=this.T.get(0);
if(0==this.bJ||0==this.aJ)b.width=0,b.height=0;else{var e=this.Bf(),g=this.Af();g*this.bJ>e*this.aJ?(b.width=e,b.height=this.aJ*e/this.bJ):(b.height=g,b.width=this.bJ*g/this.aJ);this.T.css({left:Math.round(.5*(e-b.width))+"px",top:Math.round(.5*(g-b.height))+"px"});this.Ixa()}};a.prototype.Ixa=function(){if(this.lA){var b=this.T.get(0);b.getContext("2d").drawImage(this.lA[this.cJ],0,0,this.bJ,this.aJ,0,0,b.width,b.height)}};a.prototype.eJ=function(){return this.wn?!0:!1};a.prototype.vR=function(){this.Wt();
if(0<this.MO){var b=this;this.wn=setTimeout(function(){b.wn=null;b.$ca()},this.MO)}};a.prototype.Wt=function(){this.wn&&(clearTimeout(this.wn),this.wn=null)};a.prototype.Sa=function(){h.requestFrame(this.ek,this)};return a});
define("mY","require pB iy cI fq gx B dm T mD".split(" "),function(a){var d=a("pB"),l=a("iy"),m=a("cI"),k=a("fq"),c=a("gx"),h=a("B"),f=a("dm"),b=a("T"),e=a("mD");a=k.define("Object3D",b,function(){b.call(this);this.Cd=this.Dn=this.ni=this.j=null;this.bind(d.kd,this.tj,this);this.bind(d.cd,this.sj,this)});a.prototype.Hb=function(){b.prototype.Hb.call(this);this.j||(this.j=new f,this.j.ra({left:0,top:0,right:0,bottom:0}),this.Za(this.j));this.ni||(this.ni=new h,this.ni.ra({left:0,bottom:0,right:0,height:20,
visible:!1}),this.Za(this.ni))};a.prototype.tj=function(){this.kca()};a.prototype.sj=function(){this.lp()};a.prototype.kca=function(){this.ni.set("percent",0);this.ni.set("visible",!0);this.j.Sm(this.get("yaw"));var g=this.get("frames",[]);this.Dn=[];this.Cd=[];for(var n=0;n<g.length;n++){var q=c.Zr(g[n]);this.Dn.push(q);q=new e(l.Cl);q.bind(d.ea,this.TP,this);q.bind(d.Bc,this.UP,this);this.Cd.push(q)}for(n=0;n<g.length;n++)this.Cd[n].load(this.Dn[n].get("url"))};a.prototype.TP=function(){var g=this.Cd.filter(function(n){return n.Mh()});
this.ni.set("percent",100*g.length/this.Cd.length);g.length==this.Cd.length&&this.Dd()};a.prototype.UP=function(){};a.prototype.Dd=function(){this.ni.set("visible",!1);var g=this.Dn[0].get("width",this.Cd[0].Fe()),n=this.Dn[0].get("height",this.Cd[0].Ve()),q=this.Cd.map(function(p){return p.Cf()});this.j.eab(q,g,n);this.trigger(new m(d.ea))};a.prototype.lp=function(){this.Cd&&(this.ni.set("visible",!1),this.j.q4a(),this.Cd=this.Cd.forEach(function(g){g.unbind(d.ea,this.TP,this);g.unbind(d.Bc,this.UP,
this);g.cancel()}),this.Dn=this.Cd=null)};return a});define("hd",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("RotationalCameraPosition",d,function(l,m,k){d.call(this);void 0!==l&&this.set("yaw",l);void 0!==m&&this.set("pitch",m);void 0!==k&&this.set("hfov",k)})});define("nc",["require","hd","fq"],function(a){var d=a("hd");return a("fq").define("PanoramaCameraPosition",d,function(){d.apply(this,arguments)})});
define("hL",["require","mz","fq","nc","hd"],function(a){var d=a("mz"),l=a("fq"),m=a("nc"),k=a("hd"),c=l.define("RotationalCamera",d,function(){d.call(this);this.set("initialPosition",new k)});return l.define("PanoramaCamera",c,function(){c.call(this);this.set("initialPosition",new m)})});define("mo",["require","hd","fq"],function(a){var d=a("hd");return a("fq").define("RotationalCameraDisplayPosition",d,function(){d.apply(this,arguments)})});
define("lw",["require","mo","fq"],function(a){var d=a("mo");return a("fq").define("PanoramaCameraDisplayPosition",d,function(){d.apply(this,arguments)})});define("fl",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("PanoramaCameraMovement",d,function(){d.call(this)})});
define("fd",["require","mz","cI","fq","pB"],function(a){var d=a("mz"),l=a("cI"),m=a("fq"),k=a("pB");a=m.define("RotationalCameraSequence",d,function(){d.call(this)});a.prototype.play=a.prototype.play=function(){this.trigger(new l(k.qz))};a.prototype.pause=a.prototype.pause=function(){this.trigger(new l(k.LH))};return a});define("bV",["require","fq","fd"],function(a){var d=a("fq"),l=a("fd");return d.define("PanoramaCameraSequence",l,function(){l.call(this)})});
define("ja",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("PanoramaMapLocation",d,function(){d.call(this)})});define("bq",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("PanoramaModel3DLocation",d,function(){d.call(this)})});define("pT",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("PanoramaOverlay",d,function(){d.call(this)})});
define("nT",["require","lx","hH","a"],function(a){function d(c){this.j=c;this.uq=[];this.Raa=!1;this.wb=this.Ka=0}var l=a("lx"),m=a("hH"),k=a("a");d.prototype.clear=function(){this.stop();this.uq=this.j=null};d.prototype.end=function(c){var h=[],f=[],b=this.Ksa(c);this.uq.forEach(function(e){0>b.indexOf(e)?h.push(e):f.push(e)});h.forEach(function(e){e.bG().Qc(l.U)});this.uq=f;this.Raa=!1};d.prototype.start=function(c){this.end(c);this.uq=this.Ksa(c);this.Raa=0<this.uq.filter(function(h){return h instanceof
m}).length;this.mAa();this.q0(l.PLAYING,!0)};d.prototype.play=function(){this.q0(l.PLAYING)};d.prototype.pause=function(){this.q0(l.Qb)};d.prototype.stop=function(){this.q0(l.U)};d.prototype.Od=function(){this.Ka=this.j.Pc();this.wb=this.j.Oc();this.mAa()};d.prototype.mAa=function(){if(this.Raa){var c=Math.PI/180,h=this.Ka*c,f=this.wb*c,b=new k(Math.sin(h)*Math.cos(f),Math.sin(f),Math.cos(h)*Math.cos(f));this.uq.forEach(function(e){if(e instanceof m){var g=e.get("yaw",h)*c,n=e.get("pitch",f)*c,q=
e.get("maximumAngle",360)*c;g=new k(Math.sin(g)*Math.cos(n),Math.sin(n),Math.cos(g)*Math.cos(n));q=Math.min(1,Math.max(0,1-Math.acos(b.WF(g))/q));e.bG().Ly(q)}}.bind(this))}};d.prototype.Ksa=function(c){return c?c.get("audios",[]):[]};d.prototype.q0=function(c,h){(h?this.uq.slice().reverse():this.uq).forEach(function(f){if(f.get("autoplay",!1)){f=f.bG();var b=f.getState();c==l.PLAYING&&b!=l.PLAYING?f.Qc(l.PLAYING):c==l.Qb&&b==l.PLAYING?f.Qc(l.Qb):c==l.U&&b!=l.U&&f.Qc(l.U)}})};return d});
define("fD",["require"],function(){function a(b){b%=m;0>b&&(b+=m);return h[b*k|0]}function d(b){b%=m;0>b&&(b+=m);return c[b*k|0]}function l(){this.identity()}l.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.Rh=this.Qh=0};l.prototype.clone=function(){var b=new l;b.m11=this.m11;b.m12=this.m12;b.m13=this.m13;b.m21=this.m21;b.m22=this.m22;b.m23=this.m23;b.m31=this.m31;b.m32=this.m32;b.m33=this.m33;b.Qh=this.Qh;b.Rh=
this.Rh;b.tz=this.tz;return b};l.prototype.concat=function(b){var e=this.m11,g=this.m12,n=this.m13,q=this.m21,p=this.m22,r=this.m23,t=this.m31,u=this.m32,v=this.m33,w=this.Qh,x=this.Rh,y=this.tz;this.m11=e*b.m11+g*b.m21+n*b.m31;this.m12=e*b.m12+g*b.m22+n*b.m32;this.m13=e*b.m13+g*b.m23+n*b.m33;this.m21=q*b.m11+p*b.m21+r*b.m31;this.m22=q*b.m12+p*b.m22+r*b.m32;this.m23=q*b.m13+p*b.m23+r*b.m33;this.m31=t*b.m11+u*b.m21+v*b.m31;this.m32=t*b.m12+u*b.m22+v*b.m32;this.m33=t*b.m13+u*b.m23+v*b.m33;this.Qh=w*
b.m11+x*b.m21+y*b.m31+b.Qh;this.Rh=w*b.m12+x*b.m22+y*b.m32+b.Rh;this.tz=w*b.m13+x*b.m23+y*b.m33+b.tz};l.prototype.translate=function(b,e,g){this.Qh+=b;this.Rh+=e;this.tz+=g};l.prototype.scale=function(b,e,g){this.m11*=b;this.m12*=e;this.m13*=g;this.m21*=b;this.m22*=e;this.m23*=g;this.m31*=b;this.m32*=e;this.m33*=g;this.Qh*=b;this.Rh*=e;this.tz*=g};l.prototype.rotateX=function(b){var e=a(b);b=d(b);var g=this.m12*e+this.m13*b,n=this.m22*b-this.m23*e,q=this.m22*e+this.m23*b,p=this.m32*b-this.m33*e,r=
this.m32*e+this.m33*b,t=this.Rh*b-this.tz*e,u=this.Rh*e+this.tz*b;this.m12=this.m12*b-this.m13*e;this.m13=g;this.m22=n;this.m23=q;this.m32=p;this.m33=r;this.Rh=t;this.tz=u};l.prototype.rotateY=function(b){var e=a(b);b=d(b);var g=-this.m11*e+this.m13*b,n=this.m21*b+this.m23*e,q=-this.m21*e+this.m23*b,p=this.m31*b+this.m33*e,r=-this.m31*e+this.m33*b,t=this.Qh*b+this.tz*e,u=-this.Qh*e+this.tz*b;this.m11=this.m11*b+this.m13*e;this.m13=g;this.m21=n;this.m23=q;this.m31=p;this.m33=r;this.Qh=t;this.tz=u};
l.prototype.rotateZ=function(b){var e=a(b);b=d(b);var g=this.m11*e+this.m12*b,n=this.m21*b-this.m22*e,q=this.m21*e+this.m22*b,p=this.m31*b-this.m32*e,r=this.m31*e+this.m32*b,t=this.Qh*b-this.Rh*e,u=this.Qh*e+this.Rh*b;this.m11=this.m11*b-this.m12*e;this.m12=g;this.m21=n;this.m22=q;this.m31=p;this.m32=r;this.Qh=t;this.Rh=u};l.prototype.rotate=function(b,e,g){this.rotateX(b);this.rotateY(e);this.rotateZ(g)};l.prototype.invert=function(){var b=this.V5a();if(0==b)return!1;var e=this.clone();this.m11=
(e.m22*e.m33-e.m23*e.m32)/b;this.m12=(e.m13*e.m32-e.m12*e.m33)/b;this.m13=(e.m12*e.m23-e.m13*e.m22)/b;this.m21=(e.m23*e.m31-e.m21*e.m33)/b;this.m22=(e.m11*e.m33-e.m13*e.m31)/b;this.m23=(e.m13*e.m21-e.m11*e.m23)/b;this.m31=(e.m21*e.m32-e.m22*e.m31)/b;this.m32=(e.m12*e.m31-e.m11*e.m32)/b;this.m33=(e.m11*e.m22-e.m12*e.m21)/b;this.Qh=-(e.Qh*this.m11+e.Rh*this.m21+e.tz*this.m31);this.Rh=-(e.Qh*this.m12+e.Rh*this.m22+e.tz*this.m32);this.tz=-(e.Qh*this.m13+e.Rh*this.m23+e.tz*this.m33);return!0};l.prototype.V5a=
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)};l.prototype.XK=function(b){var e=b.x*this.m12+b.y*this.m22+b.z*this.m32+this.Rh,g=b.x*this.m13+b.y*this.m23+b.z*this.m33+this.tz;b.x=b.x*this.m11+b.y*this.m21+b.z*this.m31+this.Qh;b.y=e;b.z=g};for(var m=2*Math.PI,k=18E4/m,c=new Float32Array(180001),h=new Float32Array(180001),f=0;18E4>f;f++)c[f]=Math.cos(f/k),h[f]=Math.sin(f/k);c[18E4]=c[0];
h[18E4]=h[0];return l});define("dO",["require"],function(){return{av:0,ab:1,ub:2}});
define("ch",["require","fq","mq"],function(a){var d=a("fq"),l=a("mq"),m={get:function(k){return k.SNa||(k.SNa=this.ySa(k))},ySa:function(k){if(d.Ja("CubicPanoramaFrame",k))return k.get("stereoCube")?m.sz:k.get("cube")?m.qv:m.Dl;if(d.Ja("SphericPanoramaFrame",k)){var c=k.get("stereoSphere"),h=k.get("sphere"),f=k.get("hfov");k=k.get("vfov");var b=359.9<f&&179.9<k,e=!1;c&&!h?e=!0:c?h&&!c.get("levels").some(l.mKa)?e=!1:b&&l.c4a()?e=!0:!b&&l.b4a()&&(e=!0):e=!1;return e?(c=c.get("levels"),h=Math.max.apply(Math,
c.map(function(g){return g.get("width")})),1<Math.max.apply(Math,c.map(function(g){return g.get("height")}))/k/(h/f)?m.oq:m.Us):m.gq}},sz:"stereoCube_12_1",qv:"monoCube_6_1",Dl:"monoCube_1_1",gq:"monoSphere_1_1",oq:"stereoSphere_1_2",Us:"stereoSphere_2_1"};return m});
define("nY","require fq mI dO ns ch kU mq w iF mV mN mD oW".split(" "),function(a){function d(K,N,V){return K.split(N).join(V).split(encodeURI(N)).join(V)}function l(K,N){return 0<=K.indexOf(N)||0<=K.indexOf(encodeURI(N))}function m(){var K=D.ly()&&F.mg("recent_ipad_use_max_res",!1);m=function(){return K};return K}function k(K){if(0==K.length)return 1;K.sort(function(N,V){return V.get("width")-N.get("width")});return K[0].get("width")/K[0].get("height")}function c(K,N){var V=1E4;m()||(D.Ef()?V=2048:
D.ly()?V=1280:D.pb()&&(V=1024));switch(K){case z.qv:return[6*V,V];case z.Dl:return[V,V];case z.sz:return[12*V,V]}switch(K){case z.oq:N*=2;break;case z.Us:N*=.5}return 2<N?[4*V,4*V/N]:[2*V*N,2*V]}function h(K){if(m())return[void 0,void 0];switch(K){case z.qv:if(D.Ef()||D.pb())return[18432,1536];break;case z.oq:if(D.Ef())return[5352,5352];if(D.pb())return[6086,6086];break;case z.gq:if(D.Ef())return[7168,3584];if(D.pb()&&D.ly())return[8192,4096]}return[void 0,void 0]}function f(K,N){var V=h(N);N=K.filter(function(W){return v.Ja("TiledImageResourceLevel",
W)?!0:void 0!==V[0]&&W.get("width")>V[0]||void 0!==V[1]&&W.get("height")>V[1]?!1:!0});0==N.length&&(N=[e(K)[0]]);return N}function b(){return D.ly()?[w.goa]:D.I3()||D.J3()?D.jc()==D.Gs||D.jc()==D.Zy?[w.cW,w.M7]:[w.M7,w.cW]:D.Ef()?[w.cW]:D.pb()?[w.bW]:[]}function e(K){K.sort(function(N,V){return N.get("width")-V.get("width")});return K}function g(K,N){function V(W){return Math.abs(W.get("width")*W.get("height")-N[0]*N[1])}K.sort(function(W,aa){return V(W)-V(aa)});return K.length&&K[0]||null}function n(K,
N,V){K=K.filter(function(W){return 0>W.get("tags").indexOf(N)});return K.length?K:void 0!==V?V:[]}function q(K,N,V){K=K.filter(function(W){return 0<=W.get("tags").indexOf(N)});return K.length?K:void 0!==V?V:[]}function p(K,N,V){switch(V){case z.sz:case z.qv:case z.Dl:return K;case z.gq:case z.Us:return K*N.get("hfov",180)/90;case z.oq:return K*N.get("hfov",180)*2/90}}function r(K,N){switch(N){case z.sz:return K.get("stereoCube").get("levels");case z.qv:return K.get("cube").get("levels");case z.Dl:return K.get("front").get("levels");
case z.gq:return K.get("sphere").get("levels");case z.oq:case z.Us:return K.get("stereoSphere").get("levels")}}function t(K,N){var V=r(K,N),W=K.get("minFaceSize");if(W){var aa=p(W,K,N);K=V.filter(function(ca){return ca.get("height")>=aa});0<K.length&&(V=K)}return V}function u(K){for(var N=[],V=0;V<K.length;V++){var W=K[V];0>N.indexOf(W)&&N.push(W)}return N}var v=a("fq"),w=a("mI"),x=a("dO"),y=a("ns"),z=a("ch"),B=a("kU");a("mq");var D=a("w");a("iF");var F=a("mV"),A=a("mN"),E=a("mD"),J=a("oW"),C={XDa:function(K){K=
K.get("frames");if(0==K.length)return 1;var N=K[0];K=z.get(N)==z.gq&&N.Hm()?(K=J.mk(N.get("sphere")))?[K]:[]:z.get(N)!=z.oq&&z.get(N)!=z.Us||!N.Hm()?C.Sia(N,!1):(K=J.mk(N.get("stereoSphere")))?[K]:[];return Math.max.apply(Math,K.map(function(V){return C.y6a(N,V)}).concat([1]))},y6a:function(K,N){N=C.Lia(K,N,y.FRONT);N=N.get("width");var V=K.xB().get("hfov",360);switch(z.get(K)){case z.sz:return N/1080;case z.qv:return N/540;case z.Dl:return N/90;case z.gq:return N/V;case z.oq:return N/V;case z.Us:return N/
(2*V)}},lja:function(K,N){K=C.Zn(K,N);return 6>=K.length&&K.every(function(V){return E.H5(V)})},Bka:function(K,N){return C.Zn(K,N).every(function(V){return E.H5(V)})},Zn:function(K,N,V){if(!K)return[];V||(V=!1);if(v.Ja("Panorama",K))return V=K.get("flipImageHorizontally",!1),u([].concat(Array.prototype.concat.apply([],K.get("frames").map(function(Q){return C.Zn(Q,N,V)})),Array.prototype.concat.apply([],K.get("overlays").map(function(Q){return C.Zn(Q,N,V)}))));if(v.Ja("PanoramaFrame",K)){var W=Array.prototype.concat.apply([],
K.get("overlays").map(function(Q){return C.Zn(Q,N,V)}));if(z.get(K)==z.gq&&K.Hm())return C.Zn(J.mk(K.get("sphere")),N).concat(W);if((z.get(K)==z.oq||z.get(K)==z.Us)&&K.Hm())return C.Zn(J.mk(K.get("stereoSphere")),N).concat(W);var aa=C.Sia(K,N)[0];V=K.get("flipImageHorizontally",!1);if(z.get(K)==z.Dl){var ca=[y.FRONT,y.ab,y.BACK,y.ub,y.Hc,y.Ac];return Array.prototype.concat.apply([],ca.map(function(Q){return(Q=C.Lia(K,aa,Q))?C.Zn(Q,N,V):[]})).concat(W)}return C.Zn(aa,N,V).concat(W)}if(v.Ja("Video360ResourceLevel",
K))return(W=K.get("posterURL"))?[W]:[];if(v.Ja("HotspotPanoramaOverlay",K))return K.get("projected")?Array.prototype.concat.apply([],K.get("items").map(function(Q){return C.Zn(Q,N,V)})):[];if(v.Ja("FlatHotspotPanoramaOverlayImage",K)||v.Ja("HotspotPanoramaOverlayImage",K))return W=K.get("image").get("levels"),aa=W[0],C.Zn(aa,N,V),Array.prototype.concat.apply([],W.map(function(Q){return C.Zn(Q,N,V)}));if(v.Ja("TiledImageResourceLevel",K)){var ea=[];W=Math.round(K.get("width")/K.get("height"));if(1==
W)var I=z.Dl;else if(12==W)I=z.Cdb;else if(6==W)I=z.qv;else return[];var P=12==W?[x.ub,x.ab]:[x.av];ca=[y.ub,y.ab,y.Hc,y.Ac,y.FRONT,y.BACK];var R=K.get("colCount",W)/W,M=K.get("rowCount",1);P.forEach(function(Q){ca.forEach(function(Y){for(var ba=0;ba<M;ba++)for(var da=0;da<R;da++)ea.push(C.mEa(K,I,Q,Y,V,M,ba,da))})});return ea}return v.Ja("ImageResourceLevel",K)?[K.get("url")]:[]},Sia:function(K,N){var V=z.get(K),W=this.pTa(K);if(W)return N&&!this.wta(W)&&(K=this.Rsa(K),K!=W)?[K,W]:[W];W=q(t(K,V),
w.N7);if(0<W.length)return e(W);W=this.eUa(K);return N&&!this.wta(W)&&(K=this.Rsa(K),K!=W)?[K,W]:[W]},U7a:function(K){return 0<=K.get("tags").indexOf(w.N7)},Lia:function(K,N,V){if(z.get(K)!=z.Dl)return N;switch(V){case y.FRONT:var W=K.get("front");break;case y.ab:W=K.get("left");break;case y.BACK:W=K.get("back");break;case y.ub:W=K.get("right");break;case y.Hc:W=K.get("top");break;case y.Ac:W=K.get("bottom")}K=W&&W.get("levels")||[];if(0==K.length)return null;K=K.filter(function(aa){return aa.get("width")==
N.get("width")&&aa.get("height")==N.get("height")&&aa.get("grayscale",!1)==N.get("grayscale",!1)&&aa.get("colCount",1)==N.get("colCount",1)&&aa.get("rowCount",1)==N.get("rowCount",1)});return K[0]},mEa:function(K,N,V,W,aa,ca,ea,I){K=K.get("url");var P=0;l(K,"{eye}")?K=d(K,"{eye}",X[V]):P+=6*(aa?S:T)[V];l(K,"{face}")?K=d(K,"{face}",U[W]):N!=z.Dl&&(P+=L[W]);K=d(K,"{row}",ea);return K=d(K,"{column}",I+P*ca)},A6a:function(K,N){return C.BO(C.ZD(K.get("image")),90,90,A.Uh,N)},S5a:function(K,N){return C.BO(C.ZD(K.get("image")),
K.get("hfov"),K.get("vfov"),K.get("scaleMode"),N)},j6a:function(K,N){return C.BO(C.ZD(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),N)},O6a:function(K,N){return C.BO(C.ZD(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),N)},KDa:function(K,N){return C.BO(C.ZD(K.get("image")),K.get("hfov"),K.get("vfov"),K.get("scaleMode"),N)},ZD:function(K){return K&&K.get("levels")||[]},BO:function(K,N,V,W,aa){if(!K||!K.length)return null;K=n(K,w.Xs,K);for(var ca=b(),ea=0;ea<ca.length;ea++)K=
q(K,ca[ea],K);ca=1E4;m()||(D.Ef()?ca=2048:D.ly()?ca=1280:D.pb()&&(ca=1024));ea=e(K)[K.length-1];N=B.Wia(N,V,ea.get("width"),ea.get("height"),W,aa);return g(K,[N.We*ca/90,N.Cs*ca/90])},c6a:function(K){var N=C.ZD(K.get("image"));if(!N||!N.length)return null;N=n(N,w.Xs,N);for(var V=b(),W=0;W<V.length;W++)N=q(N,V[W],N);V=e(N)[N.length-1];K=B.e3(K.get("width"),K.get("height"),V.get("width"),V.get("height"),K.get("scaleMode"));return g(N,[K.width,K.height])},D6a:function(K){var N=C.ZD(K.get("image"));if(!N||
!N.length)return null;N=n(N,w.Xs,N);for(var V=b(),W=0;W<V.length;W++)N=q(N,V[W],N);V=1E4;m()||(D.Ef()?V=2048:D.ly()?V=1280:D.pb()&&(V=1024));var aa=W=20;(K=K.get("vertices"))&&4==K.length&&(W=K[0].get("yaw"),aa=K[1].get("yaw"),aa<W&&(aa+=360),W=aa-W,aa=K[0].get("pitch"),K=K[3].get("pitch"),aa-=K);return g(N,[W*V/90,aa*V/90])},Rsa:function(K){var N=z.get(K);K=t(K,N);K=f(K,N);K=q(K,w.Xs,K);N=b();for(var V=0;V<N.length;V++)K=q(K,N[V],K);return g(K,[0,0])},eUa:function(K){var N=z.get(K);K=t(K,N);K=f(K,
N);K=n(K,w.Xs,K);for(var V=b(),W=0;W<V.length;W++)K=q(K,V[W],K);N=c(N,k(K));return g(K,N)},pTa:function(K){var N=b();if(0==N.length)return null;var V=z.get(K),W=t(K,V);W=f(W,V);W=n(W,w.Xs,W);K=[];for(var aa=0;aa<N.length&&0==K.length;aa++)K=q(W,N[aa]);if(0==K.length)return null;N=c(V,k(K));return g(K,N)},wta:function(K){return 0<=K.get("tags").indexOf(w.N7)?!1:D.jc()==D.$y?!0:E.H5(K.get("url"))}},L=function(){var K={};K[y.ub]=0;K[y.ab]=1;K[y.Hc]=2;K[y.Ac]=3;K[y.FRONT]=4;K[y.BACK]=5;return K}(),T=
function(){var K={};K[x.ub]=0;K[x.ab]=1;K[x.av]=0;return K}(),S=function(){var K={};K[x.ub]=1;K[x.ab]=0;K[x.av]=0;return K}(),U=function(){var K={};K[y.ub]="r";K[y.ab]="l";K[y.Hc]="u";K[y.Ac]="d";K[y.FRONT]="f";K[y.BACK]="b";return K}(),X=function(){var K={};K[x.ab]="l";K[x.ub]="r";K[x.av]="b";return K}();return C});
define("iV","require er pB lz fD a nY".split(" "),function(a){function d(q){this.j=q;this.Ba=!1;this.Qn=d.dD;this.$$=this.hE=!1;this.tf(null);this.j.bind(m.tc,this.Dc,this,!0);this.Dc()}var l=a("er"),m=a("pB"),k=a("lz"),c=a("fD"),h=a("a"),f=a("nY");d.prototype.HEa=function(){return this.Qn!==d.dD};d.prototype.GEa=function(){return this.Qn&d.UH?!0:!1};d.prototype.IEa=function(){return this.Qn&d.VH?!0:!1};d.prototype.JEa=function(){return this.Qn&d.gD?!0:!1};d.prototype.FEa=function(){return this.Qn&
d.cD?!0:!1};d.prototype.Gy=function(q){this.hE=q};d.prototype.Pc=function(){this.Wn();return this.Ka};d.prototype.Oc=function(){this.Wn();return this.wb};d.prototype.fg=function(){this.Wn();return this.vd};d.prototype.ey=function(){this.Wn();return this.Xa};d.prototype.tf=function(q){q?(this.Bda=q.get("hfov",360),this.p_=q.get("vfov",180),this.sQ=q.get("pitch",0),this.NE=q.get("partial",!1),this.Uaa=q.LEa(),this.Paa=q.BEa(),this.Zaa=Math.min(q.get("hfovMax",170),170),this.JO=q.get("hfovMin"),this.sca=
f.XDa(q)):(this.Bda=360,this.p_=180,this.sQ=0,this.Paa=this.Uaa=this.NE=!1,this.Zaa=120,this.sca=this.JO=1);this.Ka=0;this.wb=this.sQ;this.vd=0;this.Ba=!0};d.prototype.setPosition=function(q,p,r,t,u){this.Ka=q;this.wb=p;this.vd=r;this.Xa=t;this.$$=u;this.Ba=!0};d.prototype.Dc=function(){var q=this.j.Wa(),p=this.j.Ab();if(this.sa!=q||this.wa!=p)this.sa=q,this.wa=p,this.Ba=!0};d.prototype.Wn=function(){if(this.Ba){this.Ba=!1;var q=this.Ka*g,p=this.wb*g,r=this.Xa*g,t=(this.$$?k.Sp(this.Zaa,this.sa,this.wa):
this.Zaa)*g;a:{var u=this.JO;if(l(u).isString()&&(u=u.match(/^\s*([+-]?\d+\.?\d*)\s*%\s*$/))&&2<=u.length){u=parseFloat(u[1]);break a}u=void 0}u=void 0!==u?2*Math.atan2(this.sa*this.j.getPixelRatio()*.5,45*this.sca*u/100):this.JO?(this.$$?k.Sp(this.JO,this.sa,this.wa):this.JO)*g:2*Math.atan2(this.sa*this.j.getPixelRatio()*.5,45*this.sca);u=Math.min(t,u);if(this.hE){var v=360;var w=180;var x=0}else if(this.Uaa||this.Paa){v=this.Paa?90:this.sQ+.5*this.p_;var y=this.Uaa?-90:this.sQ-.5*this.p_;w=v-y;
x=.5*(v+y);v=this.Bda}else v=this.Bda,x=this.sQ,w=this.p_;v*=g;w*=g;x*=g;for(y=this.sa/this.wa;q<-b;)q+=2*b;for(;q>b;)q-=2*b;r=Math.max(Math.min(r,t),u);t=d.dD;if(!this.hE){p>e?t|=d.gD:p<-e&&(t|=d.cD);p=Math.max(Math.min(p,.5*b),.5*-b);var z=2*Math.atan(Math.tan(.5*r)/y);if(z>=w)r=2*Math.atan(Math.tan(.5*w)*y),p=x,t=t|d.gD|d.cD;else{var B=Math.min(.5*w+x,.5*b);w=Math.max(.5*-w+x,.5*-b);x=!this.NE&&B>=.495*b?.5*b:B-.5*z;w=!this.NE&&w<=.495*-b?.5*-b:w+.5*z;p>x?(p=x,t|=d.gD):p<w&&(p=w,t|=d.cD)}this.NE&&
(w=Math.tan(.5*r),y=w/y,y=new h(-w,0<p?y:-y,1),w=new c,w.rotateX(-p),y.apply(w),y=2*y.Pc(),0>y&&(y+=2*b),w=Math.max(0,.5*v-.5*y-.25*g),z=Math.min(0,.5*-v+.5*y+.25*g),y>v?(q=0,r=Math.max(u,r*v/y),t=t|d.UH|d.VH):q>w?(q=w,t|=d.VH):q<z&&(q=z,t|=d.UH))}this.Ka=q*n;this.wb=p*n;this.Xa=r*n;this.Qn=t}};var b=Math.PI,e=.5*Math.PI,g=Math.PI/180,n=180/Math.PI;d.dD=0;d.UH=1;d.VH=2;d.gD=4;d.cD=8;return d});
define("bj",["require","lV","pB","gF","pS"],function(a){var d=a("lV"),l=a("pB"),m=a("gF"),k=a("pS"),c=d.extend(m,function(){m.call(this);this.UO=!1;this.fp=void 0;this.Xa=90;this.P$=.1;this.Kb=this.ib=null});c.prototype.setCamera=function(h){this.Kb&&this.Kb.unbind(l.G("hoverFactor"),this.qga,this);if(this.Kb=h)this.Kb.bind(l.G("hoverFactor"),this.qga,this),this.qga()};c.prototype.qga=function(){this.P$=this.Kb.get("hoverFactor")};c.prototype.UG=function(h){this.Xa=h};c.prototype.vs=function(h){this.Cm();
h&&(this.ib=h,this.fp=void 0,this.ib.bind(l.Pb,this.ak,this,!0))};c.prototype.Cm=function(){null!=this.ib&&(this.ib.unbind(l.Pb,this.ak,this),this.ib=null)};c.prototype.ak=function(h){this.GK(h)};c.prototype.GK=function(h){this.fp&&this.Iga.call(this,+(Math.min(Math.max((h.x-this.fp.x)/this.ib.Wa(),-1),1)*this.Xa*this.P$),-(Math.min(Math.max((h.y-this.fp.y)/this.ib.Wa(),-1),1)*this.Xa*this.P$));this.fp=h};c.prototype.Iga=function(h,f){if(0!=h||0!=f){var b=new k(c.lv);b.NM=h;b.eM=f;this.trigger(b)}};
c.lv="rotation change";return c});
define("hE","require er lV cI gF dI bj".split(" "),function(a){a("er");var d=a("lV"),l=a("cI"),m=a("gF"),k=a("dI"),c=a("bj"),h=d.extend(m,function(f,b,e){m.call(this);this.j=f;this.Yc=this.j.Yc;this.pa=b;this.pc=e;this.QA=this.oW=this.V=!1;this.oc=new k;this.yj=null;this.vd=this.wb=this.Ka=0;this.Xa=90;this.vb=new c;this.vb.bind(c.lv,this.XP,this,!0)});h.prototype.clear=function(){this.vb.unbind(c.lv,this.XP,this,!0);this.vb.Cm();this.vb=null;this.DD();this.j=this.Yc=this.pc=this.pa=this.oc=null};
h.prototype.setCamera=function(f){this.oc.reset();this.vb.setCamera(f)};h.prototype.setPosition=function(f,b,e,g){if(this.Ka!=f||this.wb!=b||this.vd!=e||this.Xa!=g)this.Ka=f,this.wb=b,this.vd=e,this.Xa=g,this.vb.UG(this.Xa),this.Sea(!1),this.xR()};h.prototype.rf=function(){return this.oW&&this.QA?!0:!1};h.prototype.Fb=function(f){this.dS=!1;this.oc.Fb(f);this.QA=!1;f=this.Ka+this.oc.Tz;var b=this.wb+this.oc.zI;this.pc.Lp(this.Xa);this.pa.setPosition(f,b,this.vd,this.pc.Ee(),this.pc.tu());this.Ka=
this.pa.Pc();this.wb=this.pa.Oc();this.vd=this.pa.fg();this.Xa=this.pa.ey()};h.prototype.Xr=function(){return this.Ka};h.prototype.Wr=function(){return this.wb};h.prototype.vB=function(){return this.vd};h.prototype.dG=function(){return this.Xa};h.prototype.sb=function(f){this.V!=f&&((this.V=f)?this.xR():(this.DD(),this.Sea(!1)))};h.prototype.XP=function(f){this.Zc(f.Uy,f.wy,0,0,f.NM,f.eM,0,0,!1,!1,!0,!0)};h.prototype.Zc=function(f,b,e,g,n,q,p,r,t,u,v,w){var x=this.oc.Dla(f,b,e,n,q,p,u,v,w)||x;x&&
this.pi()};h.prototype.pi=function(){this.QA=!0;this.trigger(new l(h.Th))};h.prototype.xR=function(){this.DD();this.yj=setTimeout(this.jQ.bind(this),30)};h.prototype.DD=function(){this.yj&&(clearTimeout(this.yj),this.yj=null)};h.prototype.jQ=function(){this.Sea(this.V)};h.prototype.Sea=function(f){this.oW!=f&&((this.oW=f)?(this.oc.reset(),this.vb.vs(this.j.getParent()),this.pi()):this.vb.Cm())};h.Th="position change request";return h});
define("ia","require lV pB cI gF w ij".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cI"),k=a("gF");a("w");var c=a("ij");a=d.extend(k,function(){k.call(this);this.fBa=this.V=!1;this.vd=this.wb=this.Ka=0;this.a0=!1;this.kr=this.gu=0});a.prototype.sb=function(h){if(this.V!=h)if(this.V=h){c.bind(this.JP,this,!0);h=c.$r();var f=h.pitch;this.gu=this.Ka-h.yaw;this.kr=this.wb-f;this.sp()}else c.unbind(this.JP,this,!0)};a.prototype.setPosition=function(h,f,b){this.Ka!=h&&(this.gu=this.dF(this.gu+(h-
this.dF(this.Ka,h)),0),this.Ka=h);this.wb!=f&&(this.kr+=f-this.wb,this.wb=f);this.vd=b};a.prototype.Xr=function(){return this.Ka};a.prototype.Wr=function(){return this.wb};a.prototype.vB=function(){return this.vd};a.prototype.rf=function(){return c.i9a()};a.prototype.Fb=function(h){var f=c.$r(),b=f.roll;h=20*h/1E3;var e=f.pitch+(this.fBa?this.kr:0);this.Ka=this.tg(this.Ka,this.dF(this.dF(f.yaw,this.Ka)+this.gu,this.Ka),h);this.wb=this.tg(this.wb,e,h);this.vd=this.tg(this.vd,b,h)};a.prototype.ubb=
function(h){this.fBa=h};a.prototype.tg=function(h,f,b){h=(f-h)*(1-b);.01>Math.abs(h)&&(h=0);return f-h};a.prototype.dF=function(h,f){for(;h+180<f;)h+=360;for(;h-180>f;)h-=360;return h};a.prototype.JP=function(){this.V&&this.sp()};a.prototype.sp=function(){this.trigger(new m(l.ba))};return a});define("ev",["require"],function(){return{HH:"left",IH:"right",GH:"down",JH:"up",boa:"rotate10x",xoa:"zoom2x",PLAYING:"playing",Ev:"zoomIn",Fv:"zoomOut",Yf:"stop"}});
define("fK","require lV bt cI gF ev jv".split(" "),function(a){var d=a("lV"),l=a("bt"),m=a("cI"),k=a("gF"),c=a("ev"),h=a("jv"),f=d.extend(k,function(e){k.call(this);this.j=e;this.V=!1;this.Nf={};this.sR=null;this.xj=this.rR=!1;this.IY=this.IY.bind(this);this.Yl=this.Yl.bind(this);this.Yc=this.j.Yc;document.addEventListener("keydown",this.IY);document.addEventListener("keyup",this.Yl)});f.prototype.clear=function(){this.V=!1;this.Yc=this.j=null;document.removeEventListener("keydown",this.IY);document.removeEventListener("keyup",
this.Yl)};f.prototype.sb=function(e){this.V!=e&&(this.V=e)&&this.s1()};var b=[l.gj,l.Sh,l.ab,l.ub,l.mo,l.Zm,l.Xm,l.so,l.VV,l.RV];f.prototype.IY=function(e){if(!h.ao()){var g=e.which,n=!1;!this.Nf[g]&&0<=b.indexOf(g)&&(this.sR||this.rR||(this.sR=setTimeout(this.AXa.bind(this),100)),n=this.Nf[g]=!0);this.xj!=e.shiftKey&&(this.xj=e.shiftKey,n=!0);n&&this.s1()}};f.prototype.AXa=function(){this.rR=!0;this.s1()};f.prototype.Yl=function(e){if(!h.ao()){var g=e.which,n=!1;if(g in this.Nf){delete this.Nf[g];
n=!1;for(g in this.Nf)this.Nf[g]&&(n=!0);n||(this.sR&&clearTimeout(this.sR),this.sR=null,this.rR=!1);n=!0}this.xj!=e.shiftKey&&(this.xj=e.shiftKey,n=!0);n&&this.s1()}};f.prototype.s1=function(){if(this.V){var e=this.Yc.get("gazeModeEnabled"),g=this.Yc.get("arrowKeysAction");if(e||"none"!=g){e=e||"rotate"==g;g=[];this.Nf[l.VV]?g.push(c.Ev):this.Nf[l.RV]&&g.push(c.Fv);this.rR&&(this.Nf[l.VV]||this.Nf[l.RV])&&g.push(c.xoa);this.Nf[l.ab]||this.Nf[l.mo]?g.push(c.HH):(this.Nf[l.ub]||this.Nf[l.so])&&g.push(c.IH);
if(e||this.xj)this.Nf[l.gj]||this.Nf[l.Zm]?g.push(c.JH):(this.Nf[l.Sh]||this.Nf[l.Xm])&&g.push(c.GH);this.rR&&(this.Nf[l.ab]||this.Nf[l.ub]||this.Nf[l.gj]||this.Nf[l.Sh]||this.Nf[l.mo]||this.Nf[l.so]||this.Nf[l.Zm]||this.Nf[l.Xm])&&g.push(c.boa);0==g.length&&g.push(c.Yf);this.trigger(new m(f.R6,{ZFa:g}))}}};f.R6="movementsChange";return f});
define("nu",["require"],function(){function a(){this.iD=!0;this.reset()}function d(l,m,k){l=(m-l)*(1-k);.01>Math.abs(l)&&(l=0);return m-l}a.prototype.reset=function(){this.iD&&(this.iD=!1,this.Z0=this.$0=this.Dx=this.Tn=this.AI=this.DI=this.BI=this.Vz=void 0)};a.prototype.moveTo=function(l,m,k,c,h){this.Tn=l;this.Dx=m;this.$0=k;this.Z0=c;this.pba=h;this.iD=!0};a.prototype.setPosition=function(l,m,k,c){this.Vz=l;this.BI=m;this.DI=k;this.AI=c};a.prototype.Xr=function(){return this.Vz};a.prototype.Wr=
function(){return this.BI};a.prototype.vB=function(){return this.DI};a.prototype.dG=function(){return this.AI};a.prototype.rf=function(){return this.iD};a.prototype.Fb=function(){if(this.iD)if(this.pba)this.Vz=this.Tn,this.BI=this.Dx,this.DI=this.$0,this.AI=this.Z0,this.iD=!1;else{for(var l=this.Vz,m=this.Tn-180,k=this.Tn+180;l<m;)l+=k-m;for(;l>k;)l-=k-m;this.Vz=l;this.Vz=d(this.Vz,this.Tn,.5);this.BI=d(this.BI,this.Dx,.5);this.DI=d(this.DI,this.$0,.5);this.AI=d(this.AI,this.Z0,.5);this.Vz==this.Tn&&
this.BI==this.Dx&&this.DI==this.$0&&this.AI==this.Z0&&(this.iD=!1)}};return a});
define("cE",["require","ok","mV","kQ"],function(a){function d(f){this.j=f;this.V=!1;this.vd=this.wb=this.Ka=0;this.gY=void 0}var l=a("ok"),m=a("mV"),k=a("kQ");d.prototype.sb=function(f){this.V!=f&&(this.V=f,this.gY=void 0)};d.prototype.setPosition=function(f,b,e){if(this.V&&void 0!==this.gY){for(var g=f-this.gY;180<g;)g-=360;for(;-180>g;)g+=360;(-1E-4>g||1E-4<g)&&k.qM(f)}this.Ka=f;this.wb=b;this.vd=e};d.prototype.Xr=function(){return this.Ka};d.prototype.Wr=function(){return this.wb};d.prototype.vB=
function(){return this.vd};d.prototype.rf=function(){return!0};d.prototype.Fb=function(){if(k.nh&&!this.j.Y_){k.qM();var f=l.L5(k.dg,!0);this.gY=this.Ka=f.Ra;this.wb=f.pitch;this.vd=f.Fg;this.wb=void 0===h?f.pitch:h;this.vd=void 0===c?f.Fg:c;k.setScale(1)}};var c=m.Fj("debug")?m.f3("force_vr_roll"):void 0,h=m.Fj("debug")?m.f3("force_vr_pitch"):void 0;return d});
define("g","require er lV pB cI gF pR ia fK dI fF nu cE ev ok kQ bi".split(" "),function(a){var d=a("er"),l=a("lV"),m=a("pB"),k=a("cI"),c=a("gF"),h=a("pR"),f=a("ia"),b=a("fK"),e=a("dI"),g=a("fF"),n=a("nu"),q=a("cE"),p=a("ev");a("ok");var r=a("kQ"),t=a("bi"),u=l.extend(c,function(v,w,x){c.call(this);this.j=v;this.Yc=this.j.Yc;this.pa=w;this.pc=x;this.QA=this.hA=this.FO=this.R_=this.V=!1;this.oc=new e;this.wr=new n;this.vd=this.wb=this.Ka=0;this.Xa=90;this.nF=1;this.ci=void 0;this.N8=this.AN=5;this.dS=
!1;this.vb=new g;this.vb.bind(g.lv,this.XP,this,!0);this.vb.bind(g.aq,this.BA,this,!0);this.vb.bind(g.fj,this.fr,this,!0);this.vb.bind(g.ej,this.er,this,!0);this.Tl=new f;this.Tl.bind(m.ba,this.ova,this);this.gA=!1;this.An=new b(this.j);this.An.bind(b.R6,this.yva,this,!0);this.fu=new q(this.j);r.N.bind(m.ba,this.Vo,this,!0);this.Vo()});u.prototype.clear=function(){this.vb.unbind(g.lv,this.XP,this,!0);this.vb.unbind(g.aq,this.BA,this,!0);this.vb.unbind(g.fj,this.fr,this,!0);this.vb.unbind(g.ej,this.er,
this,!0);this.vb.Cm();this.vb=null;this.Tl.unbind(m.ba,this.ova,this);this.Tl=null;this.An.unbind(b.R6,this.yva,this,!0);this.An.clear();this.An=null;r.N.unbind(m.ba,this.Vo,this,!0);this.pc=this.pa=this.oc=null;this.bX();this.j=this.Yc=null};u.prototype.setCamera=function(v){this.oc.reset();this.wr.reset();this.vb.setCamera(v);this.AN=v.get("automaticRotationSpeed");this.N8=v.get("automaticZoomSpeed")};u.prototype.rk=function(v){function w(D){return d(v).contains(D)}d.isArray(v)||(v=[v]);var x=0,
y=0,z=0,B=!1;w(p.Yf)||(w(p.HH)?x=-this.AN:w(p.IH)&&(x=+this.AN),w(p.GH)?y=-this.AN:w(p.JH)&&(y=+this.AN),w(p.Ev)?z=-this.N8:w(p.Fv)&&(z=+this.N8),w(p.PLAYING)&&(B=!0),w(p.xoa)&&(z*=2),w(p.boa)&&(x*=10,y*=10),x*=this.nF,y*=this.nF);this.Zc(x,y,0,z,0,0,0,0,B,!0,!0,!0)};u.prototype.setPosition=function(v,w,x,y){this.Ka=v;this.wb=w;this.vd=x;this.Xa=y;this.nF=this.Xa/90;this.Tl.setPosition(this.Ka,this.wb,this.vd);this.fu.setPosition(this.Ka,this.wb,this.vd);this.vb.UG(this.Xa);this.wr.setPosition(this.Ka,
this.wb,this.vd,this.Xa)};u.prototype.moveTo=function(v,w,x,y,z){this.wr.moveTo(v,w,x,this.pc.vDa(y),z);this.R_=!1;this.oc.reset();this.pi()};u.prototype.Ela=function(v,w,x){this.Zc(0,0,0,0,v,w,x,0,!1,!1,!1)};u.prototype.rf=function(){return this.V&&(this.QA||this.V5())?!0:!1};u.prototype.u4a=function(){this.QA=this.dS=!1};u.prototype.V5=function(){return this.V?this.dS?!0:this.fu.V?this.fu.rf()||this.oc.rf():this.Tl.V?this.gA?!0:this.Tl.rf()||this.oc.rf():this.oc.rf()||this.wr.rf():!1};u.prototype.Fb=
function(v){this.dS=!1;this.oc.Fb(v);this.QA=!1;var w=this.Xa;if(this.fu.V){this.fu.Fb(v);v=this.fu.Xr()+this.oc.Tz+this.CUa();var x=this.fu.Wr();var y=this.fu.vB()}else this.wr.rf()?(this.wr.Fb(v),v=this.wr.Xr(),x=this.wr.Wr(),y=this.wr.vB(),w=this.wr.dG()):(this.Tl.V?(this.gA=!1,this.Tl.Fb(v),v=this.Tl.Xr()+this.oc.Tz,x=this.Tl.Wr(),this.FO&&(x+=this.oc.zI),y=this.Tl.vB()):(v=this.Ka+this.oc.Tz,x=this.wb+this.oc.zI,y=0),w+=this.oc.Xqa);this.pc.Lp(w);this.pa.setPosition(v,x,y,this.pc.Ee(),this.pc.tu());
this.Ka=this.pa.Pc();this.wb=this.pa.Oc();this.vd=this.pa.fg();this.Xa=this.pa.ey();if(this.R_&&this.pa.HEa()){w=this.oc.nS;if(this.pa.GEa()||this.pa.IEa())w=-w;v=this.oc.wQ;if(this.pa.JEa()||this.pa.FEa())v=-v;this.Zc(w,v,0,0,0,0,0,0,!0,!1,!1,!0)}};u.prototype.Xr=function(){return this.Ka};u.prototype.Wr=function(){return this.wb};u.prototype.vB=function(){return this.vd};u.prototype.dG=function(){return this.Xa};u.prototype.sb=function(v){this.V!=v&&((this.V=v)?(this.$A(this.vb.zE==h.gv?t.hz:void 0),
this.vb.vs(this.j.getParent()),this.pi()):(this.bX(),this.vb.Cm()),this.Bga())};u.prototype.DU=function(v){this.hA!=v&&(this.hA=v,this.Bga(),this.gA=!0)};u.prototype.bC=function(v){this.An.sb(v)};u.prototype.Bga=function(){var v=this.j.ds();this.Tl.sb(this.V&&this.hA&&!v);this.fu.sb(this.V&&v)};u.prototype.ova=function(){this.pi()};u.prototype.EU=function(v){this.FO=v;this.Tl.ubb(this.FO)};u.prototype.cC=function(v){this.vb.cC(v);this.$A(this.vb.zE==h.gv?t.hz:void 0)};u.prototype.$G=function(v){this.vb.$G(v)};
u.prototype.Vo=function(){this.V&&(this.j.ds()&&r.qM(this.Ka),this.Bga(),this.pi())};u.prototype.XP=function(v){var w=!this.fu.V&&(!this.Tl.V||this.FO);if(this.vb.zE==h.xC){var x=void 0;if(0!=v.Uy||0!=v.wy){var y=25<Math.sqrt(v.wy*v.wy+v.Uy*v.Uy),z=180*Math.atan2(v.wy,v.Uy)/Math.PI;-22.5<=z&&22.5>z?x=y?t.wna:t.vna:22.5<=z&&67.5>z?x=y?t.yna:t.Fna:67.5<=z&&112.5>z?x=y?t.xna:t.Ena:112.5<=z&&157.5>z?x=y?t.zna:t.Gna:157.5<=z||-157.5>z?x=y?t.Dna:t.Kna:-157.5<=z&&-112.5>z?x=y?t.Cna:t.Jna:-112.5<=z&&-67.5>
z?x=y?t.Ana:t.Hna:-67.5<=z&&-22.5>z&&(x=y?t.Bna:t.Ina)}this.$A(x);this.Zc(v.Uy,v.wy,0,0,v.NM,v.eM,0,0,!1,!1,!1,w)}else this.Zc(v.Uy,v.wy,0,0,v.NM,v.eM,0,0,!1,!1,w,w)};u.prototype.BA=function(v){this.Zc(0,0,0,v.q7a,0,0,0,v.fja,!1,!0,!1,!0)};u.prototype.Zc=function(v,w,x,y,z,B,D,F,A,E,J,C){var L=!1;this.Yc.get("rotationEnabled")&&(L=this.oc.Dla(v,w,x,z,B,D,E,J,C)||L);this.Yc.get("zoomEnabled")&&(L=this.oc.xbb(y,F)||L);L&&(this.wr.reset(),this.R_=A,this.pi())};u.prototype.CUa=function(){if(!this.j.ds())return 0;
this.M_=this.M_||0;for(var v=0,w=0;w<r.og.length&&0==v;w++)v=r.og[w].Xb.x;w=this.j.M.get("vrThumbstickRotationStep");w=0<v&&0>=this.M_?w:0>v&&0<=this.M_?-w:0;this.M_=v;return w};u.prototype.pi=function(){this.QA=!0;this.trigger(new k(u.Th))};u.prototype.fr=function(){this.dS=!0;this.trigger(new k(u.fj));this.vb.zE==h.gv&&this.$A(t.Wh)};u.prototype.er=function(){this.trigger(new k(u.ej));this.vb.zE==h.gv&&this.$A(t.hz)};u.prototype.yva=function(v){this.rk(v.data.ZFa);0>v.data.ZFa.indexOf(p.Yf)&&this.j.Db().trigger(new k(m.bD,
{AM:v}))};u.prototype.$A=function(v){this.ci!=v&&this.V&&(this.ci&&this.j.iM(this.ci),(this.ci=v)&&this.j.Q4(this.ci))};u.prototype.bX=function(){this.ci&&(this.j.iM(this.ci),this.ci=void 0)};u.Th="position change request";u.fj="user interaction start";u.ej="user interaction end";return u});define("nC",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("TargetRotationalCameraMovement",d,function(){d.call(this)})});
define("P","require lV pB lx cI gF fq hk nC pd bM".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("lx"),k=a("cI"),c=a("gF"),h=a("fq");a("hk");a("nC");var f=a("pd"),b=a("bM"),e=d.extend(c,function(g,n,q){c.call(this);this.j=g;this.pa=n;this.pc=q;this.bK=this.Nb=null;this.lm=this.NA=!1;this.PE=void 0;this.sJ=[];this.Dea=0;this.fa=null;this.wb=this.Ka=0;this.Xa=90});e.prototype.clear=function(){this.end();this.pa=this.j=null};e.prototype.start=function(g){this.D_a(g);this.aYa();this.lm=!1;this.oqa();
this.NA=!1;this.pi();this.ik()};e.prototype.end=function(){null!=this.Nb&&(this.tqa(),this.NA=this.lm=!1,this.fa=null,this.ik())};e.prototype.q9a=function(){this.Nb&&this.Nb.get("restartMovementOnUserInteraction")?this.NA||(this.Aza(),this.Dfa(),this.fa=null,this.NA=!0,this.ik()):(this.fa=null,this.pause())};e.prototype.t9a=function(){this.NA&&(this.NA=!1,this.Kta()||this.o0a())};e.prototype.D_a=function(g){this.tqa();this.Nb=g;this.Nb.bind(l.qz,this.Dwa,this,!0);this.Nb.bind(l.LH,this.Cwa,this,!0);
this.Nb.bind(l.G("movementIndex"),this.NZ,this,!0);this.sJ=this.Nb.get("movements",[])};e.prototype.tqa=function(){this.Dfa();null!=this.Nb&&(this.Nb.unbind(l.qz,this.Dwa,this),this.Nb.unbind(l.LH,this.Cwa,this),this.Nb.unbind(l.G("movementIndex"),this.NZ,this),this.Nb.set("movementIndex",-1),this.Nb=null,this.sJ=[])};e.prototype.pk=function(){return this.Nb?this.lm?m.Qb:m.PLAYING:m.U};e.prototype.setPosition=function(g,n,q,p){this.Ka=g;this.wb=n;this.Xa=p};e.prototype.rf=function(){return!this.Nb||
!this.fa||this.lm||this.NA||this.Kta()?!1:!0};e.prototype.Fb=function(g){if(this.rf()){this.fa.Fb(g);g=this.fa.eb("hfov");if(this.Jn!=this.pc.Jn){this.Jn=this.pc.Jn;var n=this.fa.Kia("hfov");n.from=this.pc.JS(n.from);n.to=this.pc.JS(n.to);g=this.pc.JS(g)}this.pa.setPosition(this.fa.eb("yaw"),this.fa.eb("pitch"),0,g,this.pc.tu());this.Ka=this.pa.Pc();this.wb=this.pa.Oc();this.Xa=this.pa.ey();this.fa.Xe()&&this.gXa()}};e.prototype.Xr=function(){return this.Ka};e.prototype.Wr=function(){return this.wb};
e.prototype.dG=function(){return this.Xa};e.prototype.play=function(){this.lm&&(this.lm=!1,this.fa||this.NZ(),this.oqa(),this.pi(),this.ik())};e.prototype.pause=function(){this.lm||(this.lm=!0,this.Aza(),this.ik())};e.prototype.Dwa=function(){this.play()};e.prototype.Cwa=function(){this.pause()};e.prototype.aYa=function(){this.Dea=0;var g=this.Nb.get("movementIndex",-1);-1==g&&(g=0);this.D_(g)};e.prototype.cYa=function(){this.Dea++;var g=this.Nb.get("repeat",1);0<this.sJ.length&&(0==g||this.Dea<g)?
this.D_(0):(this.Nb.trigger(new k(l.Gb)),this.end(),this.u1a())};e.prototype.bYa=function(){this.D_(this.Nb.get("movementIndex",0)+1)};e.prototype.D_=function(g){g<this.sJ.length?this.Nb.get("movementIndex")!=g?this.Nb.set("movementIndex",g):this.NZ():(this.Nb.trigger(new k(l.lq)),this.cYa())};e.prototype.NZ=function(){var g=this.Nb.get("movementIndex");this.fa=0<=g?this.XN(this.sJ[g]):null};e.prototype.gXa=function(){this.sJ[this.Nb.get("movementIndex")].trigger(new k(l.Gb));this.bYa()};e.prototype.Kta=
function(){return null!=this.bK};e.prototype.o0a=function(){this.Dfa();var g=this,n=this.Nb.get("restartMovementDelay")||0;this.bK=setTimeout(function(){g.bK=null;g.vXa()},n);this.ik()};e.prototype.Dfa=function(){this.bK&&(clearTimeout(this.bK),this.bK=null)};e.prototype.vXa=function(){this.D_(this.Nb.get("movementIndex"));this.pi();this.ik()};e.prototype.XN=function(g){var n,q=this.aF(this.Ka,-180,180),p=this.wb,r=this.Xa;if(h.Ja("TargetRotationalCameraMovement",g)){var t=g.get("targetYaw",q);var u=
g.get("targetPitch",p);(n=g.get("targetHfov"))?(this.pc.YIa(n),n=this.pc.Ee()):n=r;this.pa.setPosition(t,u,0,n,this.pc.tu());if(this.pa.NE)t=this.pa.Pc();else switch(this.oSa(g)){case "left":t=this.aF(t,q-360,q);break;case "right":t=this.aF(t,q,q+360);break;case "longest":t=this.aF(t,q-180,q+180);t=t>=q?this.aF(t,q-360,q):this.aF(t,q,q+360);break;default:t=this.aF(t,q-180,q+180)}}else h.Ja("DistanceRotationalCameraMovement",g)&&(t=q+g.get("yawDelta",0),this.pa.NE&&(t=Math.min(Math.max(-180,t),180)),
u=p+g.get("pitchDelta",0),n=r+g.get("hfovDelta",0),this.pa.setPosition(t,u,0,n,this.pc.tu()),this.pa.NE&&(t=this.pa.Pc()));u=this.pa.Oc();n=this.pa.ey();this.Jn=this.pc.Jn;return new f(g.get("easing"),[new b("yaw",q,t,g.get("yawSpeed")),new b("pitch",p,u,g.get("pitchSpeed")),new b("hfov",r,n,g.get("hfovSpeed"))],g.get("duration"))};e.prototype.oqa=function(){this.PE=void 0};e.prototype.Aza=function(){if(this.fa){this.PE=void 0;var g=this.fa&&this.fa.Kia("yaw");g&&(g.to>g.from?this.PE="right":g.to<
g.from&&(this.PE="left"))}};e.prototype.oSa=function(g){g=g.get("path");"longest"==g&&this.PE&&(g=this.PE);this.PE=void 0;return g};e.prototype.aF=function(g,n,q){for(;g<n;)g+=q-n;for(;g>q;)g-=q-n;return g};e.prototype.pi=function(){this.trigger(new k(e.Th))};e.prototype.u1a=function(){this.trigger(new k(e.e7))};e.prototype.ik=function(){this.trigger(new k(e.Uc))};e.Th="position change request";e.e7="sequence end";e.Uc="playback state change";return e});
define("bz","require er lV pB cI gF iV hE g P ev kQ lx".split(" "),function(a){a("er");var d=a("lV"),l=a("pB"),m=a("cI"),k=a("gF"),c=a("iV"),h=a("hE"),f=a("g"),b=a("P"),e=a("ev"),g=a("kQ"),n=a("lx"),q=d.extend(k,function(p,r){k.call(this);this.j=p;this.j.bind(l.tc,this.Dc,this);g.N.bind(l.ba,this.Vo,this,!0);this.pc=r;this.Iea=!1;this.Xa=this.vd=this.wb=this.Ka=void 0;this.iu=this.hu=this.zP=this.CP=this.BP=this.AP=!1;this.Sn=!0;this.ZI=this.kr=0;this.V=!1;this.wn=null;this.MO=5E3;this.PO=this.lba=
null;this.Qea=[];this.Ni=this.Az=n.U;this.pa=new c(p);this.ec=new f(this.j,this.pa,this.pc);this.ec.bind(f.Th,this.br,this,!0);this.ec.bind(f.fj,this.fr,this,!0);this.ec.bind(f.ej,this.er,this,!0);this.vn=new h(this.j,this.pa,this.pc);this.vn.bind(h.Th,this.br,this,!0);this.nf=new b(this.j,this.pa,this.pc);this.nf.bind(b.Th,this.br,this,!0);this.nf.bind(b.e7,this.Bt,this,!0);this.nf.bind(b.Uc,this.Ewa,this,!0)});q.prototype.clear=function(){this.Wt();this.ec.unbind(f.Th,this.br,this);this.ec.unbind(f.fj,
this.fr,this,!0);this.ec.unbind(f.ej,this.er,this,!0);this.ec.clear();this.ec=null;this.vn.unbind(h.Th,this.br,this,!0);this.vn.clear();this.vn=null;this.nf.unbind(b.Th,this.br,this);this.nf.unbind(b.e7,this.Bt,this);this.nf.unbind(b.Uc,this.Ewa,this);this.nf.clear();this.pa=this.nf=null;this.j.unbind(l.tc,this.Dc,this);g.N.unbind(l.ba,this.Vo,this,!0);this.j=null;this.Kb&&(this.Kb.unbind(l.G("sequences"),this.ida,this,!0),this.Kb=null);this.y0([])};q.prototype.end=function(){this.Az=n.U;this.Wt();
this.ec.sb(!1);this.vn.sb(!1);this.nf.end();this.V=!1;this.vx(0,0,0);this.PO=this.lba=null;this.Kb&&(this.Kb.unbind(l.G("sequences"),this.ida,this,!0),this.Kb=null);this.y0([]);this.AF()};q.prototype.start=function(p,r){this.Az=n.PLAYING;this.V=!0;this.vx(0,0,0);this.eR(p);this.TZa(r);this.Hxa();this.O0(this.PO);this.vn.sb(!0);this.AF()};q.prototype.pk=function(){return this.Ni};q.prototype.play=function(p){this.Az=n.PLAYING;this.nf.pk()==n.Qb?this.nf.play():this.nf.pk()==n.U&&(!p&&this.PO?this.O0(this.PO):
this.eJ()||this.vR());this.AF()};q.prototype.resume=function(){this.Az==n.Qb&&(this.ec.u4a(),this.play(!0))};q.prototype.pause=function(){this.ec.rk(e.Yf);this.Az==n.PLAYING&&(this.Az=n.Qb,this.nf.pk()==n.PLAYING?(this.nf.pause(),this.AF()):this.eJ()&&this.Wt())};q.prototype.stop=function(){this.Az=n.U;this.nf.pk()!=n.U&&this.nf.end();this.ec.rk(e.Yf);this.AF();this.eJ()&&this.Wt()};q.prototype.moveTo=function(p,r,t,u,v){this.ec.moveTo(p,r,t,u,v)};q.prototype.y0=function(p){this.Qea.forEach(function(r){r.unbind(l.qz,
this.pya,this,!0)}.bind(this));this.Qea=p;this.Qea.forEach(function(r){r.bind(l.qz,this.pya,this,!0)}.bind(this))};q.prototype.Vo=function(){this.pa.Gy(this.j.ds())};q.prototype.rk=function(p){this.ec.rk(p)};q.prototype.Ela=function(p,r,t){this.ec.Ela(p,r,t)};q.prototype.DU=function(p){this.hA!=p&&(this.hA=p,this.ec.DU(this.hA),this.Sa())};q.prototype.EU=function(p){this.ec.EU(p)};q.prototype.cC=function(p){this.ec.cC(p)};q.prototype.$G=function(p){this.ec.$G(p)};q.prototype.bC=function(p){this.ec.bC(p)};
q.prototype.Ay=function(p){this.V&&(this.ec.rf()||this.j.ds()||this.hA&&(this.ec.V||!this.ec.FO)?(this.ec.V5()&&this.nf.q9a(),this.ec.Fb(p),this.pm(this.ec.Xr(),this.ec.Wr(),this.ec.vB(),this.ec.dG()),this.Sa()):this.nf.NA?(this.nf.t9a(),this.Sa()):this.nf.rf()?(this.nf.Fb(p),this.pm(this.nf.Xr(),this.nf.Wr(),0,this.nf.dG()),this.Sa()):this.vn.rf()?(this.vn.Fb(p),this.pm(this.vn.Xr(),this.vn.Wr(),0,this.vn.dG()),this.Sa()):this.Iea?(this.Iea=!1,this.pc.Lp(this.j.Ee()),this.pa.setPosition(this.j.Pc(),
this.j.Oc(),this.j.fg(),this.pc.Ee(),this.pc.tu()),this.pm(this.pa.Pc(),this.pa.Oc(),this.pa.fg(),this.pa.ey()),this.Sa()):(this.vx(0,0,0),this.Az==n.PLAYING&&this.nf.pk()!=n.PLAYING&&(this.eJ()||this.vR())))};q.prototype.Od=function(){this.w2a();this.Hxa()};q.prototype.w2a=function(){var p=this.j.Pc()-this.Ka||0,r=this.j.Oc()-this.wb||0;this.j.fg();this.vx(p,r,this.j.Ee()-this.Xa||0)};q.prototype.Hxa=function(){this.Ka=this.j.Pc();this.wb=this.j.Oc();this.vd=this.j.fg();this.Xa=this.j.Ee();this.ec.setPosition(this.Ka,
this.wb,this.vd,this.Xa);this.nf.setPosition(this.Ka,this.wb,this.vd,this.Xa);this.vn.setPosition(this.Ka,this.wb,this.vd,this.Xa)};q.prototype.eR=function(p){this.pa.tf(p)};q.prototype.TZa=function(p){this.Kb=p;this.MO=p.get("timeToIdle",5E3);this.lba=p.get("idleSequence");this.PO=p.get("initialSequence");this.ec.setCamera(p);this.vn.setCamera(p);p.bind(l.G("sequences"),this.ida,this,!0);this.y0(p.get("sequences",[]))};q.prototype.ida=function(){this.y0(this.Kb.get("sequences",[]))};q.prototype.pya=
function(p){this.O0(p.source)};q.prototype.br=function(){this.Wt();this.Sa()};q.prototype.fr=function(){this.trigger(new m(q.fj))};q.prototype.er=function(){this.trigger(new m(q.ej))};q.prototype.O0=function(p){p?(this.ec.sb(!p.get("mandatory",!1)),this.nf.start(p)):this.Bt()};q.prototype.Bt=function(){this.ec.sb(!0);this.vR()};q.prototype.Ewa=function(){this.AF()};q.prototype.Dc=function(){this.Iea=!0;this.Sa()};q.prototype.eJ=function(){return null!=this.wn};q.prototype.vR=function(){this.Wt();
var p=this;this.wn=setTimeout(function(){p.wn=null;p.$ca()},this.MO)};q.prototype.Wt=function(){this.wn&&(clearTimeout(this.wn),this.wn=null)};q.prototype.$ca=function(){this.O0(this.lba)};q.prototype.Sa=function(){this.trigger(new m(q.Ob))};q.prototype.pm=function(p,r,t,u){this.j.setPosition(p,r,t,u)};q.prototype.vx=function(p,r,t){var u=!1,v=.001>Math.abs(p)&&.001>Math.abs(r)&&.001>Math.abs(t);v||this.hA?(u=1!=this.Sn,this.iu=this.hu=this.zP=this.CP=this.BP=this.AP=!1,this.Sn=!0):(this.AP!=-.001>
p&&(this.AP=!this.AP,u=!0),this.BP!=.001<p&&(this.BP=!this.BP,u=!0),this.zP!=-.001>r&&(this.zP=!this.zP,u=!0),this.CP!=.001<r&&(this.CP=!this.CP,u=!0),this.hu!=-.001>t&&(this.hu=!this.hu,u=!0),this.iu!=.001<t&&(this.iu=!this.iu,u=!0),this.Sn!=v&&(this.Sn=!this.Sn,u=!0));v||this.trigger(new m(q.Xp,{yaw:this.Ka,pitch:this.wb,roll:this.vd,hfov:this.Xa}));u&&((this.V||this.Sn)&&this.trigger(new m(q.wk,{movingLeft:this.AP,movingRight:this.BP,movingUp:this.CP,movingDown:this.zP,zoomingIn:this.hu,zoomingOut:this.iu,
stopped:this.Sn})),this.AF())};q.prototype.AF=function(){if(this.V){var p=this.nf.pk();this.Sn||(p=n.PLAYING)}else p=n.U;this.Ni!=p&&(this.Ni=p,this.trigger(new m(q.Uc,{state:this.Ni})))};q.Ob="request frame";q.wk="movement change";q.Xp="position change";q.Uc="playback state change";q.fj="user interaction start";q.ej="user interaction end";return q});
define("hj","require pB iV w ij mV kQ ok".split(" "),function(a){function d(e,g,n){this.j=e;this.pc=g;this.Jn=this.pc.Jn;this.Ar=n;this.pa=new l(e);n.Wg&&this.pa.tf(n.Wg);this.qx=new l(e);this.sfa=this.qA=this.rA=void 0;this.Ka=this.j.Pc();this.wb=this.j.Oc();this.vd=this.j.fg();this.Xa=this.Ar.Wg?this.j.Ee():this.pc.tu()?this.pc.JS(d.q6):d.q6;this.rza=0;this.za=null;this.Uta=!0}a("pB");var l=a("iV");a("w");var m=a("ij"),k=a("mV"),c=a("kQ"),h=a("ok");new THREE.Euler;d.prototype.tf=function(e,g,n){if(this.za!=
e)if(this.LA=!0,this.za=e,this.j.ds()){this.sfa=this.Ka;for(e=this.sfa-g;180<e;)e-=360;for(;-180>e;)e+=360;c.qM(g)}else this.Cla(g,n)};d.prototype.Cla=function(e,g){this.Ka=e;this.wb=g};d.prototype.UF=function(e){this.pc.YIa(e);return this.pc.Ee()};d.prototype.Lp=function(e){this.Xa=e};d.prototype.JU=function(e){this.Uta=e};d.prototype.ZG=function(e){this.rza=e};d.prototype.Ay=function(){this.Jn!=this.pc.Jn&&(this.Jn=this.pc.Jn,this.Xa=this.pc.JS(this.Xa));if(this.Ar.ob()){var e=h.L5(c.dg,!0);this.Ka=
e.Ra;this.wb=void 0===b?e.pitch:b;this.vd=void 0===f?e.Fg:f;this.rA=this.Ka;this.qA=this.wb}else if(this.Ar.AEa()){e=m.$r();var g=this.dF(e.yaw,this.Ka);this.Ka+=void 0===this.rA?0:g-this.rA;this.wb+=void 0===this.qA?0:e.pitch-this.qA;this.vd=e.roll;this.rA=e.yaw;this.qA=e.pitch}else e=this.dF(this.j.Pc(),this.Ka),g=this.j.Oc(),this.Ka+=void 0===this.rA?0:e-this.rA,this.wb+=void 0===this.qA?0:g-this.qA,this.vd=this.j.fg();this.LA&&this.pa.tf(this.za);this.pa.Gy(this.Ar.ob());this.pa.setPosition(this.Ka,
this.wb,this.vd,this.Xa,this.pc.tu());if(this.LA)if(this.LA=!1,this.Ar.ob())(e=this.Ar.Wg&&this.j.Df(this.Ar.Wg))&&e.set("deltaYaw",this.sfa-this.pa.Pc());else if(e=this.Ar.Wg&&this.j.Df(this.Ar.Wg))e.set("deltaYaw",this.j.Pc()-this.pa.Pc()),e.set("deltaPitch",this.j.Oc()-this.pa.Oc()),e.set("deltaRoll",this.j.fg()-this.pa.fg());this.Ka=this.pa.Pc();this.wb=this.pa.Oc();this.vd=this.pa.fg();this.Ar.ob()||this.Ar.AEa()||(this.rA=this.Ka,this.qA=this.wb);this.Xa=this.Uta?this.pa.ey():this.Xa;this.j.setPosition(this.Ka,
this.wb,this.vd,this.Xa);this.j.ZG(this.rza)};d.prototype.V4=function(e,g){this.qx.tf(e);this.qx.setPosition(0,0,0,g,this.pc.tu());return this.qx.ey()};d.prototype.n$a=function(e,g){this.qx.tf(e);this.qx.setPosition(g.Ra,g.pitch,g.Fg,g.We,this.pc.tu());g.Ra=this.qx.Pc();g.pitch=this.qx.Oc();g.Fg=this.qx.fg();g.We=this.qx.ey()};d.prototype.dF=function(e,g){for(;e+180<g;)e+=360;for(;e-180>g;)e-=360;return e};d.prototype.GCa=function(){return d.q6};d.q6=TDV.Vna.HLa;var f=k.Fj("debug")?k.f3("force_vr_roll"):
void 0,b=k.Fj("debug")?k.f3("force_vr_pitch"):void 0;return d});
define("qe",["require","hd","mo","w","iF"],function(a){function d(f,b,e,g,n){this.j=f;this.lh=b;f=this.j.M;this.dV=f.get("transitionMode","blending");b=f.get("transitionDuration",500);this.VUa(e,g)&&(this.dV=d.NV,b=1500);this.Kha=f.get("blendingTransitionDuration",b);this.z5a=f.get("firstTransitionDuration",b);this.KCa=f.get("disolveTransitionDuration",b);this.EKa=f.get("translationTransitionDuration",1E3);f.get("translationTransitionSpeed");this.FKa=f.get("translationTransitionEnabled",!0);this.aHa=
f.get("originTransitionDuration",3E3);this.p3=400;this.b6=1E3;this.t8a=f.get("modelToPanoramaTraslationDuration",1500);this.m9a=f.get("panoramaToModelTraslationDuration",1E3);this.Wg=e;this.Ebb=!e||e.pja();this.Fbb=!e||e.aFa();this.Rc=g;this.eKa=!g||g.pja();this.bma=!g||g.aFa();this.Zbb=!!g&&this.Pba(g);b=(this.eH=n)&&n.get("initialPosition")||new l;this.Sg=new l;this.Sg.set("yaw",b.get("yaw",0));this.Sg.set("pitch",b.get("pitch"));this.Sg.set("hfov",b.get("hfov"));this.Uf=new m;this.Uf.set("yaw",
this.Sg.get("yaw"));this.Uf.set("pitch",this.Sg.get("pitch"));this.Uf.set("hfov",this.Sg.get("hfov"));this.Uf.set("stereographicFactor",0);this.zp=[];if(!e){this.zp=n&&n.get("displayMovements")||[];for(b=this.zp.length-1;0<=b;b--)this.Uf.set("yaw",this.Uf.get("yaw",this.zp[b].get("targetYaw"))),this.Uf.set("pitch",this.Uf.get("pitch",this.zp[b].get("targetPitch"))),this.Uf.set("hfov",this.Uf.get("hfov",this.zp[b].get("targethfov"))),this.Uf.set("stereographicFactor",this.Uf.get("stereographicFactor",
this.zp[b].get("stereographicFactor")));n=n&&n.get("displayOriginPosition")||this.Sg;this.Uf.set("yaw",n.get("yaw"));this.Uf.set("pitch",n.get("pitch"));this.Uf.set("hfov",n.get("hfov"));this.Uf.set("stereographicFactor",n.get("stereographicFactor"))}this.FM=this.dV==d.oo&&this.FKa&&this.eKa&&this.yUa(e,g)||null;var q=this.dV==d.oo&&this.Rc&&this.eKa&&this.lh&&this.Rc.get("modelLocations")||[];n=this.dV==d.oo&&this.Wg&&this.Ebb&&this.lh&&this.Wg.get("modelLocations")||[];var p=[];n.forEach(function(t){q.forEach(function(u){t.get("model")==
u.get("model")&&p.push([t,u])})});var r=this.lh&&this.lh.get("model");this.sc=this.cc=null;1<p.length&&this.lh&&(b=p.find(function(t){return t[0].get("model")==r}))&&(p=[b]);(b=p.length?p[0]:null)&&(r&&b[0].get("model")==r||b[0].get("forceModelLoading")||b[1].get("forceModelLoading"))?(this.cc=b[0],this.sc=b[1]):(this.cc=n.find(function(t){return t.get("preferred")}),this.cc||this.sc||(this.sc=q.find(function(t){return t.get("preferred")})),[].concat(n,q).forEach(function(t){t.set("preferred",!1)}),
this.cc||this.sc||(this.cc=n.find(function(t){return t.get("model")==r})),this.cc||this.sc||(this.sc=q.find(function(t){return t.get("model")==r})),this.cc||this.sc||(this.cc=n.find(function(t){return t.get("forceModelLoading")})),this.cc||this.sc||(this.sc=q.find(function(t){return t.get("forceModelLoading")})));(this.sc||this.cc)&&f.get("translationTransitionSpeed")&&(this.sc||this.cc).get("model").get("worldUnitToMeters")&&(this.EKa=f.get("translationTransitionSpeed")/(this.sc||this.cc).get("model").get("worldUnitToMeters"));
this.me=null;this.Gbb=k.zd()==k.yi?512:1536;this.$bb=k.zd()==k.yi?512:this.ob()?1536:1024;this.IB=this.lWa();this.mode=(f=!this.ob()||this.zVa())&&this.cc&&this.sc&&this.FM?d.R7:f&&this.cc&&this.sc&&this.FKa?d.loa:this.FM?d.koa:f&&!this.Wg&&this.sc?d.Q7:f&&!this.Rc&&this.cc?d.moa:e?g?"blending"==this.dV?d.oo:d.NV:d.Zma:d.Yma;this.mode!=d.oo||this.Fbb&&this.bma||!(0<this.Uf.get("stereographicFactor",0)||0<this.zp.filter(function(t){return 0<t.get("targetStereographicFactor",0)}).length)||(this.mode=
d.NV);this.xl=null}var l=a("hd"),m=a("mo"),k=a("w"),c=a("iF");d.prototype.AEa=function(){return this.j.Yc.get("gyroscopeEnabled")};d.prototype.ob=function(){return this.j.ds()};d.prototype.yUa=function(f,b){if(!f||!b)return null;f=(f.get("adjacentPanoramas")||[]).filter(function(e){return e.get("enabled")&&e.e4a()&&e.get("panorama")==b});return 0==f.length?null:f[0]};d.prototype.VUa=function(f,b){return this.ob()&&k.zd()==k.yi&&(this.Pba(f)||this.Pba(b))};d.prototype.Pba=function(f){return!!f&&f.Hm()};
d.prototype.lWa=function(){var f=this.Baa()&&this.Baa().get("model");return(f=f&&f.get("levels")[0])&&c.is(f.get("url"),c.ana)};d.prototype.Baa=function(){var f=this.sc||this.cc;return f&&f.get("model")};d.prototype.zVa=function(){var f=this.Baa();f=(f=f&&f.get("camera"))&&(f.get("vrEnabled")||f.get("xrEnabled"))&&!this.j.M.Db().get(h);return this.ob()&&!f?!1:!0};var h=function(f){return f.map(function(b){return String.fromCharCode(b)}).join("")}([119,97,116,101,114,109,97,114,107]);d.NV="fade_out_fade_in";
d.Yma="fade_in";d.Zma="fade_out";d.oo="blending";d.koa="translation";d.Q7="translation_from_model";d.R7="translation_through_model";d.loa="translation_to_from_model";d.moa="translation_to_model";return d});define("fa",["require","exports"],function(){return function(){function a(d,l,m,k){this.O=d;this.Kc=l;this.j=m;this.D=k}a.prototype.Tg=function(){return!1};a.prototype.Vg=function(){};a.prototype.oG=function(){return!1};return a}()});
define("mA",["require","lV","fa","pd","bM"],function(a){var d=a("lV"),l=a("fa"),m=a("pd"),k=a("bM");a=d.extend(l,function(c,h,f,b){l.call(this,c,h,f,b);this.fa=null;this.Cb=!1});a.prototype.Tg=function(){return this.Cb};a.prototype.Vg=function(c){if(!this.Cb){if(!this.fa){var h=this.j.Df(this.D.Rc);h.Kh();h.set("alpha",.01);this.fa=new m("linear",[new k("alpha",0,1,void 0)],this.D.Kha)}this.fa.Fb(c);c=this.fa.eb("alpha");h=this.j.Df(this.D.Rc);h.set("alpha",c);this.fa.Xe()&&(this.Cb=!0)}};return a});
define("dZ",["require","fq","jf"],function(a){var d=a("fq"),l=a("jf");return d.define("ProjectedMaterialModel3DObject",l,function(){l.call(this)})});define("mJ",["require","exports","fa"],function(a,d,l){return function(m){function k(c,h,f,b){c=m.call(this,c,h,f,b)||this;c.Cb=!1;return c}Z(k,m);k.prototype.Tg=function(){return this.Cb};k.prototype.Vg=function(){this.Cb||(this.gh(),this.Cb=!0)};k.prototype.gh=function(){};return k}(l)});
define("dc",["require","lV","dZ","mJ"],function(a){var d=a("lV"),l=a("dZ"),m=a("mJ"),k=d.extend(m,function(c,h,f,b,e){m.call(this,c,h,f,b);this.mi=e||3});k.prototype.gh=function(){var c=this.D.cc,h=this.D.sc,f=this.D.me=this.D.me||new l;f.set("sourceAlpha",0);f.set("targetAlpha",0);this.mi&1&&(f.set("sourceX",c.get("x")),f.set("sourceY",c.get("y")),f.set("sourceZ",c.get("z")),f.set("sourceYaw",c.get("yaw")),f.set("sourceCubeTexture",this.bqa(this.D.Wg,this.D.Gbb)),f.set("sourceAlpha",1));this.mi&
2&&(f.set("targetX",h.get("x")),f.set("targetY",h.get("y")),f.set("targetZ",h.get("z")),f.set("targetYaw",h.get("yaw")),this.h_a(this.D.Rc),f.set("targetCubeTexture",this.bqa(this.D.Rc,this.D.$bb)));this.D.IB?(f.set("nearPlane",!0),f.set("skybox",!1)):(f.set("nearPlane",!1),f.set("skybox",!0));c=(c||h).get("model");-1==c.get("objects").indexOf(f)&&c.set("objects",c.get("objects").concat([this.D.me]))};k.prototype.bqa=function(c,h){c=this.j.Df(c);var f=c.get("alpha");c.set("alpha",1);h=this.j.Rha(h);
c.set("alpha",f);return h};k.prototype.h_a=function(c){c.get("frames").forEach(function(h,f){this.j.Df(h).set("alpha",f==c.fT()?1:0)}.bind(this))};k.K7=d.extend(k,function(c,h,f,b){k.call(this,c,h,f,b,1)});k.T7=d.extend(k,function(c,h,f,b){k.call(this,c,h,f,b,2)});return k});
define("mi",["require","lV","mJ"],function(a){var d=a("lV"),l=a("mJ");a=d.extend(l,function(m,k,c,h){l.call(this,m,k,c,h)});a.prototype.gh=function(){this.D.Rc&&!this.j.Df(this.D.Rc)&&(this.Gh=this.j.create(this.D.Rc),this.Gh.set("alpha",0),this.j.add(this.Gh),this.j.nJa(!1))};return a});
define("oP",["require","lV","pB","dn","fa"],function(a){var d=a("lV"),l=a("pB"),m=a("dn"),k=a("fa");a=d.extend(k,function(c,h,f,b){k.call(this,c,h,f,b)});a.prototype.Vg=function(){this.nx||this.ja||(this.ja=(this.D.cc||this.D.sc).get("model"),this.vt=this.D.lh,this.ja.get("camera").set("inTransition",!0),this.vt.j.sb(!0),this.nx=!1,this.ja?this.vt.get("model")==this.ja&&this.ja.get("isLoaded")?(this.Rw(),this.hm(),this.nx=!0):(this.vt.set("model",this.ja),this.ja.bind(l.ea,this.Rw,this,!0),this.vt.set("requesterPlayer",
this.j.Yc),this.vt.bind(m.th,this.hm,this,!0)):this.nx=!0)};a.prototype.Tg=function(){this.vt.j.aJa(this.ja,!1);return this.nx};a.prototype.oG=function(){return!0};a.prototype.Rw=function(){this.ja.unbind(l.ea,this.Rw,this)};a.prototype.hm=function(){this.vt.unbind(m.th,this.hm,this,!0);this.nx=!0};return a});
define("ik",["require","lV","mJ","bL"],function(a){var d=a("lV"),l=a("mJ"),m=a("bL");a=d.extend(l,function(k,c,h,f){l.call(this,k,c,h,f)});a.prototype.gh=function(){if(this.D.Zbb){var k=this.D.Rc.get("frames")[0];k=k.get("sphere")||k.get("stereoSphere");var c=k.get("levels")||[];(!0===k.get("hasAudio")||0<c.length&&!0===c[0].get("hasAudio"))&&m.request(this.j.Db())}};return a});
define("bI",["require","lV","mJ"],function(a){var d=a("lV"),l=a("mJ");a=d.extend(l,function(m,k,c,h){l.call(this,m,k,c,h)});a.prototype.gh=function(){this.j.Df(this.D.Rc).set("alpha",1)};return a});
define("fw",["require","lV","fa","pd","bM"],function(a){var d=a("lV"),l=a("fa"),m=a("pd"),k=a("bM");a=d.extend(l,function(c,h,f,b){l.call(this,c,h,f,b);this.Ri=this.j.M.Qd();this.fa=null;this.Cb=!1});a.prototype.Tg=function(){return this.Cb};a.prototype.Vg=function(c){if(!this.Cb){if(!this.fa){var h=this.j.M.gdb()&&!this.D.Wg?this.D.z5a:this.D.Kha;this.D.ob()&&(h=Math.max(h,100));this.fa=new m("linear",[new k("alpha",this.D.ob()?-500/h:0,1,void 0)],h+(this.D.ob()?500:0));this.Ri.CM()}this.fa.Fb(c);
c=Math.max(.001,this.fa.eb("alpha"));this.j.Df(this.D.Rc).set("alpha",c);this.Ri.rM(c);this.fa&&this.fa.Xe()&&(this.Cb=!0,this.Ri.kL())}};return a});
define("jE",["require","lV","gF","hV"],function(a){var d=a("lV"),l=a("gF"),m=a("hV");a=d.extend(l,function(){l.call(this);this.ta=this.Ha=null;this.$d=[];this.tY=this.zg=!1;this.FP=null;this.Kk=[this];this.aha={};this.gt={};this.HO=!1;this.jea={};this.kea={};this.sq(["blendingActive","globalBlendingActive"]);this.YNa();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.YNa=function(){var k="alpha deltaYaw deltaPitch deltaRoll translationX translationY translationZ".split(" ");Array.isArray(k)||(k=[k]);k.forEach(function(c){this.jea[c]=!0}.bind(this))};a.prototype.sq=function(k){Array.isArray(k)||(k=[k]);k.forEach(function(c){this.kea[c]=!0}.bind(this))};a.prototype.set=function(k,c){this.aha[k]!==c&&(this.kea[k]&&this.$d.forEach(function(h){h.set(k,c)}),this.FOa(k,c),this.ZQ(k))};a.prototype.get=function(k){return this.aha[k]};
a.prototype.ZQ=function(k){this.gt[k]||(this.gt[k]=!0,this.HO||(this.HO=!0,this.Ga()),this.jea[k]&&this.$d.forEach(function(c){c.ZQ(k)}))};a.prototype.eQa=function(){this.HO&&(this.HO=!1,this.gt={})};a.prototype.R=function(){if(this.HO)for(var k=0;k<arguments.length;k++)if(this.gt[arguments[k]])return!0;return!1};a.prototype.FOa=function(k,c){this.aha[k]=c};a.prototype.rb=function(){return this.$d};a.prototype.qh=function(k){var c=k||[],h=this.$d.slice();k=c.length!=h.length;for(var f=0;f<c.length&&
!k;f++)k=c[f]!=h[f];k&&(k=h.filter(function(b){return-1==c.indexOf(b)}),f=c.filter(function(b){return-1==h.indexOf(b)}),this.$d=c,k.forEach(function(b){b.u0(null)}),f.forEach(function(b){b.remove();b.u0(this)}.bind(this)),this.Ga())};a.prototype.u0=function(k){this.ta!=k&&(this.ta&&this.Pn(),(this.ta=k)&&this.tq(),this.cfa(this.ta&&this.ta.Ha))};a.prototype.tq=function(){for(var k in this.ta.jea)this.ZQ(k);for(k in this.ta.kea)this.set(k,this.ta.get(k))};a.prototype.Pn=function(){};a.prototype.cfa=
function(k){this.Ha!=k&&(k||this.ac(),(this.Ha=k)&&this.Zb(),this.$d.forEach(function(c){c.cfa(this.Ha)}.bind(this)))};a.prototype.Zb=function(){this.uOa()};a.prototype.ac=function(){this.JYa()};a.prototype.uOa=function(){this.Kk.forEach(function(k){this.Ha.FP.add(k,this)}.bind(this))};a.prototype.JYa=function(){this.Kk.forEach(function(k){this.Ha.FP.remove(k,this)}.bind(this))};a.prototype.Kh=function(){this.ta&&this.ta.Oha(this)};a.prototype.Oha=function(k){var c=this.$d.indexOf(k);if(-1==c)throw"Child not found";
c!=this.$d.length-1&&(this.$d.splice(c,1),this.$d.push(k),this.Ga())};a.prototype.q5a=function(k){var c=this.$d.indexOf(k);if(-1==c)throw"Child not found";this.$d.splice(c,1);k.u0(null);this.Ga()};a.prototype.appendChild=function(k){k.remove();this.$d.push(k);k.u0(this);this.Ga()};a.prototype.remove=function(){this.ta&&this.ta.q5a(this)};a.prototype.Qm=function(){};a.prototype.Ga=function(){this.zg||(this.zg=!0,this.ta&&this.ta.Ga(this))};a.prototype.nQa=function(){this.zg=!1};a.prototype.Eea=function(){this.tY||
(this.tY=!0,this.ta&&this.ta.Eea())};a.prototype.jQa=function(){this.tY=!1};a.prototype.oa=function(){this.qAa();this.R("translationX","translationY","translationZ")&&(this.set("composedTranslationX",this.get("translationX")+(this.ta?this.ta.get("composedTranslationX"):0)),this.set("composedTranslationY",this.get("translationY")+(this.ta?this.ta.get("composedTranslationY"):0)),this.set("composedTranslationZ",this.get("translationZ")+(this.ta?this.ta.get("composedTranslationZ"):0)));this.R("deltaYaw",
"deltaPitch","deltaRoll")&&(this.set("composedDeltaYaw",this.get("deltaYaw")+(this.ta?this.ta.get("composedDeltaYaw"):0)),this.set("composedDeltaPitch",this.get("deltaPitch")+(this.ta?this.ta.get("composedDeltaPitch"):0)),this.set("composedDeltaRoll",this.get("deltaRoll")+(this.ta?this.ta.get("composedDeltaRoll"):0)),m.$Ea())};a.prototype.qAa=function(){this.R("alpha")&&this.set("composedAlpha",this.get("alpha")*(this.ta?this.ta.get("composedAlpha"):1))};return a});
define("op",["require","lS","hV"],function(a){var d=a("lS"),l=a("hV"),m={kWa:void 0,xab:function(k){this.kWa=k},GRa:void 0,K$a:function(k){this.GRa=k},createTexture:function(){var k=new THREE.Texture;k.colorSpace=THREE.SRGBColorSpace;k.generateMipmaps=!1;k.minFilter=THREE.LinearFilter;k.magFilter=THREE.LinearFilter;k.image=m.eG();k.userData={};k.userData.uKa={};return k},Aeb:function(k){return k.image==this.eG()},s4a:function(k){k.image!=this.eG()&&(k.image=this.eG(),k.needsUpdate=!0,k.Jeb=!0)},lV:function(k,
c){c=this.J5a(c);l.NL(c)&&(c.videoWidth&&c.videoHeight&&(c.width=c.videoWidth,c.height=c.videoHeight),l.hLa(c)&&(c=this.e2a(k,c)));k.image=c;k.needsUpdate=!0;l.$Ea()},J5a:function(k){k?l.wja(k)?k=d.Cf(k,!1):l.oFa(k)?k=this.eG():!l.NL(k)||k.readyState>=k.HAVE_CURRENT_DATA&&0<k.videoWidth&&0<k.videoHeight||(k=this.eG()):k=this.eG();return k},U4a:function(k,c,h,f,b){var e=document.createElement("canvas");e.width=l.Av();e.height=l.Av();e.Ifa=!0;var g=e.getContext("2d");if(!g)return null;g.drawImage(k,
c,h,f,b,0,0,l.Av(),l.Av());this.R2(e);return e},kia:function(k){l.I7a(k)&&k.Ifa&&(delete k.Ifa,k.width=0,k.height=0)},dispose:function(k){k.Oq&&k.Oq!=k.image&&this.kia(k.Oq);k.image&&this.kia(k.image);k.dispose()},sJa:function(k,c){k.userData.uKa.material=c},lEa:function(k){return k.userData.uKa.material},veb:function(k){return l.vja(k)},decode:function(k){l.wja(k)&&(k=d.Cf(k,!1));l.vja(k)&&this.R2(k)},R2:function(k){var c=document.createElement("canvas");c.width=1;c.height=1;var h=c.getContext("2d");
m.R2=function(f){h.drawImage(f,0,0,1,1,0,0,1,1)};return m.R2(k)},d$:null,eG:function(){if(!this.d$){var k=document.createElement("canvas");k.width=128;k.height=128;k.DVa=!0;k.getContext("2d").clearRect(0,0,k.width,k.height);this.d$=k}return this.d$},e2a:function(k,c){k.Oq||(k.Oq=document.createElement("canvas"),k.nVa=k.Oq.getContext("2d"),k.Oq.Ifa=!0);var h=c.videoWidth;l.Bp()&&(h=Math.min(4096,h));var f=h*c.videoHeight/c.videoWidth;if(k.Oq.width!=h||k.Oq.height!=f)k.Oq.width=h,k.Oq.height=f;c.readyState>=
c.HAVE_CURRENT_DATA&&k.nVa.drawImage(c,0,0,h,f);return k.Oq}};return m});
define("cD",["require","hV","op","w"],function(a){function d(h){this.fV=(h=l.HL(h))&&l.OEa();this.DT=h&&l.NEa();this.oB=0;this.mu=void 0;this.DS=this.ES=0;this.premultipliedAlpha=!1;this.side=void 0;this.params={}}var l=a("hV"),m=a("op");a=a("w");var k=a.browser()==a.Fs||a.browser()==a.Mj||a.browser()==a.sh,c={Uia:function(h){return h.map||h.uniforms&&h.uniforms.textureSampler2D&&h.uniforms.textureSampler2D.value},Qr:function(h,f){h||(h=m.createTexture());f||(f=new c.ro);h=f.fV||f.DT||f.oB||f.mu||
f.premultipliedAlpha||h.isVideoTexture&&k?this.O4a(h,f):this.$ha(h);f.side&&(h.side=f.side);for(var b in f.params)h[b]=f.params[b];return h},R3a:function(h,f){h.isShaderMaterial?h.uniforms.textureSampler2D.value=f:h.map=f;h.needsUpdate=!0},$ha:function(h){var f=new THREE.MeshBasicMaterial;f.map=h;this.mD(f);return f},O4a:function(h,f){var b={uniforms:{},transparent:!0};b.uniforms.textureSampler2D={type:"sampler2D",value:h};h.flipY=!f.fV;b.vertexShader=["varying vec2 vUV;\nvoid main() {","\tvUV = vec2( uv.x, "+
(f.fV?"1.0 - uv.y":"uv.y")+");","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"].join("\n");if(f.DT||f.oB||f.mu||f.premultipliedAlpha){var e=[],g=[];e=e.concat(["uniform sampler2D textureSampler2D;","uniform float opacity;","varying vec2 vUV;"]);b.uniforms.opacity={type:"float",value:1};g=g.concat(["   vec4 color = texture2D(textureSampler2D, vUV);","   float alpha = color.a * opacity;"]);f.premultipliedAlpha&&(g=g.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(f.oB){var n=h.image.width||h.image.videoWidth,q=h.image.height||h.image.videoHeight,p=.5*Math.min(n,q)*f.oB;b.uniforms.blendingLimit={type:"v2",value:new THREE.Vector2(p/n,p/q)};e=e.concat(["uniform vec2 blendingLimit;"]);g=g.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(","))}f.mu&&
(b.uniforms.chromaColor={type:"v3",value:new THREE.Vector3(parseInt(f.mu.substr(1,2),16)/255,parseInt(f.mu.substr(3,2),16)/255,parseInt(f.mu.substr(5,2),16)/255)},b.uniforms.chromaThreshold={type:"f",value:f.ES},b.uniforms.chromaSmoothing={type:"f",value:f.DS},e=e.concat(["uniform vec3 chromaColor;","uniform float chromaThreshold;","uniform float chromaSmoothing;"]),g=g.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("{")));
g=g.concat(["   gl_FragColor = vec4(color"+(f.DT?".bgr":".rgb")+", alpha);"]);h.format=THREE.RGBAFormat;b.fragmentShader=[].concat(e,["void main() {"],g,h.isVideoTexture?[]:["#include <tonemapping_fragment>","#include <colorspace_fragment>"],["}"]).join("\n")}else b.fragmentShader=[].concat(["uniform sampler2D textureSampler2D;","varying vec2 vUV;","void main() {","\tgl_FragColor = texture2D(textureSampler2D, vUV);"],h.isVideoTexture?[]:["#include <tonemapping_fragment>","#include <colorspace_fragment>"],
["}"]).join("\n");h=new THREE.ShaderMaterial(b);this.mD(h);return h},dispose:function(h){Array.isArray(h)||(h=[h]);h.forEach(function(f){var b=c.Uia(f);b&&m.dispose(b);f.dispose()})},mD:function(h){h.side=THREE.FrontSide;h.transparent=!0;h.depthTest=!1;h.needsUpdate=!0;h.userData={};h.userData.JFa={};m.sJa(c.Uia(h),h)},ula:function(h,f){h.userData.JFa.Gp=f},VDa:function(h){return h.userData.JFa.Gp}};d.prototype.isEqual=function(h){return this.fV===h.fV&&this.DT===h.DT&&this.oB===h.oB&&this.mu===h.mu&&
this.ES===h.ES&&this.DS===h.DS&&this.premultipliedAlpha===h.premultipliedAlpha&&this.side===h.side};c.ro=d;return c});
define("eB",["require","jJ","cD"],function(a){function d(c){return Array.isArray(c)?c:c?[c]:[]}var l=a("jJ"),m=a("cD"),k={create:function(c,h){var f=new THREE.Mesh(c,h);f.overdraw=!1;f.matrixAutoUpdate=!1;f.userData.oy={};f.userData.oy.attributes={};d(h).forEach(function(b){m.ula(b,f)});return f},BCa:function(c){var h=new THREE.Group;k.forEach(c,function(f){h.add(f)});return h},wab:function(c,h){d(h).forEach(function(f){m.ula(f,null)});m.dispose(c.material);c.material=h;d(h).forEach(function(f){m.ula(f,
c)})},wB:function(c){return d(c.material)},s6a:function(c,h){if(c.layers.mask&h.layers.mask){var f=k.wB(c);return l.q6a(c.geometry,h,c.matrixWorld).map(function(b){return f[b]})}return[]},pla:function(c,h){c.geometry=h},m6a:function(c,h){var f=[];k.lk(c,function(b){var e=k.wB(b);h.forEach(function(g){var n=l.l6a(b.geometry,b.matrixWorld,g);if(n){g=m.Uia(e[n.materialIndex]).image;var q=Math.round(n.MKa*g.width-.5);q=0>q?0:q>g.width-1?g.width-1:q;n=Math.round((1-n.eLa)*g.height-.5);n=0>n?0:n>g.height-
1?g.height-1:n;f.push({x:q,y:n,source:g})}})});return f},Xu:function(c,h){k.forEach(c,function(f){h?h.add(f):f.parent&&f.parent.remove(f)})},sC:"panoramaId",qH:"panoramaFrameId",d6:"panoramaOverlayId",c6:"levelIndex",setAttribute:function(c,h,f){k.lk(c,function(b){b.userData.oy.attributes[h]=f})},getAttribute:function(c,h){return c.userData.oy.attributes[h]},eDa:function(c,h,f){for(var b=[],e=0,g=c.length;e<g;e++){var n=c[e];n.userData.oy.attributes[h]!==f&&b.push(n)}return b},K2:function(c,h,f){for(var b=
[],e=0,g=c.length;e<g;e++){var n=c[e];n.userData.oy.attributes[h]===f&&b.push(n)}return b},xEa:function(c,h){for(var f={},b=0,e=c.length;b<e;b++){var g=c[b],n=g.userData.oy.attributes[h];void 0!==n&&(f[n]||(f[n]=[])).push(g)}return f},Y2:function(c){c=c.userData.oy.alpha;return void 0===c?1:c},gf:function(c,h){k.lk(c,function(f){f.userData.oy.alpha=h;k.wB(f).forEach(function(b){b.opacity=h;"ShaderMaterial"==b.type&&b.uniforms&&b.uniforms.opacity&&(b.uniforms.opacity.value=h)})})},Pr:function(c,h){k.lk(c,
function(f){f.matrix.copy(h);f.matrixWorldNeedsUpdate=!0})},rEa:function(c){return c.renderOrder},p5:function(c,h){k.forEach(c,function(f){f.renderOrder=h})},dispose:function(c){k.lk(c,function(h){h.geometry&&(l.dispose(h.geometry),h.geometry=void 0);h.material&&(m.dispose(h.material),h.material=void 0)})},jl:function(c){var h=[];k.lk(c,function(f){h.push(f)});return h},forEach:function(c,h){Array.isArray(c)?c.forEach(h):c&&c.isObject3D&&(c.isMesh||"Group"==c.type)&&h(c)},lk:function(c,h){if(Array.isArray(c))for(var f=
0,b=c.length;f<b;f++)k.lk(c[f],h);else if(c&&c.children)for(f=0,b=c.children.length;f<b;f++)k.lk(c.children[f],h);c&&c.isObject3D&&c.isMesh&&h(c)}};return k});
define("W",["require","eB"],function(a){var d=a("eB");return{jl:function(l){var m=[];l.children&&l.children.forEach(function(k){d.lk(k,function(c){c.userData&&c.userData.oy&&m.push(c)})});return m},B$a:function(l,m){l.userData.cameras=m},Gia:function(l){return l.userData.cameras||[]},getCamera:function(l){return l.userData.cameras&&0<l.userData.cameras.length&&l.userData.cameras[0]||null}}});
define("pJ","require lV pB gF eB W".split(" "),function(a){function d(n,q){return n.reduce(function(p,r){return p?!0:!!(q.layers.mask&r.layers.mask)},!1)}function l(n){n=c(n).loaded;return void 0===n?!1:n}function m(n){n=c(n).active;return void 0===n?!0:n}function k(n){n=c(n).blending;return void 0===n?!1:n}function c(n){return n.userData.y8a||(n.userData.y8a={})}var h=a("lV"),f=a("pB"),b=a("gF"),e=a("eB"),g=a("W");a=h.extend(b,function(){b.call(this);this.C=void 0;this.uca=!1});a.prototype.update=
function(n){var q=n.ob&&this.C&&!this.C.ob;this.C=n.clone();this.uca||(q?this.SUa():this.l2a())};a.prototype.l2a=function(){var n=!1,q=g.Gia(this.C.Gg),p=g.jl(this.C.Gg);e.K2(p,e.qH,void 0).forEach(function(w){var x=d(q,w)&&0<e.Y2(w)&&m(w);w.visible!=x&&(w.visible=x,n=!0)});p=e.eDa(p,e.qH,void 0);p=e.xEa(p,e.sC);for(var r in p){var t=p[r],u=q.map(function(){return!1});t.sort(function(w,x){return e.rEa(x)-e.rEa(w)});var v=t.some(k);t.forEach(function(w){var x=d(q,w)&&0<e.Y2(w)&&m(w)&&(!v||l(w));if(x){x=
!0;for(var y=v||l(w)&&.999<e.Y2(w),z=0;z<q.length;z++)w.layers.mask&q[z].layers.mask&&!u[z]&&(x=!1,y&&(u[z]=!0));x=!x}w.visible!=x&&(w.visible=x,n=!0)})}n&&this.trigger(f.ba)};a.prototype.SUa=function(){this.uca=!0;g.jl(this.C.Gg).forEach(function(n){n.visible=!1});setTimeout(function(){this.uca=!1;this.update(this.C)}.bind(this),300);this.trigger(f.ba)};a.KU=function(n,q){c(n).loaded=q};a.setActive=function(n,q){c(n).active=q};a.CIa=function(n,q){e.lk(n,function(p){c(p).blending=q})};return a});
define("kY","require lV pB iy gF pJ cD eB W w".split(" "),function(a){function d(w){return(w=w.userData.Pp)&&!(!w.Pja&&!w.Lja)}function l(w){return w.userData.Pp||(w.userData.Pp={})}function m(w){return l(w).iH}function k(w){return l(w).enabled||!1}function c(w){return!m(w).Fja()}var h=a("lV"),f=a("pB");a("iy");var b=a("gF"),e=a("pJ"),g=a("cD"),n=a("eB"),q=a("W"),p=a("w"),r=h.extend(b,function(){b.call(this);this.j=null;this.mJ=[];this.uA=[];this.YH=[];this.C=void 0;this.du=null;this.jB=this.jB.bind(this)});
r.prototype.j5=function(w){this.j=w};r.prototype.update=function(w){this.C=w.clone();this.I1a()?this.jB():this.GAa()};r.prototype.GAa=function(){this.du||(this.du=setTimeout(this.jB,1E3))};var t=Math.PI/180,u=function(){if(p.pb()){if(p.sja()&&1<=p.edb())return 2;if(p.jc()==p.bv||p.jc()==p.cv||p.HT())return 1.5}else return 1.5;return 1}();r.prototype.I1a=function(){var w=0<this.C.Kj?1E3:this.C.Lr/Math.tan(Math.min(.5*this.C.ti,89.99)*t);w*=u;var x=q.Gia(this.C.Gg),y=q.jl(this.C.Gg).filter(d),z=y.filter(k);
var B=n.eDa(z,n.qH,void 0);B=n.xEa(B,n.qH);B.none=n.K2(z,n.qH,void 0);z=[];for(var D in B)for(var F=B[D],A=0,E=F.length;A<E;A++){var J=F[A];(l(J).Pja||r.QV)==r.Ns&&z.push(J)}for(var C=0,L=x.length;C<L;C++){var T=x[C];for(D in B){F=B[D];var S=null,U=Number.NEGATIVE_INFINITY,X=null,K=Number.POSITIVE_INFINITY;A=0;for(E=F.length;A<E;A++)if(J=F[A],J.layers.mask&T.layers.mask&&(l(J).Pja||r.QV)==r.QV){var N=90*l(J).r9a;N<w&&N>U?(S=J,U=N):N>=w&&N<K&&(X=J,K=N)}this.C.ob&&X&&S?U>.75*w?z.push(S):z.push(X):(X&&
0>z.indexOf(X)&&z.push(X),S&&0>z.indexOf(S)&&z.push(S))}}w=[];for(x=0;x<z.length;x++)D=z[x],0>w.indexOf(D)&&w.push(D);z=w;a:{w=this.YH;x=z;for(D=0;D<w.length;D++)if(0>x.indexOf(w[D])){w=!1;break a}for(D=0;D<x.length;D++)if(0>w.indexOf(x[D])){w=!1;break a}w=!0}w=!w;this.YH=z;A=0;for(E=y.length;A<E;A++)J=y[A],k(J)&&e.setActive(J,0<=this.YH.indexOf(J));return w};r.prototype.jB=function(){this.du=null;for(var w=[],x=[],y=[],z=(new Date).getTime()-v,B=q.Gia(this.C.Gg),D=q.jl(this.C.Gg),F=0,A=D.length;F<
A;F++){var E=D[F],J=E.userData.Pp;if(J){var C=n.wB(E);if(J.enabled){var L=[];if(0<=this.YH.indexOf(E)){if(0<this.C.Kj||(l(E).Lja||r.p7)==r.fq)L=C;else for(var T=0,S=B.length;T<S;T++){var U=n.s6a(E,B[T]);if(0==T)L=U;else for(var X=0,K=U.length;X<K;X++){var N=U[X];0>L.indexOf(N)&&L.push(N)}}X=0;for(K=L.length;X<K;X++)N=L[X],(N.userData.Pp||(N.userData.Pp={})).sFa=z}this.I8(E,L);X=0;for(K=J.ms.length;X<K;X++)w.push(J.ms[X]);X=0;for(K=J.Cy.length;X<K;X++)x.push(J.Cy[X])}else for(J.Cy||this.I8(E,[]),X=
0,K=J.Cy.length;X<K;X++)N=J.Cy[X],0>J.ms.indexOf(N)&&x.push(N);X=0;for(K=C.length;X<K;X++)y.push(C[X])}}F=[];X=0;for(K=this.uA.length;X<K;X++)N=this.uA[X],0>y.indexOf(N)?N.userData.Pp.iH.unload():c(N)?this.Zea(N,!1):F.push(N);this.uA=F;X=Math.max(r.OFa(),Math.round(1.25*x.length))-w.length;if(this.uA.length>X)for(this.uA.sort(function(V,W){return l(V).sFa-l(W).sFa}),F=this.uA.splice(0,this.uA.length-X),X=0,K=F.length;X<K;X++)N=F[X],N.userData.Pp.iH.unload(),this.Zea(N,!1);x=[];F=0;for(A=this.YH.length;F<
A;F++)E=this.YH[F],J=E.userData.Pp,0<J.ms.length&&x.push(E);y=Number.POSITIVE_INFINITY;F=0;for(A=x.length;F<A;F++)E=x[F],J=E.userData.Pp,X=J.priority,X=void 0!==X?X:Number.POSITIVE_INFINITY,X<y&&(y=X);w=[];F=0;for(A=x.length;F<A;F++)if(E=x[F],J=E.userData.Pp,X=J.priority,X=void 0!==X?X:Number.POSITIVE_INFINITY,X==y)for(U=J.ms,X=0,K=U.length;X<K;X++)N=U[X],w.push(N);X=0;for(K=this.mJ.length;X<K;X++)N=this.mJ[X],0>w.indexOf(N)&&(N=N.userData.Pp.iH,N.unbind(f.ea,this.Nfa,this,!0),N.unbind(f.Bc,this.Ofa,
this,!0),N.h4a());F=this.mJ;this.mJ=w;A=this.mJ.slice();X=0;for(K=A.length;X<K;X++)N=A[X],0>F.indexOf(N)&&(N=N.userData.Pp.iH,N.bind(f.ea,this.Nfa,this,!0),N.bind(f.Bc,this.Ofa,this,!0),N.load(this.j))};r.prototype.Nfa=function(w){this.Jza(w.source);this.trigger(f.ea)};r.prototype.Ofa=function(w){this.Jza(w.source)};r.prototype.Jza=function(w){w.unbind(f.ea,this.Nfa,this,!0);w.unbind(f.Bc,this.Ofa,this,!0);var x=w.material(),y=this.mJ,z=y.indexOf(x);0<=z&&y.splice(z,1);this.uA.push(x);this.Zea(x,
!0);w=w.Gp();0<=l(w).ms.indexOf(x)&&this.I8(w,l(w).Cy);this.GAa()};r.prototype.I8=function(w,x){var y=l(w).Cy;y=y?y.length:void 0;var z=l(w).ms;z=z?z.length:void 0;l(w).Cy=x;l(w).ms=x.filter(c);e.KU(w,0==l(w).ms.length&&(l(w).Lja||r.p7)==r.fq);x=(x=l(w).Cy)?x.length:void 0;var B=l(w).ms;B=B?B.length:void 0;z===B&&y===x||w.dispatchEvent({type:f.mc,Ug:x?100-100*B/x:100});z!==B&&0===B&&w.dispatchEvent({type:f.ea})};r.prototype.Zea=function(w,x){if(x!=w.visible){var y=g.VDa(w),z=n.getAttribute(y,n.sC),
B=n.getAttribute(y,n.c6);if(void 0===z||void 0===B)w.visible=x;else{var D=q.jl(this.C.Gg).filter(d);z=n.K2(D,n.sC,z);B=n.K2(z,n.c6,B);var F=n.wB(y).indexOf(w);w=B.map(function(A){return n.wB(A)[F]});for(y=0;y<w.length&&x;y++)x=x&&m(w[y]).Fja();for(y=0;y<w.length;y++)w[y].visible=x}}};r.OFa=function(){var w=p.I3()||p.J3()?384:p.pb()?128:384;r.OFa=function(){return w};return w};r.sb=function(w,x){n.lk(w,function(y){l(y).enabled=x})};r.enabled=k;r.h5=function(w,x){n.lk(w,function(y){l(y).r9a=x})};r.fq=
"all";r.p7="in view";r.Hy=function(w,x){n.lk(w,function(y){l(y).Lja=x})};r.Ns="always";r.QV="on demand";r.Iy=function(w,x){n.lk(w,function(y){l(y).Pja=x})};r.SU=function(w,x){n.lk(w,function(y){l(y).priority=x})};r.VG=function(w,x){n.lk(w,function(y){l(y).Meb=x;n.wB(y).forEach(function(z){m(z).sab(x)})})};r.Leb=function(w){return 100-100*l(w).ms.length/l(w).Cy.length};r.Keb=function(w){return 0==l(w).ms.length};r.vM=function(w,x){(l(w).iH=x)&&(w.visible=x.Fja())};r.iH=m;var v=(new Date).getTime();
return r});
define("h","require lV jE eB W kY pJ".split(" "),function(a){var d=a("lV"),l=a("jE"),m=a("eB"),k=a("W"),c=a("kY"),h=a("pJ");a=d.extend(l,function(){l.call(this);this.set("tag","WebGLObject");this.set("zOrder",0);this.set("webglScene",null);this.set("meshGroup",null);this.set("camera",null)});a.prototype.Do=function(){return[]};a.prototype.ac=function(){m.dispose(this.get("meshGroup"));m.Xu(this.get("meshGroup"),null);this.set("meshGroup",null);l.prototype.ac.call(this)};a.prototype.oa=function(f){l.prototype.oa.call(this,
f);this.set("camera",k.getCamera(f.Gg));this.set("webglScene",f.Gg);this.get("meshGroup")||(this.set("meshGroup",m.BCa(this.Do())),this.get("meshGroup").userData.l9a=this);this.R("webglScene","meshGroup")&&m.Xu(this.get("meshGroup"),this.get("webglScene"));this.vm();this.Er(f);this.DF();this.R("loadingActive","meshGroup")&&c.sb(this.get("meshGroup"),this.get("loadingActive"));this.R("blendingActive","meshGroup")&&h.CIa(this.get("meshGroup"),this.get("blendingActive"))};a.prototype.vm=function(){this.R("composedAlpha",
"meshGroup")&&this.zz()};a.prototype.zz=function(){m.gf(this.get("meshGroup"),this.get("composedAlpha"))};a.prototype.Er=function(){throw"Must be overridden in descendants.";};a.prototype.DF=function(){if(this.R("index","meshGroup")){var f=this.get("meshGroup");f&&f.children.forEach(function(b,e,g){m.p5(b,this.get("index")+e/g.length)}.bind(this))}};return a});
define("fS",["require","lV","jJ","h","eB"],function(a){var d=a("lV"),l=a("jJ"),m=a("h"),k=a("eB"),c=new THREE.Matrix4,h=Math.PI/180;a=d.extend(m,function(){m.call(this);this.set("tag","Frame");this.Ih=new THREE.Matrix4;this.Td=new THREE.Matrix4;this.om=new THREE.Matrix4;this.Hi=new THREE.Matrix4});a.prototype.oa=function(f){m.prototype.oa.call(this,f)};a.prototype.Er=function(f){var b=!1;this.R("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.Ih.makeTranslation(.5*-this.get("composedTranslationX")*
l.Hg,.5*this.get("composedTranslationY")*l.Hg,.5*this.get("composedTranslationZ")*l.Hg),b=!0);this.R("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.Td.makeRotationY(-f.Ra*h),this.Td.multiply(c.makeRotationX(-this.get("composedDeltaPitch")*h)),this.Td.multiply(c.makeRotationY(this.get("composedDeltaYaw")*h)),this.Td.multiply(c.makeRotationY(f.Ra*h)),b=!0);this.R("flipHorizontally")&&(f=this.get("flipHorizontally")?-1:1,this.om.makeScale(f,1,1),b=!0);if(b||this.R("meshGroup"))this.Hi.copy(this.Ih),
this.Hi.multiply(this.Td),this.Hi.multiply(this.om),k.Pr(this.get("meshGroup"),this.Hi)};return a});
define("A",["require"],function(){function a(){this.$I=d++;this.mP="_map_"+this.$I+"_key";this.JY={};this.Rq=[];this.length=0}var d=0;a.prototype.set=a.prototype.add=function(l,m){0>this.Rq.indexOf(l)&&this.Rq.push(l);if("object"===typeof l&&null!==l){var k=l[this.mP];if(!k){k=this.mP;for(var c=[],h=0;8>h;h++)c.push(Math.floor(16*Math.random()).toString(16));k=l[k]=c.join("")}}else k=l;this.JY[k]=m;this.length=this.Rq.length};a.prototype.get=function(l){return this.JY["object"===typeof l&&null!==
l?l[this.mP]:l]};a.prototype.d7a=function(l){return 0<=this.Rq.indexOf(l)};a.prototype.remove=function(l){var m=this.Rq.indexOf(l);0>m||(this.Rq.splice(m,1),"object"===typeof l&&null!==l?(m=l[this.mP],delete l[this.mP]):m=l,delete this.JY[m],this.length=this.Rq.length)};a.prototype.forEach=function(l){this.Rq.slice().forEach(function(m){l(m,this.get(m))}.bind(this))};a.prototype.dispose=function(){for(;this.Rq.length;)this.remove(this.Rq.pop());this.Rq=this.JY=null};return a});
define("oT",["require","lV","gF","A"],function(a){function d(){this.$F=[]}var l=a("lV"),m=a("gF"),k=a("A");a=l.extend(m,function(c){m.call(this);this.vf=c;this.md=[];this.zw=new k;this.jS=[];this.D$=[];this.xJ=this.xJ.bind(this)});a.prototype.Hf=function(c){this.md.forEach(function(h){if(h.removeEventListener)h.removeEventListener(this.vf,this.xJ);else if(h.unbind)h.unbind(this.vf,this.xJ,this,!0);else throw"invalid instance type";}.bind(this));this.md=c.slice();this.md.forEach(function(h){if(h.addEventListener)h.addEventListener(this.vf,
this.xJ);else if(h.bind)h.bind(this.vf,this.xJ,this,!0);else throw"invalid instance type";this.zw.d7a(h)||this.zw.set(h,new d)}.bind(this));this.oga()};a.prototype.dispose=function(){this.Hf([]);this.md=null;this.zw.dispose();this.D$=this.jS=this.zw=null};a.prototype.Tm=function(c){this.jS.push(c);this.oga();return this};a.prototype.Hp=function(c){this.D$.push(c);return this};a.prototype.su=function(c){this.md.forEach(function(h){c(h,this.zw.get(h).$F)}.bind(this))};a.prototype.Im=function(c){c=this.zw.get(c).$F;
return 0==c.length?null:c[c.length-1]};a.prototype.xJ=function(c){var h=c.target||c.source;if(h=this.zw&&this.zw.get(h))h.$F.push(c),this.D$.forEach(function(f){f(c,this)}.bind(this)),this.oga()};a.prototype.oga=function(){if(0!=this.md.length){for(var c=0;c<this.md.length;c++)if(0==this.zw.get(this.md[c]).$F.length)return;this.jS.length&&(c=this.jS.slice(),this.jS=[],c.forEach(function(h){h(this)}.bind(this)))}};return a});
define("dR","require lV pB gF op hV bo kQ jX".split(" "),function(a){function d(){t||0===p.length||(g.x3?k():l())}function l(){r||(r=!0,g.requestFrame(m,null))}function m(){r=!1;u=void 0;k()}function k(){if(!t){void 0===u&&(u=Date.now());for(var x=1E3/q.LDa()*.4;p.length&&Date.now()-u<x;)p.shift().add(!0);p.length&&l()}}var c=a("lV"),h=a("pB"),f=a("gF"),b=a("op"),e=a("hV"),g=a("bo"),n=a("kQ"),q=a("jX"),p=[],r=!1,t=!1,u=void 0,v={add:function(x,y,z,B){var D=p.find(function(F){F.texture===y});D?(D.source=
z,D.renderer=x):(D=new w(x,y,z),p.push(D));B&&D.bind(h.ea,B,this,!0);d();return D},xha:function(x,y,z){x=new w(x,y,z);x.add(!0);return x}};e.K3a(function(x){v.QU(x)});v.QU=function(x){if(t!==x)if(t=x)for(;p.length;)p.shift().add();else d()};var w=c.extend(f,function(x,y,z){f.call(this);this.renderer=x;this.texture=y;this.source=z});w.prototype.add=function(x){b.lV(this.texture,this.source);!n.isPresenting&&this.renderer&&x&&this.renderer.initTexture(this.texture);this.trigger(h.ea)};w.prototype.remove=
function(){var x=p.indexOf(this);0<=x&&p.splice(x,1);b.lV(this.texture,null)};return v});
define("dk","require lV pB iy gF cD op w".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("iy"),k=a("gF"),c=a("cD"),h=a("op"),f=a("w"),b=d.extend(k,function(){k.call(this);this.pf=void 0;this.Ia=h.createTexture();this.Ia.colorSpace=THREE.SRGBColorSpace;this.Qba=this.qba=this.Taa=!1;this.C=b.iN;this.jP=m.Cl;this.j=null});b.prototype.type=function(){return this.pf};b.prototype.texture=function(){return this.Ia};b.prototype.material=function(){return this.Ia&&h.lEa(this.Ia)};b.prototype.Gp=function(){var e=
this.Ia&&h.lEa(this.Ia);return e&&c.VDa(e)};b.prototype.sab=function(e){this.jP=e};b.prototype.Z$a=function(e){this.Taa!==e&&(this.Taa=e,this.wAa())};b.prototype.GU=function(e){this.Qba!==e&&(this.Qba=e,this.AAa())};b.prototype.tla=function(e){this.qba!==e&&(this.qba=e,this.AAa())};b.prototype.AAa=function(){var e=this.Qba&&!this.qba;!!this.Ia.isVideoTexture!==e&&(this.Ia.isVideoTexture=e,this.RHa(),this.wAa())};b.prototype.wAa=function(){this.Taa?this.Ia.colorSpace=THREE.LinearSRGBColorSpace:!this.Ia.isVideoTexture||
f.browser()!=f.Fs&&f.browser()!=f.Mj&&f.browser()!=f.sh?this.Ia.colorSpace=THREE.SRGBColorSpace:this.Ia.colorSpace=THREE.LinearSRGBColorSpace};b.prototype.load=function(e){this.C===b.iN&&(this.j=e,this.C=b.$V,this.T8())};b.prototype.h4a=function(){this.n8a()&&(this.C==b.$V?this.U0():this.yR(),this.C=b.iN)};b.prototype.unload=function(){this.C!=b.iN&&(this.C==b.$V?this.U0():this.C==b.G7?this.yR():this.hB(),this.C=b.iN)};b.prototype.RHa=function(){if(this.Ia){var e=this.material(),g=h.createTexture();
g.flipY=this.Ia.flipY;g.format=this.Ia.format;g.colorSpace=this.Ia.colorSpace;this.Ia.isVideoTexture&&(g.isVideoTexture=!0,g.update=function(){});h.dispose(this.Ia);e&&h.sJa(g,e);e&&c.R3a(e,g);this.Ia=g;this.nda()}};b.prototype.nda=function(){};b.prototype.T8=function(){};b.prototype.U0=function(){};b.prototype.Q8=function(){};b.prototype.yR=function(){};b.prototype.hB=function(){h.s4a(this.texture)};b.prototype.n8a=function(){return this.C==b.$V||this.C==b.G7};b.prototype.Fja=function(){return this.C==
b.F7||this.C==b.eoa};b.prototype.dispose=function(){h.dispose(this.Ia);this.Ia=null};b.prototype.AJ=function(e){this.C=e?b.G7:b.eoa;e?this.Q8():this.trigger(l.Bc)};b.prototype.Lua=function(){this.C=b.F7;this.trigger(l.ea)};b.iN="initial";b.$V="loading";b.G7="adding";b.eoa="error loading";b.F7="added";b.nNa="custom";b.oNa="image tile";b.Qdb="image animation";b.Rdb="video 360";return b});
define("fr","require lV pB cA lS dR dk".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cA"),k=a("lS"),c=a("dR"),h=a("dk");a=d.extend(h,function(f){h.call(this);this.pf=h.nNa;this.Wd=f;this.Wd||(this.C=h.F7);this.xg=this.Md=null;this.qF=this.rF=void 0});a.prototype.Rm=function(f){this.xg=f;c.add(this.j,this.Ia,this.xg,function(){var b=this.Ia&&this.Ia.image&&this.Ia.image.width||void 0,e=this.Ia&&this.Ia.image&&this.Ia.image.height||void 0;void 0===this.rF||void 0===this.qF||this.rF===b&&this.qF===
e||this.RHa();this.rF=b;this.qF=e}.bind(this))};a.prototype.Cf=function(){return k.Cf(this.Wd)};a.prototype.update=function(f){f?c.add(this.j,this.Ia,this.xg):c.xha(this.j,this.Ia,this.xg)};a.prototype.T8=function(){this.Wd?this.ZN():this.AJ(!0)};a.prototype.U0=function(){this.Jq()};a.prototype.Q8=function(){this.Lua()};a.prototype.hB=function(){this.Jq()};a.prototype.dispose=function(){this.Jq();h.prototype.dispose.call(this)};a.prototype.Dd=function(){this.AJ(!0)};a.prototype.cg=function(){this.AJ(!1)};
a.prototype.nda=function(){this.xg&&c.xha(this.j,this.Ia,this.xg)};a.prototype.ZN=function(){this.Md||(this.Md=new m,this.Md.wM([this.Wd]),this.Md.bind(l.ea,this.Dd,this,!0),this.Md.bind(l.Bc,this.cg,this,!0),k.co(this.Md,this.jP))};a.prototype.Jq=function(){this.Md&&(this.Md.unbind(l.ea,this.Dd,this,!0),this.Md.unbind(l.Bc,this.cg,this,!0),k.Lj(this.Md,this.jP),this.Md=null)};return a});
define("nz","require lV pB cA lS dR dk".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cA"),k=a("lS"),c=a("dR"),h=a("dk");a=d.extend(h,function(f){h.call(this);this.pf=h.oNa;this.Wd=f;this.xg=this.ZJ=this.Md=null});a.prototype.Cf=function(){return this.xg};a.prototype.T8=function(){this.ZN()};a.prototype.U0=function(){this.Jq()};a.prototype.Q8=function(){this.rRa()};a.prototype.yR=function(){this.Jq();this.m$()};a.prototype.hB=function(){this.Jq();this.m$()};a.prototype.dispose=function(){this.Jq();
this.m$();h.prototype.dispose.call(this)};a.prototype.Dd=function(){this.xg=k.Cf(this.Wd);this.AJ(!0)};a.prototype.cg=function(){this.AJ(!1)};a.prototype.Mua=function(){this.Lua()};a.prototype.nda=function(){this.xg&&c.xha(this.j,this.Ia,this.xg)};a.prototype.ZN=function(){this.Md||(this.Md=new m,this.Md.wM([this.Wd]),this.Md.bind(l.ea,this.Dd,this,!0),this.Md.bind(l.Bc,this.cg,this,!0),k.co(this.Md,this.jP))};a.prototype.Jq=function(){this.Md&&(this.Md.unbind(l.ea,this.Dd,this,!0),this.Md.unbind(l.Bc,
this.cg,this,!0),k.Lj(this.Md,this.jP),this.Md=null)};a.prototype.rRa=function(){this.ZJ=c.add(this.j,this.Ia,this.xg);this.ZJ.bind(l.ea,this.Mua,this,!0)};a.prototype.m$=function(){this.ZJ&&(this.ZJ.unbind(l.ea,this.Mua,this,!0),this.ZJ.remove(),this.ZJ=null)};return a});
define("pL",["require","lV","lS","op","nz"],function(a){var d=a("lV"),l=a("lS"),m=a("op"),k=a("nz");a=d.extend(k,function(c,h,f,b,e){k.call(this,c.get("url"));this.Na=h;this.Qa=f;this.sa=b;this.wa=e;this.OVa=0!=this.Na||0!=this.Qa||this.sa!=c.get("width")||this.wa!=c.get("height")});a.prototype.Dd=function(){this.OVa?(this.yRa(),this.Jq(),this.AJ(!!this.xg)):k.prototype.Dd.call(this)};a.prototype.yR=function(){k.prototype.yR.call(this);this.n$()};a.prototype.hB=function(){k.prototype.hB.call(this);
this.n$()};k.prototype.dispose=function(){k.prototype.dispose.call(this);this.n$()};a.prototype.yRa=function(){var c=l.Cf(this.Wd);this.xg=m.U4a(c,this.Na,this.Qa,this.sa,this.wa)};a.prototype.n$=function(){this.xg&&(m.kia(this.xg),this.xg=null)};return a});
define("fO","require fq dO ns hV fr nz pL jJ cD eB ch nY kY w".split(" "),function(a){var d=a("fq"),l=a("dO"),m=a("ns"),k=a("hV"),c=a("fr"),h=a("nz"),f=a("pL"),b=a("jJ"),e=a("cD"),g=a("eB"),n=a("ch"),q=a("nY"),p=a("kY"),r=a("w"),t={K4a:function(u,v){var w=n.get(u);switch(w){case n.sz:case n.qv:case n.Dl:return this.bRa(w,u,v);case n.gq:case n.oq:case n.Us:return this.dRa(w,u,v)}},Y4a:function(u,v){var w=new h(v.get("posterURL"));w.GU(!0);return this.Uqa(u,v,w)},X4a:function(u,v){var w=new c;w.GU(!0);
return this.Uqa(u,v,w)},Uqa:function(u,v,w){var x=u.get("hfov"),y=u.get("vfov"),z=u.get("pitch"),B=v.get("width");v=v.get("url");u=n.get(u);var D=u==n.Us?2:1,F=u==n.oq?2:1;u=2<D+F?[l.ab,l.ub]:[l.av];var A=Math.round(B/D);B=new e.ro(v);var E=e.Qr(w.texture(),B);p.vM(E,w);E.visible=!0;return u.map(function(J,C){C=b.ECa(x,y,z,1,1,C%D/D,(F-1-Math.floor(C/D))/F,1/D,1/F);C=g.create(C,[E]);C.layers.set(J);p.h5(C,A/x);return C}.bind(this))},P4a:function(u){var v=[m.ub,m.ab,m.Hc,m.Ac,m.FRONT,m.BACK].map(function(){var x=
new c;x.Rm(t.tUa(u));var y=e.Qr(x.texture());p.vM(y,x);y.visible=!0;return y}),w=b.DCa(1,1);v=g.create(w,v);p.h5(v,256/90);v.layers.set(l.av);return v},ofa:{},tUa:function(u){if(!t.ofa[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.ofa[u]=v}return t.ofa[u]},bRa:function(u,v,w){var x=u==n.sz?[l.ub,l.ab]:[l.av],y=v.get("flipImageHorizontally");y&&(x=x.reverse());var z=u==n.Dl?1:6*x.length,B=w.get("width")/z,D=
w.get("height");if(d.Ja("TiledImageResourceLevel",w)){var F=w.get("colCount",z)/z;var A=w.get("rowCount",1)}else this.Uxa(u,w)?(F=Math.ceil(B/k.Av()),A=Math.ceil(D/k.Av())):A=F=1;var E=[m.ub,m.ab,m.Hc,m.Ac,m.FRONT,m.BACK];return x.map(function(J,C){var L=Array(6);E.forEach(function(U,X){var K=q.Lia(v,w,U);if(d.Ja("TiledImageResourceLevel",w))L[b.hoa.indexOf(U)]=this.YQa(K,u,J,U,y,F,A);else{X=u==n.Dl?0:Math.round((C*E.length+X)*B);var N=1<F||1<A||u!=n.Dl?256<B?1:.5:0;L[b.hoa.indexOf(U)]=this.Oqa(K,
F,A,X,0,B,D,N)}}.bind(this));var T=Array.prototype.concat.apply([],L),S=b.DCa(F,A);T=g.create(S,T);T.layers.set(J);p.h5(T,B/90);return T}.bind(this))},dRa:function(u,v,w){var x=u==n.gq?[l.av]:[l.ab,l.ub];v.get("flipImageHorizontally")&&(x=x.reverse());var y=w.get("width"),z=w.get("height"),B=v.get("hfov"),D=v.get("vfov"),F=v.get("pitch"),A=Math.round(y/B/(z/D)),E=Math.round(y/A),J=Math.round(z/Math.round(z/D/(y/B))),C=(u=this.Uxa(u,w))?Math.ceil(E/k.Av()):1,L=u?Math.ceil(J/k.Av()):1;return x.map(function(T,
S){S=this.Oqa(w,C,L,S%A*E,Math.floor(S/A)*J,E,J);var U=b.ECa(B,D,F,C,L,0,0,1,1);S=g.create(U,S);S.layers.set(T);p.h5(S,E/B);return S}.bind(this))},Uxa:function(u,v){switch(u){case n.sz:case n.qv:case n.oq:case n.Us:return!0;case n.Dl:return!1;case n.gq:return r.R6a().maxTextureSize<Math.max(v.get("width"),v.get("height"))?!0:k.Bp()||r.pb()?!1:r.jc()==r.$y?!0:!1}},Oqa:function(u,v,w,x,y,z,B,D){D||(D=0);for(var F=[],A=0;A<w;A++)for(var E=y+D+(B-2*D)*A/w,J=y+D+(B-2*D)*(A+1)/w,C=0;C<v;C++){var L=x+D+
(z-2*D)*C/v,T=x+D+(z-2*D)*(C+1)/v;L=u?new f(u,L,E,T-L,J-E):new c;T=e.$ha(L.texture());p.vM(T,L);F.push(T)}return F},YQa:function(u,v,w,x,y,z,B){for(var D=[],F=0;F<B;F++)for(var A=0;A<z;A++){var E=u?new h(q.mEa(u,v,w,x,y,B,F,A)):new c;var J=e.$ha(E.texture());p.vM(J,E);J.visible=!1;D.push(J)}return D}};return t});
define("du","require lV pB fS oT fO kY".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("fS"),k=a("oT"),c=a("fO"),h=a("kY");a=d.extend(m,function(f){m.call(this);this.Jc=f;this.set("tag","SolidFrame");this.dh=null});a.prototype.Zb=function(){this.dh=(new k(l.ea)).Tm(this.Dd.bind(this));m.prototype.Zb.call(this)};a.prototype.ac=function(){this.dh.dispose();m.prototype.ac.call(this)};a.prototype.Do=function(){var f=[c.P4a(this.Jc)];h.Iy(f,h.Ns);h.Hy(f,h.fq);this.dh.Hf(f);return f};a.prototype.Dd=
function(){this.trigger(l.jd);this.trigger(l.ea)};return a});
define("mp","require lV fa du pd bM kQ".split(" "),function(a){var d=a("lV"),l=a("fa"),m=a("du"),k=a("pd"),c=a("bM"),h=a("kQ");a=d.extend(l,function(f,b,e,g){l.call(this,f,b,e,g);this.fa=null;this.Cb=!1});a.prototype.Tg=function(){return this.Cb};a.prototype.Vg=function(f){if(!this.Cb){this.D.xl||(this.D.xl=new m("#000000"),this.D.xl.set("alpha",1),this.j.add(this.D.xl));if(!this.fa){this.D.xl.Kh();var b=2*this.D.Kha;this.fa=new k("linear",[new c("alpha",2,0,void 0)],b);this.D.xl.Kh()}this.fa.Fb(f);
this.D.xl.set("alpha",Math.min(.99,this.fa.eb("alpha")));this.j.Df(this.D.Rc).set("alpha",1);this.fa&&this.fa.Xe()&&(this.Cb=!0,this.j.remove(this.D.xl),this.D.xl=null);h.og.forEach(function(e){h.xla(e,!this.Cb)}.bind(this))}};return a});
define("bQ","require lV fa hV pd bM".split(" "),function(a){var d=a("lV"),l=a("fa"),m=a("hV"),k=a("pd"),c=a("bM");a=d.extend(l,function(h,f,b,e){l.call(this,h,f,b,e);this.Ri=this.j.M.Qd();this.fa=null;this.Cb=!1});a.prototype.Tg=function(){return this.Cb};a.prototype.Vg=function(h){if(!this.Cb){if(!this.fa){m.l5(!0);this.Ri.dH();this.j.Df(this.D.Wg).set("alpha",0);var f=this.D.KCa;this.fa=new k("linear",[new c("position",0,1,void 0)],f)}this.fa.Fb(h);this.Ri.TG(this.fa.eb("position"));this.fa.Xe()&&
(this.Cb=!0,this.Ri.YF(),m.l5(!1))}};return a});
define("ou","require lV fa du pd bM kQ".split(" "),function(a){var d=a("lV"),l=a("fa"),m=a("du"),k=a("pd"),c=a("bM"),h=a("kQ");a=d.extend(l,function(f,b,e,g){l.call(this,f,b,e,g);this.fa=null;this.Cb=!1});a.prototype.Tg=function(){return this.Cb};a.prototype.Vg=function(f){if(!this.Cb){this.D.xl||(this.D.xl=new m("#000000"),this.D.xl.set("alpha",0),this.j.add(this.D.xl));if(!this.fa){this.D.xl.Kh();var b=2*this.D.KCa;this.fa=new k("linear",[new c("alpha",0,2,void 0)],b)}this.fa.Fb(f);f=Math.min(1,
this.fa.eb("alpha"));this.D.xl.set("alpha",f);h.og.forEach(function(e){h.xla(e,!0)});1==f&&this.j.Df(this.D.Wg).set("alpha",0);this.fa.Xe()&&(this.Cb=!0)}};return a});
define("po",["require","lV","fa","pd","bM"],function(a){var d=a("lV"),l=a("fa"),m=a("pd"),k=a("bM");a=d.extend(l,function(c,h,f,b){l.call(this,c,h,f,b);this.fa=null;this.Cb=!1});a.prototype.Tg=function(){return this.Cb};a.prototype.Vg=function(c){if(!this.Cb){if(!this.fa){var h=this.j.Ee(),f=this.Kc.V4(this.D.Rc,h),b=!this.D.ob()&&.01<Math.abs(h-f)?this.D.b6:1;this.fa=new m("cubic_in_out",[new k("hfov",h,f,void 0)],b)}this.fa.Fb(c);this.Kc.Lp(this.fa.eb("hfov"));this.fa.Xe()&&(this.Kc.JU(!0),this.Cb=
!0)}};return a});
define("cr",["require","lV","fa","pd","bM"],function(a){function d(h,f,b){for(;h<f;)h+=b-f;for(;h>b;)h-=b-f;return h}var l=a("lV"),m=a("fa"),k=a("pd"),c=a("bM");a=l.extend(m,function(h,f,b,e){m.call(this,h,f,b,e);this.fa=null;this.Cb=!1;this.nZ=0});a.prototype.Tg=function(){return this.Cb};a.prototype.Vg=function(h){this.Cb||(this.fa||(this.fa=this.nZ<this.D.zp.length?this.nRa(this.nZ):this.UQa()),this.fa.Fb(h),this.Kc.Cla(this.fa.eb("yaw"),this.fa.eb("pitch")),this.Kc.Lp(this.fa.eb("hfov")),this.Kc.ZG(this.fa.eb("stereographicFactor")),
this.fa.Xe()&&(this.fa=null,this.nZ++,this.nZ>this.D.zp.length&&(this.Kc.JU(!0),this.Cb=!0)))};a.prototype.UQa=function(){var h=d(this.j.Pc(),-180,180),f=this.j.Oc();this.j.fg();var b=this.j.Ee(),e=this.j.C.Kj,g=this.D.Sg.get("hfov");g={Ra:this.D.Sg.get("yaw"),pitch:this.D.Sg.get("pitch",f),Fg:this.j.fg(),We:g?this.Kc.UF(g):b,Kj:0};this.Kc.n$a(this.D.Rc,g);g.Ra=d(g.Ra,h-180,h+180);var n=.5<Math.abs(b-g.We),q=Math.abs(e-g.Kj),p=.01<q;n=this.D.ob()?1:Math.max(n?this.D.b6:1,p?this.D.aHa*q:1);return new k(p?
"linear":"cubic_in_out",[new c("yaw",h,g.Ra,void 0),new c("pitch",f,g.pitch,void 0),new c("hfov",b,g.We,void 0),new c("stereographicFactor",e,g.Kj,void 0)],n)};a.prototype.nRa=function(h){var f=this.D.zp[h],b=d(this.j.Pc(),-180,180),e=this.j.Oc();this.j.fg();var g=this.j.Ee(),n=this.j.C.Kj,q=f.get("targetStereographicFactor",n),p=f.get("targetHfov");if(p)p=this.Kc.UF(p);else{for(p=!1;h<this.D.zp.length&&!p;h++)p=void 0!==this.D.zp[h].get("targetHfov");p?p=g:(p=this.Kc.UF(this.D.Sg.get("hfov",this.Kc.GCa())),
p=g+(p-g)*(n-q))}h=f.get("targetYaw",b);var r=f.get("targetPitch",e);this.j.fg();switch(f.get("path")){case "left":h=d(h,b-360,b);break;case "right":h=d(h,b,b+360);break;case "longest":h=d(h,-360,360);h=h>=b?d(h,b,b+360):d(h,b-360,b);break;default:h=d(h,b-180,b+180)}return new k(f.get("easing"),[new c("yaw",b,h,f.get("yawSpeed")),new c("pitch",e,r,f.get("pitchSpeed")),new c("hfov",g,p,f.get("hfovSpeed")),new c("stereographicFactor",n,q,f.get("stereographicFactorSpeed"))],f.get("duration"))};return a});
define("nj",["require","lV","fa","pd","bM"],function(a){var d=a("lV"),l=a("fa"),m=a("pd"),k=a("bM");a=d.extend(l,function(c,h,f,b){l.call(this,c,h,f,b);this.fa=null;this.Cb=!1});a.prototype.Tg=function(){return this.Cb};a.prototype.Vg=function(c){if(!this.Cb){if(!this.fa){var h=this.j.Oc(),f=this.j.Ee(),b=this.j.C.Kj,e=this.D.Uf.get("stereographicFactor",0),g=Math.abs(b-e),n=0<e?this.D.Uf.get("pitch",h):h,q=this.D.Uf.get("hfov");q=q?this.Kc.UF(q):f;0==e&&(q=Math.min(f,this.Kc.V4(this.D.Rc,q)));this.Kc.JU(!1);
g=this.D.ob()?1:Math.max(.5<Math.abs(f-q)?this.D.b6:1,.01<g?this.D.aHa:1);this.fa=new m("cubic_in_out",[new k("hfov",f,q,void 0),new k("pitch",h,n,void 0),new k("stereographicFactor",b,e,void 0)],g)}this.fa.Fb(c);this.Kc.Lp(this.fa.eb("hfov"));this.Kc.ZG(this.fa.eb("stereographicFactor"));this.Kc.Cla(this.j.Pc(),this.fa.eb("pitch"));this.fa.Xe()&&(this.Kc.tf(this.D.Rc,this.D.Uf.get("yaw"),this.D.Uf.get("pitch",this.j.Oc())),this.Cb=!0)}};return a});
define("gd",["require","lV","fa","pd","bM"],function(a){var d=a("lV"),l=a("fa"),m=a("pd"),k=a("bM");a=d.extend(l,function(c,h,f,b){l.call(this,c,h,f,b);this.fa=null;this.Cb=!1});a.prototype.Tg=function(){return this.Cb};a.prototype.Vg=function(c){if(!this.Cb){if(!this.fa){var h=this.j.Ee(),f=Math.min(this.Kc.V4(this.D.Rc,h),h),b=!this.D.ob()&&.01<Math.abs(h-f)?this.D.b6:1;this.fa=new m("cubic_in_out",[new k("hfov",h,f,void 0)],b);this.Kc.JU(!1)}this.fa.Fb(c);this.Kc.Lp(this.fa.eb("hfov"));this.fa.Xe()&&
(this.Kc.tf(this.D.Rc,this.j.Pc()+this.D.FM.GDa(),this.j.Oc()),this.Cb=!0)}};a.prototype.oG=function(){return!0};return a});define("eK",["require","lV","mJ"],function(a){var d=a("lV"),l=a("mJ");a=d.extend(l,function(m,k,c,h){l.call(this,m,k,c,h)});a.prototype.gh=function(){var m=this.j.Df(this.D.Wg);this.j.remove(m)};return a});
define("lv",["require","lV","mJ"],function(a){var d=a("lV"),l=a("mJ");a=d.extend(l,function(m,k,c,h){l.call(this,m,k,c,h)});a.prototype.gh=function(){var m=(this.D.cc||this.D.sc).get("model");m.set("objects",m.get("objects").filter(function(k){return k!=this.D.me}.bind(this)));[this.D.me.get("sourceCubeTexture"),this.D.me.get("targetCubeTexture")].forEach(function(k){k&&k.dispose()});this.D.me=null};return a});
define("mQ",["require","lV","mJ"],function(a){var d=a("lV"),l=a("mJ");a=d.extend(l,function(m,k,c,h){l.call(this,m,k,c,h)});a.prototype.gh=function(){var m=[this.j.Yc];this.TVa()&&m.push(this.D.lh);this.j.Yc.KG(m)};a.prototype.TVa=function(){return this.D.sc?!0:this.j.Yc.get("keepModel3DLoadedWithoutLocation")&&this.D.Wg&&this.D.lh&&this.D.lh.get("model")?!0:!1};return a});
define("qh",["require","exports","mJ"],function(a,d,l){return function(m){function k(c,h,f,b){return m.call(this,c,h,f,b)||this}Z(k,m);k.prototype.gh=function(){var c,h,f;null===(f=null===(h=null===(c=this.D.lh)||void 0===c?void 0:c.get("model"))||void 0===h?void 0:h.get("camera"))||void 0===f?void 0:f.i$a()};return k}(l)});
define("t",["require","lV","mJ"],function(a){var d=a("lV"),l=a("mJ");a=d.extend(l,function(m,k,c,h){l.call(this,m,k,c,h)});a.prototype.gh=function(){this.Kc.tf(this.D.Rc,this.D.Sg.get("yaw"),this.D.Sg.get("pitch",this.j.Oc()));var m=this.D.Sg.get("hfov");m&&(m=this.Kc.UF(m),this.Kc.Lp(m))};return a});
define("dB",["require","lV","lz","mJ"],function(a){var d=a("lV");a("lz");var l=a("mJ");a=d.extend(l,function(m,k,c,h){l.call(this,m,k,c,h)});a.prototype.gh=function(){var m=this.D.sc.get("model").get("camera");if(this.D.eH.get("keepInitialPositionOnTranslation")){var k=this.D.Sg.get("yaw");m=this.D.Sg.get("pitch")}else k=m.get("yaw")-this.D.sc.get("yaw"),m=this.D.eH.get("enterPointingToHorizon")?0:m.get("pitch");this.Kc.tf(this.D.Rc,k,m);if(k=this.D.Sg.get("hfov"))k=this.Kc.UF(k),this.Kc.Lp(k)};return a});
define("qa",["require","lV","ok","kQ","mJ"],function(a){var d=a("lV"),l=a("ok"),m=a("kQ"),k=a("mJ");a=d.extend(k,function(c,h,f,b){k.call(this,c,h,f,b)});a.prototype.gh=function(){if(m.isPresenting){var c=l.L5(m.dg,!0);this.D.sc.get("model").get("camera");var h=c.Ra-this.D.sc.get("yaw");c=c.pitch}else this.D.eH.get("keepInitialPositionOnTranslation")?(h=this.D.Sg.get("yaw"),c=this.D.Sg.get("pitch")):(c=this.D.sc.get("model").get("camera"),h=c.get("yaw")-this.D.sc.get("yaw"),c=c.get("pitch"));this.Kc.tf(this.D.Rc,
h,c)};return a});
define("lA",["require","lV","pB","fa"],function(a){var d=a("lV"),l=a("pB"),m=a("fa");a=d.extend(m,function(k,c,h,f){m.call(this,k,c,h,f);this.ja=null;this.Cb=!1});a.prototype.aXa=function(){this.Cb=!0};a.prototype.Tg=function(){return this.Cb};a.prototype.Vg=function(){if(!this.ja&&(this.ja=this.D.cc.get("model"),this.D.lh.get("model")==this.ja)){var k=this.ja.get("camera");k.set("easing",0);k.set("x",this.D.cc.get("x"));k.set("y",this.D.cc.get("y"));k.set("z",this.D.cc.get("z"));k.set("yaw",this.j.Pc()+
this.D.cc.get("yaw"));k.set("pitch",this.j.Oc());k.set("fov",this.j.Wa()>this.j.Ab()?this.j.rL():this.j.sL());this.ja.bind(l.Vh,this.aXa,this,!0)}};return a});
define("fB",["require","exports","mJ"],function(a,d,l){a=function(m){function k(c,h,f,b,e){c=m.call(this,c,h,f,b)||this;c.value=!1;c.value=e;return c}Z(k,m);k.prototype.gh=function(){var c,h=null===(c=this.D.cc||this.D.sc||this.D.lh)||void 0===c?void 0:c.get("model");h&&h.get("camera").set("inTransition",this.value)};return k}(l);d=function(m){function k(c,h,f,b){return m.call(this,c,h,f,b,!0)||this}Z(k,m);return k}(a);a.wh=d;d=function(m){function k(c,h,f,b){return m.call(this,c,h,f,b,!1)||this}
Z(k,m);return k}(a);a.If=d;return a});
define("nX",["require","exports","mJ"],function(a,d,l){a=function(m){function k(c,h,f,b,e){c=m.call(this,c,h,f,b)||this;c.enabled=!1;c.enabled=e;return c}Z(k,m);k.prototype.gh=function(){var c;null===(c=this.D.lh)||void 0===c?void 0:c.j.sb(this.enabled)};return k}(l);d=function(m){function k(c,h,f,b){return m.call(this,c,h,f,b,!0)||this}Z(k,m);return k}(a);a.wh=d;d=function(m){function k(c,h,f,b){return m.call(this,c,h,f,b,!1)||this}Z(k,m);return k}(a);a.If=d;return a});
define("kb",["require","exports","mJ"],function(a,d,l){a=function(m){function k(c,h,f,b,e){c=m.call(this,c,h,f,b)||this;c.paused=!1;c.paused=e;return c}Z(k,m);k.prototype.gh=function(){var c,h=null===(c=this.D.sc||this.D.cc||this.D.lh)||void 0===c?void 0:c.get("model");h&&this.D.lh.j.aJa(h,!this.paused)};return k}(l);d=function(m){function k(c,h,f,b){return m.call(this,c,h,f,b,!0)||this}Z(k,m);return k}(a);a.wh=d;d=function(m){function k(c,h,f,b){return m.call(this,c,h,f,b,!1)||this}Z(k,m);return k}(a);
a.If=d;return a});define("iu",["require","lV","mJ","qe"],function(a){var d=a("lV"),l=a("mJ"),m=a("qe");a=d.extend(l,function(k,c,h,f){l.call(this,k,c,h,f)});a.prototype.gh=function(){this.D.Rc&&(this.D.mode==m.Q7||this.D.mode==m.R7?this.D.Rc.set("minFaceSize",1024):this.D.Rc.set("minFaceSize",void 0))};return a});
define("hI",["require","lV","mJ"],function(a){var d=a("lV"),l=a("mJ");a=d.extend(l,function(m,k,c,h){l.call(this,m,k,c,h)});a.prototype.gh=function(){var m=this.D.bma?this.D.Uf.get("stereographicFactor",0):0;this.Kc.ZG(m);this.Kc.tf(this.D.Rc,this.D.Uf.get("yaw"),this.D.Uf.get("pitch",this.j.Oc()));(m=this.D.Uf.get("hfov"))||this.D.Wg||(m=this.Kc.GCa());m&&(m=this.Kc.UF(m),this.Kc.Lp(m),this.Kc.JU(!this.D.bma))};return a});
define("fp",["require","exports","mJ"],function(a,d,l){a=function(m){function k(c,h,f,b,e){c=m.call(this,c,h,f,b)||this;c.paused=!1;c.paused=e;return c}Z(k,m);k.prototype.gh=function(){this.j.nJa(this.paused)};return k}(l);d=function(m){function k(c,h,f,b){return m.call(this,c,h,f,b,!0)||this}Z(k,m);return k}(a);a.wh=d;d=function(m){function k(c,h,f,b){return m.call(this,c,h,f,b,!1)||this}Z(k,m);return k}(a);a.If=d;return a});
define("gI",["require","lV","mJ"],function(a){var d=a("lV"),l=a("mJ");a=d.extend(l,function(m,k,c,h){l.call(this,m,k,c,h)});a.prototype.gh=function(){var m=this.Kc.V4(this.D.Rc,this.j.Ee());this.Kc.Lp(m);this.Kc.tf(this.D.Rc,this.j.Pc()+this.D.FM.GDa(),this.j.Oc())};a.prototype.oG=function(){return!0};return a});
define("lM",["require","exports","fa","kQ"],function(a,d,l,m){a=function(k){function c(h,f,b,e,g){h=k.call(this,h,f,b,e)||this;h.value=!1;h.ended=!1;h.wait=!1;h.Tg=function(){return this.ended};h.value=g;h.value||(h.wait=!0);return h}Z(c,k);c.prototype.Vg=function(){m.og.forEach(function(h){m.xla(h,!this.value)}.bind(this));this.wait?this.wait=!1:this.ended=!0};return c}(l);d=function(k){function c(h,f,b,e){return k.call(this,h,f,b,e,!0)||this}Z(c,k);return c}(a);a.wh=d;d=function(k){function c(h,
f,b,e){return k.call(this,h,f,b,e,!1)||this}Z(c,k);return c}(a);a.If=d;return a});define("eb",["require","lV","mJ"],function(a){var d=a("lV"),l=a("mJ");a=d.extend(l,function(m,k,c,h){l.call(this,m,k,c,h)});a.prototype.gh=function(){this.D.cc&&this.D.lh.get("model")==this.D.cc.get("model")&&this.j.Yc.KG([this.D.lh])};return a});
define("bC",["require","lV","fa","hV","w"],function(a){var d=a("lV"),l=a("fa"),m=a("hV"),k=a("w");a=d.extend(l,function(c,h,f,b){l.call(this,c,h,f,b);this.C="not initialized";this.gb=0});a.prototype.Tg=function(){return"ended"==this.C};a.prototype.Vg=function(c){this.Tg()||("not initialized"==this.C&&this.xba(),"initialized"==this.C&&(this.np.get("ready")||this.np.lja())&&this.uR(),"started"==this.C&&this.oa(c),1<=this.gb&&this.mO())};a.prototype.xba=function(){this.jxa=this.D.EKa;this.EN=.25;this.rPa=
.75;this.CYa=.25;this.Tza=this.zUa();this.j8=.5*this.jxa;this.E1a=this.jxa-2*this.j8;this.xE=1/(this.j8+this.E1a);this.nW=this.xE/this.j8;this.Ax=0;this.np=this.j.Df(this.D.Rc);this.rfa=this.j.Df(this.D.Wg);this.II=this.D.FM.a6a();this.C="initialized"};a.prototype.zUa=function(){var c=this.D.FM.get("distance");return c?Math.min(.99,c/this.D.Wg.get("distanceToFloor")):.75};a.prototype.uR=function(){this.j.cJa(!this.D.ob()&&k.browser()!=k.Mj);this.np.Kh();this.C="started"};a.prototype.oa=function(c){this.np.get("ready")&&
m.l5(!0);this.np.get("ready")||this.gb<this.CYa?this.gb>=1-.5*this.Ax*this.Ax/this.nW?this.Ax=Math.sqrt(2*(1-this.gb)*this.nW):this.Ax<this.xE&&(this.Ax=Math.min(this.Ax+this.nW*c,this.xE)):this.Ax=Math.max(this.Ax-this.nW*c,0);this.gb=Math.min(Math.max(0,this.gb+this.Ax*c),1);this.np.get("ready")||(this.EN=Math.max(this.EN,this.gb));this.z1(this.gb,Math.max(0,Math.min(1,(this.gb-this.EN)/(this.rPa-this.EN))))};a.prototype.mO=function(){this.np.set("alpha",1);this.j.cJa(!1);this.C="ended";m.l5(!1)};
a.prototype.z1=function(c,h){var f=(c-1)*this.Tza;this.np.set("translationX",f*this.II.x);this.np.set("translationY",f*this.II.y);this.np.set("translationZ",f*this.II.z);this.np.get("ready");c*=this.Tza;this.rfa.set("translationX",c*this.II.x);this.rfa.set("translationY",c*this.II.y);this.rfa.set("translationZ",c*this.II.z);this.np.set("alpha",Math.max(.01,Math.min(.99,h)))};a.prototype.oG=function(){return this.gb<this.EN};return a});
define("fA",["require","fq","fz"],function(a){var d=a("fq"),l=a("fz");return d.define("TargetModel3DCameraMovement",l,function(){l.call(this)})});
define("ha","require lV pB lx hm fA fa kQ".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("lx"),k=a("hm"),c=a("fA"),h=a("fa"),f=a("kQ");a=d.extend(h,function(e,g,n,q){h.call(this,e,g,n,q);this.vr=this.Cb=!1});a.prototype.Tg=function(){return this.Cb};a.prototype.Vg=function(){this.D.lh.get("model")!=this.D.cc.get("model")?this.Bt():this.Nb?this.Nb.get("state")==m.U&&setTimeout(function(){this.Bt()}.bind(this),10):this.vr||(this.vr=!0,this.jfa(),this.mR())};a.prototype.jfa=function(){var e=this.D.cc.get("model").get("camera");
this.bea=e.get("sequences").find(function(p){return p.get("state")===m.PLAYING});var g=e.vK;g||(g={x:e.get("initialX",e.get("x")),y:e.get("initialY",e.get("y")),z:e.get("initialZ",e.get("z")),yaw:e.get("initialYaw",e.get("yaw")),pitch:e.get("initialPitch",e.get("pitch")),fov:e.get("initialFov",e.get("fov")),distance:e.get("initialDistance",e.get("distance"))});e.set("easing",0);e.set("x",this.D.cc.get("x"));e.set("y",this.D.cc.get("y"));e.set("z",this.D.cc.get("z"));e.set("distance",0);f.isPresenting||
e.set("yaw",this.j.Pc()+this.D.cc.get("yaw"));e.set("pitch",this.j.Oc());e.set("fov",this.j.Wa()>this.j.Ab()?this.j.rL():this.j.sL());var n=[];if(this.D.IB){var q=new c;q.set("duration",this.D.p3);q.set("easing","linear");q.bind(l.Vh,this.Vca,this,!0);this.R$=q;n.push(q);this.D.me.set("sourceAlpha",1)}else this.D.me.set("sourceAlpha",.99);this.Ud=new c;this.Ud.set("targetX",g.x);this.Ud.set("targetY",g.y);this.Ud.set("targetZ",g.z);f.isPresenting||this.Ud.set("targetYaw",g.yaw);this.Ud.set("targetPitch",
g.pitch);this.Ud.set("targetFov",g.fov);this.Ud.set("targetDistance",g.distance);this.Ud.set("duration",this.D.m9a);this.Ud.set("easing","quad_in_out");this.Ud.bind(l.Vh,this.eda,this,!0);n.push(this.Ud);this.Nb=new k;this.Nb.set("movements",n);this.Nb.set("mandatory",!0);this.Nb.set("internal",!0);this.Nb.bind(l.Gb,this.Bt,this,!0);e.set("sequences",e.get("sequences").concat([this.Nb]));this.Nb.play();this.CR=(new THREE.Vector3).set(g.x,g.y,g.z);this.cB=(new THREE.Vector3).set(this.D.cc.get("x"),
this.D.cc.get("y"),this.D.cc.get("z"))};a.prototype.Vca=function(){var e=this.R$.get("position");this.D.me.set("sourceAlpha",1-e);this.D.me.set("targetAlpha",0)};a.prototype.eda=function(){if(this.D.IB)this.D.me.set("sourceAlpha",0),this.D.me.set("targetAlpha",0);else{var e=this.EO();this.D.me.set("sourceAlpha",1-Math.max(.01,Math.min(.99,(e-0)/.33)))}};var b=new THREE.Vector3;a.prototype.EO=function(){var e=this.D.cc.get("model").get("camera");return b.set(e.get("x"),e.get("y"),e.get("z")).distanceTo(this.cB)/
this.cB.distanceTo(this.CR)};a.prototype.Bt=function(){if(!this.Cb){var e=this.D.cc.get("model").get("camera");e.set("sequences",e.get("sequences").filter(function(g){return g!=this.Nb}.bind(this)));this.bea&&e.get("sequences").includes(this.bea)&&this.bea.play();this.Cb=!0;this.TQ()}};a.prototype.mR=function(){var e=this.D.cc.get("model");this.HQ=e.get("postprocessing");this.IQ=e.get("surfaceSelectionEnabled");e.set("postprocessing",!1);e.set("surfaceSelectionEnabled",!1)};a.prototype.TQ=function(){var e=
this.D.cc.get("model"),g=this.HQ,n=this.IQ;setTimeout(function(){e.set("postprocessing",g);e.set("surfaceSelectionEnabled",n)},30)};return a});
define("iK","require lV pB hm fA fa kQ".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("hm"),k=a("fA"),c=a("fa"),h=a("kQ");a=d.extend(c,function(b,e,g,n){c.call(this,b,e,g,n);this.Cb=this.vr=!1});a.prototype.Tg=function(){return this.Cb};a.prototype.Vg=function(){this.D.lh.get("model")!=this.D.sc.get("model")?this.Tva():this.vr||(this.vr=!0,this.R_a(),this.mR())};a.prototype.R_a=function(){var b=this.D.sc.get("model").get("camera");b.set("easing",0);b.set("x",this.D.cc.get("x"));b.set("y",this.D.cc.get("y"));
b.set("z",this.D.cc.get("z"));b.set("distance",0);h.isPresenting||b.set("yaw",this.j.Pc()+this.D.cc.get("yaw"));b.set("pitch",this.j.Oc());b.set("fov",this.j.Wa()>this.j.Ab()?this.j.rL():this.j.sL());var e=[];if(this.D.IB){var g=new k;g.set("duration",this.D.p3);g.set("easing","linear");g.bind(l.Vh,this.Vca,this,!0);this.R$=g;e.push(g);this.D.me.set("skyBox",!1);this.D.me.set("nearPlane",!0);this.D.me.set("sourceAlpha",1);this.D.me.set("targetAlpha",0)}else this.D.me.set("skyBox",!0),this.D.me.set("nearPlane",
!1),this.D.me.set("targetAlpha",.01),this.D.me.set("sourceAlpha",.99);this.Ud=new k;this.Ud.set("targetX",this.D.sc.get("x"));this.Ud.set("targetY",this.D.sc.get("y"));this.Ud.set("targetZ",this.D.sc.get("z"));this.D.eH.get("keepInitialPositionOnTranslation")&&(h.isPresenting||(g=this.D.Sg.get("yaw")+this.D.sc.get("yaw"),this.Ud.set("targetYaw",g)),g=this.D.Sg.get("pitch"),void 0!==g&&this.Ud.set("targetPitch",g),g=this.D.Sg.get("hfov"),void 0!==g&&this.Ud.set("targetFov",g));this.Ud.set("duration",
1500);this.Ud.set("easing","cubic_in_out");this.Ud.bind(l.Vh,this.bXa,this,!0);e.push(this.Ud);this.D.IB&&(g=new k,g.set("duration",this.D.p3),g.set("easing","linear"),g.bind(l.Vh,this.Uca,this,!0),this.Q$=g,e.push(g));this.Nb=new m;this.Nb.set("movements",e);this.Nb.set("mandatory",!0);this.Nb.set("internal",!0);this.Nb.bind(l.Gb,this.Tva,this,!0);b.set("sequences",b.get("sequences").concat([this.Nb]));this.Nb.play();this.cB=(new THREE.Vector3).set(this.D.cc.get("x"),this.D.cc.get("y"),this.D.cc.get("z"));
this.CR=(new THREE.Vector3).set(this.D.sc.get("x"),this.D.sc.get("y"),this.D.sc.get("z"))};a.prototype.bXa=function(){if(this.D.IB)this.D.me.set("sourceAlpha",0),this.D.me.set("targetAlpha",0);else{var b=this.EO();this.D.me.set("targetAlpha",Math.max(.01,Math.min(.99,b-0)));this.D.me.set("sourceAlpha",1)}};var f=new THREE.Vector3;a.prototype.EO=function(){var b=this.D.cc.get("model").get("camera");return f.set(b.get("x"),b.get("y"),b.get("z")).distanceTo(this.cB)/this.cB.distanceTo(this.CR)};a.prototype.Vca=
function(){var b=this.R$.get("position");this.D.me.set("sourceAlpha",1-b);this.D.me.set("targetAlpha",0)};a.prototype.Uca=function(){var b=this.Q$.get("position");this.D.me.set("sourceAlpha",0);this.D.me.set("targetAlpha",b)};a.prototype.Tva=function(){var b=this.D.cc.get("model").get("camera");b.set("sequences",b.get("sequences").filter(function(e){return e!=this.Nb}.bind(this)));this.TQ();this.Cb=!0};a.prototype.mR=function(){var b=this.D.cc.get("model"),e=this.D.lh;this.HQ=b.get("postprocessing");
this.IQ=b.get("surfaceSelectionEnabled");this.qYa=e.get("spritesEnabled");b.set("postprocessing",!1);b.set("surfaceSelectionEnabled",!1);e.set("spritesEnabled",!1)};a.prototype.TQ=function(){var b=this.D.cc.get("model"),e=this.D.lh,g=this.HQ,n=this.IQ,q=this.qYa;setTimeout(function(){b.set("postprocessing",g);b.set("surfaceSelectionEnabled",n);e.set("spritesEnabled",q)},500)};return a});
define("lR","require lV pB lx hm fA fa lz kQ".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("lx"),k=a("hm"),c=a("fA"),h=a("fa"),f=a("lz"),b=a("kQ");a=d.extend(h,function(g,n,q,p){h.call(this,g,n,q,p);this.vr=this.Cb=!1});a.prototype.Tg=function(){return this.Cb};a.prototype.Vg=function(){this.Nb?this.Nb.get("state")==m.U&&setTimeout(function(){this.Bt()}.bind(this),10):this.vr||(this.vr=!0,this.jfa(),this.mR())};a.prototype.jfa=function(){var g=this.D.sc.get("model").get("camera");g.Vbb();var n=
Math.abs(g.get("pitch")-this.j.Oc()),q=30<n;this.Ud=new c;this.Ud.set("targetX",this.D.sc.get("x"));this.Ud.set("targetY",this.D.sc.get("y"));this.Ud.set("targetZ",this.D.sc.get("z"));this.Ud.set("targetDistance",0);this.Ud.set("targetFov",this.RUa(this.j.Ee()));b.isPresenting||this.Ud.set("targetYaw",this.j.Pc()+this.D.sc.get("yaw"));q?this.Ud.set("targetPitch",g.get("pitch")):this.Ud.set("targetPitch",this.j.Oc());this.Ud.set("duration",this.D.t8a);this.Ud.set("easing","cubic_in_out");this.Ud.bind(l.Vh,
this.eda,this,!0);var p=[this.Ud];q&&(q=new c,q.set("targetPitch",this.j.Oc()),q.set("duration",n/90*1E3),q.set("easing","quad_in_out"),p.push(q));this.D.IB?(n=new c,n.set("duration",this.D.p3),n.set("easing","linear"),n.bind(l.Vh,this.Uca,this,!0),this.Q$=n,p.push(n),this.D.me.set("targetAlpha",0)):this.D.me.set("targetAlpha",.01);this.Nb=new k;this.Nb.set("movements",p);this.Nb.set("mandatory",!0);this.Nb.set("internal",!0);this.Nb.bind(l.Gb,this.Bt,this,!0);g.set("sequences",g.get("sequences").concat([this.Nb]));
this.Nb.play();this.cB=(new THREE.Vector3).set(g.get("x"),g.get("y"),g.get("z"));this.CR=(new THREE.Vector3).set(this.D.sc.get("x"),this.D.sc.get("y"),this.D.sc.get("z"))};a.prototype.RUa=function(g){return this.j.Wa()<this.j.Ab()?f.Gm(g,this.j.Wa(),this.j.Ab()):g};a.prototype.eda=function(){if(!this.Cb&&!this.D.IB){var g=this.EO();this.D.me.set("targetAlpha",Math.max(.01,Math.min(.99,(g-.66)/(1-.66))))}};var e=new THREE.Vector3;a.prototype.EO=function(){var g=this.D.sc.get("model").get("camera");
return e.set(g.get("x"),g.get("y"),g.get("z")).distanceTo(this.cB)/this.cB.distanceTo(this.CR)};a.prototype.Uca=function(){var g=this.Q$.get("position");this.D.me.set("targetAlpha",g)};a.prototype.Bt=function(){this.Cb||this.wSa()};a.prototype.wSa=function(){var g=this.D.sc.get("model").get("camera");g.set("sequences",g.get("sequences").filter(function(n){return n!=this.Nb}.bind(this)));this.Cb=!0;this.Nb=null;this.TQ();this.j.Df(this.D.Rc).set("alpha",1)};a.prototype.mR=function(){var g=this.D.sc.get("model");
this.HQ=g.get("postprocessing");this.IQ=g.get("surfaceSelectionEnabled");g.set("postprocessing",!1);g.set("surfaceSelectionEnabled",!1)};a.prototype.TQ=function(){var g=this.D.sc.get("model"),n=this.HQ,q=this.IQ;setTimeout(function(){g.set("postprocessing",n);g.set("surfaceSelectionEnabled",q)},30)};return a});define("jB",["require","lV","mJ"],function(a){var d=a("lV"),l=a("mJ");a=d.extend(l,function(m,k,c,h,f){l.call(this,m,k,c,h);this.MPa=f});a.prototype.gh=function(){this.MPa.call(this.O)};return a});
define("gC",["require","lV","fa"],function(a){var d=a("lV"),l=a("fa");a=d.extend(l,function(m,k,c,h){l.call(this,m,k,c,h)});a.prototype.Tg=function(){var m=this.j.Db(),k=m&&m.JK;m=m&&m.oJ;return!!k&&!k.get("visible")&&!!m&&!m.get("visible")};return a});
define("N",["require","lV","fa"],function(a){var d=a("lV"),l=a("fa"),m=d.extend(l,function(k,c,h,f){l.call(this,k,c,h,f);this.px=null});m.prototype.Tg=function(){this.px||(this.px=this.D.Rc&&this.j.Df(this.D.Rc));return this.px&&this.px.get("ready")};m.prototype.oG=function(){return!0};m.HMa=d.extend(m,function(k,c,h,f){m.call(this,k,c,h,f)});m.HMa.prototype.oG=function(){return!1};m.NMa=d.extend(m,function(k,c,h,f){m.call(this,k,c,h,f)});m.NMa.prototype.Tg=function(){this.px||(this.px=this.D.Rc&&
this.j.Df(this.D.Rc));return this.px&&(this.px.get("ready")||this.px.Bka())};return m});
define("pM","require cI gF hj qe mA dc mi oP ik bI fw mp bQ ou po cr nj gd eK lv mQ qh t dB qa lA fB nX kb iu hI fp gI lM eb bC ha iK lR jB gC N lV".split(" "),function(a){var d=a("cI"),l=a("gF"),m=a("hj"),k=a("qe"),c=a("mA"),h=a("dc"),f=a("mi"),b=a("oP"),e=a("ik"),g=a("bI"),n=a("fw"),q=a("mp"),p=a("bQ"),r=a("ou"),t=a("po"),u=a("cr"),v=a("nj"),w=a("gd"),x=a("eK"),y=a("lv"),z=a("mQ"),B=a("qh"),D=a("t"),F=a("dB"),A=a("qa"),E=a("lA"),J=a("fB"),C=a("nX"),L=a("kb"),T=a("iu"),S=a("hI"),U=a("fp"),X=a("gI"),
K=a("lM"),N=a("eb"),V=a("bC"),W=a("ha"),aa=a("iK"),ca=a("lR"),ea=a("jB"),I=a("gC"),P=a("N"),R=a("lV").extend(l,function(M,Q,Y){l.call(this);this.M=M;this.j=Q;this.pc=Y;this.Kc=this.vt=null;this.gra=this.jt=this.vQ=this.ex=void 0;this.D=null;this.hh=[]});R.prototype.vla=function(M){this.vt=M};R.prototype.clear=function(){this.zea(this.jt);this.D&&this.zea(this.D.Rc);this.vQ=this.ex=void 0;this.pa=this.pc=this.j=this.M=this.D=null};R.prototype.start=function(M,Q){!this.D&&M==this.jt||this.D&&M==this.D.Rc?
this.vQ=this.ex=void 0:(this.ex=M,this.vQ=Q,0==this.hh.length&&this.R0())};R.prototype.hide=function(){this.ex=null;!this.D&&this.jt&&this.R0()};R.prototype.mja=function(){return null!==this.D};R.prototype.W5a=function(){return this.D&&this.D.Rc};R.prototype.R0=function(){this.D=new k(this.j,this.vt,this.jt,this.ex,this.vQ);this.Kc=new m(this.j,this.pc,this.D);this.vQ=this.ex=void 0;this.ga(T);this.ga(f);switch(this.D.mode){case k.Zma:this.ga(K.If);this.ga(B);this.D.ob()?(this.ga(r),this.hc(this.Hx)):
(this.hc(this.Hx),this.ga(p));this.ga(U.wh);this.ga(L.If);this.ga(C.wh);this.hc(this.gB);this.ga(x);this.hc(this.au);this.ga(J.If);this.ga(K.wh);break;case k.Yma:this.ga(z);this.hc(this.wF);this.ga(P);this.ga(e);this.ga(S);this.hc(this.Ix);this.ga(n);this.ga(I);this.ga(u);this.hc(this.vF);break;case k.NV:this.ga(z);this.hc(this.Hx);this.ga(K.If);this.D.ob()?this.ga(r):this.ga(p);this.hc(this.wF);this.hc(this.gB);this.ga(x);this.hc(this.au);this.ga(P);this.ga(e);this.ga(S);this.hc(this.Ix);this.D.ob()?
this.ga(q):this.ga(n);this.ga(K.wh);this.ga(I);this.ga(u);this.hc(this.vF);break;case k.koa:this.ga(z);this.hc(this.wF);this.hc(this.Hx);this.hc(this.gB);this.D.ob()?(this.ga(P),this.ga(X),this.hc(this.Ix),this.ga(V),this.ga(x),this.hc(this.au)):(this.ga(w),this.hc(this.Ix),this.ga(V),this.ga(x),this.hc(this.au),this.ga(t),this.ga(e),this.ga(I));this.hc(this.vF);break;case k.oo:this.ga(z);this.hc(this.wF);this.ga(P);this.D.ob()?(this.hc(this.Hx),this.hc(this.gB),this.ga(D),this.hc(this.Ix),this.ga(c),
this.ga(x),this.hc(this.au)):(this.hc(this.Hx),this.hc(this.gB),this.ga(v),this.hc(this.Ix),this.ga(c),this.ga(x),this.hc(this.au),this.ga(e),this.ga(I),this.ga(u));this.hc(this.vF);break;case k.Q7:this.ga(U.wh);this.ga(z);this.hc(this.wF);this.ga(b);this.ga(L.If);this.ga(P);this.ga(K.If);this.ga(h.T7);this.ga(F);this.ga(ca);this.ga(J.If);this.ga(J.wh);this.hc(this.Ix);this.ga(U.If);this.ga(C.If);this.ga(y);this.ga(K.wh);this.ga(e);this.ga(I);this.ga(L.wh);this.hc(this.vF);break;case k.moa:this.ga(b);
this.hc(this.Hx);this.ga(E);this.hc(this.gB);this.ga(K.If);this.ga(h.K7);this.ga(U.wh);this.ga(L.If);this.ga(x);this.hc(this.au);this.ga(W);this.ga(J.If);this.ga(y);this.ga(K.wh);this.ga(N);break;case k.R7:this.hc(this.wF);this.ga(b);this.hc(this.Hx);this.hc(this.gB);this.ga(K.If);this.ga(h.K7);this.ga(P);this.ga(h.T7);this.ga(E);this.ga(U.wh);this.ga(L.If);this.ga(x);this.hc(this.au);this.ga(aa);this.ga(C.If);this.ga(J.If);this.ga(y);this.ga(A);this.hc(this.Ix);this.ga(g);this.ga(U.If);this.ga(K.wh);
this.ga(e);this.ga(I);this.ga(L.wh);this.hc(this.vF);break;case k.loa:this.hc(this.wF),this.ga(b),this.ga(K.If),this.ga(h.K7),this.ga(E),this.ga(U.wh),this.ga(L.If),this.ga(P),this.hc(this.Hx),this.hc(this.gB),this.ga(x),this.hc(this.au),this.ga(W),this.ga(y),this.ga(h.T7),this.ga(F),this.ga(ca),this.ga(J.If),this.hc(this.Ix),this.ga(U.If),this.ga(C.If),this.ga(y),this.ga(K.wh),this.ga(L.wh),this.hc(this.vF)}this.hc(this.w1a);this.Sa()};R.prototype.Zfa=function(){this.jt=this.D.Rc;this.gra=this.D.eH;
this.D=this.Kc=null;void 0===this.ex?this.jt?this.f1a(this.jt,this.gra):this.g1a():this.R0()};window.B4a=!0;window.C4a=!0;document.addEventListener("keydown",function(M){67==M.which&&(window.B4a=window.C4a=!0)});R.prototype.Ay=function(M){for(;this.hh.length;){var Q=this.hh[0];Q.v0a||(Q.v0a=(new Date).getTime());if(void 0!==this.ex&&this.ex!==this.jt&&Q.oG()){this.zea(this.D.Rc);this.hh=[];this.R0();break}else if(Q.Vg(M),this.Sa(),this.Kc.Ay(M),Q.Tg())this.hh.shift(),0==this.hh.length&&this.Zfa();
else break}};document.addEventListener("keydown",function(){(new Date).getTime()});document.addEventListener("keyup",function(){(new Date).getTime()});R.prototype.Od=function(){};R.prototype.ga=function(M){this.hh.push(new M(this,this.Kc,this.j,this.D))};R.prototype.hc=function(M){this.hh.push(new ea(this,this.Kc,this.j,this.D,M))};R.prototype.zea=function(M){M&&(M=this.j.Df(M))&&(this.j.remove(M),this.au())};R.prototype.wF=function(){this.trigger(new d(R.d7,{panorama:this.D.Rc}))};R.prototype.au=
function(){this.trigger(new d(R.U6,{panorama:this.D?this.D.Wg:this.jt,nextPanorama:this.D?this.D.Rc:null}))};R.prototype.Hx=function(){this.trigger(new d(R.FC,{panorama:this.D.Wg}))};R.prototype.gB=function(){this.trigger(new d(R.EC,{panorama:this.D.Wg,nextPanorama:this.D.Rc}))};R.prototype.vF=function(){this.trigger(new d(R.GC,{panorama:this.D.Rc,camera:this.D.eH}))};R.prototype.w1a=function(){this.trigger(new d(R.$p))};R.prototype.Ix=function(){this.trigger(new d(R.HC,{panorama:this.D.Rc,camera:this.D.eH}))};
R.prototype.f1a=function(M,Q){this.trigger(new d(R.A6,{panorama:M,camera:Q}))};R.prototype.g1a=function(){this.trigger(new d(R.B6))};R.prototype.Sa=function(){this.trigger(new d(R.Ob))};R.Ob="request frame";R.d7="request load";R.U6="panorama removed";R.A6="all pending panoramas displayed";R.B6="all pending panoramas hidden";R.EC="panorama end";R.HC="panorama start";R.GC="panorama show";R.FC="panorama hide";R.$p="transition end";return R});
define("mU",["require","lV","cI","gF"],function(a){var d=a("lV"),l=a("cI"),m=a("gF"),k=d.extend(m,function(c){m.call(this);this.j=c});k.prototype.clear=function(){this.end();this.j=null};k.prototype.EL=function(c){for(var h=this.ZX(c),f=c.fT(),b=0;b<h;b++)this.j.Df(this.saa(c,b)).set("alpha",b==f?1:0)};k.prototype.getTime=function(){return 0};k.prototype.start=function(){};k.prototype.end=function(){};k.prototype.play=function(){};k.prototype.pause=function(){};k.prototype.dM=function(){};k.prototype.mM=
function(){};k.prototype.w5=function(){};k.prototype.stop=function(){};k.prototype.XG=function(){};k.prototype.aC=function(){};k.prototype.KM=function(){};k.prototype.Od=function(){};k.prototype.pk=function(){};k.prototype.ZX=function(c){return c.get("frames").length};k.prototype.saa=function(c,h){return c.get("frames")[h]};k.prototype.Sa=function(){this.trigger(new l(k.Ob))};k.prototype.Br=function(c,h,f,b,e,g){this.trigger(new l(k.Nj,{time:c,duration:h,transitionPosition:f,transitionLength:b,steps:e,
selectedStep:g}))};k.prototype.ik=function(){this.trigger(new l(k.Uc,{state:this.pk()}))};k.Ob="request frame";k.QLa="frame display";k.RLa="frame hide";k.Nj="time change";k.Uc="playback state change";return k});
define("bx","require jquery.mod er lV pB iy cI mU oo fD mV kQ mD".split(" "),function(a){a("jquery.mod");var d=a("er"),l=a("lV"),m=a("pB"),k=a("iy");a("cI");var c=a("mU"),h=a("oo"),f=a("fD");a("mV");a("kQ");var b=a("mD"),e=l.extend(c,function(g){c.call(this,g);this.QX=null;this.baa=this.VD=0;this.za=this.wE=null;this.uO=void 0;this.Vda=!1;this.Xa=360;this.gBa=180;this.wb=.5;this.Qo=.2;this.Iw=.45;this.Zta=5E3;this.cua=1;this.eZ=[[.5,.25],[.5,.375],[.25,.5],[.375,.5],[.5,.5],[.625,.5],[.75,.5],[.5,
.625],[.5,.75]];this.hWa=[.05,.1,.05,.1,.4,.1,.05,.1,.05]});e.prototype.EL=function(g){c.prototype.EL.call(this,g);this.eR(g)};e.prototype.start=function(g){this.eR(g);this.Sa()};e.prototype.end=function(){this.eR(null)};e.prototype.eR=function(g){this.za!=g&&(this.za&&(this.A1a(),this.za=null,this.G1a()),this.za=g)&&(this.mPa(),this.Xa=g.get("hfov",360),this.gBa=g.get("vfov",180),this.wb=g.get("pitch",0),this.aea=this.WE=void 0,this.ZVa(g),this.gb=.5)};e.prototype.KM=function(){this.Vda=!1};e.prototype.XG=
function(g){this.gb=g/e.rN;this.Sa();this.Vda=!0};e.prototype.aC=function(g){this.XG(g)};e.prototype.Br=function(){var g=this.ZX(this.za),n=this.gb*(g-1),q=Math.max(0,Math.min(g-2,Math.floor(n))),p=void 0;.01>n-q?p=q:.99<n-q&&(p=q+1);c.prototype.Br.call(this,this.gb*e.rN,e.rN,this.gb*e.rN,e.rN,g,p)};e.prototype.Od=function(g){if(this.za){var n=this.j.Pc(),q=this.j.Oc(),p=this.j.fg(),r=0;if(void 0!==this.WE&&void 0!==this.aea&&void 0!==this.txa){var t=n-this.WE,u=q-this.aea,v=p-this.txa;r=1E3*Math.sqrt(t*
t+u*u+v*v)/g}this.WE=n;this.aea=q;this.txa=p;t=this.ZX(this.za);var w=this.gb*(t-1);u=Math.max(0,Math.min(t-2,Math.floor(w)));v=u+1;w=1-(w-u);for(var x=1-w,y=[],z=0;z<t;z++)y.push(0);y[v]=x;y[u]=1>x?1:0;for(z=0;z<t;z++)this.j.Df(this.saa(this.za,z)).set("alpha",y[z]);this.Br();if(this.QX&&(r<=this.cua||this.j.ds())&&!this.Vda){z=Math.PI/180;r=180/Math.PI;y=this.j.Wa();var B=this.j.Ab(),D=new f;D.rotateZ(-p*z);D.rotateX(-q*z);D.rotateY(-n*z);n=[];for(z=0;z<this.eZ.length;z++)q=new h(this.eZ[z][0]*
y,this.eZ[z][1]*B,0),p=this.j.unproject(q).oEa(),p.apply(D),q=p.Pc()*r,p=p.Oc()*r,n.push(Math.round((90-p)*this.baa/180)*this.VD+Math.round((q+180)*this.VD/360));q=[];for(z=0;z<t;z++){p=this.QX[z];for(y=r=0;y<this.eZ.length;y++)r+=this.hWa[y]*p[n[y]];q.push(r)}z=q[u];n=q[v];u=w*q[u]+x*q[v];g=Math.min(1/t,g/this.Zta);t=this.gb;v=Math.max.apply(Math,q);w=Math.min.apply(Math,q);u<this.Qo&&u<v?t=n>u?t+g:t-g:u>this.Iw&&u>w&&(t=z<u?t-g:t+g);t=Math.min(1,Math.max(0,t));this.gb!=t&&(this.gb=t,this.Sa())}}};
e.prototype.ZVa=function(g){var n=d(g.get("frames",[])).map(function(q){return q.get("thumbnailUrl")});this.wE=d(n).map(function(q){var p=null;q&&(p=new b(k.Cl),p.bind(m.ea,this.Kva,this),p.bind(m.Bc,this.Lva,this));return p},this);d(this.wE).each(function(q,p){q&&q.load(n[p])})};e.prototype.G1a=function(){this.bra();this.QX=null};e.prototype.YWa=function(){this.VD=150;this.wE.map(function(g){g&&(this.VD=Math.min(360*g.Fe()/this.Xa,this.VD))},this);this.baa=Math.round(this.VD/2);this.QX=this.wE.map(function(g){return this.kRa(g,
this.VD,this.baa,this.Xa,this.gBa,this.wb)},this);this.bra()};e.prototype.kRa=function(g,n,q,p,r,t){var u=document.createElement("canvas");u.width=n;u.height=q;var v=u.getContext("2d");v.fillStyle="#000000";v.fillRect(0,0,n,q);g&&(g=g.Cf(),p=Math.round(n*p/360),v.drawImage(g,.5*(n-p),Math.round(q*(90-(t+.5*r))/180),p,Math.round(q*r/180)));n=[];u=v.getImageData(0,0,u.width,u.height);for(q=v=0;v<u.height;v++)for(r=0;r<u.width;r++,q+=4)n.push((.299*u.data[q]+.587*u.data[q+1]+.114*u.data[q+2])/255);return n};
e.prototype.bra=function(){d(this.wE).each(function(g){g&&(g.unbind(m.ea,this.Kva,this),g.unbind(m.Bc,this.Lva,this),g.cancel())},this);this.wE=null};e.prototype.Kva=function(){0==d(this.wE).filter(function(g){return g&&!g.Mh()}).length&&this.YWa()};e.prototype.Lva=function(){};e.prototype.mPa=function(){this.za.bind(m.G("minimumLuminance"),this.Ww,this);this.za.bind(m.G("maximumLuminance"),this.Ww,this);this.za.bind(m.G("luminanceChangeTime"),this.Ww,this);this.za.bind(m.G("maxLuminanceChangeSpeed"),
this.Ww,this);this.Ww()};e.prototype.A1a=function(){this.za.unbind(m.G("minimumLuminance"),this.Ww,this);this.za.unbind(m.G("maximumLuminance"),this.Ww,this);this.za.unbind(m.G("luminanceChangeTime"),this.Ww,this);this.za.unbind(m.G("maxLuminanceChangeSpeed"),this.Ww,this)};e.prototype.Ww=function(){this.Qo=this.za.get("minimumLuminance");this.Iw=this.za.get("maximumLuminance");void 0==this.Qo&&void 0==this.Iw?(this.Qo=.2,this.Iw=.45):void 0==this.Qo?this.Qo=Math.min(.2,this.Iw):void 0==this.Qo?this.Iw=
Math.max(.45,this.Qo):this.Qo=Math.min(this.Qo,this.Iw);this.Iw=Math.min(1,Math.max(0,this.Iw));this.Qo=Math.min(1,Math.max(0,this.Qo));this.Zta=Math.max(100,this.za.get("luminanceChangeTime",5E3));this.cua=this.za.get("maxLuminanceChangeSpeed",1);this.Sa()};e.rN=1E3;return e});
define("eA","require lV z pB lx mU".split(" "),function(a){var d=a("lV"),l=a("z"),m=a("pB"),k=a("lx"),c=a("mU");a=d.extend(c,function(h){c.call(this,h);this.OX=this.PX=null;this.pj=this.ei=5E3;this.Se=void 0;this.Sb=this.ei;this.un=1;this.za=null;this.pE=!1;this.PQ=void 0});a.prototype.start=function(h){this.za=h;this.pE=!1;this.DY=!0;this.PX=l.Zu(this.za,"frameDisplayTime",this.sga,this);this.OX=l.Zu(this.za,"frameTransitionTime",this.sga,this);this.un=this.ZX(this.za);this.Se=this.za.fT()*(this.ei+
this.pj);this.sga(!0);this.Br();this.Sa();this.ik()};a.prototype.sga=function(h){var f=Math.max(100,this.za.get("frameDisplayTime",5E3)),b=Math.max(100,this.za.get("frameTransitionTime",5E3));if(this.ei!=f||this.pj!=b||h){h=this.TI();var e=this.rTa();this.ei=f;this.pj=b;1<this.un?(this.Se=h*(this.ei+this.pj)+e*this.ei+e*this.pj,this.Sb=this.un*(this.ei+this.pj)):(this.Se=e*this.ei,this.Sb=this.ei)}};a.prototype.TI=function(){return 1<this.un?Math.floor(this.Se/(this.ei+this.pj)):0};a.prototype.sTa=
function(){return 1<this.un?(this.TI()+1)%this.un:0};a.prototype.rTa=function(){return 1<this.un?Math.max(0,Math.min(1,this.Se-this.TI()*(this.ei+this.pj))):this.Se/this.ei};a.prototype.qsa=function(){return 1<this.un?Math.max(0,Math.min(1,(this.Se-(this.TI()*(this.ei+this.pj)+this.ei))/this.pj)):0};a.prototype.x0a=function(h){var f=Math.floor(h/this.pj);return f*(this.ei+this.pj)+this.ei+(h-f*this.pj)};a.prototype.Kza=function(h){var f=Math.floor(h/(this.ei+this.pj));return f*this.pj+Math.max(0,
h-f*(this.ei+this.pj)-this.ei)};a.prototype.play=function(){this.pE&&(this.pE=!1,this.DY&&this.Sa(),this.ik())};a.prototype.pause=function(){this.pE=!0;this.ik()};a.prototype.dM=function(){this.pause()};a.prototype.mM=function(){this.play()};a.prototype.end=function(){this.DY=!1;this.za=null;this.PX&&(this.PX.mC(),this.PX=null);this.OX&&(this.OX.mC(),this.OX=null);this.ik()};a.prototype.XG=function(h){this.Se=h;this.Sa()};a.prototype.aC=function(h){this.Se=this.x0a(h);this.Sa();this.pause()};a.prototype.Od=
function(h){if(this.DY){var f=this.Se;this.pE||(f+=h);if(void 0===this.PQ&&f>=this.Sb-this.pj)this.PQ=this.Se,this.za.trigger(m.lq);else{this.Se=f;this.Se%=this.Sb;void 0!==this.PQ&&this.Se<this.PQ&&(this.PQ=void 0);h=this.TI();f=this.sTa();var b=this.qsa(),e=f>h?b:1;b=f>h?1:1-b;for(var g=0;g<this.un;g++){var n=g==h?b:g==f?e:0;var q=this.j.Df(this.saa(this.za,g));q.get("alpha")!=n&&(0<n&&1>n&&q.Kh(),q.get("alpha"),q.set("alpha",n))}this.Br();this.pE||this.Sa()}}};a.prototype.pk=function(){return this.DY?
this.pE?k.Qb:k.PLAYING:k.U};a.prototype.ik=function(){c.prototype.ik.call(this,this.pk())};a.prototype.Br=function(){c.prototype.Br.call(this,this.Se,this.Sb,this.Kza(this.Se),this.Kza(this.Sb),this.un+1,0===this.qsa()?this.TI():void 0)};return a});define("bT",["require","lV","mU"],function(a){var d=a("lV"),l=a("mU");return d.extend(l,function(m){l.call(this,m)})});
define("nd",["require","lV","pB","lx","mU"],function(a){var d=a("lV"),l=a("pB"),m=a("lx"),k=a("mU");a=d.extend(k,function(c){k.call(this,c);this.cf=!1});a.prototype.EL=function(){};a.prototype.start=function(c){this.end();this.za=c;this.za.set("mute",this.cf);this.za.get("autoplay")&&this.za.set("state",m.PLAYING);this.Iv()};a.prototype.getTime=function(){return this.za?this.za.get("currentTime"):0};a.prototype.pk=function(){return this.za?this.za.get("state"):m.U};a.prototype.play=function(){this.za&&
this.za.set("state",m.PLAYING)};a.prototype.pause=function(){this.za&&this.za.set("state",m.Qb)};a.prototype.w5=function(){this.za&&this.za.set("state",m.Qb)};a.prototype.stop=function(){this.za&&this.za.set("state",m.U)};a.prototype.end=function(){this.za&&(this.ox(),this.za=null)};a.prototype.XG=function(c){this.za&&this.za.set("state",m.PLAYING);this.za&&this.za.set("currentTime",c)};a.prototype.Vf=function(c){this.cf=c;this.za&&this.za.set("mute",this.cf)};a.prototype.Iv=function(){this.za.bind(l.G("currentTime"),
this.mf,this,!0);this.za.bind(l.G("duration"),this.Gn,this,!0);this.za.bind(l.G("state"),this.Li,this,!0);this.za.get("state")!=m.U&&this.ik()};a.prototype.ox=function(){this.za.unbind(l.G("currentTime"),this.mf,this,!0);this.za.unbind(l.G("duration"),this.Gn,this,!0);this.za.unbind(l.G("state"),this.Li,this,!0)};a.prototype.Li=function(){this.ik()};a.prototype.mf=function(){this.Br()};a.prototype.Gn=function(){this.Br()};a.prototype.Br=function(){this.za&&k.prototype.Br.call(this,this.za.get("currentTime"),
this.za.get("duration"))};return a});
define("y","require lV lx cI gF fq mU bx eA bT nd".split(" "),function(a){var d=a("lV");a("lx");var l=a("cI"),m=a("gF"),k=a("fq"),c=a("mU"),h=a("bx"),f=a("eA"),b=a("bT"),e=a("nd"),g=d.extend(m,function(n){m.call(this);this.j=n;this.jca=this.jX(f);this.Waa=this.jX(h);this.L1=this.jX(e);this.vfa=this.jX(b);this.ae=null});g.prototype.clear=function(){this.aX(this.jca);this.jca=null;this.aX(this.Waa);this.Waa=null;this.aX(this.L1);this.L1=null;this.aX(this.vfa);this.j=this.ae=this.vfa=null};g.prototype.jX=
function(n){n=new n(this.j);n.bind(c.Ob,this.df,this,!0);n.bind(c.Nj,this.dr,this,!0);n.bind(c.Uc,this.lf,this,!0);return n};g.prototype.aX=function(n){n.unbind(c.Ob,this.df,this);n.unbind(c.Nj,this.dr,this);n.unbind(c.Uc,this.lf,this);n.clear()};g.prototype.Mba=function(n,q){return k.Ja(q,n)};g.prototype.msa=function(n){return this.Mba(n,"HDRPanorama")?this.Waa:this.Mba(n,"LivePanorama")?this.jca:this.Mba(n,"VideoPanorama")?this.L1:this.vfa};g.prototype.EL=function(n){(this.ae=this.msa(n))&&this.ae.EL(n)};
g.prototype.start=function(n){this.df();(this.ae=this.msa(n))&&this.ae.start(n)};g.prototype.pk=function(){if(this.ae)return this.ae.pk()};g.prototype.getTime=function(){return this.ae?this.ae.getTime():0};g.prototype.play=function(){this.ae&&this.ae.play()};g.prototype.pause=function(){this.ae&&this.ae.pause()};g.prototype.dM=function(){this.ae&&this.ae.dM()};g.prototype.mM=function(){this.ae&&this.ae.mM()};g.prototype.w5=function(){this.ae&&this.ae.w5()};g.prototype.stop=function(){this.ae&&this.ae.stop();
this.trigger(new l(g.Nj,{duration:0,time:0,steps:void 0,selectedStep:void 0}))};g.prototype.end=function(){this.ae&&(this.ae.end(),this.ae=null)};g.prototype.XG=function(n){this.ae&&this.ae.XG(n)};g.prototype.aC=function(n){this.ae&&this.ae.aC(n)};g.prototype.KM=function(){this.ae&&this.ae.KM()};g.prototype.Od=function(n){this.ae&&this.ae.Od(n)};g.prototype.Vf=function(n){this.L1.Vf(n)};g.prototype.df=function(){this.trigger(new l(g.Ob))};g.prototype.dr=function(n){this.trigger(new l(g.Nj,n.data))};
g.prototype.lf=function(n){this.trigger(new l(g.Uc,n.data))};g.Ob="request frame";g.QLa="frame display";g.RLa="frame hide";g.Nj="time change";g.Uc="playback state change";return g});
define("nf",["require","lV","pB","gF","lW"],function(a){var d=a("lV"),l=a("pB"),m=a("gF"),k=a("lW");a=d.extend(m,function(c){m.call(this);this.j=c;this.Gh=this.za=null});a.prototype.start=function(c){this.za=c;this.Gh=this.j.Df(this.za);this.Gh.bind(l.ea,this.Dd,this,!0);this.Gh.bind(l.mc,this.$w,this,!0);this.Gh.get("ready")?this.trigger(l.jd,{panorama:this.za}):this.Gh.bind(l.jd,this.UZ,this,!0);this.Gh.set("loadingActive",!0)};a.prototype.stop=function(){this.za=null;this.Gh&&(this.Gh.unbind(l.jd,
this.UZ,this),this.Gh.unbind(l.ea,this.Dd,this),this.Gh.unbind(l.mc,this.$w,this),this.Gh.set("loadingActive",!1),this.Gh=null,this.trigger(l.Yf))};a.prototype.clear=function(){this.stop()};a.prototype.UZ=function(){this.Gh.unbind(l.jd,this.UZ,this);this.trigger(l.jd,{panorama:this.za})};a.prototype.Dd=function(){this.Gh.unbind(l.jd,this.UZ,this);this.Gh.unbind(l.ea,this.Dd,this);this.Gh.unbind(l.mc,this.$w,this);this.Gh=null;this.trigger(l.ea,{panorama:this.za});this.za=null;this.trigger(l.Yf)};
a.prototype.$w=function(c){this.trigger(new k(l.mc,c.Ug))};return a});
define("kz","require exports pB cI gF R".split(" "),function(a,d,l,m,k,c){var h=function(b){function e(g){var n=b.call(this)||this;n.renderer=g;n.Jja=[];n.MT=new Map;n.Ff=null;return n}Z(e,b);e.prototype.clear=function(){this.e5([])};e.prototype.e5=function(g){g?Array.isArray(g)||(g=[g]):g=[];this.Jja.filter(function(n){return!g.includes(n)}).forEach(this.U9a.bind(this));g.filter(function(n){return!this.Jja.includes(n)}.bind(this)).forEach(this.E3a.bind(this));this.Jja=g};e.prototype.display=function(g){this.tf(g)};
e.prototype.hide=function(g){this.Ff==g&&this.stop()};e.prototype.stop=function(){this.tf(null)};e.prototype.E3a=function(g){var n=new f(this.renderer,g);n.bind(e.xi,this.tU,this,!0);n.tf(this.Ff);this.MT.set(g,n)};e.prototype.U9a=function(g){var n=this.MT.get(g);n.unbind(e.xi,this.tU,this);n.dispose();this.MT.delete(g)};e.prototype.tf=function(g){this.Ff!==g&&(this.Ff=g,this.MT.forEach(function(n){n.tf(g)}))};e.prototype.Od=function(){this.MT.forEach(function(g){g.Kcb()})};e.prototype.tU=function(g){this.trigger(new m(e.xi,
{yawDelta:g.data.yawDelta}))};e.xi="request yaw change";return e}(k),f=function(b){function e(g,n){var q=b.call(this)||this;q.renderer=g;q.ny=n;q.Ff=null;q.Ju=null;q.D3a();return q}Z(e,b);e.prototype.dispose=function(){this.T9a();this.tf(null)};e.prototype.tf=function(g){this.Ff!==g&&(this.qCa(),this.Ff=g,this.F3a())};e.prototype.Kcb=function(){this.$Ka()};e.prototype.rIa=function(g,n,q){g=g.get("mapLocations",[]);for(var p=0;p<g.length;p++){var r=g[p];if(r.get("map")==n)return r}return q&&0<g.length?
g[0]:null};e.prototype.CJa=function(){this.ny.H3a(this.Ju);this.ny.bind(c.xi,this.tU,this,!0);this.$Ka()};e.prototype.r7a=function(){this.ny.V9a(this.Ju);this.ny.unbind(c.xi,this.tU,this)};e.prototype.qCa=function(){this.Ju&&(this.r7a(),this.Ju=null)};e.prototype.F3a=function(){this.Ff&&(this.Ju=this.rIa(this.Ff,this.ny.get("map",null),!0))&&this.CJa()};e.prototype.$Ka=function(){if(this.Ju){var g=this.renderer.Pc(),n=this.renderer.Oc();this.ny.Np(this.Ju,g,n,this.renderer.Ee())}};e.prototype.D3a=
function(){this.ny.bind(l.G("map"),this.zGa,this,!1)};e.prototype.T9a=function(){this.ny.unbind(l.G("map"),this.zGa,this)};e.prototype.zGa=function(){this.Ff&&(this.qCa(),(this.Ju=this.rIa(this.Ff,this.ny.get("map",null),!1))&&this.CJa())};e.prototype.tU=function(g){this.trigger(new m(h.xi,{yawDelta:g.data.yawDelta}))};return e}(k);return h});
define("hG","require pB lY gF bo mV kQ".split(" "),function(a){function d(w){this.dX=w;this.Ek=null;this.a9={};for(w=0;w<this.dX.buttons.length;w++)this.a9[this.dX.buttons[w]]=!1;this.Y8=0;this.PA=null;this.ZE=[new THREE.Quaternion,new THREE.Quaternion];this.Xk=this.ZE[0];this.mi=[new THREE.Vector3,new THREE.Vector3];this.gb=this.mi[0];this.YJ=new THREE.Vector3;this.VE=new THREE.Quaternion;this.iqa=0}function l(w,x,y){this.w7a=w;this.buttons=x;this.C9a=y}function m(){if(!v&&u!=b.Ue){u=b.Ue;var w=
navigator.getGamepads&&navigator.getGamepads();if(w){for(var x=0;x<p.length;x++)p[x].RIa(null);for(x=0;x<w.length;x++){var y=w[x];if(y&&(y.pose||y.YEa)){var z=y.id||y.Ceb,B=z+(y.hand?"-"+y.hand:""),D=t[B];if(!D){a:{for(var F=0;F<g.length;F++){var A=g[F];if(0==z.indexOf(n[A].w7a)){z=A;break a}}z=void 0}z&&p.push(D=t[B]=new d(n[z]))}D&&t[B].RIa(y)}}(w=r)&&!r.yja()&&(r=null);for(x=0;x<p.length;x++)if(D=p[x],D.yja()&&D.pressed()){r=D;break}if(!r)for(x=0;x<p.length;x++)if(D=p[x],D.yja()){if("right"==D.hand()){r=
D;break}r||(r=D)}w!=r&&h.ZB(k)}}}function k(){q.trigger(c.ba)}var c=a("pB"),h=a("lY"),f=a("gF"),b=a("bo"),e=a("mV");a("kQ");var g="oculus go;oculus touch;xr-standard;gear vr;daydream;vive;vive focus;microsoft;unknown".split(";"),n={};n["oculus go"]=new l("Oculus Go",["trackpad","trigger"],"trigger");n["oculus touch"]=new l("Oculus Touch","thumbstick trigger grip abutton bbutton surface".split(" "),"trigger");n["xr-standard"]=new l("xr-standard","trigger grip unknow_button_0 thumbstick abutton bbutton unknow_button".split(" "),
"trigger");n["gear vr"]=new l("Gear VR",["trackpad","trigger"],"trigger");n.daydream=new l("Daydream Controller",["trackpad","menu","system"],"trackpad");n.vive=new l("OpenVR",["trackpad","trigger","grip","menu","system"],"trigger");n["vive focus"]=new l("HTC Vive Focus",["trackpad","trigger","grip"],"trigger");n.microsoft=new l("Spatial Controller (Spatial Interaction Source)",["thumbstick","trigger","grip","menu","thumbpad"],"trigger");n.unknown=new l("",[],void 0);d.prototype.RIa=function(w){if(this.Ek=
w){this.JUa=this.Ek.hand||this.Ek.Beb;this.Ek.pose&&this.Ek.pose.orientation?(this.PA=this.Ek.pose,this.PA.orientation&&(this.Xk=this.ZE[0]==this.Xk?this.ZE[1]:this.ZE[0],this.Xk.fromArray(this.PA.orientation)),this.PA.position?(this.gb=this.mi[0]==this.gb?this.mi[1]:this.mi[0],this.gb.fromArray(this.PA.position)):this.gb=null):this.Ek.YEa&&(this.PA=this.Ek.YEa.transform,this.Xk=this.ZE[0]==this.Xk?this.ZE[1]:this.ZE[0],this.Xk.copy(this.PA.orientation),this.gb=this.mi[0]==this.gb?this.mi[1]:this.mi[0],
this.gb.copy(this.PA.position));w=0;for(var x=Math.min(this.Ek.buttons.length,this.Ek.buttons.length);w<x;w++)this.a9[this.dX.buttons[w]]=this.Ek.buttons[w].pressed;for(w=this.Y8=0;w<this.Ek.buttons.length;w++)this.Ek.buttons[w].pressed&&this.Y8++;(w=!!this.YJ!=!!this.gb||this.gb&&this.YJ.x!=this.gb.x&&this.YJ.y!=this.gb.y&&this.YJ.z!=this.gb.z)&&(this.gb?this.YJ.copy(this.gb):this.YJ.set(0,0,0,0));(x=!!this.VE!=!!this.Xk||this.Xk&&(this.VE.x!=this.Xk.x||this.VE.y!=this.Xk.y||this.VE.z!=this.Xk.z||
this.VE.w!=this.Xk.w))&&(this.Xk?this.VE.copy(this.Xk):this.VE.set(0,0,0));if(w||x)this.iqa=b.Ue}};d.prototype.yja=function(){return!!this.Ek};d.prototype.Q7a=function(){return 500<b.Ue-this.iqa};d.prototype.hand=function(){return this.JUa};d.prototype.quaternion=function(){return this.Xk};d.prototype.position=function(){return this.gb};d.prototype.pressed=function(w){w||(w=this.dX.C9a);return w?this.a9[w]:0<this.Y8};var q=new f;q.all=function(){m();return p};q.Zi=function(){m();return r};q.ab="left";
q.ub="right";var p=[],r=null,t={},u=void 0,v=e.mg("disable-controller",!1);return q});define("dt",["require","oo","a"],function(a){function d(k,c){this.gg=k||new l(0,0,0);this.Hj=c||new l(1,0,0)}var l=a("oo"),m=a("a");d.prototype.clone=function(){return new d(this.gg.clone(),this.Hj.clone())};d.prototype.apply=function(k){k.XK(this.gg);k.XK(this.Hj)};d.prototype.oEa=function(){return m.tB(this.gg,this.Hj)};return d});
define("iG",["require","dt","oo"],function(a){function d(k,c,h){this.sa=k||100;this.wa=c||100;this.Xa=h||Math.PI;this.fea=void 0;this.gt=!0}var l=a("dt"),m=a("oo");d.prototype.UG=function(k){this.Xa!=k&&(this.Xa=k,this.gt=!0)};d.prototype.ey=function(){return this.Xa};d.prototype.UU=function(k){this.sa!=k&&(this.sa=k,this.gt=!0)};d.prototype.Fe=function(){return this.sa};d.prototype.TIa=function(k){this.wa!=k&&(this.wa=k,this.gt=!0)};d.prototype.Ve=function(){return this.wa};d.prototype.project=function(k){if(0!=
k.z){this.OAa();var c=1/k.z,h=this.fea*c;k.x=.5*this.sa-k.x*h;k.y=.5*this.wa-k.y*h;k.z=c}};d.prototype.unproject=function(k){this.OAa();return new l(new m(0,0,0),new m(.5*this.sa-k.x,.5*this.wa-k.y,this.fea))};d.prototype.OAa=function(){this.gt&&(this.fea=.5*this.sa/Math.tan(.5*this.Xa),this.gt=!1)};return d});
define("pI",["require"],function(){function a(){this.Fg=this.pitch=this.Ra=0;this.ti=this.We=90;this.Lr=this.Mr=this.height=this.width=100;this.qk=1;this.nG=this.ob=!1;this.Kj=0;this.Eia=this.pS=this.Uja=!1;this.lG=this.kU=!0;this.camera=this.LS=this.KS=this.Gg=null;this.enabled=!1;this.Ue=0;this.$U=void 0}a.prototype.clone=function(){var d=new a;d.Ra=this.Ra;d.pitch=this.pitch;d.Fg=this.Fg;d.We=this.We;d.ti=this.ti;d.width=this.width;d.height=this.height;d.Mr=this.Mr;d.Lr=this.Lr;d.qk=this.qk;d.ob=
this.ob;d.nG=this.nG;d.Kj=this.Kj;d.Uja=this.Uja;d.Eia=this.Eia;d.pS=this.pS;d.kU=this.kU;d.lG=this.lG;d.Gg=this.Gg;d.KS=this.KS;d.LS=this.LS;d.camera=this.camera;d.enabled=this.enabled;d.Ue=this.Ue;d.$U=this.$U;return d};return a});
define("pr",["require","dO","hV"],function(a){var d=a("dO"),l=a("hV");return function(m){var k=1,c=new THREE.WebGLCubeRenderTarget(1024),h=new THREE.CubeCamera(.1,1E4,c);h.layers.enable(d.av);h.layers.enable(d.ab);c=new THREE.ShaderMaterial;c.uniforms={tCube:{value:h.renderTarget.texture},tFlip:{value:1},opacity:{value:1}};c.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}";
c.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";c.side=THREE.BackSide;c.depthWrite=!1;c.transparent=!0;c.depthTest=!1;c.needsUpdate=!0;var f=new THREE.Mesh(new THREE.SphereGeometry(5,64,64),c);f.overdraw=!1;f.matrixAutoUpdate=!1;f.renderOrder=1E3;var b=new THREE.Matrix4;this.ZG=function(g){k=g};this.start=function(g){g.add(f);
g.add(h);g.traverse(function(n){n.layers.test(h.layers)&&(n.userData.Eja=n.layers.mask,n.layers.mask=h.layers.mask)});h.visible=!0;f.visible=!0;m.setClearColor(16777215,1)};this.stop=function(g){m.setClearColor(0,0);g.traverse(function(n){void 0!==n.userData.Eja&&(n.layers.mask=n.userData.Eja,delete n.userData.Eja)});h.visible=!1;f.visible=!1;g.remove(f);g.remove(h)};var e=0;this.render=function(g,n){0<k&&(f.matrix.copy(n.matrixWorld),f.matrix.multiply(b.makeTranslation(0,0,5*-k)),f.matrixWorldNeedsUpdate=
!0,e++,l.J7a()&&0!=e%10||(l.C$a(),f.visible=!1,h.update(m,g),f.visible=!0))}}});
define("eR","require lz ok dO pr jJ W hV kQ".split(" "),function(a){function d(n){this.M=n;this.Kb=new THREE.PerspectiveCamera(90,16/9,.1,2*h.Hg);this.Kb.layers.enable(k.ab);this.it=new THREE.PerspectiveCamera;this.Va=new THREE.Scene;this.Vqa=new THREE.Scene;this.Wqa=new THREE.Scene;this.Va.add(this.Kb);this.Fo=this.Bfa=this.oX=this.nX=this.j=null;this.Bua=this.N9=!1}var l=a("lz"),m=a("ok"),k=a("dO"),c=a("pr"),h=a("jJ"),f=a("W"),b=a("hV"),e=a("kQ");d.prototype.G5a=function(){this.cQa()};d.prototype.bs=
function(){return this.j};d.prototype.qf=function(){return this.Va};d.prototype.getCamera=function(){return this.it};d.prototype.ds=function(){return e.isPresenting&&e.nh==this.j&&e.WB==this.Va};d.prototype.O5a=function(){return this.it.isArrayCamera&&0<this.it.cameras.length?2*Math.atan2(1,this.it.cameras[0].projectionMatrix.elements[5])*g:this.it.fov};d.prototype.getPixelRatio=function(){return this.j?this.j.getPixelRatio():b.getPixelRatio()};d.prototype.R5a=function(){return e.isPresenting&&e.framebufferWidth?
.5*e.framebufferWidth:this.j?this.j.domElement.width:1024};d.prototype.Q5a=function(){return e.isPresenting&&e.framebufferHeight?e.framebufferHeight:this.j?this.j.domElement.height:1024};d.prototype.eg=function(){return this.j.domElement};d.prototype.update=function(n){this.z2a(n);this.X1a(n);this.Cr(n)};d.prototype.Rha=function(n){this.j.Bm=!0;n=b.Z4a(n);var q=new THREE.CubeCamera(this.it.near,this.it.far,n);this.Va.add(q);q.position.setFromMatrixPosition(this.it.matrixWorld);q.update(this.j,this.Va);
this.Va.remove(q);this.j.Bm=!1;return n.texture};d.prototype.render=function(){this.V_()};d.prototype.z2a=function(n){n.enabled&&(this.j||this.V_a(n),n.ob&&e.getType()==e.Cv.zl&&(this.Bua=!0));this.Cza==n.width&&this.Bza==n.height||this.j.setSize(this.Cza=n.width,this.Bza=n.height);if(this.N9=n.enabled&&!n.ob)this.nX.setSize(n.width,n.height),this.oX.setSize(n.width,n.height)};d.prototype.V_a=function(n){!this.j&&n.enabled&&(this.M.Qd().X1(),this.nX=this.M.Qd().M5a(),this.j=this.M.Qd().bs(),n=this.j.getSize(new THREE.Vector2),
this.Cza=n.width,this.Bza=n.height,this.oX=this.M.Qd().N5a(),this.Bfa=new c(this.j,this.Kb))};d.prototype.cQa=function(){this.j&&(this.nX=this.j=this.oX=this.Fo=null,this.M.Qd().S4())};d.prototype.Cr=function(n){n.ob?this.it=this.j.xr.getCamera():(this.Kb.quaternion.copy(m.wDa(n.Ra,n.pitch,n.Fg)),this.Kb.fov=l.Gm(n.We,n.width,n.height),this.Kb.aspect=n.width/n.height,this.Kb.updateProjectionMatrix(),this.Kb.updateMatrixWorld(),this.it=this.Kb);f.B$a(this.Va,this.ds()?this.j.xr.getCamera().cameras:
[this.Kb]);!0===this.Va.Neb&&this.Va.updateMatrixWorld()};d.prototype.X1a=function(n){var q=!n.ob&&0<n.Kj?this.Bfa:null;this.Fo!=q&&(this.Fo&&this.Fo.stop(this.Va),(this.Fo=q)&&this.Fo.start(this.Va));this.Fo&&this.Fo==this.Bfa&&this.Fo.ZG(n.Kj)};d.prototype.V_=function(){this.Bua&&this.j.resetState();this.Fo&&this.Fo.render(this.Va,this.Kb);this.j.render(this.Va,this.Kb);this.N9&&(this.nX.render(this.Vqa,this.Kb),this.oX.render(this.Wqa,this.Kb))};var g=180/Math.PI;return d});
define("c","require lV jE fr cD eB W kY pJ".split(" "),function(a){var d=a("lV"),l=a("jE"),m=a("fr"),k=a("cD"),c=a("eB"),h=a("W"),f=a("kY"),b=a("pJ");a=d.extend(l,function(){l.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.rca=new k.ro);this.$v&&this.$v();this.ID&&this.ID();this.Rz&&this.Rz();this.Eo&&this.Eo()});a.prototype.Zb=function(){l.prototype.Zb.call(this);
this.Zo&&this.Zo();this.oP&&this.oP();this.RJ&&this.RJ()};a.prototype.ac=function(){this.nJ&&this.nJ();this.TJ&&this.TJ();this.ap&&this.ap();c.dispose(this.get("meshGroup"));c.Xu(this.get("meshGroup"),null);this.set("meshGroup",null);l.prototype.ac.call(this)};a.prototype.oa=function(e){this.yf&&this.yf(e);l.prototype.oa.call(this,e);this.set("camera",h.getCamera(e.Gg));this.set("webglScene",e.Gg);this.get("meshGroup")||(this.set("meshGroup",c.BCa(this.Do())),this.get("meshGroup").userData.l9a=this);
this.R("webglScene","meshGroup")&&c.Xu(this.get("meshGroup"),this.get("webglScene"));this.vm();this.Vi&&this.Vi(e);this.O2a();this.Lx&&this.Lx(e);this.tp&&this.tp(e);this.DF();this.R("loadingActive","meshGroup")&&f.sb(this.get("meshGroup"),this.get("loadingActive"));this.R("blendingActive","meshGroup")&&b.CIa(this.get("meshGroup"),this.get("blendingActive"))};a.prototype.vm=function(){this.R("composedAlpha","meshGroup")&&this.zz()};a.prototype.zz=function(){c.gf(this.get("meshGroup"),this.get("composedAlpha"))};
a.prototype.O2a=function(){if(this.R("textureSource")||this.R("materialConfig")&&!this.rca.isEqual(this.get("materialConfig"))){var e=this.SI();e&&(c.wab(e,this.WN()),this.zz())}};a.prototype.DF=function(){if(this.R("index","meshGroup")){var e=this.get("meshGroup");e&&e.children.forEach(function(g,n,q){c.p5(g,this.get("index")+n/q.length)}.bind(this))}};a.prototype.WN=function(){var e=this.get("textureSource")||new m;this.rca=this.get("materialConfig");var g=k.Qr(e.texture(),this.rca);f.vM(g,e);return[g]};
a.prototype.Mqa=function(){var e=new m,g=k.Qr(e.texture());f.vM(g,e);return[g]};a.prototype.rw=function(e){return c.m6a(this.get("meshGroup"),e)};return a});
define("oN","require iy jJ eB kU kY lz ok nF".split(" "),function(a){var d=a("iy"),l=a("jJ"),m=a("eB"),k=a("kU"),c=a("kY"),h=a("lz"),f=a("ok"),b=a("nF"),e=new THREE.Matrix4,g=Math.PI/180;return{$v: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.ah=this.Qz();this.Ih=new THREE.Matrix4;this.Td=new THREE.Matrix4;this.$o=new THREE.Matrix4;this.mn=new THREE.Matrix4;this.wj=new THREE.Matrix4;this.M8=new THREE.Matrix4;this.Dpa=new THREE.Quaternion;this.Gqa=new THREE.Matrix4;this.GN=new THREE.Matrix4;this.SN=new THREE.Matrix4;this.Fz=new THREE.Matrix4;this.ai=new THREE.Matrix4},Lx:function(n){this.Er(n);this.Pga()},Pga:function(){if(this.R("hfov",
"vfov","contentWidth","contentHeight","panoramaPixelsPerDegree","scaleMode","horizontalAlign","verticalAlign")){var n=k.Wia(this.get("hfov"),this.get("vfov"),this.get("contentWidth"),this.get("contentHeight"),this.get("scaleMode"),this.get("panoramaPixelsPerDegree"),this.get("horizontalAlign"),this.get("verticalAlign"));n=l.jJa(this.ah[1],n.eV,n.nV,n.Py,n.Ry);this.ah[1]!=n&&(this.ah[1]=n,(n=this.SI())&&m.pla(n,this.ah[1]))}},SI:function(){var n=this.get("meshGroup");return n?m.jl(n)[1]:null},Do:function(){return[0,
1].map(function(n){var q=0==n?this.Mqa():this.WN();n=m.create(this.ah[n],q);c.Hy(n,c.fq);c.Iy(n,c.Ns);c.VG(n,d.fN);c.SU(n,1);return n}.bind(this))},Qz:function(){return[l.eL(),l.eL()]},Er:function(n){var q=!1;this.R("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.Ih.makeTranslation(.5*-this.get("composedTranslationX")*l.Hg,.5*this.get("composedTranslationY")*l.Hg,.5*this.get("composedTranslationZ")*l.Hg),q=!0);this.R("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&
(this.Td.makeRotationY(-n.Ra*g),this.Td.multiply(e.makeRotationX(-this.get("composedDeltaPitch")*g)),this.Td.multiply(e.makeRotationY(this.get("composedDeltaYaw")*g)),this.Td.multiply(e.makeRotationY(n.Ra*g)),q=!0);this.R("yaw","pitch")&&(this.$o.makeRotationY(-this.get("yaw")*g),this.$o.multiply(e.makeRotationX(this.get("pitch")*g)),q=!0);if(this.R("distance","flipHorizontally","scale","hfov","vfov","contentWidth","contentHeight","scaleMode","horizontalAlign","verticalAlign","composedTranslationX",
"composedTranslationY","composedTranslationZ")){var p=0==this.ta.get("composedTranslationX")&&0==this.ta.get("composedTranslationY")&&0==this.ta.get("composedTranslationZ")&&void 0!==this.get("distance")?l.yu(this.get("distance")):l.Yr();this.mn.makeTranslation(0,0,-p);var r=this.get("contentWidth"),t=this.get("contentHeight"),u=this.get("hfov"),v=this.get("vfov")||h.Gm(u,r,t),w=(this.get("flipHorizontally")?-1:1)*this.get("scale"),x=this.get("scale"),y=this.get("scaleMode"),z=this.get("panoramaPixelsPerDegree");
q=this.get("horizontalAlign")||b.$e;var B=this.get("verticalAlign")||b.se;r=k.Wia(u,v,r,t,y,z,q,B);u=w*l.Xia(p,u);v=x*l.Yia(p,v);this.GN.makeScale(u,v,1);w*=l.Xia(p,r.We);p=x*l.Yia(p,r.Cs);this.SN.makeScale(w,p,1);this.Gqa.makeTranslation(q==b.ab?.5*-(u-w):q==b.ub?.5*(u-w):0,B==b.Hc?.5*(v-p):B==b.Ac?.5*-(v-p):0,0);q=!0}this.R("rotationX","rotationY","rotationZ","roll")&&(this.wj.makeRotationZ(this.get("roll")*g),this.wj.multiply(e.makeRotationY(this.get("rotationY")*g)),this.wj.multiply(e.makeRotationX(this.get("rotationX")*
g)),this.wj.multiply(e.makeRotationZ(this.get("rotationZ")*g)),q=!0);this.set("cameraYaw",n.Ra);this.set("cameraPitch",n.pitch);this.set("cameraRoll",n.Fg);this.get("attachToCamera")&&this.R("cameraYaw","cameraPitch","cameraRoll")?(this.Dpa.copy(f.wDa(n.Ra,n.pitch,n.Fg)),this.M8.makeRotationFromQuaternion(this.Dpa),q=!0):this.R("attachToCamera")&&(this.M8.identity(),q=!0);if(q||this.R("meshGroup"))this.ai.copy(this.Ih),this.ai.multiply(this.Td),this.ai.multiply(this.M8),this.ai.multiply(this.$o),
this.ai.multiply(this.mn),this.ai.multiply(this.wj),this.Fz.copy(this.ai),this.Fz.multiply(this.GN),this.ai.multiply(this.Gqa),this.ai.multiply(this.SN),n=m.jl(this.get("meshGroup")),m.Pr(n[0],this.Fz),m.Pr(n[1],this.ai)}}});define("kc",["require","lV","c","oN"],function(a){var d=a("lV"),l=a("c");a=a("oN");return d.extend(l,a,function(){l.call(this);this.set("tag","Plane")})});
define("ih","require lV lh pB fq kc nz oT nY eN lW".split(" "),function(a){function d(p,r,t,u,v,w){for(p=(p-r)/w;t+180<u;)u-=360;for(;t-180>u;)u+=360;t=(t-u)/w;return t=-.1>p||.1<p?l(v,t,Math.abs(1/(1500*p))):l(v,t,.08)}function l(p,r,t){p=(r-p)*(1-t);1E-5>Math.abs(p)&&(p=0);return r-p}var m=a("lV"),k=a("lh"),c=a("pB"),h=a("fq"),f=a("kc"),b=a("nz"),e=a("oT"),g=a("nY"),n=a("eN"),q=a("lW");a=m.extend(f,function(p){f.call(this);this.v=p;this.Kk.push(this.v);this.jg=this.jg.bind(this);this.pf=h.Ja("CeilingCapPanoramaOverlay",
this.v)?"ceiling":"tripod";this.set("tag","Cap");this.set("pitch","tripod"==this.pf?-90:90);this.pd=!1;this.WE=this.dea=this.Gt=void 0;this.mYa="tripod"==this.pf?1:-1;this.Ck=this.Wk=this.dh=null});a.prototype.Zb=function(){f.prototype.Zb.call(this);this.dh=(new e(c.ea)).Tm(this.Xq.bind(this));this.Wk=(new e(c.mc)).Hp(this.FE.bind(this));k.da(this.v,"angle distance hfov image.levels.url inertia rotate".split(" "),this.jg,!0)};a.prototype.ac=function(){this.Ck&&this.Ck.dispose();this.Ck=null;this.dh.dispose();
this.Wk.dispose();k.ca(this.v,"angle distance hfov image.levels.url inertia rotate".split(" "),this.jg);f.prototype.ac.call(this)};a.prototype.jg=function(){this.set("angle",this.v.get("angle"));this.set("distance",this.v.get("distance"));this.set("hfov",this.v.get("hfov"));var p=g.S5a(this.v,this.get("panoramaPixelsPerDegree"));this.set("imageURL",p&&p.get("url"));this.set("imageWidth",p&&p.get("width"));this.set("imageHeight",p&&p.get("height"));this.set("inertia",this.v.get("inertia"));this.set("rotate",
this.v.get("rotate"))};a.prototype.Do=function(){var p=f.prototype.Do.call(this);this.dh.Hf(p);this.Wk.Hf(p);return p};a.prototype.oa=function(p){this.wga();this.GK(p);f.prototype.oa.call(this,p)};a.prototype.wga=function(){this.R("imageURL")&&this.get("imageURL")&&(this.set("textureSource",new b(this.get("imageURL"))),this.set("contentWidth",this.get("imageWidth")),this.set("contentHeight",this.get("imageHeight")))};a.prototype.Xq=function(){this.trigger(c.jd);this.trigger(c.ea)};a.prototype.FE=
function(p,r){var t=0;r.su(function(u){(u=r.Im(u))&&(t+=u.Ug)});this.trigger(new q(c.mc,t/r.md.length))};a.prototype.GK=function(p){this.set("rendererYaw",p.Ra);if(this.R("angle","inertia","rotate")||(this.get("rotate")||this.get("inertia"))&&this.R("rendererYaw")){var r=this.get("angle"),t=this.get("rotate"),u=this.get("inertia"),v=this.mYa*p.Ra;t&&(r+=v);var w=0,x=r-v;void 0!==this.Gt&&(u&&(t?(w=d(v,this.WE,r,this.Gt,this.dea,p.Ue),r=this.Gt+w*p.Ue):(w=d(v,this.WE,x,this.qxa,this.dea,p.Ue),x=this.qxa+
w*p.Ue,r=x+v)),this.Gt!=r&&this.Ga());this.qxa=x;this.Gt=r;this.dea=w;this.WE=v;this.set("rotationZ",-r)}};a.prototype.Qm=function(p){if(p.vf==c.Fl){var r=!p.hl()&&this.yr(p);r&&(p.kB(this.v),this.v.get("useHandCursor")&&p.KF(this.v),p.gl(this.get("distance")));this.pd!=r&&(this.pd=r,this.v.trigger(this.pd?c.Gc:c.Jb),p.Iu()&&this.v.trigger(this.pd?c.RC:c.hq))}else p.vf==c.Xf&&!p.hl()&&this.yr(p)&&(1<this.v.uL(c.ma,!0).length&&p.ws(this.v),p.gl(this.get("distance")),this.v.trigger(c.ma))};a.prototype.yr=
function(p){return this.rw(p.pr).some(function(r){var t=this.mTa();return t&&t.My(r.x,r.y)}.bind(this))};a.prototype.mTa=function(){if(this.Ck)return this.Ck;var p=this.get("textureSource");if(p=p&&p.Cf())this.Ck=new n(p);return this.Ck};return a});
define("kF","require lV pB lx jE kQ".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("lx"),k=a("jE"),c=a("kQ");a=d.extend(k,function(){k.call(this);this.Ih=new THREE.Matrix4;this.bBa=!1;this.Hi=new THREE.Matrix4;this.ug=null;this.om=new THREE.Matrix4;this.NQ=this.zQ=0;this.wN=.75;this.eO=.5;this.tt=4;this.vca=0;this.ut=-2;this.Tq=3;this.cZ=0;this.RD=7;this.tQ=this.MA=1;this.tP=.15;this.SD=this.OE=0;this.vY=this.H_=m.U;this.S0=this.M0=1E3});var h=Math.PI/180,f=new THREE.Matrix4;a.prototype.dn=function(){};
a.prototype.Zb=function(){k.prototype.Zb.call(this);this.trigger(l.jd);this.trigger(l.ea)};a.prototype.ac=function(){this.l9()};a.prototype.Nk=function(){this.dn();this.RQ()};a.prototype.Ok=function(){this.Ga()};a.prototype.RQ=function(){this.ug&&(this.l9(),this.Pqa())};a.prototype.lX=function(){};a.prototype.Pqa=function(){this.dZa();this.ug=new THREE.Group;for(var b=this.vY==m.PLAYING,e=this.OE,g=this.SD;0<g+e;){var n=Math.random()*(g+e)<=g;n?g--:e--;var q=this.lX();q.matrixAutoUpdate=!1;q.overdraw=
!1;q.material.opacity=0;q.userData={u5a:n,jM:new THREE.Matrix4,FBa:new THREE.Matrix4,Uka:new THREE.Matrix4,y:void 0,vLa:void 0,VB:b};this.ug.add(q);b&&this.Hea(q,this.ut,this.Tq);this.bZa(q)}this.zQ=b?this.ug.children.length:0;this.nha.add(this.ug);this.Cpa()};a.prototype.l9=function(){if(this.ug){this.ug.parent&&this.ug.parent.remove(this.ug);for(var b=0,e=this.ug&&this.ug.children.length;b<e;b++)this.ug.children[b].material.dispose();this.ug=null;this.NQ=0}};a.prototype.dZa=function(){this.om=(new THREE.Matrix4).makeScale(this.MA,
this.MA,this.MA)};a.prototype.Hea=function(b,e,g){e+=Math.random()*(g-e);if(b.userData.u5a){g=this.RD;var n=360*Math.random()*h;b.userData.jM.makeTranslation(g*Math.cos(n),e,g*Math.sin(n))}else g=2*Math.random()*Math.PI,n=this.vca+(this.tt-this.vca)*Math.sqrt(Math.random()),b.userData.jM.makeTranslation(n*Math.cos(g),e,n*Math.sin(g));b.userData.jM.multiply(this.om);b.userData.y=e};a.prototype.bZa=function(b){var e=this.tP+Math.random()*(this.xE-this.tP);do var g=Math.random()*this.cZ;while(80<g&&
100>g);var n=360*Math.random(),q=Math.sin(n*h)*Math.sin(g*h)*e,p=-Math.cos(g*h)*e;e*=Math.cos(n*h)*Math.sin(g*h);b.userData.vLa=p*this.MA;b.userData.FBa.makeTranslation(q,p,e);b.userData.Uka.makeRotationY(n*h);b.userData.Uka.multiply(f.makeRotationX(-g*h))};a.prototype.oa=function(b){k.prototype.oa.call(this,b);this.P1a(b);this.nha=b.Gg;this.nha!=(this.ug&&this.ug.parent)?(this.l9(),this.nha&&this.Pqa()):this.R("index")&&this.Cpa();this.s2a(b)};a.prototype.P1a=function(b){b=b.ob&&c.getType()==c.Cv.zl;
b!=this.lta&&(this.lta=b)&&setTimeout(function(){this.ug&&this.RQ()}.bind(this),0)};a.prototype.s2a=function(b){if(this.ug){this.R("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.bBa=0!=this.get("composedTranslationX")||0!=this.get("composedTranslationY")||0!=this.get("composedTranslationZ"),this.Ih.makeTranslation(-this.get("composedTranslationX")*this.tt,this.get("composedTranslationY")*this.tt,this.get("composedTranslationZ")*this.tt));var e=this.H_==m.PLAYING,g=this.ug.children,
n=g.length,q=e?Math.round(n*b.Ue/this.M0):0;if(0<this.zQ+q){this.NQ=e?0:Math.min(this.zQ,this.NQ+Math.round(n*b.Ue/this.S0));b=this.get("composedAlpha");for(e=0;e<n;e++){var p=g[e];if(!p.userData.VB)if(0<q)q--,p.userData.VB=!0,this.zQ++,this.Hea(p,this.Tq,this.Tq+(this.Tq-this.ut));else continue;p.userData.jM.multiply(p.userData.FBa);p.userData.y+=p.userData.vLa;if(p.userData.y<this.ut||p.userData.y>this.Tq){if(0<this.NQ){this.NQ--;p.userData.VB=!1;this.zQ--;p.material.opacity=0;continue}var r=p.userData.y<
this.ut?this.Tq:this.ut;this.Hea(p,r,r)}r=b;p.userData.y<this.ut+this.eO?r*=(p.userData.y-this.ut)/this.eO:p.userData.y>this.Tq-this.wN&&(r*=(this.Tq-p.userData.y)/this.wN);p.material.opacity=r*this.tQ;this.bBa?(p.matrix.copy(this.Ih),p.matrix.multiply(p.userData.jM)):p.matrix.copy(p.userData.jM);p.matrix.multiply(p.userData.Uka);p.matrixWorldNeedsUpdate=!0}this.Ga()}}};a.prototype.Cpa=function(){if(this.ug)for(var b=this.get("index"),e=0;e<this.ug.children.length;e++)this.ug.children[e].renderOrder=
b};return a});
define("jm","require lV lh lx kF oq w".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("lx"),k=a("kF"),c=a("oq"),h=a("w");a=d.extend(k,function(b){k.call(this);this.v=b;this.Nk=this.Nk.bind(this);this.Ok=this.Ok.bind(this);this.dn()});a.prototype.Zb=function(){k.prototype.Zb.call(this);this.v.set("state",this.v.get("startState"));l.da(this.v,"color intensity speed opacity distance maxDistance farPlaneDistance minSpeed maxSpeed particleCount farPlaneParticleCount particleScale".split(" "),this.Nk,
!0);l.da(this.v,["state"],this.Ok,!0)};a.prototype.ac=function(){l.ca(this.v,"color intensity speed opacity distance maxDistance farPlaneDistance minSpeed maxSpeed particleCount farPlaneParticleCount particleScale".split(" "),this.Nk);l.ca(this.v,["state"],this.Ok);this.v.set("state",m.U);k.prototype.ac.call(this)};a.prototype.Nk=function(){this.dn();this.RQ()};a.prototype.Ok=function(){this.H_=this.v.get("state");this.Ga()};a.prototype.dn=function(){k.prototype.dn.call(this);var b=h.pb()||h.browser()==
h.Fs?2500:h.Ef()?4E3:5E3;this.tP=this.xE=.2*this.v.get("speed",.2);this.tt=14.5*this.v.get("distance",.5)+.5;this.tQ=1*this.v.get("opacity",.1);this.MA=.036;this.OE=this.v.get("intensity",.1)*b;this.Jc=c.ks(this.v.get("color","#ffffff"));this.SD=0;this.RD=15;this.vY=this.v.get("initialState");this.M0=this.v.get("startDuration");this.S0=this.v.get("stopDuration");this.wN=.75;this.eO=.5;this.ut=-2;this.Tq=4;this.cZ=180;this.ura()};a.prototype.lX=function(){return new THREE.Sprite(this.aw())};a.prototype.aw=
function(){var b=new THREE.SpriteMaterial;b.map=this.Dq();b.side=THREE.FrontSide;b.transparent=!0;b.depthTest=!1;b.needsUpdate=!0;return b};a.prototype.Dq=function(){if(this.Ia)return this.Ia;var b=document.createElement("canvas");b.width=b.height=f;this.Ia=new THREE.Texture;this.Ia.colorSpace=THREE.SRGBColorSpace;this.Ia.image=b;this.Ia.needsUpdate=!0;this.ura();return this.Ia};a.prototype.ura=function(){if(this.Ia){var b=this.Ia.image,e=b.getContext("2d"),g=e.createRadialGradient(.5*b.width,.5*
b.height,.2*b.height,.5*b.width,.5*b.height,.5*b.height);g.addColorStop(0,"rgba("+this.Jc[0]+", "+this.Jc[1]+", "+this.Jc[2]+", 1)");g.addColorStop(1,"rgba("+this.Jc[0]+", "+this.Jc[1]+", "+this.Jc[2]+", 0)");e.fillStyle=g;e.clearRect(0,0,b.width,b.height);e.fillRect(0,0,b.width,b.height);this.Ia.needsUpdate=!0}};var f=32;return a});
define("px","require lV iy jJ eB kU kY nF".split(" "),function(a){a("lV");var d=a("iy"),l=a("jJ"),m=a("eB"),k=a("kU"),c=a("kY"),h=a("nF"),f=new THREE.Matrix4,b=Math.PI/180;return{$v: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.ah=this.Qz();this.Ih=new THREE.Matrix4;this.Td=new THREE.Matrix4;this.$o=new THREE.Matrix4;this.mn=new THREE.Matrix4;this.nI=new THREE.Matrix4;this.jK=new THREE.Matrix4;this.Lpa=new THREE.Matrix4;this.wj=new THREE.Matrix4;this.Jqa=new THREE.Matrix4;this.GN=new THREE.Matrix4;this.SN=new THREE.Matrix4;this.Fz=new THREE.Matrix4;this.ai=new THREE.Matrix4;this.pI=new THREE.Matrix4;this.xD=new THREE.Vector3},Lx:function(e){this.Er(e);
this.Pga()},Pga:function(){if(this.R("width","height","contentWidth","contentHeight","scaleMode","horizontalAlign","verticalAlign")){var e=k.e3(this.get("width"),this.get("height"),this.get("contentWidth"),this.get("contentHeight"),this.get("scaleMode"),this.get("horizontalAlign"),this.get("verticalAlign"));e=l.jJa(this.ah[1],e.eV,e.nV,e.Py,e.Ry);this.ah[1]!=e&&(this.ah[1]=e,(e=this.SI())&&m.pla(e,this.ah[1]))}},SI:function(){var e=this.get("meshGroup");return e?m.jl(e)[1]:null},Do:function(){return[0,
1].map(function(e){var g=0==e?this.Mqa():this.WN();e=m.create(this.ah[e],g);c.Hy(e,c.fq);c.Iy(e,c.Ns);c.VG(e,d.fN);c.SU(e,1);return e}.bind(this))},Qz:function(){return[l.eL(),l.eL()]},Er:function(e){var g=!1;this.R("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.Ih.makeTranslation(.5*-this.get("composedTranslationX")*l.Hg,.5*this.get("composedTranslationY")*l.Hg,.5*this.get("composedTranslationZ")*l.Hg),g=!0);this.R("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&
(this.Td.makeRotationY(-e.Ra*b),this.Td.multiply(f.makeRotationX(-this.get("composedDeltaPitch")*b)),this.Td.multiply(f.makeRotationY(this.get("composedDeltaYaw")*b)),this.Td.multiply(f.makeRotationY(e.Ra*b)),g=!0);this.R("yaw","pitch")&&(this.$o.makeRotationY(-this.get("yaw")*b),this.$o.multiply(f.makeRotationX(this.get("pitch")*b)),g=!0);if(this.R("distance","composedTranslationX","composedTranslationY","composedTranslationZ")){var n=0==this.get("composedTranslationX")&&0==this.get("composedTranslationY")&&
0==this.get("composedTranslationZ")&&void 0!==this.get("distance");this.set("z",n?l.yu(this.get("distance")):l.Yr())}this.R("z")&&(this.mn.makeTranslation(0,0,-this.get("z")),g=!0);g&&(this.pI.copy(this.Ih),this.pI.multiply(this.Td),this.pI.multiply(this.$o),this.pI.multiply(this.mn));n=!1;this.set("rendererYaw",e.Ra);this.set("rendererPitch",e.pitch);this.set("rendererRoll",e.Fg);this.set("rendererCameraFOV",e.ti);this.set("rendererWidth",e.width);this.set("rendererHeight",e.height);e.ti&&this.R("z",
"rendererCameraFOV")&&this.set("rendererHeightZ",Math.tan(e.ti*b*.5)*this.get("z")*2);if(e.ti&&(g||this.R("rendererYaw","rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth","rendererHeight","rendererHeightZ","inVR"))){if(e.ob)this.nI.copy(this.pI),this.jK.identity();else{n=e.camera;this.nI.copy(n.matrixWorld);this.xD.setFromMatrixPosition(n.matrixWorld);this.xD.applyMatrix4(this.pI);this.xD.applyMatrix4(n.matrixWorldInverse);var q=-10,p=-10;0>this.xD.z&&(this.xD.applyMatrix4(n.projectionMatrix),
q=.5*this.xD.x,p=.5*this.xD.y);var r=this.get("rendererHeightZ");this.jK.makeTranslation(q*r*n.aspect,p*r,0)}n=!0}this.R("roll")&&(this.wj.makeRotationZ(this.get("roll")*b),n=!0);if(e.ti&&(g||this.R("rendererHeight","inVR","rendererHeightZ","width","height","contentWidth","contentHeight","scale","scaleMode","horizontalAlign","verticalAlign","flipHorizontally","offsetX","offsetY"))){g=e.ob?1024:e.height;n=this.get("scale")*this.get("rendererHeightZ")/g*(e.ob?2:1);var t=this.get("width");p=this.get("height");
var u=this.get("offsetX");r=this.get("offsetY");var v=this.get("contentWidth"),w=this.get("contentHeight");q=(this.get("flipHorizontally")?-1:1)*n;var x=this.get("scaleMode");e=this.get("horizontalAlign")||h.$e;g=this.get("verticalAlign")||h.se;x=k.e3(t,p,v,w,x,e,g);v=q*t;w=n*p;this.GN.makeScale(v,w,1);t=q*(.5*t-u);p=n*(r-.5*p);this.Lpa.makeTranslation(t,p,0);q*=x.width;n*=x.height;this.SN.makeScale(q,n,1);this.Jqa.makeTranslation((e==h.ab?.5*-(v-q):e==h.ub?.5*(v-q):0)+t,(g==h.Hc?.5*(w-n):g==h.Ac?
.5*-(w-n):0)+p,0);n=!0}n&&(this.ai.copy(this.nI),this.ai.multiply(this.mn),this.ai.multiply(this.jK),this.ai.multiply(this.wj),this.Fz.copy(this.ai),this.Fz.multiply(this.Lpa),this.Fz.multiply(this.GN),this.ai.multiply(this.Jqa),this.ai.multiply(this.SN),e=m.jl(this.get("meshGroup")),m.Pr(e[0],this.Fz),m.Pr(e[1],this.ai))}}});
define("gA",["require","pB","lx"],function(a){function d(k,c){this.Ad=k;this.uc=c;this.Ub=!1;this.m8();this.p8();this.GE()}var l=a("pB"),m=a("lx");d.prototype.clear=function(){this.rea();this.xea();this.Ad.get("autoplay")||this.Ad.set("state",m.U);this.Ad=null;this.uc.Qc(m.U);this.uc=null};d.prototype.Ze=function(k){this.Ub!=k&&(this.Ub=k,this.bu())};d.prototype.GE=function(){this.uc.Qc(this.Ad.get("state"))};d.prototype.OP=function(){this.bu()};d.prototype.QP=function(){this.uc.ola(this.Ad.get("frameDuration"))};
d.prototype.PP=function(){this.uc.NIa("first"==this.Ad.get("finalFrame"))};d.prototype.MP=function(){this.Ad.trigger(l.lq)};d.prototype.LP=function(){this.Ad.trigger(l.Gb)};d.prototype.NP=function(){this.Ad.set("state",this.uc.getState())};d.prototype.bu=function(){this.Ad.get("autoplay")&&this.uc.Qc(this.Ub?m.PLAYING:m.U)};d.prototype.m8=function(){this.Ad.bind(l.G("state"),this.GE,this,!0);this.Ad.bind(l.G("autoplay"),this.OP,this,!0);this.Ad.bind(l.G("frameDuration"),this.QP,this,!0);this.Ad.bind(l.G("finalFrame"),
this.PP,this,!0)};d.prototype.rea=function(){this.Ad.unbind(l.G("state"),this.GE,this,!0);this.Ad.unbind(l.G("autoplay"),this.OP,this,!0);this.Ad.unbind(l.G("frameDuration"),this.QP,this,!0);this.Ad.unbind(l.G("finalFrame"),this.PP,this,!0)};d.prototype.p8=function(){this.uc.bind(l.lq,this.MP,this,!0);this.uc.bind(l.Gb,this.LP,this,!0);this.uc.bind(l.Ae,this.NP,this,!0)};d.prototype.xea=function(){this.uc.unbind(l.lq,this.MP,this,!0);this.uc.unbind(l.Gb,this.LP,this,!0);this.uc.unbind(l.Ae,this.NP,
this,!0)};return d});
define("hu","require lh pB lx iy fq cD eB gA fr kY eN bn".split(" "),function(a){var d=a("lh"),l=a("pB"),m=a("lx"),k=a("iy"),c=a("fq"),h=a("cD"),f=a("eB"),b=a("gA"),e=a("fr"),g=a("kY"),n=a("eN"),q=a("bn");return{ID: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.BZ=this.BZ.bind(this);this.EZ=this.EZ.bind(this);this.uc=null;this.Pta=-1;this.Ck=this.Ya=this.Bo=null},Vi:function(p){this.wga(p);this.RR(p);this.y2a(p)},wga:function(p){if(this.R("level")){var r=this.get("level");this.set("levelURL",r&&r.get("url"))}this.R("image","level","levelURL","projected","premultipliedAlpha")&&(this.qqa(),this.Ya=this.get("image"),this.fb=this.get("level"),
this.set("textureSource",new e(this.Ya&&this.fb.get("url"))),this.set("premultipliedAlpha",this.Ya&&this.fb.get("premultipliedAlpha")),this.get("textureSource").Z$a(this.get("premultipliedAlpha")),this.sOa(),this.Ya?(this.dOa(),this.gOa()):(this.trigger(l.jd),this.trigger(l.ea)));(r=this.get("textureSource"))&&r.tla(0<p.Kj);this.R("textureSource","isVideoTexture")&&r&&r.GU(this.get("isVideoTexture"))},RR:function(){if(this.R("blending","chromaColor","chromaThreshold","chromaSmoothing","premultipliedAlpha",
"side")){var p=new h.ro;p.oB=this.get("blending");p.mu=this.get("chromaColor");p.ES=this.get("chromaThreshold");p.DS=this.get("chromaSmoothing");p.premultipliedAlpha=this.get("premultipliedAlpha");p.side=this.get("side");this.set("materialConfig",p)}},y2a:function(){if(this.R("meshGroup","projected","visible")){var p=this.get("projected")&&this.get("visible")?k.B7:k.fN;f.jl(this.get("meshGroup")).forEach(function(r){g.VG(r,p)}.bind(this))}},vm:function(){this.R("visible","composedAlpha","image","state",
"visibleOnStop")&&this.set("inView",this.get("visible")&&0<this.get("composedAlpha")&&(this.get("visibleOnStop")||this.get("state")!=m.U));this.R("composedAlpha","meshGroup","inView")&&f.gf(this.get("meshGroup"),this.get("inView")?this.get("composedAlpha"):0);this.Bo&&this.Bo.Ze(this.get("inView"))},BZ:function(){this.Ya&&c.Ja("AnimatedImageResource",this.Ya)?this.set("visibleOnStop",this.Ya.get("visibleOnStop")):this.set("visibleOnStop",!0)},EZ:function(){this.set("levelURL",this.fb.get("url"))},
nJ:function(){this.qqa()},qqa:function(){this.Bo&&(this.Bo.clear(),this.Bo=null);this.uc&&(this.uc.unbind(l.ba,this.NO,this,!0),this.uc.unbind(l.Ae,this.ita,this,!0),this.uc.clear(),this.uc=null);this.Ck&&(this.Ck.dispose(),this.Ck=null);this.get("textureSource")&&(this.Aea(),this.set("textureSource",null));this.Ya&&(this.KYa(),this.Ya=null);this.fb&&(this.NYa(),this.fb=null)},dOa:function(){d.da(this.Ya,["visibleOnStop"],this.BZ,!0)},KYa:function(){d.ca(this.Ya,["visibleOnStop"],this.BZ)},gOa:function(){d.da(this.fb,
["url"],this.EZ,!0)},NYa:function(){d.ca(this.fb,["url"],this.EZ)},OO:function(){this.Aea();var p=this.get("image");if(c.Ja("AnimatedImageResource",p)){this.uc=new q(this.get("textureSource").Cf(),p.get("rowCount",1),p.get("colCount",1),p.get("frameDuration"),p.get("frameCount",p.get("rowCount",1)*p.get("colCount",1)),p.get("repeat"),"first"==p.get("finalFrame"));var r=this.uc.eg();this.uc.bind(l.Ae,this.ita,this,!0);this.uc.bind(l.ba,this.NO,this,!0);this.Bo=new b(p,this.uc);this.set("visibleOnStop",
p.get("visibleOnStop"));this.set("state",this.uc.getState())}else r=this.get("textureSource").Cf(),this.Ck=new n(r),this.set("visibleOnStop",!0),this.set("state",null);this.vm();this.set("contentWidth",r.width);this.set("contentHeight",r.height);this.get("textureSource").Rm(r);this.trigger(l.jd);this.trigger(l.ea)},jta:function(){this.Aea();this.trigger(l.jd);this.trigger(l.ea)},ita:function(){this.set("state",this.uc.getState())},NO:function(p){var r=0!=this.get("composedTranslationX")||0!=this.get("composedTranslationY")||
0!=this.get("composedTranslationZ"),t=!!this.get("blendingActive");p=p.data.frameIndex;var u=this.Pta>p;this.Pta=p;this.get("textureSource").update(!u||r||t);this.Ga()},sOa:function(){var p=this.get("textureSource");p.bind(l.ea,this.OO,this,!0);p.bind(l.Bc,this.jta,this,!0)},Aea:function(){var p=this.get("textureSource");p.unbind(l.ea,this.OO,this,!0);p.unbind(l.Bc,this.jta,this,!0)},waa:function(p){return this.Ck&&this.Ck.xg==p.source?this.Ck.info(p.x,p.y):n.info(p.source,p.x,p.y)}}});
define("py","require lh pB fq oq bi A".split(" "),function(a){function d(e){e=e.get("mapColor");return"image"==e||"transparent"==e||"any"==e}function l(e){e=e.get("mapColor");return"image"!=e&&"transparent"!=e&&"any"!=e}var m=a("lh"),k=a("pB"),c=a("fq"),h=a("oq"),f=a("bi"),b=new (a("A"));return{Rz:function(){this.set("beamEnabled",!1);this.AZ=this.AZ.bind(this);this.iY=null;this.bI={};this.Ai=[];this.ct=[];this.xw=null},bab:function(e){this.xw!=e&&(this.sea(),this.xw=e,this.fpa())},tp:function(e){this.TA=
e.Ra;this.SA=e.pitch},sea:function(){this.xw&&m.ca(this.xw,["areas"],this.AZ)},fpa:function(){this.xw&&m.da(this.xw,["areas"],this.AZ,!0)},RJ:function(){this.sea();this.fpa()},TJ:function(){this.uya([]);this.sea()},AZ:function(){var e=this.xw.get("areas",[]);c.Ja("HotspotPanoramaOverlayImage",this.v)||c.Ja("FlatHotspotPanoramaOverlayImage",this.v)||c.Ja("QuadHotspotPanoramaOverlayImage",this.v)?this.iY=e.filter(d):this.iY=e.filter(l);this.iY.forEach(function(g){b.set(g,0)})},Qm:function(e){if(e.vf==
k.Fl){var g=this.haa(e);if(0<g.length){e.kB(g);var n=this.RSa(g),q;for(q in n)e.BBa(n[q],q);e.gl(this.get("distance"));(n=this.$b(g,e.qG()))&&e.Z1(n,this.dB(e.qG()))}g=this.SSa(e,g);this.uya(g,e.Iu(),e.qG())}else if(e.vf==k.Xf){if(g=this.haa(e),0<g.length){var p=!1;g.forEach(function(r){r.trigger(k.ma);!p&&1<r.uL(k.ma,!0).length&&(p=!0)});e.gl(this.get("distance"));p&&e.ws(g)}}else e.vf==k.rz?(g=this.haa(e),0<g.length&&(p=!1,g.forEach(function(r){var t={};e.Iu()&&(t=e.Pu().ZDa());r.trigger(k.hb,t);
!p&&1<r.uL(k.hb,!0).length&&(p=!0)}),this.ct=g,e.gl(this.get("distance")),p&&e.ws(g))):e.vf==k.MH&&this.ct.length&&(this.ct.forEach(function(r){var t={};e.Iu()&&(t=e.Pu().ZDa());r.trigger(k.Eb,t)}),this.ct=[])},SSa:function(e,g){if(!e.xja())return this.bI={},g;e=e.Ata?"main":"secondary";this.bI[e]=g;g=[];for(e in this.bI)for(var n=0;n<this.bI[e].length;n++)0>g.indexOf(this.bI[e][n])&&g.push(this.bI[e][n]);return g},haa:function(e){if(!this.get("beamEnabled")||0==this.get("alpha")||e.hl())return[];
var g=this.rw(e.pr);return 0==g.length?[]:this.iY.filter(function(n){var q=n.get("mapColor");return"any"==q?!0:"image"==q?g.some(function(p){return this.waa(p).My}.bind(this)):"transparent"==q?g.every(function(p){return!this.waa(p).My}.bind(this)):q&&"#"==q[0]?g.some(function(p){return 10>h.c3(this.waa(p).color,q)}.bind(this)):!1}.bind(this))},uya:function(e,g,n){this.Ai.forEach(function(p){if(0>e.indexOf(p)){var r=b.get(p)-1;b.set(p,r);0==r&&(p.trigger(k.Jb,{center:n}),g&&p.trigger(k.hq))}});var q=
this.Ai;this.Ai=e;this.Ai.forEach(function(p){if(0>q.indexOf(p)){var r=(b.get(p)||0)+1;b.set(p,r);1==r&&(p.trigger(k.Gc,{center:n}),g&&p.trigger(k.RC))}})},$b:function(e,g){for(var n="",q=e.length-1;0<=q&&""==n;q--){var p=e[q];if(!g||p.get("displayTooltipInTouchScreens")&&!1!==this.Ha.M.get("displayTooltipInTouchScreens"))n=p.get("toolTip","")}return n},dB:function(e){if(e){e=this.get("yaw")-this.TA;var g=this.get("pitch")-this.SA;return Math.sqrt(e*e+g*g)}return 0},RSa:function(e){var g={};!0===
this.xw.get("useHandCursor")?g[f.Le]=e:!1!==this.xw.get("useHandCursor")&&e.forEach(function(n){var q;(q=n.get("useHandCursor")?f.Le:n.get("cursor"))&&(g[q]?g[q].push(n):g[q]=[n])});return g}}});
define("on",["require","w","cM"],function(a){function d(){this.mi=void 0;this.cJ=this.RE=0;this.Ba=!0;this.cX=this.Sfa=this.daa=void 0;this.Ub=!1}var l=a("w"),m=a("cM"),k=Math.PI/180,c=l.browser()==l.sh?[-.5,0]:[0,0];d.prototype.gC=function(h){this.mi!=h&&(this.mi=h,this.Ba=!0)};d.prototype.fC=function(h){if(h<this.RE+c[0]||h>this.RE+c[1])this.RE=h,this.Ba=!0};d.prototype.get=function(h,f){void 0!==f||(f=!0);this.Ba&&(this.oa(),this.Ba=!1);var b=this.daa.get(h)||0;h=(this.Sfa.get(h)||0)-b;f&&(180<
h?h-=360:-180>h&&(h+=360));return b+h*this.cX};d.prototype.Via=function(){this.Ba&&(this.oa(),this.Ba=!1);for(var h=this.daa.get("vertices"),f=this.Sfa.get("vertices"),b=[],e=0;e<h.length;e++){var g=h[e].get("yaw")||0,n=(f[e].get("yaw")||0)-g;180<n?n-=360:-180>n&&(n+=360);var q=h[e].get("pitch")||0,p=(f[e].get("pitch")||0)-q;b.push(new m(g+n*this.cX,q+p*this.cX))}h=this.hP&&this.hP.length==b.length;for(e=0;e<b.length&&h;e++)h=this.hP[e].get("yaw")==b[e].get("yaw")||this.hP[e].get("pitch")==b[e].get("pitch");
return h?this.hP:this.hP=b};d.prototype.kl=function(){return this.get("opacity",!1)};d.prototype.iy=function(){var h=this.get("hfov")||this.get("vfov"),f=this.mi[0].get("hfov")||this.mi[0].get("vfov");return Math.tan(.5*h*k)/Math.tan(.5*f*k)};d.prototype.oa=function(){for(var h=this.cJ,f,b=this.mi.length-1,e,g;;){f=Math.min(h+1,b);e=this.Wsa(h);g=this.Wsa(f);if(e<=this.RE&&this.RE<=g)break;if(e>this.RE){if(0==h){f=h;break}--h}else{if(h==b){f=h;break}h+=1}}this.daa=this.mi[h];this.Sfa=this.mi[f];h=
g-e;this.cX=0<h?(this.RE-e)/h:0};d.prototype.Wsa=function(h){return this.mi[h].get("timestamp")};return d});
define("cp",["require","lh","on"],function(a){var d=a("lh"),l=a("on");return{Eo:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.ee=this.ee.bind(this);this.xb=new l},Zo:function(){d.da(this.v,"horizontalAlign verticalAlign scale scaleMode width height offsetX offsetY distance playbackPositions".split(" "),this.ee,!0)},ap:function(){d.ca(this.v,"horizontalAlign verticalAlign scale scaleMode width height offsetX offsetY distance playbackPositions".split(" "),
this.ee)},ee:function(){this.set("horizontalAlign",this.v.get("horizontalAlign"));this.set("verticalAlign",this.v.get("verticalAlign"));this.set("scale",this.v.get("scale"));this.set("scaleMode",this.v.get("scaleMode"));this.set("width",this.v.get("width"));this.set("height",this.v.get("height"));this.set("offsetX",this.v.get("offsetX",.5*this.v.get("width")));this.set("offsetY",this.v.get("offsetY",.5*this.v.get("height")));this.set("distance",this.v.get("distance"));this.set("playbackPositions",
this.v.get("playbackPositions"))},yf:function(){this.R("playbackPositions","currentTime")&&(this.xb.gC(this.get("playbackPositions")),this.xb.fC(this.get("currentTime")),this.set("yaw",this.xb.get("yaw")),this.set("pitch",this.xb.get("pitch")),this.set("roll",this.xb.get("roll")),this.set("alpha",this.xb.kl()))}}});
define("kq","require lV lh pB eB c px hu py cp nY".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("eB"),c=a("c"),h=a("px"),f=a("hu"),b=a("py"),e=a("cp"),g=a("nY"),n=0;a=d.extend(c,h,e,f,b,function(q){c.call(this);this.set("tag","FlatHotspotImage");this.set("id","flat_hs_image_"+n++);this.v=q;this.Kk.push(this.v);this.jg=this.jg.bind(this)});a.prototype.Zb=function(){c.prototype.Zb.call(this);l.da(this.v,["image.levels"],this.jg,!0)};a.prototype.ac=function(){l.ca(this.v,["image.levels"],
this.jg);c.prototype.ac.call(this)};a.prototype.jg=function(){this.set("image",this.v.get("image"));this.set("level",g.c6a(this.v))};a.prototype.oa=function(q){this.zF();c.prototype.oa.call(this,q);this.R("inView")&&this.v.trigger(this.get("inView")?m.kd:m.cd)};a.prototype.zF=function(){if(this.R("meshGroup","panoramaId","id")){var q=this.get("meshGroup");q&&q.children.forEach(function(p){k.setAttribute(p,k.sC,this.get("panoramaId"));k.setAttribute(p,k.d6,this.get("id"))}.bind(this))}};return a});
define("bG",["require","pB","W"],function(a){var d=a("pB"),l=a("W");a={rga:function(g){if(this.Ha){var n=this.wTa(g);n?(g=this.zsa(this).some(function(q){return n.intersectsObject(q)}),this.Wea(g)):this.Wea(!1)}},zsa:function(g){var n=g.get("meshGroup"),q=[];n&&n.traverse(function(p){p.geometry&&p.visible&&(Array.isArray(p.material)?p.material.some(function(r){return 0<r.opacity}):0<p.material.opacity)&&q.push(p)});g.rb().forEach(function(p){q=q.concat(this.zsa(p))}.bind(this));return q}};var m=new THREE.Frustum,
k=new THREE.PerspectiveCamera,c=90,h=.5,f=new THREE.Matrix4,b=Math.PI/180,e=180/Math.PI;a.wTa=function(g){g=l.getCamera(g.Gg);if(!g)return null;var n=this.Ha.M.get("focusAreaScale");if(!k.projectionMatrix.equals(g.projectionMatrix)||!k.matrixWorldInverse.equals(g.matrixWorldInverse)||c!=g.fov||h!=n){k.copy(g);var q=.5*k.fov*b;k.fov=2*Math.atan2(h*Math.sin(q),Math.cos(q))*e;k.updateProjectionMatrix();m.setFromProjectionMatrix(f.copy(k.projectionMatrix).multiply(k.matrixWorldInverse));c=g.fov;h=n}return m};
a.V$=function(){this.Gba=!1};a.W$=function(){this.Wea(!1)};a.Vea=function(g){this.Qra=g};a.Wea=function(g){this.Gba!==g&&(this.Gba=g,this.Qra&&this.Qra.trigger(this.Gba?d.aMa:d.bMa))};return a});
define("mS","require lV lh pB jE bG oT w pd bM lW".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("jE"),c=a("bG"),h=a("oT");a("w");var f=a("pd"),b=a("bM"),e=a("lW");a=d.extend(k,c,function(g){k.call(this);this.v=g;this.Kk.push(this.v);this.ZZ=this.ZZ.bind(this);this.WZ=this.WZ.bind(this);this.$Z=this.$Z.bind(this);this.sq(["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("enabledInStandard",!0);this.set("interactionEnabled",!0);this.set("centerOverDisplay",!1);this.set("rollOverDisplay",!1);this.set("loadingActive",!1);this.B8=this.C8=this.cp=this.he=this.Of=null;this.Ai=[];this.A8=[];this.ym=null;this.Vea(this.v)});a.prototype.Zb=function(){this.Of=(new h(m.ea)).Tm(this.BE.bind(this));this.he=(new h(m.mc)).Hp(this.EE.bind(this));this.cp=(new h(m.jd)).Tm(this.KWa.bind(this));
this.C8=(new h(m.Gc)).Hp(this.DWa.bind(this));this.B8=(new h(m.Jb)).Hp(this.CWa.bind(this));k.prototype.Zb.call(this);l.da(this.v,["items","rollOverItems","maps","rollOverMaps"],this.ZZ,!0);l.da(this.v,"fadeInDuration fadeOutDuration enabledInVR enabledInStandard enabledInSurfaceSelection enabled interactionEnabled centerOverDisplay rollOverDisplay".split(" "),this.$Z,!0);l.da(this.v,["areas"],this.WZ,!0);this.V$()};a.prototype.ac=function(){this.W$();this.BK([],this.Ai);this.lga([],this.A8);this.Of.dispose();
this.he.dispose();this.cp.dispose();this.C8.dispose();this.B8.dispose();l.ca(this.v,["items","rollOverItems","maps","rollOverMaps"],this.ZZ);l.ca(this.v,"fadeInDuration fadeOutDuration enabledInVR enabledInStandard enabledInSurfaceSelection enabled interactionEnabled centerOverDisplay rollOverDisplay".split(" "),this.$Z);l.ca(this.v,["areas"],this.WZ);this.get("visible")&&this.v.trigger(m.cd);k.prototype.ac.call(this)};a.prototype.ZZ=function(){this.set("items",this.Ha.hy(this.v.get("items",[])));
this.set("rollOverItems",this.Ha.hy(this.v.get("rollOverItems",[])));this.set("maps",this.Ha.hy(this.v.get("maps",[])));this.set("rollOverMaps",this.Ha.hy(this.v.get("rollOverMaps",[])));var g=[].concat(this.get("maps"),this.get("items"),this.get("rollOverMaps"),this.get("rollOverItems"));g.forEach(function(n){n.bab(this.v)}.bind(this));this.get("items").forEach(function(n){n.set("projected",this.v.get("projected"))}.bind(this));this.qh(g);this.Of.Hf(g);this.he.Hf(g);this.cp.Hf(g)};a.prototype.$Z=
function(){this.set("fadeInDuration",this.v.get("fadeInDuration"));this.set("fadeOutDuration",this.v.get("fadeOutDuration"));this.set("enabled",this.v.get("enabled",!0));this.set("enabledInVR",this.v.get("enabledInVR"));this.set("enabledInStandard",this.v.get("enabledInStandard",!0));this.set("enabledInSurfaceSelection",this.v.get("enabledInSurfaceSelection",!0));this.set("centerOverDisplay",this.v.get("centerOverDisplay"));this.set("rollOverDisplay",this.v.get("rollOverDisplay",!1));this.set("interactionEnabled",
this.v.get("interactionEnabled",!0))};a.prototype.WZ=function(){var g=this.v.get("areas");this.C8.Hf(g);this.B8.Hf(g)};a.prototype.oa=function(g){this.vm(g);k.prototype.oa.call(this,g);this.je(g);this.rga(g)};a.prototype.je=function(g){this.set("inVR",g.ob);this.set("surfaceSelection",g.$U);this.set("hotspotsEnabled",g.lG);if(this.R("items","rollOverItems","maps","rollOverMaps","over","centerOver","inVR","hotspotsEnabled","enabledInVR","enabledInStandard","surfaceSelection","enabledInSurfaceSelection",
"enabled","interactionEnabled","rollOverDisplay","centerOverDisplay")||this.ta&&this.ta.R("composedAlpha")){var n=g=!1,q=this.get("hotspotsEnabled")&&this.get("enabled")&&(!this.get("inVR")||this.get("enabledInVR"))&&(this.get("inVR")||this.get("enabledInStandard"))&&(!this.get("surfaceSelection")||this.get("enabledInSurfaceSelection"))&&this.ta&&0<this.ta.get("composedAlpha"),p=this.get("interactionEnabled");q&&(g=this.get("centerOver")&&!this.get("inVR"),n=this.get("over")||g,g=!this.get("rollOverDisplay")&&
!this.get("centerOverDisplay")||this.get("over")&&this.get("rollOverDisplay")||g&&!1!==this.get("centerOverDisplay")&&this.get("rollOverDisplay"));this.get("rollOverItems").forEach(function(w){w.set("visible",n);w.set("beamEnabled",q&&n&&p)});var r=0==this.get("rollOverItems").length;this.get("items").forEach(function(w){w.set("visible",r||!n);w.set("beamEnabled",q&&(r||!n)&&p)});this.get("rollOverMaps").forEach(function(w){w.set("visible",!1);w.set("beamEnabled",q&&n&&p)});var t=0==this.get("rollOverMaps").length;
this.get("maps").forEach(function(w){w.set("visible",!1);w.set("beamEnabled",q&&(t||!n)&&p)});this.set("visible",g)}if(this.R("visible")){g=this.get("alpha");var u=this.get("visible")?1:0,v=(this.get("visible")?this.get("fadeInDuration"):this.get("fadeOutDuration"))*Math.abs(g-u);this.ym=new f("linear",[new b("alpha",g,u)],Math.max(v,1));this.Ga();this.get("visible")?this.v.trigger(m.kd):this.v.trigger(m.cd)}};a.prototype.vm=function(g){this.ym&&(this.ym.Xe()?this.ym=null:(this.ym.Fb(g.Ue),this.set("alpha",
this.ym.eb("alpha"))),this.Ga())};a.prototype.BE=function(){this.zj();this.trigger(m.ea)};a.prototype.KWa=function(){this.zj();this.trigger(m.jd)};a.prototype.EE=function(){this.zj()};a.prototype.zj=function(){var g=0;this.he.su(function(n){var q=0,p;this.Of.Im(n)?q=100:(p=this.he.Im(n))&&(q=p.Ug);g+=q}.bind(this));this.trigger(new e(m.mc,g/this.he.md.length))};a.prototype.DWa=function(g){g.data.center?this.lga([g.source],[]):this.BK([g.source],[])};a.prototype.CWa=function(g){g.data.center?this.lga([],
[g.source]):this.BK([],[g.source])};a.prototype.BK=function(g,n){this.lAa(this.Ai,g,n);this.set("over",0<this.Ai.length)};a.prototype.lga=function(g,n){this.lAa(this.A8,g,n);this.set("centerOver",0<this.A8.length)};a.prototype.lAa=function(g,n,q){n||(n=[]);q||(q=[]);q.forEach(function(p){p=g.indexOf(p);0<=p&&g.splice(p,1)});n.forEach(function(p){0>g.indexOf(p)&&g.push(p)})};return a});
define("pN",["require","lh","on"],function(a){var d=a("lh"),l=a("on");return{Eo:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.ee=this.ee.bind(this);this.xb=new l},Zo:function(){d.da(this.v,"horizontalAlign verticalAlign scale scaleMode distance playbackPositions".split(" "),this.ee,!0)},ap:function(){d.ca(this.v,"horizontalAlign verticalAlign scale scaleMode distance playbackPositions".split(" "),this.ee)},ee:function(){this.set("horizontalAlign",
this.v.get("horizontalAlign"));this.set("verticalAlign",this.v.get("verticalAlign"));this.set("scaleMode",this.v.get("scaleMode"));this.set("distance",this.v.get("distance"));this.set("scale",this.v.get("scale"));this.set("playbackPositions",this.v.get("playbackPositions"))},yf:function(){this.R("playbackPositions","currentTime")&&(this.xb.gC(this.get("playbackPositions")),this.xb.fC(this.get("currentTime")),this.set("yaw",this.xb.get("yaw")),this.set("pitch",this.xb.get("pitch")),this.set("roll",
this.xb.get("roll")),this.set("rotationX",this.xb.get("rotationX")),this.set("rotationY",this.xb.get("rotationY")),this.set("hfov",this.xb.get("hfov")),this.set("vfov",this.xb.get("vfov")),this.set("alpha",this.xb.kl()))}}});
define("fj","require lV lh pB eB c oN hu py pN nY".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("eB"),c=a("c"),h=a("oN"),f=a("hu"),b=a("py"),e=a("pN"),g=a("nY"),n=0;a=d.extend(c,h,f,b,e,function(q){c.call(this);this.set("tag","HotspotImage");this.set("id","hs_image_"+n++);this.set("side",THREE.DoubleSide);this.set("wasInView",!1);this.v=q;this.Kk.push(this.v);this.jg=this.jg.bind(this)});a.prototype.Zb=function(){c.prototype.Zb.call(this);l.da(this.v,["image.levels"],this.jg,!0)};
a.prototype.ac=function(){l.ca(this.v,["image.levels"],this.jg);c.prototype.ac.call(this)};a.prototype.jg=function(){this.set("image",this.v.get("image"));this.set("level",g.j6a(this.v,this.get("panoramaPixelsPerDegree")))};a.prototype.oa=function(q){this.zF();c.prototype.oa.call(this,q);this.R("inView")&&(q=this.get("inView"),q!==this.get("wasInView")&&(this.set("wasInView",q),this.v.trigger(q?m.kd:m.cd)))};a.prototype.zF=function(){if(this.R("meshGroup","panoramaId","id")){var q=this.get("meshGroup");
q&&q.children.forEach(function(p){k.setAttribute(p,k.sC,this.get("panoramaId"));k.setAttribute(p,k.d6,this.get("id"))}.bind(this))}};return a});
define("bA",["require","oo","a"],function(a){function d(k,c,h){this.gg=k||new l(0,0,0);this.Hj=c||new l(1,0,0);this.RB=h||new l(0,1,0)}var l=a("oo"),m=a("a");d.prototype.clone=function(){return new d(this.gg.clone(),this.Hj.clone(),this.RB.clone())};d.prototype.apply=function(k){k.XK(this.gg);k.XK(this.Hj);k.XK(this.RB)};d.prototype.intersection=function(k,c){var h=m.tB(k.gg,k.Hj),f=m.tB(this.gg,k.gg),b=m.tB(this.gg,this.Hj);b.v2(m.tB(this.gg,this.RB));h=h.WF(b);if(!(0==h||c&&0>h))return c=-b.WF(f)/
h,new l(k.gg.x+(k.Hj.x-k.gg.x)*c,k.gg.y+(k.Hj.y-k.gg.y)*c,k.gg.z+(k.Hj.z-k.gg.z)*c)};d.prototype.O4=function(k,c){var h=m.tB(this.gg,this.Hj),f=m.tB(this.gg,this.RB);k=m.tB(this.gg,k);var b=h.Tia(),e=f.Tia();return c?new l(k.WF(h)/(b*b),k.WF(f)/(e*e),0):new l(k.WF(h)/b,k.WF(f)/e,0)};return d});
define("fJ","require lz iG dt oo bA fD mN".split(" "),function(a){var d=a("lz"),l=a("iG"),m=a("dt"),k=a("oo"),c=a("bA"),h=a("fD"),f=a("mN"),b=Math.PI/180,e=180/Math.PI,g=new h,n=new l,q=new c,p=new k;return{get:function(r,t,u,v,w,x,y,z){r*=b;t*=b;t=new k(Math.sin(-r)*Math.cos(t),Math.sin(t),Math.cos(-r)*Math.cos(t));g.identity();g.rotateY(u*b);g.rotateZ(w*b);g.rotateX(v*b);t.apply(g);return 0<t.z?(n.UU(y),n.TIa(z),n.UG(x*b),n.project(t),t):null},cdb:function(r,t,u){g.identity();g.rotateX(-u.Oc()*
b);g.rotateZ(-u.fg()*b);g.rotateY(-u.Pc()*b);p.set(r,t,0);r=u.unproject(p).oEa();r.apply(g);return{Ra:r.Pc()*e,pitch:r.Oc()*e}},Veb:function(r,t,u,v,w,x,y,z,B,D,F,A,E,J){J||(J=f.fz);E||(E=d.Gm(A,D,F));A||(A=d.Sp(E,D,F));var C=.5*D/Math.tan(.5*A*b),L=C*Math.tan(.5*A*b)*2,T=C*Math.tan(.5*E*b)*2;q.gg.set(.5*+L,.5*+T,0);q.Hj.set(.5*-L,.5*+T,0);q.RB.set(.5*+L,.5*-T,0);g.identity();g.rotateZ(-B*b);g.rotateX(-y*b);g.rotateY(z*b);g.translate(0,0,C);g.rotateZ(-x*b);g.rotateX(-w*b);g.rotateY(-v*b);g.rotateY(u.Pc()*
b);g.rotateZ(u.fg()*b);g.rotateX(u.Oc()*b);q.apply(g);p.set(r,t,0);w=q.intersection(u.unproject(p));v={x:void 0,y:void 0,xScaled:void 0,yScaled:void 0};w&&0<w.z&&(w=q.O4(w),v.xScaled=v.x=w.x/L,v.yScaled=v.y=w.y/T);if(J!=f.fz){switch(J){case f.Uh:var S=Math.min(d.Sp(E,D,F),A);var U=Math.min(d.Gm(A,D,F),E);break;case f.Is:S=Math.max(d.Sp(E,D,F),A);U=Math.max(d.Gm(A,D,F),E);break;case f.bq:S=A;U=d.Gm(A,D,F);break;case f.xk:S=d.Sp(E,D,F),U=E}if(S!=A||U!=E)L=C*Math.tan(.5*S*b)*2,T=C*Math.tan(.5*U*b)*2,
q.gg.set(.5*+L,.5*+T,0),q.Hj.set(.5*-L,.5*+T,0),q.RB.set(.5*+L,.5*-T,0),q.apply(g),p.set(r,t,0),(w=q.intersection(u.unproject(p)))&&0<w.z&&(w=q.O4(w),v.xScaled=w.x/L,v.yScaled=w.y/T)}return v},web:function(r,t,u,v,w,x,y){y=.5*w/Math.tan(.5*y*b);q.gg.set(.5*+w,.5*+x,y);q.Hj.set(.5*-w,.5*+x,y);q.RB.set(.5*+w,.5*-x,y);g.identity();g.rotateZ(-v*b);g.rotateX(-u*b);g.rotateY(-t*b);g.rotateY(r.Pc()*b);g.rotateZ(r.fg()*b);g.rotateX(r.Oc()*b);q.apply(g);r=new m(new k(0,0,0),new k(0,0,1));return(r=q.intersection(r))&&
0<r.z?(r=q.O4(r),{x:r.x/w,y:r.y/x}):null}}});
define("ei",["require","iy","jJ","eB","kY"],function(a){var d=a("iy"),l=a("jJ"),m=a("eB"),k=a("kY"),c=Math.PI/180;return{$v: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.ah=this.Qz();this.WD=l.eL();this.mn=new THREE.Matrix4;this.nI=new THREE.Matrix4;this.jK=new THREE.Matrix4;this.Kua=new THREE.Matrix4;this.wj=new THREE.Matrix4;this.om=new THREE.Matrix4;
this.Hi=new THREE.Matrix4},Lx:function(h){this.Er(h)},SI:function(){var h=this.get("meshGroup");return h?m.jl(h)[0]:null},Do:function(){return[0].map(function(h){var f=this.WN();h=m.create(this.ah[h],f);k.Hy(h,k.fq);k.Iy(h,k.Ns);k.VG(h,d.fN);k.SU(h,1);return h}.bind(this))},Qz:function(){return[l.eL()]},Er:function(h){var f=!1,b=!1;this.set("rendererYaw",h.Ra);this.set("rendererPitch",h.pitch);this.set("rendererRoll",h.Fg);this.set("rendererCameraFOV",h.ti);this.set("rendererWidth",h.width);this.set("rendererHeight",
h.height);this.set("inVR",h.ob);if(this.R("distance","composedTranslationX","composedTranslationY","composedTranslationZ")){var e=0==this.get("composedTranslationX")&&0==this.get("composedTranslationY")&&0==this.get("composedTranslationZ")&&void 0!==this.get("distance");this.set("z",e?l.yu(this.get("distance")):l.Yr())}this.R("z")&&(this.mn.makeTranslation(0,0,-this.get("z")),b=!0);h.ti&&this.R("z","rendererCameraFOV")&&this.set("rendererHeightZ",Math.tan(h.ti*c*.5)*this.get("z")*2);h.camera&&this.R("rendererYaw",
"rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth","rendererHeight","rendererHeightZ","inVR","centerX","centerY")&&(this.nI.copy(h.camera.matrixWorld),f=this.get("rendererHeightZ"),e=f*h.camera.aspect,e=(this.get("centerX")-.5*h.width)*e/h.width*.5,f=(.5*h.height-this.get("centerY"))*f/h.height*.5,this.jK.makeTranslation(e,f,0),f=!0);this.R("roll")&&(this.wj.makeRotationZ(this.get("roll")*c),f=!0);h.ti&&(b||this.R("rendererHeight","inVR","rendererHeightZ","width","height","flipHorizontally"))&&
(b=h.ob?512/h.height:1,h=(this.get("flipHorizontally")?-1:1)*this.get("width")*b,b*=this.get("height"),this.om.makeScale(h,b,1),f=!0);this.R("width","height","offsetX","offsetY")&&(h=.5-this.get("offsetX")/this.get("width"),b=this.get("offsetY")/this.get("height")-.5,this.Kua.makeTranslation(h,b,0),f=!0);f&&(this.Hi.copy(this.nI),this.Hi.multiply(this.mn),this.Hi.multiply(this.jK),this.Hi.multiply(this.wj),this.Hi.multiply(this.om),this.Hi.multiply(this.Kua),m.Pr(this.get("meshGroup"),this.Hi))}}});
define("ku",["require","lV","c","ei"],function(a){var d=a("lV"),l=a("c");a=a("ei");return d.extend(l,a,function(){l.call(this);this.set("tag","Sprite")})});
define("hf",["require","oq"],function(a){function d(m,k,c,h,f,b){this.kp=k;this.T=document.createElement("canvas");this.T.width=this.kp;this.T.height=this.kp;switch(m){case d.RM:this.XRa(c,h,f,b);break;case d.PV:this.YRa(c,h,f,b)}}var l=a("oq");d.prototype.Fe=function(){return this.kp};d.prototype.Ve=function(){return this.kp};d.prototype.eg=function(){return this.T};d.prototype.XRa=function(m,k,c,h){var f=.5*this.kp,b=.5*this.kp,e=.5*this.kp,g=this.T.getContext("2d");k=l.ks(k);for(var n=g.createRadialGradient(f,
b,0,f,b,e),q=0;q<c.length;q++)n.addColorStop(h[q],"rgba("+k[0]+","+k[1]+","+k[2]+","+c[q]+")");g.fillStyle=n;g.globalAlpha=m;g.beginPath();g.arc(f,b,e,0,2*Math.PI,!0);g.closePath();g.fill()};d.prototype.YRa=function(m,k,c,h){var f=.5*this.kp,b=.5*this.kp,e=.5*this.kp,g=this.T.getContext("2d");g.clearRect(0,0,this.kp,this.kp);var n=l.ks(k),q=g.createRadialGradient(f,b,0,f,b,e);for(k=0;k<c.length;k++)q.addColorStop(h[k],"rgba("+n[0]+","+n[1]+","+n[2]+","+c[k]+")");g.fillStyle=q;g.globalAlpha=m;g.beginPath();
for(k=0;6>k;k++)c=45*Math.PI/180+2*Math.PI*k/6,m=f+Math.cos(c)*e,c=b+Math.sin(c)*e,0==k?g.moveTo(m,c):g.lineTo(m,c);g.closePath();g.fill()};d.RM="circle";d.PV="hexagon";return d});
define("oa","require lV lh pB fJ jE du ku hf fr".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("fJ"),c=a("jE"),h=a("du"),f=a("ku"),b=a("hf"),e=a("fr");a=d.extend(c,function(n){c.call(this);this.v=n;this.Kk.push(this.v);this.jg=this.jg.bind(this);this.set("tag","LensFlare");this.set("translationAlpha",0);this.F8=this.EQa();this.Tf=this.zRa();this.qh(this.F8.concat([this.Tf]))});a.prototype.Zb=function(){c.prototype.Zb.call(this);this.trigger(m.jd);this.trigger(m.ea);l.da(this.v,["yaw",
"pitch","bleaching","bleachingDistance"],this.jg,!0)};a.prototype.ac=function(){l.ca(this.v,["yaw","pitch","bleaching","bleachingDistance"],this.jg);c.prototype.ac.call(this)};a.prototype.jg=function(){this.set("yaw",this.v.get("yaw"));this.set("pitch",this.v.get("pitch"));this.set("bleaching",this.v.get("bleaching"));this.set("bleachingDistance",this.v.get("bleachingDistance"))};a.prototype.oa=function(n){c.prototype.oa.call(this,n);this.set("rendererYaw",n.Ra);this.set("rendererPitch",n.pitch);
this.set("rendererRoll",n.Fg);this.set("rendererCameraFOV",n.ti);this.set("rendererWidth",n.width);this.set("rendererHeight",n.height);this.set("inVR",n.ob);if(this.R("composedTranslationX","composedTranslationY","composedTranslationZ")){var q=this.get("composedTranslationX"),p=this.get("composedTranslationY"),r=this.get("composedTranslationZ");this.set("translationAlpha",Math.max(0,1-10*Math.sqrt(q*q+p*p+r*r)))}if(this.R("rendererYaw","rendererPitch","rendererRoll","rendererCameraFOV","rendererWidth",
"rendererHeight","inVR","yaw","pitch","translationAlpha","composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")){var t=n.Ra+this.get("composedDeltaYaw"),u=n.pitch+this.get("composedDeltaPitch"),v=n.Fg+this.get("composedDeltaRoll");q=this.get("translationAlpha");r=p=0;if(!n.ob&&(t=k.get(this.get("yaw"),this.get("pitch"),t,u,v,n.ti,n.width,n.height))){var w=.5*n.width;var x=.5*n.height;var y=t.x;var z=t.y;w=2*(w-y);x=2*(x-z);r=Math.sqrt(w*w+x*x);t=Math.min(n.width,n.height);p=Math.max(0,Math.min(.7,
1-r/Math.sqrt(n.width*n.width,n.height*n.height)))*q;n=this.get("bleaching");r=1-Math.max(0,Math.min(1,r/(t*this.get("bleachingDistance"))));r=n*r*q}for(n=0;n<this.F8.length;n++)q=this.F8[n],q.set("alpha",p),0<p&&(q.set("centerX",y+w*g[n].position),q.set("centerY",z+x*g[n].position));this.Tf.set("alpha",r)}};a.prototype.EQa=function(){return g.map(function(n){var q=(new b(n.form,n.hH,n.opacity,n.color,n.hG,n.iG)).eg(),p=new e;p.Rm(q);q=new f;q.set("textureSource",p);q.set("width",n.size);q.set("height",
n.size);q.set("offsetX",.5*n.size);q.set("offsetY",.5*n.size);q.set("alpha",0);return q})};a.prototype.zRa=function(){return new h("#ffffff")};var g=[{form:b.PV,position:.1,size:52,hH:128,opacity:.8,color:"#FCFCFC",hG:[1,.5],iG:[0,.866]},{form:b.PV,position:.2,size:52,hH:128,opacity:.6,color:"#C8FCC8",hG:[1,.5],iG:[0,.866]},{form:b.RM,position:.36,size:112,hH:128,opacity:.5,color:"#C8C8FC",hG:[1,.9,.6,0],iG:[0,.2,.4,1]},{form:b.RM,position:.47,size:32,hH:128,opacity:.3,color:"#96C8AF",hG:[1,1,0],
iG:[0,.9,1]},{form:b.RM,position:.65,size:52,hH:128,opacity:.7,color:"#FCFCFC",hG:[.7,.7,.2,0],iG:[0,.1,.4,1]},{form:b.PV,position:.88,size:128,hH:128,opacity:.4,color:"#AF96C8",hG:[1,.5],iG:[0,.866]},{form:b.RM,position:1,size:33,hH:128,opacity:.8,color:"#C89696",hG:[.8,.8,.6,0],iG:[0,.2,.4,1]}];return a});
define("bE","require lV lh pB kc jd fr pd bM kQ".split(" "),function(a){function d(q,p,r){q=(p-q)*(1-r);1E-5>Math.abs(q)&&(q=0);return p-q}var l=a("lV"),m=a("lh"),k=a("pB"),c=a("kc"),h=a("jd"),f=a("fr"),b=a("pd"),e=a("bM"),g=a("kQ");a=l.extend(c,function(q){c.call(this);this.Lb=q;this.Yq=this.Yq.bind(this);this.Yo=this.T=null;this.Dx=this.Tn=this.eea=this.jx=void 0;this.eqa=20;this.rg=null;this.Mb=this.Lb.get("opacity",.5);this.pQ=this.Lb.get("rollOverOpacity",this.Mb);this.fWa=1;this.jWa=.66;this.set("tag",
"MenuButton");this.set("visible",!1);this.set("over",!1);this.set("centerDistance",void 0)});a.prototype.Zb=function(){c.prototype.Zb.call(this);m.da(this.Lb,["label"],this.Yq,!0)};a.prototype.ac=function(){m.ca(this.Lb,["label"],this.Yq);c.prototype.ac.call(this)};a.prototype.Yq=function(){this.T=null};a.prototype.oa=function(q){this.Dr(q);this.yg(q);this.xF(q);this.yf(q);this.je(q);c.prototype.oa.call(this,q)};a.prototype.Dr=function(q){q.ob&&!this.Yo&&g.getType()==g.Cv.zl&&this.qh([this.Yo=new c])};
a.prototype.yg=function(){this.get("visible")&&(this.T||(this.get("textureSource")||this.set("textureSource",new f),this.T=new h(this.Lb,[this.Lb]),this.get("textureSource").Rm(this.T.eg()),this.set("contentWidth",this.T.Fe()),this.set("contentHeight",this.T.Ve()),this.set("hfov",this.T.Ee()),this.set("distance",this.Lb.get("distance"))),this.T.update()&&(this.get("textureSource").update(),this.Ga()),this.R("over")&&this.T.eC(this.get("over")?0:-1))};a.prototype.xF=function(q){this.R("visible")&&
(this.rg=new b("linear",[new e("displayCoef",this.get("visible")?0:1,this.get("visible")?1:0,void 0)],300));this.rg&&(this.rg.Xe()?this.rg=null:this.rg.Fb(q.Ue))};a.prototype.yf=function(q){if(this.get("visible")||this.rg){this.Tn=q.Ra;this.Dx=Math.min(90,Math.max(-90,this.eqa+this.eqa-q.pitch));if(this.R("visible")&&this.get("visible"))this.set("yaw",q.Ra),this.set("pitch",q.pitch);else{for(;this.Tn+180<this.jx;)this.jx-=360;for(;this.Tn-180>this.jx;)this.jx+=360;var p=(this.Tn-this.jx)/q.Ue,r=(this.Dx-
this.eea)/q.Ue,t=Math.atan2(r,p);r=Math.sqrt(r*r+p*p);r=Math.min(r,10*n);p=Math.cos(t)*r;t=Math.sin(t)*r;this.set("yaw",d(this.get("yaw"),this.Tn+p,.02));this.set("pitch",d(this.get("pitch"),this.Dx+t,.02))}this.jx=this.Tn;this.eea=this.Dx;t=this.get("yaw")-q.Ra;q=this.get("pitch")-q.pitch;this.set("centerDistance",Math.sqrt(t*t+q*q))}};a.prototype.je=function(){if(!this.get("visible")&&!this.rg)this.set("alpha",0);else if(this.R("over","centerDistance")||this.rg){var q=this.get("over")?this.pQ:this.Mb,
p=this.jWa,r=this.get("centerDistance")/this.get("hfov");1>r&&(p+=(1-r)*(this.fWa-p),q+=(1-r)*(this.pQ-q));this.rg&&(q*=this.rg.eb("displayCoef"),p*=this.rg.eb("displayCoef"));this.set("alpha",q);this.set("scale",p)}};a.prototype.Qm=function(q){if(q.vf==k.Fl){var p=!1;this.get("visible")&&!q.hl()&&(p=0<this.rw(q.pr).length);p&&(q.kB(this.Lb),q.KF(this.Lb),q.gl(this.get("distance")));this.get("over")!=p&&(this.get("over")&&this.Lb.trigger(k.Jb),this.set("over",p),this.get("over")&&this.Lb.trigger(k.Gc))}else q.vf==
k.Xf&&this.get("visible")&&!q.hl()&&0<this.rw(q.pr).length&&(q.ws(this.Lb),this.Lb.trigger(k.ma),this.trigger(k.ma))};var n=Math.PI/180;return a});
define("kg","require lV lh pB kc jd fr pd bM kQ".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("kc"),c=a("jd"),h=a("fr"),f=a("pd"),b=a("bM"),e=a("kQ");a=d.extend(k,function(g,n){k.call(this);this.Lb=g;this.xA=n;this.Yq=this.Yq.bind(this);this.T=null;this.eea=this.jx=void 0;this.rg=null;this.Mb=this.Lb.get("opacity",.5);this.pQ=this.Lb.get("rollOverOpacity",this.Mb);this.set("textureSource",new h);this.set("tag","MenuPanel");this.set("overIndex",-1);this.set("selectedIndex",-1);this.fra=
!1});a.prototype.Zb=function(){k.prototype.Zb.call(this);l.da(this.Lb,["label"],this.Yq,!0);this.xA.forEach(function(g){l.da(g,["label"],this.Yq,!0)}.bind(this))};a.prototype.ac=function(){l.ca(this.Lb,["label"],this.Yq);this.xA.forEach(function(g){l.ca(g,["label"],this.Yq)}.bind(this));k.prototype.ac.call(this)};a.prototype.Yq=function(){this.T=null};a.prototype.oa=function(g){this.Dr(g);this.yg(g);this.xF(g);this.yf(g);k.prototype.oa.call(this,g)};a.prototype.OQa=function(){this.T||(this.T=new c(this.Lb,
this.xA),this.get("textureSource").Rm(this.T.eg()),this.set("contentWidth",this.T.Fe()),this.set("contentHeight",this.T.Ve()),this.set("hfov",this.T.Ee()),this.set("distance",this.Lb.get("distance")))};a.prototype.yg=function(){this.T||this.OQa();this.R("selectedIndex")&&this.T.eC(this.get("selectedIndex"));this.R("overIndex")&&this.T.eC(this.get("overIndex"));this.T.update()&&(this.get("textureSource").update(),this.Ga())};a.prototype.Dr=function(g){g.ob&&!this.Yo&&e.getType()==e.Cv.zl&&this.qh([this.Yo=
new k])};a.prototype.xF=function(g){this.rg||this.fra||(this.rg=new f("linear",[new b("alpha",0,1,void 0),new b("scale",0,1,void 0),new b("yaw",g.Ra,this.get("yaw"),void 0),new b("pitch",g.pitch,this.get("pitch"),void 0)],300));this.rg&&(this.rg.Xe()?(this.fra=!0,this.rg=null):this.rg.Fb(g.Ue))};a.prototype.yf=function(){if(this.rg){var g=0>this.get("overIndex")?this.Mb:this.pQ;this.set("alpha",g*this.rg.eb("alpha"));this.set("scale",this.rg.eb("scale"));this.set("yaw",this.rg.eb("yaw"));this.set("pitch",
this.rg.eb("pitch"))}else this.R("overIndex")&&(g=0>this.get("overIndex")?this.Mb:this.pQ,this.set("alpha",g))};a.prototype.Qm=function(g){if(g.vf==m.Fl){var n=-1;if(!g.hl()){var q=this.rw(g.pr).filter(function(p){return p.source==this.T.eg()}.bind(this));0<q.length&&(n=this.T.Ria(q[0].x,q[0].y))}0<=n&&(g.kB(this.xA[n]),g.KF(this.xA[n]),g.gl(this.get("distance")));0<=this.get("overIndex")!=0<=n&&(0<n?this.trigger(m.Gc):this.trigger(m.Jb));this.get("overIndex")!=n&&(0<=this.get("overIndex")&&this.xA[this.get("overIndex")].trigger(m.Jb),
this.set("overIndex",n),0<=this.get("overIndex")&&this.xA[this.get("overIndex")].trigger(m.Gc))}else g.vf!=m.Xf||g.hl()||(q=this.rw(g.pr).filter(function(p){return p.source==this.T.eg()}.bind(this)),0<q.length&&(n=this.T.Ria(q[0].x,q[0].y),0<=n&&(q=this.xA[n],this.set("selectedIndex",n),g.ws(q),g.gl(this.get("distance")),q.trigger(m.ma),this.trigger(m.ma,{item:q}))))};return a});
define("iX",["require","lV","pB","jE","kg"],function(a){var d=a("lV"),l=a("pB"),m=a("jE"),k=a("kg");a=d.extend(m,function(f){m.call(this);this.Lb=f;this.KA=[];this.JJ=null;this.set("tag","MenuPanels");this.set("visible",!1)});a.prototype.oa=function(f){this.R("visible")&&this.get("visible")&&(this.set("yaw",f.Ra),this.set("pitch",f.pitch),this.lpa(this.Lb));m.prototype.oa.call(this,f)};a.prototype.lpa=function(f){f=new k(this.Lb,f.get("children",[]));var b=this.get("yaw");this.rb().forEach(function(e){b+=
e.get("hfov")+h});f.set("yaw",b);f.set("pitch",this.get("pitch"));this.mOa(f);this.appendChild(f)};a.prototype.Pxa=function(f){this.rb().slice(f).forEach(function(b){this.SYa(b);b.remove()}.bind(this));this.KA=this.KA.filter(function(b){return 0<=this.rb().indexOf(b)}.bind(this))};a.prototype.mOa=function(f){f.bind(l.Gc,this.bxa,this,!0);f.bind(l.Jb,this.axa,this,!0);f.bind(l.ma,this.$wa,this,!0)};a.prototype.SYa=function(f){f.unbind(l.Gc,this.bxa,this,!0);f.unbind(l.Jb,this.axa,this,!0);f.unbind(l.ma,
this.$wa,this,!0)};a.prototype.bxa=function(f){0>this.KA.indexOf(f.source)&&(this.KA.push(f.source),1==this.KA.length&&this.sqa())};a.prototype.axa=function(f){f=this.KA.indexOf(f.source);0<=f&&(this.KA.splice(f,1),0==this.KA.length&&this.r_a())};a.prototype.$wa=function(f){var b=f.source;f=f.data.item;f.get("children",[]).length?(this.Pxa(this.rb().indexOf(b)+1),this.lpa(f)):this.wqa()};a.prototype.wqa=function(){this.set("visible",!1);this.Pxa(0);this.sqa();this.trigger(l.vH)};a.prototype.sqa=function(){this.JJ&&
(clearTimeout(this.JJ),this.JJ=null)};a.prototype.r_a=function(){this.JJ||(this.JJ=setTimeout(function(){this.JJ=null;this.wqa()}.bind(this),c))};var c=3E3,h=1;return a});
define("gy","require lV pB jE bE iX".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("jE"),k=a("bE"),c=a("iX");a=d.extend(m,function(h){m.call(this);this.v=h;this.Kk.push(this.v);this.set("tag","Menu");this.set("visible",!1);this.Bd=new k(this.v);this.Bd.bind(l.ma,this.uPa,this,!1);this.ki=new c(this.v);this.ki.bind(l.vH,this.VXa,this,!1);this.qh([this.Bd,this.ki])});a.prototype.Zb=function(){m.prototype.Zb.call(this);this.trigger(l.jd);this.trigger(l.ea)};a.prototype.oa=function(h){this.set("visible",
h.ob);this.R("visible")&&(this.Bd.set("visible",this.get("visible")),this.ki.set("visible",!1));m.prototype.oa.call(this,h)};a.prototype.uPa=function(){this.Bd.set("visible",!1);this.ki.set("visible",!0)};a.prototype.VXa=function(){this.Bd.set("visible",this.get("visible"))};return a});
define("pt","require lV pB kc fr oT lW".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("kc"),k=a("fr"),c=a("oT"),h=a("lW");a=d.extend(m,function(){m.call(this);this.set("tag","CustomPlane");this.set("source",null);this.set("sourceUpdated",!1);this.set("sourceIsVideo",!1);this.he=this.dh=null});a.prototype.Zb=function(){this.dh=(new c(l.ea)).Tm(this.Xq.bind(this));this.he=(new c(l.ea)).Hp(this.$w.bind(this));m.prototype.Zb.call(this)};a.prototype.ac=function(){this.dh.dispose();this.he.dispose();
m.prototype.ac.call(this)};a.prototype.oa=function(f){var b=this.get("textureSource");this.R("source","sourceUpdated","sourceIsVideo")&&(b||this.set("textureSource",b=new k),this.R("source")&&b.Rm(this.get("source")),this.R("sourceIsVideo")&&b.GU(this.get("sourceIsVideo")),this.R("sourceUpdated")&&(b.update(),this.set("sourceUpdated",!1)));b&&b.tla(0<f.Kj);m.prototype.oa.call(this,f);this.R("meshGroup")&&(f=(f=this.get("meshGroup"))&&f.children||[],f.length&&(this.dh.Hf(f),this.he.Hf(f)))};a.prototype.Xq=
function(){this.trigger(l.jd);this.trigger(l.ea)};a.prototype.$w=function(f,b){var e=0;b.su(function(g){(g=b.Im(g))&&(e+=g.Ug)});this.trigger(new h(l.mc,e/b.md.length))};return a});
define("hB","require lV lh pB jJ jE pt mv dt bA".split(" "),function(a){function d(p,r,t){this.Ff=p;this.Ff.bind(k.G("distanceToFloor"),this.oa,this,!1);this.jk=r;this.jk.bind(k.G("yaw"),this.oa,this,!1);this.jk.bind(k.G("distance"),this.oa,this,!1);this.jk.bind(k.G("enabled"),this.oa,this,!1);this.jk.bind(k.G("enabledInSurfaceSelection"),this.oa,this,!1);this.gb=null;this.Ye=new f;this.Ye.set("hfov",20);this.Ye.set("vfov",20);this.Ye.set("pitch",-90);this.Ye.set("source",t.eg());this.Ye.set("contentWidth",
t.Fe());this.Ye.set("contentHeight",t.Ve());this.oa()}var l=a("lV"),m=a("lh"),k=a("pB"),c=a("jJ"),h=a("jE"),f=a("pt"),b=a("mv"),e=a("dt"),g=a("bA");a=l.extend(h,function(p){h.call(this);this.yZ=this.yZ.bind(this);this.yt=this.yt.bind(this);this.vZ=this.vZ.bind(this);this.set("tag","SurfaceSelector");this.set("reticleVisible",!1);this.set("enabled",!1);this.za=p;this.rW=[];this.tO=new g;this.hk=new e;this.ve=new f;this.ve.set("hfov",20);this.ve.set("vfov",20);this.ve.set("pitch",-90);this.set("reticleCoef",
1);this.qh([this.ve])});a.prototype.Zb=function(){this.lRa();h.prototype.Zb.call(this);m.da(this.za,["distanceToFloor"],this.yZ,!0);m.da(this.za,["adjacentPanoramas"],this.yt,!0);m.da(this.Ha.Yc,["adjacentPanoramaPositionsEnabled"],this.vZ,!0);this.trigger(k.jd);this.trigger(k.ea)};a.prototype.ac=function(){h.prototype.ac.call(this);m.ca(this.za,["distanceToFloor"],this.yZ);m.ca(this.za,["adjacentPanoramas"],this.yt);m.ca(this.Ha.Yc,["adjacentPanoramaPositionsEnabled"],this.vZ);this.tya([])};a.prototype.yZ=
function(){var p=this.za.get("distanceToFloor");this.ve.set("distance",p);p=c.yu(p);var r=c.Xia(p,90),t=c.Yia(p,90);this.tO.gg.set(.5*-r,-p,.5*-t);this.tO.Hj.set(.5*r,-p,.5*-t);this.tO.RB.set(.5*-r,-p,.5*t);this.Yxa=p/c.Yr()};a.prototype.yt=function(){this.tya(this.za.get("adjacentPanoramas",[]))};a.prototype.vZ=function(){this.yt()};a.prototype.tya=function(p){this.rW.forEach(function(r){r.clear()});this.rW=p.map(function(r){return new d(this.za,r,this.Wda)}.bind(this));p=[];this.Ha.Yc.get("adjacentPanoramaPositionsEnabled")&&
(p=p.concat(this.rW.map(function(r){return r.Ye})));p=p.concat([this.ve]);this.qh(p)};a.prototype.oa=function(p){h.prototype.oa.call(this,p);this.set("enabled",p.$U);this.Sga();this.jB(p)};a.prototype.Sga=function(){this.R("enabled","reticleVisible","composedTranslationX","composedTranslationY","composedTranslationZ","composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.ve.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.qAa())};a.prototype.lRa=function(){this.cK=new b(this.Ha.M);this.cK.setPosition(this.get("reticleCoef"));this.ve.set("source",this.cK.eg());this.ve.set("contentWidth",this.cK.Fe());this.ve.set("contentHeight",this.cK.Ve());this.Wda=new b(this.Ha.M);this.Wda.setPosition(0);this.Wda.update(1)};a.prototype.jB=function(p){this.R("reticleCoef")&&
this.cK.setPosition(this.get("reticleCoef"));this.ve.set("sourceUpdated",this.cK.update(p.Ue))};a.prototype.Qm=function(p){if(p.Ata)if(!this.get("enabled")||0==p.pr.length||p.hl()||p.wi())this.set("reticleVisible",!1);else{var r=p.pr[0];this.hk.gg.set(r.origin.x,r.origin.y,r.origin.z);this.hk.Hj.set(r.origin.x+r.direction.x,r.origin.y+r.direction.y,r.origin.z+r.direction.z);if(r=this.tO.intersection(this.hk,!0)){var t=this.tO.O4(r,!0),u=2*(.5-t.x);t=2*(.5-t.y);var v=n*Math.atan2(-u,t),w=-90+n*Math.atan2(Math.sqrt(u*
u+t*t),1);if(-75>w||-1<w)this.set("reticleVisible",!1);else{var x={x:u*this.Yxa,y:-t*this.Yxa};p.Iu()||p.xja()?p.vf==k.Fl&&(this.set("reticleVisible",!0),this.ve.set("alpha",Math.min(1,(w- -75)/5)),this.ve.set("translationX",x.x),this.ve.set("translationZ",x.y)):this.set("reticleVisible",!1);var y=.5*this.Ha.Yc.get("surfaceSelectionHorizontalAngle"),z=.5*this.Ha.Yc.get("surfaceSelectionVerticalAngle");t=this.rW.map(function(B){return{jk:B.jk,AT:B.i6a(v),vertical:B.M6a(w),distance:B.c3(x)}}).filter(function(B){return B.AT<
y&&B.vertical<z});0==t.length?this.set("reticleCoef",0):(t.sort(function(B,D){return B.distance-D.distance}),u=t[0].jk,this.set("reticleCoef",Math.max(0,Math.min(1,(1-t[0].AT/y)*(1-t[0].vertical/z)))),r=this.za.get("distanceToFloor")*Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z)/-r.y,p.xja()&&p.z3a([u]),p.gl(r),p.vf==k.Xf?(p.ws([u]),this.get("blendingActive")||u.trigger(k.nq)):(p.kB([u]),p.Iu()&&p.KF([u]),(r=this.Ha.M.get("displayTooltipInSurfaceSelection")&&u.get("panorama")&&u.get("panorama").get("label"))&&
p.Z1(r,0)))}}else this.set("reticleVisible",!1)}};d.prototype.clear=function(){this.Ff.unbind(k.G("distanceToFloor"),this.oa,this,!1);this.Ff=null;this.jk.unbind(k.G("yaw"),this.oa,this,!1);this.jk.unbind(k.G("distance"),this.oa,this,!1);this.jk.unbind(k.G("enabled"),this.oa,this,!1);this.jk.unbind(k.G("enabledInSurfaceSelection"),this.oa,this,!1);this.jk=null};d.prototype.i6a=function(p){if(!this.gb)return Infinity;p=Math.abs(this.gb.Ra-p);return 180<p?360-p:p};d.prototype.M6a=function(p){return this.gb?
Math.abs(this.gb.pitch-p):Infinity};d.prototype.c3=function(p){if(!this.yK)return Infinity;var r=p.x-this.yK.x;p=p.y-this.yK.y;return Math.sqrt(r*r+p*p)};d.prototype.oa=function(){var p=this.jk.get("yaw"),r=this.jk.get("distance"),t=this.jk.get("enabled")&&this.jk.get("enabledInSurfaceSelection");if(void 0!==p&&void 0!==r&&t){t=this.Ff.get("distanceToFloor");var u=-90+Math.atan2(r,t)*n;this.Ye.set("alpha",-1>u?1:0);this.gb={Ra:p,pitch:u};u=c.yu(t)/c.Yr();this.yK={x:-Math.sin(p*q)*r/t*u,y:-Math.cos(p*
q)*r/t*u};this.Ye.set("translationX",this.yK.x);this.Ye.set("translationZ",this.yK.y);this.Ye.set("distance",t)}else this.yK=this.gb=null,this.Ye.set("alpha",0)};var n=180/Math.PI,q=Math.PI/180;return a});
define("Y","require lV lh pB lW jE kc hB oT nY jY kQ".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("lW"),c=a("jE"),h=a("kc"),f=a("hB"),b=a("oT"),e=a("nY"),g=a("jY"),n=a("kQ"),q=0;a=d.extend(c,function(t){c.call(this);this.v=t;this.Kk.push(this.v);this.DE=this.DE.bind(this);this.ig=this.ig.bind(this);this.yt=this.yt.bind(this);this.sq(["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_"+q++);this.set("ready",!1);this.K_=[];this.cp=this.he=this.Of=null;this.fi=new p;this.wxa=new r;this.G0a=new f(this.v);this.Wo=new r;this.qh([this.fi,this.wxa,this.G0a,this.Wo])});a.prototype.Zb=function(){this.Of=(new b(m.ea)).Tm(this.Xq.bind(this));this.he=(new b(m.mc)).Hp(this.FE.bind(this));this.cp=(new b(m.jd)).Tm(this.OWa.bind(this));
c.prototype.Zb.call(this);this.get("blendingActive")&&this.Ha.set("globalBlendingActive",this.Ha.get("globalBlendingActive")+1);l.da(this.v,["currentTime"],this.DE,!0);l.da(this.v,["frames","overlays","vrMenu","flipImageHorizontally"],this.ig,!0);l.da(this.v,["adjacentPanoramas"],this.yt,!0)};a.prototype.ac=function(){this.Of.dispose();this.he.dispose();this.cp.dispose();this.get("blendingActive")&&this.Ha.set("globalBlendingActive",this.Ha.get("globalBlendingActive")-1);c.prototype.ac.call(this);
l.ca(this.v,["currentTime"],this.DE);l.ca(this.v,["frames","overlays","vrMenu","flipImageHorizontally"],this.ig);l.ca(this.v,["adjacentPanoramas"],this.yt);this.Cfa()};a.prototype.ig=function(){function t(B,D,F){B=y.indexOf(B);return 0>B?F:w[B].get(D,F)}function u(B){return t(B,"projected",!1)}var v=this.Ha.hy(this.v.get("frames"));v.forEach(function(B){B.set("panoramaId",this.get("id"));B.set("flipHorizontally",this.v.get("flipImageHorizontally"))}.bind(this));var w=this.v.get("overlays"),x=this.Ha.hy(w),
y=x.slice(),z=x.filter(function(B){return t(B,"projected",!1)||t(B,"required",!1)}).filter(function(B){return t(B,"enabled",!0)});this.v.get("vrMenu")&&x.push(this.Ha.hy(this.v.get("vrMenu")));x.forEach(function(B){B.set("panoramaId",this.get("id"))}.bind(this));this.Of.Hf(v.concat(x));this.he.Hf(v.concat(x));this.cp.Hf(v.concat(z));this.wxa.qh(x.filter(u));this.fi.qh(v);this.Wo.qh(x.filter(function(B){return!u(B)}));this.set("panoramaPixelsPerDegree",e.XDa(this.v));this.yAa()};a.prototype.DE=function(){this.set("currentTime",
this.v.get("currentTime",0))};a.prototype.yt=function(){this.set("adjacentPanoramas",this.v.get("adjacentPanoramas",[]))};a.prototype.Xq=function(){this.zj();this.trigger(m.ea)};a.prototype.OWa=function(){this.zj();this.set("ready",!0);this.trigger(m.jd)};a.prototype.FE=function(){this.zj()};a.prototype.zj=function(){var t=0;this.he.su(function(u){var v=0,w;this.Of.Im(u)?v=100:(w=this.he.Im(u))&&(v=w.Ug);t+=v}.bind(this));this.trigger(new k(m.mc,t/this.he.md.length))};a.prototype.oa=function(t){t.ob&&
!this.Yo&&n.getType()==n.Cv.zl&&this.qh([this.Yo=new h].concat(this.rb()));var u=this.get("blendingActive");this.set("blendingActive",1>this.get("alpha"));u!=this.get("blendingActive")&&this.Ha.set("globalBlendingActive",this.Ha.get("globalBlendingActive")+(this.get("blendingActive")?1:-1));this.set("backgroundPreloadEnabled",!1!==this.Ha.Ap().get("backgroundPreloadEnabled"));this.set("preloadEnabled",t.kU);this.R("adjacentPanoramas","loadingActive","preloadEnabled","backgroundPreloadEnabled")&&(this.get("loadingActive")&&
this.get("backgroundPreloadEnabled")?this.m0a():this.Cfa());this.R("index")&&this.yAa();c.prototype.oa.call(this,t)};a.prototype.lja=function(){return e.lja(this.v,this.get("preloadEnabled"))};a.prototype.Bka=function(){return e.Bka(this.v,this.get("preloadEnabled"))};a.prototype.m0a=function(){this.Cfa();this.K_=this.get("adjacentPanoramas").map(function(t){t=t.get("panorama");return[t,e.Zn(t,this.get("preloadEnabled"))]}.bind(this));this.K_.forEach(function(t){g.CBa(t[0],t[1]);g.a4(t[0],1)})};a.prototype.Cfa=
function(){this.K_.forEach(function(t){g.a4(t[0],-1);g.a$a(t[0],t[1])});this.K_=[]};a.prototype.yAa=function(){var t=this.get("index");this.fi.rb().forEach(function(u,v,w){u.set("panoramaIndex",t);u.set("frameIndex",v);u.set("frameCount",w.length)})};var p=d.extend(c,function(){c.call(this);this.sq(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("loadingActive",!1);this.set("currentTime",0);this.set("tag","Group")});p.prototype.oa=function(t){this.rb().forEach(function(u,v,w){u.set("frontFrame",
w[w.length-1])});c.prototype.oa.call(this,t)};var r=d.extend(c,function(){c.call(this);this.sq(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("loadingActive",!1);this.set("currentTime",0);this.set("tag","Group")});return a});
define("jT",["require","lV","fS","eB"],function(a){var d=a("lV"),l=a("fS"),m=a("eB"),k=0;a=d.extend(l,function(){l.call(this);this.set("tag","PanoramaFrame");this.set("panoramaIndex",0);this.set("frameIndex",0);this.set("frameCount",1);this.set("id","frame_"+k++)});a.prototype.oa=function(c){l.prototype.oa.call(this,c);this.zF()};a.prototype.DF=function(){if(this.R("panoramaIndex","frameIndex","frameCount","meshGroup")){var c=this.get("meshGroup");if(c){var h=this.get("panoramaIndex"),f=this.get("frameIndex"),
b=this.get("frameCount"),e=c.children.length;c.children.forEach(function(g,n){m.p5(g,h+(n+f/b)/e)}.bind(this))}}};a.prototype.zF=function(){if(this.R("meshGroup","panoramaId","id")){var c=this.get("meshGroup");c&&c.children.forEach(function(h,f){m.setAttribute(h,m.sC,this.get("panoramaId"));m.setAttribute(h,m.c6,f);m.setAttribute(h,m.qH,this.get("id"))}.bind(this))}};return a});
define("oH","require lV lh pB iy jE jT oT nY fO kY lW".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("iy"),c=a("jE"),h=a("jT"),f=a("oT"),b=a("nY"),e=a("fO"),g=a("kY"),n=a("lW");a=d.extend(h,function(p){h.call(this);this.set("tag","ImagePanoramaFrame");this.mxa=!0;this.v=p;this.Kk.push(this.v);this.Wk=this.dh=this.cp=null;this.lca=[];this.ig=this.ig.bind(this);this.sq(["loadingActive","currentTime","panoramaId","panoramaPixelsPerDegree"]);this.qh([this.Wo=new q])});a.prototype.Zb=function(){this.cp=
new f(m.ea);this.dh=new f(m.ea);this.Wk=new f(m.mc);h.prototype.Zb.call(this);l.da(this.v,["overlays"],this.ig,!0)};a.prototype.ac=function(){this.cp.dispose();this.dh.dispose();this.Wk.dispose();l.ca(this.v,["overlays"],this.ig);h.prototype.ac.call(this)};a.prototype.ig=function(){this.Wo.qh(this.Ha.hy(this.v.get("overlays")));this.iAa()};a.prototype.iAa=function(){this.dh.Hf([].concat(this.lca,this.Wo.rb()));this.Wk.Hf([].concat(this.lca,this.Wo.rb()))};a.prototype.Do=function(){var p=[],r=[],t=
[];b.Sia(this.v,this.mxa).forEach(function(u,v){var w=e.K4a(this.v,u);b.U7a(u)?(0==v&&(p=p.concat(w),r=r.concat(w)),g.Iy(w,0==v?g.Ns:g.QV),g.Hy(w,0==v?g.fq:g.p7)):(0==v&&(p=p.concat(w)),r=r.concat(w),g.Iy(w,g.Ns),g.Hy(w,g.fq));g.VG(w,0==v?k.B7:k.Cl);g.SU(w,v);t=t.concat(w)}.bind(this));this.cp.Hf(p);this.lca=r;this.iAa();this.dh.Tm(this.Xq.bind(this));this.cp.Tm(this.sXa.bind(this));this.Wk.Hp(this.FE.bind(this));this.trigger(new n(m.mc,0));return t};a.prototype.sXa=function(){this.trigger(m.jd)};
a.prototype.Xq=function(){this.trigger(m.ea)};a.prototype.oa=function(p){this.mxa=p.kU;this.q2a();h.prototype.oa.call(this,p)};a.prototype.q2a=function(){var p=this.get("frontFrame");if(this.R("frontFrame")||p&&p.R("alpha"))p=p&&p!=this?1-p.get("alpha"):1,this.Wo.set("alpha",p)};a.prototype.FE=function(){var p=0;this.Wk.su(function(r){var t=0,u;this.dh.Im(r)?t=100:(u=this.Wk.Im(r))&&(t=u.Ug);p+=t}.bind(this));this.trigger(new n(m.mc,p/this.Wk.md.length))};var q=d.extend(c,function(){c.call(this);
this.sq(["loadingActive","panoramaId","panoramaPixelsPerDegree"]);this.set("loadingActive",!1);this.set("tag","Group")});return a});
define("gW","require lV pB kc nz oT lW".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("kc"),k=a("nz"),c=a("oT"),h=a("lW");a=d.extend(m,function(){m.call(this);this.set("tag","ImagePlane");this.set("url",null);this.he=this.Of=null});a.prototype.Zb=function(){this.Of=(new c(l.ea)).Tm(this.Xq.bind(this));this.he=(new c(l.mc)).Hp(this.$w.bind(this));m.prototype.Zb.call(this)};a.prototype.ac=function(){this.Of.dispose();this.he.dispose();m.prototype.ac.call(this)};a.prototype.oa=function(f){if(this.R("url")){var b=
this.get("url");b=b?new k(b):null;this.set("textureSource",b)}m.prototype.oa.call(this,f);this.R("meshGroup")&&(f=(f=this.get("meshGroup"))&&f.children||[],f.length&&(this.Of.Hf(f),this.he.Hf(f)))};a.prototype.Xq=function(){this.trigger(l.jd);this.trigger(l.ea)};a.prototype.$w=function(f,b){var e=0;b.su(function(g){(g=b.Im(g))&&(e+=g.Ug)});this.trigger(new h(l.mc,e/b.md.length))};return a});
define("na","require er pB cI lx oW".split(" "),function(a){function d(b,e){this.Gd=b;this.ha=e;this.Uk=!1;this.kj=[];this.kn=this.yI=void 0;this.Ne=[];this.pPa();this.I9();this.Q0();this.Li()}function l(b,e,g){this.time=b;this.cue=e;this.action=g}var m=a("er"),k=a("pB"),c=a("cI"),h=a("lx"),f=a("oW");d.prototype.clear=function(){this.MN();this.kj=[];this.C1a();this.ha=this.Gd=null};d.prototype.pPa=function(){this.ha.bind(f.Wf,this.mf,this,!0);this.ha.bind(k.Ae,this.Li,this,!0);this.ha.bind(k.Gb,this.IA,
this,!0)};d.prototype.C1a=function(){this.ha.unbind(f.Wf,this.mf,this,!0);this.ha.unbind(k.Ae,this.Li,this,!0);this.ha.unbind(k.Gb,this.IA,this,!0)};d.prototype.Li=function(){var b=this.ha.getState()!=h.U;this.Uk!=b&&((this.Uk=b)?this.Q0():this.MN())};d.prototype.IA=function(){this.GF()};d.prototype.mf=function(){this.GF()};d.prototype.Q0=function(){this.kn=this.yI=0};d.prototype.GF=function(){if(this.ha&&this.Uk){var b=this.Ne.slice(),e=this.ha.getCurrentTime(),g=e-this.yI;0>g&&(this.Ne=[],this.kn=
0);g=0<=g&&2>g;this.yI=e;var n;for(n=this.kn;n<this.kj.length&&!(this.kj[n].time>e);n++);for(;this.kn<n;this.kn++)e=this.kj[this.kn],"start"==e.action?(this.Ne=m(this.Ne).union([e.cue]),g&&e.cue.trigger(new c(k.Tp))):(this.Ne=m(this.Ne).difference([e.cue]),g&&e.cue.trigger(new c(k.Gb)));b.length==this.Ne.length&&m(b).intersection(this.Ne).length==this.Ne.length||this.PR()}};d.prototype.MN=function(){0<this.Ne.length&&(this.Ne=[],this.PR())};d.prototype.PR=function(){this.Gd.trigger(new c(k.uk,{activeCues:this.Ne.slice()}))};
d.prototype.I9=function(){this.kj=[];var b=this.Gd.get("cues",[]);m(b).each(function(e){this.kj.push(new l(e.get("startTime",0),e,"start"));this.kj.push(new l(e.get("endTime",Number.POSITIVE_INFINITY),e,"end"))},this);this.kj.sort(function(e,g){return e.time==g.time?e.action==g.start?0:"start"==e.action?-1:1:e.time-g.time})};return d});
define("mu",["require","pB","lx","cI","oW"],function(a){function d(h,f,b){this.Vd=h;this.Gd=f;this.ha=b;this.ha.setCurrentTime(this.Kf=this.Gd.get("currentTime",0));this.ha.Vf(this.cf=this.Vd.get("mute",!1));this.ha.Qc(this.C=this.Gd.get("state",m.U));this.ha.setLoop(this.Jk=this.Gd.get("loop"));this.Sb=this.ha.ui();this.oOa();this.vOa();this.Iv()}var l=a("pB"),m=a("lx"),k=a("cI"),c=a("oW");d.prototype.clear=function(){this.TYa();this.ZYa();this.ox();this.ha.Qc(m.U);this.Gd.set("state",m.U);this.Gd.set("currentTime",
0);this.Gd.set("duration",void 0)};d.prototype.Pwa=function(){var h=this.Gd.get("state",m.U);this.C!=h&&this.ha.Qc(this.C=h)};d.prototype.Nwa=function(){var h=this.Gd.get("currentTime",0);this.Kf!=h&&this.ha.setCurrentTime(this.Kf=h)};d.prototype.fQ=function(){var h=this.Vd.get("mute",0);this.cf!=h&&this.ha.Vf(this.cf=h)};d.prototype.Owa=function(){var h=this.Gd.get("loop");this.Jk!=h&&this.ha.setLoop(this.Jk=h)};d.prototype.mQ=function(){this.Gd.set("currentTime",this.Kf=this.ha.getCurrentTime())};
d.prototype.kQ=function(){this.Gd.set("duration",this.Sb=this.ha.ui())};d.prototype.lQ=function(){this.Gd.set("state",this.C=this.ha.getState())};d.prototype.nQ=function(){this.Gd.trigger(new k(l.Gb))};d.prototype.oOa=function(){this.Vd.bind(l.G("mute"),this.fQ,this,!0)};d.prototype.TYa=function(){this.Vd.unbind(l.G("mute"),this.fQ,this,!0)};d.prototype.vOa=function(){this.Gd.bind(l.G("state"),this.Pwa,this,!0);this.Gd.bind(l.G("currentTime"),this.Nwa,this,!0);this.Gd.bind(l.G("loop"),this.Owa,this,
!0)};d.prototype.ZYa=function(){this.Gd.unbind(l.G("state"),this.Pwa,this,!0);this.Gd.unbind(l.G("currentTime"),this.Nwa,this,!0);this.Gd.unbind(l.G("loop"),this.Owa,this,!0)};d.prototype.Iv=function(){this.ha.bind(c.Wf,this.mQ,this,!0);this.ha.bind(c.dj,this.kQ,this,!0);this.ha.bind(l.Ae,this.lQ,this,!0);this.ha.bind(l.Gb,this.nQ,this,!0)};d.prototype.ox=function(){this.ha.unbind(c.Wf,this.mQ,this,!0);this.ha.unbind(c.dj,this.kQ,this,!0);this.ha.unbind(l.Ae,this.lQ,this,!0);this.ha.unbind(l.Gb,this.nQ,
this,!0)};return d});
define("dW","require lV pB iy lx gW jT oT fO na mu ch eB kY w oV oW lW cl pd bM".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("iy"),k=a("lx"),c=a("gW"),h=a("jT"),f=a("oT"),b=a("fO"),e=a("na"),g=a("mu"),n=a("ch"),q=a("eB"),p=a("kY"),r=a("w"),t=a("oV"),u=a("oW"),v=a("lW"),w=a("cl"),x=a("pd"),y=a("bM");a=d.extend(h,function(A){h.call(this);this.v=A;this.Kk.push(this.v);this.sq(["loadingActive","currentTime","panoramaPixelsPerDegree"]);this.set("tag","VideoPanoramaFrame");this.set("frameEmpty",void 0);
this.set("hasStableContent",void 0);this.JX=void 0;this.set("atStart",void 0);n.get(this.v)==n.gq?this.hha=this.v.get("sphere"):this.hha=this.v.get("stereoSphere");this.Uk=!1;this.fb=u.mk(this.hha);this.Kda=this.dra=!1;this.MK=[];this.TE=[];this.Ln=this.Tk=this.Wk=this.dh=this.kh=this.ha=null;this.lm=!1;this.Rta=this.qA=this.rA=0});a.prototype.Zb=function(){this.dh=(new f(l.ea)).Tm(this.Xq.bind(this));this.Wk=(new f(l.mc)).Hp(this.FE.bind(this));this.ha=new u(this.Ha.Ap(),this.hha);this.Fq=new e(this.v.xB(),
this.ha);this.Ma=new g(this.Ha.Ap(),this.v.xB(),this.ha);this.rm=new t(this.v.xB(),this.ha);this.Iv();this.qRa();this.dra=this.Ha.Yc.get("displayPlayOverlay");this.Kda="play_pause"==this.Ha.Yc.get("clickAction");var A=this.Ha.Df(this.v.xB());A.appendChild(this.Tk);A.appendChild(this.Ln);h.prototype.Zb.call(this)};a.prototype.ac=function(){this.dh.dispose();this.Wk.dispose();this.ox();this.Fq.clear();this.Fq=null;this.Ma.clear();this.Ma=null;this.rm.clear();this.rm=null;this.ha.clear();this.kh=this.ha=
null;this.lra();h.prototype.ac.call(this)};a.prototype.qRa=function(){this.lra();this.Tk=this.Qqa(w.qz,w.C7,w.UMa);this.Ln=this.Qqa(w.LH,w.QMa,w.PMa)};a.prototype.Qqa=function(A,E,J){var C=new c;C.set("url",A);C.set("contentWidth",E);C.set("contentHeight",J);C.set("hfov",10);C.set("yaw",0);C.set("pitch",0);C.set("alpha",0);return C};a.prototype.lra=function(){this.Tk&&(this.Tk.remove(),this.Tk=null);this.Ln&&(this.Ln.remove(),this.Ln=null)};a.prototype.Do=function(){this.MK=b.X4a(this.v,this.fb);
this.a3a=p.iH(q.wB(this.MK[0])[0]);this.MK.forEach(function(E){p.Iy(E,p.Ns);p.Hy(E,p.fq)});this.fb.get("posterURL")?(this.TE=b.Y4a(this.v,this.fb),this.TE.forEach(function(E){p.Iy(E,p.Ns);p.Hy(E,p.fq);p.VG(E,m.B7)})):this.TE=[];var A=[].concat(this.MK,this.TE);this.dh.Hf(A);this.Wk.Hf(A);this.trigger(new v(l.mc,0));return A};a.prototype.oa=function(A){this.t2a(A);var E=this.ha.b3();this.set("frameEmpty",E.isEmpty());this.set("atStart",!(1<this.get("currentTime")));this.uga();h.prototype.oa.call(this,
A);this.kh&&this.kh.isEqual(E)?this.ha.getState()==k.PLAYING&&this.Ga():(this.kh=E,this.a3a.Rm(this.kh.kt),this.Ga())};a.prototype.uga=function(){this.get("frameEmpty")?this.set("hasStableContent",!1):this.get("currentTime")>this.JX+.2?this.set("hasStableContent",!0):0==this.get("currentTime")&&this.dca>this.ha.ui()-.5?this.set("hasStableContent",!0):this.set("hasStableContent",!1);this.R("frameEmpty")&&!this.get("frameEmpty")&&(this.JX=this.get("currentTime"));!this.get("frameEmpty")&&0<this.get("currentTime")&&
(this.dca=this.get("currentTime"))};a.prototype.vm=function(){this.R("composedAlpha","meshGroup","frameEmpty","hasStableContent","atStart")&&(this.TE.length&&!this.get("hasStableContent")&&this.get("atStart")?(this.TE.forEach(function(A){q.gf(A,this.get("composedAlpha"))}.bind(this)),this.MK.forEach(function(A){q.gf(A,0)}.bind(this))):(this.TE.forEach(function(A){q.gf(A,0)}.bind(this)),this.MK.forEach(function(A){q.gf(A,this.get("composedAlpha"))}.bind(this))))};a.prototype.Xq=function(){this.trigger(l.jd);
this.trigger(l.ea)};a.prototype.FE=function(A,E){var J=0;E.su(function(C){(C=E.Im(C))&&(J+=C.Ug)});this.trigger(new v(l.mc,J/E.md.length))};a.prototype.Li=function(){this.Ga()};a.prototype.mf=function(){this.Ga()};a.prototype.Qm=function(A){if(A.vf==l.Xf&&!A.hl()&&this.Kda&&(A.ws(this.v),A=Date.now(),!(500>A-this.Rta))){this.Rta=A;A=this.v.xB();var E=A.get("state");E==k.PLAYING?A.set("state",k.Qb):E==k.Qb&&A.set("state",k.PLAYING)}};a.prototype.t2a=function(A){if(this.Kda){if(this.lm!=(this.ha.getState()==
k.Qb))if(this.lm=!this.lm,this.dra){var E=this.Tk.get("alpha"),J=this.lm?1:0;this.gx=new x("linear",[new y("playAlpha",E,J),new y("playScale",A.ob?1.5:1,A.ob?1.5:1),new y("pauseAlpha",0,0),new y("pauseScale",1,1)],Math.abs(J-E)*z);this.Tk.Kh()}else this.gx=new x("linear",this.lm?[new y("playAlpha",0,0),new y("playScale",1,1),new y("pauseAlpha",0,2),new y("pauseScale",.5,1.5)]:[new y("playAlpha",0,2),new y("playScale",.5,1.5),new y("pauseAlpha",0,0),new y("pauseScale",1,1)],B),this.Tk.Kh(),this.Ln.Kh();
this.gx&&(this.gx.Fb(A.Ue),E=this.gx.eb("playAlpha"),this.Tk.set("alpha",1>E?E:2-E),this.Tk.set("scale",this.gx.eb("playScale")),E=this.gx.eb("pauseAlpha"),this.Ln.set("alpha",1>E?E:2-E),this.Ln.set("scale",this.gx.eb("pauseScale")),this.Ga(),this.gx.Xe()&&(this.gx=null));0<this.Tk.get("alpha")&&(this.get("globalBlendingActive")&&this.Tk.set("alpha",0),this.Tk.set("yaw",A.Ra),this.Tk.set("pitch",A.pitch),this.Tk.set("hfov",this.Osa(A)));0<this.Ln.get("alpha")&&(this.get("globalBlendingActive")&&this.Ln.set("alpha",
0),this.Ln.set("yaw",A.Ra),this.Ln.set("pitch",A.pitch),this.Ln.set("hfov",this.Osa(A)))}};var z=300,B=600;a.prototype.Osa=function(A){return A.ob?15:2*Math.atan((r.pb()?Math.min(A.width,A.height)/100*20:w.C7)*Math.tan(A.We*D*.5)/A.width)*F};var D=Math.PI/180,F=180/Math.PI;a.prototype.Iv=function(){this.ha.bind(u.Wf,this.mf,this,!0);this.ha.bind(l.Ae,this.Li,this,!0)};a.prototype.ox=function(){this.ha.unbind(u.Wf,this.mf,this,!0);this.ha.unbind(l.Ae,this.Li,this,!0)};return a});
define("bK","require lV lh pB lx hV jE du pt gW mu on oT nY eN lz S lW pd bM oW".split(" "),function(a){function d(F,A){for(F-=A;180<F;)F-=360;for(;-180>F;)F+=360;return F+A}var l=a("lV"),m=a("lh"),k=a("pB"),c=a("lx");a("hV");var h=a("jE"),f=a("du"),b=a("pt"),e=a("gW"),g=a("mu"),n=a("on"),q=a("oT"),p=a("nY"),r=a("eN"),t=a("lz"),u=a("S"),v=a("lW"),w=a("pd"),x=a("bM"),y=a("oW"),z=Math.PI/180;a=l.extend(h,function(F){h.call(this);this.v=F;this.Kk.push(this.v);this.ig=this.ig.bind(this);this.a_=this.a_.bind(this);
this.sq(["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",c.U);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.te=this.zb=this.Ya=
this.he=this.Of=null;this.xb=new n;this.Pv=this.oA=this.ym=this.kh=this.ha=null});a.prototype.Zb=function(){this.Of=(new q(k.ea)).Tm(this.BE.bind(this));this.he=(new q(k.mc)).Hp(this.EE.bind(this));h.prototype.Zb.call(this);this.FQa();this.appendChild(this.te);m.da(this.v,B,this.ig,!0);m.ju(this.v,D,this.a_,!0)};var B="playbackPositions popupDistance popupMaxHeight popupMaxWidth image.levels.url video state".split(" "),D=["visible"];a.prototype.ac=function(){this.Of.dispose();this.he.dispose();m.ca(this.v,
B,this.ig);m.ca(this.v,D,this.a_);this.KD();this.Yz();this.fw();h.prototype.ac.call(this)};a.prototype.ig=function(){var F=p.A6a(this.v,this.get("panoramaPixelsPerDegree"));this.set("imageURL",F&&F.get("url"));this.set("imageWidth",F&&F.get("width"));this.set("imageHeight",F&&F.get("height"));this.set("video",this.v.get("video"));this.set("state",this.v.get("state"));this.set("popupDistance",this.v.get("popupDistance"));this.set("popupMaxWidth",this.v.get("popupMaxWidth"));this.set("popupMaxHeight",
this.v.get("popupMaxHeight"));this.set("playbackPositions",this.v.get("playbackPositions"))};a.prototype.a_=function(){this.set("visible",this.v.get("visible"))};a.prototype.oa=function(F){this.TA=F.Ra;this.SA=F.pitch;this.Dr(F);this.u2a();this.bS(F);this.je(F);this.f2a(F);this.M1a(F);h.prototype.oa.call(this,F)};a.prototype.u2a=function(){this.R("playbackPositions","currentTime")&&(this.xb.gC(this.get("playbackPositions")),this.xb.fC(this.get("currentTime")),this.set("sourceYaw",this.xb.get("yaw")),
this.set("sourcePitch",this.xb.get("pitch")),this.set("sourceRotationX",this.xb.get("rotationX")),this.set("sourceRotationY",this.xb.get("rotationY")),this.set("sourceRotationZ",this.xb.get("rotationZ")),this.set("sourceHFOV",this.xb.get("hfov")))};a.prototype.Dr=function(){if(this.R("video","imageURL")){var F=[this.te];this.R("imageURL")&&(this.YN(),this.Ya&&F.push(this.Ya),this.ZQ("itemVisible"));this.R("video")&&(this.$N(),this.zb&&F.push(this.zb),this.ZQ("itemVisible"));this.Of.Hf(F);this.he.Hf(F);
this.qh(F)}};a.prototype.bS=function(){if(this.ha){var F=this.ha.b3();this.set("frameEmpty",!!F&&F.isEmpty());!this.kh||F&&!this.kh.isEqual(F)?(this.kh=F,this.zb.set("source",this.kh.kt),this.zb.set("sourceUpdated",!0),this.Ga()):this.ha.getState()==c.PLAYING&&this.Ga()}else this.set("frameEmpty",!1)};a.prototype.je=function(F){this.set("inVR",F.ob);this.set("hotspotsEnabled",F.lG);this.set("rendererYaw",F.Ra);this.set("rendererPitch",F.pitch);this.set("rendererRoll",F.Fg);this.set("rendererWidth",
F.Mr);this.set("rendererHeight",F.Lr);this.set("rendererHFOV",F.We);if(this.R("visible")){var A=this.get("visiblePosition"),E=this.get("visible")?1:0,J=Math.max(1,this.v.get(this.get("visible")?"showDuration":"hideDuration")*Math.abs(E-A)),C=this.v.get(this.get("visible")?"showEasing":"hideEasing");A!=E&&(this.ym=new w(C,[new x("position",A,E)],J));this.get("visible")||(this.set("actualVisible",!1),this.ha&&this.ha.Qc(c.U))}this.ym&&(this.ym.Xe()?(this.ym=null,this.get("visible")?(this.set("actualVisible",
!0),this.v.trigger(k.hN),this.v.get("autoplay")&&this.ha&&this.ha.Qc(c.PLAYING)):setTimeout(function(){this.v&&this.v.trigger(k.aN)}.bind(this),0)):this.ym.Fb(F.Ue),this.ym&&(this.set("visiblePosition",this.ym.eb("position")),this.Ga()));A=!1;if(A=F.ob?this.R("visible","itemVisible"):this.R("rendererYaw","rendererPitch","rendererRoll","rendererWidth","rendererHeight","rendererHFOV","itemVisible","popupMaxWidth","popupMaxHeight","sourceHFOV"))this.set("targetImageScale",this.Vsa(this.Ya,F)),this.set("targetVideoScale",
this.Vsa(this.zb,F)),this.set("targetYaw",d(this.get("rendererYaw"),this.get("sourceYaw"))),this.set("targetPitch",this.get("rendererPitch")),this.set("targetRotationZ",d(F.ob?0:this.get("rendererRoll"),this.get("sourceRotationZ")));if(A||this.R("visiblePosition","targetScale","targetYaw","targetPitch","targetRoll","popupDistance","hfov")){E=this.get("visiblePosition");var L=this.get("targetYaw")*E+this.get("sourceYaw")*(1-E),T=this.get("targetPitch")*E+this.get("sourcePitch")*(1-E),S=this.get("sourceRotationX")*
(1-E),U=this.get("sourceRotationY")*(1-E),X=this.get("targetRotationZ")*E+this.get("sourceRotationZ")*(1-E);F=Math.min(1,2*E);var K=this.get("popupDistance"),N=this.get("sourceHFOV");A=this.get("targetImageScale")*E+(1-E);E=this.get("targetVideoScale")*E+(1-E);this.set("alpha",F);this.Ya&&this.Ya.set("scale",A);this.zb&&this.zb.set("scale",E);[].concat(this.zb?[this.zb]:[],this.Ya?[this.Ya]:[]).forEach(function(V){V.set("yaw",L);V.set("pitch",T);V.set("rotationX",S);V.set("rotationY",U);V.set("rotationZ",
X);V.set("distance",K);V.set("hfov",N)})}};a.prototype.f2a=function(F){if(this.R("frameEmpty","state","imageURL","video")){var A="none";!this.zb||this.Ya&&(this.get("frameEmpty")||this.get("state")==c.U)?this.Ya&&(A="image"):A="video";this.set("itemVisible",A)}if(this.R("itemVisible")){"video"!=this.get("itemVisible")&&this.ha&&this.ha.Qc(c.U);A=this.Ya?this.Ya.get("alpha"):0;var E=this.zb?this.zb.get("alpha"):0,J="image"==this.get("itemVisible")?1:0,C="video"==this.get("itemVisible")?1:0,L="video"==
this.get("itemVisible")?1:200*Math.max(Math.abs(J-A),Math.abs(C-E));this.oA=new w("linear",[new x("imageAlpha",A,J),new x("videoAlpha",E,C)],L)}this.oA&&(this.oA.Xe()?this.oA=null:this.oA.Fb(F.Ue),this.oA&&(this.Ya&&this.Ya.set("alpha",this.oA.eb("imageAlpha")),this.zb&&this.zb.set("alpha",this.oA.eb("videoAlpha")),this.Ga()))};a.prototype.M1a=function(F){this.R("gazeOver","inVR","visible","actualVisible")&&(this.pqa(),this.get("inVR")&&this.v.get("lookAwayToHide")&&!this.get("gazeOver")&&this.get("actualVisible")&&
this.j0a());F.ob&&this.v.get("darkenBackground")&&this.v.get("lookAwayToHide")?(this.R("visible")&&this.get("visible")&&(this.te.set("alpha",.8),this.Pv=null),this.R("gazeOver")&&(this.Pv=new w(this.get("gazeOver")?"linear":"quad_in",[new x("alpha",this.te.get("alpha"),this.get("gazeOver")?.8:0)],this.get("gazeOver")?300:this.v.get("lookAwayToHideTime")))):(this.Pv=null,this.te.set("alpha",F.ob&&this.v.get("darkenBackground")?.8:0));this.Pv&&(this.Pv.Xe()?this.Pv=null:this.Pv.Fb(F.Ue),this.Pv&&(this.te.set("alpha",
this.Pv.eb("alpha")),this.Ga()))};a.prototype.j0a=function(){this.pqa();this.YY=setTimeout(function(){this.YY=null;this.v.set("visible",!1)}.bind(this),this.v.get("lookAwayToHideTime"))};a.prototype.pqa=function(){this.YY&&(clearTimeout(this.YY),this.YY=null)};a.prototype.Vsa=function(F,A){if(!F)return 1;var E=this.get("popupMaxWidth","100%"),J=u.fo(E),C=F.get("contentWidth"),L=F.get("contentHeight"),T=this.get("popupMaxHeight","100%"),S=u.fo(T);if(this.get("inVR")){var U=F=.5*this.get("rendererWidth"),
X=Math.min(A.ti,80);A=t.TF(X,F,U);var K=this.get("sourceHFOV");E=Math.min(Math.tan(A*(void 0!==J?J/100:E/F)*.5*z)/Math.tan(.5*K*z),Math.tan(X*(void 0!==S?S/100:T/U)*.5*z)/Math.tan(.5*t.TF(K,C,L)*z))}else F=this.get("rendererWidth"),U=this.get("rendererHeight"),E=C*Math.min((void 0!==J?F*J/100:E)/C,(void 0!==S?U*S/100:T)/L),A=this.get("rendererHFOV"),K=this.get("sourceHFOV"),E=Math.tan(.5*A*z)*E/F/Math.tan(.5*K*z);return E};a.prototype.YN=function(){this.KD();this.get("imageURL")&&(this.Ya=new e,this.Ya.set("url",
this.get("imageURL")),this.Ya.set("contentWidth",this.get("imageWidth")),this.Ya.set("contentHeight",this.get("imageHeight")),this.Ya.set("alpha",0))};a.prototype.KD=function(){this.Ya&&(this.Ya.remove(),this.Ya=null)};a.prototype.$N=function(){this.Yz();if(this.get("video")){this.zb=new b;var F=y.mk(this.get("video"));this.zb.set("contentWidth",F.get("width"));this.zb.set("contentHeight",F.get("height"));this.zb.set("alpha",0);this.zb.set("sourceIsVideo",!0);this.ha=new y(this.Ha.Ap(),this.get("video"));
this.Ma=new g(this.Ha.Ap(),this.v,this.ha);this.Iv()}};a.prototype.Yz=function(){this.zb&&(this.ox(),this.Ma.clear(),this.Ma=null,this.ha.clear(),this.kh=this.ha=null,this.zb.remove(),this.zb=null)};a.prototype.FQa=function(){this.fw();this.te=new f("#000000")};a.prototype.fw=function(){this.te&&(this.te.remove(),this.te=null)};a.prototype.BE=function(){this.trigger(k.jd);this.trigger(k.ea)};a.prototype.EE=function(F,A){var E=0;A.su(function(J){var C=0,L;this.Of.Im(J)?C=100:(L=this.he.Im(J))&&(C=
L.Ug);E+=C}.bind(this));this.trigger(new v(k.mc,E/A.md.length))};a.prototype.Li=function(){this.Ga()};a.prototype.mf=function(){this.Ga()};a.prototype.IA=function(){this.v.trigger(k.Gb)};a.prototype.Iv=function(){this.ha.bind(y.Wf,this.mf,this,!0);this.ha.bind(k.Ae,this.Li,this,!0);this.ha.bind(k.Gb,this.IA,this,!0)};a.prototype.ox=function(){this.ha.unbind(y.Wf,this.mf,this,!0);this.ha.unbind(k.Ae,this.Li,this,!0);this.ha.unbind(k.Gb,this.IA,this,!0)};a.prototype.Qm=function(F){F.vf==k.Fl?(!F.hl()&&
this.get("visible")?(F.ws(this.v),this.set("over",this.yr(F)),this.set("gazeOver",this.R0a(F))):this.set("over",!1),this.get("over")&&(F.kB(this.v),F.Iu()&&F.KF(this.v),F.gl(this.get("popupDistance"))),this.R("over")&&(this.v.trigger(this.get("over")?k.Gc:k.Jb),F.Iu()&&this.v.trigger(this.get("over")?k.RC:k.hq))):F.vf==k.Xf&&!F.hl()&&this.get("visible")&&(F.ws(this.v),F.gl(this.get("popupDistance")),this.yr(F)?F.O7a()||this.v.trigger(k.ma):this.v.set("visible",!1))};a.prototype.yr=function(F){return this.Iza(F.pr)};
a.prototype.R0a=function(F){F=F.qL();return!!F&&this.Iza([F])};a.prototype.Iza=function(F){if(this.get("visible")){F=("video"==this.get("itemVisible")?this.zb:this.Ya).rw(F);for(var A=0;A<F.length;A++){var E=F[A];if(r.My(E.source,E.x,E.y))return!0}}return!1};return a});
define("de",["require","lV","jE"],function(a){var d=a("lV"),l=a("jE");a=d.extend(l,function(){l.call(this);this.Rz&&this.Rz();this.Eo&&this.Eo()});a.prototype.Zb=function(){l.prototype.Zb.call(this);this.Zo&&this.Zo();this.RJ&&this.RJ()};a.prototype.ac=function(){this.ap&&this.ap();this.TJ&&this.TJ();l.prototype.ac.call(this)};a.prototype.oa=function(m){this.yf&&this.yf(m);l.prototype.oa.call(this,m);this.tp&&this.tp(m)};return a});
define("kr",["require","pB"],function(a){var d=a("pB");return{Rz:function(){this.set("beamEnabled",!1);this.pd=!1;this.SA=this.TA=void 0},tp:function(l){this.TA=l.Ra;this.SA=l.pitch},Qm:function(l){if(l.vf==d.Fl){var m=!l.hl()&&this.yr(l);if(m){l.kB(this.v);this.v.get("useHandCursor")&&l.KF(this.v);l.gl(this.get("distance"));var k=this.$b(l.qG());k&&l.Z1(k,this.dB(l.qG()))}this.pd!=m&&(this.pd=m,this.v.trigger(this.pd?d.Gc:d.Jb),l.Iu()&&this.v.trigger(this.pd?d.RC:d.hq))}else l.vf==d.Xf&&!l.hl()&&
this.yr(l)&&(1<this.v.uL(d.ma,!0).length&&l.ws(this.v),l.gl(this.get("distance")),this.v.trigger(d.ma))},yr:function(l){return this.get("beamEnabled")&&0<this.Iaa().rw(l.pr).length?!0:!1},$b:function(l){return!l||this.v.get("displayTooltipInTouchScreens")&&!1!==this.Ha.M.get("displayTooltipInTouchScreens")?this.v.get("toolTip",""):""},dB:function(l){if(l){l=this.get("yaw")-this.TA;var m=this.get("pitch")-this.SA;return Math.sqrt(l*l+m*m)}return 0}}});
define("cb","require lV lh pB de bG oT nY kr".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("de"),c=a("bG"),h=a("oT"),f=a("nY");a=a("kr");d=d.extend(k,a,c,function(b){k.call(this);this.v=b;this.gE=this.aaa=this.fba=null;this.Kk.push(this.v);this.ig=this.ig.bind(this);this.sq(["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.ag=this.rt=this.he=this.Of=null;this.Vea(this.v)});d.prototype.Zb=function(){this.Of=(new h(m.ea)).Tm(this.BE.bind(this));this.he=(new h(m.mc)).Hp(this.EE.bind(this));this.PQa();k.prototype.Zb.call(this);l.da(this.v,"url enabled image fadeInDuration fadeOutDuration contentInteractive interactionEnabled transparent".split(" "),
this.ig,!0);this.V$()};d.prototype.ac=function(){this.W$();this.Of.dispose();this.he.dispose();l.ca(this.v,"url enabled image fadeInDuration fadeOutDuration contentInteractive interactionEnabled transparent".split(" "),this.ig);this.hra();this.jra();k.prototype.ac.call(this)};d.prototype.ig=function(){this.set("url",this.v.get("url"));this.ag.set("url",this.get("url"));this.set("image",this.v.get("image"));this.Ya.set("image",this.get("image"));this.Ya.set("level",this.get("image")&&f.KDa(this.v,
this.get("panoramaPixelsPerDegree")));this.set("enabled",this.v.get("enabled"));this.set("fadeInDuration",this.v.get("fadeInDuration"));this.set("fadeOutDuration",this.v.get("fadeOutDuration"));this.set("interactionEnabled",this.v.get("interactionEnabled"));this.set("contentInteractive",this.v.get("contentInteractive"));this.set("transparent",this.v.get("transparent"));this.Ga()};d.prototype.oa=function(b){this.set("loaded",!!this.ag&&this.ag.get("frameLoaded"));this.set("inVR",b.ob);this.set("inScreenshot",
b.nG);this.set("hotspotsEnabled",b.lG);k.prototype.oa.call(this,b);this.je(b);this.rga(b)};d.prototype.PQa=function(){this.YN();this.$Qa();this.ZQa();var b=[this.Ya,this.rt,this.ag];this.Of.Hf(b);this.he.Hf(b);this.qh(b)};d.prototype.je=function(){this.set("globalBlendingActiveCopy",this.get("globalBlendingActive"));if(this.R("globalBlendingActive","globalBlendingActiveCopy","url","inVR","hotspotsEnabled","enabled","interactionEnabled","contentInteractive","composedTranslationX","composedTranslationY",
"composedTranslationZ")){var b=!(0!=this.get("composedTranslationX")||0!=this.get("composedTranslationY")||0!=this.get("composedTranslationZ"))&&0==this.get("globalBlendingActive")&&this.get("hotspotsEnabled")&&this.get("enabled")&&!this.get("inVR")&&!!this.get("url");this.set("visible",b);this.set("beamEnabled",b&&this.get("interactionEnabled"));this.ag.set("contentInteractive",b&&this.get("interactionEnabled")&&this.get("contentInteractive"))}this.set("frameHidden",!this.ag.get("geometryVisible"));
this.R("visible","loaded","frameHidden","transparent","inScreenshot")&&(this.get("visible")||this.set("loaded",!1),this.Ya.set("alpha",!this.get("visible")||!this.get("frameHidden")&&this.get("loaded")?0:1),this.Ya.set("alpha",1),this.rt.set("alpha",!this.get("visible")||this.get("frameHidden")||!this.get("loaded")||this.get("transparent")||this.get("inScreenshot")?0:1),this.ag.set("alpha",this.get("visible")?1:0),this.ag.set("transparent",this.get("transparent")),this.set("inView",this.get("visible")&&
(this.get("loaded")||this.get("image"))),this.Ga());this.R("inView")&&this.v.trigger(this.get("inView")?m.kd:m.cd)};d.prototype.YN=function(){this.KD();this.Ya=new this.gE;this.Ya.set("image",this.get("image"));this.Ya.set("level",this.get("image")&&f.KDa(this.v,this.get("panoramaPixelsPerDegree")));this.Ya.set("visible",!0);this.Ya.set("alpha",0);this.set("imagePlane",this.Ya)};d.prototype.KD=function(){this.Ya&&(this.Ya.remove(),this.Ya=null,this.set("imagePlane",null))};d.prototype.ZQa=function(){this.hra();
this.ag=new this.aaa;this.ag.bind(m.ea,this.Tra,this,!0);this.ag.set("url",this.get("url"));this.ag.set("visible",!0);this.ag.set("alpha",1);this.set("framePlane",this.ag)};d.prototype.hra=function(){this.ag&&(this.ag.unbind(m.ea,this.Tra,this,!0),this.ag.remove(),this.ag=null,this.set("framePlane",null))};d.prototype.$Qa=function(){this.jra();this.rt=new this.fba;this.rt.set("visible",!0);this.rt.set("alpha",1);this.set("holePlane",this.rt)};d.prototype.jra=function(){this.rt&&(this.rt.remove(),
this.rt=null,this.set("holePlane",null))};d.prototype.Iaa=function(){return this.rt};d.prototype.Tra=function(){this.Ga()};d.prototype.BE=function(){this.trigger(m.jd);this.trigger(m.ea)};d.prototype.EE=function(b,e){var g=0;e.su(function(n){(n=e.Im(n))&&(g+=n.Ug)});this.trigger(new ProgressEvent(m.mc,g/e.md.length))};return d});
define("gh",["require","lV","jE"],function(a){var d=a("lV"),l=a("jE");a=d.extend(l,function(){l.call(this);this.set("tag","ComposedCSSObject");this.set("transparent",!1);this.set("cssScene",null);this.set("cssSceneOver",null);this.set("cssObject",this.F9());this.$v&&this.$v();this.ID&&this.ID();this.Rz&&this.Rz();this.Eo&&this.Eo()});a.prototype.F9=function(){var m=new THREE.CSS3DObject;m.matrixAutoUpdate=!1;return m};a.prototype.Zb=function(){l.prototype.Zb.call(this);this.Zo&&this.Zo();this.oP&&
this.oP();this.RJ&&this.RJ()};a.prototype.ac=function(){this.nJ&&this.nJ();this.TJ&&this.TJ();this.ap&&this.ap();var m=this.get("cssObject");m&&m.parent&&m.parent.remove(m);this.set("cssScene",null);l.prototype.ac.call(this)};a.prototype.oa=function(m){this.yf&&this.yf(m);l.prototype.oa.call(this,m);this.set("cssScene",m.KS);this.set("cssSceneOver",m.LS);if(this.R("transparent")){var k=this.get("cssObject");k&&k.parent&&k.parent.remove(k)}this.R("cssScene","cssSceneOver","transparent")&&(k=this.get("transparent")?
m.LS:m.KS)&&k.add(this.get("cssObject"));this.vm();this.Vi&&this.Vi(m);this.Lx&&this.Lx(m);this.DF()};a.prototype.vm=function(){this.R("composedAlpha","meshGroup")&&this.zz()};a.prototype.zz=function(){this.get("cssObject").element.style.display=0<this.get("composedAlpha")?"block":"none"};a.prototype.DF=function(){this.R("index")&&(this.get("cssObject").containerElement.style.zIndex=this.get("index"))};return a});
define("eu",["require","jJ","a"],function(a){var d=a("jJ"),l=a("a"),m=new THREE.Matrix4,k=Math.PI/180;return{$v:function(){this.set("vertices",void 0);this.Ih=new THREE.Matrix4;this.Td=new THREE.Matrix4;this.$o=new THREE.Matrix4;this.mn=new THREE.Matrix4;this.Wq=new THREE.Matrix4},F9:function(){var c=new THREE.CSS3DQuad;c.matrixAutoUpdate=!1;return c},Lx:function(c){var h=!1;if(this.R("vertices","contentWidth","contentHeight")){var f=this.get("vertices");h=l.by(f[0].get("yaw")*k,f[0].get("pitch")*
k).normalize();var b=l.by(f[1].get("yaw")*k,f[1].get("pitch")*k).normalize(),e=l.by(f[2].get("yaw")*k,f[2].get("pitch")*k).normalize();f=l.by(f[3].get("yaw")*k,f[3].get("pitch")*k).normalize();var g=this.get("cssObject");g.vertices[0].set(h.x,h.y,-h.z);g.vertices[1].set(b.x,b.y,-b.z);g.vertices[2].set(e.x,e.y,-e.z);g.vertices[3].set(f.x,f.y,-f.z);g.contentWidth=this.get("contentWidth");g.contentHeight=this.get("contentHeight");h=!0}b=!1;this.R("composedTranslationX","composedTranslationY","composedTranslationZ")&&
(this.Ih.makeTranslation(.5*-this.get("composedTranslationX")*d.Hg,.5*this.get("composedTranslationY")*d.Hg,.5*this.get("composedTranslationZ")*d.Hg),b=!0);this.R("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.Td.makeRotationY(-c.Ra*k),this.Td.multiply(m.makeRotationX(-this.get("composedDeltaPitch")*k)),this.Td.multiply(m.makeRotationY(this.get("composedDeltaYaw")*k)),this.Td.multiply(m.makeRotationY(c.Ra*k)),b=!0);if(b||this.R("meshGroup"))this.Wq.copy(this.Ih),this.Wq.multiply(this.Td),
this.get("cssObject").matrix.copy(this.Wq),this.get("cssObject").matrixWorldNeedsUpdate=!0;this.set("cameraYaw",c.Ra);this.set("cameraPitch",c.pitch);this.set("cameraRoll",c.Fg);this.set("cameraHfov",c.We);this.set("cameraWidth",c.width);this.set("cameraHeight",c.height);c.camera&&(b||h||this.R("cameraYaw","cameraPitch","cameraRoll","cameraHfov","cameraWidth","cameraHeight"))&&(this.get("cssObject").projectVertices(c.camera),this.set("geometryVisible",this.get("cssObject").isVisible),this.R("geometryVisible")&&
this.Eea())}}});
define("ed","require iy jJ eB kY a".split(" "),function(a){var d=a("iy"),l=a("jJ"),m=a("eB"),k=a("kY"),c=a("a"),h=new THREE.Matrix4,f=Math.PI/180;return{$v:function(){this.set("distance",void 0);this.set("vertices",void 0);this.ah=null;this.Ih=new THREE.Matrix4;this.Td=new THREE.Matrix4;this.om=new THREE.Matrix4;this.Hi=new THREE.Matrix4},Lx:function(b){this.S2a(b);this.Er(b)},SI:function(){var b=this.get("meshGroup");return b?m.jl(b)[0]:null},Do:function(){this.ah||(this.ah=this.Qz());return[0].map(function(b){var e=
this.WN();b=m.create(this.ah[b],e);k.Hy(b,k.fq);k.Iy(b,k.Ns);k.VG(b,d.fN);k.SU(b,1);return b}.bind(this))},S2a:function(){if(this.R("vertices")){var b=this.get("meshGroup");if(b)return this.ah&&this.ah.forEach(function(e){l.dispose(e)}),this.ah=this.Qz(),m.jl(b).map(function(e,g){m.pla(e,this.ah[g])}.bind(this))}},Qz:function(){function b(w){return 0==w||isNaN(w)||!isFinite(w)}var e=this.get("vertices")||[];if(4!=e.length)return[l.CCa(-1,1,1,1,1,1,1,-1,1,-1,-1,1)];var g=c.by(e[0].get("yaw")*f,e[0].get("pitch")*
f).normalize(),n=c.by(e[1].get("yaw")*f,e[1].get("pitch")*f).normalize(),q=c.by(e[2].get("yaw")*f,e[2].get("pitch")*f).normalize();e=c.by(e[3].get("yaw")*f,e[3].get("pitch")*f).normalize();var p=g.clone().v2(q),r=e.clone().v2(n),t=p.clone().v2(r).normalize();r=(2*g.y*t.x/g.x-2*t.y)/(-q.y+g.y*q.x/g.x);b(r)&&(r=(2*g.z*t.x/g.x-2*t.z)/(-q.z+g.z*q.x/g.x));b(r)&&(r=(2*g.z*t.y/g.y-2*t.z)/(-q.z+g.z*q.y/g.y));var u=(2*t.x-q.x*r)/g.x;b(u)&&(u=(2*t.y-q.y*r)/g.y);b(u)&&(u=(2*t.z-q.z*r)/g.z);p=(2*n.y*t.x/n.x-
2*t.y)/(-e.y+n.y*e.x/n.x);b(p)&&(p=(2*n.z*t.x/n.x-2*t.z)/(-e.z+n.z*e.x/n.x));b(p)&&(p=(2*n.z*t.y/n.y-2*t.z)/(-e.z+n.z*e.y/n.y));var v=(2*t.x-e.x*p)/n.x;b(v)&&(v=(2*t.y-e.y*p)/n.y);b(v)&&(v=(2*t.z-e.z*p)/n.z);g=g.LU(u);n=n.LU(v);q=q.LU(r);e=e.LU(p);return[l.CCa(g.x,g.y,-g.z,n.x,n.y,-n.z,q.x,q.y,-q.z,e.x,e.y,-e.z)]},Er:function(b){var e=!1;this.R("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.Ih.makeTranslation(.5*-this.get("composedTranslationX")*l.Hg,.5*this.get("composedTranslationY")*
l.Hg,.5*this.get("composedTranslationZ")*l.Hg),e=!0);this.R("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.Td.makeRotationY(-b.Ra*f),this.Td.multiply(h.makeRotationX(-this.get("composedDeltaPitch")*f)),this.Td.multiply(h.makeRotationY(this.get("composedDeltaYaw")*f)),this.Td.multiply(h.makeRotationY(b.Ra*f)),e=!0);this.R("distance","composedTranslationX","composedTranslationY","composedTranslationZ")&&(b=0==this.ta.get("composedTranslationX")&&0==this.ta.get("composedTranslationY")&&
0==this.ta.get("composedTranslationZ")&&void 0!==this.get("distance")?l.yu(this.get("distance")):l.Yr(),this.om.makeScale(b,b,b),e=!0);if(e||this.R("meshGroup"))this.Hi.copy(this.Ih),this.Hi.multiply(this.Td),this.Hi.multiply(this.om),b=m.jl(this.get("meshGroup")),m.Pr(b[0],this.Hi)}}});
define("cz",["require","pB"],function(a){var d=a("pB");return{ID: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.wc=this.ke=null;this.jY=void 0;this.R1=this.R1.bind(this);this.S1=this.S1.bind(this);this.T1=this.T1.bind(this);this.fE=this.fE.bind(this);this.mba=this.mba.bind(this)},Vi:function(){this.R("cssObject")&&(this.aRa(),this.get("cssObject").element.appendChild(this.ke));
this.R("url")&&this.l_a(this.get("url"));this.R("contentWidth","contentHeight")&&(this.ke.style.width=this.get("contentWidth")+2+"px",this.ke.style.height=this.get("contentHeight")+2+"px");this.R("contentInteractive")&&(this.ke.style.pointerEvents=this.get("contentInteractive")?"auto":"none")},vm:function(){this.R("composedAlpha")&&(0<this.get("composedAlpha")?this.wc&&!this.wc.parentNode&&(this.xAa(),this.ke.appendChild(this.wc)):this.wc&&this.wc.parentNode&&this.ke.removeChild(this.wc))},oP:function(){this.trigger(d.jd);
this.get("frameLoaded")&&this.trigger(d.ea)},nJ:function(){this.iQa()},S1:function(l){l.preventDefault();l.stopImmediatePropagation()},R1:function(){this.Ha.Ap().PG(null)},T1:function(l){l.preventDefault();l.stopImmediatePropagation()},fE:function(){this.set("frameLoaded",!0);this.trigger(d.ea)},mba:function(){this.kY=null;this.fE()},aRa:function(){this.wc||(this.ke=document.createElement("div"),this.ke.style.position="absolute",this.ke.style.left=this.ke.style.top="-1px",this.get("cssObject").isCSS3DObject&&
(this.ke.style.transform="translate(-50%, -50%)"),this.ke.style.overflow="hidden",this.ke.style["-webkit-overflow-scrolling"]="touch",this.ke.addEventListener("mouseenter",this.R1,!0),this.ke.addEventListener("mousemove",this.S1,!0),this.ke.addEventListener("mousewheel",this.T1,!0),this.wc=document.createElement("iframe"),this.wc.setAttribute("allow","fullscreen; accelerometer; geolocation; gyroscope; magnetometer; vr; autoplay; camera; microphone; display-capture; xr-spatial-tracking"),this.wc.setAttribute("frameborder",
"0"),this.wc.setAttribute("scrolling","auto"),this.wc.style.width="100%",this.wc.style.height="100%",this.wc.addEventListener("load",this.fE,!0),0<this.get("composedAlpha")&&this.ke.appendChild(this.wc))},iQa:function(){this.wc&&(this.wc.src="",this.yea(),this.Nz(),this.wc.parentNode&&this.wc.parentNode.removeChild(this.wc),this.wc=null);this.ke&&(this.ke.parentNode&&this.ke.parentNode.removeChild(this.ke),this.ke.removeEventListener("mouseenter",this.R1,!0),this.ke.removeEventListener("mousemove",
this.S1,!0),this.ke.removeEventListener("mousewheel",this.T1,!0),this.ke=null)},l_a:function(l){this.jY!==l&&(this.jY=l,this.set("frameLoaded",!1),this.xAa())},xAa:function(){this.jY?(this.p_a(),this.iOa(),this.wc.src=this.jY):(this.Nz(),this.yea(),this.wc.src="",this.fE())},p_a:function(){this.Nz();this.kY=setTimeout(this.mba,3E3)},Nz:function(){this.kY&&(clearTimeout(this.kY),this.kY=null)},iOa:function(){this.yea();this.wc.addEventListener("load",this.fE,!0)},yea:function(){this.wc.removeEventListener("load",
this.fE,!0)}}});define("lc",["require","eB","pB"],function(a){var d=a("eB"),l=a("pB");return{ID:function(){this.get("materialConfig").params.blending=THREE.NoBlending},oP:function(){this.trigger(l.jd);this.trigger(l.ea)},vm:function(){this.R("meshGroup","composedAlpha")&&d.gf(this.get("meshGroup"),0<this.get("composedAlpha")?.001:0)}}});
define("nn",["require","lh","on"],function(a){var d=a("lh"),l=a("on");return{Eo:function(){this.set("playbackPositions",null);this.ee=this.ee.bind(this);this.xb=new l},Zo:function(){d.da(this.v,["playbackPositions","width","height"],this.ee,!0)},ap:function(){d.ca(this.v,["playbackPositions","width","height"],this.ee)},ee:function(){this.set("playbackPositions",this.v.get("playbackPositions"));this.set("contentWidth",this.v.get("width"));this.set("contentHeight",this.v.get("height"))},yf:function(){this.R("playbackPositions",
"currentTime")&&(this.xb.gC(this.get("playbackPositions")),this.xb.fC(this.get("currentTime")),this.set("vertices",this.xb.Via()));this.R("framePlane","holePlane","imagePlane","vertices")&&this.rb().forEach(function(m){m.set("vertices",this.get("vertices"));m.set("contentWidth",this.get("contentWidth"));m.set("contentHeight",this.get("contentHeight"))}.bind(this))}}});
define("kh","require lV cb gh c eu ed cz hu lc nn".split(" "),function(a){var d=a("lV"),l=a("cb"),m=a("gh"),k=a("c"),c=a("eu"),h=a("ed"),f=a("cz"),b=a("hu"),e=a("lc");a=a("nn");var g=d.extend(k,h,b,function(){k.call(this);this.set("tag","QuadFrameHotspotImage")}),n=d.extend(m,c,f,function(){m.call(this);this.set("tag","QuadFrameHotspotFrame")}),q=d.extend(k,h,e,function(){k.call(this);this.set("tag","QuadFrameHotspotHole")});return d.extend(l,a,function(p){l.call(this,p);this.gE=g;this.aaa=n;this.fba=
q})});
define("lt",["require","lh","on"],function(a){var d=a("lh"),l=a("on");return{Eo:function(){this.set("playbackPositions",null);this.set("distance",void 0);this.ee=this.ee.bind(this);this.xb=new l},Zo:function(){d.da(this.v,["vertices","distance","playbackPositions"],this.ee,!0)},ap:function(){d.ca(this.v,["vertices","distance","playbackPositions"],this.ee)},ee:function(){this.set("distance",this.v.get("distance"));this.set("vertices",this.v.get("vertices"));this.set("playbackPositions",this.v.get("playbackPositions"))},yf:function(){this.R("playbackPositions",
"currentTime")&&(this.xb.gC(this.get("playbackPositions")),this.xb.fC(this.get("currentTime")),this.set("vertices",this.xb.Via()),this.set("alpha",this.xb.kl()))}}});
define("jL","require lV lh pB eB c ed hu py lt nY".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("eB"),c=a("c"),h=a("ed"),f=a("hu"),b=a("py"),e=a("lt"),g=a("nY"),n=0;a=d.extend(c,h,e,f,b,function(q){c.call(this);this.set("tag","QuadHotspotImage");this.set("id","quad_hs_image_"+n++);this.set("side",THREE.DoubleSide);this.v=q;this.Kk.push(this.v);this.jg=this.jg.bind(this)});a.prototype.Zb=function(){c.prototype.Zb.call(this);l.da(this.v,["image.levels"],this.jg,!0)};a.prototype.ac=function(){l.ca(this.v,
["image.levels"],this.jg);c.prototype.ac.call(this)};a.prototype.jg=function(){this.set("image",this.v.get("image"));this.set("level",g.D6a(this.v))};a.prototype.oa=function(q){this.zF();c.prototype.oa.call(this,q);this.R("inView")&&this.v.trigger(this.get("inView")?m.kd:m.cd)};a.prototype.zF=function(){if(this.R("meshGroup","panoramaId","id")){var q=this.get("meshGroup");q&&q.children.forEach(function(p){k.setAttribute(p,k.sC,this.get("panoramaId"));k.setAttribute(p,k.d6,this.get("id"))}.bind(this))}};
return a});
define("jD",["require","pB","lx"],function(a){function d(c,h){this.Vd=c;this.Gd=h;this.Ub=!1;this.m_=!0;this.O8=this.Cda=!1;this.o8();this.Nca()}var l=a("pB"),m=a("lx");d.prototype.clear=function(){this.Yva();this.vea()};d.prototype.Ze=function(c){this.Ub!=c&&(this.Ub=c,this.bu())};d.prototype.Gab=function(c){this.m_!=c&&((this.m_=c)&&this.Yva(),this.bu())};d.prototype.bu=function(){if(!this.Ub||this.m_)this.Gd.set("state",m.U);else if(this.Gd.get("autoplay")||this.O8)this.O8=!1,this.Gd.set("state",m.PLAYING)};
d.prototype.Nca=function(){if(!this.Cda){var c=this.Gd.get("video").get("autoplayTime");void 0!==c&&this.Gd.get("video").get("autoplayTimeLimit")<(new Date).getTime()&&(c=void 0);this.Gd.set("currentTime",c);this.O8=void 0!==c}};d.prototype.Yva=function(){this.Cda||(this.Cda=!0,this.Gd.get("state")==m.PLAYING?(this.Gd.get("video").set("autoplayTimeLimit",(new Date).getTime()+k),this.Gd.get("video").set("autoplayTime",this.Gd.get("currentTime",0))):this.Gd.get("video").set("autoplayTime",void 0))};
d.prototype.o8=function(){this.Gd.get("video").bind(l.G("autoplayTime"),this.Nca,this,!0)};d.prototype.vea=function(){this.Gd.get("video").unbind(l.G("autoplayTime"),this.Nca,this,!0)};var k=1E3;return d});
define("eP",["require","pB","eN"],function(a){var d=a("pB"),l=a("eN");return{Rz:function(){this.set("beamEnabled",!1);this.pd=!1;this.SA=this.TA=void 0},tp:function(m){this.TA=m.Ra;this.SA=m.pitch},Qm:function(m){if(m.vf==d.Fl){var k=!m.hl()&&this.yr(m)&&!this.get("blendingActive");if(k){m.kB(this.v);this.v.get("useHandCursor")&&m.KF(this.v);m.gl(this.get("distance"));var c=this.$b(m.qG());c&&m.Z1(c,this.dB(m.qG()))}this.pd!=k&&(this.pd=k,this.v.trigger(this.pd?d.Gc:d.Jb),m.Iu()&&this.v.trigger(this.pd?
d.RC:d.hq))}else m.vf==d.Xf&&!m.hl()&&this.yr(m)&&(1<this.v.uL(d.ma,!0).length&&m.ws(this.v),m.gl(this.get("distance")),this.v.trigger(d.ma))},yr:function(m){if(this.get("beamEnabled")){m=this.Iaa().rw(m.pr);for(var k=0;k<m.length;k++){var c=m[k];if(l.My(c.source,c.x,c.y))return!0}}return!1},$b:function(m){return!m||this.v.get("displayTooltipInTouchScreens")&&!1!==this.Ha.M.get("displayTooltipInTouchScreens")?this.v.get("toolTip",""):""},dB:function(m){if(m){m=this.get("yaw")-this.TA;var k=this.get("pitch")-
this.SA;return Math.sqrt(m*m+k*k)}return 0}}});
define("fm","require lV lh pB lx oW de jD bG oT nY eP lW pd bM".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("lx"),c=a("oW"),h=a("de"),f=a("jD"),b=a("bG"),e=a("oT"),g=a("nY"),n=a("eP"),q=a("lW"),p=a("pd"),r=a("bM");a=d.extend(h,n,b,function(t){h.call(this);this.v=t;this.iha=this.gE=null;this.Kk.push(this.v);this.ig=this.ig.bind(this);this.sq(["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("enabledInStandard",!0);this.set("interactionEnabled",!0);this.set("centerOverDisplay",!1);this.set("loadingActive",!1);this.set("frameEmpty",!0);this.set("state",k.U);this.set("itemVisible","none");this.set("blending",0);this.set("chromaColor",void 0);this.set("chromaThreshold",0);this.set("chromaSmoothing",0);this.zb=this.Ya=this.he=this.Of=null;this.jha=!1;this.lt=[];this.Vea(this.v)});a.prototype.Zb=function(){this.Of=(new e(m.ea)).Tm(this.BE.bind(this));
this.he=(new e(m.mc)).Hp(this.EE.bind(this));this.Ll=new f(this.Ha.Ap(),this.v);h.prototype.Zb.call(this);l.da(this.v,"blending chromaColor chromaThreshold chromaSmoothing distance scaleMode image.levels video.levels enabled enabledInStandard enabledInVR fadeInDuration fadeOutDuration interactionEnabled state videoVisibleOnStop".split(" "),this.ig,!0);this.V$()};a.prototype.ac=function(){this.W$();this.Ll.clear();this.Of.dispose();this.he.dispose();l.ca(this.v,"blending chromaColor chromaThreshold chromaSmoothing distance scaleMode image.levels video.levels enabled enabledInStandard enabledInVR fadeInDuration fadeOutDuration interactionEnabled state videoVisibleOnStop".split(" "),
this.ig);this.KD();this.Yz();h.prototype.ac.call(this)};a.prototype.ig=function(){this.set("image",this.v.get("image"));this.set("imageLevel",g.O6a(this.v,this.get("panoramaPixelsPerDegree")));this.set("video",this.v.get("video"));this.set("videoLevel",c.mk(this.get("video")));this.set("enabled",this.v.get("enabled"));this.set("enabledInStandard",this.v.get("enabledInStandard"));this.set("enabledInVR",this.v.get("enabledInVR"));this.set("fadeInDuration",this.v.get("fadeInDuration"));this.set("fadeOutDuration",
this.v.get("fadeOutDuration"));this.set("interactionEnabled",this.v.get("interactionEnabled"));this.set("state",this.v.get("state"));this.set("videoVisibleOnStop",this.v.get("videoVisibleOnStop"));this.set("blending",this.v.get("blending"));this.set("chromaColor",this.v.get("chromaColor"));this.set("chromaThreshold",this.v.get("chromaThreshold"));this.set("chromaSmoothing",this.v.get("chromaSmoothing"))};a.prototype.oa=function(t){this.set("inVR",t.ob);this.set("hotspotsEnabled",t.lG);this.Dr();this.RR();
h.prototype.oa.call(this,t);this.bu();this.bS(t);this.je(t);this.rga(t)};a.prototype.Dr=function(){if(this.R("video","videoLevel","image","imageLevel")){var t=[];this.R("image","imageLevel")&&(this.YN(),this.Ya&&t.push(this.Ya));this.R("video","videoLevel")&&(this.$N(),this.zb&&t.push(this.zb));this.qh(t);this.Of.Hf(t);this.he.Hf(t)}};a.prototype.RR=function(){this.R("video","videoLevel","image","imageLevel","blending","chromaColor","chromaThreshold","chromaSmoothing")&&this.rb().forEach(function(t){t.set("blending",
this.get("blending"));t.set("chromaColor",this.get("chromaColor"));t.set("chromaThreshold",this.get("chromaThreshold"));t.set("chromaSmoothing",this.get("chromaSmoothing"))}.bind(this))};a.prototype.bu=function(){this.R("video","composedAlpha","enabledInVR","enabledInStandard","enabled","inVR")&&this.Ll.Ze(0<this.get("composedAlpha")&&this.get("hotspotsEnabled")&&this.get("enabled")&&(!this.get("inVR")||this.get("enabledInVR"))&&(this.get("inVR")||this.get("enabledInStandard")));this.R("blendingActive")&&
this.Ll.Gab(this.get("blendingActive"))};a.prototype.bS=function(){this.set("frameEmpty",!this.zb||!this.zb.get("hasStableContent"))};a.prototype.je=function(t){var u=this.get("itemVisible");if(this.R("frameEmpty","state","image","video","inVR","hotspotsEnabled","enabledInVR","enabledInStandard","enabled","interactionEnabled")){var v="none";this.get("hotspotsEnabled")&&this.get("enabled")&&(!this.get("inVR")||this.get("enabledInVR"))&&(this.get("inVR")||this.get("enabledInStandard"))&&(this.zb&&(!this.Ya||
!this.get("frameEmpty")&&(this.get("state")!=k.U||this.jha&&this.get("videoVisibleOnStop")))?v="video":this.Ya&&(v="image"),this.get("state")!=k.U&&(this.jha=!0));this.set("itemVisible",v);this.set("beamEnabled","none"!=v&&this.get("interactionEnabled"))}if(this.R("itemVisible")){v="none"!=this.get("itemVisible");var w="none"!=u;if(v&&w&&!this.get("chromaColor")&&0==this.lt.length)this.Ya&&this.Ya.set("alpha","image"==this.get("itemVisible")?1:0),this.zb&&this.zb.set("alpha","video"==this.get("itemVisible")?
1:0);else{u=v==w?50:v?this.get("fadeInDuration"):this.get("fadeOutDuration");v!=w&&this.v.trigger(v?m.kd:m.cd);w=this.Ya?this.Ya.get("alpha"):0;var x=this.zb?this.zb.get("alpha"):0;v=[{video:x,image:w}];"video"==this.get("itemVisible")?(v.push({video:1,image:w,time:u*(1-x)}),v.push({video:1,image:0,time:50*(w-0)})):"image"==this.get("itemVisible")?(v.push({video:x,image:1,time:u*(1-w)}),v.push({video:0,image:1,time:50*(x-0)})):v.push({video:0,image:0,time:Math.max(x,w,1/u)*u});this.lt=[];for(u=1;u<
v.length;u++)0<v[u].time&&this.lt.push(new p("linear",[new r("imageAlpha",v[u-1].image,v[u].image),new r("videoAlpha",v[u-1].video,v[u].video)],v[u].time))}}0<this.lt.length&&(this.lt[0].Xe()?this.lt.shift():this.lt[0].Fb(t.Ue),0<this.lt.length&&(this.Ya&&this.Ya.set("alpha",this.lt[0].eb("imageAlpha")),this.zb&&this.zb.set("alpha",this.lt[0].eb("videoAlpha")),this.Ga()))};a.prototype.YN=function(){this.KD();this.get("image")&&this.get("imageLevel")&&(this.Ya=new this.gE,this.Ya.set("image",this.get("image")),
this.Ya.set("level",this.get("imageLevel")),this.Ya.set("isVideoTexture",!0),this.Ya.set("visible",!0),this.Ya.set("alpha",0),this.Ya.set("side",THREE.DoubleSide))};a.prototype.KD=function(){this.Ya&&(this.Ya.remove(),this.Ya=null)};a.prototype.$N=function(){this.Yz();this.get("video")&&this.get("videoLevel")&&(this.zb=new this.iha,this.zb.set("scriptObject",this.v),this.zb.set("video",this.get("video")),this.zb.set("level",this.get("videoLevel")),this.zb.set("visible",!0),this.zb.set("alpha",0),
this.zb.set("side",THREE.DoubleSide))};a.prototype.Yz=function(){this.zb&&(this.zb.remove(),this.zb=null)};a.prototype.BE=function(){this.trigger(m.jd);this.trigger(m.ea)};a.prototype.EE=function(t,u){var v=0;u.su(function(w){(w=u.Im(w))&&(v+=w.Ug)});this.trigger(new q(m.mc,v/u.md.length))};a.prototype.Iaa=function(){return"video"==this.get("itemVisible")?this.zb:this.Ya};return a});
define("hc","require pB lx cD eB na mu fr oV oW".split(" "),function(a){var d=a("pB"),l=a("lx"),m=a("cD"),k=a("eB"),c=a("na"),h=a("mu"),f=a("fr"),b=a("oV"),e=a("oW");return{ID: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.fb=this.zb=null;this.jha=!1;this.xK=this.kh=this.rm=this.Ma=this.Fq=this.ha=null},nJ:function(){this.Yz()},Vi:function(g){this.T2a();this.RR();this.bS(g)},T2a:function(){this.R("scriptObject","video","level")&&(this.Yz(),this.zb=this.get("video"),this.fb=this.get("level"),this.v=this.get("scriptObject"),this.$N())},RR:function(){if(this.R("video","blending","chromaColor","chromaThreshold","chromaSmoothing","side")&&this.zb){var g=new m.ro(this.zb.Yi());g.oB=this.get("blending");g.mu=
this.get("chromaColor");g.ES=this.get("chromaThreshold");g.DS=this.get("chromaSmoothing");g.side=this.get("side");this.set("materialConfig",g)}},vm:function(){this.R("visible","composedAlpha","image","state")&&this.set("inView",this.get("visible")&&0<this.get("composedAlpha"));this.R("composedAlpha","meshGroup","inView")&&k.gf(this.get("meshGroup"),this.get("inView")?this.get("composedAlpha"):0)},bS:function(g){var n=!!this.kh&&this.kh.isEmpty(),q=this.ha&&this.ha.b3(),p=!!q&&q.isEmpty();p&&!n&&this.ha.getState()==
l.PLAYING&&this.v.get("loop")&&(q=this.kh,p=!1);this.set("frameEmpty",p);this.uga();this.xK.tla(0<g.Kj);!this.kh||q&&!this.kh.isEqual(q)?(this.kh=q,(g=this.kh.kt)&&"VIDEO"==g.tagName&&(g.width=this.get("contentWidth"),g.height=this.get("contentHeight")),this.xK.Rm(g),this.xK.update(),this.Ga()):this.ha.getState()==l.PLAYING&&this.Ga()},uga:function(){var g=this.ha.getCurrentTime(),n=this.ha.ui();this.get("frameEmpty")?this.set("hasStableContent",!1):g>this.JX+.1?this.set("hasStableContent",!0):0==
g&&this.dca>n-.5?this.set("hasStableContent",!0):this.set("hasStableContent",!1);this.R("frameEmpty")&&!this.get("frameEmpty")&&(this.JX=g);!this.get("frameEmpty")&&0<g&&(this.dca=g)},$N:function(){this.zb&&this.fb&&this.v&&(this.set("textureSource",this.xK=new f),this.xK.GU(!0),this.set("contentWidth",this.fb.get("width")),this.set("contentHeight",this.fb.get("height")),this.set("alpha",0),this.ha=new e(this.Ha.Ap(),this.zb),this.ha.D$a(),this.Fq=new c(this.v,this.ha),this.Ma=new h(this.Ha.Ap(),
this.v,this.ha),this.rm=new b(this.Ha.Yc.get("panorama"),this.ha),this.Iv(),this.trigger(d.jd),this.trigger(d.ea))},Yz:function(){this.ha&&(this.set("textureSource",this.xK=null),this.ox(),this.Ma.clear(),this.Ma=null,this.Fq.clear(),this.Fq=null,this.rm.clear(),this.rm=null,this.ha.clear(),this.kh=this.ha=null,this.set("frameEmpty",!0),this.set("hasStableContent",!1),this.fb=this.zb=null)},Iv:function(){this.ha.bind(e.Wf,this.mf,this,!0);this.ha.bind(d.Ae,this.Li,this,!0)},ox:function(){this.ha.unbind(e.Wf,
this.mf,this,!0);this.ha.unbind(d.Ae,this.Li,this,!0)},Li:function(){this.Ga()},mf:function(){this.Ga()}}});
define("pc",["require","lh","on"],function(a){var d=a("lh"),l=a("on");return{Eo:function(){this.set("playbackPositions",null);this.set("distance",void 0);this.ee=this.ee.bind(this);this.xb=new l},Zo:function(){d.da(this.v,["playbackPositions","distance"],this.ee,!0)},ap:function(){d.ca(this.v,["playbackPositions","distance"],this.ee)},ee:function(){this.set("distance",this.v.get("distance"));this.set("playbackPositions",this.v.get("playbackPositions"))},yf:function(){this.R("playbackPositions","currentTime")&&
(this.xb.gC(this.get("playbackPositions")),this.xb.fC(this.get("currentTime")),this.set("vertices",this.xb.Via()),this.set("alpha",this.xb.kl()));this.R("video","image","vertices","distance")&&this.rb().forEach(function(m){m.set("vertices",this.get("vertices"));m.set("distance",this.get("distance"))}.bind(this))}}});
define("kM","require lV fm c ed hu hc pc".split(" "),function(a){var d=a("lV"),l=a("fm"),m=a("c"),k=a("ed"),c=a("hu"),h=a("hc");a=a("pc");var f=d.extend(m,k,c,function(){m.call(this);this.set("tag","QuadVideoHotspotImage")}),b=d.extend(m,k,h,function(){m.call(this);this.set("tag","QuadVideoHotspotVideo")});return d.extend(l,a,function(e){l.call(this,e);this.gE=f;this.iha=b})});
define("ls","require lV lh lx kF oq w".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("lx"),k=a("kF"),c=a("oq"),h=a("w");a=d.extend(k,function(f){k.call(this);this.v=f;this.Nk=this.Nk.bind(this);this.Ok=this.Ok.bind(this);this.dn()});a.prototype.Zb=function(){k.prototype.Zb.call(this);this.v.set("state",this.v.get("startState"));l.da(this.v,"color speed intensity size opacity maxDistance farPlaneDistance particleCount farPlaneParticleCount".split(" "),this.Nk,!0);l.da(this.v,["state"],this.Ok,
!0)};a.prototype.ac=function(){l.ca(this.v,"color speed intensity size opacity maxDistance farPlaneDistance particleCount farPlaneParticleCount".split(" "),this.Nk);l.ca(this.v,["state"],this.Ok);this.v.set("state",m.U);k.prototype.ac.call(this)};a.prototype.Nk=function(){this.dn();this.RQ()};a.prototype.Ok=function(){this.H_=this.v.get("state");this.Ga()};a.prototype.dn=function(){k.prototype.dn.call(this);if(h.Ef()){this.RD=this.tt=4;this.OE=2400;this.SD=1200;var f=1.5;var b=1.6}else this.tt=2,
this.RD=4,this.OE=4800,this.SD=2400,b=f=1;var e=this.v.get("intensity",.5);this.Jc=c.ks(this.v.get("color","#ffffff"));this.tQ=.24*this.v.get("opacity",.25)+.01;this.tQ*=2;this.MA=(e*(.37-.17)+.17)*f;f=(this.v.get("speed",.5)*(.09-.02)+.02)/this.MA*b;this.tP=.9*f;this.xE=1.1*f;this.OE=Math.round(this.v.get("particleCount",this.OE)*e);this.SD=Math.round(this.v.get("farPlaneParticleCount",this.SD)*e);this.cZ=0;this.Tq=2;this.ut=-2;this.vca=0;this.wN=.75;this.eO=.5;this.vY=this.v.get("initialState");
this.M0=this.v.get("startDuration");this.S0=this.v.get("stopDuration");this.tt=this.v.get("maxDistance",this.tt);this.RD=this.v.get("farPlaneDistance",this.RD);this.iB()};a.prototype.lX=function(){var f=new THREE.MeshBasicMaterial;f.color=new THREE.Color(this.Jc[0]/255,this.Jc[1]/255,this.Jc[2]/255);f.side=THREE.FrontSide;f.transparent=!0;f.depthTest=!1;f.needsUpdate=!0;this.WD||(this.WD=new THREE.BoxGeometry(.01,.2,.01));return new THREE.Mesh(this.WD,f)};a.prototype.iB=function(){var f=this.ug&&
this.ug.children||[],b=new THREE.Color(this.Jc[0]/255,this.Jc[1]/255,this.Jc[2]/255);f.forEach(function(e){e.material.color=b;e.material.needsUpdate=!0})};return a});
define("gN","require lV A pB cI jE".split(" "),function(a){var d=a("lV"),l=a("A"),m=a("pB"),k=a("cI"),c=a("jE"),h=d.extend(c,function(f,b,e,g){c.call(this);this.Vd=f;this.M=b;this.Yc=e;this.j=g;this.FP=new l;this.cfa(this);this.set("tag","Root");this.set("globalBlendingActive",0)});h.prototype.Ap=function(){return this.Vd};h.prototype.Df=function(f){return this.FP.get(f)};h.prototype.all=function(){for(var f=[],b=[this];0<b.length;){var e=b.pop();f.push(e);for(var g=e.$d.length-1;0<=g;g--)b.push(e.$d[g])}return f};
h.prototype.update=function(f){var b=this.all(),e=b.length,g;for(g=0;g<e;g++)b[g].nQa();for(g=0;g<e;g++)b[g].set("index",g);for(g=0;g<e;g++)b[g].Ha&&b[g].oa(f);for(g=0;g<e;g++)b[g].eQa();if(this.tY){for(g=0;g<e;g++)b[g].jQa();this.update(f)}};h.prototype.Ga=function(){this.zg||this.trigger(new k(m.ba));c.prototype.Ga.call(this)};h.prototype.hy=function(f){return Array.isArray(f)?f.map(this.hy.bind(this)):this.FP.get(f)||h.t5a.create(f)};return h});
define("gq","require lV lh lx kF w".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("lx"),k=a("kF"),c=a("w");a=d.extend(k,function(f){k.call(this);this.v=f;this.Nk=this.Nk.bind(this);this.Ok=this.Ok.bind(this);this.dn()});a.prototype.Zb=function(){k.prototype.Zb.call(this);this.v.set("state",this.v.get("startState"));l.da(this.v,["intensity","speed"],this.Nk,!0);l.da(this.v,["state"],this.Ok,!0)};a.prototype.ac=function(){l.ca(this.v,["intensity","speed"],this.Nk);l.ca(this.v,["state"],this.Ok);
this.v.set("state",m.U);k.prototype.ac.call(this)};a.prototype.Nk=function(){this.dn();this.RQ()};a.prototype.Ok=function(){this.H_=this.v.get("state");this.Ga()};a.prototype.dn=function(){k.prototype.dn.call(this);var f=this.v.get("intensity"),b=this.v.get("speed");if(c.pb()||c.browser()==c.Fs){var e=1E3;var g=350;var n=1800;var q=400;var p=.8;var r=1.2}else c.Ef()?(e=1500,g=500,n=2500,q=500,p=.8,r=1.2):(e=3E3,g=1E3,n=5E3,q=1E3,p=.6,r=1);this.vY=this.v.get("initialState");this.M0=this.v.get("startDuration");
this.S0=this.v.get("stopDuration");this.wN=.75;this.eO=.5;this.tt=4;this.ut=-2;this.Tq=3;this.cZ=35;this.RD=7;this.MA=(p+f*(r-p))/h;this.tP=this.xE=.15+1.35*b;this.OE=g+f*(e-g);this.SD=q+f*(n-q)};a.prototype.lX=function(){return new THREE.Sprite(this.aw())};a.prototype.aw=function(){var f=new THREE.SpriteMaterial;f.map=this.Dq();f.side=THREE.FrontSide;f.transparent=!0;f.depthTest=!1;f.needsUpdate=!0;return f};a.prototype.Dq=function(){if(this.Ia)return this.Ia;var f=document.createElement("canvas");
f.width=f.height=h;var b=f.getContext("2d"),e=b.createRadialGradient(.5*f.width,.5*f.height,.2*f.height,.5*f.width,.5*f.height,.5*f.height);e.addColorStop(0,"rgba(255, 255, 255, 0.8)");e.addColorStop(1,"rgba(255, 255, 255, 0)");b.fillStyle=e;b.fillRect(0,0,f.width,f.height);this.Ia=new THREE.Texture;this.Ia.colorSpace=THREE.SRGBColorSpace;this.Ia.image=f;this.Ia.needsUpdate=!0;return this.Ia};var h=32;return a});
define("dg",["require","jJ","w"],function(a){var d=a("jJ"),l=a("w"),m=new THREE.Matrix4,k=Math.PI/180;return{$v: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.Ih=new THREE.Matrix4;this.Td=new THREE.Matrix4;this.$o=new THREE.Matrix4;this.mn=new THREE.Matrix4;this.wj=new THREE.Matrix4;this.om=new THREE.Matrix4;this.Wq=new THREE.Matrix4},
F9:function(){var c=l.zd()==l.yi||l.browser()==l.Fs?new THREE.CSS3DRectangle:new THREE.CSS3DObject;c.matrixAutoUpdate=!1;return c},Lx:function(c){if(this.R("contentWidth","contentHeight")){var h=this.get("cssObject");h.contentWidth=this.get("contentWidth");h.contentHeight=this.get("contentHeight");h.updateVertices()}h=!1;this.R("composedTranslationX","composedTranslationY","composedTranslationZ")&&(this.Ih.makeTranslation(.5*-this.get("composedTranslationX")*d.Hg,.5*this.get("composedTranslationY")*
d.Hg,.5*this.get("composedTranslationZ")*d.Hg),h=!0);this.R("composedDeltaYaw","composedDeltaPitch","composedDeltaRoll")&&(this.Td.makeRotationY(-c.Ra*k),this.Td.multiply(m.makeRotationX(-this.get("composedDeltaPitch")*k)),this.Td.multiply(m.makeRotationY(this.get("composedDeltaYaw")*k)),this.Td.multiply(m.makeRotationY(c.Ra*k)),h=!0);this.R("yaw","pitch")&&(this.$o.makeRotationY(-this.get("yaw")*k),this.$o.multiply(m.makeRotationX(this.get("pitch")*k)),h=!0);if(this.R("flipHorizontally","hfov","vfov",
"composedTranslationX","composedTranslationY","composedTranslationZ")){h=this.get("contentWidth");var f=this.get("contentHeight"),b=this.get("hfov"),e=this.get("vfov");this.mn.makeTranslation(0,0,-(h/(2*Math.tan(b*k*.5))));var g=(this.get("flipHorizontally")?-1:1)*this.get("scale"),n=this.get("scale");e&&(n*=h*Math.tan(e*k*.5)/(f*Math.tan(b*k*.5)));this.om.makeScale(g,n,1);h=!0}this.R("rotationX","rotationY","rotationZ","roll")&&(this.wj.makeRotationZ(this.get("roll")*k),this.wj.multiply(m.makeRotationY(this.get("rotationY")*
k)),this.wj.multiply(m.makeRotationX(this.get("rotationX")*k)),this.wj.multiply(m.makeRotationZ(this.get("rotationZ")*k)),h=!0);if(h||this.R("meshGroup"))this.Wq.copy(this.Ih),this.Wq.multiply(this.Td),this.Wq.multiply(this.$o),this.Wq.multiply(this.mn),this.Wq.multiply(this.wj),this.Wq.multiply(this.om),this.get("cssObject").matrix.copy(this.Wq),this.get("cssObject").matrixWorldNeedsUpdate=!0;this.set("cameraYaw",c.Ra);this.set("cameraPitch",c.pitch);this.set("cameraRoll",c.Fg);this.set("cameraHfov",
c.We);this.set("cameraWidth",c.width);this.set("cameraHeight",c.height);c.camera&&(h||this.R("cameraYaw","cameraPitch","cameraRoll","cameraHfov","cameraWidth","cameraHeight"))&&(this.get("cssObject").projectVertices(c.camera),this.set("geometryVisible",this.get("cssObject").isVisible),this.R("geometryVisible")&&this.Eea())}}});
define("mR",["require","lh","on"],function(a){var d=a("lh"),l=a("on");return{Eo:function(){this.set("playbackPositions",null);this.ee=this.ee.bind(this);this.xb=new l},Zo:function(){d.da(this.v,["playbackPositions","width","height"],this.ee,!0)},ap:function(){d.ca(this.v,["playbackPositions","width","height"],this.ee)},ee:function(){this.set("playbackPositions",this.v.get("playbackPositions"));this.set("contentWidth",this.v.get("width"));this.set("contentHeight",this.v.get("height"))},yf:function(){this.R("playbackPositions",
"currentTime")&&(this.xb.gC(this.get("playbackPositions")),this.xb.fC(this.get("currentTime")),this.set("yaw",this.xb.get("yaw")),this.set("pitch",this.xb.get("pitch")),this.set("roll",this.xb.get("roll")),this.set("rotationX",this.xb.get("rotationX")),this.set("rotationY",this.xb.get("rotationY")),this.set("hfov",this.xb.get("hfov")),this.set("vfov",this.xb.get("vfov")));this.R("framePlane","holePlane","imagePlane","yaw","pitch","roll","rotationX","rotationY","hfov","vfov","contentWidth","contentHeight")&&
this.rb().forEach(function(m){m.set("yaw",this.get("yaw"));m.set("pitch",this.get("pitch"));m.set("roll",this.get("roll"));m.set("rotationX",this.get("rotationX"));m.set("rotationY",this.get("rotationY"));m.set("hfov",this.get("hfov"));m.set("vfov",this.get("vfov"));m.set("contentWidth",this.get("contentWidth"));m.set("contentHeight",this.get("contentHeight"))}.bind(this))}}});
define("nq","require lV cb gh c dg oN cz hu lc mR".split(" "),function(a){var d=a("lV"),l=a("cb"),m=a("gh"),k=a("c"),c=a("dg"),h=a("oN"),f=a("cz"),b=a("hu"),e=a("lc");a=a("mR");var g=d.extend(k,h,b,function(){k.call(this);this.set("tag","RectangleFrameHotspotImage")}),n=d.extend(m,c,f,function(){m.call(this);this.set("tag","RectangleFrameHotspotFrame")}),q=d.extend(k,h,e,function(){k.call(this);this.set("tag","RectangleFrameHotspotHole")});return d.extend(l,a,function(p){l.call(this,p);this.gE=g;
this.aaa=n;this.fba=q})});
define("oQ",["require","lh","on"],function(a){var d=a("lh"),l=a("on");return{Eo:function(){this.set("playbackPositions",null);this.set("scaleMode",void 0);this.set("distance",void 0);this.ee=this.ee.bind(this);this.xb=new l},Zo:function(){d.da(this.v,["playbackPositions","distance","scaleMode"],this.ee,!0)},ap:function(){d.ca(this.v,["playbackPositions","distance","scaleMode"],this.ee)},ee:function(){this.set("scaleMode",this.v.get("scaleMode"));this.set("distance",this.v.get("distance"));this.set("playbackPositions",
this.v.get("playbackPositions"))},yf:function(){this.R("playbackPositions","currentTime")&&(this.xb.gC(this.get("playbackPositions")),this.xb.fC(this.get("currentTime")),this.set("yaw",this.xb.get("yaw")),this.set("pitch",this.xb.get("pitch")),this.set("roll",this.xb.get("roll")),this.set("rotationX",this.xb.get("rotationX")),this.set("rotationY",this.xb.get("rotationY")),this.set("hfov",this.xb.get("hfov")),this.set("vfov",this.xb.get("vfov")),this.set("alpha",this.xb.kl()));this.R("video","image",
"yaw","pitch","roll","rotationX","rotationY","hfov","vfov","distance","scaleMode","image","video")&&this.rb().forEach(function(m){m.set("yaw",this.get("yaw"));m.set("pitch",this.get("pitch"));m.set("roll",this.get("roll"));m.set("rotationX",this.get("rotationX"));m.set("rotationY",this.get("rotationY"));m.set("hfov",this.get("hfov"));m.set("vfov",this.get("vfov"));m.set("scaleMode",this.get("scaleMode"));m.set("distance",this.get("distance"))}.bind(this))}}});
define("pE","require lV fm c oN hu hc oQ".split(" "),function(a){var d=a("lV"),l=a("fm"),m=a("c"),k=a("oN"),c=a("hu"),h=a("hc");a=a("oQ");var f=d.extend(m,k,c,function(){m.call(this);this.set("tag","RectangleVideoHotspotImage")}),b=d.extend(m,k,h,function(){m.call(this);this.set("tag","RectangleVideoHotspotVideo")});return d.extend(l,a,function(e){l.call(this,e);this.gE=f;this.iha=b})});
define("ee","require fq jE ih jm kq mS fj oa gy Y oH dW bK kh jL kM ls gN gq nq pE ch".split(" "),function(a){function d(D,F){Array.isArray(F)||(F=[F]);for(var A=0;A<F.length;A++)if(l.Ja(F[A],D))return!0;return!1}var l=a("fq"),m=a("jE"),k=a("ih"),c=a("jm"),h=a("kq"),f=a("mS"),b=a("fj"),e=a("oa"),g=a("gy"),n=a("Y"),q=a("oH"),p=a("dW"),r=a("bK"),t=a("kh"),u=a("jL"),v=a("kM"),w=a("ls"),x=a("gN"),y=a("gq"),z=a("nq"),B=a("pE");a("ch");a={};x.t5a=a;a.create=function(D){if(D instanceof m)return D;if(d(D,
["HDRPanorama","LivePanorama","Panorama","VideoPanorama"]))return new n(D);if(d(D,["CubicPanoramaFrame","SphericPanoramaFrame"]))return d(D,"SphericPanoramaFrame")&&D.Hm()?new p(D):new q(D);if(d(D,["DustPanoramaOverlay"]))return new c(D);if(d(D,"HotspotPanoramaOverlay"))return new f(D);if(d(D,["HotspotPanoramaOverlayImage","HotspotPanoramaOverlayMap"]))return new b(D);if(d(D,"Menu"))return new g(D);if(d(D,["CeilingCapPanoramaOverlay","TripodCapPanoramaOverlay"]))return new k(D);if(d(D,["FlatHotspotPanoramaOverlayImage",
"FlatHotspotPanoramaOverlayMap"]))return new h(D);if(d(D,["LensFlarePanoramaOverlay"]))return new e(D);if(d(D,["RainPanoramaOverlay"]))return new w(D);if(d(D,["SnowPanoramaOverlay"]))return new y(D);if(d(D,["PopupPanoramaOverlay"]))return new r(D);if(d(D,["QuadFramePanoramaOverlay"]))return new t(D);if(d(D,["QuadHotspotPanoramaOverlayImage","QuadHotspotPanoramaOverlayMap"]))return new u(D);if(d(D,["QuadVideoPanoramaOverlay"]))return new v(D);if(d(D,["FramePanoramaOverlay"]))return new z(D);if(d(D,
["VideoPanoramaOverlay"]))return new B(D);throw"Invalid script object";};return a});
define("cs",["require","exports","three.mod"],function(a,d,l){return function(){function m(){}m.$Da=function(k,c,h,f,b,e){return m.P5a(k,c/f*2-1,2*-(h/b)+1,e)};m.P5a=function(k,c,h,f){f||(f=new l.Ray);f.origin.setFromMatrixPosition(k.matrixWorld);f.direction.set(c,h,.5).unproject(k).sub(f.origin).normalize();return f};m.g6a=function(k,c){c||(c=new l.Ray);c.origin.set(0,0,0);c.direction.set(0,0,-1).applyQuaternion(k.quaternion);return c};m.f6a=function(k,c){c||(c=new l.Ray);c.origin.set(0,0,0).applyMatrix4(k);
c.direction.set(0,0,-1).applyMatrix4(k).sub(c.origin).normalize();return c};return m}()});
define("mm","require lV eB kc mt fr kQ".split(" "),function(a){var d=a("lV"),l=a("eB"),m=a("kc"),k=a("mt"),c=a("fr"),h=a("kQ");a=d.extend(m,function(){m.call(this);this.T=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.Yo=null});a.prototype.oa=function(f){this.Dr(f);this.yg(f);this.yf(f);m.prototype.oa.call(this,f)};a.prototype.Dr=function(f){f.ob&&!this.Yo&&h.getType()==h.Cv.zl&&this.qh([this.Yo=
new m])};a.prototype.yg=function(f){this.T||(this.set("textureSource",new c),this.T=new k(this.Ha.M.bja()),this.get("textureSource").Rm(this.T.eg()),this.set("contentWidth",this.T.Fe()),this.set("contentHeight",this.T.Ve()),this.set("hfov",6),this.set("distance",this.Ha.M.get("vrPointerDistance")));this.R("changing")&&this.T.Fy(f.ob&&this.get("changing"));this.R("over","overProgress")&&this.T.WG(this.get("over"),this.get("overProgress"));this.T.update(f.Ue)&&this.get("textureSource").update();this.get("changing")&&
this.Ga()};a.prototype.yf=function(){this.Kh()};a.prototype.vm=function(){this.R("composedAlpha","meshGroup","visible")&&this.zz()};a.prototype.zz=function(){l.gf(this.get("meshGroup"),this.get("visible")?this.get("composedAlpha"):0)};return a});
define("br","require jquery.mod er pB w qb ec".split(" "),function(a){function d(b){this.mb=b;this.Pza=this.mb.No;this.mb.bind(k.Pb,this.Pf,this);this.xa=l("<span></span>");this.xa.css({"pointer-events":"none",position:"absolute","z-index":c.jNa,"text-align":"center",display:"none"});this.te=l("<span></span>");this.te.css({position:"absolute",left:0,top:0,right:0,bottom:0});this.xa.append(this.te);this.b1=l("<span></span>");this.b1.css({position:"relative"});this.xa.append(this.b1);this.yj=this.xY=
this.Zg=null;this.bx=this.ax=void 0;this.Aw=!1;this.Qza=void 0}var l=a("jquery.mod"),m=a("er"),k=a("pB");a("w");var c=a("qb"),h=a("ec"),f={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};d.prototype.hd=function(){return this.xa};d.prototype.PG=function(b){if(!this.Pza){for(;b&&
b.get("toolTipDisabled");)b=b.getParent();this.hide();this.Zg&&m(m(f).keys()).each(function(e){this.Zg.unbind(k.G(e),this.fda,this)},this);if(this.Zg=b)m(m(f).keys()).each(function(e){this.Zg.bind(k.G(e),this.fda,this)},this),this.fda()}};d.prototype.Cbb=function(b,e){this.Zg=b;this.Qza=e;this.FY()||(this.Aw?this.eza():this.xR())};d.prototype.cza=function(b,e,g){this.Aw&&this.Zg.trigger(k.ioa);this.J1a(b);this.b1.html(this.uUa(e));this.gqa=g;this.yf();this.Zg.trigger(k.iNa);this.Aw=!0;this.xa.css("display",
"inline");(g||b.get("checkToolTipOcclusion"))&&this.a0a(b)};d.prototype.yf=function(){var b=this.Lq(),e=b.x;b=b.y;var g=this.xa.outerWidth(),n=this.xa.outerHeight();if(this.gqa){e-=.5*this.xa.width();var q=this.Zg.get("toolTipCenteredOffsetY");b=void 0===q?b-.5*this.xa.height():0<q?b+q:b-(this.xa.height()-q)}e=Math.max(Math.min(e,this.mb.Wa()-g-3),3);b=Math.max(Math.min(b,this.mb.Ab()-n-3),3);this.xa.css("left",e+"px");this.xa.css("top",b+"px")};d.prototype.Lq=function(){var b={};if(this.gqa){var e=
this.Zg.hd().offset();b.x=e.left+.5*this.Zg.Wa();b.y=e.top+.5*this.Zg.Ab()}else b.x=this.ax,b.y=this.bx+25;return b};d.prototype.hide=function(){this.DD();this.tza();this.Aw&&(this.xa.css("display","none"),this.Zg.trigger(k.ioa),this.Aw=!1)};d.prototype.fda=function(){this.Zg.get("toolTip")?this.FY()||(this.Aw?this.dza():this.xR()):this.FY()?this.DD():this.Aw&&this.hide()};d.prototype.Pf=function(b){this.ax=b.pageX;this.bx=b.pageY;this.Aw&&this.Zg.get("toolTipFollowMouse")&&this.yf()};d.prototype.dza=
function(){this.cza(this.Zg,this.Zg.get("toolTip"),this.Zg.get("toolTipCentered"))};d.prototype.eza=function(){this.cza(this.Zg,this.Qza,!0)};d.prototype.FY=function(){return null!=this.yj};d.prototype.xR=function(){var b=this.Zg&&this.Zg.get("toolTipDisplayTime");if(void 0===b||null===b)b=f.toolTipDisplayTime;this.DD();this.yj=setTimeout(function(){this.yj=null;this.Pza?this.eza():this.dza()}.bind(this),b)};d.prototype.DD=function(){this.FY()&&(clearTimeout(this.yj),this.yj=null)};d.prototype.a0a=
function(b){var e=this.Lq();this.tza();var g=function(){this.xa.css("display",this.Aw&&!this.AVa(b,e.x,e.y)?"inline":"none")}.bind(this);this.xY=setInterval(g,300);g()};d.prototype.tza=function(){this.xY&&(clearInterval(this.xY),this.xY=null)};d.prototype.J1a=function(b){function e(p){var r=b.get(p);return void 0===r?f[p]:r}var g={};g.opacity=e("toolTipOpacity");g.filter=g["-ms-filter"]="alpha(opacity="+Math.round(100*e("toolTipOpacity"))+")";g.paddingTop=e("toolTipPaddingTop")+"px";g.paddingBottom=
e("toolTipPaddingBottom")+"px";g.paddingLeft=e("toolTipPaddingLeft")+"px";g.paddingRight=e("toolTipPaddingRight")+"px";g["text-align"]=e("toolTipHorizontalAlign");this.xa.css(g);g={};g.opacity=e("toolTipBackgroundOpacity");g.filter=g["-ms-filter"]="alpha(opacity="+Math.round(100*e("toolTipBackgroundOpacity"))+")";g["background-color"]=e("toolTipBackgroundColor");g.border=[e("toolTipBorderSize")+"px","solid",e("toolTipBorderColor")].join(" ");var n=e("toolTipShadowColor");g["-moz-box-shadow"]=g["-webkit-box-shadow"]=
g["box-shadow"]=[e("toolTipShadowHorizontalLength")+"px",e("toolTipShadowVerticalLength")+"px",e("toolTipShadowBlurRadius")+"px",e("toolTipShadowSpread")+"px","rgba("+parseInt("0x"+n.substr(1,2))+", "+parseInt("0x"+n.substr(3,2))+", "+parseInt("0x"+n.substr(5,2))+", "+e("toolTipShadowOpacity")+")"].join(" ");g["-moz-border-radius"]=g["-webkit-border-radius"]=g.borderRadius=e("toolTipBorderRadius")+"px";this.te.css(g);g={};g["font-family"]=h.$x(e("toolTipFontFamily"));n=e("toolTipFontSize");m(n).isNumber()?
n+="px":m(n).isString()||(n="");g["font-size"]=n;g["font-weight"]=e("toolTipFontWeight");g["font-style"]=e("toolTipFontStyle");g.color=e("toolTipFontColor");n=e("toolTipTextShadowColor");g["-moz-text-shadow"]=g["-webkit-text-shadow"]=g["text-shadow"]=[e("toolTipTextShadowHorizontalLength")+"px",e("toolTipTextShadowVerticalLength")+"px",e("toolTipTextShadowBlurRadius")+"px","rgba("+parseInt("0x"+n.substr(1,2))+", "+parseInt("0x"+n.substr(3,2))+", "+parseInt("0x"+n.substr(5,2))+", "+e("toolTipTextShadowOpacity")+
")"].join(" ");var q=0==e("toolTipTextShadowVerticalLength")&&0==e("toolTipTextShadowHorizontalLength")?135:45*Math.round(4*Math.atan2("toolTipTextShadowHorizontalLength",-e("toolTipTextShadowVerticalLength"))/Math.PI);g.filter="progid:DXImageTransform.Microsoft.Shadow(color=#"+function(p){for(p=p.toString(16);2>p.length;)p="0"+p;return p}(255*e("toolTipTextShadowOpacity"))+n.substr(1,6)+",direction="+q+")";this.b1.css(g)};d.prototype.AVa=function(b,e,g){e=document.elementsFromPoint(e,g);b=b.hd()[0];
g=this.mb.hd()[0];for(var n=0;n<e.length;n++){var q=e[n];if(b==q||b.contains(q))break;if(!this.xa[0].contains(q)&&g.contains(q)){var p=window.getComputedStyle(q);if("none"!=p.display&&"hidden"!=p.visibility&&.29<("CANVAS"==q.tagName?1:this.uQa(p.backgroundColor))*p.opacity)return!0}}return!1};d.prototype.uQa=function(b){if(!b)return 0;b=b.toLowerCase();var e=b.match(/rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(\d*\.?\d*)\s*\)/);return e?parseFloat(e[1]):b.match(/transparent/)?0:1};d.prototype.uUa=function(b){b=
(b||"").split("\n");for(var e=0;e<b.length;e++)b[e]=this.kSa(b[e]);return b.map(function(g){return"<div>"+g+"</div>"})};d.prototype.kSa=function(b){d.Zoa.nodeValue=b;(b=d.Voa.innerHTML)||(b="&nbsp;");return b};d.ILa=f;d.Voa=document.createElement("pre");d.Zoa=document.createTextNode("");d.Voa.appendChild(d.Zoa);return d});
define("db",["require","br","bZ","ec"],function(a){function d(h,f){this.M=h;this.tm=f;this.S_a()}var l=a("br"),m=a("bZ"),k=a("ec"),c=180/Math.PI;d.prototype.eg=function(){return this.T};d.prototype.Fe=function(){return this.T.width};d.prototype.Ve=function(){return this.T.height};d.prototype.Ee=function(){return 2*Math.atan2(this.T.width/3*.5,600)*c};d.prototype.S_a=function(){this.T=document.createElement("canvas");var h=this.tm.split("\n"),f=this.bh("toolTipBackgroundColor"),b=this.bh("toolTipBackgroundOpacity"),
e=this.bh("toolTipBorderRadius"),g=this.bh("toolTipBorderColor"),n=this.bh("toolTipBorderSize");this.bh("toolTipDisplayTime");var q=this.bh("toolTipFontFamily"),p=this.bh("toolTipFontSize"),r=this.bh("toolTipFontColor"),t=this.bh("toolTipFontWeight"),u=this.bh("toolTipFontStyle"),v=this.bh("toolTipPaddingBottom"),w=this.bh("toolTipPaddingLeft"),x=this.bh("toolTipPaddingTop"),y=this.bh("toolTipPaddingRight"),z=this.bh("toolTipOpacity"),B=this.bh("toolTipTextShadowBlurRadius"),D=this.bh("toolTipTextShadowColor"),
F=this.bh("toolTipTextShadowHorizontalLength"),A=this.bh("toolTipTextShadowVerticalLength"),E=this.bh("toolTipTextShadowOpacity");isNaN(p)&&(p=12);e=Math.round(3*e);n=Math.round(3*n);p=Math.round(3*p);v=Math.round(3*v);w=Math.round(3*w);x=Math.round(3*x);y=Math.round(3*y);B=Math.round(3*B);F=Math.round(3*F);A=Math.round(3*A);var J=new m.L7;J.fontFamily=q;J.fontSize=Math.round(p)+"px";J.fontWeight=t;J.fontStyle=u;this.T=document.createElement("canvas");var C=this.T.getContext("2d"),L=h.map(function(W){return m(W,
J,C)}),T=0,S=0;L.forEach(function(W){T=Math.max(W.width,T);S+=W.height});var U=1<h.length?S/h.length*.25:0;S+=(h.length-1)*U;y=n+w+T+y+n;v=n+x+S+v+n;this.T.width=this.T.height=Math.max(256,Math.max(128,Math.pow(2,Math.ceil(Math.log(Math.max(y,v))/Math.LN2))));C=this.T.getContext("2d");var X=.5*(this.T.width-y),K=.5*(this.T.height-v);C.save();C.translate(X,K);C.globalAlpha=z;C.strokeStyle=g;C.fillStyle="transparent"===f?"rgba(0,0,0,0)":this.kpa(b,f);C.lineWidth=n;C.beginPath();C.moveTo(e,0);C.lineTo(y-
e,0);C.quadraticCurveTo(y,0,y,e);C.lineTo(y,v-e);C.quadraticCurveTo(y,v,y-e,v);C.lineTo(e,v);C.quadraticCurveTo(0,v,0,v-e);C.lineTo(0,e);C.quadraticCurveTo(0,0,e,0);C.closePath();C.fill();0<n&&C.stroke();C.fillStyle=r;C.font=t+" "+("normal"!=u?u+" ":"")+p+(isNaN(p)?"":"px")+" "+k.$x(q);C.shadowColor=this.kpa(E,D);C.shadowOffsetX=F;C.shadowOffsetY=A;C.shadowBlur=B;C.textBaseline="middle";C.textAlign="center";var N=n+w+.5*T,V=n+x;h.forEach(function(W,aa){C.fillText(W,Math.round(N),Math.round(V+.5*L[aa].height));
V+=L[aa].height+U})};d.prototype.bh=function(h){var f=this.M.get(h);return void 0===f?l.ILa[h]:f};d.prototype.kpa=function(h,f){return"rgba("+parseInt("0x"+f.substr(1,2))+", "+parseInt("0x"+f.substr(3,2))+", "+parseInt("0x"+f.substr(5,2))+", "+h+")"};return d});
define("pv","require lV jJ kc db fr kQ".split(" "),function(a){var d=a("lV"),l=a("jJ"),m=a("kc"),k=a("db"),c=a("fr"),h=a("kQ");a=d.extend(m,function(){m.call(this);this.T=null;this.set("tag","ToolTip");this.set("text","");this.wp=new THREE.Vector3(0,0,-l.Yr());this.Yo=null});a.prototype.oa=function(g){this.Dr(g);this.yg(g);m.prototype.oa.call(this,g)};a.prototype.Dr=function(g){g.ob&&!this.Yo&&h.getType()==h.Cv.zl&&this.qh([this.Yo=new m])};a.prototype.yg=function(g){if(!this.T||this.R("text")){this.get("textureSource")||
this.set("textureSource",new c);this.T=new k(this.Ha.M,this.get("text"));this.get("textureSource").Rm(this.T.eg());this.set("contentWidth",this.T.Fe());this.set("contentHeight",this.T.Ve());this.set("hfov",this.T.Ee());this.set("distance",this.Ha.M.get("vrPointerDistance"));var n=this.get("matrix"),q=this.get("intersectionYaw"),p=this.get("intersectionPitch");void 0!==q&&void 0!==p?(this.set("yaw",q),this.set("pitch",p+b),this.set("distance",this.get("intersectionDistance"))):n?(this.wp.applyMatrix4(n),
0==this.wp.x&&0==this.wp.z||this.set("yaw",f*Math.atan2(this.wp.x,-this.wp.z)),0==this.wp.y&&0==this.wp.z||this.set("pitch",f*Math.atan2(this.wp.y,Math.sqrt(this.wp.z*this.wp.z+this.wp.x*this.wp.x))+b)):(this.set("yaw",g.Ra),this.set("pitch",g.pitch+e))}};var f=180/Math.PI,b=2,e=5;return a});
define("oM",["require","exports","cs","W"],function(a,d,l,m){return function(){function k(c,h){this.pf=c;this.j=h}k.prototype.update=function(){};k.prototype.clear=function(){};k.prototype.getType=function(){return this.pf};k.prototype.MDa=function(c){return this.VX=(c=c.Gg&&m.getCamera(c.Gg))?l.g6a(c,this.VX):void 0};k.mN="webxr";k.S7="gaze";k.dW="gaze_click";k.poa="laser";k.kN="mouse";k.lN="touch";return k}()});
define("fx",["require","exports","oM","bi"],function(a,d,l,m){return function(){function k(c,h,f,b,e){void 0===e&&(e=!0);this.ge=c;this.pr=h;this.VX=f;this.vf=b;this.Ata=e;this.cqa=[];this.Pk=[];this.qR={};this.cba=[];this.$b="";this.dB=Number.MAX_VALUE}k.prototype.Pu=function(){return this.ge};k.prototype.qL=function(){return this.VX};k.prototype.Iu=function(){return this.ge.getType()==l.kN};k.prototype.xja=function(){return this.ge.getType()==l.mN};k.prototype.qG=function(){return this.ge.getType()==
l.lN};k.prototype.O7a=function(){return this.ge.getType()==l.S7};k.prototype.BBa=function(c,h){this.qR[h]=(this.qR[h]||[]).concat(c)};k.prototype.MJa=function(){return k.CLa.find(this.l7a.bind(this))};k.prototype.l7a=function(c){return void 0!==this.qR[c]&&0<this.qR[c].length?!0:!1};k.prototype.U5=function(){return 0<Object.keys(this.qR).length};k.prototype.KF=function(c){this.BBa(c,m.Le)};k.prototype.z3a=function(c){this.cba=this.cba.concat(c)};k.prototype.a5a=function(){return!this.MJa()&&0<this.cba.length};
k.prototype.kB=function(c){this.Pk=this.Pk.concat(c)};k.prototype.wi=function(){return 0<this.Pk.length};k.prototype.gl=function(c){c&&(void 0===this.o$||this.o$>c)&&(this.o$=c)};k.prototype.Gu=function(){return this.o$};k.prototype.Z1=function(c,h){if(""==this.$b||this.dB>h)this.$b=c,this.dB=h};k.prototype.Oy=function(){return this.$b};k.prototype.ws=function(c){this.cqa=void 0===c?[]:Array.isArray(c)?c:[c]};k.prototype.hl=function(){return 0<this.cqa.length};k.CLa=[m.Wh,m.una,m.hz,m.Le,m.Ke];return k}()});
define("cT","require lV pB bt cs W mm pv fx oM kQ".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("bt");a("cs");a("W");var k=a("mm"),c=a("pv"),h=a("fx"),f=a("oM"),b=a("kQ");a=d.extend(f,function(e,g){f.call(this,f.S7,e);this.hk=this.C=null;this.Pk=[];this.pd=this.Wv=!1;this.KO=null;this.cta=void 0;this.YQ=null;this.Twa=void 0;this.ve=new k;this.j.add(this.ve);this.rp="";this.$b=new c;this.$b.set("alpha",0);this.j.add(this.$b);this.Pea=g?this.j.M.get("vrPointerSelectionTime"):void 0;this.dta=this.j.M.get("vrGazePointerHideTime");
this.f1=this.f1.bind(this);this.Yl=this.Yl.bind(this);document.body.addEventListener("touchend",this.f1);document.addEventListener("keyup",this.Yl,!0);b.N.bind(l.nq,this.nBa,this,!0);this.vga();this.Qga()});a.prototype.clear=function(){document.body.removeEventListener("touchend",this.f1);document.removeEventListener("keyup",this.Yl,!0);b.N.unbind(l.nq,this.nBa,this,!0);this.Efa();this.j.remove(this.ve);this.ve=null;this.j.remove(this.$b);this.$b=null};a.prototype.update=function(e){this.C=e;this.XZa(e.Nr);
this.el()};a.prototype.f1=function(){this.rI()};a.prototype.Yl=function(e){e.code!=m.na.FV&&e.code!=m.na.NH||this.rI()};a.prototype.nBa=function(){this.rI()};a.prototype.rI=function(){var e=this.Fk(l.Xf);this.$k(e);this.kF(!1);this.ega()};a.prototype.ega=function(){this.j.Db().trigger(l.bD,{AM:l.Xf})};a.prototype.el=function(){var e=this.Fk(l.Fl);this.$k(e);this.xx(e.Oy());a:{var g=this.Pk;for(var n=e.Pk,q=0;q<g.length;q++)if(0>n.indexOf(g[q])){g=!1;break a}for(q=0;q<n.length;q++)if(0>g.indexOf(n[q])){g=
!1;break a}g=!0}g||(this.kF(!1),this.Pk=e.Pk,this.Pk.length&&this.kF(!0,e.U5()))};a.prototype.XZa=function(e){this.Wv!=e&&(this.Wv=e,this.ve.set("changing",this.Wv),this.vga(),this.Qga())};a.prototype.kF=function(e,g){this.pd!=e&&(this.pd=e,this.ve.set("over",this.pd&&g),this.vga(),this.Qga())};a.prototype.xx=function(e){this.rp!=e&&(this.rp=e,this.$b.set("text",this.rp),this.$b.set("alpha",this.rp?1:0),this.rp&&this.$b.Kh())};a.prototype.$k=function(e){this.j.mT().sort(function(g,n){return n.get("index")-
g.get("index")}).forEach(function(g){g.Qm(e)}.bind(this))};a.prototype.Fk=function(e){this.hk=this.MDa(this.C);return new h(this,this.hk?[this.hk]:[],this.hk,e)};a.prototype.Qga=function(){!this.pd||this.Wv||void 0===this.Pea?this.Efa():this.pd&&!this.YQ&&this.u0a()};a.prototype.vga=function(){this.pd||this.Wv||void 0===this.dta?(this.ve.set("alpha",1),this.xza()):1!=this.ve.get("alpha")||this.KO||this.g0a()};a.prototype.Efa=function(){this.YQ&&(clearInterval(this.YQ),this.YQ=null)};a.prototype.u0a=
function(){this.ve.set("overProgress",0);this.Twa=(new Date).getTime();this.YQ=setInterval(this.yXa.bind(this),100)};a.prototype.yXa=function(){var e=(new Date).getTime()-this.Twa;e>=this.Pea?(this.Efa(),this.rI()):this.ve.set("overProgress",e/this.Pea)};a.prototype.xza=function(){this.KO&&(clearInterval(this.KO),this.KO=null)};a.prototype.g0a=function(){this.cta=(new Date).getTime();this.KO=setInterval(this.RWa.bind(this),10)};a.prototype.RWa=function(){var e=this.dta-((new Date).getTime()-this.cta);
this.ve.set("alpha",Math.max(.01,Math.min(1,e/500)));0>=e&&this.xza()};return a});
define("lk","require lV jJ cD eB fr h oq".split(" "),function(a){var d=a("lV"),l=a("jJ"),m=a("cD"),k=a("eB"),c=a("fr"),h=a("h"),f=a("oq"),b=new THREE.Matrix4,e=Math.PI/180;a=d.extend(h,function(){h.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.mea=this.KQ=this.Jt=this.lea=null;new THREE.Matrix4;this.nea=new THREE.Matrix4;this.nea.multiply(b.makeRotationX(-90*
e));this.nea.multiply(b.makeTranslation(0,.5*g,0));this.BX=this.AX=this.zX=this.gw=this.s$=null;new THREE.Matrix4;this.t$=new THREE.Matrix4;this.UN=this.yX=this.r$=null;new THREE.Matrix4;this.HD=[new THREE.Matrix4,new THREE.Matrix4,new THREE.Matrix4];this.HD[0].multiply(b.makeRotationX(-90*e));this.HD[0].multiply(b.makeTranslation(0,.5*-q,0));this.HD[1].multiply(b.makeRotationX(-90*e));this.HD[1].multiply(b.makeTranslation(0,.5*-q,.5*-n));this.HD[2].multiply(b.makeRotationX(-90*e));this.HD[2].multiply(b.makeTranslation(0,
.5*-q,-n))});a.prototype.oa=function(p){h.prototype.oa.call(this,p);this.Sga();this.jB()};a.prototype.Sga=function(){this.R("visible")&&(this.get("meshGroup").visible=this.get("visible"));this.R("dotVisible")&&k.gf([this.AX,this.yX],this.get("dotVisible")?1:0)};a.prototype.jB=function(){this.R("over","pressed")&&(this.vAa(),this.PAa())};var g=.35,n=.012,q=.1;a.prototype.Do=function(){this.yX=k.create(new THREE.SphereGeometry(2.3,32,32),this.SQa());this.AX=k.create(new THREE.SphereGeometry(2,32,32),
this.TQa());this.mea=k.create(new THREE.CylinderGeometry(.003,.003,g,8),this.sRa());this.vI=[];this.vI.push(k.create(new THREE.CylinderGeometry(n,n,q,32),this.H9()));this.vI.push(k.create(new THREE.BoxGeometry(2*n,q,n),this.H9()));this.vI.push(k.create(new THREE.CylinderGeometry(n,n,q,32),this.H9()));return[this.yX,this.AX,this.mea].concat(this.vI)};a.prototype.SQa=function(){if(null==this.r$){var p=document.createElement("canvas");p.width=p.height=256;var r=p.getContext("2d"),t=new c;t.Rm(p);this.r$=
m.Qr(t.texture(),new m.ro);r.fillStyle="rgba(0, 0, 0, 0.75)";r.clearRect(0,0,p.width,p.height);r.fillRect(0,0,p.width,p.height)}return this.r$};a.prototype.TQa=function(){null==this.s$&&(this.gw=document.createElement("canvas"),this.gw.width=this.gw.height=256,this.zX=this.gw.getContext("2d"),this.BX=new c,this.BX.Rm(this.gw),this.s$=m.Qr(this.BX.texture(),new m.ro),this.vAa());return this.s$};a.prototype.vAa=function(){this.zX.fillStyle=this.laa();this.zX.clearRect(0,0,this.gw.width,this.gw.height);
this.zX.fillRect(0,0,this.gw.width,this.gw.height);this.BX.update()};a.prototype.sRa=function(){null==this.lea&&(this.Jt=document.createElement("canvas"),this.Jt.width=this.Jt.height=256,this.KQ=this.Jt.getContext("2d"),this.oea=new c,this.oea.Rm(this.Jt),this.lea=m.Qr(this.oea.texture(),new m.ro),this.PAa());return[this.lea]};a.prototype.PAa=function(){var p=f.ks(this.laa()).join(", "),r=this.KQ.createLinearGradient(0,0,0,this.Jt.height);r.addColorStop(0,"rgba("+p+", 0)");r.addColorStop(.5,"rgba("+
p+", 1)");r.addColorStop(1,"rgba("+p+", 1)");this.KQ.fillStyle=r;this.KQ.clearRect(0,0,this.Jt.width,this.Jt.height);this.KQ.fillRect(0,0,this.Jt.width,this.Jt.height);this.oea.update()};a.prototype.H9=function(){if(null==this.UN){var p=document.createElement("canvas");p.width=p.height=256;var r=p.getContext("2d"),t=new c;t.Rm(p);this.UN=m.Qr(t.texture(),new m.ro);r.fillStyle="rgba(64, 64, 64, 1)";r.clearRect(0,0,p.width,p.height);r.fillRect(0,0,p.width,p.height)}return[this.UN,this.UN,this.UN]};
a.prototype.Er=function(){var p=!1,r=!1,t=!1;if(this.R("intersectionDistance")){r=(r=this.get("intersectionDistance"))?l.yu(r):l.Yr();var u=r/l.Yr();this.t$.makeTranslation(0,0,-r);this.t$.multiply(b.makeScale(u,u,u));r=!0}this.R("matrix")&&(t=r=p=!0);r&&(b.identity(),(r=this.get("matrix"))&&b.multiply(r),b.multiply(this.t$),k.Pr(this.AX,b),k.Pr(this.yX,b));p&&(b.identity(),(r=this.get("matrix"))&&b.multiply(r),b.multiply(this.nea),k.Pr(this.mea,b));if(t)for(r=this.get("matrix"),p=0;p<this.vI.length;p++)b.identity(),
r&&b.multiply(r),b.multiply(this.HD[p]),k.Pr(this.vI[p],b)};a.prototype.DF=function(){if(this.R("index","meshGroup")){var p=this.get("meshGroup");p&&p.children.forEach(function(r){k.p5(r,this.get("index"))}.bind(this))}};a.prototype.laa=function(){return this.get("pressed")?this.Ha.M.get("vrPointerSelectionColor"):this.get("over")?this.Ha.M.get("vrPointerOverColor"):this.Ha.M.get("vrPointerColor")};return a});
define("ew","require lV pB cs lk mm pv fx oM hG kQ ok".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cs"),k=a("lk"),c=a("mm"),h=a("pv"),f=a("fx"),b=a("oM"),e=a("hG"),g=a("kQ"),n=a("ok"),q=new THREE.Matrix4,p=Math.PI/180;a=d.extend(b,function(r){b.call(this,b.poa,r);this.hk=this.C=null;this.Pk=[];this.Zj=new k;this.j.add(this.Zj);this.ve=new c;this.j.add(this.ve);this.Vk=!1;this.rp="";this.$b=null;this.Ql=new THREE.Matrix4});a.prototype.clear=function(){this.j.remove(this.Zj);this.j.remove(this.ve);
this.ve=this.Zj=null;this.$b&&this.j.remove(this.$b);this.$b=null};a.prototype.update=function(r){this.C=r;this.ve.set("changing",r.Nr);this.ve.set("visible",r.Nr);var t=e.Zi();if(t&&!t.Q7a()){var u=t.quaternion(),v=t.position(),w=g.nh&&g.Ec,x=n.Ra(g.nh&&g.dg);this.Ql.identity();v?(this.Ql.multiply(q.makeRotationY((x-r.Ra)*p)),this.Ql.multiply(q.makeTranslation(-w.x,-w.y,-w.z)),this.Ql.multiply(q.makeTranslation(v.x,v.y,v.z)),this.Ql.multiply(q.makeRotationFromQuaternion(u))):(this.Ql.multiply(q.makeRotationY(-r.Ra*
p)),t.hand()==e.ab?this.Ql.multiply(q.makeTranslation(-.2,-.4,0)):this.Ql.multiply(q.makeTranslation(.2,-.4,0)),this.Ql.multiply(q.makeRotationY(x*p)),this.Ql.multiply(q.makeRotationFromQuaternion(u)),this.Ql.multiply(q.makeTranslation(0,0,-.3)));this.Zj.set("matrix",null);this.Zj.set("matrix",this.Ql);this.Zj.set("pressed",t.pressed());this.Zj.set("visible",!0)}else this.Zj.set("visible",!1);this.el();r=!!t&&t.pressed();this.Vk!=r&&(this.Vk&&this.rI(),this.Vk=r);this.Zj.Kh();this.ve.Kh()};a.prototype.rI=
function(){var r=this.Fk(l.Xf);this.$k(r);this.Zj.set("over",!0);this.Zj.set("dotVisible",!0);this.Zj.set("intersectionDistance",r.Gu());e.Zi();this.ega()};a.prototype.ega=function(){this.j.Db().trigger(l.bD,{AM:l.Xf})};a.prototype.el=function(){var r=this.Fk(l.Fl);this.$k(r);this.xx(r.Oy());a:{var t=this.Pk;for(var u=r.Pk,v=0;v<t.length;v++)if(0>u.indexOf(t[v])){t=!1;break a}for(v=0;v<u.length;v++)if(0>t.indexOf(u[v])){t=!1;break a}t=!0}t||!r.U5()&&!this.Zj.get("over")||(this.Pk=r.Pk,e.Zi());this.Zj.set("over",
r.U5());this.Zj.set("intersectionDistance",r.Gu());this.Zj.set("dotVisible",!r.a5a())};a.prototype.xx=function(r){this.rp!=r&&(this.rp&&this.j.remove(this.$b),this.rp=r)&&(this.$b=new h(this.rp),this.$b.set("text",this.rp),this.$b.set("matrix",null),this.$b.set("matrix",this.Ql),this.j.add(this.$b))};a.prototype.$k=function(r){this.j.mT().sort(function(t,u){return u.get("index")-t.get("index")}).forEach(function(t){t.Qm(r)}.bind(this))};a.prototype.Fk=function(r){this.hk=m.f6a(this.Ql,this.hk);return new f(this,
[this.hk],this.MDa(this.C),r)};return a});
define("jH","require lV pB cs W fx oM bi".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cs"),k=a("W"),c=a("fx"),h=a("oM"),f=a("bi");a=d.extend(h,function(b){h.call(this,h.kN,b);this.j.M.bind(l.Pb,this.ak,this,!0);this.j.M.bind(l.hq,this.kua,this,!0);this.j.M.bind(l.Jb,this.hZa,this,!0);this.j.M.bind(l.hb,this.de,this,!0);this.j.M.bind(l.Eb,this.bk,this,!0);this.bx=this.ax=this.ix=this.On=this.od=this.nd=void 0;this.hk=this.C=null;this.rK=void 0;this.$b=""});a.prototype.clear=function(){this.j.M.unbind(l.Pb,
this.ak,this,!0);this.j.M.unbind(l.hq,this.kua,this,!0);this.j.M.unbind(l.hb,this.de,this,!0);this.j.M.unbind(l.Eb,this.bk,this,!0);this.Wga&&(this.j.iM(f.Le),this.Wga=!1);this.xx("")};a.prototype.update=function(b){this.C=b;this.Dga()};a.prototype.ZDa=function(){return{x:this.nd,y:this.od,pageX:this.ax,pageY:this.bx}};a.prototype.ak=function(b){this.nd=b.x;this.od=b.y;this.ax=b.pageX;this.bx=b.pageY;this.A1()};a.prototype.kua=function(){this.bx=this.ax=this.od=this.nd=void 0;this.A1()};a.prototype.hZa=
function(){this.bx=this.ax=this.od=this.nd=void 0;this.A1()};a.prototype.de=function(b){this.nd=this.On=b.x;this.od=this.ix=b.y;this.ax=b.pageX;this.bx=b.pageY;this.$k(this.Fk(l.rz))};a.prototype.bk=function(b){this.nd=b.x;this.od=b.y;this.ax=b.pageX;this.bx=b.pageY;this.$k(this.Fk(l.MH));this.Oba(this.On,this.ix,this.nd,this.od)&&this.$k(this.Fk(l.Xf))};a.prototype.Dga=function(){this.Fr||(this.Fr=setTimeout(function(){this.Fr=null;this.el()}.bind(this),300))};a.prototype.A1=function(){this.Fr&&
(clearTimeout(this.Fr),this.Fr=null);this.el()};a.prototype.el=function(){var b=this.Fk(l.Fl);this.$k(b);this.xx(b.Oy());b=b.MJa();this.rK!=b&&(this.rK&&this.j.iM(this.rK),(this.rK=b)&&this.j.Q4(this.rK))};a.prototype.xx=function(b){this.$b!=b&&(this.$b=b,this.j.M.set("toolTip",this.$b))};a.prototype.$k=function(b){this.j.mT().sort(function(e,g){return g.get("index")-e.get("index")}).forEach(function(e){e.Qm(b)}.bind(this))};a.prototype.Fk=function(b){return new c(this,this.dY(),null,b)};a.prototype.dY=
function(){if(void 0!==this.nd&&void 0!==this.od&&this.C.Gg){var b=k.getCamera(this.C.Gg);if(b)return this.hk=m.$Da(b,this.nd,this.od,this.C.width,this.C.height,this.hk),[this.hk]}return[]};a.prototype.Oba=function(b,e,g,n){b=g-b;e=n-e;return 5>=Math.sqrt(b*b+e*e)};return a});
define("gU","require lV pB cs W fx oM".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cs"),k=a("W"),c=a("fx"),h=a("oM");a=d.extend(h,function(b){h.call(this,h.lN,b);this.M=this.j.M;this.M.bind(l.hb,this.de,this,!0);this.M.bind(l.Eb,this.bk,this,!0);this.M.bind(l.G("touchOverAreaScale"),this.oda,this,!0);this.ix=this.On=this.od=this.nd=void 0;this.fqa=this.C=null;this.oda();this.kYa=Array(f.length);this.$b="";this.el=this.el.bind(this)});a.prototype.clear=function(){this.M.unbind(l.hb,this.de,
this,!0);this.M.unbind(l.Eb,this.bk,this,!0);this.M.unbind(l.G("touchOverAreaScale"),this.oda,this,!0);this.xx("")};a.prototype.update=function(b){this.C=b;this.Dga()};a.prototype.de=function(b){this.nd=this.On=b.x;this.od=this.ix=b.y;this.$k(this.Fk(l.rz))};a.prototype.bk=function(b){this.nd=b.x;this.od=b.y;this.$k(this.Fk(l.MH));this.Oba(this.On,this.ix,this.nd,this.od)&&this.$k(this.Fk(l.Xf))};a.prototype.Dga=function(){this.Fr||(this.Fr=setTimeout(this.el,300))};a.prototype.A1=function(){this.Fr&&
(clearTimeout(this.Fr),this.Fr=null);this.el()};a.prototype.el=function(){this.Fr=null;var b=this.Fk(l.Fl);this.$k(b);this.xx(b.Oy())};a.prototype.xx=function(b){if(this.$b!=b&&(this.$b=b,b=this.j.M,b.set("toolTip",this.$b),!b.get("toolTipDisabled"))){var e=b.Db().$b;this.$b?e.Cbb(b,this.$b):e.hide()}};a.prototype.$k=function(b){this.j.mT().sort(function(e,g){return g.get("index")-e.get("index")}).forEach(function(e){e.Qm(b)}.bind(this))};a.prototype.Fk=function(b){var e=b==l.Fl?this.dY(.5*this.C.width,
.5*this.C.height,this.dqa,this.fqa):this.dY(this.nd,this.od,f,this.kYa);return new c(this,e,null,b)};a.prototype.dY=function(b,e,g,n){var q=this.C.Gg&&k.getCamera(this.C.Gg);if(q){var p=this.C.width,r=this.C.height,t=Math.min(p,r)/100;g.forEach(function(u,v){n[v]=m.$Da(q,b+u[0]*t,e+u[1]*t,p,r,n[v])});return n}return[]};a.prototype.Oba=function(b,e,g,n){b=g-b;e=n-e;return Math.sqrt(b*b+e*e)<=4*Math.round(1*Math.min(window.screen.width,window.screen.height)/100)};a.prototype.oda=function(){this.dqa=
this.jTa(this.M.get("touchOverAreaScale"));this.fqa=Array(this.dqa.length)};a.prototype.jTa=function(b){var e=[],g=Math.min(50,Math.ceil(5*b)),n=Math.min(50,Math.ceil(30*b));b=Math.min(50,Math.ceil(15*b));for(var q=-g;q<=g;q++)for(var p=-g;p<=g;p++){var r=Math.sqrt(p*p+q*q);r<=g&&e.push([p,q,r])}for(p=-n;p<-g;p++)e.push([p,0,Math.sqrt(p*p)]);for(p=g+1;p<=n;p++)e.push([p,0,Math.sqrt(p*p)]);for(q=-b;q<-g;q++)e.push([0,q,Math.sqrt(q*q)]);for(q=g+1;q<=b;q++)e.push([0,q,Math.sqrt(q*q)]);e.sort(function(t,
u){return t[2]-u[2]});return e.map(function(t){return[t[0],t[1]]})};var f=function(){for(var b=[],e=0;5>e;e++)for(var g=-2+4*e/4,n=0;5>n;n++){var q=-2+4*n/4,p=Math.sqrt(q*q+g*g);2>=p&&b.push([q,g,p])}b.sort(function(r,t){return r[2]-t[2]});return b.map(function(r){return[r[0],r[1]]})}();return a});
define("pH","require exports pB pv fx oM jJ kQ three.mod".split(" "),function(a,d,l,m,k,c,h,f,b){function e(r,t){for(var u=0;u<r.length;u++)if(0>t.indexOf(r[u]))return!1;for(u=0;u<t.length;u++)if(0>r.indexOf(t[u]))return!1;return!0}a=function(r){function t(u){u=r.call(this,c.mN,u)||this;u.Nr=!1;u.zHa=new Map;u.hM=new Map;u.KT=null;u.lma=u.lma.bind(u);document.body.addEventListener("touchend",u.lma);f.N.bind(l.Xf,u.fs,u,!0);return u}Z(t,r);t.prototype.clear=function(){f.N.unbind(l.Xf,this.fs,this);
this.hM.forEach(function(u,v,w){this.LCa(u);w.delete(v)}.bind(this))};t.prototype.update=function(u){this.state=u;this.Ecb();this.Fy(u.Nr);this.JM()};t.prototype.fs=function(u){this.KT=u=u.data.pointerState;this.xIa(u)};t.prototype.lma=function(){var u=f.og[0]||null;u&&this.xIa(u)};t.prototype.xIa=function(u){g.copy(u.ray).applyMatrix4(u.matrixWorld);var v=new k(this,[g],f.qL,l.Xf,this.KT==u);this.wIa(v);f.yla(u,!1,!1,u.Gu);f.yIa(u,50);this.ucb()};t.prototype.Fy=function(u){this.Nr!==u&&(this.Nr=
u,f.og.forEach(function(v){f.Mab(v,u)}))};t.prototype.Ecb=function(){this.hM.forEach(function(u,v){f.og.includes(v)||(this.LCa(u),this.hM.delete(v))}.bind(this));f.og.forEach(function(u){this.hM.has(u)||this.hM.set(u,this.V4a());f.kJa(u,!1)}.bind(this))};t.prototype.JM=function(){this.KT=this.KT||(f.og.length?f.og.find(function(z){return"right"==z.handedness})||f.og[0]:null);for(var u=0;u<f.og.length;u++){var v=f.og[u];g.copy(v.ray).applyMatrix4(v.matrixWorld);var w=new k(this,[g],f.qL,l.Fl,this.KT==
v);this.wIa(w);this.Ycb(w,v);var x=this.zHa.get(v),y=w.Pk;x&&e(x,y)||(this.zHa.set(v,y),x=(x=w.Gu())?h.yu(x):h.Yr(),y=0<y.length,((w=w.U5())||v.bM)&&f.yIa(v,5),f.yla(v,y,w,x))}};t.prototype.Ycb=function(u,v){var w=u.Oy()||"",x=this.hM.get(v);x&&w!==x.get("text")&&(w?(x.set("text",w),x.set("alpha",1),x.Kh(),w=(w=u.Gu())?h.yu(w):h.Yr(),n.radius=w,x.set("intersectionYaw",void 0),x.set("intersectionPitch",void 0),g.copy(v.ray).applyMatrix4(v.matrixWorld),g.intersectSphere(n,q)&&(0==q.x&&0==q.z||x.set("intersectionYaw",
p*Math.atan2(q.x,-q.z)),0==q.y&&0==q.z||x.set("intersectionPitch",p*Math.atan2(q.y,Math.sqrt(q.z*q.z+q.x*q.x))),x.set("intersectionDistance",u.Gu()))):(x.set("text",""),x.set("alpha",0)))};t.prototype.wIa=function(u){this.j.mT().sort(function(v,w){return w.get("index")-v.get("index")}).forEach(function(v){v.Qm(u)}.bind(this))};t.prototype.ucb=function(){var u=this.j.Db();u&&u.trigger(l.bD,{AM:l.Xf})};t.prototype.V4a=function(){var u=new m;u.set("alpha",0);this.j.add(u);return u};t.prototype.LCa=function(u){this.j.remove(u)};
return t}(c);var g=new b.Ray,n=new b.Sphere,q=new b.Vector3,p=180/Math.PI;return a});define("hJ","require cT ew jH oM gU pH".split(" "),function(a){var d=a("cT"),l=a("ew"),m=a("jH"),k=a("oM"),c=a("gU"),h=a("pH");return{create:function(f,b){switch(f){case k.mN:return new h(b);case k.S7:return new d(b,!0);case k.dW:return new d(b,!1);case k.poa:return new l(b);case k.kN:return new m(b);case k.lN:return new c(b)}}}});
define("qg",["require","bi"],function(a){function d(m){this.ad=m;this.ef=[]}var l=a("bi");d.prototype.push=function(m){this.ef.push(m);this.oa()};d.prototype.pop=function(m){for(var k=this.ef.length-1;0<=k;k--)if(this.ef[k]==m){this.ef.splice(k,1);this.oa();break}};d.prototype.clear=function(){0<this.ef.length&&(this.ad.set("cursor",l.Ke),this.ef=[])};d.prototype.oa=function(){var m=0<=this.ef.indexOf(l.Wh)?l.Wh:0<=this.ef.indexOf(l.Le)?l.Le:0<this.ef.length?this.ef[this.ef.length-1]:l.Ke;this.ad.set("cursor",
m)};return d});
define("mG","require lV lh pB cI e bi w hG iG kJ pI eR ee gN hJ oM qg pJ kY lz kQ bo oC".split(" "),function(a){var d=a("lV"),l=a("lh"),m=a("pB"),k=a("cI"),c=a("e"),h=a("bi"),f=a("w"),b=a("hG"),e=a("iG"),g=a("kJ"),n=a("pI"),q=a("eR"),p=a("ee"),r=a("gN"),t=a("hJ"),u=a("oM"),v=a("qg"),w=a("pJ"),x=a("kY"),y=a("lz"),z=a("kQ"),B=a("bo"),D=a("oC"),F=Math.PI/180,A=d.extend(c,function(E,J,C){c.call(this);this.Re("Renderer");this.set("toolTipDisabled",!0);this.set("cursor",h.pv);this.set("layout","absolute");
this.set("interactionEnabled",!1);this.Vd=E;this.M=J;this.Yc=C;this.ue=new v(J);this.ge=null;this.faa=!1;this.C=new n;this.Ha=new r(this.Vd,this.M,this.Yc,this);this.Ha.bind(m.ba,this.requestFrame,this,!0);this.uj=new q(this.M);this.C.Gg=this.uj.qf();this.C.KS=this.uj.Vqa;this.C.LS=this.uj.Wqa;this.C.camera=this.uj.getCamera();this.Qta=(new Date).getTime();this.sO=new g;this.Yb().append(this.sO.hd());this.c1=new x;this.c1.bind(m.ea,this.DXa,this,!0);this.Jua=new w;this.Jua.bind(m.ba,this.iXa,this,
!0);this.SX=new e(this.C.width,this.C.height,this.C.We*F);this.bind(m.tc,this.Dc,this,!0);this.bind(m.kd,this.tj,this,!0);this.bind(m.cd,this.sj,this,!0);z.N.bind(m.ba,this.Vo,this,!0);b.bind(m.ba,this.QWa,this,!0);l.da(this.Yc,["fxaaEnabled","aaEnabled","hotspotsEnabled","preloadEnabled"],function(){this.C.lG=this.Yc.get("hotspotsEnabled");this.C.kU=this.Yc.get("preloadEnabled");this.C.Eia=this.Yc.get("fxaaEnabled");this.C.pS=this.Yc.get("aaEnabled");this.requestFrame()}.bind(this),!0);l.da(this.Yc,
["surfaceSelectionEnabled"],this.Nga.bind(this));this.Nga();this.Vo();l.da(this.Vd,["defaultVRPointer"],this.tp.bind(this));this.tp()});A.prototype.create=function(E){return p.create(E)};A.prototype.add=function(E){this.Ha.appendChild(E);1==this.Ha.rb().length&&this.NWa()};A.prototype.remove=function(E){if(E=this.Ha.Df(E))E.remove(),0==this.Ha.rb().length&&this.XWa()};A.prototype.Df=function(E){return this.Ha.Df(E)};A.prototype.mT=function(){return this.Ha.all()};A.prototype.X$a=function(E){this.faa!=
E&&(this.faa=E,this.tp())};A.prototype.cJa=function(E){this.C.Uja=E};A.prototype.Q4=function(E){this.ue.push(E)};A.prototype.iM=function(E){this.ue.pop(E)};A.prototype.Fy=function(E){this.C.Nr=E;this.requestFrame()};A.prototype.MG=function(){this.sO.trigger();this.C.nG=!0;this.W_();var E=D.vKa(this.uj.eg());this.C.nG=!1;this.W_();return E};A.prototype.Rha=function(E){this.C.nG=!0;this.W_();E=this.uj.Rha(E);this.C.nG=!1;return E};A.prototype.getPixelRatio=function(){return this.uj.getPixelRatio()};
A.prototype.ds=function(){return!!this.uj&&this.uj.ds()};A.prototype.tp=function(){var E=this.C.ob?u.mN:this.faa?u.dW:f.pb()?u.lN:u.kN;this.ge&&this.ge.getType()==E||(this.ge&&this.ge.clear(),this.ge=t.create(E,this),this.Nga(),this.ge.update(this.C))};A.prototype.Nga=function(){this.C.$U=this.Yc.get("surfaceSelectionEnabled")&&0<=[u.kN,u.mN,u.lN,u.dW].indexOf(this.ge&&this.ge.getType())};A.prototype.Pn=function(){this.ue.clear();c.prototype.Pn.call(this)};A.prototype.Dc=function(){var E=this.Wa(),
J=this.Ab();if(this.C.width!=E||this.C.height!=J)E&&J?(this.C.width=E,this.C.height=J,this.SX.UU(this.C.width),this.SX.TIa(this.C.height),this.requestFrame()):d.log("Invalid size values: "+E+" "+J)};A.prototype.tj=function(){this.C.enabled=!0;this.requestFrame()};A.prototype.sj=function(){this.C.enabled=!1};A.prototype.Vo=function(){this.C.ob=z.isPresenting;this.tp();this.requestFrame()};A.prototype.QWa=function(){this.tp();this.requestFrame()};A.prototype.DXa=function(){this.requestFrame()};A.prototype.iXa=
function(){this.requestFrame()};A.prototype.NWa=function(){this.c1.j5(this.M.Qd().bs())};A.prototype.XWa=function(){this.uj.G5a();this.c1.j5(null)};A.prototype.nJa=function(E){this.Y_!=E&&((this.Y_=E)||this.requestFrame())};A.prototype.ZG=function(E){this.C.Kj!=E&&(this.C.Kj=E,this.requestFrame())};A.prototype.setPosition=function(E,J,C,L){if(this.C.Ra!=E||this.C.pitch!=J||this.C.Fg!=C||this.C.We!=L)isNaN(E)||isNaN(J)||isNaN(C)||!L?d.log("Invalid position values: "+E+" "+J+" "+C+" "+L):(this.C.Ra=
E,this.C.pitch=J,this.C.Fg=C,this.C.We=L,this.SX.UG(this.C.We*F),this.requestFrame())};A.prototype.Pc=function(){return this.C.Ra};A.prototype.Oc=function(){return this.C.pitch};A.prototype.fg=function(){return this.C.Fg};A.prototype.Ee=function(){return this.C.We};A.prototype.rL=function(){return this.C.ob?this.C.ti:y.Sp(this.C.ti,this.C.width,this.C.height)};A.prototype.sL=function(){return this.C.ti};A.prototype.unproject=function(E){return this.SX.unproject(E)};A.prototype.requestFrame=function(){B.requestFrame(this.ek,
this)};A.prototype.ek=function(){if(B.x3){var E=(new Date).getTime(),J=Math.max(1,Math.min(E-this.Qta,33));this.Qta=E;this.trigger(new k(A.c7,{frameTime:J}));this.C.enabled&&(this.C.Ue=J,this.W_())}else this.requestFrame()};A.prototype.W_=function(){0!=this.Ha.rb().length&&(this.uj.update(this.C),this.C.Mr=this.uj.R5a(),this.C.Lr=this.uj.Q5a(),this.C.ti=this.uj.O5a(),this.C.qk=this.uj.getPixelRatio(),this.C.camera=this.uj.getCamera(),this.Ha.update(this.C),this.c1.update(this.C),this.Jua.update(this.C),
this.ge.update(this.C),this.Y_||this.uj.render())};A.c7="render start";A.Teb=function(){return!0};return A});
define("ge",["require","lV","cI","gF","mG"],function(a){var d=a("lV"),l=a("cI"),m=a("gF"),k=a("mG"),c=d.extend(m,function(h){m.call(this);this.j=h;this.j.bind(k.c7,this.vwa,this,!0)});c.prototype.clear=function(){this.j.unbind(k.c7,this.vwa,this,!0);this.j=null};c.prototype.requestFrame=function(){this.j.requestFrame()};c.prototype.vwa=function(h){h=h.data.frameTime;this.trigger(new l(c.Yp,{frameTime:h}));this.trigger(new l(c.Zp,{frameTime:h}))};c.Yp="frameStart";c.Zp="positionSet";return c});
define("dD",["require","w","lz"],function(a){function d(){this.wa=this.sa=0;this.Xa=90;this.jm="landscape";this.Jn=0;this.BY=l.pb()}var l=a("w"),m=a("lz");d.prototype.YIa=function(k){this.Xa=this.vDa(k)};d.prototype.vDa=function(k){return this.BY&&"portrait"==this.jm?m.TF(k,this.wa,this.sa):k};d.prototype.n6a=function(k){return this.BY&&"portrait"==this.jm?m.Gm(k,this.sa,this.wa):k};d.prototype.Lp=function(k){this.Xa=this.BY&&this.oeb?m.TF(k,this.wa,this.sa):k};d.prototype.tu=function(){return this.BY&&
"portrait"==this.jm};d.prototype.Ee=function(){return this.Xa};d.prototype.JS=function(k){return m.TF(k,this.wa,this.sa)};d.prototype.setSize=function(k,c){this.sa=k;this.wa=c;k=this.$Ta();this.jm!=k&&this.Jn++;this.jm=k};d.prototype.$Ta=function(){return 0===this.sa||0===this.wa?"landscape":this.sa<this.wa?"portrait":"landscape"};return d});
define("oA","require lV bt cI gF jv".split(" "),function(a){var d=a("lV"),l=a("bt"),m=a("cI"),k=a("gF"),c=a("jv"),h=d.extend(k,function(e){k.call(this);this.j=e;this.V=!1;this.Yl=this.Yl.bind(this);this.Yc=this.j.Yc});h.prototype.clear=function(){this.Yc=this.j=null};h.prototype.sb=function(e){this.V!=e&&(this.V&&document.removeEventListener("keyup",this.Yl),(this.V=e)&&document.addEventListener("keyup",this.Yl))};h.prototype.Yl=function(e){c.ao()||this.Yc.get("gazeModeEnabled")||"translate"!=this.Yc.get("arrowKeysAction")||
(b.includes(e.which)&&!e.shiftKey?this.trigger(new m(h.S6)):f.includes(e.which)&&!e.shiftKey&&this.trigger(new m(h.T6)))};const f=[l.gj,l.Zm],b=[l.Sh,l.Xm];h.T6="moveForward";h.S6="moveBackward";return h});
define("jk","require er lV pB cI gF oA".split(" "),function(a){a("er");var d=a("lV"),l=a("pB"),m=a("cI"),k=a("gF"),c=a("oA");a=d.extend(k,function(f){k.call(this);this.j=f;this.An=new c(f);this.An.bind(c.T6,this.xva,this,!0);this.An.bind(c.S6,this.wva,this,!0)});a.prototype.clear=function(){this.An.unbind(c.T6,this.xva,this,!0);this.An.unbind(c.S6,this.wva,this,!0);this.An.clear();this.An=null};a.prototype.bC=function(f){this.An.sb(f)};a.prototype.tf=function(f){this.za=f};a.prototype.end=function(){this.za=
null};a.prototype.xva=function(f){this.eAa(f);(f=this.oya(this.j.Pc(),this.Esa()))&&f.trigger(l.nq)};a.prototype.wva=function(f){this.eAa(f);(f=this.oya(this.j.Pc()-180,this.Esa()))&&f.trigger(l.nq)};a.prototype.eAa=function(f){this.j.Db().trigger(new m(l.bD,{AM:f}))};a.prototype.Esa=function(){return this.j.Yc.get("keyboardTranslateSelectionAngle")};a.prototype.oya=function(f,b){var e,g;if(!this.za)return null;void 0!==e||(e=-90);void 0!==g||(g=360);var n=f-.5*b,q=f+.5*b,p=Math.max(-90,e-.5*g),r=
Math.max(90,e+.5*g);b=this.za.get("adjacentPanoramas",[]).slice();b=b.filter(function(t){if(!t.get("enabled"))return!1;t=this.Lq(t);if(!t)return!1;var u=t.Ra;for(var v=f-180,w=f+180;u<v;)u+=w-v;for(;u>w;)u-=w-v;t=t.pitch;return n<=u&&u<=q&&p<=t&&t<=r}.bind(this));if(0==b.length)return null;b.sort(function(t,u){t=this.Lq(t);u=this.Lq(u);return(f-t.Ra)*(f-t.Ra)+(e-t.pitch)*(e-t.pitch)-((f-u.Ra)*(f-u.Ra)+(e-u.pitch)*(e-u.pitch))}.bind(this));return b[0]};a.prototype.Lq=function(f){var b=f.get("yaw");
f=f.get("distance");if(void 0===b||void 0===f)return null;var e=this.za.get("distanceToFloor");return{Ra:b,pitch:-90+Math.atan2(f,e)*h}};var h=180/Math.PI;return a});
define("ms","require lV pB cI gF nT bz pM y nf kz ge dD jk fJ".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cI"),k=a("gF"),c=a("nT"),h=a("bz"),f=a("pM"),b=a("y"),e=a("nf"),g=a("kz"),n=a("ge"),q=a("dD"),p=a("jk"),r=a("fJ"),t=d.extend(k,function(u,v){k.call(this);this.M=u;this.j=v;this.j.set("visible",!1);this.pc=new q;this.wg=new n(this.j);this.oe=new e(this.j);this.Tb=new f(this.M,this.j,this.pc);this.jb=new h(this.j,this.pc);this.Mf=new b(this.j);this.Jw=new g(this.j);this.Zd=new c(this.j);
this.i1=new p(this.j);this.wg.bind(n.Yp,this.DA,this,!0);this.wg.bind(n.Zp,this.EA,this,!0);this.oe.bind(l.jd,this.Gva,this,!0);this.oe.bind(l.Yf,this.SP,this,!0);this.oe.bind(l.mc,this.Ki,this,!0);this.Tb.bind(f.Ob,this.df,this,!0);this.Tb.bind(f.d7,this.Hva,this,!0);this.Tb.bind(f.U6,this.Zva,this,!0);this.Tb.bind(f.A6,this.Pua,this,!0);this.Tb.bind(f.B6,this.Qua,this,!0);this.Tb.bind(f.HC,this.aQ,this,!0);this.Tb.bind(f.FC,this.CA,this,!0);this.Tb.bind(f.GC,this.Xw,this,!0);this.Tb.bind(f.EC,this.$P,
this,!0);this.Tb.bind(f.$p,this.HA,this,!0);this.jb.bind(h.Ob,this.df,this,!0);this.jb.bind(h.wk,this.$q,this);this.jb.bind(h.Xp,this.Hn,this);this.jb.bind(h.Uc,this.lf,this,!0);this.jb.bind(h.fj,this.fr,this,!0);this.jb.bind(h.ej,this.er,this,!0);this.Mf.bind(b.Ob,this.df,this,!0);this.Mf.bind(b.Nj,this.dr,this,!0);this.Mf.bind(b.Uc,this.lf,this,!0);this.Jw.bind(g.xi,this.Nva,this,!0)});t.prototype.clear=function(){this.oe.clear();this.wg.clear();this.jb.clear();this.Tb.clear();this.Mf.clear();this.Jw.clear();
this.Zd.clear();this.oe.unbind(l.jd,this.Gva,this);this.oe.unbind(l.Yf,this.SP,this);this.oe.unbind(l.mc,this.Ki,this);this.wg.unbind(n.Yp,this.DA,this);this.wg.unbind(n.Zp,this.EA,this);this.Tb.unbind(f.Ob,this.df,this);this.Tb.unbind(f.d7,this.Hva,this);this.Tb.unbind(f.U6,this.Zva,this);this.Tb.unbind(f.A6,this.Pua,this);this.Tb.unbind(f.B6,this.Qua,this);this.Tb.unbind(f.HC,this.aQ,this);this.Tb.unbind(f.FC,this.CA,this);this.Tb.unbind(f.GC,this.Xw,this);this.Tb.unbind(f.EC,this.$P,this);this.Tb.unbind(f.$p,
this.HA,this);this.jb.unbind(h.ZLa,this.df,this);this.jb.unbind(h.wk,this.$q,this);this.jb.unbind(h.Xp,this.Hn,this);this.jb.unbind(h.Uc,this.lf,this,!0);this.jb.unbind(h.fj,this.fr,this);this.jb.unbind(h.ej,this.er,this);this.Mf.unbind(b.Ob,this.df,this);this.Mf.unbind(b.Nj,this.dr,this);this.Mf.unbind(b.Uc,this.lf,this);this.Jw.unbind(g.xi,this.Nva,this);this.M=this.j=this.i1=this.Zd=this.Jw=this.Mf=this.Tb=this.jb=this.wg=this.oe=null};t.prototype.e5=function(u){this.Jw.e5(u)};t.prototype.vla=
function(u){this.Tb.vla(u)};t.prototype.tf=function(u,v,w){this.j.set("visible",!0);this.Mf.w5();u.set("currentTime",w);this.Tb.start(u,v)};t.prototype.xB=function(){return this.oe.za||this.Tb.W5a()||this.Tb.jt};t.prototype.Ey=function(){this.oe.stop();this.Mf.end();this.jb.end();this.Tb.hide();this.Jw.stop();this.Zd.end();this.i1.end()};t.prototype.mM=function(){this.jb.resume();this.Mf.mM()};t.prototype.dM=function(){this.jb.pause();this.Mf.dM()};t.prototype.play=function(){this.jb.play();this.Zd.play();
this.Mf.play()};t.prototype.pause=function(){this.jb.pause();this.Zd.pause();this.Mf.pause()};t.prototype.stop=function(){this.jb.stop();this.Zd.stop();this.Mf.stop()};t.prototype.bC=function(u){this.jb.bC(u);this.i1.bC(u)};t.prototype.getTime=function(){return this.Mf.getTime()};t.prototype.moveTo=function(u,v,w,x,y){this.jb.moveTo(u,v,w,x,y)};t.prototype.Pc=function(){return this.j?this.j.Pc():void 0};t.prototype.Oc=function(){return this.j?this.j.Oc():void 0};t.prototype.fg=function(){return this.j?
this.j.fg():void 0};t.prototype.Ee=function(){return this.j?this.pc.n6a(this.j.Ee()):void 0};t.prototype.rL=function(){return this.j?this.j.rL():void 0};t.prototype.sL=function(){return this.j?this.j.sL():void 0};t.prototype.lf=function(){var u=this.Mf.pk()||this.jb.pk();this.trigger(new m(t.Uc,{state:u}))};t.prototype.rk=function(u){this.jb.rk(u)};t.prototype.DU=function(u){this.jb.DU(u)};t.prototype.cC=function(u){this.jb.cC(u)};t.prototype.EU=function(u){this.jb.EU(u)};t.prototype.Vf=function(u){this.Mf.Vf(u)};
t.prototype.$G=function(u){this.jb.$G(u)};t.prototype.aja=function(u,v){return(u=r.get(u,v,this.j.Pc(),this.j.Oc(),this.j.fg(),this.j.Ee(),this.j.Wa(),this.j.Ab()))?{x:u.x,y:u.y}:null};t.prototype.v6a=function(u,v){return(u=r.cdb(u,v,this.j))?{yaw:u.Ra,pitch:u.pitch}:null};t.prototype.MG=function(){this.j.MG()};t.prototype.mja=function(){return this.Tb.mja()};t.prototype.Hva=function(u){this.oe.start(u.data.panorama)};t.prototype.Ki=function(u){this.j.Fy(100>u.Ug);this.trigger(new m(t.jv,{percent:u.Ug}))};
t.prototype.Gva=function(u){this.Mf.end();this.i1.tf(u.data.panorama)};t.prototype.SP=function(){this.j.Fy(!1);this.trigger(new m(t.yC))};t.prototype.df=function(){this.wg.requestFrame()};t.prototype.DA=function(u){u=u.data.frameTime;this.pc.setSize(this.j.Wa(),this.j.Ab());this.Tb.Ay(u);this.jb.Ay(u)};t.prototype.EA=function(u){u=u.data.frameTime;this.Tb.Od(u);this.jb.Od(u);this.Mf.Od(u);this.Jw.Od(u);this.Zd.Od(u)};t.prototype.aQ=function(u){this.Jw.display(u.data.panorama);this.Mf.EL(u.data.panorama);
this.trigger(new m(t.HC,{panorama:u.data.panorama}))};t.prototype.Zva=function(u){this.Jw.hide(u.data.panorama)};t.prototype.Pua=function(u){this.Mf.start(u.data.panorama);this.Zd.start(u.data.panorama)};t.prototype.Qua=function(){this.Mf.end();this.j.set("visible",!1)};t.prototype.$P=function(u){this.jb.end();this.Zd.end(u.data.nextPanorama);this.trigger(new m(t.EC,{panorama:u.data.panorama}))};t.prototype.Xw=function(u){this.jb.start(u.data.panorama,u.data.camera);this.trigger(new m(t.GC,{panorama:u.data.panorama}))};
t.prototype.CA=function(u){this.trigger(new m(t.FC,{panorama:u.data.panorama}))};t.prototype.Nva=function(u){this.jb.Ela(u.data.yawDelta,0)};t.prototype.$q=function(u){this.trigger(new m(t.wk,u.data))};t.prototype.Hn=function(u){this.trigger(new m(t.Xp,u.data))};t.prototype.HA=function(u){this.trigger(new m(t.$p,u.data))};t.prototype.fr=function(){this.Mf.KM();this.trigger(new m(t.fj))};t.prototype.er=function(){this.trigger(new m(t.ej))};t.prototype.PIa=function(u){this.Mf.XG(u)};t.prototype.aC=
function(u){this.Mf.aC(u)};t.prototype.dr=function(u){this.trigger(new m(t.Nj,u.data))};t.jv="loadingProgress";t.yC="loadingEnd";t.wk="movementChange";t.Xp="positionChange";t.HC="panoramaStart";t.EC="panoramaEnd";t.GC="panoramaShow";t.FC="panoramaHide";t.Uc="playbackStateChange";t.fj="userInteractionStart";t.ej="userInteractionEnd";t.Nj="timeChange";t.$p="transitionEnd";return t});
define("pg","require lV pB cI lx pR fq km iZ hL ms ev mG w ij jt kQ eo hh jv".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cI"),k=a("lx"),c=a("pR"),h=a("fq"),f=a("km"),b=a("iZ"),e=a("hL"),g=a("ms"),n=a("ev"),q=a("mG"),p=a("w"),r=a("ij"),t=a("jt"),u=a("kQ"),v=a("eo"),w=a("hh"),x=a("jv"),y=h.define("PanoramaPlayer",b,function(){b.call(this,"panorama");b.prototype.set.call(this,"rotationEnabled",!0);b.prototype.set.call(this,"zoomEnabled",!0);b.prototype.set.call(this,"surfaceSelectionEnabled",
!1);b.prototype.set.call(this,"surfaceSelectionHorizontalAngle",90);b.prototype.set.call(this,"surfaceSelectionVerticalAngle",180);b.prototype.set.call(this,"adjacentPanoramaPositionsEnabled",!1);b.prototype.set.call(this,"fxaaEnabled",!1);b.prototype.set.call(this,"aaEnabled",!1);this.Gfa=this.iba=this.gA=this.UX=this.gZ=this.$Y=this.d9=this.LA=this.ri=this.z8=!1;this.Laa=!0;this.G0=this.NY=this.xn=this.hX=!1;this.pfa=x.ao();x.Q2.bind(l.ba,this.TWa,this,!0);this.Hq=!1;this.RX=this.caa=this.Se=this.Sb=
0;this.Nda=this.Pda=void 0;this.Ica=!0;this.Ni=k.U;this.Ro=this.Ro.bind(this);this.O=this.j=null;this.yua={};for(var z in y.Gv)this.yua[z]=this.mRa(z);this.HW=new f(this,"buttonToggleGyroscope",v.Rj);this.HW.bind(l.Oj,function(){this.set("gyroscopeEnabled",!0)},this);this.HW.bind(l.Hl,function(){this.set("gyroscopeEnabled",!1)},this);this.HW.set("pressed",this.get("gyroscopeEnabled")&&r.kk);(new f(this,"buttonCardboardView",v.Me)).bind(l.ma,function(){this.set("viewMode",y.hD)},this,!0);(new f(this,
"buttonVRView",v.Me)).bind(l.ma,function(){this.set("viewMode",y.hD)},this,!0);u.N.bind(l.ba,function(){this.fga("viewMode");this.trigger(y.h7)},this,!0);this.GW=new f(this,"buttonToggleGazeMode",v.Rj);this.GW.bind(l.Oj,function(){this.set("gazeModeEnabled",!0)},this);this.GW.bind(l.Hl,function(){this.set("gazeModeEnabled",!1)},this);this.GW.set("pressed",this.get("gazeModeEnabled"));this.IW=new f(this,"buttonToggleHotspots",v.Rj);this.IW.bind(l.Oj,function(){this.set("hotspotsEnabled",!0)},this);
this.IW.bind(l.Hl,function(){this.set("hotspotsEnabled",!1)},this);this.IW.set("pressed",this.get("hotspotsEnabled"));this.LW=new f(this,"buttonToggleSurfaceSelection",v.Rj);this.LW.bind(l.Oj,function(){this.set("surfaceSelectionEnabled",!0)},this);this.LW.bind(l.Hl,function(){this.set("surfaceSelectionEnabled",!1)},this);this.LW.set("pressed",this.get("surfaceSelectionEnabled"));this.HPa=new f(this,"buttonScreenshot",v.Me);this.HPa.bind(l.ma,this.fya,this,!0);this.Kd=d.Ip(this.jh,this)});y.OLa="cameraPositionChange";
y.jv="loadingProgress";y.VLa="preloadMediaShow";y.h7="viewModeChange";y.prototype.moveLeft=function(){this.Zc(n.HH)};y.prototype.moveRight=function(){this.Zc(n.IH)};y.prototype.moveUp=function(){this.Zc(n.JH)};y.prototype.moveDown=function(){this.Zc(n.GH)};y.prototype.playLeft=function(){this.Zc([n.HH,n.PLAYING])};y.prototype.playRight=function(){this.Zc([n.IH,n.PLAYING])};y.prototype.playUp=function(){this.Zc([n.JH,n.PLAYING])};y.prototype.playDown=function(){this.Zc([n.GH,n.PLAYING])};y.prototype.play=
function(){this.Sk()};y.prototype.pause=function(){this.ir()};y.prototype.stop=function(){this.GA()};y.prototype.seek=function(z){this.gF(z)};y.prototype.setFramePlaybackPosition=function(z){this.f_a(z)};y.prototype.setFrameTransitionPosition=function(z){this.g_a(z)};y.prototype.restart=function(){this.FA()};y.prototype.zoomIn=function(){this.Zc(n.Ev)};y.prototype.zoomOut=function(){this.Zc(n.Fv)};y.prototype.resumeCamera=function(){this.gZa()};y.prototype.pauseCamera=function(){this.YXa()};y.prototype.moveTo=
function(z,B,D,F){this.xua(z,B,D,F,!1)};y.prototype.setPosition=function(z,B,D,F){this.xua(z,B,D,F,!0)};y.prototype.getScreenPosition=function(z,B){return this.pUa(z,B)};y.prototype.getPanoramaPosition=function(z,B){return this.aUa(z,B)};y.prototype.saveScreenshot=function(){return this.fya()};y.prototype.get=function(z,B){switch(z){case "currentTime":return this.O&&this.O.getTime()||0;case "viewMode":return u.isPresenting?y.hD:y.h8;case "video":z="panorama";break;case "rendererPanorama":return this.O&&
this.O.xB()}if(!B)switch(z){case "mouseControlMode":B=c.rna;break;case "touchControlMode":B=c.joa}return b.prototype.get.call(this,z,B)};y.prototype.set=function(z,B){if(this.get(z)!=B){switch(z){case "application":this.z8=!0;this.Kd();break;case "startTime":this.LA=!0;this.Kd();break;case "video":case "panorama":z="panorama";this.LA=!0;this.Kd();break;case "camera":this.d9=!0;this.Kd();break;case "viewerArea":this.ri=!0;this.Kd();break;case "displayPlaybackBar":case "hdrPanoramaDisplayPlaybackBarSteps":case "livePanoramaDisplayPlaybackBarSteps":case "buttonPlay":case "buttonPlayPause":this.Hq=
!0;this.Kd();break;case "mapPlayer":this.$Y=!0;this.Kd();break;case "model3DPlayer":this.gZ=!0;this.Kd();break;case "gazeModeEnabled":p.M5()&&(B=!1);B&&x.ao()&&x.Ska();this.UX=!0;this.Kd();break;case "gyroscopeEnabled":this.gA=!0;this.Kd();break;case "gyroscopeVerticalDraggingEnabled":this.Laa=!0;this.Kd();break;case "viewMode":"vr"==B&&(B=y.hD);B==y.hD?this.get("viewerArea").set("viewMode","vr"):this.get("viewerArea").set("viewMode","standard");B=u.isPresenting?y.hD:y.h8;break;case "hotspotsEnabled":this.iba=
!0;this.Kd();break;case "mouseControlMode":case "touchControlMode":this.hX=!0;this.Kd();break;case "surfaceSelectionEnabled":this.Gfa=!0,this.Kd()}b.prototype.set.call(this,z,B)}};y.prototype.Mp=function(z){this.xn!=z&&((this.xn=z)?document.addEventListener("keyup",this.Ro,!0):document.removeEventListener("keyup",this.Ro,!0),this.O&&this.O.bC(this.xn),this.NY=!0,this.Kd())};y.prototype.TWa=function(){var z=x.ao();this.pfa!==z&&(this.G0=!0,this.pfa=z,this.Kd())};y.prototype.Ro=function(z){var B=this.get("gazeModeKeyCode");
B&&!x.ao()&&z.code==B&&this.set("gazeModeEnabled",!this.get("gazeModeEnabled"))};y.prototype.Tha=function(){return"inherit"!=this.get("doubleClickAction")};y.prototype.xcb=function(){this.KG([this])};y.prototype.U8=function(z){b.prototype.U8.call(this,z);z.bind(l.El,this.jBa,this,!0)};y.prototype.kga=function(z){b.prototype.kga.call(this,z);z.unbind(l.El,this.jBa,this,!0)};y.prototype.jBa=function(){switch(this.get("doubleClickAction")){case "toggle_fullscreen":var z=this.get("application").qj;z&&
z.kk()&&z.toggle()}};y.prototype.mRa=function(z){var B=y.Gv[z];z=new f(this,z,v.Me);z.bind(l.hb,function(){this.Zc(B.movement)},this);B.stopOnRelease&&z.bind(l.Eb,function(){this.Zc(n.Yf)},this);return z};y.prototype.jh=function(){if(this.ri||this.z8)this.ri=this.z8=!1,this.G0=this.NY=this.hX=this.gA=this.UX=this.gZ=this.$Y=!0,this.dw(),this.get("viewerArea")&&this.get("application")&&this.bw(),this.kR(this.get("viewerArea"));var z=!1;if(this.j){this.$Y&&(this.$Y=!1,this.O.e5(this.get("mapPlayer")));
this.gZ&&(this.gZ=!1,this.O.vla(this.get("model3DPlayer")));this.hX&&(this.hX=!1,this.O.cC(this.get("mouseControlMode")),this.O.$G(this.get("touchControlMode")));if(this.LA||this.d9)this.RX=this.caa=this.Sb=this.Se=0,this.Nda=this.Pda=void 0,z=!0,this.d9=this.LA=!1,this.get("panorama")?(this.get("viewerArea").Qd().Mbb(),this.O.tf(this.get("panorama"),this.get("camera",new e),this.get("startTime"))):(this.O.Ey(),this.Ica=!0,this.Ni=k.U,this.wd(k.U));if(this.UX||this.NY||this.G0){this.NY=this.G0=this.UX=
!1;var B=this.get("gazeModeEnabled");this.j.X$a(B&&this.xn&&!this.pfa);this.GW.set("pressed",B)}this.Laa&&(this.Laa=!1,this.O.EU(this.get("gyroscopeVerticalDraggingEnabled",!0)));this.gA&&(this.gA=!1,(B=this.get("gyroscopeEnabled")&&r.kk)&&r.disabled&&(B=!1,t.bna.show(function(){r.Pka(function(){this.set("gyroscopeEnabled",!0)}.bind(this))}.bind(this))),this.set("gyroscopeEnabled",B),this.O.DU(B),this.HW.set("pressed",B));this.iba&&(this.iba=!1,this.IW.set("pressed",this.get("hotspotsEnabled")));
this.Hq&&(this.Hq=!1,z=!0);this.Gfa&&(this.Gfa=!1,this.LW.set("pressed",this.get("surfaceSelectionEnabled")));z&&this.Nx()}};y.prototype.uK=function(){this.O.mja()||this.set("panorama",null)};y.prototype.bw=function(){var z=this.get("viewerArea"),B=this.get("application");this.j=new q(B,z,this);this.j.ra({left:0,top:0,bottom:0,right:0});z.Za(this.j);this.O=new g(z,this.j);this.O.bind(g.wk,this.$q,this);this.O.bind(g.Xp,this.cva,this);this.O.bind(g.jv,this.Ki,this);this.O.bind(g.yC,this.BJ,this);this.O.bind(g.GC,
this.Xw,this,!0);this.O.bind(g.FC,this.CA,this,!0);this.O.bind(g.HC,this.aQ,this,!0);this.O.bind(g.EC,this.$P,this,!0);this.O.bind(g.Uc,this.lf,this);this.O.bind(g.fj,this.fr,this);this.O.bind(g.ej,this.er,this);this.O.bind(g.Nj,this.dr,this);this.O.bind(g.$p,this.HA,this,!0);this.get("application").bind(l.G("mute"),this.YP,this);this.get("application").get("mute",!1)&&this.O.Vf(!0);this.O.bC(this.xn);u.N.bind(l.ba,this.Vo,this,!0);this.D9();this.aB(!0)};y.prototype.dw=function(){this.j&&(this.O.unbind(g.wk,
this.$q,this),this.O.unbind(g.Xp,this.cva,this),this.O.unbind(g.jv,this.Ki,this),this.O.unbind(g.yC,this.BJ,this),this.O.unbind(g.GC,this.Xw,this,!0),this.O.unbind(g.FC,this.CA,this,!0),this.O.unbind(g.HC,this.aQ,this,!0),this.O.unbind(g.EC,this.$P,this,!0),this.O.unbind(g.Uc,this.lf,this),this.O.unbind(g.fj,this.fr,this),this.O.unbind(g.ej,this.er,this),this.O.unbind(g.Nj,this.dr,this),this.O.unbind(g.$p,this.HA,this),this.O.clear(),this.O=null,this.get("application").unbind(l.G("mute"),this.YP,
this),this.j.getParent().removeChild(this.j),this.j=null,u.N.unbind(l.ba,this.Vo,this,!0),this.aB(!1))};y.prototype.YP=function(){this.j&&this.O.Vf(this.get("application").get("mute",!1))};y.prototype.lf=function(z){this.Ni=z.data.state;this.Ag()};y.prototype.Ag=function(){this.wd(this.Ica||u.isPresenting?this.Ni:k.PLAYING)};y.prototype.fr=function(){this.trigger(new m(l.toa))};y.prototype.er=function(){this.trigger(new m(l.soa))};y.prototype.aQ=function(z){this.trigger(new m(y.VLa,{panorama:z.data.panorama}))};
y.prototype.$P=function(){};y.prototype.Xw=function(z){this.D9();this.sP(z.data.panorama)};y.prototype.CA=function(z){this.rP(z.data.panorama)};y.prototype.$q=function(z){for(var B in y.Gv)this.yua[B].set("state",z.data[y.Gv[B].pressedOn]?w.Bb:w.Ke);this.Ica=z.data.stopped;this.Ag();this.trigger(new m(l.tna,z.data))};y.prototype.cva=function(z){this.D9();this.trigger(new m(y.OLa,z.data))};y.prototype.D9=function(){this.O&&(this.set("yaw",this.O.Pc()),this.set("pitch",this.O.Oc()),this.set("roll",
this.O.fg()),this.set("hfov",this.O.Ee()),this.set("actualHFOV",this.O.rL()),this.set("actualVFOV",this.O.sL()))};y.prototype.Ki=function(z){this.j.getParent().ra({progressPercent:z.data.percent,progressVisible:!0});this.trigger(new m(y.jv,z.data))};y.prototype.BJ=function(){this.j.getParent().set("progressVisible",!1)};y.prototype.HA=function(){this.trigger(l.P7)};y.prototype.Vo=function(){this.set("viewMode",u.isPresenting?y.hD:y.h8);this.Ag()};y.prototype.xua=function(z,B,D,F,A){this.O&&this.O.moveTo(z,
B,D,F,A)};y.prototype.Zc=function(z){this.O&&this.O.rk(z)};y.prototype.Sk=function(){this.O&&this.O.play()};y.prototype.lp=function(){this.O&&this.O.stop()};y.prototype.ir=function(){this.O&&this.O.pause()};y.prototype.gF=function(z){this.O&&(this.psa()?this.O.aC(z):this.O.PIa(z))};y.prototype.f_a=function(z){this.O&&this.O.PIa(z)};y.prototype.g_a=function(z){this.O&&this.O.aC(z)};y.prototype.YXa=function(){this.O&&this.O.dM()};y.prototype.gZa=function(){this.O&&this.O.mM()};y.prototype.pUa=function(z,
B){if(this.O)return this.O.aja(z,B)};y.prototype.aUa=function(z,B){if(this.O)return this.O.v6a(z,B)};y.prototype.fya=function(){this.O&&this.O.MG()};y.prototype.yQ=function(z){this.gF(z.data.position)};y.prototype.dr=function(z){this.Se=z.data.time;this.Sb=z.data.duration;this.caa=z.data.transitionPosition;this.RX=z.data.transitionLength;this.Pda=z.data.steps;this.Nda=z.data.selectedStep;this.Nx()};y.prototype.Nx=function(){var z=this.j.getParent(),B=!1;if(this.qTa()){var D=this.psa(),F=this.cUa();
D?0<this.RX&&(z.ra({playbackBarPosition:this.caa,playbackBarDuration:this.RX,playbackBarSteps:this.Pda,playbackBarSelectedStep:this.Nda,playbackBarLiveDragging:F}),B=!0):0<this.Sb&&(z.ra({playbackBarPosition:this.Se,playbackBarDuration:this.Sb,playbackBarSteps:void 0,playbackBarSelectedStep:void 0,playbackBarLiveDragging:F}),B=!0)}z.set("playbackBarVisible",B)};y.prototype.qTa=function(){var z=this.get("panorama");return z?h.Ja("HDRPanorama",z)?this.get("hdrPanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",
!1)):h.Ja("LivePanorama",z)?this.get("livePanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",!1)):h.Ja("VideoPanorama",z)?this.get("videoPanoramaDisplayPlaybackBar",this.get("displayPlaybackBar",!0)):!1:!1};y.prototype.psa=function(){var z=this.get("panorama");return z?h.Ja("HDRPanorama",z)?this.get("hdrPanoramaDisplayPlaybackBarSteps",!0):h.Ja("LivePanorama",z)?this.get("livePanoramaDisplayPlaybackBarSteps",!0):!1:!1};y.prototype.cUa=function(){var z=this.get("panorama");return!z||h.Ja("VideoPanorama",
z)?!1:!0};y.hD="cardboard";y.h8="standard";y.Gv={buttonMoveLeft:{movement:n.HH,pressedOn:"movingLeft",stopOnRelease:!0},buttonMoveRight:{movement:n.IH,pressedOn:"movingRight",stopOnRelease:!0},buttonMoveUp:{movement:n.JH,pressedOn:"movingUp",stopOnRelease:!0},buttonMoveDown:{movement:n.GH,pressedOn:"movingDown",stopOnRelease:!0},buttonPlayLeft:{movement:[n.HH,n.PLAYING],pressedOn:"movingLeft",stopOnRelease:!1},buttonPlayRight:{movement:[n.IH,n.PLAYING],pressedOn:"movingRight",stopOnRelease:!1},buttonPlayUp:{movement:[n.JH,
n.PLAYING],pressedOn:"movingUp",stopOnRelease:!1},buttonPlayDown:{movement:[n.GH,n.PLAYING],pressedOn:"movingDown",stopOnRelease:!1},buttonZoomIn:{movement:n.Ev,pressedOn:"zoomingIn",stopOnRelease:!0},buttonZoomOut:{movement:n.Fv,pressedOn:"zoomingOut",stopOnRelease:!0}};return y});
define("cK",["require","fq","dn","iM"],function(a){var d=a("fq"),l=a("dn"),m=a("iM");a=d.define("PanoramaPlayListItem",m,function(){m.call(this)});a.prototype.start=function(){m.prototype.start.call(this);var k=this.get("player");k&&(k.bind(l.th,this.Xw,this),k.set("panorama",this.get("media")),k.set("camera",this.get("camera")))};a.prototype.stop=function(){var k=this.get("player");k&&(k.unbind(l.th,this.Xw,this),k.get("panorama")==this.get("media")&&k.set("panorama",null));m.prototype.stop.call(this)};
a.prototype.Xw=function(k){k.data.media==this.get("media")&&(this.get("player").unbind(l.th,this.Xw,this),this.get("player").bind(l.Vm,this.CA,this),this.nB())};a.prototype.CA=function(k){k.data.media==this.get("media")&&(this.get("player").unbind(l.Vm,this.CA,this),this.stop(),this.end())};return a});define("lZ",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("PanoramaSnapshot",d,function(){d.call(this)})});
define("nP",["require","lV","cA"],function(a){var d=a("lV"),l=a("cA");a=d.extend(l,function(m,k,c,h){l.call(this);this.Wd=m;this.sa=k;this.wa=c;this.U$=h});a.prototype.Du=function(){return[this.Wd]};a.prototype.Yi=function(){return this.Wd};a.prototype.Fe=function(){return this.sa};a.prototype.Ve=function(){return this.wa};return a});
define("pA",["require","fq","ey","gx","nP"],function(a){var d=a("fq"),l=a("ey"),m=a("gx"),k=a("nP");a=d.define("Photo",l,function(){l.call(this);this.Aa=void 0});a.prototype.nk=function(){if(void 0==this.Aa){var c=this.get("image");this.Aa=c?new k(m.Zr(c).get("url"),this.get("width"),this.get("height"),this.get("flipImageHorizontally",!1)):null}return this.Aa};a.prototype.Bu=function(){var c=this.$X(this.nk());this.get("audios",[]).forEach(function(h){c=c.concat(h.Bu())}.bind(this));return c};a.prototype.$X=
function(c){return c?c.Du():[]};return a});define("kK",["require","ey","fq"],function(a){var d=a("ey");a=a("fq").define("PhotoAlbum",d,function(){d.call(this);this.set("loop",!1)});a.prototype.Bu=function(){var l=[],m=this.get("playList");m&&m.get("items",[]).forEach(function(k){(k=k.get("media"))&&(l=l.concat(k.Bu()))});this.get("audios",[]).forEach(function(k){l=l.concat(k.Bu())});return l};return a});
define("gY",["require","iy","fq","jx"],function(a){var d=a("iy"),l=a("fq"),m=a("jx");return l.define("PhotoAlbumAudio",m,function(){m.call(this,d.RMa)})});
define("dl",["require","lx"],function(a){function d(m,k){this.j=m;this.uq=k;this.eI=[];this.dt=[];this.Ir=1}var l=a("lx");d.prototype.clear=function(){for(var m=0;m<this.eI.length;m++)this.eI[m].Qc(l.U);this.BOa();this.dt=this.eI=null};d.prototype.stop=function(){for(var m=0;m<this.dt.length;m++)this.dt[m].Qc(l.U)};d.prototype.play=function(){for(var m=0;m<this.dt.length;m++){var k=this.dt[m];k.getState()!=l.PLAYING&&k.Qc(l.PLAYING)}};d.prototype.pause=function(){for(var m=0;m<this.dt.length;m++){var k=
this.dt[m];k.getState()==l.PLAYING&&k.Qc(l.Qb)}};d.prototype.start=function(){this.stop();for(var m=0;m<this.uq.length;m++){var k=this.uq[m],c=k.bG();c&&(this.eI.push(c),k.get("autoplay",!1)&&this.dt.push(c))}for(m=0;m<this.dt.length;m++)this.dt[m].Qc(l.PLAYING)};d.prototype.Od=function(){};d.prototype.BOa=function(){for(var m=0;m<this.eI.length;m++)this.eI[m].Ly(1)};return d});
define("iI",["require","lV","dl"],function(a){var d=a("lV"),l=a("dl");return d.extend(l,function(m,k){l.call(this,m,k.get("audios",[]));this.C_=k})});define("hR",["require","lV","dl"],function(a){var d=a("lV"),l=a("dl");return d.extend(l,function(m,k){l.call(this,m,k.get("audios",[]));this.uf=k})});
define("jN",["require","iI","hR"],function(a){function d(k){this.j=k;this.hj=[];this.Mi=[]}var l=a("iI"),m=a("hR");d.prototype.clear=function(){this.bKa();this.Mi=this.hj=null};d.prototype.bKa=function(){for(var k=0;k<this.hj.length;k++)this.hj[k].clear();for(k=0;k<this.Mi.length;k++)this.Mi[k].clear();this.hj=[];this.Mi=[]};d.prototype.pause=function(){for(var k=0;k<this.hj.length;k++)this.hj[k].pause();for(k=0;k<this.Mi.length;k++)this.Mi[k].pause()};d.prototype.play=function(){for(var k=0;k<this.hj.length;k++)this.hj[k].play();
for(k=0;k<this.Mi.length;k++)this.Mi[k].play()};d.prototype.stop=function(){for(var k=0;k<this.hj.length;k++)this.hj[k].stop();for(k=0;k<this.Mi.length;k++)this.Mi[k].clear();this.Mi=[]};d.prototype.Nbb=function(k){k=new l(this.j,k);this.Mi.push(k);k.start()};d.prototype.Ubb=function(k){for(var c=0;c<this.Mi.length;c++)if(this.Mi[c].C_==k){this.Mi[c].clear();this.Mi.splice(c,1);break}};d.prototype.Yla=function(k){k=new m(this.j,k);this.hj.push(k);k.start()};d.prototype.Rbb=function(k){for(var c=0;c<
this.hj.length;c++)if(this.hj[c].uf==k){this.hj[c].clear();this.hj.splice(c,1);break}};d.prototype.Od=function(k){for(var c=0;c<this.hj.length;c++)this.hj[c].Od(k);for(c=0;c<this.Mi.length;c++)this.Mi[c].Od(k)};return d});
define("bR",["require","lV","mN"],function(a){function d(){this.Ba=!0;this.Qa=this.Na=.5;this.qb=1;this.Rf=l.Uh;this.bn=this.cn=100}a("lV");var l=a("mN");d.prototype.getX=function(){this.Wn();return this.Na};d.prototype.getY=function(){this.Wn();return this.Qa};d.prototype.cs=function(){this.Wn();return this.qb};d.prototype.setConfiguration=function(m,k,c){this.Rf=c;this.Qa=this.Na=.5;this.qb=1;this.Ba=!0};d.prototype.setPosition=function(m,k,c){this.Na=m;this.Qa=k;this.qb=c;this.Ba=!0};d.prototype.setSize=
function(m,k){this.cn=m;this.bn=k;this.Ba=!0};d.prototype.Wn=function(){if(this.Ba){this.Ba=!1;1>this.qb&&(this.qb=1);var m=Math.min(.5/this.qb,.5),k=Math.max(1-.5/this.qb,.5);this.Na<m?this.Na=m:this.Na>k&&(this.Na=k);m=Math.min(.5/this.qb,.5);k=Math.max(1-.5/this.qb,.5);this.Qa<m?this.Qa=m:this.Qa>k&&(this.Qa=k)}};return d});
define("bJ",["require"],function(){function a(d,l){this.j=d;this.pa=l;this.Qa=this.Na=.5;this.qb=1;this.a0=!1}a.prototype.start=function(){this.Qa=this.Na=.5;this.qb=1;this.a0=!0};a.prototype.clear=function(){this.pa=this.j=null};a.prototype.setPosition=function(d,l,m){this.Na=d;this.Qa=l;this.qb=m};a.prototype.rf=function(){return this.a0};a.prototype.Fb=function(){this.a0=!1};return a});
define("in",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("PhotoCameraPosition",d,function(l,m,k){d.call(this);void 0!=l&&this.set("x",l);void 0!=m&&this.set("y",m);void 0!=k&&this.set("zoomFactor",k)})});
define("i","require lV bJ in pd bM".split(" "),function(a){var d=a("lV"),l=a("bJ"),m=a("in"),k=a("pd"),c=a("bM");a=d.extend(l,function(h,f){l.call(this,h,f);this.fa=null});a.prototype.start=function(h){var f=h.get("initialPosition",new m(.5,.5,1)),b=h.get("targetPosition",new m(.5,.5,1)),e=h.get("duration",1E3);0==e?(this.Na=f.get("x"),this.Qa=f.get("y"),this.qb=f.get("zoomFactor")):this.fa=new k(h.get("easing","linear"),[new c("x",f.get("x",.5),b.get("x",.5)),new c("y",f.get("y",.5),b.get("y",.5)),
new c("zoom",f.get("zoomFactor",1),b.get("zoomFactor",1))],e);this.Fb(0)};a.prototype.clear=function(){this.fa=null;l.prototype.clear.call(this)};a.prototype.rf=function(){return null!=this.fa};a.prototype.Fb=function(h){this.fa&&(this.fa.Fb(h),this.pa.setPosition(this.fa.eb("x"),this.fa.eb("y"),this.fa.eb("zoom")),this.Na=this.pa.getX(),this.Qa=this.pa.getY(),this.qb=this.pa.cs(),this.fa.Xe()&&(this.fa=null))};return a});
define("cV","require lV cI gF fq lx mN bR bJ i pB".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("gF"),k=a("fq"),c=a("lx"),h=a("mN"),f=a("bR"),b=a("bJ"),e=a("i"),g=a("pB"),n=d.extend(m,function(q,p){m.call(this);this.j=q;this.ie=p;this.j.bind(g.tc,this.Dc,this);this.C=c.U;this.mm=this.C_=this.Kb=this.Aa=null;this.pa=new f});n.prototype.clear=function(){this.end();this.pa=null;this.j.unbind(g.tc,this.Dc,this);this.j=null};n.prototype.end=function(q){if(this.Aa==q||"undefined"==typeof q)this.cra(),
this.Kb=this.C_=this.Aa=null};n.prototype.start=function(q){if(this.Aa!=q){this.end(this.Aa);var p=q.get("media"),r=q.get("camera"),t=p.get("width",100),u=p.get("height",100),v=r?r.get("scaleMode",h.Uh):h.Uh;this.Aa=q;this.Kb=r;this.C_=p;p.nk();this.V=!0;this.pa.setConfiguration(t,u,v);this.oRa(r);this.Sa()}};n.prototype.stop=function(){this.C!=c.U&&(this.C=c.U,this.mm&&(this.mm.start(this.Kb),this.Sa()))};n.prototype.play=function(){if(this.C==c.U||this.C==c.Qb)this.C=c.PLAYING,this.Sa()};n.prototype.pause=
function(){this.C==c.PLAYING&&(this.C=c.Qb)};n.prototype.Ay=function(q){this.mm&&this.mm.rf()&&(this.C==c.PLAYING&&(this.mm.Fb(q),this.Sa()),this.pm(this.mm.Na,this.mm.Qa,this.mm.qb))};n.prototype.oRa=function(q){this.cra();k.Ja("MovementPhotoCamera",q)?this.mm=new e(this.j,this.pa):this.mm=new b(this.j,this.pa);this.mm.start(q)};n.prototype.cra=function(){this.mm&&(this.mm.clear(),this.mm=null)};n.prototype.Dc=function(){this.pa.setSize(this.j.Wa(),this.j.Ab());this.Sa()};n.prototype.Sa=function(){this.trigger(new l(n.Ob))};
n.prototype.pm=function(q,p,r){this.ie.setPosition(this.Aa,q,p,r)};n.Ob="request frame";return n});
define("iC","require er lV cI gF pB iy mN".split(" "),function(a){var d=a("er"),l=a("lV"),m=a("cI"),k=a("gF"),c=a("pB");a("iy");var h=a("mN"),f=l.extend(k,function(e,g){k.call(this);this.tR=[];this.M=e;this.j=g});f.prototype.preload=function(e){this.dA(e).preload();return this};f.prototype.gf=function(e,g){this.dA(e).gf(g);return this};f.prototype.ko=function(e,g){this.dA(e).ko(g);return this};f.prototype.setPosition=function(e,g,n,q){this.dA(e).setPosition(g,n,q);return this};f.prototype.Kh=function(e){this.dA(e).Kh()};
f.prototype.stop=function(){this.vra(function(e){e.clear()});this.tR=[]};f.prototype.clear=function(){this.stop();this.j=this.M=this.tR=null};f.prototype.Od=function(){this.vra(function(e){e.update()})};f.prototype.dA=function(e){var g=this.zSa(e);g||(g=new b(e,this.j),g.bind(b.aoa,this.SVa,this),g.bind(b.Una,this.RVa,this),this.tR.push(g));return g};f.prototype.vra=function(e){d(this.tR).each(e,this)};f.prototype.zSa=function(e){return d(this.tR).find(function(g){return g.getItem()==e})};f.prototype.SVa=
function(){this.Sa()};f.prototype.RVa=function(e){this.trigger(new m(f.Y6,{item:e.source.getItem()}))};f.prototype.Sa=function(){this.trigger(new m(f.Ob))};f.Ob="request frame";f.Y6="photo preload end";var b=l.extend(k,function(e,g){k.call(this);this.Aa=e;this.j=g;this.Rf=(g=e.get("camera"))?g.get("scaleMode",h.Uh):h.Uh;this.vj=e.get("media").nk();this.vj.bind(c.ea,this.Dd,this);this.vj.bind(c.Bc,this.cg,this);this.ua=b.vN;this.Qa=this.Na=.5;this.qb=1;this.Ao=0;this.hI=!1;this.Mg=0;this.Ba=!1});b.prototype.getItem=
function(){return this.Aa};b.prototype.preload=function(){this.ua==b.vN?this.J_():this.bAa()};b.prototype.gf=function(e){this.Ao!=e&&(this.Ao=e,this.kf())};b.prototype.ko=function(e){this.Mg!=e&&(this.Mg=e,this.kf())};b.prototype.setPosition=function(e,g,n){if(this.Na!=e||this.Qa!=g||this.qb!=n)this.Na=e,this.Qa=g,this.qb=n,this.kf()};b.prototype.Kh=function(){this.hI||(this.hI=!0,this.kf())};b.prototype.clear=function(){this.ua==b.jW&&this.Kxa();this.ua!=b.sN&&this.ua!=b.uN&&this.ua!=b.tN||this.hB();
this.vj.unbind(c.ea,this.Dd);this.vj.unbind(c.Bc,this.cg);this.vj=null};b.prototype.update=function(){this.Ba&&(this.Ba=!1,-1<this.Mg&&1>this.Mg&&0<this.Ao?(this.ua==b.vN&&this.kca(),this.ua==b.sN&&this.VNa(),this.ua==b.jW&&(this.hI&&(this.j.Pha(this.vj),this.hI=!1),this.j.xs(this.vj,this.Ao),this.j.oab(this.vj,this.Mg),this.j.HU(this.vj,this.Na,this.Qa,this.qb))):(this.ua==b.jW&&this.Kxa(),this.ua!=b.sN&&this.ua!=b.tN||this.hB()))};b.prototype.kf=function(){this.Ba||(this.Ba=!0,this.Ga())};b.prototype.Ga=
function(){this.trigger(new m(b.aoa))};b.prototype.J_=function(){this.ua=b.uN;this.j.co(this.vj);this.j.eFa(this.vj)&&this.Dd()};b.prototype.kca=function(){this.ua=b.tN;this.j.co(this.vj);this.j.eFa(this.vj)&&this.Dd()};b.prototype.VNa=function(){this.ua=b.jW;this.j.yha(this.vj);this.j.rab(this.vj,this.Rf)};b.prototype.Kxa=function(){this.ua=b.sN;this.j.removeItem(this.vj)};b.prototype.hB=function(){this.ua=b.vN;this.j.Lj(this.vj)};b.prototype.Dd=function(){if(this.ua==b.uN||this.ua==b.tN){var e=
this.ua==b.uN;this.ua=b.sN;this.kf();e&&this.bAa()}};b.prototype.cg=function(){if(this.ua==b.uN||this.ua==b.tN)this.ua=b.vN};b.prototype.bAa=function(){this.trigger(new m(b.Una))};b.aoa="requestUpdate";b.Una="preloadEnd";b.vN="unloaded";b.uN="preloading";b.tN="loading";b.sN="loaded";b.jW="added";return f});define("nS",["require"],function(){return{oo:"blending",mq:"scroll"}});
define("ck","require er lV cI gF pB iC nS".split(" "),function(a){function d(e,g,n){this.Xn=e;this.item=g;this.transitionDuration=n;this.index=e&&g?l(e.get("playList").get("items")).indexOf(this.item):0;this.loaded=!1}var l=a("er"),m=a("lV"),k=a("cI"),c=a("gF");a("pB");var h=a("iC"),f=a("nS");d.prototype.isEqual=function(e){return e&&e.Xn==this.Xn&&e.item==this.item};var b=m.extend(c,function(e,g,n){c.call(this);this.M=e;this.j=g;this.ie=n;this.ie.bind(h.Y6,this.gxa,this);this.NR=f.oo;this.ua=b.WH;
this.$f=new d(null,null,0);this.cw=this.Rk=this.Ah=null;this.Vn=void 0;this.YA=0});b.prototype.cbb=function(e){this.NR=e};b.prototype.Fla=function(e){this.YA=e};b.prototype.mma=function(e,g,n){this.Rk=null;e=new d(e,g,n);e.isEqual(this.ua==b.WH?this.$f:this.Ah)||(this.Rk=e,this.awa())};b.prototype.clear=function(){this.ua!=b.mW&&this.ua!=b.kW||this.trigger(new k(b.ez,{album:this.Ah.Xn,item:this.Ah.item}));this.ua=b.WH;this.j=this.M=this.cw=this.$f=this.Ah=this.Rk=null;this.ie.unbind(h.Y6,this.gxa,
this);this.ie=null};b.prototype.Od=function(e){this.ua!=b.WH&&(this.Vn+=e,e=this.Ah.transitionDuration,e=this.Vn>=e?1:this.Vn/e,this.ua==b.kW?this.Z1a(e):this.ua==b.lW?this.$1a(e):this.NR==f.oo?this.N1a(e):this.J2a(e),1>e?this.Sa():this.aA())};b.prototype.Z1a=function(e){this.ie.gf(this.Ah.item,e).ko(this.Ah.item,0)};b.prototype.$1a=function(e){this.ie.gf(this.$f.item,1-e).ko(this.$f.item,0)};b.prototype.N1a=function(e){this.ie.gf(this.Ah.item,Math.min(1,2*e)).ko(this.Ah.item,0);this.ie.gf(this.$f.item,
Math.min(1,2*(1-e))).ko(this.$f.item,0)};b.prototype.J2a=function(e){var g=this.$f.Xn!=this.Ah.Xn||this.$f.index<this.Ah.index;this.ie.ko(this.Ah.item,(g?1-e:e-1)*(1+this.YA)).gf(this.Ah.item,1);this.ie.ko(this.$f.item,(g?-e:e)*(1+this.YA)).gf(this.$f.item,1)};b.prototype.awa=function(){this.Rk&&this.ua==b.WH&&(this.Rk.item&&!this.Rk.loaded?this.ie.preload(this.Rk.item):this.vq())};b.prototype.gxa=function(e){this.Rk&&this.Rk.item==e.data.item&&(this.Rk.loaded=!0,this.awa())};b.prototype.vq=function(){this.cw&&
this.cw!=this.Rk.Xn&&(this.trigger(new k(b.Vp,{album:this.cw})),this.cw=null);this.trigger(new k(b.f7));"fade_out_fade_in"==this.M.get("transitionMode")&&null!=this.Rk.item&&null!=this.$f.item?(this.ua=b.lW,this.Ah=new d(this.$f.Xn,null,this.$f.transitionDuration)):(this.Ah=this.Rk,this.Rk=null,this.$f.item)?this.Ah.item?this.ua=b.mW:this.$f.item&&(this.ua=b.lW):this.ua=b.kW;if(this.ua==b.mW||this.ua==b.kW)this.ie.Kh(this.Ah.item),this.trigger(new k(b.IC,{album:this.Ah.Xn,item:this.Ah.item}));this.Vn=
0;this.Sa()};b.prototype.aA=function(){this.ua!=b.mW&&this.ua!=b.lW||this.trigger(new k(b.ez,{album:this.$f.Xn,item:this.$f.item}));this.$f=this.Ah;this.cw!=this.$f.Xn&&(this.cw=this.$f.Xn,this.trigger(new k(b.Wp,{album:this.cw})));this.ua=b.WH;null==this.Rk?(this.$f.item&&this.trigger(new k(b.JC,{album:this.$f.Xn,item:this.$f.item})),this.trigger(new k(b.$p,{album:this.$f.Xn,item:this.$f.item}))):this.vq()};b.prototype.Sa=function(){this.trigger(new k(b.Ob))};b.WH="stopped";b.mW="blending";b.lW=
"fading_out";b.kW="fading_in";b.Ob="request frame";b.f7="transition begin";b.$p="transition end";b.IC="photo added";b.ez="photo removed";b.JC="photo displayed";b.Wp="photo album show";b.Vp="photo album hide";return b});
define("fZ","require er lV cI gF pB fq mN in bR bJ i pd bM".split(" "),function(a){var d=a("er"),l=a("lV"),m=a("cI"),k=a("gF"),c=a("pB"),h=a("fq"),f=a("mN"),b=a("in"),e=a("bR");a("bJ");a("i");var g=a("pd"),n=a("bM"),q=l.extend(k,function(p,r,t){k.call(this);this.M=p;this.j=r;this.ie=t;this.ep=this.Oo=this.Aa=this.uf=this.ib=null;this.On=void 0;this.K0=0;this.Vk=!1;this.Mg=0;this.fZ=this.ep?-1:0;this.dZ=this.Oo?1:0;this.fa=null;this.ih=400;this.YA=0;this.pa=new e});q.prototype.clear=function(){this.ie=
this.j=this.M=this.cw=null};q.prototype.M$a=function(p,r){this.uf=p;this.Aa=r;p=p&&p.get("playList")&&p.get("playList").get("items")||[];r=d(p).indexOf(r);this.Oo=0<r?p[r-1]:null;this.ep=r<p.length-1?p[r+1]:null;this.Mg=0;this.fZ=this.ep?-1:0;this.dZ=this.Oo?1:0;this.J_()};q.prototype.enable=function(){if(this.ib=this.j.getParent())this.ib.bind(c.hb,this.de,this,!0),this.ib.bind(c.Pb,this.ak,this,!0),this.ib.bind(c.Eb,this.bk,this,!0),this.J_()};q.prototype.disable=function(){this.ib&&(this.ib.unbind(c.hb,
this.de,this),this.ib.unbind(c.Pb,this.ak,this),this.ib.unbind(c.Eb,this.bk,this),this.ib=null)};q.prototype.bbb=function(p){this.ih=p};q.prototype.Fla=function(p){this.YA=p};q.prototype.J_=function(){this.ib&&(this.Oo&&this.ie.preload(this.Oo),this.ep&&this.ie.preload(this.ep))};q.prototype.Gua=function(){return(new Date).getTime()};q.prototype.de=function(p){this.Vk||(this.On=p.x,this.K0=0,this.Yda=this.Gua(),this.Vk=!0,this.fa=null,this.trigger(new m(q.F6)),this.Oo&&(p=this.Csa(this.Oo),this.ie.setPosition(this.Oo,
p.x,p.y,p.zoom)),this.ep&&(p=this.Csa(this.ep),this.ie.setPosition(this.ep,p.x,p.y,p.zoom)))};q.prototype.ak=function(p){if(this.Vk){var r=p.x-this.On,t=r/this.ib.Wa(),u=this.Gua()-this.Yda;this.K0=r/u;this.Yda+=u;this.On=p.x;this.Mg=Math.max(this.fZ,Math.min(this.dZ,this.Mg+t));this.Sa()}};q.prototype.bk=function(){if(this.Vk){this.Vk=!1;if(1<this.K0){var p="quad_out";var r=this.dZ}else-1>this.K0?(p="quad_out",r=this.fZ):(p="quad_in_out",r=-.5>this.Mg?this.fZ:.5<this.Mg?this.dZ:0);this.fa=new g(p,
[new n("offset",this.Mg,r,1E3/this.ih)],0);this.Sa()}};q.prototype.Od=function(p){if(this.Vk||this.fa)this.fa&&(this.fa.Fb(p),this.Mg=this.fa.eb("offset"),this.fa.Xe()?(this.fa=null,this.dSa()):this.Sa()),this.Aa&&this.ie.ko(this.Aa,this.Mg*(1+this.YA)).gf(this.Aa,1),this.Oo&&this.ie.ko(this.Oo,(this.Mg-1)*(1+this.YA)).gf(this.Oo,1),this.ep&&this.ie.ko(this.ep,(this.Mg+1)*(1+this.YA)).gf(this.ep,1)};q.prototype.dSa=function(){this.trigger(new m(q.G6,{album:this.uf,item:0>this.Mg?this.ep:0<this.Mg?
this.Oo:this.Aa}))};q.prototype.Sa=function(){this.trigger(new m(q.Ob))};q.prototype.Csa=function(p){var r=p&&p.get("camera"),t=p&&p.get("media");p=t&&t.get("width",100)||100;t=t&&t.get("height",100)||100;var u=r?r.get("scaleMode",f.Uh):f.Uh,v={};h.Ja("MovementPhotoCamera",r)?(r=r.get("initialPosition",new b(.5,.5,1)),v.x=r.get("x",.5),v.y=r.get("y",.5),v.zoom=r.get("zoomFactor",.5)):(v.x=.5,v.y=.5,v.zoom=1);this.pa.setConfiguration(p,t,u);this.pa.setSize(this.j.Wa(),this.j.Ab());this.pa.setPosition(v.x,
v.y,v.zoom);v.x=this.pa.getX();v.y=this.pa.getY();v.zoom=this.pa.cs();return v};q.Ob="request frame";q.F6="interaction begin";q.G6="interaction end";return q});
define("jQ","require lV cI gF pB iC nS ck fZ".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("gF");a("pB");a("iC");var k=a("nS"),c=a("ck"),h=a("fZ"),f=d.extend(m,function(b,e,g){m.call(this);this.M=b;this.j=e;this.ie=g;this.NR=k.oo;this.ih=1E3;this.Tb=new c(this.M,this.j,this.ie);this.Tb.bind(c.Ob,this.df,this,!0);this.Tb.bind(c.f7,this.$ua,this,!0);this.Tb.bind(c.$p,this.ava,this,!0);this.Tb.bind(c.IC,this.bQ,this,!0);this.Tb.bind(c.ez,this.eQ,this,!0);this.Tb.bind(c.JC,this.dQ,this,!0);this.Tb.bind(c.Vp,
this.ar,this,!0);this.Tb.bind(c.Wp,this.To,this,!0);this.$l=new h(this.M,this.j,this.ie);this.$l.bind(h.Ob,this.df,this,!0);this.$l.bind(h.F6,this.$ta,this,!0);this.$l.bind(h.G6,this.aua,this,!0)});f.prototype.m5=function(b,e){this.NR=b;this.ih=e;this.Tb.cbb(b);this.$l.bbb(e);this.Tb.Fla(.05);this.$l.Fla(.05)};f.prototype.display=function(b,e){this.Tb.mma(b,e,this.ih)};f.prototype.hide=function(){this.Tb.mma(null,null,this.ih)};f.prototype.clear=function(){this.Tb.unbind(c.Ob,this.df,this);this.Tb.unbind(c.f7,
this.$ua,this);this.Tb.unbind(c.$p,this.ava,this);this.Tb.unbind(c.IC,this.bQ,this);this.Tb.unbind(c.ez,this.eQ,this);this.Tb.unbind(c.JC,this.dQ,this);this.Tb.unbind(c.Vp,this.ar,this);this.Tb.unbind(c.Wp,this.To,this);this.Tb.clear();this.Tb=null;this.$l.bind(h.Ob,this.df,this,!0);this.$l.bind(h.F6,this.$ta,this,!0);this.$l.bind(h.G6,this.aua,this,!0);this.$l.clear();this.ie=this.j=this.M=this.$l=null};f.prototype.Od=function(b){this.Tb.Od(b);this.$l.Od(b)};f.prototype.df=function(){this.Sa()};
f.prototype.bQ=function(b){this.trigger(new l(f.IC,b.data))};f.prototype.eQ=function(b){this.trigger(new l(f.ez,b.data))};f.prototype.dQ=function(b){this.trigger(new l(f.JC,b.data));this.$l.M$a(b.data.album,b.data.item)};f.prototype.ar=function(b){this.trigger(new l(f.Vp,b.data))};f.prototype.To=function(b){this.trigger(new l(f.Wp,b.data))};f.prototype.$ua=function(){this.$l.disable()};f.prototype.ava=function(b){this.NR==k.mq&&b.data.item&&this.$l.enable();b.data.album||this.trigger(new l(f.C6))};
f.prototype.$ta=function(){this.trigger(new l(f.Uma))};f.prototype.aua=function(b){this.Tb.mma(b.data.album,b.data.item,0);this.trigger(new l(f.Vma,b.data))};f.prototype.Sa=function(){this.trigger(new l(f.Ob))};f.Ob="request frame";f.IC="photo added";f.ez="photo removed";f.JC="photo displayed";f.Wp="photo album show";f.Vp="photo album hide";f.Uma="manual interaction begin";f.Vma="manual interaction end";f.C6="all pending photo albums hidden";return f});
define("jg","require er lV z cI gF lx".split(" "),function(a){var d=a("er"),l=a("lV"),m=a("z"),k=a("cI"),c=a("gF"),h=a("lx"),f=l.extend(c,function(){c.call(this);this.uf=null;this.C=h.U;this.Oea=null});f.prototype.clear=function(){this.sia()};f.prototype.Yla=function(b){this.sia();this.uf=b;this.C=h.PLAYING;this.Oea=m.Zu(this.uf,"playList.selectedIndex",this.hF,this);0==this.uf.get("playList").get("selectedIndex")?this.hF():this.uf.get("playList").set("selectedIndex",0)};f.prototype.sia=function(){this.uf&&
(this.C=h.U,this.Oea.mC(),this.uf=this.Oea=null)};f.prototype.stop=function(){this.C!=h.U&&(this.C=h.U,this.uf.get("playList").set("selectedIndex",0))};f.prototype.play=function(){this.C==h.U?(this.uf.get("playList").set("selectedIndex",0),this.C=h.PLAYING,this.hF()):this.C==h.Qb&&(this.C=h.PLAYING)};f.prototype.pause=function(){this.C==h.PLAYING&&(this.C=h.Qb)};f.prototype.next=function(){var b=this.uf.get("playList"),e=b.get("selectedIndex"),g=b.get("items").length;(e<g-1||this.uf.get("loop"))&&
b.set("selectedIndex",(e+1)%g)};f.prototype.Cka=function(){var b=this.uf.get("playList"),e=b.get("selectedIndex"),g=b.get("items").length;(0<e||this.uf.get("loop"))&&b.set("selectedIndex",(e-1+g)%g)};f.prototype.L3=function(b){this.C_a(b)};f.prototype.itemEnd=function(b){if(this.uf){var e=d(this.uf.get("playList").get("items")).last();b!=e||this.uf.get("loop")?this.next():(this.C=h.U,this.trigger(new k(f.x6,{album:this.uf})))}};f.prototype.hF=function(){var b=this.rUa();0<=b&&(this.C!=h.PLAYING&&
0!=b?this.trigger(new k(f.b7)):this.trigger(new k(f.K6,{album:this.uf,item:this.uf.get("playList").get("items")[b]})))};f.prototype.rUa=function(){return this.uf?this.uf.get("playList").get("selectedIndex"):-1};f.prototype.C_a=function(b){if(this.uf){var e=this.uf.get("playList");b=d(e.get("items")).indexOf(b);e.set("selectedIndex",b)}};f.b7="play request";f.K6="item request";f.x6="album end";return f});
define("dd","require er lV pB cI gF lx hC".split(" "),function(a){a("er");var d=a("lV"),l=a("pB"),m=a("cI"),k=a("gF"),c=a("lx"),h=a("hC"),f=d.extend(k,function(b){k.call(this);this.M=b;this.FR=this.Aa=null;this.$E=void 0;this.HY=!1;this.C=c.U;h.bind(l.ba,this.Swa,this,!0)});f.prototype.L3=function(b){this.i$();if(this.Aa=b)b=this.Aa.get("media").get("duration",0),this.$E=0==b?void 0:Math.max(0,b-this.M.get("transitionDuration")),this.HY=!1,this.C==c.PLAYING&&this.G$()};f.prototype.clear=function(){h.unbind(l.ba,
this.Swa,this,!0);this.L3(null)};f.prototype.stop=function(){this.C!=c.U&&(this.i$(),this.wd(c.U))};f.prototype.play=function(){if(this.C==c.U){if(this.wd(c.PLAYING),this.Aa){this.HY=!1;var b=this.Aa.get("media").get("duration",0);this.$E=0==b?void 0:b;this.G$()}}else this.C==c.Qb&&(this.wd(c.PLAYING),this.Aa&&this.G$())};f.prototype.pause=function(){this.C==c.PLAYING&&(this.wd(c.Qb),this.dxa())};f.prototype.G$=function(){this.HY||(this.HY=!0,this.trigger(new m(f.L6,{item:this.Aa})));this.Gra()};
f.prototype.Swa=function(){h.visible?this.Gra():h.visible||this.dxa()};f.prototype.Gra=function(){if(void 0!==this.$E){var b=this;this.d1=(new Date).getTime()+this.$E;this.FR=setTimeout(function(){b.FR=null;b.U0a()},this.$E)}else this.d1=void 0};f.prototype.i$=function(){this.FR&&(clearTimeout(this.FR),this.FR=null)};f.prototype.dxa=function(){void 0!==this.d1&&(this.i$(),this.$E=Math.max(1,this.d1-(new Date).getTime()),this.d1=void 0)};f.prototype.U0a=function(){var b=this.Aa;this.Aa=null;this.$E=
void 0;this.trigger(new m(f.J6,{item:b}))};f.prototype.wd=function(b){this.C!=b&&(this.C=b,this.trigger(new m(f.Uc,{state:this.C})))};f.Uc="playback state change";f.L6="item start";f.J6="item end";return f});
define("om","require lV cI gF bo w".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("gF"),k=a("bo"),c=a("w"),h=d.extend(m,function(f){m.call(this);this.V=!0;this.UD=!1;this.j=f;this.un=c.browser()==c.Fs&&c.zd()==c.U7?3:1;this.bf=this.uO=0});h.prototype.clear=function(){this.V=!1;this.j=null;this.bf=this.uO=0};h.prototype.requestFrame=function(){this.UD||(this.UD=!0,k.requestFrame(this.ek,this))};h.prototype.ek=function(f){this.V&&(this.uO++,this.bf+=f,this.uO==this.un?(this.uO=0,this.UD=!1,f=this.bf,
this.bf=0,this.trigger(new l(h.Yp,{frameTime:f})),this.trigger(new l(h.Zp,{frameTime:f})),this.j.render()):k.requestFrame(this.ek,this))};h.Yp="frameStart";h.Zp="positionSet";return h});
define("gZ","require lV pB cI gF jN cV jQ jg dd iC om".split(" "),function(a){var d=a("lV");a("pB");var l=a("cI"),m=a("gF"),k=a("jN"),c=a("cV"),h=a("jQ"),f=a("jg"),b=a("dd"),e=a("iC"),g=a("om"),n=d.extend(m,function(q,p){m.call(this);this.M=q;this.j=p;this.j.set("visible",!1);this.li=new f(this.j);this.Ma=new b(this.M);this.ie=new e(this.M,this.j);this.Oa=new h(this.M,this.j,this.ie);this.jb=new c(this.j,this.ie);this.wg=new g(this.j);this.Zd=new k(this.j);this.ie.bind(e.Ob,this.df,this,!0);this.li.bind(f.K6,
this.sva,this,!0);this.li.bind(f.b7,this.fwa,this,!0);this.li.bind(f.x6,this.cQ,this,!0);this.Ma.bind(b.L6,this.tva,this);this.Ma.bind(b.J6,this.rva,this);this.Ma.bind(b.Uc,this.lf,this,!0);this.Oa.bind(h.Ob,this.df,this,!0);this.Oa.bind(h.IC,this.bQ,this,!0);this.Oa.bind(h.ez,this.eQ,this,!0);this.Oa.bind(h.JC,this.dQ,this,!0);this.Oa.bind(h.Vp,this.ar,this,!0);this.Oa.bind(h.Wp,this.To,this,!0);this.Oa.bind(h.Uma,this.ZWa,this,!0);this.Oa.bind(h.Vma,this.$Wa,this,!0);this.Oa.bind(h.C6,this.Rua,
this,!0);this.jb.bind(c.Ob,this.df,this,!0);this.wg.bind(g.Yp,this.DA,this,!0);this.wg.bind(g.Zp,this.EA,this,!0)});n.prototype.clear=function(){this.li.clear();this.Ma.clear();this.Oa.clear();this.jb.clear();this.wg.clear();this.Zd.clear();this.ie.clear();this.ie.unbind(e.Ob,this.df,this);this.li.unbind(f.K6,this.sva,this);this.li.unbind(f.x6,this.cQ,this);this.li.unbind(f.b7,this.fwa,this);this.Ma.unbind(b.L6,this.tva,this);this.Ma.unbind(b.J6,this.rva,this);this.Ma.unbind(b.Uc,this.lf,this);this.Oa.unbind(h.Ob,
this.df,this);this.Oa.unbind(h.IC,this.bQ,this);this.Oa.unbind(h.ez,this.eQ,this);this.Oa.unbind(h.JC,this.dQ,this);this.Oa.unbind(h.Vp,this.ar,this);this.Oa.unbind(h.Wp,this.To,this);this.Oa.unbind(h.C6,this.Rua,this);this.jb.unbind(c.Ob,this.df,this);this.wg.unbind(g.Yp,this.DA,this);this.wg.unbind(g.Zp,this.EA,this);this.M=this.j=this.ie=this.Zd=this.wg=this.jb=this.Oa=this.Ma=this.li=null};n.prototype.m5=function(q,p){this.Oa.m5(q,p)};n.prototype.Iab=function(q){this.j.set("visible",!0);this.li.Yla(q)};
n.prototype.Ey=function(){this.li.sia();this.Ma.stop();this.Oa.hide();this.jb.end();this.Zd.bKa()};n.prototype.next=function(){this.li.next()};n.prototype.Cka=function(){this.li.Cka()};n.prototype.stop=function(){this.Ma.stop();this.Zd.stop();this.li.stop();this.jb.stop()};n.prototype.play=function(){this.Ma.play();this.Zd.play();this.li.play();this.jb.play()};n.prototype.pause=function(){this.Ma.pause();this.Zd.pause();this.li.pause();this.jb.pause()};n.prototype.ZWa=function(){this.Ma.pause();this.Zd.pause();
this.li.pause();this.jb.pause()};n.prototype.$Wa=function(){this.Ma.play();this.Zd.play();this.li.play();this.jb.play()};n.prototype.sva=function(q){this.Oa.display(q.data.album,q.data.item)};n.prototype.fwa=function(){this.play()};n.prototype.df=function(){this.wg.requestFrame()};n.prototype.DA=function(q){this.jb.Ay(q.data.frameTime)};n.prototype.EA=function(q){q=q.data.frameTime;this.Oa.Od(q);this.ie.Od(q);this.Zd.Od(q)};n.prototype.bQ=function(q){this.jb.start(q.data.item)};n.prototype.eQ=function(q){var p=
q.data.album;q=q.data.item;var r=q.get("media");this.jb.end(q);this.Zd.Ubb(r);this.trigger(new l(n.X6,{photoAlbum:p,item:q}))};n.prototype.dQ=function(q){var p=q.data.album;q=q.data.item;q.get("media");this.li.L3(q);this.Ma.L3(q);this.trigger(new l(n.W6,{photoAlbum:p,item:q}))};n.prototype.tva=function(q){q=q.data.item.get("media");this.Zd.Nbb(q)};n.prototype.rva=function(q){this.li.itemEnd(q.data.item)};n.prototype.cQ=function(q){this.Ma.stop();this.Zd.stop();this.trigger(new l(n.V6,{photoAlbum:q.data.album}))};
n.prototype.To=function(q){q=q.data.album;this.Zd.Yla(q);this.Ma.play();this.jb.play();this.trigger(new l(n.Wp,{photoAlbum:q}))};n.prototype.ar=function(q){q=q.data.album;this.Zd.Rbb(q);this.trigger(new l(n.Vp,{photoAlbum:q}))};n.prototype.Rua=function(){this.j.set("visible",!1)};n.prototype.lf=function(q){this.trigger(new l(n.Uc,{state:q.data.state}))};n.Wp="photoAlbumShow";n.V6="photoAlbumEnd";n.Vp="photoAlbumHide";n.W6="photoBegin";n.X6="photoEnd";n.Uc="playbackStateChange";return n});
define("if","require jquery.mod er mN lS mq w".split(" "),function(a){function d(f,b){this.Aa=f;this.ta=b;this.Rb=f.Fe();this.dc=f.Ve();this.KX=f.U$;this.tha=this.iP=0;this.Ao=1;this.Mg=0;this.Ba=!0;this.J9();this.Sd=this.Jd=100;this.Qa=this.Na=.5;this.qb=1;this.DQ=!0;this.xf=1;this.Era={};this.kta={};this.aBa=h.browser()!=h.sh}var l=a("jquery.mod"),m=a("er"),k=a("mN"),c=a("lS");a("mq");var h=a("w");d.prototype.J9=function(){this.fW=l("<div></div>");var f={position:"absolute",left:"0",top:"0",width:this.Jd+
"px",height:this.Sd+"px",overflow:"hidden","-webkit-transform":"translateZ(0)"};f["-moz-transform-origin"]=f["-webkit-transform-origin"]=f["transform-origin"]="0 0 0";f["-ms-transform-origin"]="0 0";this.fW.css(f);this.W7=l(c.Cf(this.Aa.Yi(),!0));f={display:"block",position:"absolute",left:"0",top:"0",width:this.Rb+"px",height:this.dc+"px"};f["-moz-transform-origin"]=f["-webkit-transform-origin"]=f["transform-origin"]="0 0 0";f["-ms-transform-origin"]="0 0";this.W7.css(f);this.fW.append(this.W7)};
d.prototype.hd=function(){return this.fW};d.prototype.getItem=function(){return this.Aa};d.prototype.getX=function(){return this.Na};d.prototype.getY=function(){return this.Qa};d.prototype.cs=function(){return this.qb};d.prototype.Wa=function(){return Math.round(this.Rb*this.qb*this.xf)};d.prototype.Ab=function(){return Math.round(this.dc*this.qb*this.xf)};d.prototype.gf=function(f){this.Ao!=f&&(this.Ao=f,this.Ba=!0)};d.prototype.Y2=function(){return this.Ao};d.prototype.hC=function(f){this.Rf!=f&&
(this.Rf=f,this.Ba=!0)};d.prototype.QG=function(f,b){if(this.Jd!=f||this.Sd!=b)this.Jd=f,this.Sd=b,this.Ba=!0};d.prototype.setPosition=function(f,b,e){if(this.Na!=f||this.Qa!=b||this.qb!=e)this.Na=f,this.Qa=b,this.qb=e,this.Ba=!0};d.prototype.ko=function(f){this.Mg!=f&&(this.Mg=f,this.Ba=!0)};d.prototype.O$a=function(f){this.tha!=f&&(this.tha=f,this.Ba=!0)};d.prototype.render=function(){if(this.Ba){this.Ba=!1;switch(this.Rf){case k.NONE:this.xf=1;break;case k.bq:this.xf=this.Jd/this.Rb;break;case k.xk:this.xf=
this.Sd/this.dc;break;case k.Is:this.xf=this.Rb*this.Sd>this.dc*this.Jd?this.Sd/this.dc:this.Jd/this.Rb;break;default:this.xf=this.Rb*this.Sd>this.dc*this.Jd?this.Jd/this.Rb:this.Sd/this.dc}var f=this.qb*this.xf,b=.5*this.Jd-this.Na*this.Rb*f,e=.5*this.Sd-this.Qa*this.dc*f,g=this.Jd*this.Mg,n=function(p,r){return Math.round(p*Math.pow(10,r))*Math.pow(10,-r)},q={};q.width=n(this.Jd,0)+"px";q.height=n(this.Sd,0)+"px";q.transform=this.aBa?"translate3d("+n(g,2)+"px, 0px, 0px)":"translate("+n(g,2)+"px, 0px)";
q["-moz-transform"]=q["-webkit-transform"]=q["-ms-transform"]=q.transform;q["z-index"]=this.tha;0==this.Ao?q.display="none":(q.display="block",1==this.Ao?(q.filter=q["-ms-filter"]="",q.opacity=""):(q.filter=q["-ms-filter"]="alpha(opacity="+Math.round(100*this.Ao)+")",q.opacity=this.Ao));g=[];this.aBa?(g.push("translate3d("+n(b,2)+"px, "+n(e,2)+"px, 0px)"),g.push("scale3d("+f+", "+f+", "+f+")"),this.KX&&(g.push("translate3d("+this.Rb+"px, 0, 0)"),g.push("scale3d(-1, 1, 1)"))):(g.push("translate("+
n(b,2)+"px, "+n(e,2)+"px)"),g.push("scale("+f+", "+f+")"),this.KX&&(g.push("translate("+this.Rb+"px, 0)"),g.push("scale(-1, 1)")));f={};f["-moz-transform"]=f["-webkit-transform"]=f["-ms-transform"]=f.transform=g.join(" ");m.isEqual(this.Era,q)||(this.Era=q,this.fW.css(q));m.isEqual(this.kta,f)||(this.kta=f,this.W7.css(f))}};return d});
define("iB","require jquery.mod er lV pB iy lS if bi e".split(" "),function(a){var d=a("jquery.mod"),l=a("er"),m=a("lV"),k=a("pB"),c=a("iy"),h=a("lS"),f=a("if"),b=a("bi"),e=a("e");a=m.extend(e,function(){e.call(this);this.Re("Renderer");this.set("toolTipDisabled",!0);this.set("cursor",b.pv);this.bind(k.tc,this.Dc,this,!0);this.bind(k.kd,this.tj,this,!0);this.bind(k.cd,this.sj,this,!0);this.cF=!1;this.Cc=[];this.E0=this.Qx=!1;this.Hda=d("<div/>");this.Hda.css({position:"absolute",left:0,top:0,right:0,
bottom:0,overflow:"hidden","-webkit-transform":"translateZ(0)"});this.Yb().append(this.Hda)});a.prototype.co=function(g){h.co(g,c.Cl)};a.prototype.Lj=function(g){h.Lj(g,c.Cl)};a.prototype.eFa=function(g){return h.I5(g)};a.prototype.yha=function(g){g=new f(g,this);g.QG(this.Wa(),this.Ab());g.setPosition(.5,.5,0,1);this.Hda.append(g.hd());this.Cc.push(g);this.Qx=!0};a.prototype.removeItem=function(g){if(g=this.Kq(g))this.Cc=l.without(this.Cc,g),g.hd().detach(),this.Qx=!0};a.prototype.Pha=function(g){if(g=
this.Kq(g))this.Cc=l.without(this.Cc,g),this.Cc.push(g),this.Qx=!0};a.prototype.rab=function(g,n){this.Kq(g).hC(n)};a.prototype.xs=function(g,n){this.Kq(g).gf(n)};a.prototype.oab=function(g,n){this.Kq(g).ko(n)};a.prototype.HU=function(g,n,q,p){this.Kq(g).setPosition(n,q,p)};a.prototype.iT=function(g){return this.Kq(g).getX()};a.prototype.jT=function(g){return this.Kq(g).getY()};a.prototype.RDa=function(g){return this.Kq(g).cs()};a.prototype.hT=function(g){return this.Kq(g).Wa()};a.prototype.gT=function(g){return this.Kq(g).Ab()};
a.prototype.render=function(){if(this.cF){this.A2a();this.$_a();for(var g=0;g<this.Cc.length;g++)this.Cc[g].render()}};a.prototype.A2a=function(){if(this.E0){this.E0=!1;for(var g=this.Wa(),n=this.Ab(),q=0;q<this.Cc.length;q++)this.Cc[q].QG(g,n)}};a.prototype.$_a=function(){if(this.Qx){this.Qx=!1;for(var g=[],n=0;n<this.Cc.length;n++){var q=this.Cc[n],p={};p.R3=q.iP;p.index=n;p.renderer=q;g.push(p)}g.sort(function(r,t){return r.R3==t.R3?r.index-t.index:r.R3-t.R3});for(n=0;n<g.length;n++)g[n].renderer.O$a(n+
1)}};a.prototype.Kq=function(g){if(this.beb==g)return this.aeb;for(var n=null,q=0;q<this.Cc.length&&!n;q++)this.Cc[q].getItem()==g&&(n=this.Cc[q]);return n};a.prototype.Dc=function(){this.E0=!0;this.render()};a.prototype.tj=function(){this.cF=!0;this.render()};a.prototype.sj=function(){this.cF=!1};return a});
define("kL","require lV cI fq km iZ gZ nS iB eo pB".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("fq"),k=a("km"),c=a("iZ"),h=a("gZ"),f=a("nS"),b=a("iB"),e=a("eo"),g=a("pB");a=m.define("PhotoAlbumPlayer",c,function(){c.call(this,"photoAlbum");this.h1=this.Gda=this.ri=!1;this.O=this.j=null;this.BPa=new k(this,"buttonNext",e.Me);this.BPa.bind(g.ma,this.Wva,this);this.CPa=new k(this,"buttonPrevious",e.Me);this.CPa.bind(g.ma,this.pwa,this);this.Kd=d.Ip(this.jh,this)});a.prototype.next=function(){this.Wva()};
a.prototype.pause=function(){this.LE()};a.prototype.play=function(){this.ME()};a.prototype.previous=function(){this.pwa()};a.prototype.stop=function(){this.GA()};a.prototype.restart=function(){this.FA()};a.prototype.set=function(n,q){if(this.get(n)!=q){switch(n){case "photoAlbum":this.Gda=!0;this.Kd();break;case "viewerArea":this.ri=!0;this.Kd();break;case "touchTransition":case "mouseTransition":case "touchTransitionDuration":case "mouseTransitionDuration":case "transitionDuration":this.h1=!0,this.Kd()}c.prototype.set.call(this,
n,q)}};a.prototype.jh=function(){this.ri&&(this.ri=!1,this.h1=!0,this.dw(),this.get("viewerArea")&&this.bw(),this.kR(this.get("viewerArea")));this.j&&this.Gda&&(this.Gda=!1,this.get("photoAlbum")?(this.KG(),this.O.Iab(this.get("photoAlbum"))):this.O.Ey());this.h1&&(this.h1=!1,this.VAa())};a.prototype.uK=function(){this.set("photoAlbum",null)};a.prototype.bw=function(){var n=this.get("viewerArea");this.j=new b;this.j.ra({left:0,top:0,bottom:0,right:0});n.Za(this.j);this.O=new h(n,this.j);this.VAa();
this.O.bind(h.Wp,this.To,this);this.O.bind(h.Vp,this.ar,this);this.O.bind(h.V6,this.cQ,this);this.O.bind(h.W6,this.cwa,this);this.O.bind(h.X6,this.dwa,this);this.O.bind(h.Uc,this.lf,this);this.aB(!0)};a.prototype.dw=function(){this.j&&(this.O.unbind(h.Wp,this.To,this),this.O.unbind(h.Vp,this.ar,this),this.O.unbind(h.V6,this.cQ,this),this.O.unbind(h.W6,this.cwa,this),this.O.unbind(h.X6,this.dwa,this),this.O.unbind(h.Uc,this.lf,this),this.O.clear(),this.j.getParent().removeChild(this.j),this.j=null,
this.aB(!1))};a.prototype.VAa=function(){var n=this.get("viewerArea");n&&this.O&&(n.No?this.O.m5(this.get("touchTransition",f.oo),this.get("touchTransitionDuration",n.get("transitionDuration",1E3))):this.O.m5(this.get("mouseTransition",f.oo),this.get("mouseTransitionDuration",n.get("transitionDuration",1E3))))};a.prototype.lf=function(n){this.wd(n.data.state)};a.prototype.To=function(n){this.sP(n.data.photoAlbum)};a.prototype.ar=function(n){this.rP(n.data.photoAlbum)};a.prototype.cQ=function(n){n.data.photoAlbum.trigger(new l(g.Gb))};
a.prototype.cwa=function(n){n.data.item.nB()};a.prototype.dwa=function(n){n.data.item.end()};a.prototype.Ki=function(n){this.j.getParent().ra({progressPercent:n.data.percent,progressVisible:!0})};a.prototype.BJ=function(){this.j.getParent().set("progressVisible",!1)};a.prototype.Wva=function(){this.O&&this.get("photoAlbum")&&this.O.next()};a.prototype.pwa=function(){this.O&&this.get("photoAlbum")&&this.O.Cka()};a.prototype.Sk=function(){this.O&&this.get("photoAlbum")&&this.O.play()};a.prototype.lp=
function(){this.O&&this.get("photoAlbum")&&this.O.stop()};a.prototype.ir=function(){this.O&&this.get("photoAlbum")&&this.O.pause()};return a});
define("hs",["require","fq","dn","iM"],function(a){var d=a("fq"),l=a("dn"),m=a("iM");a=d.define("PhotoAlbumPlayListItem",m,function(){m.call(this)});a.prototype.start=function(){m.prototype.start.call(this);var k=this.get("player");k&&(k.bind(l.th,this.To,this),k.set("photoAlbum",this.get("media")))};a.prototype.stop=function(){var k=this.get("player");k&&(k.unbind(l.th,this.To,this),k.get("photoAlbum")==this.get("media")&&k.set("photoAlbum",null));m.prototype.stop.call(this)};a.prototype.HM=function(){var k=
this.get("media");if(k){var c=k.get("playList");c&&(k=c.get("selectedIndex"),c=c.get("items"),0<=k&&c&&c[k].HM())}m.prototype.HM.call(this)};a.prototype.To=function(){this.get("player").unbind(l.th,this.To,this);this.get("player").bind(l.Vm,this.ar,this);this.nB()};a.prototype.ar=function(k){k.data.media==this.get("media")&&(this.get("player").unbind(l.Vm,this.ar,this),this.stop(),this.end())};return a});
define("mj",["require","iy","fq","jx"],function(a){var d=a("iy"),l=a("fq"),m=a("jx");return l.define("PhotoAudio",m,function(){m.call(this,d.SMa)})});define("of",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("PhotoCamera",d,function(){d.call(this)})});
define("fb","require er mz cI fq jY pB".split(" "),function(a){var d=a("er"),l=a("mz"),m=a("cI"),k=a("fq"),c=a("jY"),h=a("pB");a=k.define("PlayList",l,function(){l.call(this);this.Sf=-1;this.Ch=[];this.GQ=this.ck=this.De=void 0});a.prototype.set=function(f,b){"selectedIndex"==f?this.B_a(b):"items"==f?this.n_a(b):l.prototype.set.call(this,f,b)};a.prototype.get=function(f,b){return"selectedIndex"==f?this.Sf:"items"==f?this.Ch:l.prototype.get.call(this,f,b)};a.prototype.dispose=function(){this.De&&(this.De.unbind(h.Tp,
this.gQ,this),this.De.unbind(h.Yf,this.At,this),this.De.unbind(h.Gb,this.At,this),this.De=null)};a.prototype.n_a=function(f){f=f||[];if(!d.isEqual(this.Ch,f)){var b=this.Sf;this.Ch=f;f=this.eya(this.Sf);this.trigger(new m(h.zV,{nextSelectedIndex:f}));this.Sf=f;this.Pya(this.dA(this.Sf));this.NAa();this.trigger(new m(h.ba,{previousSelectedIndex:b}));l.prototype.set.call(this,"items",this.Ch);l.prototype.set.call(this,"selectedIndex",this.Sf)}};a.prototype.B_a=function(f){f=this.eya(f);if(this.Sf!=
f){var b=this.Sf;this.trigger(new m(h.zV,{nextSelectedIndex:f}));this.Sf=f;this.Pya(this.dA(this.Sf));this.NAa();this.trigger(new m(h.ba,{previousSelectedIndex:b}));l.prototype.set.call(this,"selectedIndex",this.Sf)}};a.prototype.eya=function(f){return Math.max(-1,Math.min(this.Ch.length-1,f))};a.prototype.dA=function(f){return 0<=f?this.Ch[f]:null};a.prototype.Pya=function(f){this.De==f&&void 0===this.ck||this.ck===f||(void 0===this.ck?(this.ck=f,this.De?this.ck&&this.De.get("player")==this.ck.get("player")?
(this.De.HM(),this.At()):this.GVa(this.De,this.ck)?(f=this.De,f.HM(),this.At(),f.IKa()):(this.Ita(this.De,this.ck)?this.De.get("media").get("modelLocations",[]).forEach(function(b){var e=!(b.get("model")!=this.ck.get("media")||!b.get("forceModelLoading"));b.set("preferred",e)}.bind(this)):this.d3a(this.De,this.ck)&&this.De.get("player").xcb(),this.De.stop()):this.At()):this.ck=f)};a.prototype.GVa=function(f,b){return this.Jba(f)&&this.Nba(b)&&this.Hta(b,f)};a.prototype.Ita=function(f,b){return this.Nba(f)&&
this.Jba(b)?this.Hta(f,b)?!0:f.get("player").get("keepModel3DLoadedWithoutLocation")&&f.get("player").get("model3DPlayer")==b.get("player")?f.get("player").get("model3DPlayer").get("model")==b.get("media")?!0:!1:!1:!1};a.prototype.Hta=function(f,b){return f.get("player")&&f.get("player").get("model3DPlayer")==b.get("player")&&f.get("media").get("modelLocations",[]).find(function(e){return e.get("model")==b.get("media")&&(b.get("media").get("isLoaded")||e.get("forceModelLoading"))})};a.prototype.d3a=
function(f,b){return this.Nba(f)&&this.Jba(b)&&f.get("player").get("model3DPlayer")==b.get("player")};a.prototype.Nba=function(f){return f&&k.Ja("PanoramaPlayListItem",f)};a.prototype.Jba=function(f){return f&&k.Ja("Model3DPlayListItem",f)};a.prototype.At=function(){this.De&&(this.De.unbind(h.Tp,this.gQ,this),this.De.unbind(h.Yf,this.At,this),this.De.unbind(h.Gb,this.At,this));this.ck?(this.Ita(this.De,this.ck)&&this.De.get("player").bind(h.P7,this.HA,this,!0),this.De=this.ck,this.ck=void 0,this.De.bind(h.Tp,
this.gQ,this),this.De.bind(h.Yf,this.At,this),this.De.start()):(this.ck=this.De=void 0,this.set("selectedIndex",-1))};a.prototype.HA=function(f){f.source.unbind(h.P7,this.HA,this);this.gQ();this.De.HKa()};a.prototype.gQ=function(){this.De.unbind(h.Tp,this.gQ,this);this.De.unbind(h.Yf,this.At,this);this.De.bind(h.Gb,this.At,this)};a.prototype.NAa=function(){this.GQ&&c.a4(this.GQ.get("media"),-1);(this.GQ=this.Ch&&0<=this.Sf?this.Ch[(this.Sf+1)%this.Ch.length]:null)&&c.a4(this.GQ.get("media"),1)};return a});
define("kW",["require","fq","fb"],function(a){var d=a("fq"),l=a("fb");return d.define("PhotoPlayList",l,function(){l.call(this)})});define("ll",["require","fq","iM"],function(a){var d=a("fq"),l=a("iM");return d.define("PhotoPlayListItem",l,function(){l.call(this)})});define("eL",["require","gK","fq"],function(a){var d=a("gK");return a("fq").define("PlaybackBar",d,function(){d.call(this)})});
define("nK",["require"],function(){function a(m){try{for(var k=(l.LT<<12)+l.RT&65535,c="",h=0,f=m.length;h<f;){var b=d.indexOf(m.charAt(h++))<<12|d.indexOf(m.charAt(h++))<<6|d.indexOf(m.charAt(h++))<<0;b=b-k+65536&65535;c+=String.fromCharCode(b)}return c}catch(e){if("{%"==m.substr(0,2))return""}}var d="";[[65,26],[97,26],[48,10]].forEach(function(m){for(var k=0;k<m[1];k++)d+=String.fromCharCode(m[0]+k)});d+="+/";var l={f5a:"false"};l.LT=parseInt("0")||
0;l.RT=parseInt("2252")||1;l.Tbb="false";l.name=a("AktAk9AktAk+Ak1Aj/AkCAj8Aj6AkvAk7Ak5");l.iLa=a("Ak0AlAAlAAk8AkGAj7Aj7AktAk9AktAk+Ak1Aj/AkCAj8Aj6AkvAk7Ak5Aj7");return l});
define("fs","require exports pB w cl S".split(" "),function(a,d,l,m,k,c){function h(z){return Math.round(z)+"px"}function f(z){return z.map(function(B){return String.fromCharCode(B)}).join("")}a=function(){function z(B){var D=this;this.zm=B;this.Sr=document.createElement("div");this.visible=!1;[l.tc,l.G(b),l.G(e),l.G(g),l.G(n),l.G(q)].forEach(function(F){D.zm.bind(F,D.update,D,!0)});this.update()}z.prototype.update=function(){var B=this;if(this.zm.get(b)&&!this.interval){var D=function(){B.visible=
!B.visible;if(B.visible){for(var X in y)B.Sr.style[X]=y[X];X=B.zm.Xd();B.Sr.parentElement&&X.removeChild(B.Sr);var K=Array.from(X.childNodes).concat([null]);X.insertBefore(B.Sr,K[Math.floor(Math.random()*K.length)]);B.Sr.style[w]="1"}else B.Sr.style[w]="0"};this.interval=setInterval(D,x);D()}D=this.zm.Wa();var F=this.zm.Ab(),A=this.Sr.clientWidth,E=this.Sr.clientHeight,J=this.Z2(e,.01*D),C=this.Z2(g,.01*F),L=this.Z2(n,.01*D),T=this.Z2(q,.01*F),S={};void 0!==J?(S[p]=h(Math.max(0,Math.min(D-A,J))),
S[t]=v):void 0!==L?(S[t]=h(Math.max(0,Math.min(D-A,L))),S[p]=v):(S[p]=h((D-A)/2),S[t]=v);void 0!==C?(S[r]=h(Math.max(0,Math.min(F-E,C))),S[u]=v):void 0!==T?(S[u]=h(Math.max(0,Math.min(F-E,T))),S[r]=v):(S[r]=h((F-E)/2),S[u]=v);for(var U in S)this.Sr.style[U]=S[U]};z.prototype.Z2=function(B,D){B=this.zm.get(B);var F=c.fo(B);return void 0===F?B:F*D};return z}();var b=f([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107]),e=f([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,76,
101,102,116]),g=f([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,84,111,112]),n=f([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,82,105,103,104,116]),q=f([97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107,66,111,116,116,111,109]),p=f([108,101,102,116]),r=f([116,111,112]),t=f([114,105,103,104,116]),u=f([98,111,116,116,111,109]),v=f([97,117,116,111]),w=f([111,112,97,99,105,116,121]);f([33,105,109,112,111,114,116,97,110,116]);var x=8E3,y={};y[f([98,97,99,107,
103,114,111,117,110,100,73,109,97,103,101])]=f([117,114,108,40,34])+k.MLa+f([34,41]);y[f([112,111,115,105,116,105,111,110])]=f([97,98,115,111,108,117,116,101]);y[f([122,45,105,110,100,101,120])]=f([49,48,48,48]);y[f([119,105,100,116,104])]=m.pb()?f([53,53,118,109,105,110]):f([52,54,48,112,120]);y[f([104,101,105,103,104,116])]=m.pb()?f([49,55,46,57,51,118,109,105,110]):f([49,53,48,112,120]);y[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]);y[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]);y[f([98,97,99,107,103,114,111,117,110,100,83,105,122,101])]=f([99,111,110,116,97,105,110]);y[f([111,112,97,99,105,116,121])]=f([49]);y[f([112,111,105,110,116,101,114,69,118,101,110,116,115])]=f([110,111,110,101]);y[f([116,114,97,110,115,105,116,105,111,110])]=f([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("iT",["require"],function(){return{ab:"left",ub:"right",Hc:"top",Ac:"bottom"}});
define("gf",["require","lV","eF","X","iT"],function(a){var d=a("lV"),l=a("eF");a("X");a("iT");a=d.extend(l,function(){l.call(this)});a.prototype.CO=function(){return 0};a.prototype.DO=function(){return 0};a.prototype.pK=function(){l.prototype.pK.call(this);this.$z(function(m){m.Ze(!0)})};a.prototype.yx=function(){l.prototype.yx.call(this);this.$z(function(m){m.OU(this.CO(m,this.ll()));m.PU(this.DO(m,this.ll()))})};a.prototype.nK=function(){this.$z(function(m){m.OU(this.CO(m,1));m.PU(this.DO(m,1))});
l.prototype.nK.call(this)};a.prototype.oK=function(){this.$z(function(m){m.OU(this.CO(m,0));m.PU(this.DO(m,0))});l.prototype.oK.call(this)};return a});
define("oe",["require","lV","gf","iT"],function(a){var d=a("lV"),l=a("gf"),m=a("iT");a=d.extend(l,function(){l.call(this)});a.prototype.CO=function(k,c){switch(this.get("from")){case m.Hc:case m.Ac:return 0;case m.ab:var h=k.Na;k=k.Wa();return isNaN(k)||isNaN(h)?1E4:(-h-k)*(1-c);default:h=k.getParent();if(!h)return 0;var f=h.Bf();h=k.Na;return isNaN(h)||isNaN(f)?1E4:(f-h)*(1-c)}};a.prototype.DO=function(k,c){switch(this.get("from")){case m.Hc:var h=k.Qa;k=k.Ab();return isNaN(k)||isNaN(h)?1E4:(-h-
k)*(1-c);case m.Ac:h=k.getParent();if(!h)return 0;var f=h.Af();h=k.Qa;return isNaN(h)||isNaN(f)?1E4:(f-h)*(1-c);default:return 0}};a.prototype.oK=function(){this.$z(function(k){k.OU(0);k.PU(0);k.Ze(!1)})};return a});
define("ib",["require","lV","gf","X","iT"],function(a){var d=a("lV"),l=a("gf");a("X");var m=a("iT");a=d.extend(l,function(){l.call(this)});a.prototype.CO=function(k,c){switch(this.get("to")){case m.Hc:case m.Ac:return 0;case m.ab:var h=k.Na;k=k.Wa();return isNaN(k)||isNaN(h)?1E4:(-h-k)*c;default:h=k.getParent();if(!h)return 0;var f=h.Bf();h=k.Na;return isNaN(h)||isNaN(f)?1E4:(f-h)*c}};a.prototype.DO=function(k,c){switch(this.get("to")){case m.Hc:var h=k.Qa;k=k.Ab();return isNaN(k)||isNaN(h)?1E4:(-h-
k)*c;case m.Ac:h=k.getParent();if(!h)return 0;var f=h.Af();h=k.Qa;return isNaN(h)||isNaN(f)?1E4:(f-h)*c;default:return 0}};a.prototype.nK=function(){this.$z(function(k){k.OU(0);k.PU(0);k.Ze(!1)})};return a});
define("I","require jquery.mod lV pB pz w gl nF cZ d T oe ib kN".split(" "),function(a){function d(v){try{return window.localStorage.getItem(v)}catch(w){}}var l=a("jquery.mod"),m=a("lV"),k=a("pB"),c=a("pz"),h=a("w"),f=a("gl"),b=a("nF"),e=a("cZ"),g=a("d"),n=a("T"),q=a("oe"),p=a("ib"),r=a("kN");a=m.extend(n,function(v){n.call(this);this.Vd=v;this.ij=this.oD=this.Iz=this.tm=null;v=new q;v.set("duration",500);v.set("from","bottom");v=new p;v.set("duration",500);v.set("to","bottom");this.ra({creationPolicy:e.PC,
verticalAlign:b.se,horizontalAlign:b.$e,visible:!1,showEffect:this.reb,hideEffect:this.seb});this.Mfa="";v=this.iUa();!0===v?setTimeout(function(){this.trigger(k.AH)}.bind(this),0):void 0===v&&(this.Vd.bind(k.G("cookiesPolicy"),this.Kqa,this),setTimeout(function(){this.Kqa()}.bind(this),0))});a.prototype.Hb=function(){n.prototype.Hb.call(this);this.ra({backgroundColor:"#1a1a1a",width:"100%",left:0,bottom:0});null==this.tm&&(this.tm=new r,this.tm.ra({content:this.Mfa,fontColor:"#ffffff",fontWeight:"400",
fontFamily:"Open Sans, Arial, sans-serif",width:"100%"}),this.Za(this.tm));null==this.Iz&&(this.Iz=new n,this.Za(this.Iz),this.Iz.ra({creationPolicy:e.PC,verticalAlign:b.se,layout:g.Ig}));null==this.oD&&(this.oD=new f,this.oD.ra({backgroundColor:"#2aabe2",fontColor:"#ffffff",fontFamily:"Open Sans, Arial, sans-serif",label:c("accept").toUpperCase(),verticalAlign:"middle"}),this.Iz.Za(this.oD),this.oD.bind(k.ma,this.tPa,this,!0));null==this.lI&&(this.lI=new f,this.lI.ra({backgroundColor:"#1a1a1a",fontColor:"#808080",
fontFamily:"Open Sans, Arial, sans-serif",label:c("reject").toUpperCase(),textDecoration:"underline",verticalAlign:"middle"}),this.Iz.Za(this.lI),this.lI.bind(k.ma,this.EPa,this,!0))};a.prototype.Pt=function(){n.prototype.Pt.apply(this,arguments);var v=this.Db();v&&(v.bind(k.tc,this.wm,this,!0),this.wm())};a.prototype.wm=function(){var v=this.Db();if(v){var w=h.pb(),x=v.Ab()>v.Wa(),y=Math.min(v.Wa(),v.Ab())/100;v=function(z){return Math.round(z*y)};this.ra({gap:w?v(4.63):20,paddingLeft:w?v(4.63):
20,paddingRight:w?v(4.63):20,paddingTop:w?v(4.63):14,paddingBottom:w?v(4.63):14,layout:w&&x?g.Yh:g.Ig});this.tm&&this.tm.ra({fontSize:w?v(3.15):14,textAlign:w&&x?"center":"left"});this.Iz&&this.Iz.ra({gap:w?0:13});this.oD&&this.oD.ra({borderRadius:w?v(4.63):15,fontSize:w?v(3.15):14,height:w?v(9.26):30,paddingLeft:w?v(6):20,paddingRight:w?v(6):20});this.lI&&this.lI.ra({borderRadius:w?v(4.63):15,fontSize:w?v(3.15):14,height:w?v(9.26):30,paddingLeft:w?v(6):20,paddingRight:w?v(6):20});this.Yd()}};a.prototype.Kqa=
function(){var v=m.toArray(this.Vd.get("cookiesPolicy"));this.CQ!=v&&(this.CQ=v,this.pZa())};a.prototype.pZa=function(){if(0==this.CQ.length)this.bfa(null);else{var v=this.CQ[0];0==m.toArray(v.get("geographicArea")).length?this.bfa(v):this.ATa(function(w){for(var x=null,y=0;y<this.CQ.length&&!x;y++){var z=this.CQ[y],B=m.toArray(z.get("geographicArea"));if(0==B.length)x=z;else for(var D=0;D<B.length&&!x;D++)0<=w.indexOf(B[D])&&(x=z)}this.bfa(x)}.bind(this))}};a.prototype.bfa=function(v){this.UJ!==
v&&(this.UJ&&this.UJ.unbind(k.G("url"),this.Oga,this),(this.UJ=v)?(this.UJ.bind(k.G("url"),this.Oga,this),this.Oga(),this.set("visible",!0)):(this.trigger(k.AH),this.set("visible",!1)))};a.prototype.Oga=function(){var v=l(document.createElement("div")).html(c("cookies-notice"));v.find("a").css({color:"#2aabe2",cursor:"pointer","text-decoration":"underline"}).attr({href:this.UJ.get("url"),target:"_blank"});this.Mfa=v.html();this.tm&&this.tm.set("content",this.Mfa)};a.prototype.tPa=function(){this.Rya(!0);
this.set("visible",!1);this.trigger(k.AH)};a.prototype.EPa=function(){this.Rya(!1);this.set("visible",!1)};var t="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.ATa=function(v){this.nTa(function(w){var x=[w];t.indexOf(w)&&x.push("EU");v(x)})};a.prototype.nTa=function(v){var w=d("tdvp_country_code");w?v(w):this.Ora||(this.Ora=!0,l.get("https://geoloc.3dvista.com",function(x){this.Ora=!1;x=x.country.toUpperCase();try{window.localStorage.setItem("tdvp_country_code",
x)}catch(y){}v(x)}.bind(this)))};var u="tdvp_accept_cookies_"+window.location.origin+window.location.pathname;a.prototype.iUa=function(){var v=d(u);if("yes"==v)return!0;if("no"==v)return!1};a.prototype.Rya=function(v){try{window.localStorage.setItem(u,v?"yes":"no")}catch(w){}};return a});
define("mK",["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&&-1==x.indexOf("://")?("undefined"!==typeof window?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 d(w,x){return new Promise(function(y,z){(void 0===x?k():Promise.resolve(x)).then(function(B){(window.webkitRequestFileSystem||
window.requestFileSystem)(B?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(B){console.log("error getting file system access",B);z("error getting file system")})})}function l(w,x){return w&&w.queryUsageAndQuota?new Promise(function(y,z){w.queryUsageAndQuota(function(B,D){console.log("UsedBytes:",B,"grantedBytes:",D,"freeBytesRequired:",x);var F=B+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(A){console.log("Not granted bytes:",F,A);z("not enough free space granted")})):(console.log("Not enough temporary free space."),z("not enough free space granted"))},function(B){console.log("Query quota error:",B);B&&B.message&&(B=B.message);z("not enough free space granted: "+B)})}):Promise.reject("unknown free space")}function m(){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 k(){return navigator.storage&&navigator.storage.persisted?navigator.storage.persisted():Promise.resolve(!1)}function c(){return v?Promise.resolve(v):Promise.reject("files uninitialized, no space was requested")}function h(w){w.length&&"/"==w[0]&&(w=w.substr(1));
return w.split("/").filter(function(x){return""!=x})}function f(w){return new Promise(function(x,y){w.remove(function(){x()},function(z){y("can't remove entry"+(z&&z.message?": "+z.message:"")+".")})})}function b(w){return e(w).then(function(x){return Promise.all(x.map(function(y){return y.isDirectory?b(y):f(y)}))}).then(function(){return f(w).then(function(){return Promise.resolve()},function(){return Promise.resolve()})})}function e(w){return new Promise(function(x,y){w.createReader().readEntries(function(z){x(z)},
function(){y("can't list directory")})})}function g(w,x,y){return new Promise(function(z,B){w.getDirectory(x,y,function(D){z(D)},function(){B("can't get directory entry: "+x)})})}function n(w,x){return new Promise(function(y,z){g(w,x,{create:!1}).then(function(B){y(B)})["catch"](function(){g(w,x,{create:!0}).then(function(B){y(B)})["catch"](function(B){console.log("Can't create directory entry: "+x,B);z("can't create directory entry: "+x)})})})}function q(w,x){return 0==x.length?w:n(w,x[0]).then(function(y){return q(y,
x.slice(1))})}function p(w,x){return 0==x.length?w:g(w,x[0]).then(function(y){return p(y,x.slice(1))})}function r(w,x,y){return new Promise(function(z,B){w.getFile(x,y,function(D){z(D)},function(){B("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((0>x?"":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{G4:function(){return k()},toURL:function(w,x){return a(w).then(function(y){y=
new window.URL(y);var z=x?"persistent":"temporary",B=y.pathname.split("/").map(encodeURIComponent).join("/");return"filesystem:"+y.origin+"/"+z+B})},d$a:function(w){return m().then(function(x){return l(x,w)}).then(function(x){return d(x)}).then(function(x){v=x})},P9a:function(w){w=h(w);var x=w[w.length-1],y=w.slice(0,-1);return c().then(function(z){return p(z.root,y)}).then(function(z){return r(z,x,{create:!0})},function(){return Promise.resolve(null)}).then(function(z){return z&&f(z)})},YHa:function(w,
x){var y=h(w);return d(1024,x).then(function(z){return p(z.root,y)}).then(function(z){return b(z)},function(){return Promise.resolve()})},jLa:function(w,x,y){var z=h(w),B=z[z.length-1],D=z.slice(0,-1);return c().then(function(F){return q(F.root,D)}).then(function(F){return r(F,B,{create:!1}).then(function(A){return Promise.resolve(A)},function(){return r(F,B,{create:!0})})}).then(function(F){return t(F)}).then(function(F){F.seek(F.length);return new Promise(function(A,E){F.onwriteend=function(){A()};
F.onerror=function(J){console.log("Error writing file:",w,J);E("error writing file: "+w)};F.write(new Blob([x],{type:y||u(B)}))})})}}});
define("cG",["require","mK","mV","w"],function(a){function d(b,e){this.Kt=b;this.Kz=!1;this.bp=null;this.$w=e||function(){}}function l(b){return 1048576<=b.kH}var m=a("mK"),k=a("mV"),c=a("w").Ef()?3:5;a={File:function(b,e){this.url=b;this.kH=e;this.vU=this.aL=0}};var h=a.Files=function(b,e,g,n){this.Wpa=this.dPa=b;this.Dt=e.slice();this.Nra=[];var q=0;this.Dt.sort(function(p,r){return p.kH-r.kH});this.Dt.forEach(function(p){q+=p.kH});this.Nza=q;this.LD=[];this.MW=void 0;this.nt=[];this.g9=!1;this.lg=
g||function(){};this.mO=n||function(){}};h.prototype.ou=function(){return this.aQa().then(function(){return this.bQa()}.bind(this))};h.prototype.aQa=function(){return self.caches["delete"](this.Wpa)};h.prototype.bQa=function(){var b=(new window.URL(this.dPa)).pathname;return m.YHa(b,!1).then(function(){return m.YHa(b,!0)})};h.prototype.requestStorage=function(){return m.d$a(Math.round(1.1*this.Nza+10485760)).then(function(){return m.G4()})};h.prototype.download=function(){this.g9=!1;this.MW=0;this.ou().then(function(){this.hO()}.bind(this))["catch"](function(b){console.log("error cleaning storage",
b);m.G4().then(function(e){this.mO(!1,e)}.bind(this))}.bind(this))};h.prototype.cancelDownload=function(){this.g9=!0;this.nt.forEach(function(b){b.cancel()});this.ou()};h.prototype.hO=function(){if(!(this.g9||this.nt.length>=c))if(0<this.Dt.length){if(1==c)var b=.5<Math.random()?this.Dt.shift():this.Dt.pop();else if(0==this.LD.filter(l).length)b=this.Dt.pop();else{if(l(this.Dt[0]))return;b=this.Dt.shift()}this.LD.push(b);var e=k.lB(b.url,"nc="+(new Date).getTime()),g=new d(e,function(q){b.aL=q.aL;
this.zj()}.bind(this));this.nt.push(g);g.fetch().then(function(q){return this.z0a(b.url,q)}.bind(this)).then(function(){this.sra(b,g,!0)}.bind(this))["catch"](function(q){console.log("download error",b.url,b.kH,b.aL,q);this.sra(b,g,!1)}.bind(this));this.hO()}else if(0==this.nt.length){var n=5>=this.Nra.length;m.G4().then(function(q){this.mO(n,q)}.bind(this))}};h.prototype.sra=function(b,e,g){g?(this.LD.splice(this.LD.indexOf(b),1),this.nt.splice(this.nt.indexOf(e),1),this.MW+=b.kH,this.zj(),this.hO()):
(b.aL=0,b.vU+=1,this.zj(),20<=b.vU?(console.log("Error downloading file: "+b.url+" after "+b.vU+" retries."),this.Bta(b.url)?(this.Nra.push(b),this.nt.splice(this.nt.indexOf(e),1),this.hO()):(this.cancelDownload(),m.G4().then(function(n){this.mO(!1,n)}.bind(this)))):(console.log("Error downloading file: "+b.url+" attempt "+b.vU+" of 20. Will retry in 2000ms."),setTimeout(function(){this.LD.splice(this.LD.indexOf(b),1);this.nt.splice(this.nt.indexOf(e),1);l(b)?this.Dt.push(b):this.Dt.splice(0,0,b);
this.hO()}.bind(this),2E3)))};h.prototype.z0a=function(b,e){return this.B0a(b,e).then(function(){if(this.V2a(b))return this.A0a(b,e)}.bind(this))};h.prototype.A0a=function(b,e){e=e.clone();return 200!=e.status?Promise.reject("response status: "+e.status):self.caches.open(this.Wpa).then(function(g){return g.put(b,e)})};h.prototype.B0a=function(b,e){e=e.clone();if(200!=e.status)return Promise.reject("response status: "+e.status);var g=(new window.URL(b)).pathname;return g.lastIndexOf("/")==g.length-
1?Promise.resolve():new Promise(function(n,q){function p(){x.read().then(function(y){var z=y.value,B=[];if(z){for(;10485760<=z.length+w;){var D=z.slice(0,10485760-w);v.push(D);B.push(r(v));v=[];w=0;z=z.slice(D.length,z.length)}0<z.length&&(v.push(z),w+=z.length)}var F=y.done;w&&F&&B.push(r(v));t(B).then(function(){F?n():p()})["catch"](u)})["catch"](u)}function r(y){if(0==y.length)return new Uint8Array(0);var z=0;y.forEach(function(A){z+=A.length});for(var B=new Uint8Array(z),D=0,F=0;F<y.length;D+=
y[F].length,F++)B.set(y[F],D);return B}function t(y){if(0==y.length)return Promise.resolve();var z=y.shift();return m.jLa(g,z).then(function(){t(y)})}function u(y){console.log("Error writing response to file system:",y);m.P9a(g).then(function(){q("Error reading response body")})}var v=[],w=0,x=e.body.getReader();p()})};var f=".bmp .gif .glb .jpeg .jpg .m3u8 .m4a .m4v .mp3 .mp4 .ogg .ogv .otf .png .svg .tif .tiff .ts .tts .webm .woff .woff2".split(" ");h.prototype.Bta=function(b){b=(new window.URL(b)).pathname;
var e="."+b.split(".").pop().toLowerCase();return 0<=f.indexOf(e)&&0>b.indexOf("loading/")};h.prototype.V2a=function(b){var e=(new window.URL(b)).pathname;return 0<=e.indexOf("files/")||0<=e.indexOf("pdfjs/")?!0:this.Bta(b)?!1:!0};h.prototype.zj=function(){var b=this.MW;this.LD.forEach(function(e){b+=e.aL});this.lg(100*b/this.Nza)};d.prototype.fetch=function(){return fetch(this.Kt).then(function(b){if(this.Kz)return b.body.getReader().cancel(),Promise.reject("cancel requested before server responded.");
if(!b.ok)return Promise.resolve(b);var e=b.headers.get("content-length"),g=void 0,n=0;null!==e&&(g=parseInt(e,10));this.bp=b.body.getReader();var q=!1,p=function(u){this.Kz?u.close():q=!0}.bind(this),r=function(u){return this.bp.read().then(function(v){var w=v.value;w&&(n+=w.byteLength,u.enqueue(w));v.done&&(g=n,t(u));this.$w({kH:g,aL:n})}.bind(this))["catch"](function(v){console.log("Error reading response",v);u.error(v)}.bind(this))}.bind(this),t=function(u){q&&(u.close(),q=!1,this.bp=null)}.bind(this);
return new Response(new ReadableStream({start:function(u){return p(u)},pull:function(u){return r(u)},cancel:function(){t()}}))}.bind(this))};d.prototype.cancel=function(){this.Kz=!0;this.bp&&this.bp.cancel()};a.ou=function(b){return(new h(b,[])).ou()};return a});
define("fe","require lV jquery.mod pB gF w cG mK ni mV lW eU".split(" "),function(a){function d(u){p=u}var l=a("lV"),m=a("jquery.mod"),k=a("pB"),c=a("gF"),h=a("w"),f=a("cG"),b=a("mK"),e=a("ni"),g=a("mV"),n=a("lW"),q=a("eU"),p=null;window.addEventListener("beforeinstallprompt",d);var r=l.extend(c,function(u){c.call(this);this.Vd=u;this.C="initial";this.Rea=this.St=this.Xj=null;this.nx=!1;this.TD=null;this.I1=void 0;this.JD=p;this.SY=r.vFa();this.gca=g.Fj("vr");this.JD||this.SY||(window.removeEventListener("beforeinstallprompt",
d),window.addEventListener("beforeinstallprompt",this.GWa.bind(this)));this.SY||window.addEventListener("appinstalled",this.yOa.bind(this))});r.prototype.Hla=function(u){this.St=u;this.hn=g.Ny(this.St.get(TDV.PlayerSettings.BASE_DIR_URL)||g.getDirectory(this.St.get(TDV.PlayerSettings.SELECTED_SCRIPT_URL)));"/"!=this.hn[this.hn.length-1]&&(this.hn+="/");this.Xj=new t(this.hn);this.I1=this.Gxa=u.get(TDV.PlayerSettings.QUERY_STRING_PARAMETERS);this.TUa=g.parse(g.getDirectory(window.location.href)).pathname;
this.sSa=g.lB(g.Ny("files.json",this.hn),this.Gxa);u=TDV.cb.pEa();this.Rea=g.lB(this.St.get(TDV.PlayerSettings.SERVICE_WORKER_URL),"swv="+u.MAJOR+"."+u.MINOR);this.Xj=new t(this.hn);this.Xj.bind(k.ea,this.S0a,this,!0);this.Xj.load()};r.prototype.FL=function(){return this.Xj.state==t.YM};r.prototype.gCa=function(){return"can_install"==this.C&&!this.gca};r.prototype.iCa=function(){return this.FL()&&this.I1!=this.Xj.version&&!this.gca};r.prototype.fCa=function(){return this.Xj.state!=t.Nma&&!this.gca};
r.prototype.ZEa=function(){"can_install"==this.C&&(this.JD?(this.JD.userChoice.then(function(u){"accepted"!=u.outcome&&this.wd("unavailable")}.bind(this)),this.JD.prompt().then(function(){this.JD=null}.bind(this))):this.w$())};r.prototype.cancel=function(){"downloading"==this.C&&(this.TD&&(this.TD.cancelDownload(),this.TD=null),this.Xj.ou(),this.wd("unavailable"))};r.prototype.ou=function(){f.ou(this.hn);this.Xj.ou()};r.prototype.S0a=function(){this.St&&this.St.get(TDV.PlayerSettings.EV)?this.wd("unavailable"):
!0!==this.Vd.get("downloadEnabled")?this.wd("unavailable"):!0!==e.LLa?this.wd("unavailable"):h.browser()!=h.po||h.jc()==h.$y||h.jc()==h.uH?this.wd("unavailable"):this.Rea?"serviceWorker"in navigator?this.FL()&&!this.iCa()?this.wd("unavailable"):navigator.onLine?this.DYa():this.wd("unavailable"):this.wd("unavailable"):this.wd("unavailable")};r.prototype.wd=function(u){this.C!=u&&(this.C=u,u=0<=["can_install","unavailable"].indexOf(this.C),this.nx!=u&&(this.nx=u)&&this.trigger(k.jd))};r.prototype.DYa=
function(){this.wd("registering_sw");navigator.serviceWorker.register(this.Rea,{scope:this.TUa}).then(function(){this.qya(!0)}.bind(this))["catch"](function(){this.qya(!1)}.bind(this))};r.prototype.qya=function(u){u?h.Ef()?this.wd("can_install"):this.SY&&this.Xj.state==t.u6?(this.wd("can_install"),this.w$()):this.JD?this.wd("can_install"):(this.wd("sw_registered"),setTimeout(function(){"sw_registered"==this.C&&this.wd("can_install")}.bind(this),3E3)):this.wd("unavailable")};r.prototype.GWa=function(u){this.St&&
this.St.get(TDV.PlayerSettings.EV)||(this.JD=u,"sw_registered"==this.C&&this.wd("can_install"))};r.prototype.yOa=function(){this.St&&this.St.get(TDV.PlayerSettings.EV)||("sw_registered"==this.C&&this.wd("can_install"),this.w$())};r.prototype.w$=function(){this.wd("downloading");this.trigger(k.Tp);this.dAa(0);this.WVa()};r.prototype.WVa=function(){var u=g.lB(this.sSa,"nc="+(new Date).getTime());m.getJSON(u,function(v){if("downloading"==this.C){var w=[],x;for(x in v){var y=v[x].tags;if(y){Array.isArray(y)||
(y=[y]);for(var z=0;z<y.length;z++)0>w.indexOf(y[z])&&w.push(y[z])}}var B=[];0<=w.indexOf("mobilevr2gen")&&(h.I3()||h.J3())?B.push("mobilevr2gen"):0<=w.indexOf("mobilevr")&&h.Ef()?B.push("mobilevr"):0<=w.indexOf("mobile")&&h.pb()?B.push("mobile"):0<=w.indexOf("desktop")&&!h.pb()&&B.push("desktop");w=[];for(x in v)if(!(-1<x.indexOf(".DS_Store"))){if(y=v[x].tags){var D=!1;if(Array.isArray(y)){z=0;for(var F=y.length;z<F&&!D;z++)D=0<=B.indexOf(y[z])}else D=0<=B.indexOf(y);if(!D)continue}y=g.Ny(x,this.hn);
w.push(new f.File(y,v[x].size))}var A=(new window.URL(window.location.pathname,window.location.href)).toString();0==w.filter(function(E){return E.url==A}).length&&w.push(new f.File(A,1024));this.TD=new f.Files(this.hn,w,this.dAa.bind(this),this.rra.bind(this));this.TD.requestStorage().then(function(E){this.Xj.storage=E?t.jN:t.I7;this.Xj.state=t.u6;this.Xj.version=this.I1;this.Xj.save();this.TD.download()}.bind(this))["catch"](function(){this.rra(!1,void 0)}.bind(this))}}.bind(this))};r.prototype.dAa=
function(u){this.trigger(new n(k.mc,u))};r.prototype.rra=function(u,v){this.TD=null;this.wd("unavailable");u&&(this.Xj.state=t.YM,this.Xj.save());u?this.trigger(k.Gb,{success:!0}):v?this.trigger(k.Gb,{success:!1,error:r.Qma}):h.Ef()?this.trigger(k.Gb,{success:!1,error:r.Pma}):this.SY?this.trigger(k.Gb,{success:!1,error:r.Qma}):this.trigger(k.Gb,{success:!1,error:r.Rma})};r.vFa=function(){return g.mg("installed",!1)};r.D9a=function(u,v){var w=new r.m7(u);w.bind(k.ea,function(){var x=!1;w.state==r.m7.YM&&
(x=r.vFa()?!0:!navigator.onLine);x?b.toURL(u,w.storage==r.m7.jN).then(function(y){v(y)}):v(u)},this,!0);w.load()};r.Rma="launchFromHomeScreen";r.Pma="addToBookmark";r.Qma="errorDownloading";var t=l.extend(c,function(u){c.call(this);this.hn=u;this.Wba="installation_state_"+u;this.XXa=g.parse(this.hn).pathname+"installation_state.json";this.state=this.storage=this.version=void 0;this.xya()});t.prototype.load=function(){if(this.XVa()&&this.state==t.YM)this.Hza(this.storage==t.jN).then(function(){this.trigger(k.ea)}.bind(this))["catch"](function(){this.Hza(this.storage!=
t.jN).then(function(){this.storage=this.storage==t.I7?t.jN:t.I7;this.Kea();this.trigger(k.ea)}.bind(this))["catch"](function(){this.state=t.u6;this.Kea();this.trigger(k.ea)}.bind(this))}.bind(this));else this.trigger(k.ea)};t.prototype.save=function(){this.Kea();this.state==t.YM&&this.kZa()};t.prototype.XVa=function(){var u=q.getItem(this.Wba);if(!u)return!1;this.NSa(u);return!0};t.prototype.Kea=function(){q.setItem(this.Wba,this.Mza())};t.prototype.Hza=function(u){return new Promise(function(v,w){b.toURL(this.hn+
"installation_state.json",u).then(function(x){m.ajax({type:"GET",url:x,success:function(){v()},error:function(){w()}})}.bind(this))}.bind(this))};t.prototype.kZa=function(){b.jLa(this.XXa,this.Mza(),"text/json")};t.prototype.Mza=function(){var u={};u.version=this.version;u.storage=this.storage;u.state=this.state;return JSON.stringify(u)};t.prototype.NSa=function(u){this.MSa(JSON.parse(u))};t.prototype.MSa=function(u){this.version=u.version;this.storage=u.storage;this.state=u.state};t.prototype.ou=
function(){q.removeItem(this.Wba);this.xya()};t.prototype.xya=function(){this.version="";this.storage=t.eNa;this.state=t.Nma};t.eNa="unkonwn";t.I7="temporary";t.jN="persistent";t.Nma="not started";t.u6="started";t.YM="completed";r.m7=t;return r});
define("bg","require lV pB pz w fe gl gu nF d T e oU".split(" "),function(a){function d(r){var t=new f;t.ra({label:r,backgroundColor:"#0071BC",borderRadius:2,fontColor:"#ffffff",fontWeight:"400",fontFamily:"Arial, sans-serif",fontSize:14,paddingLeft:14,paddingRight:14,height:31,verticalAlign:e.se});return t}var l=a("lV"),m=a("pB"),k=a("pz"),c=a("w"),h=a("fe"),f=a("gl"),b=a("gu"),e=a("nF"),g=a("d"),n=a("T"),q=a("e"),p=a("oU");a=l.extend(n,function(r,t){n.call(this);this.Vd=r;this.vg=t;this.vg.bind(m.jd,
this.mVa,this,!0);this.vg.bind(m.Tp,this.jVa,this,!0);this.vg.bind(m.mc,this.lVa,this,!0);this.vg.bind(m.Gb,this.kVa,this,!0);this.ua="hidden";this.iS=void 0;this.Qda=!1;this.lg=void 0;this.ij=this.Vv=this.pD=this.tD=this.qD=this.J0=this.Pa=null;this.tOa();this.ra({backgroundColor:"#000000",gap:18,height:55,width:"100%",paddingLeft:28,paddingRight:28,verticalAlign:e.se,layout:g.Ig});this.Ag()});a.prototype.mVa=function(){this.vg.gCa()||this.vg.FL()&&this.vg.fCa()?(this.ua="ready",this.Qda&&this.nza()):
this.ua="hidden";this.Ag()};a.prototype.jVa=function(){this.ua="installing";this.Ag()};a.prototype.lVa=function(r){this.lg=r.Ug;this.Ag()};a.prototype.kVa=function(r){this.ua=r.data.success?"installed":"failed";this.Ira=r.data.error;this.Ag()};a.prototype.Pf=function(){this.y0a()};a.prototype.SZ=function(){this.Qda||(this.Qda=!0,"ready"==this.ua&&this.nza())};a.prototype.nza=function(){this.iS=setTimeout(function(){this.iS=null;this.LXa()}.bind(this),5E3);this.Ag()};a.prototype.y0a=function(){this.Qxa();
this.iS&&clearTimeout(this.iS);this.iS=null};a.prototype.LXa=function(){this.Qxa();"ready"==this.ua&&(this.ua="hidden",this.Ag())};a.prototype.tOa=function(){this.bind(m.Pb,this.Pf,this);this.Vd.bind(m.Pb,this.SZ,this);this.Vd.bind(m.hb,this.SZ,this)};a.prototype.Qxa=function(){this.unbind(m.Pb,this.Pf,this);this.Vd.unbind(m.Pb,this.SZ,this);this.Vd.unbind(m.hb,this.SZ,this)};a.prototype.Hb=function(){n.prototype.Hb.call(this);null==this.Pa&&(this.Pa=new p,this.Pa.ra({fontColor:"#ffffff",fontWeight:"400",
fontFamily:"Arial, sans-serif",fontSize:14,text:k("download-tour")}),this.Za(this.Pa));null==this.qD&&(this.qD=d(k("download")),this.Za(this.qD),this.qD.bind(m.ma,this.xPa,this,!0));null==this.tD&&(this.tD=d(k("refresh-downloaded")),this.Za(this.tD),this.tD.bind(m.ma,this.DPa,this,!0));null==this.pD&&(this.pD=d(k("delete-downloaded")),this.Za(this.pD),this.pD.bind(m.ma,this.wPa,this,!0));null==this.J0&&(this.J0=new q,this.J0.ra({width:"100%"}),this.Za(this.J0));null==this.Vv&&(this.Vv=new b,this.Vv.ra({backgroundColor:"#ffffff",
borderRadius:2,iconColor:"#000000",iconLineWidth:1,iconWidth:17,iconHeight:17,height:31,width:31}),this.Za(this.Vv),this.Vv.bind(m.ma,this.vPa,this,!0));null==this.ij&&(this.ij=d(k("cancel")),this.Za(this.ij),this.ij.bind(m.ma,this.Gz,this,!0));c.pb()&&this.wm();this.Ag()};a.prototype.tq=function(){n.prototype.tq.call(this);c.pb()&&this.getParent().bind(m.tc,this.wm,this,!0)};a.prototype.Pn=function(){c.pb()&&this.getParent().unbind(m.tc,this.wm,this,!0);n.prototype.Pn.call(this)};a.prototype.wm=
function(){var r=this.getParent();if(r){var t=Math.min(r.Wa(),r.Ab())/100,u=function(v){return Math.round(v*t)};this.ra({gap:u(3.9),height:u(11.9),paddingLeft:u(6),paddingRight:u(6)});this.Pa&&this.Pa.ra({fontSize:u(3)});[this.qD,this.ij,this.tD,this.pD].forEach(function(v){v&&v.ra({borderRadius:u(.4),fontSize:u(3),paddingLeft:u(3),paddingRight:u(3),height:u(6.7)})});this.Vv&&this.Vv.ra({borderRadius:u(.4),iconLineWidth:u(.22),iconWidth:u(3.7),iconHeight:u(3.7),height:u(6.7),width:u(6.7)})}};a.prototype.Ag=
function(){switch(this.ua){case "ready":var r=this.vg.FL()?k("downloaded"):k("download-tour");break;case "installing":r=k("downloading");void 0!==this.lg&&(r+="..."+this.lg.toFixed(1)+"%");break;case "installed":r=k("downloaded");break;case "failed":r=this.Ira==h.Rma?c.pb()?k("storage-not-provided-launch-from-homescreen"):k("storage-not-provided-launch-from-desktop"):this.Ira==h.Pma?k("storage-not-provided-bookmark"):k("download-failed")}this.Pa&&this.Pa.set("text",r);this.qD&&this.qD.set("visible",
"ready"==this.ua&&!this.vg.FL()&&this.vg.gCa());this.pD&&this.pD.set("visible","ready"==this.ua&&this.vg.FL()&&this.vg.fCa());this.tD&&this.tD.set("visible","ready"==this.ua&&this.vg.iCa());this.ij&&this.ij.set("visible","installing"==this.ua);this.Vv&&this.Vv.set("visible","installing"!=this.ua);this.set("visible","hidden"!=this.ua)};a.prototype.xPa=function(){this.vg.ZEa()};a.prototype.DPa=function(){this.vg.ZEa()};a.prototype.wPa=function(){this.vg.ou();this.ua="hidden";this.Ag()};a.prototype.Gz=
function(){this.vg.cancel();this.ua="hidden";this.Ag()};a.prototype.vPa=function(){"installing"==this.ua&&this.vg.cancel();this.ua="hidden";this.Ag()};return a});
define("od","require lV er pB pz w gl nF d T og oB oU jr jv".split(" "),function(a){function d(u,v){this.text=u;this.yp=v}var l=a("lV"),m=a("er"),k=a("pB"),c=a("pz"),h=a("w"),f=a("gl"),b=a("nF"),e=a("d"),g=a("T"),n=a("og"),q=a("oB"),p=a("oU"),r=a("jr"),t=a("jv");a=l.extend(g,function(){g.call(this);this.Uq=[];this.ij=this.rD=this.Pa=this.eE=this.kK=this.Jr=null;this.iI=this.iI.bind(this);this.Gz=this.Gz.bind(this);var u=new n;u.set("duration",500);u.set("easing","cubic_in");var v=new q;v.set("duration",
500);v.set("easing","cubic_out");this.ra({backgroundColor:"#000000",backgroundOpacity:.6,horizontalAlign:b.$e,gap:5,left:0,top:0,right:0,bottom:0,hideEffect:v,showEffect:u,visible:!1})});a.prototype.Hb=function(){g.prototype.Hb.call(this);null==this.Jr&&(this.Jr=new g,this.Jr.ra({centerX:0,centerY:0,backgroundColor:"#ffffff",horizontalAlign:b.$e,verticalAlign:b.se,layout:e.Yh,shadow:!0,shadowColor:"#000000",shadowHorizontalLength:0,shadowVerticalLength:0,shadowOpacity:.2}),this.Za(this.Jr));null==
this.Pa&&(this.Pa=new p,this.Pa.ra({fontColor:"#808080",fontWeight:"300",fontFamily:"Tahoma, Geneva, sans-serif"}),this.Jr.Za(this.Pa));null==this.eE&&(this.eE=new r,this.eE.ra({width:"80%"}),this.Jr.Za(this.eE));null==this.kK&&(this.kK=new g,this.kK.ra({backgroundColor:"#b3b3b3"}),this.Jr.Za(this.kK));null==this.jj&&(this.jj=new g,this.jj.ra({horizontalAlign:b.$e,verticalAlign:b.se,layout:e.Ig}),this.Jr.Za(this.jj));null==this.rD&&(this.rD=new f,this.rD.ra({backgroundColor:"#606060",fontColor:"#FFFFFF",
fontFamily:"Tahoma, Geneva, sans-serif",horizontalAlign:b.$e,verticalAlign:b.se,label:c("yes").toUpperCase(),pressedBorderColor:"#808080",rollOverBorderColor:"#808080",tabIndex:1}),this.rD.bind(k.ma,this.iI,this,!0),this.jj.Za(this.rD));null==this.ij&&(this.ij=new f,this.ij.ra({backgroundColor:"#606060",fontColor:"#FFFFFF",fontFamily:"Tahoma, Geneva, sans-serif",horizontalAlign:b.$e,verticalAlign:b.se,label:c("no").toUpperCase(),pressedBorderColor:"#808080",rollOverBorderColor:"#808080",tabIndex:1}),
this.ij.bind(k.ma,this.Gz,this,!0),this.jj.Za(this.ij))};a.prototype.tq=function(){g.prototype.tq.call(this);this.getParent().bind(k.tc,this.wm,this,!0)};a.prototype.Pn=function(){this.getParent().unbind(k.tc,this.wm,this,!0);g.prototype.Pn.call(this)};a.prototype.wm=function(){var u=this.getParent();if(u){var v=u.Wa();u=u.Ab();if(h.pb()){var w=Math.min(v,u);v=function(x){return Math.round(x*w/100)}}else v=function(x){return Math.round(4*x)};this.Jr&&this.Jr.ra({borderRadius:v(1),width:v(80),height:v(40),
gap:v(4),shadowBlurRadius:v(1),shadowSpread:v(1)});this.kK&&this.kK.ra({width:v(60),minHeight:2,height:v(.25)});this.jj&&this.jj.ra({gap:v(5)});this.ij&&this.ij.ra({borderRadius:v(1),width:v(20),height:v(10),fontSize:v(4.25)});this.rD&&this.rD.ra({borderRadius:v(1),width:v(20),height:v(10),fontSize:v(4.5)});this.Pa&&this.Pa.ra({fontSize:v(5)});this.w1()}};a.prototype.show=function(u,v){this.wm();var w=this.Hsa(v);0<=w&&this.Oxa(w);this.uYa(new d(u,v));this.hI()};a.prototype.hide=function(u){u=this.Hsa(u);
0<=u&&this.Oxa(u)};a.prototype.hI=function(){var u=this.getParent();u&&u.io(this,u.rb().length-1)};a.prototype.iI=function(){this.uW(!0)};a.prototype.Gz=function(){this.uW(!1)};a.prototype.Hsa=function(u){for(var v=0;v<this.Uq.length;v++)if(this.Uq[v].yp==u)return v;return-1};a.prototype.w1=function(){if(this.Jr){t.$9a(this.iI);t.Ika(this.Gz);var u=this.Xsa();u?(20>u.text.length?(this.eE.set("visible",!1),this.Pa.set("text",u.text),this.Pa.set("visible",!0)):(this.Pa.set("visible",!1),this.eE.set("html",
this.BTa(u.text)),this.eE.set("visible",!0)),this.ij.set("visible",u.yp?!0:!1),this.set("visible",!0),t.J3a(this.iI),t.wha(this.Gz)):this.set("visible",!1)}};a.prototype.BTa=function(u){return"<div style=\"color:#808080; font-weight:300; font-family:'Tahoma', 'Geneva', sans-serif; font-size: "+this.Pa.get("fontSize")+'px; text-align:center;" >'+u+"</div>"};a.prototype.uW=function(u){var v=this.Xsa();v&&(v=this.RTa(v.text),this.QYa(v),m(v).each(function(w){w.yp&&w.yp.call(this,u)},this))};a.prototype.uYa=
function(u){this.Uq.push(u);this.w1()};a.prototype.RTa=function(u){return m(this.Uq).filter(function(v){return v.text==u})};a.prototype.QYa=function(u){this.Uq=m(this.Uq).filter(function(v){return!m(u).contains(v)});this.w1()};a.prototype.Oxa=function(u){this.Uq.splice(u,1);u==this.Uq.length&&this.w1()};a.prototype.Xsa=function(){return 0<this.Uq.length?this.Uq[this.Uq.length-1]:null};return a});
define("jM","require lV pB cI gF w nO".split(" "),function(a){function d(C){return C.map(function(L){return String.fromCharCode(L)}).join("")}function l(C){for(;C&&C!=document;){if("Button"==C.getAttribute(r))return!0;C=C.parentNode}return!1}var m=a("lV"),k=a("pB"),c=a("cI"),h=a("gF"),f=a("w"),b=a("nO"),e=[];a=d([99,111,110,116,101,120,116,109,101,110,117]);var g=d([109,111,117,115,101,100,111,119,110]),n=d([109,111,117,115,101,117,112]),q=d([109,111,117,115,101,108,101,97,118,101]),p=d([109,111,
117,115,101,101,110,116,101,114]),r=d([116,100,118,99,108,97,115,115]);document.addEventListener(a,function(C){if(!f.pb()||!l(C.target)){var L=f.zd()==f.o7?200:0;setTimeout(function(){(void 0===t||void 0===u||void 0===v||void 0===w||10>Math.abs(v-t)+Math.abs(w-u))&&e.forEach(function(T){T(C)});t=u=v=w=void 0},L)}C.preventDefault();C.stopImmediatePropagation()},!0);var t,u,v,w;document.addEventListener("mousedown",function(C){v=t=C.screenX;w=u=C.screenY},!0);document.addEventListener("mousemove",function(C){v=
C.screenX;w=C.screenY},!0);var x=1;m=m.extend(h,function(C,L){h.call(this);this.mb=C;this.JTa=L;this.xZ=this.xZ.bind(this);this.de=this.de.bind(this);this.Vba=!1;this.Sba=this.Sba.bind(this);this.Tba=this.Tba.bind(this);this.Rba=this.Rba.bind(this);this.Uba=this.Uba.bind(this);this.xa=document.createElement("div");this.xa.style.setProperty("z-index",x,J[E]);for(var T in J[y])this.xa.style.setProperty(T,J[y][T],J[E]);e.push(this.xZ)});m.prototype.clear=function(){this.QVa()&&this.bba();this.xa=null;
e.splice(e.indexOf(this.xZ),1)};m.prototype.xZ=function(C){var L=this.JTa();if(0!=L.length){this.xa.replaceChildren();this.Vba=!1;var T=0;L.forEach(function(S){var U=document.createElement("div");if(S){U.textContent=S;for(var X in J[B])U.style.setProperty(X,J[B][X],J[E]);var K=T;T++;U.addEventListener(p,function(N){this.Sba(N,K)}.bind(this));U.addEventListener(q,function(N){this.Tba(N,K)}.bind(this));U.addEventListener(g,function(N){this.Rba(N,K)}.bind(this));U.addEventListener(n,function(N){this.Uba(N,
K)}.bind(this))}else for(X in J[D])U.style.setProperty(X,J[D][X],J[E]);for(X in J[z])U.style.setProperty(X,J[z][X],J[E]);this.xa.appendChild(U)}.bind(this));(b.fullscreenElement()||document.body).appendChild(this.xa);this.xa.style.setProperty("display","block",J[E]);L=C.pageX;C=C.pageY;L+this.xa.clientWidth>document.body.clientWidth-5&&(L=document.body.clientWidth-this.xa.clientWidth-5);C+this.xa.clientHeight>document.body.clientHeight-5&&(C=document.body.clientHeight-this.xa.clientHeight-5);this.xa.style.setProperty("left",
L+"px",J[E]);this.xa.style.setProperty("top",C+"px",J[E]);this.mb.bind(k.hb,this.de,this);document.addEventListener("mousedown",this.de);this.m3a=setInterval(this.l3a.bind(this),200)}};m.prototype.QVa=function(){return!!this.xa&&!!this.xa.parentNode};m.prototype.bba=function(){clearInterval(this.m3a);this.xa.parentNode.removeChild(this.xa);document.removeEventListener("mousedown",this.de);this.mb.unbind(k.hb,this.de,this);this.xa.style.setProperty("display","none",J[E])};m.prototype.l3a=function(){this.xa.contains(document.elementFromPoint(this.xa.offsetLeft+
.5*this.xa.clientWidth,this.xa.offsetTop+.5*this.xa.clientHeight))||this.xa.style.setProperty("z-index",x*=10,J[E])};m.prototype.de=function(){this.bba()};m.prototype.Rba=function(C){this.Vba=!0;C.preventDefault();C.stopImmediatePropagation()};m.prototype.Uba=function(C,L){this.Vba&&(this.bba(),C.preventDefault(),C.stopImmediatePropagation(),this.trigger(new c(k.nq,{index:L})))};m.prototype.Sba=function(C){for(var L in J[F])C.currentTarget.style.setProperty(L,J[F][L],J[E])};m.prototype.Tba=function(C){for(var L in J[A])C.currentTarget.style.setProperty(L,
J[A][L],J[E])};var y="0",z="1",B="2",D="3",F="4",A="5",E="6",J=function(C){return JSON.parse(C.map(function(L){return String.fromCharCode(L)}).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 m});
define("mZ",["require","mV","bi","cl"],function(a){function d(c){this.mb=c;this.Vt={};this.Vt[m.una]="move";this.Vt[m.CMa]="ew-resize";this.Vt[m.EMa]="ns-resize";this.Vt[m.DMa]="nesw-resize";this.Vt[m.FMa]="nwse-resize";this.Vt[m.Le]="pointer";this.Vt[m.pv]="inherit";this.Vt[m.Ke]="default";this.zh={};this.zh[m.hz]="grab.cur";this.zh[m.Wh]="grabbing.cur";this.zh[m.Ena]="N.cur";this.zh[m.Fna]="NE.cur";this.zh[m.vna]="E.cur";this.zh[m.Ina]="SE.cur";this.zh[m.Hna]="S.cur";this.zh[m.Jna]="SW.cur";this.zh[m.Kna]=
"W.cur";this.zh[m.Gna]="NW.cur";this.zh[m.xna]="FN.cur";this.zh[m.yna]="FNE.cur";this.zh[m.wna]="FE.cur";this.zh[m.Bna]="FSE.cur";this.zh[m.Ana]="FS.cur";this.zh[m.Cna]="FSW.cur";this.zh[m.Dna]="FW.cur";this.zh[m.zna]="FNW.cur";this.G8={};this.G8[m.$C]=k.$C;this.Vpa={}}var l=a("mV"),m=a("bi"),k=a("cl");d.prototype.BDa=function(c){return this.LVa(c)?this.Usa(c):this.BVa(c)?this.oTa(c):this.uVa(c)?this.VSa(c):this.Usa(m.Ke)};d.prototype.JPa=function(c){if(!(c in this.Vpa)){var h=new Image;h.src=this.osa(c);
this.Vpa[c]=h}};d.prototype.LVa=function(c){return c in this.Vt};d.prototype.Usa=function(c){return this.Vt[c]};d.prototype.BVa=function(c){return this.zh[c]};d.prototype.oTa=function(c){this.JPa(c);return"url("+this.osa(c)+"), default"};d.prototype.osa=function(c){return l.Ny(this.mb.get("settings").get(TDV.PlayerSettings.CURSORS_DIR_URL))+"/"+this.zh[c]};d.prototype.uVa=function(c){return c in this.G8};d.prototype.VSa=function(c){return"url("+this.G8[c]+"), auto"};return d});
define("cC",["require","er"],function(a){function d(){this.kx={};this.nr=[];this.VN=0}var l=a("er");d.prototype.push=function(m,k){void 0==this.kx[k]?(this.kx[k]=[m],this.nr.push(k),this.nr.sort(function(c,h){return c-h}),this.VN++):(k=this.kx[k],l(k).contains(m)||(k.push(m),this.VN++))};d.prototype.DDa=function(){return this.VN};d.prototype.isEmpty=function(){return 0==this.nr.length};d.prototype.BHa=function(){if(!this.isEmpty()){var m=this.nr[0],k=this.kx[m].pop();0==this.kx[m].length&&(delete this.kx[m],
this.nr=this.nr.slice(1));this.VN--;return k}};d.prototype.zka=function(){if(!this.isEmpty()){var m=this.nr[this.nr.length-1],k=this.kx[m].pop();0==this.kx[m].length&&(delete this.kx[m],this.nr=this.nr.slice(0,this.nr.length-1));this.VN--;return k}};return d});
define("jn","require er lV gX cC bo lY".split(" "),function(a){function d(){this.x_=!1;this.fxa=void 0;this.V=!0;this.e_=this.e_.bind(this);this.YW=new m;this.P_=new m;this.F0=new m;this.TY=new m;this.q$=new m;k.requestFrame(this.ek,this)}a("er");a("lV");var l=a("gX"),m=a("cC"),k=a("bo"),c=a("lY");d.prototype.clear=function(){this.V=!1};d.prototype.CT=function(h){this.YW.push(h,this.VI(h));this.tx()};d.prototype.xe=function(h){this.P_.push(h,this.VI(h));this.tx()};d.prototype.fc=function(h){this.F0.push(h,
this.VI(h));this.tx()};d.prototype.Yd=function(h){this.TY.push(h,this.VI(h));this.tx()};d.prototype.ol=function(h){this.q$.push(h,this.VI(h));this.tx()};d.prototype.oa=function(){this.R1a();this.K2a();this.T1a()};d.prototype.R1a=function(){do{for(;!this.YW.isEmpty();)this.YW.zka().Hb();this.P_.isEmpty()||this.P_.zka().bb()}while(!this.P_.isEmpty()||!this.YW.isEmpty())};d.prototype.K2a=function(){for(;!this.F0.isEmpty()||!this.TY.isEmpty();)this.D1(),this.g2a()};d.prototype.D1=function(){for(;!this.F0.isEmpty();){var h=
this.F0.zka();if(h.Jcb()){var f=h.getParent();f?(f.fc(),f.Yd()):h.EIa(0,0,h.Au(),h.zu())}}};d.prototype.g2a=function(){for(;!this.TY.isEmpty();)this.TY.BHa().cj()};d.prototype.T1a=function(){for(;!this.q$.isEmpty();)this.q$.BHa().rh();l.process()};d.prototype.tx=function(){this.x_||(this.x_=!0,this.fxa=(new Date).getTime()+500,c.ZB(this.e_))};d.prototype.e_=function(){this.x_=!1;this.V&&this.oa()};d.prototype.VI=function(h){return(h=h.getParent())?this.VI(h)+1:0};d.prototype.ek=function(){this.x_&&
(new Date).getTime()>=this.fxa&&this.e_();k.requestFrame(this.ek,this)};return d});
define("hW","require jquery.mod er lV pB T jM mZ br jn nO w jv".split(" "),function(a){var d=a("jquery.mod"),l=a("er"),m=a("lV"),k=a("pB"),c=a("T"),h=a("jM"),f=a("mZ"),b=a("br"),e=a("jn"),g=a("nO"),n=a("w"),q=a("jv");a=m.extend(c,function(p,r){this.$H=new e;c.call(this);this.Pt(this);this.Re("Application");this.Jf=d(p);this.$ga=r;this.Jf.css({overflow:"hidden","user-select":"none","-ms-user-select":"none","-moz-user-select":"none","-webkit-user-select":"none","-ms-touch-action":"none","touch-action":"none",
visibility:"visible","-webkit-tap-highlight-color":"rgba(255, 255, 255, 0)"});this.Cx=d(document.createElement("div"));this.Cx.css({position:"absolute",left:0,top:0,right:0,bottom:0,width:"auto",height:"auto",margin:0});this.Jf.append(this.Cx);this.Cx.append(this.hd());this.Dza=this.Cx.get(0);this.Sd=this.Jd=void 0;this.qVa=10;this.VPa=500;this.SQ=null;this.b$=new f(this);this.$b=new b(this);this.xa.append(this.$b.hd());this.fX=new h(this,this.lsa.bind(this));this.fX.bind(k.nq,this.Jh(this.eva),this,
!0);this.vua=!0;this.set("contentOpaque",!0);this.GD=null;this.PN=[];this.HI(["globalmousemove"]);this.ePa();this.O1=this.P1=0;this.JA=1;try{this.P1=window.top.innerWidth,this.O1=window.top.innerHeight,this.Vaa=!0}catch(t){this.Vaa=!1}this.YAa();this.qj=new g(p);this.qj.bind(k.ba,function(){this.eaa(this.qj.enabled())},this);q.$a()});a.prototype.start=function(){this.vr||(this.vr=!0,this.trigger(k.uo))};a.prototype.Aja=function(){return this.vr};a.prototype.YAa=function(){this.Vaa&&!g.enabled()&&
(this.P1=window.top.innerWidth,this.O1=window.top.innerHeight)};a.prototype.clear=function(){this.PG(null);this.yza();this.gSa();this.$H.clear();this.Jf&&(this.hd().remove(),this.Cx.remove(),this.Jf=null);this.b$=null;this.qj.qma();this.qj=null;this.fX&&(this.fX.clear(),this.fX=null)};a.prototype.zab=function(p){this.vua=p};a.prototype.eaa=function(p){p?this.wya():this.fQa()};a.prototype.Kw=function(){this.qP=this.cm=this.Cx.width();this.pP=this.bm=this.Cx.height()};a.prototype.PG=function(p){if(this.GD!=
p){null!=this.GD&&this.GD.o1a();this.GD=p;for(var r=[];null!=p;)r=[p].concat(r),p=p.getParent();p=this.PN.length-1;for(var t=!0;0<=p&&t;p--)l(r).contains(this.PN[p])?t=!1:this.PN.pop().r1a();for(p=0;p<r.length;p++)l(this.PN).contains(r[p])||r[p].s1a();this.PN=r;null!=this.GD&&this.GD.n1a();this.$b.PG(this.GD)}};a.prototype.FUa=function(p){var r=this.bE(p);this.Fta(p,r.x,r.y)?p.preventDefault():this.PG(null)};a.prototype.$sa=function(p){var r=this.eA(p);this.Fta(p,r.x,r.y)?p.preventDefault():this.PG(null)};
a.prototype.lsa=function(){return[]};a.prototype.eva=function(){};a.prototype.Fta=function(p,r,t){return this.CVa(p.target)&&0<=r&&0<=t&&r<this.sa&&t<this.wa};a.prototype.CVa=function(p){if(!this.Jf)return!1;for(var r=this.Jf.get(0);p;){if(p===r)return!0;p=p.parentElement}return!1};a.prototype.ePa=function(){this.HI(["globalresize"]);this.h9=setInterval(l.bind(function(){this.jqa()},this),this.VPa)};a.prototype.gSa=function(){this.dO(["globalresize"]);this.h9&&(clearInterval(this.h9),this.h9=null)};
a.prototype.jqa=function(){this.qj.enabled()?this.wya():this.YAa();var p=this.Dza.clientWidth,r=this.Dza.clientHeight;if(this.Jd!=p||this.Sd!=r)this.Jd=p,this.Sd=r,this.n0a()};a.prototype.wya=function(){if(this.Vaa&&(n.zd()==n.Vy&&n.browser()==n.po||n.zd()==n.yi)){var p=g.fullscreenElement();var r=p.clientWidth;p=p.clientHeight;var t=(r>p?r:p)/(this.P1>this.O1?this.P1:this.O1),u=Math.round(r/t),v=Math.round(p/t);this.JA=t;r={left:Math.round(.5*(r-u))+"px",top:Math.round(.5*(p-v))+"px",right:"auto",
bottom:"auto",width:u+"px",height:v+"px",transform:"scale("+[t,t].join(", ")+")",position:"absolute"}}else r={position:"absolute",left:0,top:0,right:"auto",bottom:"auto",width:document.body.clientWidth+"px",height:document.body.clientHeight+"px"},this.JA=1;this.Cx.css(r)};a.prototype.fQa=function(){this.Cx.css({position:"abolute",left:0,top:0,right:0,bottom:0,width:"auto",height:"auto",transform:""});this.JA=1};a.prototype.n0a=function(){this.yza();var p=this;this.SQ=setTimeout(function(){p.SQ=null;
p.fc()},this.qVa)};a.prototype.yza=function(){this.SQ&&(this.SQ=null,clearTimeout(this.SQ))};a.prototype.EUa=function(){this.jqa()};a.prototype.qaa=function(){return l(c.prototype.qaa.call(this)).defaults({globaltouchmove:[{target:d(document),name:"touchmove",handler:this.Jh(this.FUa)}],globalmousemove:[{target:d(document),name:"mousemove",handler:this.Jh(this.$sa)},{target:d(window),name:"mouseout",handler:this.Jh(this.$sa)}],globalresize:[{target:d(window),name:"resize",handler:this.Jh(this.EUa)}]})};
return a});
define("gV","require jquery.mod qb cl nO pB gF pz w".split(" "),function(a){function d(){p=TDV.cb.$r();var v=q||p;n!=v&&(n=v,g.trigger(h.ba));v=!!q&&p!=q&&e.pb();r!=v&&(t||(t=l("<div/>"),t.css({position:"fixed","z-index":m.dMa,left:0,top:0,margin:0,padding:0,height:"100%",width:"100%","background-color":"rgba(255, 255, 255, 0.99)"}),t.html(['<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="'+
k.gN+'"/>','<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.find("img")),r&&t.detach(),(r=v)&&(c.enabled()?l(c.fullscreenElement()):l("body")).append(t));r&&u.css("transform",n==g.VMa?"translate(-11%, 0) rotate(-90deg)":"none")}var l=a("jquery.mod"),m=a("qb"),k=a("cl"),c=a("nO"),h=a("pB"),f=a("gF"),b=a("pz"),e=a("w"),g=new f;g.zdb=TDV.cb.t7;
g.VMa=TDV.cb.u7;g.Wu=function(v){q!=v&&(q=v,d())};g.TDa=function(){return q};g.get=function(){return n};var n=void 0,q=void 0,p=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 g});
define("jj","require lV er pB cI pR fq nK pz km fs I bg od hT mG op mq w ij fe cF jY mV kQ eo hW T do nO bL gV fC eU".split(" "),function(a){var d=a("lV"),l=a("er"),m=a("pB"),k=a("cI"),c=a("pR"),h=a("fq"),f=a("nK"),b=a("pz"),e=a("km"),g=a("fs"),n=a("I"),q=a("bg"),p=a("od"),r=a("hT");a("mG");var t=a("op"),u=a("mq"),v=a("w"),w=a("ij"),x=a("fe"),y=a("cF"),z=a("jY"),B=a("mV"),D=a("kQ"),F=a("eo"),A=a("hW"),E=a("T"),J=a("do"),C=a("nO"),L=a("bL"),T=a("gV"),S=a("fC"),U=a("eU"),X=h.define("Player",A,function(){A.apply(this,
arguments);this.vg=new x(this);this.qra=new q(this,this.vg);this.et=new E;this.et.ra({backgroundOpacity:0,visible:!0,width:"100%",height:"100%"});this.oJ=new p;this.JK=new r;this.iX=new n(this);new g(this);var W=new J;W.n5(0);this.IU(W);this.Ze(!0);this.bind(m.G("settings"),this.zXa,this,!0);this.I1=TDV.cb.pEa();T.bind(m.ba,this.kXa,this,!0);L.qcb();this.APa=new e(this,"buttonMute",F.Me);this.APa.bind(m.ma,this.Vva,this,!0);this.IPa=new e(this,"buttonUnmute",F.Me);this.IPa.bind(m.ma,this.Kwa,this,
!0);this.JW=new e(this,"buttonToggleMute",F.Rj);this.JW.bind(m.Oj,this.Vva,this,!0);this.JW.bind(m.Hl,this.Kwa,this,!0);this.bind(m.G("mute"),this.hXa,this);this.JW.set("pressed",this.get("mute"));this.yPa=new e(this,"buttonEnterFullscreen",F.Me);this.yPa.bind(m.ma,this.kva,this,!0);this.zPa=new e(this,"buttonExitFullscreen",F.Me);this.zPa.bind(m.ma,this.lva,this,!0);this.FW=new e(this,"buttonToggleFullscreen",F.Rj);this.FW.bind(m.Oj,this.kva,this,!0);this.FW.bind(m.Hl,this.lva,this,!0);this.FW.set("pressed",
this.get("fullscreenEnabled"));this.bind(m.G("fullscreenEnabled"),this.PWa,this,!0);this.set("fullscreenEnabled",this.qj.enabled());this.set("defaultMenu",["fullscreen","mute","rotation"]);this.bind(m.uo,this.CXa,this,!0);[m.hb,m.Eb,m.Os,m.gz,m.CH].forEach(function(aa){this.bind(aa,function(ca){this.trigger(new k(m.bD,{AM:ca}))},this,!0)}.bind(this));["keydown","keyup"].forEach(function(aa){document.addEventListener(aa,function(ca){this.trigger(new k(m.bD,{AM:ca}))}.bind(this))}.bind(this));D.N.bind(m.ba,
function(){D.isPresenting?T.Wu():T.Wu(A.prototype.get.call(this,"lockedOrientation"))},this);this.qj.bind(m.ba,function(){var aa=T.TDa();T.Wu();T.Wu(aa)},this)});X.ULa="orientationChange";X.prototype.logCapabilities=function(){this.dWa()};X.prototype.activateAudio=function(W){this.TNa(W)};X.prototype.eaa=function(W){A.prototype.eaa.apply(this,arguments);this.set("fullscreenEnabled",W)};X.prototype.yb=function(){A.prototype.yb.call(this);this.h("mute",!1);this.h("fullscreenEnabled",!1)};X.prototype.Hb=
function(){A.prototype.Hb.call(this);this.qra.getParent()!=this&&this.Za(this.qra);this.et.getParent()!=this&&(this.Za(this.et),this.et.Za(this.iX),this.et.Za(this.oJ),this.et.Za(this.JK))};X.prototype.jZa=function(W){var aa=[];this.oJ&&aa.push(this.oJ);this.JK&&aa.push(this.JK);this.iX&&aa.push(this.iX);for(var ca=!0,ea=0;ea<=aa.length&&ca;ea++)ca=W.indexOf(aa[ea]),ca=W.length-(aa.length-ea)==ca;return ca?W:W.filter(function(I){return 0>aa.indexOf(I)}).concat(aa)};X.prototype.bb=function(){this.Fxa||
(this.Fxa=l.difference(this.kUa(),"backgroundOpacity visible includeInLayout state left right top bottom centerX centerY width height minWidth minHeight maxWidth maxHeight actualWidth actualHeight paddingLeft paddingTop paddingRight paddingBottom".split(" ")));this.xc(this.Fxa,{},[this.et],!0,!0);A.prototype.bb.call(this);!0===this.peb&&this.neb()};X.prototype.set=function(W,aa){switch(W){case "children":this.et.set(W,this.jZa(aa));return;case "creationPolicy":this.et.set(W,aa);return;case "fullscreenAvailable":case "gyroscopeAvailable":case "cardboardAvailable":case "isMobile":case "orientation":case "surfaceSelectionAvailable":case "touchEnabled":case "touchDevice":case "vrControllerAvailable":case "vrAvailable":aa=
this.get(W);break;case "fullscreenEnabled":aa=this.qj.kk()&&aa;break;case "fullscreenFallback":C.nla(aa);break;case "lockedOrientation":v.Ef()&&(aa=void 0);T.Wu(aa);break;case "installAvailable":aa=this.vg.ready();break;case "mouseWheelEnabled":this.zab(B.mg("mousewheelenabled",aa));break;case "backgroundPreloadEnabled":this.CZa(aa);break;case "vrPolyfillScale":D.M4=aa;break;case "desktopMipmappingEnabled":t.K$a(aa);break;case "mobileMipmappingEnabled":t.xab(aa);break;case "defaultVRPointer":"gaze"==
aa?D.zJa(D.Wna.BH):D.zJa(D.Wna.bN)}A.prototype.set.call(this,W,aa)};X.prototype.get=function(W,aa){switch(W){case "children":case "creationPolicy":return this.et.get(W,aa);case "touchEnabled":return this.No;case "touchDevice":return v.M5();case "isMobile":return v.pb();case "orientation":return T.get();case "lockedOrientation":return T.TDa();case "gyroscopeAvailable":return w.kk;case "cardboardAvailable":case "vrAvailable":return D.LM;case "vrControllerAvailable":return D.fdb;case "fullscreenAvailable":return this.qj.kk();
case "vrPolyfillScale":return D.M4;case "installAvailable":return this.vg.ready();case "surfaceSelectionAvailable":return!0;case "pageScale":return this.JA;case N:case V:return this.$ga?A.prototype.get.apply(this,arguments):!0;default:return A.prototype.get.apply(this,arguments)}};X.prototype.Vva=function(){this.set("mute",!0)};X.prototype.Kwa=function(){this.set("mute",!1)};X.prototype.hXa=function(){this.JW.set("pressed",this.get("mute"))};X.prototype.kva=function(){this.set("fullscreenEnabled",
!0)};X.prototype.lva=function(){this.set("fullscreenEnabled",!1)};X.prototype.PWa=function(){this.get("fullscreenEnabled")?this.qj.E2():this.qj.Tr();this.FW.set("pressed",this.get("fullscreenEnabled"));this.set("fullscreenEnabled",this.qj.enabled())};X.prototype.zXa=function(){var W=this.get("settings");W&&(y.initialize(W),z.Hla(W),THREE.Gma=W.get(TDV.PlayerSettings.f6),THREE.Oma=W.get(TDV.PlayerSettings.w6),THREE.wz=W.get(TDV.PlayerSettings.wz),this.vg.Hla(W))};X.prototype.CZa=function(W){z.enabled(W)};
X.prototype.lsa=function(){var W=[];this.uI=[];(this.get("menu")||[]).forEach(function(ea){var I=ea.get("label");W.push(ea.get("label"));I&&this.uI.push(function(){ea.trigger("click")})}.bind(this));var aa=this.get("defaultMenu",[]);if(0<=aa.indexOf("rotation")){var ca=this.Xi("PanoramaPlayer");ca.length&&(W.push(ca[0].get("mouseControlMode")==c.xC?b("change-to-drag-and-release"):b("change-to-click-and-move")),this.uI.push(this.X0a.bind(this)))}0<=aa.indexOf("fullscreen")&&this.qj.kk()&&(W.push(this.qj.enabled()?
b("exit-fullscreen"):b("enter-fullscreen")),this.uI.push(this.V0a.bind(this)));0<=aa.indexOf("mute")&&(W.push(this.get("mute")?b("unmute"):b("mute")),this.uI.push(this.W0a.bind(this)));aa=[].concat(f.name?[f.name]:[],"false"!=f.f5a?f.LT?["v:"+f.LT+"."+f.RT]:["v:"+f.RT]:[]).join(" ");""!=aa&&(0<W.length&&W.push(""),W.push(aa),this.uI.push(this.OXa.bind(this)));return W};X.prototype.eva=function(W){this.uI[W.data.index]()};X.prototype.X0a=function(){var W=this.Xi("PanoramaPlayer"),aa=W[0].get("mouseControlMode")==
c.xC?c.gv:c.xC;W.forEach(function(ca){U.setItem(K,aa);ca.set("mouseControlMode",aa)})};X.prototype.CXa=function(){U.getItem(K)==c.gv&&this.Xi("PanoramaPlayer").forEach(function(W){W.set("mouseControlMode",c.gv)});B.Fj("mute")&&this.set("mute",B.mg("mute",this.get("mute")))};X.prototype.V0a=function(){this.qj.toggle()};X.prototype.W0a=function(){this.set("mute",!this.get("mute"))};X.prototype.OXa=function(){f.iLa&&window.open(f.iLa,"_blank")};X.prototype.kXa=function(){this.trigger(X.ULa)};X.prototype.dWa=
function(){d.n5a(!0);d.log("UA: "+navigator.userAgent);d.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+")");v.log();u.log();b.log();D.log()};X.prototype.TNa=function(W){L.active()?S.wait(W):(L.Cma(W),L.request(this))};var K="tdvp_"+
window.location.pathname+"_rotation_mode",N=[119,97,116,101,114,109,97,114,107].map(function(W){return String.fromCharCode(W)}).join(""),V=[97,99,97,100,101,109,105,99,87,97,116,101,114,109,97,114,107].map(function(W){return String.fromCharCode(W)}).join("");return X});define("oc",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("PlayerMenuItem",d,function(){d.call(this)})});
define("U","require lV mz pB lx fq kT".split(" "),function(a){a("lV");var d=a("mz"),l=a("pB"),m=a("lx"),k=a("fq"),c=a("kT");a=k.define("PopupPanoramaOverlay",d,function(){d.call(this);this.set("state",m.U);this.bind(l.G("state"),function(){this.trigger(l.Ae)},this,!0);this.sd=void 0});a.prototype.show=function(){this.set("visible",!0)};a.prototype.hide=function(){this.set("visible",!1)};a.prototype.play=function(){this.set("state",m.PLAYING)};a.prototype.pause=function(){this.set("state",m.LH)};a.prototype.stop=
function(){this.set("state",m.U)};a.prototype.hide=a.prototype.hide;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(h,f){switch(h){case "playbackPositions":return void 0===this.sd&&(this.sd=c.B6a(this)),this.sd}return d.prototype.get.call(this,h,f)};a.prototype.set=function(h,f){var b=!1;switch(h){case "hfov":case "vfov":case "pitch":case "rotationX":case "rotationY":case "rotationZ":case "yaw":case "playbackPositions":this.sd=
void 0,b=!0}d.prototype.set.call(this,h,f);b&&"playbackPositions"!=h&&this.trigger(l.G("playbackPositions"))};return a});define("pC",["require","B","fq"],function(a){var d=a("B");return a("fq").define("ProgressBar",d,function(){d.call(this)})});
define("gR",["require","mz","pB","fq","kT"],function(a){var d=a("mz"),l=a("pB"),m=a("fq"),k=a("kT");a=m.define("QuadFramePanoramaOverlay",d,function(){d.call(this);this.sd=void 0});a.prototype.set=function(c,h){var f=!1;switch(c){case "vertices":case "playbackPositions":this.sd=void 0,f=!0}d.prototype.set.call(this,c,h);f&&"playbackPositions"!=c&&this.trigger(l.G("playbackPositions"))};a.prototype.get=function(c,h){switch(c){case "playbackPositions":return void 0===this.sd&&(this.sd=k.$ia(this)),
this.sd}return d.prototype.get.call(this,c,h)};return a});define("bN",["require","fq","cW"],function(a){var d=a("fq"),l=a("cW");return d.define("QuadHotspotPanoramaOverlay",l,function(){l.call(this)})});define("js",["require","fq","v"],function(a){var d=a("fq"),l=a("v");return d.define("QuadHotspotPanoramaOverlayArea",l,function(){l.apply(this,arguments)})});
define("bd",["require","mz","pB","fq","kT"],function(a){var d=a("mz"),l=a("pB"),m=a("fq"),k=a("kT");a=m.define("QuadHotspotPanoramaOverlayImageBase",d,function(){d.call(this);this.sd=void 0});a.prototype.get=function(c,h){switch(c){case "playbackPositions":return void 0===this.sd&&(this.sd=k.$ia(this)),this.sd}return d.prototype.get.call(this,c,h)};a.prototype.set=function(c,h){var f=!1;switch(c){case "opacity":case "distance":case "vertices":case "playbackPositions":this.sd=void 0,f=!0}d.prototype.set.call(this,
c,h);f&&"playbackPositions"!=c&&this.trigger(l.G("playbackPositions"))};return a});define("fN",["require","fq","bd"],function(a){var d=a("fq"),l=a("bd");return d.define("QuadHotspotPanoramaOverlayImage",l,function(){l.call(this)})});define("pK",["require","fq","bd"],function(a){var d=a("fq"),l=a("bd");return d.define("QuadHotspotPanoramaOverlayMap",l,function(){l.call(this)})});
define("fg","require mz pB lx cI fq kT".split(" "),function(a){var d=a("mz"),l=a("pB"),m=a("lx"),k=a("cI"),c=a("fq"),h=a("kT");a=c.define("QuadVideoPanoramaOverlay",d,function(){d.call(this);this.sd=void 0});a.prototype.play=a.prototype.play=function(){this.set("state",m.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.set("state",m.Qb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",m.U)};a.prototype.set=function(f,b){var e=!1;switch(f){case "state":var g=this.get("state")||
m.U;g==m.U&&b==m.PLAYING&&this.trigger(l.uo);g!=b&&this.trigger(new k(l.Ae,{oldState:g,state:b}));break;case "enabledInCardboard":this.set("enabledInVR",b);break;case "distance":case "opacity":case "playbackPositions":case "vertices":this.sd=void 0,e=!0}d.prototype.set.call(this,f,b);e&&"playbackPositions"!=f&&this.trigger(l.G("playbackPositions"))};a.prototype.get=function(f,b){switch(f){case "playbackPositions":return void 0===this.sd&&(this.sd=h.$ia(this)),this.sd}return d.prototype.get.call(this,
f,b)};return a});define("cX",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("RadialModel3DDisplayEffect",d,function(){d.call(this)})});define("no",["require","mz","fq"],function(a){var d=a("mz");a=a("fq").define("RainPanoramaOverlay",d,function(){d.call(this)});a.prototype.get=function(l,m){"startState"==l&&void 0===m&&(m=this.get("initialState"));return d.prototype.get.call(this,l,m)};return a});
define("fy",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("RotationalCameraMovement",d,function(){d.call(this)})});define("ct",["require","oe","fq"],function(a){var d=a("oe");return a("fq").define("SlideInEffect",d,function(){d.call(this)})});define("iS",["require","ib","fq"],function(a){var d=a("ib");return a("fq").define("SlideOutEffect",d,function(){d.call(this)})});
define("oE",["require","mz","fq"],function(a){var d=a("mz");a=a("fq").define("SnowPanoramaOverlay",d,function(){d.call(this)});a.prototype.get=function(l,m){"startState"==l&&void 0===m&&(m=this.get("initialState"));return d.prototype.get.call(this,l,m)};return a});
define("mL",["require","fq","md"],function(a){var d=a("fq"),l=a("md");a=d.define("SphericPanoramaFrame",l,function(){l.call(this)});a.prototype.Hm=function(){var m=this.get("sphere");return m&&d.Ja("Video360Resource",m)?!0:(m=this.get("stereoSphere"))&&d.Ja("Video360Resource",m)?!0:!1};return a});define("fP",["require","fq","jf"],function(a){var d=a("fq"),l=a("jf");return d.define("SphereModel3DObject",l,function(){l.call(this)})});
define("qc",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("SpotLight",d,function(){d.call(this)})});define("ph",["require","fq","jf"],function(a){var d=a("fq"),l=a("jf");a=d.define("SpriteModel3DObject",l,function(){l.call(this)});a.prototype.getPixelScale=function(){return this.get("worldPixelScale")};return a});
define("mg",["require","fq","jf"],function(a){var d=a("fq"),l=a("jf");return d.define("SurfaceReticleModel3DObject",l,function(){l.call(this);this.set("transparentAreaActive",!0)})});
define("cY","require er lV z T nF X oU".split(" "),function(a){var d=a("er"),l=a("lV"),m=a("z"),k=a("T"),c=a("nF"),h=a("X"),f=a("oU"),b=l.extend(k,function(e){k.call(this);this.Re("Tab");this.xda=e;this.tm="";this.Lfa=!1;this.Nta=this.Pa=null;this.eha=this.dha=!1;this.set("childrenInteractionEnabled",!1);this.set("contentOpaque",!0)});b.prototype.yb=function(){k.prototype.yb.call(this);this.h("horizontalAlign",c.$e);this.h("verticalAlign",c.se);this.h("fontFamily");this.h("fontSize");this.h("fontColor");
this.h("fontWeight");this.h("fontStyle");this.h("textDecoration");this.h("textShadowBlurRadius");this.h("textShadowColor");this.h("textShadowHorizontalLength");this.h("textShadowOpacity");this.h("textShadowVerticalLength")};b.prototype.AJa=function(e){this.dha!=e&&(this.dha=e,this.eha=!0,this.xe())};b.prototype.Hb=function(){k.prototype.Hb.call(this);null==this.Pa&&(this.Pa=new f,this.Pa.set("horizontalAlign","center"),this.Za(this.Pa))};b.prototype.tq=function(){k.prototype.tq.call(this);this.Nta=
m.Zu(this.xda,"label",this.zJ,this);this.Uya(this.xda.get("label"))};b.prototype.Bea=function(){k.prototype.Bea.call(this);this.Nta.mC()};b.prototype.zJ=function(){var e=this.xda.get("label");this.Uya(e?e:"")};b.prototype.Uya=function(e){this.tm!=e&&(this.tm=e,this.Lfa=!0,this.xe())};b.prototype.bb=function(){this.Lfa&&(this.Lfa=!1,this.Pa.set("text",this.tm));this.eha&&(this.eha=!1,this.Pa.set("direction",this.dha?h.Yh:h.Ig));this.xc(b.Poa,b.XH,[this.Pa],!0,!0);k.prototype.bb.call(this)};b.Poa="fontFamily fontSize fontColor fontWeight fontStyle textDecoration textShadowColor textShadowHorizontalLength textShadowVerticalLength textShadowBlurRadius textShadowOpacity".split(" ");
b.XH={};d(b.Poa).each(function(e){b.XH[e]=e});return b});define("nU",["require"],function(){return{eN:"normal",FH:"inverse",Ima:"center"}});
define("di","require er lV bp bi pB T nF d il cY nU iT".split(" "),function(a){var d=a("er"),l=a("lV"),m=a("bp"),k=a("bi"),c=a("pB"),h=a("T"),f=a("nF"),b=a("d"),e=a("il"),g=a("cY"),n=a("nU"),q=a("iT");a=l.extend(h,function(){h.call(this);this.Re("TabPanel");this.Sf=-1;this.hF=!1;this.BR=[];this.Y0=!1;this.gk=[];this.zda=!1;this.AR=[];this.fh=this.Hh=null;this.jF(!1)});a.prototype.yb=function(){h.prototype.yb.call(this);this.h("pages",[]);this.h("selectedIndex",-1);this.h("tabsSize",25);this.h("tabsPosition",
q.Hc);this.h("tabsGap",0);this.h("tabsPadding",10);this.h("tabsAlign",n.eN);this.h("tabsBackgroundOpacity",.6);this.h("tabsBackgroundColor",["#FFFFFF","#CCCCCC"]);this.h("tabsBackgroundColorRatios",[0,.5]);this.h("tabsRollOverBackgroundOpacity",1);this.h("tabsRollOverBackgroundColor",["#FFFFFF","#CCCCCC"]);this.h("tabsRollOverBackgroundColorRatios",[0,.5]);this.h("backgroundColor","#FFFFFF");this.h("selectedTabBackgroundOpacity",1);this.h("selectedTabBackgroundColor");this.h("selectedTabBackgroundColorRatios");
this.h("borderRadius",6);this.h("pagePaddingLeft",4);this.h("pagePaddingTop",4);this.h("pagePaddingRight",4);this.h("pagePaddingBottom",4);this.h("borderColor","#AAAAAA");this.h("borderSize",1);this.h("selectedTabFontSize");this.h("selectedTabFontColor");this.h("selectedTabFontWeight");this.h("selectedTabFontStyle");this.h("selectedTabTextDecoration");this.h("selectedTabTextShadowBlurRadius");this.h("selectedTabTextShadowColor");this.h("selectedTabTextShadowHorizontalLength");this.h("selectedTabTextShadowOpacity");
this.h("selectedTabTextShadowVerticalLength");this.h("tabsFontFamily");this.h("tabsFontSize");this.h("tabsFontColor");this.h("tabsFontWeight");this.h("tabsFontStyle");this.h("tabsTextDecoration");this.h("tabsTextShadowBlurRadius");this.h("tabsTextShadowColor");this.h("tabsTextShadowHorizontalLength");this.h("tabsTextShadowOpacity");this.h("tabsTextShadowVerticalLength");this.h("tabsRollOverFontSize");this.h("tabsRollOverFontColor");this.h("tabsRollOverFontWeight");this.h("tabsRollOverFontStyle");
this.h("tabsRollOverTextDecoration");this.h("tabsRollOverTextShadowBlurRadius");this.h("tabsRollOverTextShadowColor");this.h("tabsRollOverTextShadowHorizontalLength");this.h("tabsRollOverTextShadowOpacity");this.h("tabsRollOverTextShadowVerticalLength")};a.prototype.Hb=function(){h.prototype.Hb.call(this);null==this.fh&&(this.fh=new h,this.fh.jF(!1),this.Za(this.fh));null==this.Hh&&(this.Hh=new h,this.Hh.jF(!1),this.Za(this.Hh))};a.prototype.set=function(p,r){"pages"==p?this.Fab(r||[]):"selectedIndex"==
p?this.Yu(r):"layout"==p&&(r=b.ndb);h.prototype.set.call(this,p,r)};a.prototype.get=function(p,r){return"pages"==p?this.gk:"selectedIndex"==p?this.gEa():h.prototype.get.call(this,p,r)};a.prototype.Yu=function(p){this.Sf!=p&&(this.Sf=p,this.Sf=Math.min(Math.max(this.Sf,-1),this.gk.length),this.hF=!0,this.xe(),this.trigger(c.ba),this.trigger(c.G("selectedIndex")))};a.prototype.gEa=function(){return this.Sf};a.prototype.Fab=function(p){d.isEqual(this.gk,p)||(this.gk.forEach(function(r){r.unbind(c.kd,
this.Zwa,this);r.unbind(c.cd,this.Ywa,this)}.bind(this)),this.gk=p,this.gk.forEach(function(r){r.bind(c.kd,this.Zwa,this);r.bind(c.cd,this.Ywa,this)}.bind(this)),this.zda=!0,this.xe())};a.prototype.K0a=function(p){this.BR=d(this.BR).union([p.source]);this.Y0=!0;this.xe()};a.prototype.J0a=function(p){this.BR=d(this.BR).difference([p.source]);this.Y0=!0;this.xe()};a.prototype.I0a=function(p){this.Yu(d(this.AR).indexOf(p.source))};a.prototype.Zwa=function(p){this.Yu(this.gk.indexOf(p.source))};a.prototype.Ywa=
function(p){if(this.gk.indexOf(p.source)==this.Sf){for(p=this.gk.length-1;0<=p;p--)if(this.gk[p].get("visible")){this.Yu(p);return}this.Sf=-1;this.Yu(0)}};a.prototype.bb=function(){var p=!1,r=!1,t=!1,u=!1,v=!1,w=this.B("tabsPosition"),x=this.B("tabsAlign");this.zda&&(this.AR=[],this.Hh.THa(),this.fh.THa(),this.gk.forEach(function(D){var F=new g(D);F.jF(!0);F.bind(c.Gc,this.K0a,this);F.bind(c.Jb,this.J0a,this);F.bind(c.hb,this.I0a,this);this.AR.push(F);this.Hh.Za(F);D.ra({top:void 0,left:void 0,right:void 0,
bottom:void 0,width:"100%",height:"100%"});this.fh.Za(D)}.bind(this)),this.Sf=Math.min(Math.max(this.Sf,0),this.gk.length-1),this.zda=!1,r=p=v=!0);this.L("tabsPosition")&&(this.S("tabsPosition"),u=r=p=!0);this.hF&&(this.hF=!1,t=r=v=!0);this.Y0&&(this.Y0=!1,t=!0);this.L("overflow")&&this.Hh.ra({contentOpaque:this.B("overflow")==e.mq,overflow:this.B("overflow")});d(["tabsAlign","tabsGap","tabsSize"]).forEach(function(D){this.L(D)&&(this.S(D),p=!0)},this);d("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(D){this.L(D)&&
(this.S(D),u=r=!0)},this);d("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(D){this.L(D)&&
(this.S(D),r=!0)},this);d(["pagePaddingLeft","pagePaddingTop","pagePaddingRight","pagePaddingBottom"]).forEach(function(D){this.L(D)&&(this.S(D),u=!0)},this);this.L("backgroundColorDirection")&&this.S("backgroundColorDirection");if(p){switch(w){case q.ab:this.Hh.ra({left:0,right:void 0});break;case q.ub:this.Hh.ra({left:void 0,right:0});break;case q.Hc:this.Hh.ra({bottom:void 0,top:0});break;case q.Ac:this.Hh.ra({bottom:0,top:void 0})}switch(w){case q.ab:case q.ub:this.Hh.ra({layout:b.Yh,top:0,bottom:0,
height:void 0,width:this.B("tabsSize")});switch(x){case n.FH:this.Hh.set("verticalAlign",f.Ac);break;case n.Ima:this.Hh.set("verticalAlign",f.se);break;default:this.Hh.set("verticalAlign",f.Hc)}break;case q.Hc:case q.Ac:switch(this.Hh.ra({layout:b.Ig,left:0,right:0,height:this.B("tabsSize"),width:void 0}),x){case n.FH:this.Hh.set("horizontalAlign",f.ub);break;case n.Ima:this.Hh.set("horizontalAlign",f.$e);break;default:this.Hh.set("horizontalAlign",f.ab)}}this.Hh.set("gap",this.B("tabsGap"))}if(r)for(var y=
0;y<this.gk.length;y++){var z=this.AR[y];w==q.Ac||w==q.Hc?(z.ra({layout:b.Ig,width:void 0,paddingLeft:this.B("tabsPadding"),paddingTop:0,paddingRight:this.B("tabsPadding"),paddingBottom:0,height:"100%",backgroundColorDirection:m.O7}),z.AJa(!1)):(z.ra({layout:b.Yh,width:"100%",paddingLeft:0,paddingTop:this.B("tabsPadding"),paddingRight:0,paddingBottom:this.B("tabsPadding"),height:void 0,backgroundColorDirection:m.n7}),z.AJa(!0));w==q.Ac||w==q.ub?z.set("borderTopLeftRadius",0):z.set("borderTopLeftRadius",
this.B("borderTopLeftRadius","borderTopRadius","borderLeftRadius","borderRadius"));w==q.Ac||w==q.ab?z.set("borderTopRightRadius",0):z.set("borderTopRightRadius",this.B("borderTopRightRadius","borderTopRadius","borderRightRadius","borderRadius"));w==q.Hc||w==q.ub?z.set("borderBottomLeftRadius",0):z.set("borderBottomLeftRadius",this.B("borderBottomLeftRadius","borderBottomRadius","borderLeftRadius","borderRadius"));w==q.Hc||w==q.ab?z.set("borderBottomRightRadius",0):z.set("borderBottomRightRadius",
this.B("borderBottomRightRadius","borderBottomRadius","borderRightRadius","borderRadius"));w==q.ub&&z.set("borderSize",this.B("borderRightSize","borderSize"));w==q.ab&&z.set("borderSize",this.B("borderLeftSize","borderSize"));w==q.Hc&&z.set("borderSize",this.B("borderTopSize","borderSize"));w==q.Ac&&z.set("borderSize",this.B("borderBottomSize","borderSize"));switch(w){case q.ab:var B=this.B("borderLeftColor","borderColor");break;case q.ub:B=this.B("borderRightColor","borderColor");break;case q.Ac:B=
this.B("borderBottomColor","borderColor");break;default:case q.Hc:B=this.B("borderTopColor","borderColor")}z.set("borderColor",B);z.ra({fontFamily:this.B("tabsFontFamily"),shadow:this.B("shadow"),shadowHorizontalLength:this.B("shadowHorizontalLength"),shadowVerticalLength:this.B("shadowVerticalLength"),shadowBlurRadius:this.B("shadowBlurRadius"),shadowSpread:this.B("shadowSpread"),shadowColor:this.B("shadowColor")})}if(r||t)for(y=0;y<this.gk.length;y++)z=this.AR[y],t=y==this.Sf,B=d(this.BR).contains(z),
t?(B=this.B("selectedTabBackgroundColor","tabsBackgroundColor"),d(B).isUndefined()&&(B=this.B("backgroundColor"),B=d(B).isArray()&&0<B.length?w==q.ab||w==q.Hc?B[0]:B[B.length-1]:B),z.ra({backgroundOpacity:this.B("selectedTabBackgroundOpacity","tabsBackgroundOpacity","backgroundOpacity"),backgroundColor:B,backgroundColorRatios:this.B("selectedTabBackgroundColorRatios","tabsBackgroundColorRatios"),cursor:k.Ke,fontSize:this.B("selectedTabFontSize","tabsFontSize"),fontColor:this.B("selectedTabFontColor",
"tabsFontColor"),fontWeight:this.B("selectedTabFontWeight","tabsFontWeight"),fontStyle:this.B("selectedTabFontStyle","tabsFontStyle"),textDecoration:this.B("selectedTabTextDecoration","tabsTextDecoration"),textShadowColor:this.B("selectedTabTextShadowColor","tabsTextShadowColor"),textShadowHorizontalLength:this.B("selectedTabTextShadowHorizontalLength","tabsTextShadowHorizontalLength"),textShadowVerticalLength:this.B("selectedTabTextShadowVerticalLength","tabsTextShadowVerticalLength"),textShadowBlurRadius:this.B("selectedTabTextShadowBlurRadius",
"tabsTextShadowBlurRadius"),textShadowOpacity:this.B("selectedTabTextShadowOpacity","tabsTextShadowOpacity")})):B?z.ra({backgroundOpacity:this.B("tabsRollOverBackgroundOpacity","tabsBackgroundOpacity","backgroundOpacity"),backgroundColor:this.B("tabsRollOverBackgroundColor","tabsBackgroundColor"),backgroundColorRatios:this.B("tabsRollOverBackgroundColorRatios","tabsBackgroundColorRatios"),cursor:k.Le,fontSize:this.B("tabsRollOverFontSize","tabsFontSize"),fontColor:this.B("tabsRollOverFontColor","tabsFontColor"),
fontWeight:this.B("tabsRollOverFontWeight","tabsFontWeight"),fontStyle:this.B("tabsRollOverFontStyle","tabsFontStyle"),textDecoration:this.B("tabsRollOverTextDecoration","tabsTextDecoration"),textShadowColor:this.B("tabsRollOverTextShadowColor","tabsTextShadowColor"),textShadowHorizontalLength:this.B("tabsRollOverTextShadowHorizontalLength","tabsTextShadowHorizontalLength"),textShadowVerticalLength:this.B("tabsRollOverTextShadowVerticalLength","tabsTextShadowVerticalLength"),textShadowBlurRadius:this.B("tabsRollOverTextShadowBlurRadius",
"tabsTextShadowBlurRadius"),textShadowOpacity:this.B("tabsRollOverTextShadowOpacity","tabsTextShadowOpacity")}):z.ra({backgroundOpacity:this.B("tabsBackgroundOpacity","backgroundOpacity"),backgroundColor:this.B("tabsBackgroundColor"),backgroundColorRatios:this.B("tabsBackgroundColorRatios"),fontSize:this.B("tabsFontSize"),fontColor:this.B("tabsFontColor"),fontWeight:this.B("tabsFontWeight"),fontStyle:this.B("tabsFontStyle"),textDecoration:this.B("tabsTextDecoration"),textShadowColor:this.B("tabsTextShadowColor"),
textShadowHorizontalLength:this.B("tabsTextShadowHorizontalLength"),textShadowVerticalLength:this.B("tabsTextShadowVerticalLength"),textShadowBlurRadius:this.B("tabsTextShadowBlurRadius"),textShadowOpacity:this.B("tabsTextShadowOpacity")}),z.ra({borderLeftSize:w==q.ub&&t?0:void 0,borderRightSize:w==q.ab&&t?0:void 0,borderBottomSize:w==q.Hc&&t?0:void 0,borderTopSize:w==q.Ac&&t?0:void 0});if(u){y=this.B("tabsSize");switch(w){case q.ab:this.fh.ra({left:y-(this.B("borderLeftSize","borderSize")||0),right:0,
top:0,bottom:0});break;case q.ub:this.fh.ra({left:0,right:y-(this.B("borderRightSize","borderSize")||0),top:0,bottom:0});break;case q.Hc:this.fh.ra({left:0,right:0,top:y-(this.B("borderTopSize","borderSize")||0),bottom:0});break;case q.Ac:this.fh.ra({left:0,right:0,top:0,bottom:y-(this.B("borderBottomSize","borderSize")||0)})}w==q.Hc&&x==n.eN||w==q.ab&&x==n.eN?this.fh.set("borderTopLeftRadius",0):this.fh.set("borderTopLeftRadius",this.B("borderTopLeftRadius","borderTopRadius","borderLeftRadius","borderRadius"));
w==q.Hc&&x==n.FH||w==q.ub&&x==n.eN?this.fh.set("borderTopRightRadius",0):this.fh.set("borderTopRightRadius",this.B("borderTopRightRadius","borderTopRadius","borderRightRadius","borderRadius"));w==q.Ac&&x==n.eN||w==q.ab&&x==n.FH?this.fh.set("borderBottomLeftRadius",0):this.fh.set("borderBottomLeftRadius",this.B("borderBottomLeftRadius","borderBottomRadius","borderLeftRadius","borderRadius"));w==q.Ac&&x==n.FH||w==q.ub&&x==n.FH?this.fh.set("borderBottomRightRadius",0):this.fh.set("borderBottomRightRadius",
this.B("borderBottomRightRadius","borderBottomRadius","borderRightRadius","borderRadius"));this.fh.ra({paddingLeft:this.B("pagePaddingLeft"),paddingTop:this.B("pagePaddingTop"),paddingRight:this.B("pagePaddingRight"),paddingBottom:this.B("pagePaddingBottom"),borderLeftSize:this.B("borderLeftSize","borderSize"),borderTopSize:this.B("borderTopSize","borderSize"),borderRightSize:this.B("borderRightSize","borderSize"),borderBottomSize:this.B("borderBottomSize","borderSize"),borderLeftColor:this.B("borderLeftColor",
"borderColor"),borderTopColor:this.B("borderTopColor","borderColor"),borderRightColor:this.B("borderRightColor","borderColor"),borderBottomColor:this.B("borderBottomColor","borderColor"),shadow:this.B("shadow"),shadowHorizontalLength:this.B("shadowHorizontalLength"),shadowVerticalLength:this.B("shadowVerticalLength"),shadowBlurRadius:this.B("shadowBlurRadius"),shadowSpread:this.B("shadowSpread"),shadowColor:this.B("shadowColor"),backgroundOpacity:this.B("backgroundOpacity"),backgroundColor:this.B("backgroundColor"),
backgroundColorRatios:this.B("backgroundColorRatios")});w==q.Hc||w==q.Ac?this.fh.set("backgroundColorDirection",m.O7):this.fh.set("backgroundColorDirection",m.n7)}if(v)for(y=0;y<this.gk.length;y++)this.gk[y].set("visible",y==this.Sf);h.prototype.bb.call(this)};return a});define("oK",["require","di","fq"],function(a){var d=a("di");return a("fq").define("TabPanel",d,function(){d.call(this)})});
define("gn",["require","lV","T"],function(a){var d=a("lV"),l=a("T");a=d.extend(l,function(){l.call(this);this.Re("Page");this.set("label","")});a.prototype.yb=function(){l.prototype.yb.call(this);this.h("visible")};return a});define("hn",["require","gn","fq"],function(a){var d=a("gn");return a("fq").define("TabPanelPage",d,function(){d.call(this)})});define("gT",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("TargetPanoramaCameraMovement",d,function(){d.call(this)})});
define("dy",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("TargetRotationalCameraDisplayMovement",d,function(){d.call(this)})});define("it",["require","mI","fq"],function(a){var d=a("mI");return a("fq").define("TiledImageResourceLevel",d,function(){d.call(this)})});define("nA",["require","fq","iD"],function(a){var d=a("fq"),l=a("iD");return d.define("TripodCapPanoramaOverlay",l,function(){l.call(this)})});
define("iH","require lV z pB nF cZ bi d iT mN hh T nk oU er".split(" "),function(a){var d=a("lV"),l=a("z"),m=a("pB"),k=a("nF"),c=a("cZ"),h=a("bi"),f=a("d"),b=a("iT"),e=a("mN"),g=a("hh"),n=a("T"),q=a("nk"),p=a("oU"),r=a("er"),t=d.extend(n,function(){n.call(this);this.Pa=this.ff=null;this.yD=[];this.set("ariaRole","option");this.set("autoRolledOver",!0);this.set("childrenInteractionEnabled",!1);this.set("contentOpaque",!0);this.set("creationPolicy",c.PC);this.set("cursor",h.Le)});t.prototype.yb=function(){n.prototype.yb.call(this);
this.h("overflow","hidden");this.h("item");this.h("thumbnailUrlFunction",this.e$);this.h("sourceProperties");this.h("labelFunction",this.c$);this.h("labelFontFamily");this.h("labelFontColor");this.h("labelFontSize");this.h("labelFontStyle");this.h("labelFontWeight");this.h("labelGap");this.h("labelHorizontalAlign");this.h("labelMaxWidth");this.h("labelPosition");this.h("labelTextDecoration");this.h("labelTextShadowColor");this.h("labelTextShadowHorizontalLength");this.h("labelTextShadowVerticalLength");
this.h("labelTextShadowBlurRadius");this.h("labelTextShadowOpacity");this.h("thumbnailBorderRadius");this.h("thumbnailOpacity");this.h("thumbnailBorderSize");this.h("thumbnailBorderColor");this.h("thumbnailWidth");this.h("thumbnailHeight");this.h("thumbnailMaxWidth");this.h("thumbnailMaxHeight");this.h("thumbnailShadow");this.h("thumbnailShadowHorizontalLength");this.h("thumbnailShadowVerticalLength");this.h("thumbnailShadowBlurRadius");this.h("thumbnailShadowSpread");this.h("thumbnailShadowColor");
this.h("thumbnailShadowOpacity");this.A("rollOverBackgroundOpacity",g.aa,"backgroundOpacity");this.A("rollOverBackgroundColor",g.aa,"backgroundColor");this.A("rollOverBackgroundColorRatios",g.aa,"backgroundColorRatios");this.A("rollOverBackgroundColorDirection",g.aa,"backgroundColorDirection");this.A("rollOverBorderRadius",g.aa,"borderRadius");this.A("rollOverBorderTopRadius",g.aa,"borderTopRadius");this.A("rollOverBorderBottomRadius",g.aa,"borderBottomRadius");this.A("rollOverBorderLeftRadius",g.aa,
"borderLeftRadius");this.A("rollOverBorderRightRadius",g.aa,"borderRightRadius");this.A("rollOverBorderTopLeftRadius",g.aa,"borderTopLeftRadius");this.A("rollOverBorderTopRightRadius",g.aa,"borderTopRightRadius");this.A("rollOverBorderBottomLeftRadius",g.aa,"borderBottomLeftRadius");this.A("rollOverBorderBottomRightRadius",g.aa,"borderBottomRightRadius");this.A("rollOverBorderSize",g.aa,"borderSize");this.A("rollOverBorderLeftSize",g.aa,"borderLeftSize");this.A("rollOverBorderTopSize",g.aa,"borderTopSize");
this.A("rollOverBorderRightSize",g.aa,"borderRightSize");this.A("rollOverBorderBottomSize",g.aa,"borderBottomSize");this.A("rollOverBorderColor",g.aa,"borderColor");this.A("rollOverBorderLeftColor",g.aa,"borderLeftColor");this.A("rollOverBorderTopColor",g.aa,"borderTopColor");this.A("rollOverBorderRightColor",g.aa,"borderRightColor");this.A("rollOverBorderBottomColor",g.aa,"borderBottomColor");this.A("rollOverLabelFontColor",g.aa,"labelFontColor");this.A("rollOverLabelFontSize",g.aa,"labelFontSize");
this.A("rollOverLabelFontStyle",g.aa,"labelFontStyle");this.A("rollOverLabelFontWeight",g.aa,"labelFontWeight");this.A("rollOverLabelTextDecoration",g.aa,"labelTextDecoration");this.A("rollOverLabelTextShadowColor",g.aa,"labelTextShadowColor");this.A("rollOverLabelTextShadowHorizontalLength",g.aa,"labelTextShadowHorizontalLength");this.A("rollOverLabelTextShadowVerticalLength",g.aa,"labelTextShadowVerticalLength");this.A("rollOverLabelTextShadowBlurRadius",g.aa,"labelTextShadowBlurRadius");this.A("rollOverLabelTextShadowOpacity",
g.aa,"labelTextShadowOpacity");this.A("rollOverOpacity",g.aa,"opacity");this.A("rollOverPaddingLeft",g.aa,"paddingLeft");this.A("rollOverPaddingTop",g.aa,"paddingTop");this.A("rollOverPaddingRight",g.aa,"paddingRight");this.A("rollOverPaddingBottom",g.aa,"paddingBottom");this.A("rollOverShadow",g.aa,"shadow");this.A("rollOverThumbnailOpacity",g.aa,"thumbnailOpacity");this.A("rollOverThumbnailBorderSize",g.aa,"thumbnailBorderSize");this.A("rollOverThumbnailBorderColor",g.aa,"thumbnailBorderColor");
this.A("rollOverThumbnailShadow",g.aa,"thumbnailShadow");this.A("rollOverThumbnailShadowHorizontalLength",g.aa,"thumbnailShadowHorizontalLength");this.A("rollOverThumbnailShadowVerticalLength",g.aa,"thumbnailShadowVerticalLength");this.A("rollOverThumbnailShadowBlurRadius",g.aa,"thumbnailShadowBlurRadius");this.A("rollOverThumbnailShadowSpread",g.aa,"thumbnailShadowSpread");this.A("rollOverThumbnailShadowColor",g.aa,"thumbnailShadowColor");this.A("rollOverThumbnailShadowOpacity",g.aa,"thumbnailShadowOpacity");
this.A("selectedBackgroundOpacity",g.ka,"backgroundOpacity");this.A("selectedBackgroundColor",g.ka,"backgroundColor");this.A("selectedBackgroundColorRatios",g.ka,"backgroundColorRatios");this.A("selectedBackgroundColorDirection",g.ka,"backgroundColorDirection");this.A("selectedBorderRadius",g.ka,"borderRadius");this.A("selectedBorderTopRadius",g.ka,"borderTopRadius");this.A("selectedBorderBottomRadius",g.ka,"borderBottomRadius");this.A("selectedBorderLeftRadius",g.ka,"borderLeftRadius");this.A("selectedBorderRightRadius",
g.ka,"borderRightRadius");this.A("selectedBorderTopLeftRadius",g.ka,"borderTopLeftRadius");this.A("selectedBorderTopRightRadius",g.ka,"borderTopRightRadius");this.A("selectedBorderBottomLeftRadius",g.ka,"borderBottomLeftRadius");this.A("selectedBorderBottomRightRadius",g.ka,"borderBottomRightRadius");this.A("selectedBorderSize",g.ka,"borderSize");this.A("selectedBorderLeftSize",g.ka,"borderLeftSize");this.A("selectedBorderTopSize",g.ka,"borderTopSize");this.A("selectedBorderRightSize",g.ka,"borderRightSize");
this.A("selectedBorderBottomSize",g.ka,"borderBottomSize");this.A("selectedBorderColor",g.ka,"borderColor");this.A("selectedBorderLeftColor",g.ka,"borderLeftColor");this.A("selectedBorderTopColor",g.ka,"borderTopColor");this.A("selectedBorderRightColor",g.ka,"borderRightColor");this.A("selectedBorderBottomColor",g.ka,"borderBottomColor");this.A("selectedLabelFontColor",g.ka,"labelFontColor");this.A("selectedLabelFontSize",g.ka,"labelFontSize");this.A("selectedLabelFontStyle",g.ka,"labelFontStyle");
this.A("selectedLabelFontWeight",g.ka,"labelFontWeight");this.A("selectedLabelTextDecoration",g.ka,"labelTextDecoration");this.A("selectedLabelTextShadowColor",g.ka,"labelTextShadowColor");this.A("selectedLabelTextShadowHorizontalLength",g.ka,"labelTextShadowHorizontalLength");this.A("selectedLabelTextShadowVerticalLength",g.ka,"labelTextShadowVerticalLength");this.A("selectedLabelTextShadowBlurRadius",g.ka,"labelTextShadowBlurRadius");this.A("selectedLabelTextShadowOpacity",g.ka,"labelTextShadowOpacity");
this.A("selectedOpacity",g.ka,"opacity");this.A("selectedPaddingLeft",g.ka,"paddingLeft");this.A("selectedPaddingTop",g.ka,"paddingTop");this.A("selectedPaddingRight",g.ka,"paddingRight");this.A("selectedPaddingBottom",g.ka,"paddingBottom");this.A("selectedShadow",g.ka,"shadow");this.A("selectedThumbnailOpacity",g.ka,"thumbnailOpacity");this.A("selectedThumbnailBorderSize",g.ka,"thumbnailBorderSize");this.A("selectedThumbnailBorderColor",g.ka,"thumbnailBorderColor");this.A("selectedThumbnailShadow",
g.ka,"thumbnailShadow");this.A("selectedThumbnailShadowHorizontalLength",g.ka,"thumbnailShadowHorizontalLength");this.A("selectedThumbnailShadowVerticalLength",g.ka,"thumbnailShadowVerticalLength");this.A("selectedThumbnailShadowBlurRadius",g.ka,"thumbnailShadowBlurRadius");this.A("selectedThumbnailShadowSpread",g.ka,"thumbnailShadowSpread");this.A("selectedThumbnailShadowColor",g.ka,"thumbnailShadowColor");this.A("selectedThumbnailShadowOpacity",g.ka,"thumbnailShadowOpacity")};t.prototype.TU=function(u){this.gR(u)};
t.prototype.Hb=function(){n.prototype.Hb.call(this);this.ff||(this.ff=new q,this.Za(this.ff),this.ff.set("horizontalAlign",k.$e),this.ff.set("verticalAlign",k.se),this.ff.bind(m.ea,this.Pfa,this));this.Pa||(this.Pa=new p,this.Za(this.Pa))};t.prototype.e$=function(u){if(r(u).isString())return u;if(u&&u.jma)return u.jma};t.prototype.c$=function(u){if(u&&u.label)return u.label};t.prototype.Nv=function(){return this.Pa&&this.Pa.get("text")||n.prototype.Nv.call(this)};t.prototype.bb=function(){if(this.L("sourceProperties")||
this.L("item")){for(;this.yD.length;)this.yD.pop().mC();var u=this.B("sourceProperties"),v=this.B("item");u&&v&&u.forEach(function(x){this.yD.push(l.Zu(v,x,this.jda,this,!0))}.bind(this))}if(this.L("sourceProperties")||this.L("item")||this.L("tooltipFunction"))v=this.B("item"),u=this.B("tooltipFunction")(v),this.set("toolTip",u);if(this.L("sourceProperties")||this.L("item")||this.L("thumbnailUrlFunction"))v=this.B("item"),(u=this.B("thumbnailUrlFunction")(v))?this.ff.get("url")!=u&&this.ff.ra({url:u,
visible:!0,opacity:.5}):this.ff.ra({url:void 0,visible:!1}),this.S("thumbnailUrlFunction");if(this.L("sourceProperties")||this.L("item")||this.L("labelFunction"))v=this.B("item"),u=this.B("labelFunction")(v),this.Pa.ra({text:u,visible:u?!0:!1}),this.S("labelFunction");this.S("item");this.S("sourceProperties");if(this.L("labelPosition")||this.L("listLayout")||this.L("thumbnailWidth")||this.L("thumbnailHeight")){var w=this;u=function(x,y){x=w.B(x);return void 0!==x?x:y};switch(this.B("labelPosition")){case b.ab:case b.ub:this.set("layout",
f.Ig);this.Pa.set("width","100%");this.ff.ra({height:u("thumbnailHeight","100%"),width:u("thumbnailWidth"),scaleMode:u("thumbnailScaleMode",e.xk)});break;default:this.set("layout",f.Yh),this.Pa.set("width","100%"),this.ff.ra({height:u("thumbnailHeight","100%"),width:u("thumbnailWidth","100%"),scaleMode:u("thumbnailScaleMode",e.xk)})}switch(this.B("labelPosition")){case b.ab:case b.Hc:this.io(this.Pa,0);break;default:this.io(this.Pa,1)}this.S("labelPosition")}this.xc(t.b8,t.Ooa,[this],!0,!0);this.xc(t.d8,
t.Roa,[this.ff],!0,!0);this.xc(t.c8,t.Qoa,[this.Pa],!0,!0);n.prototype.bb.call(this)};t.prototype.jda=function(){this.lF("item")};t.prototype.iF=function(u){n.prototype.iF.call(this,u)};t.prototype.Pfa=function(){this.ff.set("opacity",1)};t.Ooa={labelGap:"gap"};t.b8=r(t.Ooa).keys();t.Qoa={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"};t.c8=r(t.Qoa).keys();t.Roa={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"};t.d8=r(t.Roa).keys();return t});
define("ca","require lV cI nF pB d il iT T iH jv".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("nF"),k=a("pB"),c=a("d"),h=a("il"),f=a("iT"),b=a("T"),e=a("iH"),g=a("jv"),n=d.extend(b,function(){b.call(this);this.set("contentOpaque",!0);this.set("ariaRole","listbox")});n.prototype.yb=function(){b.prototype.yb.call(this);this.h("layout",c.iz);this.h("selectedIndex",-1);this.h("items",[]);this.h("overflow",h.mq);this.h("itemHorizontalAlign",m.$e);this.h("itemLabelFontFamily");this.h("itemLabelPosition",
f.Ac);this.h("itemLabelFunction");this.h("itemLabelMaxWidth");this.h("itemLabelGap");this.h("itemLabelHorizontalAlign",m.$e);this.h("itemSourceProperties");this.h("itemThumbnailBorderRadius");this.h("itemThumbnailScaleMode");this.h("itemThumbnailWidth");this.h("itemThumbnailHeight");this.h("itemThumbnailMaxWidth");this.h("itemThumbnailMaxHeight");this.h("itemThumbnailUrlFunction");this.h("itemTooltipFunction");this.h("itemVerticalAlign",m.se);this.h("itemBackgroundOpacity");this.h("itemBackgroundColor");
this.h("itemBackgroundColorRatios");this.h("itemBackgroundColorDirection");this.h("itemBorderRadius");this.h("itemBorderTopRadius");this.h("itemBorderBottomRadius");this.h("itemBorderLeftRadius");this.h("itemBorderRightRadius");this.h("itemBorderTopLeftRadius");this.h("itemBorderTopRightRadius");this.h("itemBorderBottomLeftRadius");this.h("itemBorderBottomRightRadius");this.h("itemBorderSize");this.h("itemBorderLeftSize");this.h("itemBorderTopSize");this.h("itemBorderRightSize");this.h("itemBorderBottomSize");
this.h("itemBorderColor");this.h("itemBorderLeftColor");this.h("itemBorderTopColor");this.h("itemBorderRightColor");this.h("itemBorderBottomColor");this.h("itemLabelFontColor");this.h("itemLabelFontSize");this.h("itemLabelFontStyle");this.h("itemLabelFontWeight");this.h("itemLabelMaxWidth");this.h("itemLabelTextDecoration");this.h("itemLabelTextShadowColor");this.h("itemLabelTextShadowHorizontalLength");this.h("itemLabelTextShadowVerticalLength");this.h("itemLabelTextShadowBlurRadius");this.h("itemLabelTextShadowOpacity");
this.h("itemOpacity");this.h("itemPaddingLeft");this.h("itemPaddingTop");this.h("itemPaddingRight");this.h("itemPaddingBottom");this.h("itemShadow");this.h("itemThumbnailOpacity");this.h("itemThumbnailBorderSize");this.h("itemThumbnailBorderColor");this.h("itemThumbnailShadow");this.h("itemThumbnailShadowHorizontalLength");this.h("itemThumbnailShadowVerticalLength");this.h("itemThumbnailShadowBlurRadius");this.h("itemThumbnailShadowSpread");this.h("itemThumbnailShadowColor");this.h("itemThumbnailShadowOpacity");
this.h("rollOverItemBackgroundOpacity");this.h("rollOverItemBackgroundColor");this.h("rollOverItemBackgroundColorRatios");this.h("rollOverItemBackgroundColorDirection");this.h("rollOverItemBorderRadius");this.h("rollOverItemBorderTopRadius");this.h("rollOverItemBorderBottomRadius");this.h("rollOverItemBorderLeftRadius");this.h("rollOverItemBorderRightRadius");this.h("rollOverItemBorderTopLeftRadius");this.h("rollOverItemBorderTopRightRadius");this.h("rollOverItemBorderBottomLeftRadius");this.h("rollOverItemBorderBottomRightRadius");
this.h("rollOverItemBorderSize");this.h("rollOverItemBorderLeftSize");this.h("rollOverItemBorderTopSize");this.h("rollOverItemBorderRightSize");this.h("rollOverItemBorderBottomSize");this.h("rollOverItemBorderColor");this.h("rollOverItemBorderLeftColor");this.h("rollOverItemBorderTopColor");this.h("rollOverItemBorderRightColor");this.h("rollOverItemBorderBottomColor");this.h("rollOverItemLabelFontSize");this.h("rollOverItemLabelFontStyle");this.h("rollOverItemLabelFontWeight");this.h("rollOverItemLabelTextDecoration");
this.h("rollOverItemLabelTextShadowColor");this.h("rollOverItemLabelTextShadowHorizontalLength");this.h("rollOverItemLabelTextShadowVerticalLength");this.h("rollOverItemLabelTextShadowBlurRadius");this.h("rollOverItemLabelTextShadowOpacity");this.h("rollOverItemOpacity");this.h("rollOverItemPaddingLeft");this.h("rollOverItemPaddingTop");this.h("rollOverItemPaddingRight");this.h("rollOverItemPaddingBottom");this.h("rollOverItemShadow");this.h("rollOverItemThumbnailOpacity");this.h("rollOverItemThumbnailBorderSize");
this.h("rollOverItemThumbnailBorderColor");this.h("rollOverItemThumbnailShadow");this.h("rollOverItemThumbnailShadowHorizontalLength");this.h("rollOverItemThumbnailShadowVerticalLength");this.h("rollOverItemThumbnailShadowBlurRadius");this.h("rollOverItemThumbnailShadowSpread");this.h("rollOverItemThumbnailShadowColor");this.h("rollOverItemThumbnailShadowOpacity");this.h("selectedItemBackgroundOpacity");this.h("selectedItemBackgroundColor");this.h("selectedItemBackgroundColorRatios");this.h("selectedItemBackgroundColorDirection");
this.h("selectedItemBorderRadius");this.h("selectedItemBorderTopRadius");this.h("selectedItemBorderBottomRadius");this.h("selectedItemBorderLeftRadius");this.h("selectedItemBorderRightRadius");this.h("selectedItemBorderTopLeftRadius");this.h("selectedItemBorderTopRightRadius");this.h("selectedItemBorderBottomLeftRadius");this.h("selectedItemBorderBottomRightRadius");this.h("selectedItemBorderSize");this.h("selectedItemBorderLeftSize");this.h("selectedItemBorderTopSize");this.h("selectedItemBorderRightSize");
this.h("selectedItemBorderBottomSize");this.h("selectedItemBorderColor");this.h("selectedItemBorderLeftColor");this.h("selectedItemBorderTopColor");this.h("selectedItemBorderRightColor");this.h("selectedItemBorderBottomColor");this.h("selectedItemLabelFontSize");this.h("selectedItemLabelFontStyle");this.h("selectedItemLabelFontWeight");this.h("selectedItemLabelTextDecoration");this.h("selectedItemLabelTextShadowColor");this.h("selectedItemLabelTextShadowHorizontalLength");this.h("selectedItemLabelTextShadowVerticalLength");
this.h("selectedItemLabelTextShadowBlurRadius");this.h("selectedItemLabelTextShadowOpacity");this.h("selectedItemOpacity");this.h("selectedItemPaddingLeft");this.h("selectedItemPaddingTop");this.h("selectedItemPaddingRight");this.h("selectedItemPaddingBottom");this.h("selectedItemShadow");this.h("selectedItemThumbnailOpacity");this.h("selectedItemThumbnailBorderSize");this.h("selectedItemThumbnailBorderColor");this.h("selectedItemThumbnailShadow");this.h("selectedItemThumbnailShadowHorizontalLength");
this.h("selectedItemThumbnailShadowVerticalLength");this.h("selectedItemThumbnailShadowBlurRadius");this.h("selectedItemThumbnailShadowSpread");this.h("selectedItemThumbnailShadowColor");this.h("selectedItemThumbnailShadowOpacity")};n.prototype.ZO=function(q){this.sp=!0;this.set("selectedIndex",this.xaa(q.source))};n.prototype.xaa=function(q){for(var p=this.rb(),r=0;r<p.length;r++)if(p[r]==q)return r;return-1};n.prototype.bb=function(){this.L("layout")&&this.B("layout")!=c.iz&&this.set("layout",c.iz);
var q=!1;if(this.L("items")){q=!0;var p=this.B("items")||[],r=this.rb();if(r.length<p.length){for(var t=r.length;t<p.length;t++)r=new e,r.bind(k.ma,this.ZO,this),this.xc(n.pN,n.eD,[r],!1,!1),this.xc(n.qN,n.fD,[r],!1,!1),this.Za(r);r=this.rb()}if(r.length>p.length){for(t=p.length;t<r.length;t++){var u=r[t];u.unbind(k.ma,this.ZO,this);this.removeChild(u)}r=this.rb()}for(t=0;t<p.length;t++)r[t].set("item",p[t]);this.S("items")}if(this.L("selectedIndex")||q){p=this.rb();q=Math.min(p.length-1,Math.max(-1,
this.B("selectedIndex")));this.set("selectedIndex",q);for(t=0;t<p.length;t++)p[t].TU(t==q);this.S("selectedIndex");this.sp&&(this.sp=!1,this.trigger(new l(k.ba)))}this.xc(n.pN,n.eD,this.rb(),!0,!1);this.xc(n.qN,n.fD,this.rb(),!0,!0);b.prototype.bb.call(this)};n.prototype.cj=function(){b.prototype.cj.call(this);g.x3a(this,this.rb().map(function(q){return q.Xd()}),this.Zl.cya,this.Zl.xqa)};n.eD={layout:"listLayout",shadowHorizontalLength:"shadowHorizontalLength",shadowVerticalLength:"shadowVerticalLength",
shadowBlurRadius:"shadowBlurRadius",shadowSpread:"shadowSpread",shadowOpacity:"shadowOpacity",shadowColor:"shadowColor"};n.fD={itemHorizontalAlign:"horizontalAlign",itemLabelFunction:"labelFunction",itemLabelFontFamily:"labelFontFamily",itemLabelGap:"labelGap",itemLabelHorizontalAlign:"labelHorizontalAlign",itemLabelMaxWidth:"labelMaxWidth",itemLabelPosition:"labelPosition",itemSourceProperties:"sourceProperties",itemThumbnailBorderRadius:"thumbnailBorderRadius",itemThumbnailScaleMode:"thumbnailScaleMode",
itemThumbnailHeight:"thumbnailHeight",itemThumbnailWidth:"thumbnailWidth",itemThumbnailMaxHeight:"thumbnailMaxHeight",itemThumbnailMaxWidth:"thumbnailMaxWidth",itemThumbnailUrlFunction:"thumbnailUrlFunction",itemTooltipFunction:"tooltipFunction",itemVerticalAlign:"verticalAlign",itemBackgroundOpacity:"backgroundOpacity",itemBackgroundColor:"backgroundColor",itemBackgroundColorRatios:"backgroundColorRatios",itemBackgroundColorDirection:"backgroundColorDirection",itemBorderRadius:"borderRadius",itemBorderTopRadius:"borderTopRadius",
itemBorderBottomRadius:"borderBottomRadius",itemBorderLeftRadius:"borderLeftRadius",itemBorderRightRadius:"borderRightRadius",itemBorderTopLeftRadius:"borderTopLeftRadius",itemBorderTopRightRadius:"borderTopRightRadius",itemBorderBottomLeftRadius:"borderBottomLeftRadius",itemBorderBottomRightRadius:"borderBottomRightRadius",itemBorderSize:"borderSize",itemBorderLeftSize:"borderLeftSize",itemBorderTopSize:"borderTopSize",itemBorderRightSize:"borderRightSize",itemBorderBottomSize:"borderBottomSize",
itemBorderColor:"borderColor",itemBorderLeftColor:"borderLeftColor",itemBorderTopColor:"borderTopColor",itemBorderRightColor:"borderRightColor",itemBorderBottomColor:"borderBottomColor",itemLabelFontColor:"labelFontColor",itemLabelFontSize:"labelFontSize",itemLabelFontStyle:"labelFontStyle",itemLabelFontWeight:"labelFontWeight",itemLabelTextDecoration:"labelTextDecoration",itemLabelTextShadowColor:"labelTextShadowColor",itemLabelTextShadowHorizontalLength:"labelTextShadowHorizontalLength",itemLabelTextShadowVerticalLength:"labelTextShadowVerticalLength",
itemLabelTextShadowBlurRadius:"labelTextShadowBlurRadius",itemLabelTextShadowOpacity:"labelTextShadowOpacity",itemOpacity:"opacity",itemPaddingLeft:"paddingLeft",itemPaddingTop:"paddingTop",itemPaddingRight:"paddingRight",itemPaddingBottom:"paddingBottom",itemShadow:"shadow",itemThumbnailOpacity:"thumbnailOpacity",itemThumbnailBorderSize:"thumbnailBorderSize",itemThumbnailBorderColor:"thumbnailBorderColor",itemThumbnailShadow:"thumbnailShadow",itemThumbnailShadowHorizontalLength:"thumbnailShadowHorizontalLength",
itemThumbnailShadowVerticalLength:"thumbnailShadowVerticalLength",itemThumbnailShadowBlurRadius:"thumbnailShadowBlurRadius",itemThumbnailShadowSpread:"thumbnailShadowSpread",itemThumbnailShadowColor:"thumbnailShadowColor",itemThumbnailShadowOpacity:"thumbnailShadowOpacity",rollOverItemBackgroundOpacity:"rollOverBackgroundOpacity",rollOverItemBackgroundColor:"rollOverBackgroundColor",rollOverItemBackgroundColorRatios:"rollOverBackgroundColorRatios",rollOverItemBackgroundColorDirection:"rollOverBackgroundColorDirection",
rollOverItemBorderRadius:"rollOverBorderRadius",rollOverItemBorderTopRadius:"rollOverBorderTopRadius",rollOverItemBorderBottomRadius:"rollOverBorderBottomRadius",rollOverItemBorderLeftRadius:"rollOverBorderLeftRadius",rollOverItemBorderRightRadius:"rollOverBorderRightRadius",rollOverItemBorderTopLeftRadius:"rollOverBorderTopLeftRadius",rollOverItemBorderTopRightRadius:"rollOverBorderTopRightRadius",rollOverItemBorderBottomLeftRadius:"rollOverBorderBottomLeftRadius",rollOverItemBorderBottomRightRadius:"rollOverBorderBottomRightRadius",
rollOverItemBorderSize:"rollOverBorderSize",rollOverItemBorderLeftSize:"rollOverBorderLeftSize",rollOverItemBorderTopSize:"rollOverBorderTopSize",rollOverItemBorderRightSize:"rollOverBorderRightSize",rollOverItemBorderBottomSize:"rollOverBorderBottomSize",rollOverItemBorderColor:"rollOverBorderColor",rollOverItemBorderLeftColor:"rollOverBorderLeftColor",rollOverItemBorderTopColor:"rollOverBorderTopColor",rollOverItemBorderRightColor:"rollOverBorderRightColor",rollOverItemBorderBottomColor:"rollOverBorderBottomColor",
rollOverItemLabelFontColor:"rollOverLabelFontColor",rollOverItemLabelFontSize:"rollOverLabelFontSize",rollOverItemLabelFontStyle:"rollOverLabelFontStyle",rollOverItemLabelFontWeight:"rollOverLabelFontWeight",rollOverItemLabelTextDecoration:"rollOverLabelTextDecoration",rollOverItemLabelTextShadowColor:"rollOverLabelTextShadowColor",rollOverItemLabelTextShadowHorizontalLength:"rollOverLabelTextShadowHorizontalLength",rollOverItemLabelTextShadowVerticalLength:"rollOverLabelTextShadowVerticalLength",
rollOverItemLabelTextShadowBlurRadius:"rollOverLabelTextShadowBlurRadius",rollOverItemLabelTextShadowOpacity:"rollOverLabelTextShadowOpacity",rollOverItemOpacity:"rollOverOpacity",rollOverItemPaddingLeft:"rollOverPaddingLeft",rollOverItemPaddingTop:"rollOverPaddingTop",rollOverItemPaddingRight:"rollOverPaddingRight",rollOverItemPaddingBottom:"rollOverPaddingBottom",rollOverItemShadow:"rollOverShadow",rollOverItemThumbnailOpacity:"rollOverThumbnailOpacity",rollOverItemThumbnailBorderSize:"rollOverThumbnailBorderSize",
rollOverItemThumbnailBorderColor:"rollOverThumbnailBorderColor",rollOverItemThumbnailShadow:"rollOverThumbnailShadow",rollOverItemThumbnailShadowHorizontalLength:"rollOverThumbnailShadowHorizontalLength",rollOverItemThumbnailShadowVerticalLength:"rollOverThumbnailShadowVerticalLength",rollOverItemThumbnailShadowBlurRadius:"rollOverThumbnailShadowBlurRadius",rollOverItemThumbnailShadowSpread:"rollOverThumbnailShadowSpread",rollOverItemThumbnailShadowColor:"rollOverThumbnailShadowColor",rollOverItemThumbnailShadowOpacity:"rollOverThumbnailShadowOpacity",
selectedItemBackgroundOpacity:"selectedBackgroundOpacity",selectedItemBackgroundColor:"selectedBackgroundColor",selectedItemBackgroundColorRatios:"selectedBackgroundColorRatios",selectedItemBackgroundColorDirection:"selectedBackgroundColorDirection",selectedItemBorderRadius:"selectedBorderRadius",selectedItemBorderTopRadius:"selectedBorderTopRadius",selectedItemBorderBottomRadius:"selectedBorderBottomRadius",selectedItemBorderLeftRadius:"selectedBorderLeftRadius",selectedItemBorderRightRadius:"selectedBorderRightRadius",
selectedItemBorderTopLeftRadius:"selectedBorderTopLeftRadius",selectedItemBorderTopRightRadius:"selectedBorderTopRightRadius",selectedItemBorderBottomLeftRadius:"selectedBorderBottomLeftRadius",selectedItemBorderBottomRightRadius:"selectedBorderBottomRightRadius",selectedItemBorderSize:"selectedBorderSize",selectedItemBorderLeftSize:"selectedBorderLeftSize",selectedItemBorderTopSize:"selectedBorderTopSize",selectedItemBorderRightSize:"selectedBorderRightSize",selectedItemBorderBottomSize:"selectedBorderBottomSize",
selectedItemBorderColor:"selectedBorderColor",selectedItemBorderLeftColor:"selectedBorderLeftColor",selectedItemBorderTopColor:"selectedBorderTopColor",selectedItemBorderRightColor:"selectedBorderRightColor",selectedItemBorderBottomColor:"selectedBorderBottomColor",selectedItemLabelFontColor:"selectedLabelFontColor",selectedItemLabelFontSize:"selectedLabelFontSize",selectedItemLabelFontStyle:"selectedLabelFontStyle",selectedItemLabelFontWeight:"selectedLabelFontWeight",selectedItemLabelTextDecoration:"selectedLabelTextDecoration",
selectedItemLabelTextShadowColor:"selectedLabelTextShadowColor",selectedItemLabelTextShadowHorizontalLength:"selectedLabelTextShadowHorizontalLength",selectedItemLabelTextShadowVerticalLength:"selectedLabelTextShadowVerticalLength",selectedItemLabelTextShadowBlurRadius:"selectedLabelTextShadowBlurRadius",selectedItemLabelTextShadowOpacity:"selectedLabelTextShadowOpacity",selectedItemOpacity:"selectedOpacity",selectedItemPaddingLeft:"selectedPaddingLeft",selectedItemPaddingTop:"selectedPaddingTop",
selectedItemPaddingRight:"selectedPaddingRight",selectedItemPaddingBottom:"selectedPaddingBottom",selectedItemShadow:"selectedShadow",selectedItemThumbnailOpacity:"selectedThumbnailOpacity",selectedItemThumbnailBorderSize:"selectedThumbnailBorderSize",selectedItemThumbnailBorderColor:"selectedThumbnailBorderColor",selectedItemThumbnailShadow:"selectedThumbnailShadow",selectedItemThumbnailShadowHorizontalLength:"selectedThumbnailShadowHorizontalLength",selectedItemThumbnailShadowVerticalLength:"selectedThumbnailShadowVerticalLength",
selectedItemThumbnailShadowBlurRadius:"selectedThumbnailShadowBlurRadius",selectedItemThumbnailShadowSpread:"selectedThumbnailShadowSpread",selectedItemThumbnailShadowColor:"selectedThumbnailShadowColor",selectedItemThumbnailShadowOpacity:"selectedThumbnailShadowOpacity",tabIndex:"tabIndex",toolTipBackgroundColor:"toolTipBackgroundColor",toolTipBackgroundOpacity:"toolTipBackgroundOpacity",toolTipBorderRadius:"toolTipBorderRadius",toolTipBorderColor:"toolTipBorderColor",toolTipBorderSize:"toolTipBorderSize",
toolTipDisplayTime:"toolTipDisplayTime",toolTipFontFamily:"toolTipFontFamily",toolTipFontSize:"toolTipFontSize",toolTipFontColor:"toolTipFontColor",toolTipFontWeight:"toolTipFontWeight",toolTipFontStyle:"toolTipFontStyle",toolTipPaddingBottom:"toolTipPaddingBottom",toolTipPaddingLeft:"toolTipPaddingLeft",toolTipPaddingTop:"toolTipPaddingTop",toolTipPaddingRight:"toolTipPaddingRight",toolTipShadowBlurRadius:"toolTipShadowBlurRadius",toolTipShadowColor:"toolTipShadowColor",toolTipShadowHorizontalLength:"toolTipShadowHorizontalLength",
toolTipShadowOpacity:"toolTipShadowOpacity",toolTipShadowSpread:"toolTipShadowSpread",toolTipShadowVerticalLength:"toolTipShadowVerticalLength",toolTipOpacity:"toolTipOpacity",toolTipTextShadowBlurRadius:"toolTipTextShadowBlurRadius",toolTipTextShadowColor:"toolTipTextShadowColor",toolTipTextShadowHorizontalLength:"toolTipTextShadowHorizontalLength",toolTipTextShadowOpacity:"toolTipTextShadowOpacity",toolTipTextShadowVerticalLength:"toolTipTextShadowVerticalLength"};n.pN=Object.keys(n.eD);n.qN=Object.keys(n.fD);
return n});
define("kH","require pB ca fq km eo bX".split(" "),function(a){var d=a("pB"),l=a("ca"),m=a("fq"),k=a("km"),c=a("eo"),h=a("bX");a=m.define("ThumbnailGrid",l,function(){l.call(this);this.Ed=null;this.set("itemMode","normal");this.Mq=!1;this.IN=new k(this,"buttonScrollDown",c.Me);this.IN.bind(d.ma,this.oIa,this);this.JN=new k(this,"buttonScrollLeft",c.Me);this.JN.bind(d.ma,this.scrollLeft,this);this.KN=new k(this,"buttonScrollRight",c.Me);this.KN.bind(d.ma,this.pIa,this);this.LN=new k(this,"buttonScrollUp",
c.Me);this.LN.bind(d.ma,this.qIa,this);this.bind(d.ba,this.EXa,this)});a.prototype.cj=function(){l.prototype.cj.call(this);this.BF()};a.prototype.Mx=function(){l.prototype.Mx.call(this);this.BF()};a.prototype.BF=function(){this.IN.set("visible",!this.Mq||this.RW());this.LN.set("visible",!this.Mq||this.UW());this.JN.set("visible",!this.Mq||this.SW());this.KN.set("visible",!this.Mq||this.TW())};a.prototype.set=function(f,b){if("itemMode"==f)switch(b){case "thumbnail-only":this.set("itemLabelFunction",
this.rE);this.set("itemThumbnailUrlFunction",this.aP);this.set("itemTooltipFunction",this.Ew);this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"]);break;case "label-only":this.set("itemLabelFunction",this.Ew);this.set("itemThumbnailUrlFunction",this.rE);this.set("itemTooltipFunction",this.rE);this.set("itemSourceProperties",["label","media.label"]);break;default:this.set("itemLabelFunction",this.Ew),this.set("itemThumbnailUrlFunction",this.aP),
this.set("itemTooltipFunction",this.Ew),this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"])}else"playList"==f?(this.Ed&&this.Ed.unbind("change",this.Yw,this),(this.Ed=b)?(this.set("items",this.Ed.get("items")),this.set("selectedIndex",this.Ed.get("selectedIndex")),this.Ed.bind("change",this.Yw,this,!0)):this.set("items",[])):"hideScrollButtons"==f?(this.Mq=b,this.BF()):l.prototype.set.call(this,f,b)};a.prototype.get=function(f,b){switch(f){case "playList":return this.Ed;
default:return l.prototype.get.call(this,f,b)}};a.prototype.Yw=function(){this.set("items",this.Ed.get("items"));this.set("selectedIndex",this.Ed.get("selectedIndex"))};a.prototype.EXa=function(){this.Ed&&this.Ed.set("selectedIndex",this.get("selectedIndex"))};a.prototype.rE=function(){};a.prototype.Ew=function(f){return f.get("label")||f.get("media").get("label")};a.prototype.aP=function(f){f=f.get("media");var b=f.get("thumbnailUrl");f.get("flipImageHorizontally")&&(b=h.xBa(b));return b};return a});
define("le","require lV z pB nF cZ bi d iT mN hh T nk oU er".split(" "),function(a){var d=a("lV"),l=a("z"),m=a("pB"),k=a("nF"),c=a("cZ"),h=a("bi"),f=a("d"),b=a("iT"),e=a("mN"),g=a("hh"),n=a("T"),q=a("nk"),p=a("oU"),r=a("er"),t=d.extend(n,function(){n.call(this);this.Pa=this.ff=null;this.yD=[];this.set("ariaRole","option");this.set("autoRolledOver",!0);this.set("childrenInteractionEnabled",!1);this.set("contentOpaque",!0);this.set("creationPolicy",c.PC);this.set("cursor",h.Le)});t.prototype.yb=function(){n.prototype.yb.call(this);
this.h("listLayout");this.h("overflow","hidden");this.h("item");this.h("thumbnailUrlFunction",this.e$);this.h("sourceProperties");this.h("labelFunction",this.c$);this.h("labelFontFamily");this.h("labelFontColor");this.h("labelFontSize");this.h("labelFontStyle");this.h("labelFontWeight");this.h("labelGap");this.h("labelHorizontalAlign");this.h("labelPosition");this.h("labelTextDecoration");this.h("labelTextShadowColor");this.h("labelTextShadowHorizontalLength");this.h("labelTextShadowVerticalLength");
this.h("labelTextShadowBlurRadius");this.h("labelTextShadowOpacity");this.h("thumbnailBorderRadius");this.h("thumbnailOpacity");this.h("thumbnailBorderSize");this.h("thumbnailBorderColor");this.h("thumbnailWidth");this.h("thumbnailHeight");this.h("thumbnailMaxWidth");this.h("thumbnailMaxHeight");this.h("thumbnailShadow");this.h("thumbnailShadowHorizontalLength");this.h("thumbnailShadowVerticalLength");this.h("thumbnailShadowBlurRadius");this.h("thumbnailShadowSpread");this.h("thumbnailShadowColor");
this.h("thumbnailShadowOpacity");this.A("rollOverBackgroundOpacity",g.aa,"backgroundOpacity");this.A("rollOverBackgroundColor",g.aa,"backgroundColor");this.A("rollOverBackgroundColorRatios",g.aa,"backgroundColorRatios");this.A("rollOverBackgroundColorDirection",g.aa,"backgroundColorDirection");this.A("rollOverBorderRadius",g.aa,"borderRadius");this.A("rollOverBorderTopRadius",g.aa,"borderTopRadius");this.A("rollOverBorderBottomRadius",g.aa,"borderBottomRadius");this.A("rollOverBorderLeftRadius",g.aa,
"borderLeftRadius");this.A("rollOverBorderRightRadius",g.aa,"borderRightRadius");this.A("rollOverBorderTopLeftRadius",g.aa,"borderTopLeftRadius");this.A("rollOverBorderTopRightRadius",g.aa,"borderTopRightRadius");this.A("rollOverBorderBottomLeftRadius",g.aa,"borderBottomLeftRadius");this.A("rollOverBorderBottomRightRadius",g.aa,"borderBottomRightRadius");this.A("rollOverBorderSize",g.aa,"borderSize");this.A("rollOverBorderLeftSize",g.aa,"borderLeftSize");this.A("rollOverBorderTopSize",g.aa,"borderTopSize");
this.A("rollOverBorderRightSize",g.aa,"borderRightSize");this.A("rollOverBorderBottomSize",g.aa,"borderBottomSize");this.A("rollOverBorderColor",g.aa,"borderColor");this.A("rollOverBorderLeftColor",g.aa,"borderLeftColor");this.A("rollOverBorderTopColor",g.aa,"borderTopColor");this.A("rollOverBorderRightColor",g.aa,"borderRightColor");this.A("rollOverBorderBottomColor",g.aa,"borderBottomColor");this.A("rollOverLabelFontColor",g.aa,"labelFontColor");this.A("rollOverLabelFontSize",g.aa,"labelFontSize");
this.A("rollOverLabelFontStyle",g.aa,"labelFontStyle");this.A("rollOverLabelFontWeight",g.aa,"labelFontWeight");this.A("rollOverLabelTextDecoration",g.aa,"labelTextDecoration");this.A("rollOverLabelTextShadowColor",g.aa,"labelTextShadowColor");this.A("rollOverLabelTextShadowHorizontalLength",g.aa,"labelTextShadowHorizontalLength");this.A("rollOverLabelTextShadowVerticalLength",g.aa,"labelTextShadowVerticalLength");this.A("rollOverLabelTextShadowBlurRadius",g.aa,"labelTextShadowBlurRadius");this.A("rollOverLabelTextShadowOpacity",
g.aa,"labelTextShadowOpacity");this.A("rollOverOpacity",g.aa,"opacity");this.A("rollOverPaddingLeft",g.aa,"paddingLeft");this.A("rollOverPaddingTop",g.aa,"paddingTop");this.A("rollOverPaddingRight",g.aa,"paddingRight");this.A("rollOverPaddingBottom",g.aa,"paddingBottom");this.A("rollOverShadow",g.aa,"shadow");this.A("rollOverThumbnailOpacity",g.aa,"thumbnailOpacity");this.A("rollOverThumbnailBorderSize",g.aa,"thumbnailBorderSize");this.A("rollOverThumbnailBorderColor",g.aa,"thumbnailBorderColor");
this.A("rollOverThumbnailShadow",g.aa,"thumbnailShadow");this.A("rollOverThumbnailShadowHorizontalLength",g.aa,"thumbnailShadowHorizontalLength");this.A("rollOverThumbnailShadowVerticalLength",g.aa,"thumbnailShadowVerticalLength");this.A("rollOverThumbnailShadowBlurRadius",g.aa,"thumbnailShadowBlurRadius");this.A("rollOverThumbnailShadowSpread",g.aa,"thumbnailShadowSpread");this.A("rollOverThumbnailShadowColor",g.aa,"thumbnailShadowColor");this.A("rollOverThumbnailShadowOpacity",g.aa,"thumbnailShadowOpacity");
this.A("selectedBackgroundOpacity",g.ka,"backgroundOpacity");this.A("selectedBackgroundColor",g.ka,"backgroundColor");this.A("selectedBackgroundColorRatios",g.ka,"backgroundColorRatios");this.A("selectedBackgroundColorDirection",g.ka,"backgroundColorDirection");this.A("selectedBorderRadius",g.ka,"borderRadius");this.A("selectedBorderTopRadius",g.ka,"borderTopRadius");this.A("selectedBorderBottomRadius",g.ka,"borderBottomRadius");this.A("selectedBorderLeftRadius",g.ka,"borderLeftRadius");this.A("selectedBorderRightRadius",
g.ka,"borderRightRadius");this.A("selectedBorderTopLeftRadius",g.ka,"borderTopLeftRadius");this.A("selectedBorderTopRightRadius",g.ka,"borderTopRightRadius");this.A("selectedBorderBottomLeftRadius",g.ka,"borderBottomLeftRadius");this.A("selectedBorderBottomRightRadius",g.ka,"borderBottomRightRadius");this.A("selectedBorderSize",g.ka,"borderSize");this.A("selectedBorderLeftSize",g.ka,"borderLeftSize");this.A("selectedBorderTopSize",g.ka,"borderTopSize");this.A("selectedBorderRightSize",g.ka,"borderRightSize");
this.A("selectedBorderBottomSize",g.ka,"borderBottomSize");this.A("selectedBorderColor",g.ka,"borderColor");this.A("selectedBorderLeftColor",g.ka,"borderLeftColor");this.A("selectedBorderTopColor",g.ka,"borderTopColor");this.A("selectedBorderRightColor",g.ka,"borderRightColor");this.A("selectedBorderBottomColor",g.ka,"borderBottomColor");this.A("selectedLabelFontColor",g.ka,"labelFontColor");this.A("selectedLabelFontSize",g.ka,"labelFontSize");this.A("selectedLabelFontStyle",g.ka,"labelFontStyle");
this.A("selectedLabelFontWeight",g.ka,"labelFontWeight");this.A("selectedLabelTextDecoration",g.ka,"labelTextDecoration");this.A("selectedLabelTextShadowColor",g.ka,"labelTextShadowColor");this.A("selectedLabelTextShadowHorizontalLength",g.ka,"labelTextShadowHorizontalLength");this.A("selectedLabelTextShadowVerticalLength",g.ka,"labelTextShadowVerticalLength");this.A("selectedLabelTextShadowBlurRadius",g.ka,"labelTextShadowBlurRadius");this.A("selectedLabelTextShadowOpacity",g.ka,"labelTextShadowOpacity");
this.A("selectedOpacity",g.ka,"opacity");this.A("selectedPaddingLeft",g.ka,"paddingLeft");this.A("selectedPaddingTop",g.ka,"paddingTop");this.A("selectedPaddingRight",g.ka,"paddingRight");this.A("selectedPaddingBottom",g.ka,"paddingBottom");this.A("selectedShadow",g.ka,"shadow");this.A("selectedThumbnailOpacity",g.ka,"thumbnailOpacity");this.A("selectedThumbnailBorderSize",g.ka,"thumbnailBorderSize");this.A("selectedThumbnailBorderColor",g.ka,"thumbnailBorderColor");this.A("selectedThumbnailShadow",
g.ka,"thumbnailShadow");this.A("selectedThumbnailShadowHorizontalLength",g.ka,"thumbnailShadowHorizontalLength");this.A("selectedThumbnailShadowVerticalLength",g.ka,"thumbnailShadowVerticalLength");this.A("selectedThumbnailShadowBlurRadius",g.ka,"thumbnailShadowBlurRadius");this.A("selectedThumbnailShadowSpread",g.ka,"thumbnailShadowSpread");this.A("selectedThumbnailShadowColor",g.ka,"thumbnailShadowColor");this.A("selectedThumbnailShadowOpacity",g.ka,"thumbnailShadowOpacity")};t.prototype.TU=function(u){this.gR(u)};
t.prototype.Hb=function(){n.prototype.Hb.call(this);this.ff||(this.ff=new q,this.Za(this.ff),this.ff.set("horizontalAlign",k.$e),this.ff.set("verticalAlign",k.se),this.ff.bind(m.ea,this.Pfa,this));this.Pa||(this.Pa=new p,this.Za(this.Pa))};t.prototype.e$=function(u){if(r(u).isString())return u;if(u&&u.jma)return u.jma};t.prototype.c$=function(u){if(u&&u.label)return u.label};t.prototype.Nv=function(){return this.Pa&&this.Pa.get("text")||n.prototype.Nv.call(this)};t.prototype.bb=function(){if(this.L("sourceProperties")||
this.L("item")){for(;this.yD.length;)this.yD.pop().mC();var u=this.B("sourceProperties"),v=this.B("item");u&&v&&u.forEach(function(x){this.yD.push(l.Zu(v,x,this.jda,this,!0))}.bind(this))}if(this.L("sourceProperties")||this.L("item")||this.L("tooltipFunction"))v=this.B("item"),u=this.B("tooltipFunction")(v),this.set("toolTip",u);if(this.L("sourceProperties")||this.L("item")||this.L("thumbnailUrlFunction"))v=this.B("item"),(u=this.B("thumbnailUrlFunction")(v))?this.ff.get("url")!=u&&this.ff.ra({url:u,
visible:!0,opacity:.5}):this.ff.ra({url:void 0,visible:!1}),this.S("thumbnailUrlFunction");if(this.L("sourceProperties")||this.L("item")||this.L("labelFunction"))v=this.B("item"),u=this.B("labelFunction")(v),this.Pa.ra({text:u,visible:u?!0:!1}),this.S("labelFunction");this.S("sourceProperties");this.S("item");if(this.L("listLayout"))switch(this.B("listLayout")){case f.Yh:this.ra({width:"100%",height:void 0});break;default:this.ra({height:"100%",width:void 0})}if(this.L("labelPosition")||this.L("listLayout")||
this.L("thumbnailWidth")||this.L("thumbnailHeight")){var w=this;u=function(x,y){x=w.B(x);void 0===x&&(x=y);return x};switch(this.B("labelPosition")){case b.ab:case b.ub:this.set("layout",f.Ig);this.Pa.set("width","100%");switch(this.B("listLayout")){case f.Yh:this.ff.ra({height:u("thumbnailHeight"),width:u("thumbnailWidth"),scaleMode:u("thumbnailScaleMode",e.xk)});break;default:this.ff.ra({height:u("thumbnailHeight","100%"),width:u("thumbnailWidth"),scaleMode:u("thumbnailScaleMode",e.xk)})}break;
default:switch(this.set("layout",f.Yh),this.Pa.set("width",void 0),this.B("listLayout")){case f.Yh:this.ff.ra({height:u("thumbnailHeight"),width:u("thumbnailWidth","100%"),scaleMode:u("thumbnailScaleMode",e.bq)});break;default:this.ff.ra({height:u("thumbnailHeight","100%"),width:u("thumbnailWidth"),scaleMode:u("thumbnailScaleMode",e.xk)})}}switch(this.B("labelPosition")){case b.ab:case b.Hc:this.io(this.Pa,0);break;default:this.io(this.Pa,1)}this.S("labelPosition")}this.S("listLayout");this.xc(t.b8,
t.XH,[this],!0,!0);this.xc(t.d8,t.XH,[this.ff],!0,!0);this.xc(t.c8,t.XH,[this.Pa],!0,!0);n.prototype.bb.call(this)};t.prototype.jda=function(){this.lF("item")};t.prototype.iF=function(u){n.prototype.iF.call(this,u)};t.prototype.Pfa=function(){this.ff.set("opacity",1)};t.b8=["labelGap"];t.d8="thumbnailBorderColor thumbnailBorderRadius thumbnailBorderSize thumbnailMaxWidth thumbnailMaxHeight thumbnailOpacity thumbnailShadow thumbnailShadowHorizontalLength thumbnailShadowVerticalLength thumbnailShadowBlurRadius thumbnailShadowSpread thumbnailShadowColor thumbnailShadowOpacity".split(" ");
t.c8="labelFontFamily labelFontColor labelFontSize labelFontStyle labelFontWeight labelHorizontalAlign labelTextDecoration labelTextShadowColor labelTextShadowHorizontalLength labelTextShadowVerticalLength labelTextShadowBlurRadius labelTextShadowOpacity".split(" ");t.XH={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 t});
define("M","require lV cI nF pB d il iT T le jv".split(" "),function(a){var d=a("lV"),l=a("cI"),m=a("nF"),k=a("pB"),c=a("d"),h=a("il"),f=a("iT"),b=a("T"),e=a("le"),g=a("jv"),n=d.extend(b,function(){b.call(this);this.set("ariaRole","listbox");this.set("contentOpaque",!0);this.bind(k.G("selectedIndex"),this.rZa,this);this.bind(k.tc,this.T0a,this)});n.prototype.yb=function(){b.prototype.yb.call(this);this.h("layout",c.Ig);this.h("selectedIndex",-1);this.h("items",[]);this.h("overflow",h.mq);this.h("itemHorizontalAlign",
m.$e);this.h("itemLabelFontFamily");this.h("itemLabelPosition",f.Ac);this.h("itemLabelFunction");this.h("itemLabelGap");this.h("itemLabelHorizontalAlign",m.$e);this.h("itemThumbnailBorderRadius");this.h("itemThumbnailScaleMode");this.h("itemThumbnailWidth");this.h("itemThumbnailHeight");this.h("itemThumbnailMaxWidth");this.h("itemThumbnailMaxHeight");this.h("itemThumbnailUrlFunction");this.h("itemTooltipFunction");this.h("itemSourceProperties");this.h("itemVerticalAlign",m.se);this.h("itemBackgroundOpacity");
this.h("itemBackgroundColor");this.h("itemBackgroundColorRatios");this.h("itemBackgroundColorDirection");this.h("itemBorderRadius");this.h("itemBorderTopRadius");this.h("itemBorderBottomRadius");this.h("itemBorderLeftRadius");this.h("itemBorderRightRadius");this.h("itemBorderTopLeftRadius");this.h("itemBorderTopRightRadius");this.h("itemBorderBottomLeftRadius");this.h("itemBorderBottomRightRadius");this.h("itemBorderSize");this.h("itemBorderLeftSize");this.h("itemBorderTopSize");this.h("itemBorderRightSize");
this.h("itemBorderBottomSize");this.h("itemBorderColor");this.h("itemBorderLeftColor");this.h("itemBorderTopColor");this.h("itemBorderRightColor");this.h("itemBorderBottomColor");this.h("itemLabelFontColor");this.h("itemLabelFontSize");this.h("itemLabelFontStyle");this.h("itemLabelFontWeight");this.h("itemLabelTextDecoration");this.h("itemLabelTextShadowColor");this.h("itemLabelTextShadowHorizontalLength");this.h("itemLabelTextShadowVerticalLength");this.h("itemLabelTextShadowBlurRadius");this.h("itemLabelTextShadowOpacity");
this.h("itemOpacity");this.h("itemPaddingLeft");this.h("itemPaddingTop");this.h("itemPaddingRight");this.h("itemPaddingBottom");this.h("itemShadow");this.h("itemThumbnailOpacity");this.h("itemThumbnailBorderSize");this.h("itemThumbnailBorderColor");this.h("itemThumbnailShadow");this.h("itemThumbnailShadowHorizontalLength");this.h("itemThumbnailShadowVerticalLength");this.h("itemThumbnailShadowBlurRadius");this.h("itemThumbnailShadowSpread");this.h("itemThumbnailShadowColor");this.h("itemThumbnailShadowOpacity");
this.h("rollOverItemBackgroundOpacity");this.h("rollOverItemBackgroundColor");this.h("rollOverItemBackgroundColorRatios");this.h("rollOverItemBackgroundColorDirection");this.h("rollOverItemBorderRadius");this.h("rollOverItemBorderTopRadius");this.h("rollOverItemBorderBottomRadius");this.h("rollOverItemBorderLeftRadius");this.h("rollOverItemBorderRightRadius");this.h("rollOverItemBorderTopLeftRadius");this.h("rollOverItemBorderTopRightRadius");this.h("rollOverItemBorderBottomLeftRadius");this.h("rollOverItemBorderBottomRightRadius");
this.h("rollOverItemBorderSize");this.h("rollOverItemBorderLeftSize");this.h("rollOverItemBorderTopSize");this.h("rollOverItemBorderRightSize");this.h("rollOverItemBorderBottomSize");this.h("rollOverItemBorderColor");this.h("rollOverItemBorderLeftColor");this.h("rollOverItemBorderTopColor");this.h("rollOverItemBorderRightColor");this.h("rollOverItemBorderBottomColor");this.h("rollOverItemLabelFontSize");this.h("rollOverItemLabelFontStyle");this.h("rollOverItemLabelFontWeight");this.h("rollOverItemLabelTextDecoration");
this.h("rollOverItemLabelTextShadowColor");this.h("rollOverItemLabelTextShadowHorizontalLength");this.h("rollOverItemLabelTextShadowVerticalLength");this.h("rollOverItemLabelTextShadowBlurRadius");this.h("rollOverItemLabelTextShadowOpacity");this.h("rollOverItemOpacity");this.h("rollOverItemPaddingLeft");this.h("rollOverItemPaddingTop");this.h("rollOverItemPaddingRight");this.h("rollOverItemPaddingBottom");this.h("rollOverItemShadow");this.h("rollOverItemThumbnailOpacity");this.h("rollOverItemThumbnailBorderSize");
this.h("rollOverItemThumbnailBorderColor");this.h("rollOverItemThumbnailShadow");this.h("rollOverItemThumbnailShadowHorizontalLength");this.h("rollOverItemThumbnailShadowVerticalLength");this.h("rollOverItemThumbnailShadowBlurRadius");this.h("rollOverItemThumbnailShadowSpread");this.h("rollOverItemThumbnailShadowColor");this.h("rollOverItemThumbnailShadowOpacity");this.h("selectedItemBackgroundOpacity");this.h("selectedItemBackgroundColor");this.h("selectedItemBackgroundColorRatios");this.h("selectedItemBackgroundColorDirection");
this.h("selectedItemBorderRadius");this.h("selectedItemBorderTopRadius");this.h("selectedItemBorderBottomRadius");this.h("selectedItemBorderLeftRadius");this.h("selectedItemBorderRightRadius");this.h("selectedItemBorderTopLeftRadius");this.h("selectedItemBorderTopRightRadius");this.h("selectedItemBorderBottomLeftRadius");this.h("selectedItemBorderBottomRightRadius");this.h("selectedItemBorderSize");this.h("selectedItemBorderLeftSize");this.h("selectedItemBorderTopSize");this.h("selectedItemBorderRightSize");
this.h("selectedItemBorderBottomSize");this.h("selectedItemBorderColor");this.h("selectedItemBorderLeftColor");this.h("selectedItemBorderTopColor");this.h("selectedItemBorderRightColor");this.h("selectedItemBorderBottomColor");this.h("selectedItemLabelFontSize");this.h("selectedItemLabelFontStyle");this.h("selectedItemLabelFontWeight");this.h("selectedItemLabelTextDecoration");this.h("selectedItemLabelTextShadowColor");this.h("selectedItemLabelTextShadowHorizontalLength");this.h("selectedItemLabelTextShadowVerticalLength");
this.h("selectedItemLabelTextShadowBlurRadius");this.h("selectedItemLabelTextShadowOpacity");this.h("selectedItemOpacity");this.h("selectedItemPaddingLeft");this.h("selectedItemPaddingTop");this.h("selectedItemPaddingRight");this.h("selectedItemPaddingBottom");this.h("selectedItemShadow");this.h("selectedItemThumbnailOpacity");this.h("selectedItemThumbnailBorderSize");this.h("selectedItemThumbnailBorderColor");this.h("selectedItemThumbnailShadow");this.h("selectedItemThumbnailShadowHorizontalLength");
this.h("selectedItemThumbnailShadowVerticalLength");this.h("selectedItemThumbnailShadowBlurRadius");this.h("selectedItemThumbnailShadowSpread");this.h("selectedItemThumbnailShadowColor");this.h("selectedItemThumbnailShadowOpacity")};n.prototype.ZO=function(q){this.sp=!0;this.set("selectedIndex",this.xaa(q.source))};n.prototype.rZa=function(){this.nya()};n.prototype.T0a=function(){setTimeout(function(){this.nya()}.bind(this),100)};n.prototype.nya=function(){var q=this.get("selectedIndex"),p=this.rb();
0<=q&&q<p.length&&this.scrollIntoView(p[q])};n.prototype.xaa=function(q){for(var p=this.rb(),r=0;r<p.length;r++)if(p[r]==q)return r;return-1};n.prototype.bb=function(){var q=!1;if(this.L("layout")){q=!0;var p=this.B("layout");p!=c.Yh&&p!=c.Ig&&this.set("layout",c.Ig)}p=!1;if(this.L("items")){p=!0;var r=this.B("items")||[],t=this.rb();if(t.length<r.length){for(var u=t.length;u<r.length;u++)t=new e,t.bind(k.ma,this.ZO,this),this.xc(n.pN,n.eD,[t],!1,!1),this.xc(n.qN,n.fD,[t],!1,!1),this.Za(t);t=this.rb()}if(t.length>
r.length){for(u=r.length;u<t.length;u++){var v=t[u];v.unbind(k.ma,this.ZO,this);this.removeChild(v)}t=this.rb()}for(u=0;u<r.length;u++)t[u].set("item",r[u]);this.S("items")}if(this.L("selectedIndex")||p){r=this.rb();t=Math.min(r.length-1,Math.max(-1,this.B("selectedIndex")));this.set("selectedIndex",t);for(u=0;u<r.length;u++)r[u].TU(u==t);this.S("selectedIndex");this.sp&&(this.sp=!1,this.trigger(new l(k.ba)))}if(q||p)this.B("layout")==c.Ig?g.A3a(this,this.rb().map(function(w){return w.Xd()})):g.DBa(this,
this.rb().map(function(w){return w.Xd()}));this.xc(n.pN,n.eD,this.rb(),!0,!1);this.xc(n.qN,n.fD,this.rb(),!0,!0);b.prototype.bb.call(this)};n.eD={layout:"listLayout",shadowHorizontalLength:"shadowHorizontalLength",shadowVerticalLength:"shadowVerticalLength",shadowBlurRadius:"shadowBlurRadius",shadowSpread:"shadowSpread",shadowOpacity:"shadowOpacity",shadowColor:"shadowColor"};n.fD={itemHorizontalAlign:"horizontalAlign",itemLabelFunction:"labelFunction",itemLabelFontFamily:"labelFontFamily",itemLabelGap:"labelGap",
itemLabelHorizontalAlign:"labelHorizontalAlign",itemLabelPosition:"labelPosition",itemSourceProperties:"sourceProperties",itemThumbnailBorderRadius:"thumbnailBorderRadius",itemThumbnailScaleMode:"thumbnailScaleMode",itemThumbnailHeight:"thumbnailHeight",itemThumbnailWidth:"thumbnailWidth",itemThumbnailMaxHeight:"thumbnailMaxHeight",itemThumbnailMaxWidth:"thumbnailMaxWidth",itemThumbnailUrlFunction:"thumbnailUrlFunction",itemTooltipFunction:"tooltipFunction",itemVerticalAlign:"verticalAlign",itemBackgroundOpacity:"backgroundOpacity",
itemBackgroundColor:"backgroundColor",itemBackgroundColorRatios:"backgroundColorRatios",itemBackgroundColorDirection:"backgroundColorDirection",itemBorderRadius:"borderRadius",itemBorderTopRadius:"borderTopRadius",itemBorderBottomRadius:"borderBottomRadius",itemBorderLeftRadius:"borderLeftRadius",itemBorderRightRadius:"borderRightRadius",itemBorderTopLeftRadius:"borderTopLeftRadius",itemBorderTopRightRadius:"borderTopRightRadius",itemBorderBottomLeftRadius:"borderBottomLeftRadius",itemBorderBottomRightRadius:"borderBottomRightRadius",
itemBorderSize:"borderSize",itemBorderLeftSize:"borderLeftSize",itemBorderTopSize:"borderTopSize",itemBorderRightSize:"borderRightSize",itemBorderBottomSize:"borderBottomSize",itemBorderColor:"borderColor",itemBorderLeftColor:"borderLeftColor",itemBorderTopColor:"borderTopColor",itemBorderRightColor:"borderRightColor",itemBorderBottomColor:"borderBottomColor",itemLabelFontColor:"labelFontColor",itemLabelFontSize:"labelFontSize",itemLabelFontStyle:"labelFontStyle",itemLabelFontWeight:"labelFontWeight",
itemLabelTextDecoration:"labelTextDecoration",itemLabelTextShadowColor:"labelTextShadowColor",itemLabelTextShadowHorizontalLength:"labelTextShadowHorizontalLength",itemLabelTextShadowVerticalLength:"labelTextShadowVerticalLength",itemLabelTextShadowBlurRadius:"labelTextShadowBlurRadius",itemLabelTextShadowOpacity:"labelTextShadowOpacity",itemOpacity:"opacity",itemPaddingLeft:"paddingLeft",itemPaddingTop:"paddingTop",itemPaddingRight:"paddingRight",itemPaddingBottom:"paddingBottom",itemShadow:"shadow",
itemThumbnailOpacity:"thumbnailOpacity",itemThumbnailBorderSize:"thumbnailBorderSize",itemThumbnailBorderColor:"thumbnailBorderColor",itemThumbnailShadow:"thumbnailShadow",itemThumbnailShadowHorizontalLength:"thumbnailShadowHorizontalLength",itemThumbnailShadowVerticalLength:"thumbnailShadowVerticalLength",itemThumbnailShadowBlurRadius:"thumbnailShadowBlurRadius",itemThumbnailShadowSpread:"thumbnailShadowSpread",itemThumbnailShadowColor:"thumbnailShadowColor",itemThumbnailShadowOpacity:"thumbnailShadowOpacity",
rollOverItemBackgroundOpacity:"rollOverBackgroundOpacity",rollOverItemBackgroundColor:"rollOverBackgroundColor",rollOverItemBackgroundColorRatios:"rollOverBackgroundColorRatios",rollOverItemBackgroundColorDirection:"rollOverBackgroundColorDirection",rollOverItemBorderRadius:"rollOverBorderRadius",rollOverItemBorderTopRadius:"rollOverBorderTopRadius",rollOverItemBorderBottomRadius:"rollOverBorderBottomRadius",rollOverItemBorderLeftRadius:"rollOverBorderLeftRadius",rollOverItemBorderRightRadius:"rollOverBorderRightRadius",
rollOverItemBorderTopLeftRadius:"rollOverBorderTopLeftRadius",rollOverItemBorderTopRightRadius:"rollOverBorderTopRightRadius",rollOverItemBorderBottomLeftRadius:"rollOverBorderBottomLeftRadius",rollOverItemBorderBottomRightRadius:"rollOverBorderBottomRightRadius",rollOverItemBorderSize:"rollOverBorderSize",rollOverItemBorderLeftSize:"rollOverBorderLeftSize",rollOverItemBorderTopSize:"rollOverBorderTopSize",rollOverItemBorderRightSize:"rollOverBorderRightSize",rollOverItemBorderBottomSize:"rollOverBorderBottomSize",
rollOverItemBorderColor:"rollOverBorderColor",rollOverItemBorderLeftColor:"rollOverBorderLeftColor",rollOverItemBorderTopColor:"rollOverBorderTopColor",rollOverItemBorderRightColor:"rollOverBorderRightColor",rollOverItemBorderBottomColor:"rollOverBorderBottomColor",rollOverItemLabelFontColor:"rollOverLabelFontColor",rollOverItemLabelFontSize:"rollOverLabelFontSize",rollOverItemLabelFontStyle:"rollOverLabelFontStyle",rollOverItemLabelFontWeight:"rollOverLabelFontWeight",rollOverItemLabelTextDecoration:"rollOverLabelTextDecoration",
rollOverItemLabelTextShadowColor:"rollOverLabelTextShadowColor",rollOverItemLabelTextShadowHorizontalLength:"rollOverLabelTextShadowHorizontalLength",rollOverItemLabelTextShadowVerticalLength:"rollOverLabelTextShadowVerticalLength",rollOverItemLabelTextShadowBlurRadius:"rollOverLabelTextShadowBlurRadius",rollOverItemLabelTextShadowOpacity:"rollOverLabelTextShadowOpacity",rollOverItemOpacity:"rollOverOpacity",rollOverItemPaddingLeft:"rollOverPaddingLeft",rollOverItemPaddingTop:"rollOverPaddingTop",
rollOverItemPaddingRight:"rollOverPaddingRight",rollOverItemPaddingBottom:"rollOverPaddingBottom",rollOverItemShadow:"rollOverShadow",rollOverItemThumbnailOpacity:"rollOverThumbnailOpacity",rollOverItemThumbnailBorderSize:"rollOverThumbnailBorderSize",rollOverItemThumbnailBorderColor:"rollOverThumbnailBorderColor",rollOverItemThumbnailShadow:"rollOverThumbnailShadow",rollOverItemThumbnailShadowHorizontalLength:"rollOverThumbnailShadowHorizontalLength",rollOverItemThumbnailShadowVerticalLength:"rollOverThumbnailShadowVerticalLength",
rollOverItemThumbnailShadowBlurRadius:"rollOverThumbnailShadowBlurRadius",rollOverItemThumbnailShadowSpread:"rollOverThumbnailShadowSpread",rollOverItemThumbnailShadowColor:"rollOverThumbnailShadowColor",rollOverItemThumbnailShadowOpacity:"rollOverThumbnailShadowOpacity",selectedItemBackgroundOpacity:"selectedBackgroundOpacity",selectedItemBackgroundColor:"selectedBackgroundColor",selectedItemBackgroundColorRatios:"selectedBackgroundColorRatios",selectedItemBackgroundColorDirection:"selectedBackgroundColorDirection",
selectedItemBorderRadius:"selectedBorderRadius",selectedItemBorderTopRadius:"selectedBorderTopRadius",selectedItemBorderBottomRadius:"selectedBorderBottomRadius",selectedItemBorderLeftRadius:"selectedBorderLeftRadius",selectedItemBorderRightRadius:"selectedBorderRightRadius",selectedItemBorderTopLeftRadius:"selectedBorderTopLeftRadius",selectedItemBorderTopRightRadius:"selectedBorderTopRightRadius",selectedItemBorderBottomLeftRadius:"selectedBorderBottomLeftRadius",selectedItemBorderBottomRightRadius:"selectedBorderBottomRightRadius",
selectedItemBorderSize:"selectedBorderSize",selectedItemBorderLeftSize:"selectedBorderLeftSize",selectedItemBorderTopSize:"selectedBorderTopSize",selectedItemBorderRightSize:"selectedBorderRightSize",selectedItemBorderBottomSize:"selectedBorderBottomSize",selectedItemBorderColor:"selectedBorderColor",selectedItemBorderLeftColor:"selectedBorderLeftColor",selectedItemBorderTopColor:"selectedBorderTopColor",selectedItemBorderRightColor:"selectedBorderRightColor",selectedItemBorderBottomColor:"selectedBorderBottomColor",
selectedItemLabelFontColor:"selectedLabelFontColor",selectedItemLabelFontSize:"selectedLabelFontSize",selectedItemLabelFontStyle:"selectedLabelFontStyle",selectedItemLabelFontWeight:"selectedLabelFontWeight",selectedItemLabelTextDecoration:"selectedLabelTextDecoration",selectedItemLabelTextShadowColor:"selectedLabelTextShadowColor",selectedItemLabelTextShadowHorizontalLength:"selectedLabelTextShadowHorizontalLength",selectedItemLabelTextShadowVerticalLength:"selectedLabelTextShadowVerticalLength",
selectedItemLabelTextShadowBlurRadius:"selectedLabelTextShadowBlurRadius",selectedItemLabelTextShadowOpacity:"selectedLabelTextShadowOpacity",selectedItemOpacity:"selectedOpacity",selectedItemPaddingLeft:"selectedPaddingLeft",selectedItemPaddingTop:"selectedPaddingTop",selectedItemPaddingRight:"selectedPaddingRight",selectedItemPaddingBottom:"selectedPaddingBottom",selectedItemShadow:"selectedShadow",selectedItemThumbnailOpacity:"selectedThumbnailOpacity",selectedItemThumbnailBorderSize:"selectedThumbnailBorderSize",
selectedItemThumbnailBorderColor:"selectedThumbnailBorderColor",selectedItemThumbnailShadow:"selectedThumbnailShadow",selectedItemThumbnailShadowHorizontalLength:"selectedThumbnailShadowHorizontalLength",selectedItemThumbnailShadowVerticalLength:"selectedThumbnailShadowVerticalLength",selectedItemThumbnailShadowBlurRadius:"selectedThumbnailShadowBlurRadius",selectedItemThumbnailShadowSpread:"selectedThumbnailShadowSpread",selectedItemThumbnailShadowColor:"selectedThumbnailShadowColor",selectedItemThumbnailShadowOpacity:"selectedThumbnailShadowOpacity",
tabIndex:"tabIndex",toolTipBackgroundColor:"toolTipBackgroundColor",toolTipBackgroundOpacity:"toolTipBackgroundOpacity",toolTipBorderRadius:"toolTipBorderRadius",toolTipBorderColor:"toolTipBorderColor",toolTipBorderSize:"toolTipBorderSize",toolTipDisplayTime:"toolTipDisplayTime",toolTipFontFamily:"toolTipFontFamily",toolTipFontSize:"toolTipFontSize",toolTipFontColor:"toolTipFontColor",toolTipFontWeight:"toolTipFontWeight",toolTipFontStyle:"toolTipFontStyle",toolTipPaddingBottom:"toolTipPaddingBottom",
toolTipPaddingLeft:"toolTipPaddingLeft",toolTipPaddingTop:"toolTipPaddingTop",toolTipPaddingRight:"toolTipPaddingRight",toolTipShadowBlurRadius:"toolTipShadowBlurRadius",toolTipShadowColor:"toolTipShadowColor",toolTipShadowHorizontalLength:"toolTipShadowHorizontalLength",toolTipShadowOpacity:"toolTipShadowOpacity",toolTipShadowSpread:"toolTipShadowSpread",toolTipShadowVerticalLength:"toolTipShadowVerticalLength",toolTipOpacity:"toolTipOpacity",toolTipTextShadowBlurRadius:"toolTipTextShadowBlurRadius",
toolTipTextShadowColor:"toolTipTextShadowColor",toolTipTextShadowHorizontalLength:"toolTipTextShadowHorizontalLength",toolTipTextShadowOpacity:"toolTipTextShadowOpacity",toolTipTextShadowVerticalLength:"toolTipTextShadowVerticalLength"};n.pN=Object.keys(n.eD);n.qN=Object.keys(n.fD);return n});
define("hS","require pB M fq km eo bX".split(" "),function(a){var d=a("pB"),l=a("M"),m=a("fq"),k=a("km"),c=a("eo"),h=a("bX");a=m.define("ThumbnailList",l,function(){l.call(this);this.Ed=null;this.Mq=!1;this.IN=new k(this,"buttonScrollDown",c.Me);this.IN.bind(d.ma,this.oIa,this);this.JN=new k(this,"buttonScrollLeft",c.Me);this.JN.bind(d.ma,this.scrollLeft,this);this.KN=new k(this,"buttonScrollRight",c.Me);this.KN.bind(d.ma,this.pIa,this);this.LN=new k(this,"buttonScrollUp",c.Me);this.LN.bind(d.ma,
this.qIa,this);this.bind(d.ba,this.FXa,this)});a.prototype.cj=function(){l.prototype.cj.call(this);this.BF()};a.prototype.Mx=function(){l.prototype.Mx.call(this);this.BF()};a.prototype.BF=function(){this.IN.set("visible",!this.Mq||this.RW());this.LN.set("visible",!this.Mq||this.UW());this.JN.set("visible",!this.Mq||this.SW());this.KN.set("visible",!this.Mq||this.TW())};a.prototype.set=function(f,b){if("itemMode"==f)switch(b){case "thumbnail-only":this.set("itemLabelFunction",this.rE);this.set("itemThumbnailUrlFunction",
this.aP);this.set("itemTooltipFunction",this.Ew);this.set("itemSourceProperties",["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"]);break;case "label-only":this.set("itemLabelFunction",this.Ew);this.set("itemThumbnailUrlFunction",this.rE);this.set("itemTooltipFunction",this.rE);this.set("itemSourceProperties",["label","media.label"]);break;default:this.set("itemLabelFunction",this.Ew),this.set("itemThumbnailUrlFunction",this.aP),this.set("itemTooltipFunction",this.Ew),this.set("itemSourceProperties",
["label","media.label","media.thumbnailUrl","media.flipImageHorizontally"])}else"playList"==f?(this.Ed&&this.Ed.unbind("change",this.Yw,this),(this.Ed=b)?(this.set("items",this.Ed.get("items")),this.Ed.bind("change",this.Yw,this)):this.set("items",[])):"hideScrollButtons"==f?(this.Mq=b,this.BF()):l.prototype.set.call(this,f,b)};a.prototype.get=function(f,b){switch(f){case "playList":return this.Ed;default:return l.prototype.get.call(this,f,b)}};a.prototype.Yw=function(){this.set("items",this.Ed.get("items"));
this.set("selectedIndex",this.Ed.get("selectedIndex"))};a.prototype.FXa=function(){this.Ed&&this.Ed.set("selectedIndex",this.get("selectedIndex"))};a.prototype.rE=function(){};a.prototype.Ew=function(f){return f.get("label")||f.get("media").get("label")};a.prototype.aP=function(f){f=f.get("media");var b=f.get("thumbnailUrl");f.get("flipImageHorizontally")&&(b=h.xBa(b));return b};return a});define("cf",["require","e","fq"],function(a){var d=a("e");return a("fq").define("UIComponent",d,function(){d.call(this)})});
define("iW",["require","fq","ey"],function(a){var d=a("fq"),l=a("ey");a=d.define("Video",l,function(){l.call(this);this.Aa=void 0});a.prototype.Bu=function(){this.get("video");return[]};return a});define("hx",["require","fq","fn"],function(a){var d=a("fq"),l=a("fn");return d.define("VideoPanorama",l,function(){l.call(this)})});
define("kf",["require","mz","fq"],function(a){var d=a("mz");a=a("fq").define("Video360Resource",d,function(){d.call(this)});a.prototype.get=function(l,m){if(void 0===m)switch(l){case "gain":m=1}switch(l){case "levels":m=[this];break;case "subtitlesURL":case "gain":for(var k=d.prototype.get.call(this,l),c=this.get("levels"),h=0;c&&h<c.length&&void 0===k;h++){var f=c[h];f!=this&&(k=f.get(l))}return void 0!==k?k:m}return d.prototype.get.call(this,l,m)};return a});
define("dK",["require","fq","mL","hx","kf"],function(a){var d=a("fq"),l=a("mL"),m=a("hx"),k=a("kf");a=d.define("Video360",m,function(){m.call(this);this.Wo=this.NK=this.zb=void 0});a.prototype.set=function(c,h){"video"==c?this.bPa(h):"videoStereo"==c?this.cPa(h):m.prototype.set.call(this,c,h)};a.prototype.get=function(c,h){return"video"==c?void 0!==this.zb?this.zb:h:"videoStereo"==c?void 0!==this.NK?this.NK:h:m.prototype.get.call(this,c,h)};a.prototype.bPa=function(c){this.zb!=c&&(this.zb=c,c=m.prototype.get.call(this,
"frames")||[],this.zb&&(0==c.length&&c.push(new l),c[0].set("sphere",this.Fua(this.zb))),m.prototype.set.call(this,"frames",c.slice()))};a.prototype.cPa=function(c){this.NK!=c&&(this.NK=c,c=m.prototype.get.call(this,"frames")||[],this.NK&&(0==c.length&&c.push(new l),c[0].set("stereoSphere",this.Fua(this.NK))),m.prototype.set.call(this,"frames",c.slice()))};a.prototype.Fua=function(c){if(Array.isArray(c)){if(0==c.length)return;if(1==c.length&&d.Ja("Video360Resource",c[0]))return c[0];var h=[];c.forEach(function(f){h=
h.concat(f.get("levels")||[f])});c=new k;c.set("levels",h)}return c};return a});define("bW",["require","fq","pg"],function(a){var d=a("fq"),l=a("pg");return d.define("Video360Player",l,function(){l.call(this)})});
define("kD",["require","fq","dn","iM"],function(a){var d=a("fq"),l=a("dn"),m=a("iM");a=d.define("Video360PlayListItem",m,function(){m.call(this)});a.prototype.start=function(){m.prototype.start.call(this);var k=this.get("player");k&&(k.bind(l.th,this.In,this),k.set("video",this.get("media")),k.set("camera",this.get("camera")),k.set("startTime",this.get("startTime")))};a.prototype.stop=function(){var k=this.get("player");k&&(k.unbind(l.th,this.In,this),k.get("video")==this.get("media")&&k.set("video",
null));m.prototype.stop.call(this)};a.prototype.In=function(k){k.data.media==this.get("media")&&(this.get("player").unbind(l.th,this.In,this),this.get("player").bind(l.Vm,this.gr,this),this.nB())};a.prototype.gr=function(k){k.data.media==this.get("media")&&(this.get("player").unbind(l.Vm,this.gr,this),this.stop(),this.end())};return a});define("pp",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("Video360ResourceLevel",d,function(){d.call(this)})});
define("gi",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("VideoCue",d,function(){d.call(this)})});
define("co","require mz pB lx cI fq kT".split(" "),function(a){var d=a("mz"),l=a("pB"),m=a("lx"),k=a("cI"),c=a("fq"),h=a("kT");a=c.define("VideoPanoramaOverlay",d,function(){d.call(this);this.sd=void 0});a.prototype.play=a.prototype.play=function(){this.set("state",m.PLAYING)};a.prototype.pause=a.prototype.pause=function(){this.set("state",m.Qb)};a.prototype.stop=a.prototype.stop=function(){this.set("state",m.U)};a.prototype.set=function(f,b){var e=!1;switch(f){case "state":var g=this.get("state")||
m.U;g==m.U&&b==m.PLAYING&&this.trigger(l.uo);g!=b&&this.trigger(new k(l.Ae,{oldState:g,state:b}));break;case "enabledInCardboard":this.set("enabledInVR",b);break;case "distance":case "hfov":case "opacity":case "pitch":case "rotationX":case "rotationY":case "roll":case "vfov":case "yaw":case "playbackPositions":this.sd=void 0,e=!0}d.prototype.set.call(this,f,b);e&&"playbackPositions"!=f&&this.trigger(l.G("playbackPositions"))};a.prototype.get=function(f,b){switch(f){case "playbackPositions":return void 0===
this.sd&&(this.sd=h.Zia(this)),this.sd}return d.prototype.get.call(this,f,b)};return a});define("is",["require","fq","pW"],function(a){var d=a("fq"),l=a("pW");return d.define("VideoPlaneModel3DObject",l,function(){l.call(this)})});
define("dz","require er lV pB cI gF lx".split(" "),function(a){function d(b,e,g){this.time=b;this.cue=e;this.action=g}var l=a("er"),m=a("lV"),k=a("pB"),c=a("cI"),h=a("gF"),f=a("lx");a=m.extend(h,function(b){h.call(this);this.j=b;this.Vc=null;this.Uk=!1;this.kj=[];this.kn=void 0;this.Ne=[]});a.prototype.clear=function(){this.j=null;this.BD();this.kj=[];this.Ne=[]};a.prototype.start=function(b){this.end();this.Uea(b);this.I9();this.zfa();this.GF()};a.prototype.Uea=function(b){this.BD();this.Vc=b;this.Vc.bind(k.G("currentTime"),
this.GF,this,!0);this.Vc.bind(k.G("state"),this.zfa,this,!0);this.Vc.bind(k.Gb,this.gS,this,!0)};a.prototype.BD=function(){this.Vc&&(this.Vc.unbind(k.G("currentTime"),this.GF,this),this.Vc.unbind(k.G("state"),this.zfa,this),this.Vc.unbind(k.Gb,this.gS,this),this.Vc=null)};a.prototype.end=function(){this.MN();this.BD();this.Uk=!1};a.prototype.zfa=function(b){b=b!=f.U;this.Uk!=b&&((this.Uk=b)?this.Q0():this.MN())};a.prototype.gS=function(){this.GF()};a.prototype.Q0=function(){this.kn=this.yI=0};a.prototype.GF=
function(){if(this.Vc&&this.Uk){var b=this.Ne.slice(),e=this.Vc.get("currentTime",0),g=e-this.yI;0>g&&(this.Ne=[],this.kn=0);g=0<=g&&2>g;this.yI=e;var n;for(n=this.kn;n<this.kj.length&&!(this.kj[n].time>e);n++);for(;this.kn<n;this.kn++)e=this.kj[this.kn],"start"==e.action?(this.Ne=l(this.Ne).union([e.cue]),g&&e.cue.trigger(new c(k.Tp))):(this.Ne=l(this.Ne).difference([e.cue]),g&&e.cue.trigger(new c(k.Gb)));b.length==this.Ne.length&&l(b).intersection(this.Ne).length==this.Ne.length||this.PR()}};a.prototype.MN=
function(){0<this.Ne.length&&(this.Ne=[],this.PR())};a.prototype.PR=function(){this.Vc.trigger(new c(k.uk,{activeCues:this.Ne.slice()}))};a.prototype.I9=function(){this.kj=[];var b=this.Vc.get("cues",[]);l(b).each(function(e){this.kj.push(new d(e.get("startTime",0),e,"start"));this.kj.push(new d(e.get("endTime",Number.POSITIVE_INFINITY),e,"end"))},this);this.kj.sort(function(e,g){return e.time==g.time?e.action==g.start?0:"start"==e.action?-1:1:e.time-g.time})};return a});
define("or","require lV bo cI gF pB mN".split(" "),function(a){var d=a("lV"),l=a("bo"),m=a("cI"),k=a("gF");a("pB");a("mN");var c=d.extend(k,function(h,f){k.call(this);this.M=h;this.j=f;this.QE=[];this.ua=c.Zh;this.Di=null;this.j$=void 0;this.mj=null;this.um=this.ih=void 0});c.prototype.display=function(h,f){this.o9();if(this.mj!=h||this.ua!=c.Zh)this.QE.push({video:h,startTime:f}),this.bwa()};c.prototype.hide=function(){this.o9();this.QE.push({video:null,startTime:void 0});this.bwa()};c.prototype.clear=
function(){this.ua=c.Zh;this.o9();this.HYa();this.Lxa();this.j=null};c.prototype.Vg=function(h){this.ua==c.Zh||this.ua!=c.Jl&&this.ua!=c.Zs&&this.ua!=c.Hv||(this.um+=h,h=Math.min(1,this.um/this.ih),this.ua==c.Jl?(this.Di.set("opacity",h),this.M.Qd().rM(h)):this.ua==c.Hv?(this.Di.set("opacity",Math.min(1,2*h)),this.mj.set("opacity",Math.min(1,2*(1-h)))):this.M.Qd().TG(h),this.um<this.ih?this.Sa():this.aA())};c.prototype.bwa=function(){0<this.QE.length&&this.ua==c.Zh&&this.vq()};c.prototype.vq=function(){this.mj&&
this.trigger(new m(c.KC,{video:this.mj}));if("fade_out_fade_in"==this.M.get("transitionMode","blending")&&this.mj)this.Dz();else{var h=this.QE.shift();this.Di=h.video;this.j$=h.startTime;this.Di?this.Di.get("chromaColor")&&this.mj?this.S8():this.CN():this.mj&&this.Dz()}};c.prototype.CN=function(){this.ipa();this.um=0;this.ih=this.M.get("transitionDuration");this.ua=c.Jl;this.M.Qd().CM();this.j.sb(!0);this.Sa()};c.prototype.S8=function(){this.ipa();this.um=0;this.ih=2*this.M.get("transitionDuration");
this.ua=c.Hv;this.Sa()};c.prototype.Dz=function(){this.Di=null;this.um=0;this.ih=this.M.get("transitionDuration");this.ua=c.Zs;this.M.Qd().dH();this.mj.set("opacity",0);this.j.sb(!1);this.Sa()};c.prototype.aA=function(){this.Lxa();this.mj=this.Di;this.Di=null;this.ua==c.Zs?this.M.Qd().YF():this.ua==c.Jl&&this.M.Qd().kL();this.ua=c.Zh;this.mj?this.trigger(new m(c.LC,{video:this.mj})):0==this.QE.length&&this.trigger(new m(c.Sma));0!=this.QE.length&&this.vq()};c.prototype.Sa=function(){l.requestFrame(this.Vg,
this)};c.prototype.o9=function(){this.QE=[]};c.prototype.ipa=function(){this.Di&&(this.Di.set("opacity",0),this.Di.set("zIndex",1),this.mj&&this.mj.set("zIndex",0),this.Di.set("currentTime",this.j$||0),this.j.L3a(this.Di),this.trigger(new m(c.g7,{video:this.Di,startTime:this.j$})))};c.prototype.Lxa=function(){this.mj&&(this.j.aIa(this.mj),this.trigger(new m(c.MV,{video:this.mj})),this.mj=null)};c.prototype.HYa=function(){this.Di&&(this.j.aIa(this.Di),this.trigger(new m(c.MV,{video:this.Di})),this.Di=
null)};c.Zh="stopped";c.Jl="blending";c.Hv="double blending";c.Zs="disolving";c.Ob="request frame";c.g7="video added";c.MV="video removed";c.LC="video show";c.KC="video hide";c.Sma="all pending videos hidden";return c});
define("jP","require lV pB cI gF lx".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("cI"),k=a("gF"),c=a("lx"),h=d.extend(k,function(){k.call(this);this.Vc=null;this.cf=!1;this.V9=c.U});h.prototype.start=function(f){this.end();this.Uea(f)};h.prototype.end=function(){this.stop();this.BD()};h.prototype.clear=function(){this.BD()};h.prototype.play=function(){this.Vc&&this.Vc.set("state",c.PLAYING)};h.prototype.pause=function(){this.Vc&&this.Vc.set("state",c.Qb)};h.prototype.kma=function(){this.Vc&&
(this.Vc.get("state")==c.PLAYING?this.pause():this.play())};h.prototype.stop=function(){this.Vc&&this.Vc.set("state",c.U)};h.prototype.Vf=function(f){this.cf=f;this.Vc&&this.Vc.set("mute",this.cf)};h.prototype.setTime=function(f){this.Vc&&this.Vc.set("currentTime",f)};h.prototype.getTime=function(){if(this.Vc)return this.Vc.get("currentTime")};h.prototype.Uea=function(f){this.BD();this.Vc=f;this.Vc.set("mute",this.cf);this.Vc.bind(l.G("state"),this.sK,this,!0);this.Vc.bind(l.G("currentTime"),this.HF,
this,!0);this.Vc.bind(l.Gb,this.gS,this,!0)};h.prototype.BD=function(){this.Vc&&(this.Vc.unbind(l.G("state"),this.sK,this),this.Vc.unbind(l.G("currentTime"),this.HF,this),this.Vc.unbind(l.Gb,this.gS,this),this.Vc=null)};h.prototype.HF=function(){this.trigger(new m(h.MC,{video:this.Vc,time:this.Vc.get("currentTime"),duration:this.Vc.get("duration")}))};h.prototype.gS=function(){this.trigger(new m(h.$M,{video:this.Vc}))};h.prototype.sK=function(){var f=this.Vc.get("state");this.V9!=f&&(this.V9=f,this.trigger(new m(h.Uc,
{state:this.V9})))};h.Uc="playback state change";h.$M="video end";h.MC="video time change";return h});
define("oL","require lV lx cI gF dz or jP".split(" "),function(a){var d=a("lV"),l=a("lx"),m=a("cI"),k=a("gF"),c=a("dz"),h=a("or"),f=a("jP"),b=d.extend(k,function(e,g){k.call(this);this.M=e;this.j=g;this.j.set("visible",!1);this.Oa=new h(this.M,this.j);this.Ma=new f(this.j);this.Fq=new c(this.j);this.Oa.bind(h.KC,this.gr,this,!0);this.Oa.bind(h.LC,this.In,this,!0);this.Oa.bind(h.g7,this.Lwa,this,!0);this.Oa.bind(h.MV,this.Mwa,this,!0);this.Oa.bind(h.Sma,this.BWa,this,!0);this.Ma.bind(f.Uc,this.lf,
this,!0);this.Ma.bind(f.$M,this.IA,this,!0);this.Ma.bind(f.MC,this.oQ,this,!0)});b.prototype.clear=function(){this.Oa.clear();this.Ma.clear();this.Fq.clear();this.Oa.unbind(h.KC,this.gr,this);this.Oa.unbind(h.LC,this.In,this);this.Oa.unbind(h.g7,this.Lwa,this);this.Oa.unbind(h.MV,this.Mwa,this);this.Ma.unbind(f.Uc,this.lf,this);this.Ma.unbind(f.$M,this.IA,this);this.Ma.unbind(f.MC,this.oQ,this);this.M=this.j=this.Fq=this.Ma=this.Oa=null};b.prototype.o5=function(e,g){this.j.set("visible",!0);this.Oa.display(e,
g)};b.prototype.Ey=function(){this.Oa.hide();this.Ma.end();this.Fq.end()};b.prototype.play=function(){this.Ma.play()};b.prototype.stop=function(){this.Ma.stop()};b.prototype.pause=function(){this.Ma.pause()};b.prototype.Vf=function(e){this.Ma.Vf(e)};b.prototype.setTime=function(e){this.Ma.setTime(e)};b.prototype.getTime=function(){return this.Ma.getTime()};b.prototype.kma=function(){this.Ma.kma()};b.prototype.Lwa=function(e){var g=e.data.video;this.Ma.start(g,e.data.startTime);this.Fq.start(g)};b.prototype.Mwa=
function(){};b.prototype.In=function(e){e=e.data.video;e.get("autoplay")&&e.get("state")!=l.PLAYING&&e.get("state")!=l.Qb&&e.set("state",l.PLAYING);this.trigger(new m(b.LC,{video:e}))};b.prototype.gr=function(e){this.trigger(new m(b.KC,{video:e.data.video}))};b.prototype.BWa=function(){this.j.set("visible",!1)};b.prototype.IA=function(e){this.trigger(new m(b.$M,{video:e.data.video}))};b.prototype.oQ=function(e){this.trigger(new m(b.MC,{video:e.data.video,time:e.data.time,duration:e.data.duration}))};
b.prototype.lf=function(e){this.trigger(new m(b.Uc,{state:e.data.state}))};b.LC="videoShow";b.KC="videoHide";b.$M="videoEnd";b.MC="videoTimeChange";b.Uc="playbackStateChange";return b});
define("pl","require lV pB bi e hT".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("bi"),k=a("e"),c=a("hT");a=d.extend(k,function(h,f,b){k.call(this);this.Vd=h;this.M=f;this.ha=b;this.set("toolTipDisabled",!0);this.set("cursor",m.pv);this.bind(l.tc,this.Dc,this,!0);this.QJ=new c.Pna;this.QJ.sla(c.Pna.l7);this.QJ.Ze(this.E_=!1);[this.QJ.hd()].forEach(function(e,g){this.Yb().append(e);e.css({position:"absolute",left:0,top:0,right:0,bottom:0,overflow:"hidden","z-index":g})}.bind(this))});a.prototype.wla=
function(h,f){this.E_!=h&&(this.E_=h,this.QJ.BIa(f),this.QJ.Ze(h))};a.prototype.Dc=function(){this.E0=!0;this.QJ.setSize(this.Wa(),this.Ab())};return a});
define("mT","require lV pB bi d T fU gG pl".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("bi"),k=a("d"),c=a("T"),h=a("fU"),f=a("gG"),b=a("pl");a=d.extend(c,function(e,g,n){c.call(this);this.Vd=e;this.M=g;this.ha=n;this.Re("Renderer");this.set("toolTipDisabled",!0);this.set("cursor",m.pv);this.set("layout",k.sV);this.V=!0;this.qc=this.Va=this.yd=null;this.N1=[];this.hS=[];this.bind(l.tc,this.Dc,this,!0);this.WR()});a.prototype.Hb=function(){c.prototype.Hb.call(this);null==this.yd&&(this.yd=new f(this.Vd,
this.M,!1),this.yd.ra({left:0,top:0,right:0,bottom:0}),this.Za(this.yd),this.yd.b5(this.ha.get("useVideoFrameRate")?2:void 0),this.tRa(),this.NQa(),this.N1.forEach(function(e){this.Nqa(e)}.bind(this)));null==this.qc&&(this.qc=new b(this.Vd,this.M,this.ha),this.qc.ra({left:0,top:0,right:0,bottom:0}),this.Za(this.qc),this.WR())};a.prototype.L3a=function(e){this.N1.push(e);this.yd&&this.Nqa(e)};a.prototype.sb=function(e){this.V!=e&&(this.V=e,this.Va&&(this.Va.J(h.Scene).enabled=e))};a.prototype.tRa=
function(){this.Va=this.yd.Nc("Scene");var e=this.Va.I(h.Scene);e.backgroundColor="transparent";e.outputColorSpace="srgb";e.enabled=this.V;this.yd.ABa(this.Va)};a.prototype.NQa=function(){this.Kb=this.yd.Nc("Camera");var e=this.Kb.I(h.OrthographicCamera);e.width=this.Bf();e.height=this.Af();this.Kb.I(h.lb).F=this.Va;this.Va.J(h.Scene).La=this.Kb};a.prototype.Dc=function(){if(this.Kb){var e=this.Kb.J(h.OrthographicCamera);e.width=this.Bf();e.height=this.Af()}};a.prototype.Nqa=function(e){var g=this.yd.Nc("Video");
g.I(h.lb).F=this.Va;g.I(h.Mesh).properties=e;var n=g.I(h.vz);n.properties=e;n.La=this.Kb;n=g.I(h.xo);n.properties=e;n.Ama=e.get("video");n.N=e;this.hS.push(g);this.yd.b5(this.ha.get("useVideoFrameRate")&&45>this.DUa(e)?2:void 0);this.WR()};a.prototype.aIa=function(e){e=this.N1.indexOf(e);0>e||(this.N1.splice(e,1),this.yd&&this.LRa(this.hS[e]))};a.prototype.LRa=function(e){var g=this.hS.indexOf(e);0>g||(this.hS.splice(g,1),this.yd.Hd(e),this.WR())};a.prototype.wla=function(e){this.E_=e;this.WR()};
a.prototype.WR=function(){this.qc&&this.qc.wla(this.E_&&0<this.hS.length)};a.prototype.DUa=function(e){e=e.get("video");return(e&&e.get("levels")||[]).reduce(function(g,n){return Math.max(g,n.get("framerate"))},0)||30};return a});
define("lP","require lV pB bt fq iZ lx oL mT jv".split(" "),function(a){var d=a("lV"),l=a("pB"),m=a("bt"),k=a("fq"),c=a("iZ"),h=a("lx"),f=a("oL"),b=a("mT"),e=a("jv");a=k.define("VideoPlayer",c,function(){c.call(this,"video");this.HE=this.HE.bind(this);this.Hq=this.P0=this.HF=this.ri=!1;this.O=this.j=null;this.Sb=this.Se=0;this.xn=!1;this.Kd=d.Ip(this.jh,this)});a.prototype.seek=function(g){this.gF(g)};a.prototype.play=function(){this.ME()};a.prototype.pause=function(){this.LE()};a.prototype.stop=
function(){this.GA()};a.prototype.restart=function(){this.FA()};a.prototype.set=function(g,n){if(this.get(g)!=n){switch(g){case "startTime":this.P0=!0;this.Kd();break;case "video":this.HF=!0;this.Kd();break;case "viewerArea":this.ri=!0;this.Kd();break;case "displayPlaybackBar":this.Hq=!0,this.Kd()}c.prototype.set.call(this,g,n)}};a.prototype.get=function(g,n){switch(g){case "currentTime":return this.O&&this.O.getTime()||0}return c.prototype.get.call(this,g,n)};a.prototype.Mp=function(g){this.xn!==
g&&((this.xn=g)?document.addEventListener("keydown",this.HE,!0):document.removeEventListener("keydown",this.HE,!0))};a.prototype.HE=function(g){e.ao()||(g.code==m.na.NH||g.code==m.na.FV)&&this.O&&this.O.kma()};a.prototype.jh=function(){this.ri&&(this.ri=!1,this.dw(),this.get("viewerArea")&&this.bw(),this.kR(this.get("viewerArea")),this.HF=!0);var g=!1;if(this.j&&(this.HF||this.P0)){var n=this.get("video"),q=this.get("startTime")||0;if(n&&!this.j.Db()){this.Kd();return}this.P0=this.HF=!1;this.Sb=this.Se=
0;g=!0;n?(this.get("viewerArea").Qd().Qbb(),this.KG(),this.O.o5(n,q)):this.O.Ey()}this.Hq&&(this.Hq=!1,g=!0);g&&this.Nx()};a.prototype.uK=function(){this.set("video",null)};a.prototype.bw=function(){var g=this.get("application"),n=this.get("viewerArea");this.j=new b(g,n,this);this.j.ra({left:0,top:0,bottom:0,right:0});n.Za(this.j);n.bind(l.ma,this.Qwa,this,!0);this.O=new f(n,this.j);this.O.bind(f.LC,this.In,this);this.O.bind(f.KC,this.gr,this);this.O.bind(f.MC,this.oQ,this,!0);this.O.bind(f.Uc,this.lf,
this);g.bind(l.G("mute"),this.YP,this);this.O.Vf(g.get("mute",!1));this.aB(!0)};a.prototype.dw=function(){if(this.j){this.O.unbind(f.LC,this.In,this);this.O.unbind(f.KC,this.gr,this);this.O.unbind(f.MC,this.oQ,this);this.O.unbind(f.Uc,this.lf,this);this.O.clear();this.get("application").unbind(l.G("mute"),this.YP,this);var g=this.j.getParent();g.removeChild(this.j);g.unbind(l.ma,this.Qwa,this,!0);this.j=null;this.aB(!1)}};a.prototype.YP=function(){this.j&&this.O.Vf(this.get("application").get("mute",
!1))};a.prototype.lf=function(g){g=g.data.state;this.j&&this.j.wla(this.get("displayPlayOverlay")&&g!=h.PLAYING,.5>this.Se);this.wd(g)};a.prototype.In=function(g){var n=this.get("viewerArea");(this.fe=n&&n.fe)&&this.fe.bind(l.ma,this.Rwa,this,!0);this.Mda=!1;this.sP(g.data.video)};a.prototype.gr=function(g){this.fe&&this.fe.unbind(l.ma,this.Rwa,this,!0);this.fe=null;this.rP(g.data.video)};a.prototype.oQ=function(g){this.Se=g.data.time;this.Sb=g.data.duration;this.Nx()};a.prototype.Qwa=function(){if(this.Mda)this.Mda=
!1;else switch(this.get("clickAction")){case "play_pause":this.get("state")!=h.PLAYING?this.O.play():this.O.pause()}};a.prototype.Rwa=function(){this.Mda=!0};a.prototype.yQ=function(g){this.gF(g.data.position)};a.prototype.Sk=function(){this.O.play()};a.prototype.lp=function(){this.O.stop()};a.prototype.ir=function(){this.O.pause()};a.prototype.gF=function(g){this.O&&this.O.setTime(g)};a.prototype.Nx=function(){if(this.j){var g=this.j.getParent();0<this.Sb&&this.get("displayPlaybackBar")?g.ra({playbackBarPosition:this.Se,
playbackBarDuration:this.Sb,playbackBarVisible:!0}):g.set("playbackBarVisible",!1)}};return a});
define("ly",["require","fq","dn","iM"],function(a){var d=a("fq"),l=a("dn"),m=a("iM");a=d.define("VideoPlayListItem",m,function(){m.call(this)});a.prototype.start=function(){m.prototype.start.call(this);var k=this.get("player");k&&(k.bind(l.th,this.In,this),k.set("video",this.get("media")),k.set("startTime",this.get("startTime")))};a.prototype.stop=function(){var k=this.get("player");k&&(k.unbind(l.th,this.In,this),k.get("video")==this.get("media")&&k.set("video",null));m.prototype.stop.call(this)};
a.prototype.In=function(k){k.data.media==this.get("media")&&(this.get("player").unbind(l.th,this.In,this),this.get("player").bind(l.Vm,this.gr,this),this.nB())};a.prototype.gr=function(k){k.data.media==this.get("media")&&(this.get("player").unbind(l.Vm,this.gr,this),this.stop(),this.end())};return a});define("hX",["require","mz","fq"],function(a){var d=a("mz");return a("fq").define("VideoResourceLevel",d,function(){d.call(this)})});
define("eH",["require","mz","fq","mq","hX"],function(a){var d=a("mz"),l=a("fq"),m=a("mq"),k=a("hX");a=l.define("VideoResource",d,function(){d.call(this);this.Jca=new k;this.Jca.set("type","video/mp4");this.Lca=new k;this.Lca.set("type","video/ogg");this.oha=new k;this.oha.set("type","video/webm")});a.prototype.get=function(c,h){switch(c){case "levels":h=[];var f=this.get("mp4Url");f&&(this.Jca.set("url",f),h.push(this.Jca));if(f=this.get("oggUrl"))this.Lca.set("url",f),h.push(this.Lca);if(f=this.get("webmUrl"))this.oha.set("url",
f),h.push(this.oha);h.forEach(function(b){b.set("width",this.get("width"));b.set("height",this.get("height"))}.bind(this))}return d.prototype.get.call(this,c,h)};a.prototype.Yi=function(){var c=this.get("webmUrl"),h=this.get("oggUrl"),f=this.get("mp4Url");return f&&m.u3?f:c&&m.ija?c:h&&m.hja?h:f||c||h};return a});define("dG",["require","fq","fu"],function(a){var d=a("fq"),l=a("fu");return d.define("VignetteModel3DPostprocessing",l,function(){l.call(this)})});
define("dV","require jquery.mod lV pB w mV e gX".split(" "),function(a){var d=a("jquery.mod"),l=a("lV"),m=a("pB"),k=a("w"),c=a("mV"),h=a("e"),f=a("gX");a=l.extend(h,function(){h.call(this);this.Re("WebFrame");this.kP=this.PD=this.wc=this.ke=null;this.ada=this.ada.bind(this);this.GZ=this.GZ.bind(this);this.bind(m.kd,this.NXa,this,!0);this.bind(m.cd,this.MXa,this,!0)});a.prototype.yb=function(){h.prototype.yb.call(this);this.h("url");this.h("allowTopNavigation",!0);this.h("backgroundColor","#ffffff");
this.h("insetBorder",!1);this.h("scrollEnabled",!0);this.h("unloadWhenHidden",!0)};a.prototype.NXa=function(){this.lF("url")};a.prototype.MXa=function(){this.lF("url")};a.prototype.Hb=function(){h.prototype.Hb.call(this);this.ke||(this.ke=d("<div></div>"),this.ke.css({position:"absolute",left:0,top:0,width:"100%",height:"100%"}),this.Yb().append(this.ke));this.wc||(this.wc=d("<iframe></iframe>"),this.wc.css({position:"absolute",left:0,top:0}),this.wc.attr("allowfullscreen","true"),this.wc.attr("allow",
"accelerometer; autoplay; camera; display-capture; fullscreen; geolocation; gyroscope; magnetometer; microphone; vr; xr-spatial-tracking"),this.ke.append(this.wc));this.PD||(this.PD=d("<div></div>"),this.PD.css({"text-shadow":"0 0 5px rgba(255,255,255,0.5)",display:"none",color:"#000000","font-weight":"300","font-family":"Tahoma, Geneva, sans-serif","font-size":k.pb()?"5vmin":"20px",position:"absolute",top:"50%",left:"50%","text-align":"center",transform:"translate(-50%, -50%)",width:"90%"}),this.ke.append(this.PD))};
a.prototype.bb=function(){if(this.L("url")){var b=this.B("url");b&&this.nA?this.Bya(b):(!b||this.get("unloadWhenHidden"))&&this.Bya("");this.S("url")}this.L("insetBorder")&&(this.B("insetBorder")?this.wc.attr("frameborder","1"):this.wc.attr("frameborder","0"),this.S("insetBorder"));this.L("allowTopNavigation")&&(this.B("allowTopNavigation")?this.wc.removeAttr("sandbox"):this.wc.attr("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.S("allowTopNavigation"));this.L("scrollEnabled")&&(this.B("scrollEnabled")?(this.wc.attr("scrolling","auto"),this.ke.css({overflow:"auto","-webkit-overflow-scrolling":"touch"})):(this.wc.attr("scrolling","no"),this.ke.css({overflow:"hidden","-webkit-overflow-scrolling":"auto"})),this.S("scrollEnabled"));h.prototype.bb.call(this)};a.prototype.rh=function(){this.wc&&f.css(this.wc.get(0),{width:this.sa+"px",height:this.wa+"px"});h.prototype.rh.call(this)};a.prototype.refresh=function(){this.B("url")&&
this.nA&&(this.eba(),this.Nz(),this.iga(),this.wc.attr("src",""),setTimeout(function(){this.lza();this.Kpa();this.wc.attr("src",this.B("url"))}.bind(this),30))};a.prototype.Bya=function(b){this.wc.attr("src")!=b&&(this.eba(),b?(this.lza(),this.Kpa()):(this.Nz(),this.iga()),this.wc.attr("src",b))};a.prototype.ada=function(){this.kP=null;this.FVa()&&this.X_a()};a.prototype.GZ=function(){this.eba();this.Nz();this.iga()};a.prototype.Kpa=function(){this.wc.on("load",this.GZ)};a.prototype.iga=function(){this.wc.off("load",
this.GZ)};a.prototype.Nz=function(){this.kP&&(clearTimeout(this.kP),this.kP=null)};a.prototype.lza=function(){this.Nz();this.kP=setTimeout(this.ada.bind(this),3E3)};a.prototype.FVa=function(){if("https:"==window.location.protocol){var b=this.wc.attr("src");if("https:"!=c.parse(b).protocol)return!0}return!1};a.prototype.X_a=function(){this.PD.text("A secure web page served over HTTPS can not display insecure content served over HTTP.");this.PD.show()};a.prototype.eba=function(){this.PD.hide()};return a});
define("cx",["require","dV","fq"],function(a){var d=a("dV");a=a("fq").define("WebFrame",d,function(){d.call(this)});a.prototype.refresh=function(){d.prototype.refresh.call(this)};return a});define("mr",["require","er","lV","T","d"],function(a){var d=a("er"),l=a("lV"),m=a("T");a=a("d");var k=l.extend(m,function(){m.call(this)});k.Ic={layout:a.Ig};d.defaults(k.Ic,m.Ic);k.prototype.yb=function(){this.Io(k.Ic)};return k});
define("nh","require er lV pB cI nF d T mr hP gu oU".split(" "),function(a){var d=a("er"),l=a("lV"),m=a("pB"),k=a("cI"),c=a("nF"),h=a("d"),f=a("T"),b=a("mr"),e=a("hP"),g=a("gu"),n=a("oU"),q=l.extend(e,function(){e.call(this);this.Re("Window");this.Ez=this.sI=this.GR=this.Ul=null;this.X8=new f;this.RI=null;this.Yaa=this.Xaa=0;this.lfa=this.aza=!1;this.pha=this.qha=void 0;this.zx=!1;for(var p in q.Ydb)this.lF(p);this.bind(m.tc,this.i3a,this);this.bind(m.aN,this.g3a,this);this.bind(m.hN,this.j3a,this);
this.bind(m.ma,this.f3a,this);this.H1=0;this.Tf=new f;this.Tf.ra({visible:!1,includeInLayout:!1,layout:"absolute",height:"100%",width:"100%",backgroundOpacity:0,contentOpaque:!1});this.Tf.bind(m.tc,this.eBa,this);this.Tf.bind(m.hN,this.$2a,this);this.Tf.bind(m.aN,this.Z2a,this);this.Tf.bind(m.ma,this.Y2a,this);this.Tf.Za(this)});q.prototype.set=function(p,r){switch(p){case "maxWidth":this.qha=r;this.v1();break;case "maxHeight":this.pha=r;this.v1();break;case "children":this.X8.set(p,r);break;case "shadow":this.aza=
r;this.$Aa();break;default:e.prototype.set.call(this,p,r)}};q.prototype.show=function(p,r){this.zx=!0;this.v1(p);this.set("visible",!1);this.Tf.set("visible",!1);this.aPa();r&&this.m4a();r=p.get("children");p.set("children",r.concat([this.Tf]));l.defer(function(){this.Tf.set("visible",!0)}.bind(this))};q.prototype.aPa=function(){var p=this.B("modal"),r=this.B("veilShowEffect"),t=this.B("veilHideEffect");p&&r?this.Tf.set("showEffect",r):this.Tf.set("showEffect",null);p&&t?this.Tf.set("hideEffect",
t):this.Tf.set("hideEffect",null)};q.prototype.hide=function(){this.get("visible")&&this.trigger(m.yLa);this.H1=0;this.z0(!1);this.set("visible",!1);this.zx=!1};q.prototype.m4a=function(){this.set("centerX",0);this.set("centerY",0)};q.prototype.get=function(p,r){return"children"==p?this.X8.get(p,r):"showing"==p?this.zx:e.prototype.get.call(this,p,r)};q.Joa={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"};q.Ioa=Object.keys(q.Joa);q.Z7={borderRadius:"borderTopRadius",borderTopRadius:"borderTopRadius",borderLeftRadius:"borderTopLeftRadius",borderRightRadius:"borderTopRightRadius",borderTopLeftRadius:"borderTopLeftRadius",borderTopRightRadius:"borderTopRightRadius"};q.Y7="borderLeftRadius borderRightRadius borderTopLeftRadius borderTopRightRadius borderTopRadius borderRadius".split(" ");q.apa={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"};
q.$oa=Object.keys(q.apa);q.Doa={closeButtonBackgroundColor:"backgroundColor",closeButtonBackgroundColorDirection:"backgroundColorDirection",closeButtonBackgroundColorRatios:"backgroundColorRatios",closeButtonBackgroundOpacity:"backgroundOpacity",closeButtonBorderColor:"borderColor",closeButtonBorderRadius:"borderRadius",closeButtonBorderSize:"borderSize",closeButtonHeight:"height",closeButtonIconColor:"iconColor",closeButtonIconHeight:"iconHeight",closeButtonIconLineWidth:"iconLineWidth",closeButtonIconWidth:"iconWidth",
closeButtonOpacity:"opacity",closeButtonWidth:"width",closeButtonPaddingBottom:"paddingBottom",closeButtonPaddingLeft:"paddingLeft",closeButtonPaddingRight:"paddingRight",closeButtonPaddingTop:"paddingTop",closeButtonRollOverBackgroundColor:"rollOverBackgroundColor",closeButtonRollOverBackgroundColorDirection:"rollOverBackgroundColorDirection",closeButtonRollOverBackgroundColorRatios:"rollOverBackgroundColorRatios",closeButtonRollOverBackgroundOpacity:"rollOverBackgroundOpacity",closeButtonRollOverBorderColor:"rollOverBorderColor",
closeButtonRollOverBorderSize:"rollOverBorderSize",closeButtonRollOverIconColor:"rollOverIconColor",closeButtonRollOverIconLineWidth:"rollOverIconLineWidth",closeButtonRollOverOpacity:"rollOverOpacity",closeButtonPressedBackgroundColor:"pressedBackgroundColor",closeButtonPressedBackgroundColorDirection:"pressedBackgroundColorDirection",closeButtonPressedBackgroundColorRatios:"pressedBackgroundColorRatios",closeButtonPressedBackgroundOpacity:"pressedBackgroundOpacity",closeButtonPressedBorderColor:"pressedBorderColor",
closeButtonPressedBorderSize:"pressedBorderSize",closeButtonPressedIconColor:"pressedIconColor",closeButtonPressedIconLineWidth:"pressedIconLineWidth",closeButtonPressedOpacity:"pressedOpacity"};q.Coa=Object.keys(q.Doa);q.Foa={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"};q.Eoa=Object.keys(q.Foa);q.Hoa={borderRadius:"borderBottomRadius",borderBottomRadius:"borderBottomRadius",borderLeftRadius:"borderBottomLeftRadius",borderRightRadius:"borderBottomRightRadius",borderBottomLeftRadius:"borderBottomLeftRadius",
borderBottomRightRadius:"borderBottomRightRadius"};q.Goa="borderLeftRadius borderRightRadius borderBottomLeftRadius borderBottomRightRadius borderBottomRadius borderRadius".split(" ");q.zoa={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"};q.yoa=Object.keys(q.zoa);q.Aoa={layout:"layout",horizontalAlign:"horizontalAlign",verticalAlign:"verticalAlign"};q.BNa=Object.keys(q.Aoa);q.cpa={veilOpacity:"backgroundOpacity",veilColor:"backgroundColor",veilColorRatios:"backgroundColorRatios",veilColorDirection:"backgroundColorDirection"};q.bpa=Object.keys(q.cpa);q.Ic=function(){var p={modal:!1,visible:!1,centerX:0,centerY:0,veilShowEffect:void 0,veilHideEffect:void 0};
d.defaults(p,f.Ic);for(var r=[].concat(q.Ioa,q.$oa,q.Coa,q.yoa,q.Eoa,q.bpa),t=0;t<r.length;t++)p[r[t]]=void 0;return p}();q.prototype.yb=function(){this.Io(q.Ic)};q.prototype.Hb=function(){e.prototype.Hb.call(this);null==this.Ul&&(this.Ul=new b,this.Ul.set("width","100%"),this.Ul.bind(m.hb,this.QUa,this),this.Za(this.Ul));null==this.GR&&(this.GR=new n,this.GR.set("width","100%"),this.Ul.Za(this.GR));null==this.sI&&(this.sI=new g,this.sI.ra({horizontalAlign:c.$e,verticalAlign:c.se}),this.sI.bind(m.ma,
this.sQa,this),this.Ul.Za(this.sI));null==this.Ez&&(this.Ez=this.X8,this.Ez.ra({width:"100%",height:"100%"}),this.Za(this.Ez));null==this.RI&&(this.RI=new f,this.RI.set("width","100%"),this.Za(this.RI))};q.prototype.Y2a=function(){this.H1++;setTimeout(function(){0<this.H1&&this.hide()}.bind(this),100)};q.prototype.f3a=function(){this.H1--};q.prototype.sQa=function(){this.hide()};q.prototype.QUa=function(p){this.Xaa=p.pageX;this.Yaa=p.pageY;this.Db().bind(m.Pb,this.pBa,this,!0);this.Db().bind(m.Eb,
this.qBa,this,!0)};q.prototype.pBa=function(p){this.set("centerX",this.get("centerX")+(p.pageX-this.Xaa));this.set("centerY",this.get("centerY")+(p.pageY-this.Yaa));this.Xaa=p.pageX;this.Yaa=p.pageY;this.ZAa()};q.prototype.qBa=function(){this.Db().unbind(m.Pb,this.pBa,this);this.Db().unbind(m.Eb,this.qBa,this)};q.prototype.eBa=function(){this.v1()};q.prototype.$2a=function(){this.set("visible",!0)};q.prototype.Z2a=function(){this.Tf.unbind(m.tc,this.eBa,this);var p=this.Tf.getParent();p&&p.removeChild(this.Tf);
this.trigger(new k(m.vH))};q.prototype.i3a=function(){this.ZAa()};q.prototype.j3a=function(){this.z0(!0)};q.prototype.g3a=function(){this.Tf.set("visible",!1)};q.prototype.z0=function(p){this.lfa=p;this.$Aa()};q.prototype.$Aa=function(){e.prototype.set.call(this,"shadow",this.lfa&&this.aza)};q.prototype.v1=function(p){p||(p=this.ta);void 0!==this.qha?e.prototype.set.call(this,"maxWidth",this.qha):p?e.prototype.set.call(this,"maxWidth",p.Wa()):e.prototype.set.call(this,"maxWidth",void 0);void 0!==
this.pha?e.prototype.set.call(this,"maxHeight",this.pha):p?e.prototype.set.call(this,"maxHeight",p.Ab()):e.prototype.set.call(this,"maxHeight",void 0)};q.prototype.ZAa=function(){var p=this.Tf.Wa(),r=this.Wa(),t=this.get("centerX");r=.5*p+t-.5*r;var u=this.Ul.Fm(),v=this.Ul.Wa(),w=Math.min(v,30);p=p-u-w;u=-(u+v-w);r<u?this.set("centerX",t+(u-r)):r>p&&this.set("centerX",t-(r-p));p=this.Tf.Ab();r=this.Ab();t=this.get("centerY");r=.5*p+t-.5*r;u=this.Ul.vu();v=this.Ul.Ab();w=Math.min(v,5);p=p-u-w;u=-(u+
v-w);r<u?this.set("centerY",t+(u-r)):r>p&&this.set("centerY",t-(r-p))};q.prototype.bb=function(){this.xc(q.Ioa,q.Joa,[this.Ul],!0,!0);this.xc(q.Y7,q.Z7,[this.Ul],!0,!1);0===this.get("headerHeight")?this.xc(q.Y7,q.Z7,[this.Ez],!0,!1):this.xc(q.Y7,q.Z7,[this.Ul],!0,!1);this.xc(q.$oa,q.apa,[this.GR],!0,!0);this.xc(q.Coa,q.Doa,[this.sI],!0,!0);this.xc(q.yoa,q.zoa,[this.Ez],!0,!0);this.xc(q.BNa,q.Aoa,[this.Ez],!0,!1);this.xc(q.Eoa,q.Foa,[this.RI],!0,!0);0===this.get("footerHeight")?this.xc(q.Goa,q.Hoa,
[this.Ez],!0,!1):this.xc(q.Goa,q.Hoa,[this.RI],!0,!1);this.B("modal")?(this.xc(q.bpa,q.cpa,[this.Tf],!0,!0),this.Tf.set("contentOpaque",!0)):(this.Tf.set("backgroundOpacity",0),this.Tf.set("contentOpaque",!1));this.ra({layout:h.Yh,horizontalAlign:c.$e,verticalAlign:c.se});e.prototype.bb.call(this);this.Zl.n5(0)};return q});
define("es",["require","nh","fq"],function(a){var d=a("nh");a=a("fq").define("Window",d,function(){d.call(this)});a.prototype.show=a.prototype.show;a.prototype.hide=a.prototype.hide;return a});
define("nI","require jquery.mod er lh pB iy cI gF bo pd bM mD mN w lV".split(" "),function(a){function d(v){this.source=v;this.width=this.source.get("width");this.height=this.source.get("height");this.url=this.source.get("url");this.CL=this.source.get("grayscale");this.my=new q(h.Cl)}var l=a("jquery.mod"),m=a("er"),k=a("lh"),c=a("pB"),h=a("iy"),f=a("cI"),b=a("gF"),e=a("bo"),g=a("pd"),n=a("bM"),q=a("mD"),p=a("mN"),r=a("w"),t=a("lV"),u=t.extend(b,function(){b.call(this);this.FZ=this.FZ.bind(this);this.$g=
null;this.ce=[];this.Dn=[];this.dc=this.Rb=this.Sd=this.Jd=100;this.xf=1;this.Mz=this.Lz=.5;this.Tc=1;this.Uj=this.rj=null;this.w_=!1;this.M9={};this.xI={};this.xI.low={};this.xI.hight={};r.ZK()==r.QM&&(this.xI.low.transform="translateZ(0)",this.xI.hight.transform="");this.V=!1;this.ci="inherit";this.xa=l("<div/>").css({position:"absolute",left:0,top:0,right:0,bottom:0,overflow:"hidden"});this.LO=null;this.kf=t.Ip(this.oa,this)});u.prototype.hd=function(){return this.xa};u.prototype.hC=function(v){this.Rf!=
v&&(this.Rf=v,this.L8(1),this.kf())};u.prototype.Z4=function(v){this.ci!=v&&(this.ci=v,this.Uj&&this.Uj.css("cursor",this.ci),this.rj&&this.rj.css("cursor",this.ci))};u.prototype.cab=function(v){this.ce!=v&&(this.ce&&k.ca(this.ce,["levels.url"],this.FZ),(this.ce=v)&&k.da(this.ce,["levels.url"],this.FZ,!0))};u.prototype.FZ=function(){this.m9();this.$g=null;this.rj&&(this.rj.detach(),this.rj=null);this.Uj&&(this.Uj.detach(),this.Uj=null);this.tg&&(this.tg=null);this.m9();this.w_=!1;m(this.Dn).each(function(w){w.my.cancel();
w.my.unbind(c.ea,this.Sta,this)},this);var v=(this.ce&&this.ce.get("levels")||[]).filter(function(w){return w.get("url")});this.Dn=m(v).map(function(w){w=new d(w);w.my.bind(c.ea,this.Sta,this);return w},this);(v=this.OTa())?(this.Rb=v.width,this.dc=v.height):this.dc=this.Rb=100;this.Mz=this.Lz=.5;this.L8(1);this.kf()};u.prototype.QG=function(v,w){if(this.Jd!=v||this.Sd!=w)this.Jd=v,this.Sd=w,this.kf()};u.prototype.J$a=function(v,w){if(this.Zqa!=v||this.Yqa!=w)this.Zqa=v,this.Yqa=w,this.kf()};u.prototype.sb=
function(v){this.V!=v&&(this.V=v,this.kf())};u.prototype.move=function(v,w){var x=this.xf*this.Tc;this.Lz+=v/(this.Rb*x);this.Mz+=w/(this.dc*x);this.$_()};u.prototype.iy=function(){return this.Tc};u.prototype.setScale=function(v){this.L8(Math.max(1,Math.min(1/this.xf,v)));this.$g&&this.$g.width<this.Tc*this.xf*this.Rb&&this.$g.width<this.Rb?this.oa():this.$_()};u.prototype.iFa=function(v){if(!this.rj)return!1;var w=this.rj.offset(),x=v.pageX-w.left;v=v.pageY-w.top;return 0<=x&&0<=v&&x<this.rj.width()&&
v<this.rj.height()};u.prototype.oa=function(){if(this.V){this.I2a();var v=this.XTa();v&&v.my.Mh()?(v!=this.$g&&(this.$g||(this.kf(),this.w_=!0),this.JRa(v),this.$g=v),this.Gya(null)):this.Gya(v);this.$_()}};u.prototype.I2a=function(){switch(this.Rf){case p.bq:var v=this.Jd/this.Rb;break;case p.xk:v=this.Sd/this.dc;break;case p.Is:v=this.Rb*this.Sd>this.dc*this.Jd?this.Sd/this.dc:this.Jd/this.Rb;break;case p.DLa:v=Math.min(this.Zqa/this.Rb,this.Yqa/this.dc);break;default:v=this.Rb*this.Sd>this.dc*
this.Jd?this.Jd/this.Rb:this.Sd/this.dc}this.WOa(v)};u.prototype.Sta=function(){this.kf()};u.prototype.JRa=function(v){this.Uj&&(this.Xea(this.Uj,1),this.rj&&this.rj.detach(),this.rj=this.Uj);this.Uj=this.cRa(v);this.Xea(this.Uj,0);this.xa.append(this.Uj);this.tg=this.VQa();this.M9={}};u.prototype.XTa=function(){return this.$g?this.ZSa(this.Tc*this.xf*this.Rb):this.sUa()};u.prototype.Gya=function(v){m(this.Dn).each(function(w){w==v?w.my.Yi()!=w.url&&w.my.load(w.url):w.my.Mh()||w.my.cancel()})};u.prototype.OTa=
function(){return m(this.Dn).reduce(function(v,w){v||(v=w);if(w.width>v.width||w.width==v.width&&!w.CL&&v.CL)v=w;return v},null)};u.prototype.sUa=function(){return m(this.Dn).reduce(function(v,w){v||(v=w);if(w.width<v.width||w.width==v.width&&w.CL&&!v.CL)v=w;return v},null)};u.prototype.ZSa=function(v){return m(this.Dn).reduce(function(w,x){w||(w=x);if(x.width>=v&&w.width<v||x.width>=v&&x.width<w.width||x.width<v&&x.width>w.width||!x.CL&&w.CL)w=x;return w},null)};u.prototype.cRa=function(v){v=l(v.my.Cf(!0));
v.css({position:"absolute",cursor:this.ci,"pointer-events":"none"});return v};u.prototype.VQa=function(){return new g("linear",[new n("alpha",0,1)],200)};u.prototype.$_=function(){e.requestFrame(function(v){this.V_(v,"low")},this)};u.prototype.Pia=function(){return this.Rb*this.Tc*this.xf};u.prototype.Oia=function(){return this.dc*this.Tc*this.xf};u.prototype.NDa=function(){var v=this.Pia();return v>this.Jd?Math.max(this.Jd-v,Math.min(0,.5*this.Jd-v*this.Lz)):.5*(this.Jd-v)};u.prototype.ODa=function(){var v=
this.Oia();return v>this.Sd?Math.max(this.Sd-v,Math.min(0,.5*this.Sd-v*this.Mz)):.5*(this.Sd-v)};u.prototype.V_=function(v,w){w=w||"low";var x=this.Pia(),y=this.NDa(),z=this.Oia(),B=this.ODa();this.Lz=(.5*this.Jd-y)/x;this.Mz=(.5*this.Sd-B)/z;x={left:Math.round(y)+"px",top:Math.round(B)+"px",width:Math.round(x)+"px",height:Math.round(z)+"px",display:"block"};for(var D in this.xI[w])x[D]=this.xI[w][D];this.M9!=x&&(this.rj&&this.rj.css(x),this.Uj&&this.Uj.css(x),this.M9=x);this.m9();this.tg?(this.tg.Fb(v),
this.Xea(this.Uj,this.tg.eb("alpha")),this.tg.Xe()&&(this.tg=null,this.rj&&this.rj.detach(),this.rj=this.Uj,this.Uj=null),this.$_()):"low"==w&&this.h0a();!this.tg&&this.w_&&(this.w_=!1,this.trigger(new f(c.ea)))};u.prototype.Xea=function(v,w){v.css({opacity:w,filter:"alpha(opacity="+Math.round(100*w)+")","-ms-filter":"alpha(opacity="+Math.round(100*w)+")"})};u.prototype.m9=function(){null!=this.LO&&(clearTimeout(this.LO),this.LO=null)};u.prototype.h0a=function(){var v=this;this.LO=setTimeout(function(){v.LO=
null;v.V_(50,"hight")},50)};u.prototype.L8=function(v){this.Tc!=v&&(this.Tc=v,this.t1a())};u.prototype.WOa=function(v){this.xf!=v&&(this.xf=v)};u.prototype.t1a=function(){this.trigger(new f(u.LV,{scale:this.Tc}))};u.LV="scaleChange";return u});
define("kS","require jquery.mod pB cI nI lV e S".split(" "),function(a){a("jquery.mod");var d=a("pB"),l=a("cI"),m=a("nI"),k=a("lV"),c=a("e"),h=a("S"),f=k.extend(c,function(){c.call(this);this.Re("ZoomImage");this.ix=this.On=void 0;this.Vk=!1;this.nxa=void 0;this.qta=this.Tc;this.eS=null;this.j=new m;this.j.bind(d.ea,this.tXa,this);this.j.bind(m.LV,this.uXa,this);this.Yb().append(this.j.hd());this.bind(d.tc,this.Dc,this,!0);this.bind(d.kd,this.tj,this,!0);this.bind(d.cd,this.sj,this,!0);this.bind(d.hb,
this.de,this,!0);this.bind(d.Pb,this.ak,this,!0);this.bind(d.Eb,this.bk,this,!0);this.bind(d.Os,this.AE,this,!0);this.bind(d.DH,this.XD,this,!0)});f.prototype.set=function(b,e){switch(b){case "scale":this.j.setScale(e);e=this.j.iy();break;case "imageLeft":case "imageTop":case "imageWidth":case "imageHeight":return}c.prototype.set.call(this,b,e)};f.prototype.get=function(b,e){switch(b){case "scale":return this.j.iy();case "imageLeft":return this.j.NDa();case "imageTop":return this.j.ODa();case "imageWidth":return this.j.Pia();
case "imageHeight":return this.j.Oia()}return c.prototype.get.call(this,b,e)};f.prototype.yb=function(){c.prototype.yb.call(this);this.h("image");this.h("scaleMode");this.h("customHeight");this.h("customWidth");this.h("imageCursor");this.h("imageLeft");this.h("imageTop");this.h("imageWidth");this.h("imageHeight")};f.prototype.bb=function(){this.L("scaleMode")&&(this.j.hC(this.B("scaleMode")),this.S("scaleMode"));this.L("image")&&(this.j.cab(this.B("image")),this.S("image"),this.qta=this.Tc);if(this.L("customHeight")||
this.L("customWidth"))this.S("customHeight"),this.S("customWidth"),this.Dc();this.L("imageCursor")&&(this.S("imageCursor"),this.j.Z4(this.mb.b$.BDa(this.get("imageCursor"))));c.prototype.bb.call(this)};f.prototype.Dc=function(){var b=this.Wa(),e=this.Ab(),g=this.get("customWidth","100%"),n=h.fo(g);g=void 0!==n?b*n/100:g;n=this.get("customHeight","100%");var q=h.fo(n);this.j.J$a(g,void 0!==q?e*q/100:n);this.j.QG(b,e)};f.prototype.tj=function(){this.j.sb(!0)};f.prototype.sj=function(){this.j.sb(!1)};
f.prototype.de=function(b){this.On=b.x;this.ix=b.y;this.Vk=!0;this.nxa=this.j.iFa(b)};f.prototype.ak=function(b){this.Vk&&(this.Yga(),this.j.move(-(b.x-this.On),-(b.y-this.ix)),this.On=b.x,this.ix=b.y)};f.prototype.bk=function(b){this.Vk=!1;this.nxa||this.j.iFa(b)||this.trigger(new l(f.NLa))};f.prototype.AE=function(b){this.Yga();this.j.setScale((1+b.delta/20)*this.j.iy())};f.prototype.XD=function(b){this.Yga();this.j.setScale(b.scale/this.qta)};f.prototype.tXa=function(){this.trigger(new l(d.ea))};
f.prototype.uXa=function(){c.prototype.set.call(this,"scale",this.j.iy());this.trigger(new l(f.LV))};f.prototype.Yga=function(){this.eS?(clearTimeout(this.eS),this.eS=null):this.trigger(new l(f.fj));this.eS=setTimeout(function(){this.eS=null;this.trigger(new l(f.ej))}.bind(this),300)};f.NLa="backgroundClick";f.LV="scaleChange";f.fj="userInteractionStart";f.ej="userInteractionEnd";return f});define("oD",["require","kS","fq"],function(a){var d=a("kS");return a("fq").define("ZoomImage",d,function(){d.call(this)})});
define("jI","require fq jS iA ow eC en fc pa kk jU gB gk lG ir l jR kG mx pj hH iJ lD hk gb dA bH kt os kn lo nm fT r jO eh em pq nB df ks nW bc iO mE hD O cW v mk gD Z kN bD bs nV oS jF ft mI mh jK bS cR pb jZ nR lH R qj gv dv ey jx cd bk gs fz hm ba jf bO pV qi fu kv mX jb q dT lf mY je ep fn qf hL lw fl nc bV md ja bq pT gE pg cK cM lZ pA kK gY kL hs mj of in kW ll pW eL jj oc fb iM U pC dZ gR bN js fN bd pK fg cX no mo fy hd fd ct iS oE mL fP qc ph mg oK hn fA gT dy nC cy it nA kH hS cf iW dK bW kD kf pp gi hx co is lP ly eH hX dG bF cx es oD".split(" "),
function(a){a("fq");a("jS");a("iA");a("ow");a("eC");a("en");a("fc");a("pa");a("kk");a("jU");a("gB");a("gk");a("lG");a("ir");a("l");a("jR");a("kG");a("mx");a("pj");a("hH");a("iJ");a("lD");a("hk");a("gb");a("dA");a("bH");a("kt");a("os");a("kn");a("lo");a("nm");a("fT");a("r");a("jO");a("eh");a("em");a("pq");a("nB");a("df");a("ks");a("nW");a("bc");a("iO");a("mE");a("hD");a("O");a("cW");a("v");a("mk");a("gD");a("Z");a("kN");a("bD");a("bs");a("nV");a("oS");a("jF");a("ft");a("mI");a("mh");a("jK");a("bS");
a("cR");a("pb");a("jZ");a("nR");a("lH");a("R");a("qj");a("gv");a("dv");a("ey");a("jx");a("cd");a("bk");a("gs");a("fz");a("hm");a("ba");a("jf");a("bO");a("pV");a("qi");a("fu");a("kv");a("mX");a("jb");a("q");a("dT");a("lf");a("mY");a("je");a("ep");a("fn");a("qf");a("hL");a("lw");a("fl");a("nc");a("bV");a("md");a("ja");a("bq");a("pT");a("gE");a("pg");a("cK");a("cM");a("lZ");a("pA");a("kK");a("gY");a("kL");a("hs");a("mj");a("of");a("in");a("kW");a("ll");a("pW");a("eL");a("jj");a("oc");a("fb");a("iM");
a("U");a("pC");a("dZ");a("gR");a("bN");a("js");a("fN");a("bd");a("pK");a("fg");a("cX");a("no");a("mo");a("fy");a("hd");a("fd");a("ct");a("iS");a("oE");a("mL");a("fP");a("qc");a("ph");a("mg");a("oK");a("hn");a("fA");a("gT");a("dy");a("nC");a("cy");a("it");a("nA");a("kH");a("hS");a("cf");a("iW");a("dK");a("bW");a("kD");a("kf");a("pp");a("gi");a("hx");a("co");a("is");a("lP");a("ly");a("eH");a("hX");a("dG");a("bF");a("cx");a("es");a("oD");return!0});
define("gL","require er jquery.mod lV fq ce jI mV".split(" "),function(a){function d(p,r){this.type=p;this.stack=r}function l(){}var m=a("er"),k=a("jquery.mod"),c=a("lV"),h=a("fq"),f=a("ce");a("jI");a("mV");l.prototype.o9a=function(p,r,t,u){this.N$=[];this.VA=this.$J(p);this.kE=void 0;this.VA.nu.QDa()?(this.$ga=f.validate(p),this.kE=this.asa(this.VA,b.TYPE),this.fRa(this.kE,this.VA,r,t,u),this.ROa(this.VA),this.POa(this.VA,this.kE),this.SOa(this.kE,this.VA),this.kPa(this.kE,this.VA)):this.zo("Invalid root class",
[]);return 0==this.N$.length};l.prototype.Db=function(){return this.VA.instance};l.prototype.$J=function(p,r){r=r||[];return m(p).isArray()?this.xYa(p,r):k.isPlainObject(p)&&p["class"]?this.AYa(p,r):k.isPlainObject(p)?this.yYa(p,r):m(p).isFunction()?this.zYa(p,r):this.BYa(p,r)};l.prototype.xYa=function(p,r){for(var t=[],u=0;u<p.length;u++)r.push("Item["+u+"]"),t.push(this.$J(p[u],r)),r.pop();return new e(r.slice(),t)};l.prototype.AYa=function(p,r){var t=p["class"],u=h.Xi(p["class"]);if(u){t={};var v=
{},w;for(w in p){r.push(w);var x=p[w];switch(w){case "class":break;case "scripts":var y=this.$J(x,r);break;default:u.hasAttribute(w)?t[w]=this.$J(x,r):u.CEa(w)||u.DEa(w)?v[w]=this.$J(x,r):this.zo(u.cG()+" object doesn't have any attribute named "+w,r)}r.pop()}return new b(r.slice(),u,p.id,t,v,y)}this.zo("Undefined class name: "+t,r.slice());return new q(r.slice(),null)};l.prototype.yYa=function(p,r){var t={},u;for(u in p)r.push(u),t[u]=this.$J(p[u],r),r.pop();return new g(r.slice(),t)};l.prototype.zYa=
function(p,r){return new n(r.slice(),p)};l.prototype.BYa=function(p,r){return new q(r.slice(),p)};l.prototype.asa=function(p,r){var t=r&&p.type!=r?[]:[p],u=0;for(p=p.rb();u<p.length;u++)t=t.concat(this.asa(p[u],r));return t};l.prototype.fRa=function(p,r,t,u,v){r.instance=r.nu.Dm(null,u,v,[t,this.$ga]);r.instance.set("application",r.instance);for(t=0;t<p.length;t++){var w=p[t];w!=r&&(w.instance=w.nu.Dm(r.instance,u,v))}};l.prototype.ROa=function(p){if(p.scripts)if(p.scripts.type==g.TYPE)for(var r in p.scripts.value)this.QOa(p,
r);else this.zo("Invalid content.",p.scripts.stack)};l.prototype.QOa=function(p,r){var t=p.instance,u=p.scripts.value[r];m(t[r]).isUndefined()?u&&u.type==n.TYPE?t[r]=function(){return u.Eu().apply(t,arguments)}:this.zo("Invalid content.",u.stack):this.zo("Identifier: "+r+" is already in use",u.stack)};l.prototype.POa=function(p,r){p=p.instance;for(var t=0;t<r.length;t++){var u=r[t],v=u.id;v&&(m(p[v]).isUndefined()?p[v]=u.instance:this.zo("Identifier: "+v+" is arleady in use",u.stack))}};l.prototype.SOa=
function(p,r){for(var t=0;t<p.length;t++){var u=p[t],v=u.attributes,w;for(w in v)this.OOa(u,w,r)}};l.prototype.OOa=function(p,r,t){var u=p.nu;if(u.hasAttribute(r)){try{var v=p.attributes[r].Eu()}catch(w){this.zo("Invalid value for property "+r+" of "+u.cG()+" instance",p.stack)}try{v=u.Fia(r)(v,t.instance),p.instance.set(r,v)}catch(w){this.zo("Invalid value for property "+r+" of "+u.cG()+" instance",p.stack)}}else this.zo(u.cG()+" object doesn't have any property named "+r,p.stack)};l.prototype.kPa=
function(p,r){for(var t=0;t<p.length;t++){var u=p[t],v;for(v in u.$F)this.jPa(u,v,r)}};l.prototype.jPa=function(p,r,t){var u=p.nu,v=p.instance,w=u.CEa(r),x=u.DEa(r);if(w||x){p=p.$F[r];var y=p.Eu();m(y).isFunction()?v.bind(r,y,t.instance,x,y,!0):"string"==typeof y?v.bind(r,function(){try{eval("var event = arguments[0];"+y)}catch(z){throw z;}},t.instance,x,y,!0):this.zo("Invalid value.",p.stack)}else this.zo(u.cG()+" object doesn't have any event named "+r,p.stack)};l.prototype.zo=function(p,r){this.N$.push("In "+
r.join(" >> ")+": "+p)};d.prototype.rb=function(){return[]};d.prototype.Eu=function(){};var b=c.extend(d,function(p,r,t,u,v,w){d.call(this,b.TYPE,p);this.nu=r;this.id=t;this.attributes=u;this.$F=v;this.scripts=w;this.instance=null});b.prototype.rb=function(){var p=this.nu.aEa(),r=[],t=m(this.attributes).clone();if(p)for(var u=0;u<p.length;u++){var v=p[u];void 0!=t[v]&&(r.push(t[v]),delete t[v])}return r=r.concat(m(t).values())};b.prototype.Eu=function(){return this.instance};b.TYPE="instance";var e=
c.extend(d,function(p,r){d.call(this,e.TYPE,p);this.items=r});e.prototype.rb=function(){return this.items.slice()};e.prototype.Eu=function(){for(var p=[],r=0;r<this.items.length;r++)p.push(this.items[r].Eu());return p};e.TYPE="array";var g=c.extend(d,function(p,r){d.call(this,g.TYPE,p);this.value=r});g.prototype.rb=function(){return m(this.value).values()};g.prototype.Eu=function(){var p={},r;for(r in this.value)p[r]=this.value[r].Eu();return p};g.TYPE="dict";var n=c.extend(d,function(p,r){d.call(this,
n.TYPE,p);this.value=r});n.prototype.Eu=function(){return this.value};n.TYPE="function";var q=c.extend(d,function(p,r){d.call(this,q.TYPE,p);this.value=r});q.prototype.Eu=function(){return this.value};q.TYPE="simple";return l});
define("nD","require er pB cI fq gL w fe mV kQ hV nK pz nO lV".split(" "),function(a){function d(v,w){this.DR=v;this.Xi=this.Xi.bind(this);this.Dm=this.Dm.bind(this);this.gL=this.gL.bind(this);this.Ja=this.Ja.bind(this);this.X2=this.X2.bind(this);f.pb()&&!f.Ef()&&r.Tr();this.mX=[];v=q.name;var x=[];v&&x.push(v);0<q.LT?x.push("v:"+q.LT+"."+q.RT):x.push("v:"+q.RT);t.log(x.join(" "));this.Op=w;e.P7a()||0<=[f.tH,f.Yy].indexOf(f.browser())?(this.Qk=new h,(w=this.Op.get(TDV.PlayerSettings.BASE_DIR_URL))?
(w=e.Ny(w),"/"!=w[w.length-1]&&(w+="/")):w=e.getDirectory(this.Op.get(TDV.PlayerSettings.SELECTED_SCRIPT_URL)),this.Gka=this.Op.get(TDV.PlayerSettings.QUERY_STRING_PARAMETERS),b.D9a(w,function(y){this.Hha=y;this.WXa()}.bind(this))):window.alert(p("web-server-required"))}var l=a("er"),m=a("pB"),k=a("cI"),c=a("fq"),h=a("gL"),f=a("w"),b=a("fe"),e=a("mV"),g=a("kQ"),n=a("hV"),q=a("nK"),p=a("pz"),r=a("nO"),t=a("lV");d.prototype.WXa=function(){this.DR.trigger(new TDV.XV(m.XMa,{},[],void 0));l.defer(function(){if(!this.Qk.o9a(this.Op.get(TDV.PlayerSettings.SCRIPT_DATA),
this.Op.get(TDV.PlayerSettings.CONTAINER),this.Hha,this.Gka)){if("false"!=q.Tbb){window.alert(this.Msa());return}t.log(this.Msa())}this.iPa();this.GOa(this.Op);this.UOa();g.dU=this.Qk.Db();g.initialize(function(){this.v1a()}.bind(this))}.bind(this))};d.prototype.clear=function(){this.Qk&&(this.Dsa().forEach(function(v){v.instance.qma();v.nu.eT().forEach(function(w){switch(w){case "VideoPlayer":v.instance.stop();case "MapPlayer":case "Model3DPlayer":case "PanoramaPlayer":case "PhotoAlbumPlayer":v.instance.set("viewerArea",
null);break;case "ZoomImage":v.instance.set("image",null);break;case "Audio":v.instance.stop();break;case "Effect":v.instance.end();break;case "Media":v.instance.X9a()}})}),n.u9a(),this.Qk.Db().clear(),u={},this.Op=this.Qk=null)};d.prototype.H6a=function(v){return this.Qk.Db()[v]};d.prototype.Xi=function(v){if(v in u)return u[v].slice();var w=[];this.Dsa().forEach(function(x){var y=x.nu.eT();l(y).contains(v)&&w.push(x.instance)});u[v]=w;return w.slice()};d.prototype.Dsa=function(){return this.Qk?
this.Qk.kE.concat(this.mX):[]};var u={};d.prototype.Dm=function(v){var w=c.Xi(v);if(!w)throw"Invalid className: "+v;u={};v=this.Qk.Db();var x={};x.nu=w;x.instance=w.Dm(v,this.Hha,this.Gka);this.mX.push(x);this.Jpa(w,x.instance);this.h1a(v,x.instance);return x.instance};d.prototype.gL=function(v){var w=this.mX.findIndex(function(x){return x.instance==v});0>w||(u={},this.mX.splice(w,1),v.qma(),v.dispose&&v.dispose())};d.prototype.Msa=function(){for(var v=this.Qk.N$,w=["Errors parsing script file:"],
x=0;x<v.length;x++)w.push(v[x]);return w.join("\n")};d.prototype.iPa=function(){this.Qk.kE.forEach(function(w){this.Jpa(w.nu,w.instance,w.id)}.bind(this));var v=this.Qk.Db().iX;v.bind(m.AH,function(){v.wcb(m.AH);this.DR.cookiesEnabled=this.DR.E4a=!0;this.DR.trigger(new TDV.XV(m.AH,{},[],void 0))},this,!0)};d.prototype.Jpa=function(v,w,x){var y=v.eT();l.union(v.Jia(),v.Qia()).forEach(function(z){w.bind(z,function(B){this.DR.trigger(new TDV.XV(z,B,y,x))}.bind(this),this,!0)}.bind(this))};d.prototype.h1a=
function(v,w){v.trigger(new k(m.rMa,{instance:w}))};d.prototype.GOa=function(v){this.Qk.Db().set("settings",v)};d.prototype.Ja=function(){return c.Ja.apply(c,arguments)};d.prototype.X2=function(v){!v||e.BB(v)||e.E3(v)||(v=e.lB(e.Ny(v,this.Hha),this.Gka));return v};d.prototype.UOa=function(){var v=this.Qk.Db();v.getByClassName=v.Xi=this.Xi;v.createInstance=v.Dm=this.Dm;v.disposeInstance=v.gL=this.gL;v.isInstanceOfClass=v.Ja=this.Ja;v.getAbsoluteURL=v.X2=this.X2};d.prototype.v1a=function(){this.Qk.Db().start()};
d.tcb=function(v){v.trigger(new TDV.XV(m.sMa,{},[],void 0))};return d});define("main",["require","jquery.mod","nD"],function(a){var d=a("jquery.mod"),l=a("nD");d(document).ready(function(){TDV.cb.Jab(l)})});
(function(global,factory){factory(global.THREE={})})(this,function(exports){"use strict";const REVISION="168";const MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2};const TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3};const CullFaceNone=0;const CullFaceBack=1;const CullFaceFront=2;const CullFaceFrontBack=3;const BasicShadowMap=0;const PCFShadowMap=1;const PCFSoftShadowMap=2;const VSMShadowMap=3;const FrontSide=0;const BackSide=1;const DoubleSide=2;const NoBlending=0;const NormalBlending=1;const AdditiveBlending=2;const SubtractiveBlending=3;const MultiplyBlending=4;const CustomBlending=5;const AddEquation=100;const SubtractEquation=101;const ReverseSubtractEquation=102;const MinEquation=103;const MaxEquation=104;const ZeroFactor=200;const OneFactor=201;const SrcColorFactor=202;const OneMinusSrcColorFactor=203;const SrcAlphaFactor=204;const OneMinusSrcAlphaFactor=205;const DstAlphaFactor=206;const OneMinusDstAlphaFactor=207;const DstColorFactor=208;const OneMinusDstColorFactor=209;const SrcAlphaSaturateFactor=210;const ConstantColorFactor=211;const OneMinusConstantColorFactor=212;const ConstantAlphaFactor=213;const OneMinusConstantAlphaFactor=214;const NeverDepth=0;const AlwaysDepth=1;const LessDepth=2;const LessEqualDepth=3;const EqualDepth=4;const GreaterEqualDepth=5;const GreaterDepth=6;const NotEqualDepth=7;const MultiplyOperation=0;const MixOperation=1;const AddOperation=2;const NoToneMapping=0;const LinearToneMapping=1;const ReinhardToneMapping=2;const CineonToneMapping=3;const ACESFilmicToneMapping=4;const CustomToneMapping=5;const AgXToneMapping=6;const NeutralToneMapping=7;const AttachedBindMode="attached";const DetachedBindMode="detached";const UVMapping=300;const CubeReflectionMapping=301;const CubeRefractionMapping=302;const EquirectangularReflectionMapping=303;const EquirectangularRefractionMapping=304;const CubeUVReflectionMapping=306;const RepeatWrapping=1000;const ClampToEdgeWrapping=1001;const MirroredRepeatWrapping=1002;const NearestFilter=1003;const NearestMipmapNearestFilter=1004;const NearestMipMapNearestFilter=1004;const NearestMipmapLinearFilter=1005;const NearestMipMapLinearFilter=1005;const LinearFilter=1006;const LinearMipmapNearestFilter=1007;const LinearMipMapNearestFilter=1007;const LinearMipmapLinearFilter=1008;const LinearMipMapLinearFilter=1008;const UnsignedByteType=1009;const ByteType=1010;const ShortType=1011;const UnsignedShortType=1012;const IntType=1013;const UnsignedIntType=1014;const FloatType=1015;const HalfFloatType=1016;const UnsignedShort4444Type=1017;const UnsignedShort5551Type=1018;const UnsignedInt248Type=1020;const UnsignedInt5999Type=35902;const AlphaFormat=1021;const RGBFormat=1022;const RGBAFormat=1023;const LuminanceFormat=1024;const LuminanceAlphaFormat=1025;const DepthFormat=1026;const DepthStencilFormat=1027;const RedFormat=1028;const RedIntegerFormat=1029;const RGFormat=1030;const RGIntegerFormat=1031;const RGBIntegerFormat=1032;const RGBAIntegerFormat=1033;const RGB_S3TC_DXT1_Format=33776;const RGBA_S3TC_DXT1_Format=33777;const RGBA_S3TC_DXT3_Format=33778;const RGBA_S3TC_DXT5_Format=33779;const RGB_PVRTC_4BPPV1_Format=35840;const RGB_PVRTC_2BPPV1_Format=35841;const RGBA_PVRTC_4BPPV1_Format=35842;const RGBA_PVRTC_2BPPV1_Format=35843;const RGB_ETC1_Format=36196;const RGB_ETC2_Format=37492;const RGBA_ETC2_EAC_Format=37496;const RGBA_ASTC_4x4_Format=37808;const RGBA_ASTC_5x4_Format=37809;const RGBA_ASTC_5x5_Format=37810;const RGBA_ASTC_6x5_Format=37811;const RGBA_ASTC_6x6_Format=37812;const RGBA_ASTC_8x5_Format=37813;const RGBA_ASTC_8x6_Format=37814;const RGBA_ASTC_8x8_Format=37815;const RGBA_ASTC_10x5_Format=37816;const RGBA_ASTC_10x6_Format=37817;const RGBA_ASTC_10x8_Format=37818;const RGBA_ASTC_10x10_Format=37819;const RGBA_ASTC_12x10_Format=37820;const RGBA_ASTC_12x12_Format=37821;const RGBA_BPTC_Format=36492;const RGB_BPTC_SIGNED_Format=36494;const RGB_BPTC_UNSIGNED_Format=36495;const RED_RGTC1_Format=36283;const SIGNED_RED_RGTC1_Format=36284;const RED_GREEN_RGTC2_Format=36285;const SIGNED_RED_GREEN_RGTC2_Format=36286;const LoopOnce=2200;const LoopRepeat=2201;const LoopPingPong=2202;const InterpolateDiscrete=2300;const InterpolateLinear=2301;const InterpolateSmooth=2302;const ZeroCurvatureEnding=2400;const ZeroSlopeEnding=2401;const WrapAroundEnding=2402;const NormalAnimationBlendMode=2500;const AdditiveAnimationBlendMode=2501;const TrianglesDrawMode=0;const TriangleStripDrawMode=1;const TriangleFanDrawMode=2;const BasicDepthPacking=3200;const RGBADepthPacking=3201;const RGBDepthPacking=3202;const RGDepthPacking=3203;const TangentSpaceNormalMap=0;const ObjectSpaceNormalMap=1;const NoColorSpace="";const SRGBColorSpace="srgb";const LinearSRGBColorSpace="srgb-linear";const DisplayP3ColorSpace="display-p3";const LinearDisplayP3ColorSpace="display-p3-linear";const LinearTransfer="linear";const SRGBTransfer="srgb";const Rec709Primaries="rec709";const P3Primaries="p3";const ZeroStencilOp=0;const KeepStencilOp=7680;const ReplaceStencilOp=7681;const IncrementStencilOp=7682;const DecrementStencilOp=7683;const IncrementWrapStencilOp=34055;const DecrementWrapStencilOp=34056;const InvertStencilOp=5386;const NeverStencilFunc=512;const LessStencilFunc=513;const EqualStencilFunc=514;const LessEqualStencilFunc=515;const GreaterStencilFunc=516;const NotEqualStencilFunc=517;const GreaterEqualStencilFunc=518;const AlwaysStencilFunc=519;const NeverCompare=512;const LessCompare=513;const EqualCompare=514;const LessEqualCompare=515;const GreaterCompare=516;const NotEqualCompare=517;const GreaterEqualCompare=518;const AlwaysCompare=519;const StaticDrawUsage=35044;const DynamicDrawUsage=35048;const StreamDrawUsage=35040;const StaticReadUsage=35045;const DynamicReadUsage=35049;const StreamReadUsage=35041;const StaticCopyUsage=35046;const DynamicCopyUsage=35050;const StreamCopyUsage=35042;const GLSL1="100";const GLSL3="300 es";const WebGLCoordinateSystem=2000;const WebGPUCoordinateSystem=2001;class EventDispatcher{addEventListener(type,listener){if(this._listeners===undefined)this._listeners={};const listeners=this._listeners;if(listeners[type]===undefined){listeners[type]=[]}if(listeners[type].indexOf(listener)===-1){listeners[type].push(listener)}}hasEventListener(type,listener){if(this._listeners===undefined)return false;const listeners=this._listeners;return listeners[type]!==undefined&&listeners[type].indexOf(listener)!==-1}removeEventListener(type,listener){if(this._listeners===undefined)return;const listeners=this._listeners;const listenerArray=listeners[type];if(listenerArray!==undefined){const index=listenerArray.indexOf(listener);if(index!==-1){listenerArray.splice(index,1)}}}dispatchEvent(event){if(this._listeners===undefined)return;const listeners=this._listeners;const listenerArray=listeners[event.type];if(listenerArray!==undefined){event.target=this;const array=listenerArray.slice(0);for(let i=0,l=array.length;i<l;i++){array[i].call(this,event)}event.target=null}}}const _lut=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let _seed=1234567;const DEG2RAD=Math.PI/180;const RAD2DEG=180/Math.PI;function generateUUID(){const d0=Math.random()*4294967295|0;const d1=Math.random()*4294967295|0;const d2=Math.random()*4294967295|0;const d3=Math.random()*4294967295|0;const uuid=_lut[d0&255]+_lut[d0>>8&255]+_lut[d0>>16&255]+_lut[d0>>24&255]+"-"+_lut[d1&255]+_lut[d1>>8&255]+"-"+_lut[d1>>16&15|64]+_lut[d1>>24&255]+"-"+_lut[d2&63|128]+_lut[d2>>8&255]+"-"+_lut[d2>>16&255]+_lut[d2>>24&255]+_lut[d3&255]+_lut[d3>>8&255]+_lut[d3>>16&255]+_lut[d3>>24&255];return uuid.toLowerCase()}function clamp(value,min,max){return Math.max(min,Math.min(max,value))}function euclideanModulo(n,m){return(n%m+m)%m}function mapLinear(x,a1,a2,b1,b2){return b1+(x-a1)*(b2-b1)/(a2-a1)}function inverseLerp(x,y,value){if(x!==y){return(value-x)/(y-x)}else{return 0}}function lerp(x,y,t){return(1-t)*x+t*y}function damp(x,y,lambda,dt){return lerp(x,y,1-Math.exp(-lambda*dt))}function pingpong(x,length=1){return length-Math.abs(euclideanModulo(x,length*2)-length)}function smoothstep(x,min,max){if(x<=min)return 0;if(x>=max)return 1;x=(x-min)/(max-min);return x*x*(3-2*x)}function smootherstep(x,min,max){if(x<=min)return 0;if(x>=max)return 1;x=(x-min)/(max-min);return x*x*x*(x*(x*6-15)+10)}function randInt(low,high){return low+Math.floor(Math.random()*(high-low+1))}function randFloat(low,high){return low+Math.random()*(high-low)}function randFloatSpread(range){return range*(0.5-Math.random())}function seededRandom(s){if(s!==undefined)_seed=s;let t=_seed+=1831565813;t=Math.imul(t^t>>>15,t|1);t^=t+Math.imul(t^t>>>7,t|61);return((t^t>>>14)>>>0)/4294967296}function degToRad(degrees){return degrees*DEG2RAD}function radToDeg(radians){return radians*RAD2DEG}function isPowerOfTwo(value){return(value&value-1)===0&&value!==0}function ceilPowerOfTwo(value){return Math.pow(2,Math.ceil(Math.log(value)/Math.LN2))}function floorPowerOfTwo(value){return Math.pow(2,Math.floor(Math.log(value)/Math.LN2))}function setQuaternionFromProperEuler(q,a,b,c,order){const cos=Math.cos;const sin=Math.sin;const c2=cos(b/2);const s2=sin(b/2);const c13=cos((a+c)/2);const s13=sin((a+c)/2);const c1_3=cos((a-c)/2);const s1_3=sin((a-c)/2);const c3_1=cos((c-a)/2);const s3_1=sin((c-a)/2);switch(order){case"XYX":q.set(c2*s13,s2*c1_3,s2*s1_3,c2*c13);break;case"YZY":q.set(s2*s1_3,c2*s13,s2*c1_3,c2*c13);break;case"ZXZ":q.set(s2*c1_3,s2*s1_3,c2*s13,c2*c13);break;case"XZX":q.set(c2*s13,s2*s3_1,s2*c3_1,c2*c13);break;case"YXY":q.set(s2*c3_1,c2*s13,s2*s3_1,c2*c13);break;case"ZYZ":q.set(s2*s3_1,s2*c3_1,c2*s13,c2*c13);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+order);}}function denormalize(value,array){switch(array.constructor){case Float32Array:return value;case Uint32Array:return value/4294967295;case Uint16Array:return value/65535;case Uint8Array:return value/255;case Int32Array:return Math.max(value/2147483647,-1);case Int16Array:return Math.max(value/32767,-1);case Int8Array:return Math.max(value/127,-1);default:throw new Error("Invalid component type.");}}function normalize(value,array){switch(array.constructor){case Float32Array:return value;case Uint32Array:return Math.round(value*4294967295);case Uint16Array:return Math.round(value*65535);case Uint8Array:return Math.round(value*255);case Int32Array:return Math.round(value*2147483647);case Int16Array:return Math.round(value*32767);case Int8Array:return Math.round(value*127);default:throw new Error("Invalid component type.");}}const MathUtils={DEG2RAD:DEG2RAD,RAD2DEG:RAD2DEG,generateUUID:generateUUID,clamp:clamp,euclideanModulo:euclideanModulo,mapLinear:mapLinear,inverseLerp:inverseLerp,lerp:lerp,damp:damp,pingpong:pingpong,smoothstep:smoothstep,smootherstep:smootherstep,randInt:randInt,randFloat:randFloat,randFloatSpread:randFloatSpread,seededRandom:seededRandom,degToRad:degToRad,radToDeg:radToDeg,isPowerOfTwo:isPowerOfTwo,ceilPowerOfTwo:ceilPowerOfTwo,floorPowerOfTwo:floorPowerOfTwo,setQuaternionFromProperEuler:setQuaternionFromProperEuler,normalize:normalize,denormalize:denormalize};class Vector2{constructor(x=0,y=0){Vector2.prototype.isVector2=true;this.x=x;this.y=y}get width(){return this.x}set width(value){this.x=value}get height(){return this.y}set height(value){this.y=value}set(x,y){this.x=x;this.y=y;return this}setScalar(scalar){this.x=scalar;this.y=scalar;return this}setX(x){this.x=x;return this}setY(y){this.y=y;return this}setComponent(index,value){switch(index){case 0:this.x=value;break;case 1:this.y=value;break;default:throw new Error("index is out of range: "+index);}return this}getComponent(index){switch(index){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+index);}}clone(){return new this.constructor(this.x,this.y)}copy(v){this.x=v.x;this.y=v.y;return this}add(v){this.x+=v.x;this.y+=v.y;return this}addScalar(s){this.x+=s;this.y+=s;return this}addVectors(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this}addScaledVector(v,s){this.x+=v.x*s;this.y+=v.y*s;return this}sub(v){this.x-=v.x;this.y-=v.y;return this}subScalar(s){this.x-=s;this.y-=s;return this}subVectors(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this}multiply(v){this.x*=v.x;this.y*=v.y;return this}multiplyScalar(scalar){this.x*=scalar;this.y*=scalar;return this}divide(v){this.x/=v.x;this.y/=v.y;return this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}applyMatrix3(m){const x=this.x,y=this.y;const e=m.elements;this.x=e[0]*x+e[3]*y+e[6];this.y=e[1]*x+e[4]*y+e[7];return this}min(v){this.x=Math.min(this.x,v.x);this.y=Math.min(this.y,v.y);return this}max(v){this.x=Math.max(this.x,v.x);this.y=Math.max(this.y,v.y);return this}clamp(min,max){this.x=Math.max(min.x,Math.min(max.x,this.x));this.y=Math.max(min.y,Math.min(max.y,this.y));return this}clampScalar(minVal,maxVal){this.x=Math.max(minVal,Math.min(maxVal,this.x));this.y=Math.max(minVal,Math.min(maxVal,this.y));return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(Math.max(min,Math.min(max,length)))}floor(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this}ceil(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this}round(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this}roundToZero(){this.x=Math.trunc(this.x);this.y=Math.trunc(this.y);return this}negate(){this.x=-this.x;this.y=-this.y;return this}dot(v){return this.x*v.x+this.y*v.y}cross(v){return this.x*v.y-this.y*v.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){const angle=Math.atan2(-this.y,-this.x)+Math.PI;return angle}angleTo(v){const denominator=Math.sqrt(this.lengthSq()*v.lengthSq());if(denominator===0)return Math.PI/2;const theta=this.dot(v)/denominator;return Math.acos(clamp(theta,-1,1))}distanceTo(v){return Math.sqrt(this.distanceToSquared(v))}distanceToSquared(v){const dx=this.x-v.x,dy=this.y-v.y;return dx*dx+dy*dy}manhattanDistanceTo(v){return Math.abs(this.x-v.x)+Math.abs(this.y-v.y)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha){this.x+=(v.x-this.x)*alpha;this.y+=(v.y-this.y)*alpha;return this}lerpVectors(v1,v2,alpha){this.x=v1.x+(v2.x-v1.x)*alpha;this.y=v1.y+(v2.y-v1.y)*alpha;return this}equals(v){return v.x===this.x&&v.y===this.y}fromArray(array,offset=0){this.x=array[offset];this.y=array[offset+1];return this}toArray(array=[],offset=0){array[offset]=this.x;array[offset+1]=this.y;return array}fromBufferAttribute(attribute,index){this.x=attribute.getX(index);this.y=attribute.getY(index);return this}rotateAround(center,angle){const c=Math.cos(angle),s=Math.sin(angle);const x=this.x-center.x;const y=this.y-center.y;this.x=x*c-y*s+center.x;this.y=x*s+y*c+center.y;return this}random(){this.x=Math.random();this.y=Math.random();return this}*[Symbol.iterator](){yield this.x;yield this.y}}class Matrix3{constructor(n11,n12,n13,n21,n22,n23,n31,n32,n33){Matrix3.prototype.isMatrix3=true;this.elements=[1,0,0,0,1,0,0,0,1];if(n11!==undefined){this.set(n11,n12,n13,n21,n22,n23,n31,n32,n33)}}set(n11,n12,n13,n21,n22,n23,n31,n32,n33){const te=this.elements;te[0]=n11;te[1]=n21;te[2]=n31;te[3]=n12;te[4]=n22;te[5]=n32;te[6]=n13;te[7]=n23;te[8]=n33;return this}identity(){this.set(1,0,0,0,1,0,0,0,1);return this}copy(m){const te=this.elements;const me=m.elements;te[0]=me[0];te[1]=me[1];te[2]=me[2];te[3]=me[3];te[4]=me[4];te[5]=me[5];te[6]=me[6];te[7]=me[7];te[8]=me[8];return this}extractBasis(xAxis,yAxis,zAxis){xAxis.setFromMatrix3Column(this,0);yAxis.setFromMatrix3Column(this,1);zAxis.setFromMatrix3Column(this,2);return this}setFromMatrix4(m){const me=m.elements;this.set(me[0],me[4],me[8],me[1],me[5],me[9],me[2],me[6],me[10]);return this}multiply(m){return this.multiplyMatrices(this,m)}premultiply(m){return this.multiplyMatrices(m,this)}multiplyMatrices(a,b){const ae=a.elements;const be=b.elements;const te=this.elements;const a11=ae[0],a12=ae[3],a13=ae[6];const a21=ae[1],a22=ae[4],a23=ae[7];const a31=ae[2],a32=ae[5],a33=ae[8];const b11=be[0],b12=be[3],b13=be[6];const b21=be[1],b22=be[4],b23=be[7];const b31=be[2],b32=be[5],b33=be[8];te[0]=a11*b11+a12*b21+a13*b31;te[3]=a11*b12+a12*b22+a13*b32;te[6]=a11*b13+a12*b23+a13*b33;te[1]=a21*b11+a22*b21+a23*b31;te[4]=a21*b12+a22*b22+a23*b32;te[7]=a21*b13+a22*b23+a23*b33;te[2]=a31*b11+a32*b21+a33*b31;te[5]=a31*b12+a32*b22+a33*b32;te[8]=a31*b13+a32*b23+a33*b33;return this}multiplyScalar(s){const te=this.elements;te[0]*=s;te[3]*=s;te[6]*=s;te[1]*=s;te[4]*=s;te[7]*=s;te[2]*=s;te[5]*=s;te[8]*=s;return this}determinant(){const te=this.elements;const a=te[0],b=te[1],c=te[2],d=te[3],e=te[4],f=te[5],g=te[6],h=te[7],i=te[8];return a*e*i-a*f*h-b*d*i+b*f*g+c*d*h-c*e*g}invert(){const te=this.elements,n11=te[0],n21=te[1],n31=te[2],n12=te[3],n22=te[4],n32=te[5],n13=te[6],n23=te[7],n33=te[8],t11=n33*n22-n32*n23,t12=n32*n13-n33*n12,t13=n23*n12-n22*n13,det=n11*t11+n21*t12+n31*t13;if(det===0)return this.set(0,0,0,0,0,0,0,0,0);const detInv=1/det;te[0]=t11*detInv;te[1]=(n31*n23-n33*n21)*detInv;te[2]=(n32*n21-n31*n22)*detInv;te[3]=t12*detInv;te[4]=(n33*n11-n31*n13)*detInv;te[5]=(n31*n12-n32*n11)*detInv;te[6]=t13*detInv;te[7]=(n21*n13-n23*n11)*detInv;te[8]=(n22*n11-n21*n12)*detInv;return this}transpose(){let tmp;const m=this.elements;tmp=m[1];m[1]=m[3];m[3]=tmp;tmp=m[2];m[2]=m[6];m[6]=tmp;tmp=m[5];m[5]=m[7];m[7]=tmp;return this}getNormalMatrix(matrix4){return this.setFromMatrix4(matrix4).invert().transpose()}transposeIntoArray(r){const m=this.elements;r[0]=m[0];r[1]=m[3];r[2]=m[6];r[3]=m[1];r[4]=m[4];r[5]=m[7];r[6]=m[2];r[7]=m[5];r[8]=m[8];return this}setUvTransform(tx,ty,sx,sy,rotation,cx,cy){const c=Math.cos(rotation);const s=Math.sin(rotation);this.set(sx*c,sx*s,-sx*(c*cx+s*cy)+cx+tx,-sy*s,sy*c,-sy*(-s*cx+c*cy)+cy+ty,0,0,1);return this}scale(sx,sy){this.premultiply(_m3.makeScale(sx,sy));return this}rotate(theta){this.premultiply(_m3.makeRotation(-theta));return this}translate(tx,ty){this.premultiply(_m3.makeTranslation(tx,ty));return this}makeTranslation(x,y){if(x.isVector2){this.set(1,0,x.x,0,1,x.y,0,0,1)}else{this.set(1,0,x,0,1,y,0,0,1)}return this}makeRotation(theta){const c=Math.cos(theta);const s=Math.sin(theta);this.set(c,-s,0,s,c,0,0,0,1);return this}makeScale(x,y){this.set(x,0,0,0,y,0,0,0,1);return this}equals(matrix){const te=this.elements;const me=matrix.elements;for(let i=0;i<9;i++){if(te[i]!==me[i])return false}return true}fromArray(array,offset=0){for(let i=0;i<9;i++){this.elements[i]=array[i+offset]}return this}toArray(array=[],offset=0){const te=this.elements;array[offset]=te[0];array[offset+1]=te[1];array[offset+2]=te[2];array[offset+3]=te[3];array[offset+4]=te[4];array[offset+5]=te[5];array[offset+6]=te[6];array[offset+7]=te[7];array[offset+8]=te[8];return array}clone(){return new this.constructor().fromArray(this.elements)}}const _m3=new Matrix3;function arrayNeedsUint32(array){for(let i=array.length-1;i>=0;--i){if(array[i]>=65535)return true}return false}const TYPED_ARRAYS={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function getTypedArray(type,buffer){return new TYPED_ARRAYS[type](buffer)}function createElementNS(name){return document.createElementNS("http://www.w3.org/1999/xhtml",name)}function createCanvasElement(){const canvas=createElementNS("canvas");canvas.style.display="block";return canvas}const _cache={};function warnOnce(message){if(message in _cache)return;_cache[message]=true;console.warn(message)}function probeAsync(gl,sync,interval){return new Promise(function(resolve,reject){function probe(){switch(gl.clientWaitSync(sync,gl.SYNC_FLUSH_COMMANDS_BIT,0)){case gl.WAIT_FAILED:reject();break;case gl.TIMEOUT_EXPIRED:setTimeout(probe,interval);break;default:resolve();}}setTimeout(probe,interval)})}const LINEAR_SRGB_TO_LINEAR_DISPLAY_P3=new Matrix3().set(0.8224621,0.177538,0,0.0331941,0.9668058,0,0.0170827,0.0723974,0.9105199);const LINEAR_DISPLAY_P3_TO_LINEAR_SRGB=new Matrix3().set(1.2249401,-0.2249404,0,-0.0420569,1.0420571,0,-0.0196376,-0.0786361,1.0982735);const COLOR_SPACES={[LinearSRGBColorSpace]:{transfer:LinearTransfer,primaries:Rec709Primaries,luminanceCoefficients:[0.2126,0.7152,0.0722],toReference:color=>color,fromReference:color=>color},[SRGBColorSpace]:{transfer:SRGBTransfer,primaries:Rec709Primaries,luminanceCoefficients:[0.2126,0.7152,0.0722],toReference:color=>color.convertSRGBToLinear(),fromReference:color=>color.convertLinearToSRGB()},[LinearDisplayP3ColorSpace]:{transfer:LinearTransfer,primaries:P3Primaries,luminanceCoefficients:[0.2289,0.6917,0.0793],toReference:color=>color.applyMatrix3(LINEAR_DISPLAY_P3_TO_LINEAR_SRGB),fromReference:color=>color.applyMatrix3(LINEAR_SRGB_TO_LINEAR_DISPLAY_P3)},[DisplayP3ColorSpace]:{transfer:SRGBTransfer,primaries:P3Primaries,luminanceCoefficients:[0.2289,0.6917,0.0793],toReference:color=>color.convertSRGBToLinear().applyMatrix3(LINEAR_DISPLAY_P3_TO_LINEAR_SRGB),fromReference:color=>color.applyMatrix3(LINEAR_SRGB_TO_LINEAR_DISPLAY_P3).convertLinearToSRGB()}};const SUPPORTED_WORKING_COLOR_SPACES=new Set([LinearSRGBColorSpace,LinearDisplayP3ColorSpace]);const ColorManagement={enabled:true,_workingColorSpace:LinearSRGBColorSpace,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(colorSpace){if(!SUPPORTED_WORKING_COLOR_SPACES.has(colorSpace)){throw new Error(`Unsupported working color space, "${colorSpace}".`)}this._workingColorSpace=colorSpace},convert:function(color,sourceColorSpace,targetColorSpace){if(this.enabled===false||sourceColorSpace===targetColorSpace||!sourceColorSpace||!targetColorSpace){return color}const sourceToReference=COLOR_SPACES[sourceColorSpace].toReference;const targetFromReference=COLOR_SPACES[targetColorSpace].fromReference;return targetFromReference(sourceToReference(color))},fromWorkingColorSpace:function(color,targetColorSpace){return this.convert(color,this._workingColorSpace,targetColorSpace)},toWorkingColorSpace:function(color,sourceColorSpace){return this.convert(color,sourceColorSpace,this._workingColorSpace)},getPrimaries:function(colorSpace){return COLOR_SPACES[colorSpace].primaries},getTransfer:function(colorSpace){if(colorSpace===NoColorSpace)return LinearTransfer;return COLOR_SPACES[colorSpace].transfer},getLuminanceCoefficients:function(target,colorSpace=this._workingColorSpace){return target.fromArray(COLOR_SPACES[colorSpace].luminanceCoefficients)}};function SRGBToLinear(c){return c<0.04045?c*0.0773993808:Math.pow(c*0.9478672986+0.0521327014,2.4)}function LinearToSRGB(c){return c<0.0031308?c*12.92:1.055*Math.pow(c,0.41666)-0.055}let _canvas;class ImageUtils{static getDataURL(image){if(/^data:/i.test(image.src)){return image.src}if(typeof HTMLCanvasElement==="undefined"){return image.src}let canvas;if(image instanceof HTMLCanvasElement){canvas=image}else{if(_canvas===undefined)_canvas=createElementNS("canvas");_canvas.width=image.width;_canvas.height=image.height;const context=_canvas.getContext("2d");if(image instanceof ImageData){context.putImageData(image,0,0)}else{context.drawImage(image,0,0,image.width,image.height)}canvas=_canvas}if(canvas.width>2048||canvas.height>2048){console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",image);return canvas.toDataURL("image/jpeg",0.6)}else{return canvas.toDataURL("image/png")}}static sRGBToLinear(image){if(typeof HTMLImageElement!=="undefined"&&image instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&image instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&image instanceof ImageBitmap){const canvas=createElementNS("canvas");canvas.width=image.width;canvas.height=image.height;const context=canvas.getContext("2d");context.drawImage(image,0,0,image.width,image.height);const imageData=context.getImageData(0,0,image.width,image.height);const data=imageData.data;for(let i=0;i<data.length;i++){data[i]=SRGBToLinear(data[i]/255)*255}context.putImageData(imageData,0,0);return canvas}else if(image.data){const data=image.data.slice(0);for(let i=0;i<data.length;i++){if(data instanceof Uint8Array||data instanceof Uint8ClampedArray){data[i]=Math.floor(SRGBToLinear(data[i]/255)*255)}else{data[i]=SRGBToLinear(data[i])}}return{data:data,width:image.width,height:image.height}}else{console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.");return image}}}let _sourceId=0;class Source{constructor(data=null){this.isSource=true;Object.defineProperty(this,"id",{value:_sourceId++});this.uuid=generateUUID();this.data=data;this.dataReady=true;this.version=0}set needsUpdate(value){if(value===true)this.version++}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";if(!isRootObject&&meta.images[this.uuid]!==undefined){return meta.images[this.uuid]}const output={uuid:this.uuid,url:""};const data=this.data;if(data!==null){let url;if(Array.isArray(data)){url=[];for(let i=0,l=data.length;i<l;i++){if(data[i].isDataTexture){url.push(serializeImage(data[i].image))}else{url.push(serializeImage(data[i]))}}}else{url=serializeImage(data)}output.url=url}if(!isRootObject){meta.images[this.uuid]=output}return output}}function serializeImage(image){if(typeof HTMLImageElement!=="undefined"&&image instanceof HTMLImageElement||typeof HTMLCanvasElement!=="undefined"&&image instanceof HTMLCanvasElement||typeof ImageBitmap!=="undefined"&&image instanceof ImageBitmap){return ImageUtils.getDataURL(image)}else{if(image.data){return{data:Array.from(image.data),width:image.width,height:image.height,type:image.data.constructor.name}}else{console.warn("THREE.Texture: Unable to serialize Texture.");return{}}}}let _textureId=0;class Texture extends EventDispatcher{constructor(image=Texture.DEFAULT_IMAGE,mapping=Texture.DEFAULT_MAPPING,wrapS=ClampToEdgeWrapping,wrapT=ClampToEdgeWrapping,magFilter=LinearFilter,minFilter=LinearMipmapLinearFilter,format=RGBAFormat,type=UnsignedByteType,anisotropy=Texture.DEFAULT_ANISOTROPY,colorSpace=NoColorSpace){super();this.isTexture=true;Object.defineProperty(this,"id",{value:_textureId++});this.uuid=generateUUID();this.name="";this.source=new Source(image);this.mipmaps=[];this.mapping=mapping;this.channel=0;this.wrapS=wrapS;this.wrapT=wrapT;this.magFilter=magFilter;this.minFilter=minFilter;this.anisotropy=anisotropy;this.format=format;this.internalFormat=null;this.type=type;this.offset=new Vector2(0,0);this.repeat=new Vector2(1,1);this.center=new Vector2(0,0);this.rotation=0;this.matrixAutoUpdate=true;this.matrix=new Matrix3;this.generateMipmaps=true;this.premultiplyAlpha=false;this.flipY=true;this.unpackAlignment=4;this.colorSpace=colorSpace;this.userData={};this.version=0;this.onUpdate=null;this.isRenderTargetTexture=false;this.pmremVersion=0}get image(){return this.source.data}set image(value=null){this.source.data=value}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(source){this.name=source.name;this.source=source.source;this.mipmaps=source.mipmaps.slice(0);this.mapping=source.mapping;this.channel=source.channel;this.wrapS=source.wrapS;this.wrapT=source.wrapT;this.magFilter=source.magFilter;this.minFilter=source.minFilter;this.anisotropy=source.anisotropy;this.format=source.format;this.internalFormat=source.internalFormat;this.type=source.type;this.offset.copy(source.offset);this.repeat.copy(source.repeat);this.center.copy(source.center);this.rotation=source.rotation;this.matrixAutoUpdate=source.matrixAutoUpdate;this.matrix.copy(source.matrix);this.generateMipmaps=source.generateMipmaps;this.premultiplyAlpha=source.premultiplyAlpha;this.flipY=source.flipY;this.unpackAlignment=source.unpackAlignment;this.colorSpace=source.colorSpace;this.userData=JSON.parse(JSON.stringify(source.userData));this.needsUpdate=true;return this}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";if(!isRootObject&&meta.textures[this.uuid]!==undefined){return meta.textures[this.uuid]}const output={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(meta).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(Object.keys(this.userData).length>0)output.userData=this.userData;if(!isRootObject){meta.textures[this.uuid]=output}return output}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(uv){if(this.mapping!==UVMapping)return uv;uv.applyMatrix3(this.matrix);if(uv.x<0||uv.x>1){switch(this.wrapS){case RepeatWrapping:uv.x=uv.x-Math.floor(uv.x);break;case ClampToEdgeWrapping:uv.x=uv.x<0?0:1;break;case MirroredRepeatWrapping:if(Math.abs(Math.floor(uv.x)%2)===1){uv.x=Math.ceil(uv.x)-uv.x}else{uv.x=uv.x-Math.floor(uv.x)}break;}}if(uv.y<0||uv.y>1){switch(this.wrapT){case RepeatWrapping:uv.y=uv.y-Math.floor(uv.y);break;case ClampToEdgeWrapping:uv.y=uv.y<0?0:1;break;case MirroredRepeatWrapping:if(Math.abs(Math.floor(uv.y)%2)===1){uv.y=Math.ceil(uv.y)-uv.y}else{uv.y=uv.y-Math.floor(uv.y)}break;}}if(this.flipY){uv.y=1-uv.y}return uv}set needsUpdate(value){if(value===true){this.version++;this.source.needsUpdate=true}}set needsPMREMUpdate(value){if(value===true){this.pmremVersion++}}}Texture.DEFAULT_IMAGE=null;Texture.DEFAULT_MAPPING=UVMapping;Texture.DEFAULT_ANISOTROPY=1;class Vector4{constructor(x=0,y=0,z=0,w=1){Vector4.prototype.isVector4=true;this.x=x;this.y=y;this.z=z;this.w=w}get width(){return this.z}set width(value){this.z=value}get height(){return this.w}set height(value){this.w=value}set(x,y,z,w){this.x=x;this.y=y;this.z=z;this.w=w;return this}setScalar(scalar){this.x=scalar;this.y=scalar;this.z=scalar;this.w=scalar;return this}setX(x){this.x=x;return this}setY(y){this.y=y;return this}setZ(z){this.z=z;return this}setW(w){this.w=w;return this}setComponent(index,value){switch(index){case 0:this.x=value;break;case 1:this.y=value;break;case 2:this.z=value;break;case 3:this.w=value;break;default:throw new Error("index is out of range: "+index);}return this}getComponent(index){switch(index){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+index);}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(v){this.x=v.x;this.y=v.y;this.z=v.z;this.w=v.w!==undefined?v.w:1;return this}add(v){this.x+=v.x;this.y+=v.y;this.z+=v.z;this.w+=v.w;return this}addScalar(s){this.x+=s;this.y+=s;this.z+=s;this.w+=s;return this}addVectors(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this}addScaledVector(v,s){this.x+=v.x*s;this.y+=v.y*s;this.z+=v.z*s;this.w+=v.w*s;return this}sub(v){this.x-=v.x;this.y-=v.y;this.z-=v.z;this.w-=v.w;return this}subScalar(s){this.x-=s;this.y-=s;this.z-=s;this.w-=s;return this}subVectors(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this}multiply(v){this.x*=v.x;this.y*=v.y;this.z*=v.z;this.w*=v.w;return this}multiplyScalar(scalar){this.x*=scalar;this.y*=scalar;this.z*=scalar;this.w*=scalar;return this}applyMatrix4(m){const x=this.x,y=this.y,z=this.z,w=this.w;const e=m.elements;this.x=e[0]*x+e[4]*y+e[8]*z+e[12]*w;this.y=e[1]*x+e[5]*y+e[9]*z+e[13]*w;this.z=e[2]*x+e[6]*y+e[10]*z+e[14]*w;this.w=e[3]*x+e[7]*y+e[11]*z+e[15]*w;return this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}setAxisAngleFromQuaternion(q){this.w=2*Math.acos(q.w);const s=Math.sqrt(1-q.w*q.w);if(s<0.0001){this.x=1;this.y=0;this.z=0}else{this.x=q.x/s;this.y=q.y/s;this.z=q.z/s}return this}setAxisAngleFromRotationMatrix(m){let angle,x,y,z;const epsilon=0.01,epsilon2=0.1,te=m.elements,m11=te[0],m12=te[4],m13=te[8],m21=te[1],m22=te[5],m23=te[9],m31=te[2],m32=te[6],m33=te[10];if(Math.abs(m12-m21)<epsilon&&Math.abs(m13-m31)<epsilon&&Math.abs(m23-m32)<epsilon){if(Math.abs(m12+m21)<epsilon2&&Math.abs(m13+m31)<epsilon2&&Math.abs(m23+m32)<epsilon2&&Math.abs(m11+m22+m33-3)<epsilon2){this.set(1,0,0,0);return this}angle=Math.PI;const xx=(m11+1)/2;const yy=(m22+1)/2;const zz=(m33+1)/2;const xy=(m12+m21)/4;const xz=(m13+m31)/4;const yz=(m23+m32)/4;if(xx>yy&&xx>zz){if(xx<epsilon){x=0;y=0.707106781;z=0.707106781}else{x=Math.sqrt(xx);y=xy/x;z=xz/x}}else if(yy>zz){if(yy<epsilon){x=0.707106781;y=0;z=0.707106781}else{y=Math.sqrt(yy);x=xy/y;z=yz/y}}else{if(zz<epsilon){x=0.707106781;y=0.707106781;z=0}else{z=Math.sqrt(zz);x=xz/z;y=yz/z}}this.set(x,y,z,angle);return this}let s=Math.sqrt((m32-m23)*(m32-m23)+(m13-m31)*(m13-m31)+(m21-m12)*(m21-m12));if(Math.abs(s)<0.001)s=1;this.x=(m32-m23)/s;this.y=(m13-m31)/s;this.z=(m21-m12)/s;this.w=Math.acos((m11+m22+m33-1)/2);return this}setFromMatrixPosition(m){const e=m.elements;this.x=e[12];this.y=e[13];this.z=e[14];this.w=e[15];return this}min(v){this.x=Math.min(this.x,v.x);this.y=Math.min(this.y,v.y);this.z=Math.min(this.z,v.z);this.w=Math.min(this.w,v.w);return this}max(v){this.x=Math.max(this.x,v.x);this.y=Math.max(this.y,v.y);this.z=Math.max(this.z,v.z);this.w=Math.max(this.w,v.w);return this}clamp(min,max){this.x=Math.max(min.x,Math.min(max.x,this.x));this.y=Math.max(min.y,Math.min(max.y,this.y));this.z=Math.max(min.z,Math.min(max.z,this.z));this.w=Math.max(min.w,Math.min(max.w,this.w));return this}clampScalar(minVal,maxVal){this.x=Math.max(minVal,Math.min(maxVal,this.x));this.y=Math.max(minVal,Math.min(maxVal,this.y));this.z=Math.max(minVal,Math.min(maxVal,this.z));this.w=Math.max(minVal,Math.min(maxVal,this.w));return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(Math.max(min,Math.min(max,length)))}floor(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this}ceil(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this}round(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Math.round(this.w);return this}roundToZero(){this.x=Math.trunc(this.x);this.y=Math.trunc(this.y);this.z=Math.trunc(this.z);this.w=Math.trunc(this.w);return this}negate(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this}dot(v){return this.x*v.x+this.y*v.y+this.z*v.z+this.w*v.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha){this.x+=(v.x-this.x)*alpha;this.y+=(v.y-this.y)*alpha;this.z+=(v.z-this.z)*alpha;this.w+=(v.w-this.w)*alpha;return this}lerpVectors(v1,v2,alpha){this.x=v1.x+(v2.x-v1.x)*alpha;this.y=v1.y+(v2.y-v1.y)*alpha;this.z=v1.z+(v2.z-v1.z)*alpha;this.w=v1.w+(v2.w-v1.w)*alpha;return this}equals(v){return v.x===this.x&&v.y===this.y&&v.z===this.z&&v.w===this.w}fromArray(array,offset=0){this.x=array[offset];this.y=array[offset+1];this.z=array[offset+2];this.w=array[offset+3];return this}toArray(array=[],offset=0){array[offset]=this.x;array[offset+1]=this.y;array[offset+2]=this.z;array[offset+3]=this.w;return array}fromBufferAttribute(attribute,index){this.x=attribute.getX(index);this.y=attribute.getY(index);this.z=attribute.getZ(index);this.w=attribute.getW(index);return this}random(){this.x=Math.random();this.y=Math.random();this.z=Math.random();this.w=Math.random();return this}*[Symbol.iterator](){yield this.x;yield this.y;yield this.z;yield this.w}}class RenderTarget extends EventDispatcher{constructor(width=1,height=1,options={}){super();this.isRenderTarget=true;this.width=width;this.height=height;this.depth=1;this.scissor=new Vector4(0,0,width,height);this.scissorTest=false;this.viewport=new Vector4(0,0,width,height);const image={width:width,height:height,depth:1};options=Object.assign({generateMipmaps:false,internalFormat:null,minFilter:LinearFilter,depthBuffer:true,stencilBuffer:false,resolveDepthBuffer:true,resolveStencilBuffer:true,depthTexture:null,samples:0,count:1},options);const texture=new Texture(image,options.mapping,options.wrapS,options.wrapT,options.magFilter,options.minFilter,options.format,options.type,options.anisotropy,options.colorSpace);texture.flipY=false;texture.generateMipmaps=options.generateMipmaps;texture.internalFormat=options.internalFormat;this.textures=[];const count=options.count;for(let i=0;i<count;i++){this.textures[i]=texture.clone();this.textures[i].isRenderTargetTexture=true}this.depthBuffer=options.depthBuffer;this.stencilBuffer=options.stencilBuffer;this.resolveDepthBuffer=options.resolveDepthBuffer;this.resolveStencilBuffer=options.resolveStencilBuffer;this.depthTexture=options.depthTexture;this.samples=options.samples}get texture(){return this.textures[0]}set texture(value){this.textures[0]=value}setSize(width,height,depth=1){if(this.width!==width||this.height!==height||this.depth!==depth){this.width=width;this.height=height;this.depth=depth;for(let i=0,il=this.textures.length;i<il;i++){this.textures[i].image.width=width;this.textures[i].image.height=height;this.textures[i].image.depth=depth}this.dispose()}this.viewport.set(0,0,width,height);this.scissor.set(0,0,width,height)}clone(){return new this.constructor().copy(this)}copy(source){this.width=source.width;this.height=source.height;this.depth=source.depth;this.scissor.copy(source.scissor);this.scissorTest=source.scissorTest;this.viewport.copy(source.viewport);this.textures.length=0;for(let i=0,il=source.textures.length;i<il;i++){this.textures[i]=source.textures[i].clone();this.textures[i].isRenderTargetTexture=true}const image=Object.assign({},source.texture.image);this.texture.source=new Source(image);this.depthBuffer=source.depthBuffer;this.stencilBuffer=source.stencilBuffer;this.resolveDepthBuffer=source.resolveDepthBuffer;this.resolveStencilBuffer=source.resolveStencilBuffer;if(source.depthTexture!==null)this.depthTexture=source.depthTexture.clone();this.samples=source.samples;return this}dispose(){this.dispatchEvent({type:"dispose"})}}class WebGLRenderTarget extends RenderTarget{constructor(width=1,height=1,options={}){super(width,height,options);this.isWebGLRenderTarget=true}}class DataArrayTexture extends Texture{constructor(data=null,width=1,height=1,depth=1){super(null);this.isDataArrayTexture=true;this.image={data,width,height,depth};this.magFilter=NearestFilter;this.minFilter=NearestFilter;this.wrapR=ClampToEdgeWrapping;this.generateMipmaps=false;this.flipY=false;this.unpackAlignment=1;this.layerUpdates=new Set}addLayerUpdate(layerIndex){this.layerUpdates.add(layerIndex)}clearLayerUpdates(){this.layerUpdates.clear()}}class WebGLArrayRenderTarget extends WebGLRenderTarget{constructor(width=1,height=1,depth=1,options={}){super(width,height,options);this.isWebGLArrayRenderTarget=true;this.depth=depth;this.texture=new DataArrayTexture(null,width,height,depth);this.texture.isRenderTargetTexture=true}}class Data3DTexture extends Texture{constructor(data=null,width=1,height=1,depth=1){super(null);this.isData3DTexture=true;this.image={data,width,height,depth};this.magFilter=NearestFilter;this.minFilter=NearestFilter;this.wrapR=ClampToEdgeWrapping;this.generateMipmaps=false;this.flipY=false;this.unpackAlignment=1}}class WebGL3DRenderTarget extends WebGLRenderTarget{constructor(width=1,height=1,depth=1,options={}){super(width,height,options);this.isWebGL3DRenderTarget=true;this.depth=depth;this.texture=new Data3DTexture(null,width,height,depth);this.texture.isRenderTargetTexture=true}}class Quaternion{constructor(x=0,y=0,z=0,w=1){this.isQuaternion=true;this._x=x;this._y=y;this._z=z;this._w=w}static slerpFlat(dst,dstOffset,src0,srcOffset0,src1,srcOffset1,t){let x0=src0[srcOffset0+0],y0=src0[srcOffset0+1],z0=src0[srcOffset0+2],w0=src0[srcOffset0+3];const x1=src1[srcOffset1+0],y1=src1[srcOffset1+1],z1=src1[srcOffset1+2],w1=src1[srcOffset1+3];if(t===0){dst[dstOffset+0]=x0;dst[dstOffset+1]=y0;dst[dstOffset+2]=z0;dst[dstOffset+3]=w0;return}if(t===1){dst[dstOffset+0]=x1;dst[dstOffset+1]=y1;dst[dstOffset+2]=z1;dst[dstOffset+3]=w1;return}if(w0!==w1||x0!==x1||y0!==y1||z0!==z1){let s=1-t;const cos=x0*x1+y0*y1+z0*z1+w0*w1,dir=cos>=0?1:-1,sqrSin=1-cos*cos;if(sqrSin>Number.EPSILON){const sin=Math.sqrt(sqrSin),len=Math.atan2(sin,cos*dir);s=Math.sin(s*len)/sin;t=Math.sin(t*len)/sin}const tDir=t*dir;x0=x0*s+x1*tDir;y0=y0*s+y1*tDir;z0=z0*s+z1*tDir;w0=w0*s+w1*tDir;if(s===1-t){const f=1/Math.sqrt(x0*x0+y0*y0+z0*z0+w0*w0);x0*=f;y0*=f;z0*=f;w0*=f}}dst[dstOffset]=x0;dst[dstOffset+1]=y0;dst[dstOffset+2]=z0;dst[dstOffset+3]=w0}static multiplyQuaternionsFlat(dst,dstOffset,src0,srcOffset0,src1,srcOffset1){const x0=src0[srcOffset0];const y0=src0[srcOffset0+1];const z0=src0[srcOffset0+2];const w0=src0[srcOffset0+3];const x1=src1[srcOffset1];const y1=src1[srcOffset1+1];const z1=src1[srcOffset1+2];const w1=src1[srcOffset1+3];dst[dstOffset]=x0*w1+w0*x1+y0*z1-z0*y1;dst[dstOffset+1]=y0*w1+w0*y1+z0*x1-x0*z1;dst[dstOffset+2]=z0*w1+w0*z1+x0*y1-y0*x1;dst[dstOffset+3]=w0*w1-x0*x1-y0*y1-z0*z1;return dst}get x(){return this._x}set x(value){this._x=value;this._onChangeCallback()}get y(){return this._y}set y(value){this._y=value;this._onChangeCallback()}get z(){return this._z}set z(value){this._z=value;this._onChangeCallback()}get w(){return this._w}set w(value){this._w=value;this._onChangeCallback()}set(x,y,z,w){this._x=x;this._y=y;this._z=z;this._w=w;this._onChangeCallback();return this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(quaternion){this._x=quaternion.x;this._y=quaternion.y;this._z=quaternion.z;this._w=quaternion.w;this._onChangeCallback();return this}setFromEuler(euler,update=true){const x=euler._x,y=euler._y,z=euler._z,order=euler._order;const cos=Math.cos;const sin=Math.sin;const c1=cos(x/2);const c2=cos(y/2);const c3=cos(z/2);const s1=sin(x/2);const s2=sin(y/2);const s3=sin(z/2);switch(order){case"XYZ":this._x=s1*c2*c3+c1*s2*s3;this._y=c1*s2*c3-s1*c2*s3;this._z=c1*c2*s3+s1*s2*c3;this._w=c1*c2*c3-s1*s2*s3;break;case"YXZ":this._x=s1*c2*c3+c1*s2*s3;this._y=c1*s2*c3-s1*c2*s3;this._z=c1*c2*s3-s1*s2*c3;this._w=c1*c2*c3+s1*s2*s3;break;case"ZXY":this._x=s1*c2*c3-c1*s2*s3;this._y=c1*s2*c3+s1*c2*s3;this._z=c1*c2*s3+s1*s2*c3;this._w=c1*c2*c3-s1*s2*s3;break;case"ZYX":this._x=s1*c2*c3-c1*s2*s3;this._y=c1*s2*c3+s1*c2*s3;this._z=c1*c2*s3-s1*s2*c3;this._w=c1*c2*c3+s1*s2*s3;break;case"YZX":this._x=s1*c2*c3+c1*s2*s3;this._y=c1*s2*c3+s1*c2*s3;this._z=c1*c2*s3-s1*s2*c3;this._w=c1*c2*c3-s1*s2*s3;break;case"XZY":this._x=s1*c2*c3-c1*s2*s3;this._y=c1*s2*c3-s1*c2*s3;this._z=c1*c2*s3+s1*s2*c3;this._w=c1*c2*c3+s1*s2*s3;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+order);}if(update===true)this._onChangeCallback();return this}setFromAxisAngle(axis,angle){const halfAngle=angle/2,s=Math.sin(halfAngle);this._x=axis.x*s;this._y=axis.y*s;this._z=axis.z*s;this._w=Math.cos(halfAngle);this._onChangeCallback();return this}setFromRotationMatrix(m){const te=m.elements,m11=te[0],m12=te[4],m13=te[8],m21=te[1],m22=te[5],m23=te[9],m31=te[2],m32=te[6],m33=te[10],trace=m11+m22+m33;if(trace>0){const s=0.5/Math.sqrt(trace+1);this._w=0.25/s;this._x=(m32-m23)*s;this._y=(m13-m31)*s;this._z=(m21-m12)*s}else if(m11>m22&&m11>m33){const s=2*Math.sqrt(1+m11-m22-m33);this._w=(m32-m23)/s;this._x=0.25*s;this._y=(m12+m21)/s;this._z=(m13+m31)/s}else if(m22>m33){const s=2*Math.sqrt(1+m22-m11-m33);this._w=(m13-m31)/s;this._x=(m12+m21)/s;this._y=0.25*s;this._z=(m23+m32)/s}else{const s=2*Math.sqrt(1+m33-m11-m22);this._w=(m21-m12)/s;this._x=(m13+m31)/s;this._y=(m23+m32)/s;this._z=0.25*s}this._onChangeCallback();return this}setFromUnitVectors(vFrom,vTo){let r=vFrom.dot(vTo)+1;if(r<Number.EPSILON){r=0;if(Math.abs(vFrom.x)>Math.abs(vFrom.z)){this._x=-vFrom.y;this._y=vFrom.x;this._z=0;this._w=r}else{this._x=0;this._y=-vFrom.z;this._z=vFrom.y;this._w=r}}else{this._x=vFrom.y*vTo.z-vFrom.z*vTo.y;this._y=vFrom.z*vTo.x-vFrom.x*vTo.z;this._z=vFrom.x*vTo.y-vFrom.y*vTo.x;this._w=r}return this.normalize()}angleTo(q){return 2*Math.acos(Math.abs(clamp(this.dot(q),-1,1)))}rotateTowards(q,step){const angle=this.angleTo(q);if(angle===0)return this;const t=Math.min(1,step/angle);this.slerp(q,t);return this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){this._x*=-1;this._y*=-1;this._z*=-1;this._onChangeCallback();return this}dot(v){return this._x*v._x+this._y*v._y+this._z*v._z+this._w*v._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let l=this.length();if(l===0){this._x=0;this._y=0;this._z=0;this._w=1}else{l=1/l;this._x=this._x*l;this._y=this._y*l;this._z=this._z*l;this._w=this._w*l}this._onChangeCallback();return this}multiply(q){return this.multiplyQuaternions(this,q)}premultiply(q){return this.multiplyQuaternions(q,this)}multiplyQuaternions(a,b){const qax=a._x,qay=a._y,qaz=a._z,qaw=a._w;const qbx=b._x,qby=b._y,qbz=b._z,qbw=b._w;this._x=qax*qbw+qaw*qbx+qay*qbz-qaz*qby;this._y=qay*qbw+qaw*qby+qaz*qbx-qax*qbz;this._z=qaz*qbw+qaw*qbz+qax*qby-qay*qbx;this._w=qaw*qbw-qax*qbx-qay*qby-qaz*qbz;this._onChangeCallback();return this}slerp(qb,t){if(t===0)return this;if(t===1)return this.copy(qb);const x=this._x,y=this._y,z=this._z,w=this._w;let cosHalfTheta=w*qb._w+x*qb._x+y*qb._y+z*qb._z;if(cosHalfTheta<0){this._w=-qb._w;this._x=-qb._x;this._y=-qb._y;this._z=-qb._z;cosHalfTheta=-cosHalfTheta}else{this.copy(qb)}if(cosHalfTheta>=1){this._w=w;this._x=x;this._y=y;this._z=z;return this}const sqrSinHalfTheta=1-cosHalfTheta*cosHalfTheta;if(sqrSinHalfTheta<=Number.EPSILON){const s=1-t;this._w=s*w+t*this._w;this._x=s*x+t*this._x;this._y=s*y+t*this._y;this._z=s*z+t*this._z;this.normalize();return this}const sinHalfTheta=Math.sqrt(sqrSinHalfTheta);const halfTheta=Math.atan2(sinHalfTheta,cosHalfTheta);const ratioA=Math.sin((1-t)*halfTheta)/sinHalfTheta,ratioB=Math.sin(t*halfTheta)/sinHalfTheta;this._w=w*ratioA+this._w*ratioB;this._x=x*ratioA+this._x*ratioB;this._y=y*ratioA+this._y*ratioB;this._z=z*ratioA+this._z*ratioB;this._onChangeCallback();return this}slerpQuaternions(qa,qb,t){return this.copy(qa).slerp(qb,t)}random(){const theta1=2*Math.PI*Math.random();const theta2=2*Math.PI*Math.random();const x0=Math.random();const r1=Math.sqrt(1-x0);const r2=Math.sqrt(x0);return this.set(r1*Math.sin(theta1),r1*Math.cos(theta1),r2*Math.sin(theta2),r2*Math.cos(theta2))}equals(quaternion){return quaternion._x===this._x&&quaternion._y===this._y&&quaternion._z===this._z&&quaternion._w===this._w}fromArray(array,offset=0){this._x=array[offset];this._y=array[offset+1];this._z=array[offset+2];this._w=array[offset+3];this._onChangeCallback();return this}toArray(array=[],offset=0){array[offset]=this._x;array[offset+1]=this._y;array[offset+2]=this._z;array[offset+3]=this._w;return array}fromBufferAttribute(attribute,index){this._x=attribute.getX(index);this._y=attribute.getY(index);this._z=attribute.getZ(index);this._w=attribute.getW(index);this._onChangeCallback();return this}toJSON(){return this.toArray()}_onChange(callback){this._onChangeCallback=callback;return this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x;yield this._y;yield this._z;yield this._w}}class Vector3{constructor(x=0,y=0,z=0){Vector3.prototype.isVector3=true;this.x=x;this.y=y;this.z=z}set(x,y,z){if(z===undefined)z=this.z;this.x=x;this.y=y;this.z=z;return this}setScalar(scalar){this.x=scalar;this.y=scalar;this.z=scalar;return this}setX(x){this.x=x;return this}setY(y){this.y=y;return this}setZ(z){this.z=z;return this}setComponent(index,value){switch(index){case 0:this.x=value;break;case 1:this.y=value;break;case 2:this.z=value;break;default:throw new Error("index is out of range: "+index);}return this}getComponent(index){switch(index){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+index);}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(v){this.x=v.x;this.y=v.y;this.z=v.z;return this}add(v){this.x+=v.x;this.y+=v.y;this.z+=v.z;return this}addScalar(s){this.x+=s;this.y+=s;this.z+=s;return this}addVectors(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this}addScaledVector(v,s){this.x+=v.x*s;this.y+=v.y*s;this.z+=v.z*s;return this}sub(v){this.x-=v.x;this.y-=v.y;this.z-=v.z;return this}subScalar(s){this.x-=s;this.y-=s;this.z-=s;return this}subVectors(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this}multiply(v){this.x*=v.x;this.y*=v.y;this.z*=v.z;return this}multiplyScalar(scalar){this.x*=scalar;this.y*=scalar;this.z*=scalar;return this}multiplyVectors(a,b){this.x=a.x*b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this}applyEuler(euler){return this.applyQuaternion(_quaternion$4.setFromEuler(euler))}applyAxisAngle(axis,angle){return this.applyQuaternion(_quaternion$4.setFromAxisAngle(axis,angle))}applyMatrix3(m){const x=this.x,y=this.y,z=this.z;const e=m.elements;this.x=e[0]*x+e[3]*y+e[6]*z;this.y=e[1]*x+e[4]*y+e[7]*z;this.z=e[2]*x+e[5]*y+e[8]*z;return this}applyNormalMatrix(m){return this.applyMatrix3(m).normalize()}applyMatrix4(m){const x=this.x,y=this.y,z=this.z;const e=m.elements;const w=1/(e[3]*x+e[7]*y+e[11]*z+e[15]);this.x=(e[0]*x+e[4]*y+e[8]*z+e[12])*w;this.y=(e[1]*x+e[5]*y+e[9]*z+e[13])*w;this.z=(e[2]*x+e[6]*y+e[10]*z+e[14])*w;return this}applyQuaternion(q){const vx=this.x,vy=this.y,vz=this.z;const qx=q.x,qy=q.y,qz=q.z,qw=q.w;const tx=2*(qy*vz-qz*vy);const ty=2*(qz*vx-qx*vz);const tz=2*(qx*vy-qy*vx);this.x=vx+qw*tx+qy*tz-qz*ty;this.y=vy+qw*ty+qz*tx-qx*tz;this.z=vz+qw*tz+qx*ty-qy*tx;return this}project(camera){return this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix)}unproject(camera){return this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld)}transformDirection(m){const x=this.x,y=this.y,z=this.z;const e=m.elements;this.x=e[0]*x+e[4]*y+e[8]*z;this.y=e[1]*x+e[5]*y+e[9]*z;this.z=e[2]*x+e[6]*y+e[10]*z;return this.normalize()}divide(v){this.x/=v.x;this.y/=v.y;this.z/=v.z;return this}divideScalar(scalar){return this.multiplyScalar(1/scalar)}min(v){this.x=Math.min(this.x,v.x);this.y=Math.min(this.y,v.y);this.z=Math.min(this.z,v.z);return this}max(v){this.x=Math.max(this.x,v.x);this.y=Math.max(this.y,v.y);this.z=Math.max(this.z,v.z);return this}clamp(min,max){this.x=Math.max(min.x,Math.min(max.x,this.x));this.y=Math.max(min.y,Math.min(max.y,this.y));this.z=Math.max(min.z,Math.min(max.z,this.z));return this}clampScalar(minVal,maxVal){this.x=Math.max(minVal,Math.min(maxVal,this.x));this.y=Math.max(minVal,Math.min(maxVal,this.y));this.z=Math.max(minVal,Math.min(maxVal,this.z));return this}clampLength(min,max){const length=this.length();return this.divideScalar(length||1).multiplyScalar(Math.max(min,Math.min(max,length)))}floor(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this}ceil(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this}round(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);return this}roundToZero(){this.x=Math.trunc(this.x);this.y=Math.trunc(this.y);this.z=Math.trunc(this.z);return this}negate(){this.x=-this.x;this.y=-this.y;this.z=-this.z;return this}dot(v){return this.x*v.x+this.y*v.y+this.z*v.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(length){return this.normalize().multiplyScalar(length)}lerp(v,alpha){this.x+=(v.x-this.x)*alpha;this.y+=(v.y-this.y)*alpha;this.z+=(v.z-this.z)*alpha;return this}lerpVectors(v1,v2,alpha){this.x=v1.x+(v2.x-v1.x)*alpha;this.y=v1.y+(v2.y-v1.y)*alpha;this.z=v1.z+(v2.z-v1.z)*alpha;return this}cross(v){return this.crossVectors(this,v)}crossVectors(a,b){const ax=a.x,ay=a.y,az=a.z;const bx=b.x,by=b.y,bz=b.z;this.x=ay*bz-az*by;this.y=az*bx-ax*bz;this.z=ax*by-ay*bx;return this}projectOnVector(v){const denominator=v.lengthSq();if(denominator===0)return this.set(0,0,0);const scalar=v.dot(this)/denominator;return this.copy(v).multiplyScalar(scalar)}projectOnPlane(planeNormal){_vector$c.copy(this).projectOnVector(planeNormal);return this.sub(_vector$c)}reflect(normal){return this.sub(_vector$c.copy(normal).multiplyScalar(2*this.dot(normal)))}angleTo(v){const denominator=Math.sqrt(this.lengthSq()*v.lengthSq());if(denominator===0)return Math.PI/2;const theta=this.dot(v)/denominator;return Math.acos(clamp(theta,-1,1))}distanceTo(v){return Math.sqrt(this.distanceToSquared(v))}distanceToSquared(v){const dx=this.x-v.x,dy=this.y-v.y,dz=this.z-v.z;return dx*dx+dy*dy+dz*dz}manhattanDistanceTo(v){return Math.abs(this.x-v.x)+Math.abs(this.y-v.y)+Math.abs(this.z-v.z)}setFromSpherical(s){return this.setFromSphericalCoords(s.radius,s.phi,s.theta)}setFromSphericalCoords(radius,phi,theta){const sinPhiRadius=Math.sin(phi)*radius;this.x=sinPhiRadius*Math.sin(theta);this.y=Math.cos(phi)*radius;this.z=sinPhiRadius*Math.cos(theta);return this}setFromCylindrical(c){return this.setFromCylindricalCoords(c.radius,c.theta,c.y)}setFromCylindricalCoords(radius,theta,y){this.x=radius*Math.sin(theta);this.y=y;this.z=radius*Math.cos(theta);return this}setFromMatrixPosition(m){const e=m.elements;this.x=e[12];this.y=e[13];this.z=e[14];return this}setFromMatrixScale(m){const sx=this.setFromMatrixColumn(m,0).length();const sy=this.setFromMatrixColumn(m,1).length();const sz=this.setFromMatrixColumn(m,2).length();this.x=sx;this.y=sy;this.z=sz;return this}setFromMatrixColumn(m,index){return this.fromArray(m.elements,index*4)}setFromMatrix3Column(m,index){return this.fromArray(m.elements,index*3)}setFromEuler(e){this.x=e._x;this.y=e._y;this.z=e._z;return this}setFromColor(c){this.x=c.r;this.y=c.g;this.z=c.b;return this}equals(v){return v.x===this.x&&v.y===this.y&&v.z===this.z}fromArray(array,offset=0){this.x=array[offset];this.y=array[offset+1];this.z=array[offset+2];return this}toArray(array=[],offset=0){array[offset]=this.x;array[offset+1]=this.y;array[offset+2]=this.z;return array}fromBufferAttribute(attribute,index){this.x=attribute.getX(index);this.y=attribute.getY(index);this.z=attribute.getZ(index);return this}random(){this.x=Math.random();this.y=Math.random();this.z=Math.random();return this}randomDirection(){const theta=Math.random()*Math.PI*2;const u=Math.random()*2-1;const c=Math.sqrt(1-u*u);this.x=c*Math.cos(theta);this.y=u;this.z=c*Math.sin(theta);return this}*[Symbol.iterator](){yield this.x;yield this.y;yield this.z}}const _vector$c=new Vector3;const _quaternion$4=new Quaternion;class Box3{constructor(min=new Vector3(+Infinity,+Infinity,+Infinity),max=new Vector3(-Infinity,-Infinity,-Infinity)){this.isBox3=true;this.min=min;this.max=max}set(min,max){this.min.copy(min);this.max.copy(max);return this}setFromArray(array){this.makeEmpty();for(let i=0,il=array.length;i<il;i+=3){this.expandByPoint(_vector$b.fromArray(array,i))}return this}setFromBufferAttribute(attribute){this.makeEmpty();for(let i=0,il=attribute.count;i<il;i++){this.expandByPoint(_vector$b.fromBufferAttribute(attribute,i))}return this}setFromPoints(points){this.makeEmpty();for(let i=0,il=points.length;i<il;i++){this.expandByPoint(points[i])}return this}setFromCenterAndSize(center,size){const halfSize=_vector$b.copy(size).multiplyScalar(0.5);this.min.copy(center).sub(halfSize);this.max.copy(center).add(halfSize);return this}setFromObject(object,precise=false){this.makeEmpty();return this.expandByObject(object,precise)}clone(){return new this.constructor().copy(this)}copy(box){this.min.copy(box.min);this.max.copy(box.max);return this}makeEmpty(){this.min.x=this.min.y=this.min.z=+Infinity;this.max.x=this.max.y=this.max.z=-Infinity;return this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(target){return this.isEmpty()?target.set(0,0,0):target.addVectors(this.min,this.max).multiplyScalar(0.5)}getSize(target){return this.isEmpty()?target.set(0,0,0):target.subVectors(this.max,this.min)}expandByPoint(point){this.min.min(point);this.max.max(point);return this}expandByVector(vector){this.min.sub(vector);this.max.add(vector);return this}expandByScalar(scalar){this.min.addScalar(-scalar);this.max.addScalar(scalar);return this}expandByObject(object,precise=false){object.updateWorldMatrix(false,false);const geometry=object.geometry;if(geometry!==undefined){const positionAttribute=geometry.getAttribute("position");if(precise===true&&positionAttribute!==undefined&&object.isInstancedMesh!==true){for(let i=0,l=positionAttribute.count;i<l;i++){if(object.isMesh===true){object.getVertexPosition(i,_vector$b)}else{_vector$b.fromBufferAttribute(positionAttribute,i)}_vector$b.applyMatrix4(object.matrixWorld);this.expandByPoint(_vector$b)}}else{if(object.boundingBox!==undefined){if(object.boundingBox===null){object.computeBoundingBox()}_box$4.copy(object.boundingBox)}else{if(geometry.boundingBox===null){geometry.computeBoundingBox()}_box$4.copy(geometry.boundingBox)}_box$4.applyMatrix4(object.matrixWorld);this.union(_box$4)}}const children=object.children;for(let i=0,l=children.length;i<l;i++){this.expandByObject(children[i],precise)}return this}containsPoint(point){return point.x>=this.min.x&&point.x<=this.max.x&&point.y>=this.min.y&&point.y<=this.max.y&&point.z>=this.min.z&&point.z<=this.max.z}containsBox(box){return this.min.x<=box.min.x&&box.max.x<=this.max.x&&this.min.y<=box.min.y&&box.max.y<=this.max.y&&this.min.z<=box.min.z&&box.max.z<=this.max.z}getParameter(point,target){return target.set((point.x-this.min.x)/(this.max.x-this.min.x),(point.y-this.min.y)/(this.max.y-this.min.y),(point.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(box){return box.max.x>=this.min.x&&box.min.x<=this.max.x&&box.max.y>=this.min.y&&box.min.y<=this.max.y&&box.max.z>=this.min.z&&box.min.z<=this.max.z}intersectsSphere(sphere){this.clampPoint(sphere.center,_vector$b);return _vector$b.distanceToSquared(sphere.center)<=sphere.radius*sphere.radius}intersectsPlane(plane){let min,max;if(plane.normal.x>0){min=plane.normal.x*this.min.x;max=plane.normal.x*this.max.x}else{min=plane.normal.x*this.max.x;max=plane.normal.x*this.min.x}if(plane.normal.y>0){min+=plane.normal.y*this.min.y;max+=plane.normal.y*this.max.y}else{min+=plane.normal.y*this.max.y;max+=plane.normal.y*this.min.y}if(plane.normal.z>0){min+=plane.normal.z*this.min.z;max+=plane.normal.z*this.max.z}else{min+=plane.normal.z*this.max.z;max+=plane.normal.z*this.min.z}return min<=-plane.constant&&max>=-plane.constant}intersectsTriangle(triangle){if(this.isEmpty()){return false}this.getCenter(_center);_extents.subVectors(this.max,_center);_v0$3.subVectors(triangle.a,_center);_v1$7.subVectors(triangle.b,_center);_v2$4.subVectors(triangle.c,_center);_f0.subVectors(_v1$7,_v0$3);_f1.subVectors(_v2$4,_v1$7);_f2.subVectors(_v0$3,_v2$4);let axes=[0,-_f0.z,_f0.y,0,-_f1.z,_f1.y,0,-_f2.z,_f2.y,_f0.z,0,-_f0.x,_f1.z,0,-_f1.x,_f2.z,0,-_f2.x,-_f0.y,_f0.x,0,-_f1.y,_f1.x,0,-_f2.y,_f2.x,0];if(!satForAxes(axes,_v0$3,_v1$7,_v2$4,_extents)){return false}axes=[1,0,0,0,1,0,0,0,1];if(!satForAxes(axes,_v0$3,_v1$7,_v2$4,_extents)){return false}_triangleNormal.crossVectors(_f0,_f1);axes=[_triangleNormal.x,_triangleNormal.y,_triangleNormal.z];return satForAxes(axes,_v0$3,_v1$7,_v2$4,_extents)}clampPoint(point,target){return target.copy(point).clamp(this.min,this.max)}distanceToPoint(point){return this.clampPoint(point,_vector$b).distanceTo(point)}getBoundingSphere(target){if(this.isEmpty()){target.makeEmpty()}else{this.getCenter(target.center);target.radius=this.getSize(_vector$b).length()*0.5}return target}intersect(box){this.min.max(box.min);this.max.min(box.max);if(this.isEmpty())this.makeEmpty();return this}union(box){this.min.min(box.min);this.max.max(box.max);return this}applyMatrix4(matrix){if(this.isEmpty())return this;_points[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(matrix);_points[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(matrix);_points[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(matrix);_points[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(matrix);_points[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(matrix);_points[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(matrix);_points[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(matrix);_points[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(matrix);this.setFromPoints(_points);return this}translate(offset){this.min.add(offset);this.max.add(offset);return this}equals(box){return box.min.equals(this.min)&&box.max.equals(this.max)}}const _points=[new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3,new Vector3];const _vector$b=new Vector3;const _box$4=new Box3;const _v0$3=new Vector3;const _v1$7=new Vector3;const _v2$4=new Vector3;const _f0=new Vector3;const _f1=new Vector3;const _f2=new Vector3;const _center=new Vector3;const _extents=new Vector3;const _triangleNormal=new Vector3;const _testAxis=new Vector3;function satForAxes(axes,v0,v1,v2,extents){for(let i=0,j=axes.length-3;i<=j;i+=3){_testAxis.fromArray(axes,i);const r=extents.x*Math.abs(_testAxis.x)+extents.y*Math.abs(_testAxis.y)+extents.z*Math.abs(_testAxis.z);const p0=v0.dot(_testAxis);const p1=v1.dot(_testAxis);const p2=v2.dot(_testAxis);if(Math.max(-Math.max(p0,p1,p2),Math.min(p0,p1,p2))>r){return false}}return true}const _box$3=new Box3;const _v1$6=new Vector3;const _v2$3=new Vector3;class Sphere{constructor(center=new Vector3,radius=-1){this.isSphere=true;this.center=center;this.radius=radius}set(center,radius){this.center.copy(center);this.radius=radius;return this}setFromPoints(points,optionalCenter){const center=this.center;if(optionalCenter!==undefined){center.copy(optionalCenter)}else{_box$3.setFromPoints(points).getCenter(center)}let maxRadiusSq=0;for(let i=0,il=points.length;i<il;i++){maxRadiusSq=Math.max(maxRadiusSq,center.distanceToSquared(points[i]))}this.radius=Math.sqrt(maxRadiusSq);return this}copy(sphere){this.center.copy(sphere.center);this.radius=sphere.radius;return this}isEmpty(){return this.radius<0}makeEmpty(){this.center.set(0,0,0);this.radius=-1;return this}containsPoint(point){return point.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(point){return point.distanceTo(this.center)-this.radius}intersectsSphere(sphere){const radiusSum=this.radius+sphere.radius;return sphere.center.distanceToSquared(this.center)<=radiusSum*radiusSum}intersectsBox(box){return box.intersectsSphere(this)}intersectsPlane(plane){return Math.abs(plane.distanceToPoint(this.center))<=this.radius}clampPoint(point,target){const deltaLengthSq=this.center.distanceToSquared(point);target.copy(point);if(deltaLengthSq>this.radius*this.radius){target.sub(this.center).normalize();target.multiplyScalar(this.radius).add(this.center)}return target}getBoundingBox(target){if(this.isEmpty()){target.makeEmpty();return target}target.set(this.center,this.center);target.expandByScalar(this.radius);return target}applyMatrix4(matrix){this.center.applyMatrix4(matrix);this.radius=this.radius*matrix.getMaxScaleOnAxis();return this}translate(offset){this.center.add(offset);return this}expandByPoint(point){if(this.isEmpty()){this.center.copy(point);this.radius=0;return this}_v1$6.subVectors(point,this.center);const lengthSq=_v1$6.lengthSq();if(lengthSq>this.radius*this.radius){const length=Math.sqrt(lengthSq);const delta=(length-this.radius)*0.5;this.center.addScaledVector(_v1$6,delta/length);this.radius+=delta}return this}union(sphere){if(sphere.isEmpty()){return this}if(this.isEmpty()){this.copy(sphere);return this}if(this.center.equals(sphere.center)===true){this.radius=Math.max(this.radius,sphere.radius)}else{_v2$3.subVectors(sphere.center,this.center).setLength(sphere.radius);this.expandByPoint(_v1$6.copy(sphere.center).add(_v2$3));this.expandByPoint(_v1$6.copy(sphere.center).sub(_v2$3))}return this}equals(sphere){return sphere.center.equals(this.center)&&sphere.radius===this.radius}clone(){return new this.constructor().copy(this)}}const _vector$a=new Vector3;const _segCenter=new Vector3;const _segDir=new Vector3;const _diff=new Vector3;const _edge1=new Vector3;const _edge2=new Vector3;const _normal$1=new Vector3;class Ray{constructor(origin=new Vector3,direction=new Vector3(0,0,-1)){this.origin=origin;this.direction=direction}set(origin,direction){this.origin.copy(origin);this.direction.copy(direction);return this}copy(ray){this.origin.copy(ray.origin);this.direction.copy(ray.direction);return this}at(t,target){return target.copy(this.origin).addScaledVector(this.direction,t)}lookAt(v){this.direction.copy(v).sub(this.origin).normalize();return this}recast(t){this.origin.copy(this.at(t,_vector$a));return this}closestPointToPoint(point,target){target.subVectors(point,this.origin);const directionDistance=target.dot(this.direction);if(directionDistance<0){return target.copy(this.origin)}return target.copy(this.origin).addScaledVector(this.direction,directionDistance)}distanceToPoint(point){return Math.sqrt(this.distanceSqToPoint(point))}distanceSqToPoint(point){const directionDistance=_vector$a.subVectors(point,this.origin).dot(this.direction);if(directionDistance<0){return this.origin.distanceToSquared(point)}_vector$a.copy(this.origin).addScaledVector(this.direction,directionDistance);return _vector$a.distanceToSquared(point)}distanceSqToSegment(v0,v1,optionalPointOnRay,optionalPointOnSegment){_segCenter.copy(v0).add(v1).multiplyScalar(0.5);_segDir.copy(v1).sub(v0).normalize();_diff.copy(this.origin).sub(_segCenter);const segExtent=v0.distanceTo(v1)*0.5;const a01=-this.direction.dot(_segDir);const b0=_diff.dot(this.direction);const b1=-_diff.dot(_segDir);const c=_diff.lengthSq();const det=Math.abs(1-a01*a01);let s0,s1,sqrDist,extDet;if(det>0){s0=a01*b1-b0;s1=a01*b0-b1;extDet=segExtent*det;if(s0>=0){if(s1>=-extDet){if(s1<=extDet){const invDet=1/det;s0*=invDet;s1*=invDet;sqrDist=s0*(s0+a01*s1+2*b0)+s1*(a01*s0+s1+2*b1)+c}else{s1=segExtent;s0=Math.max(0,-(a01*s1+b0));sqrDist=-s0*s0+s1*(s1+2*b1)+c}}else{s1=-segExtent;s0=Math.max(0,-(a01*s1+b0));sqrDist=-s0*s0+s1*(s1+2*b1)+c}}else{if(s1<=-extDet){s0=Math.max(0,-(-a01*segExtent+b0));s1=s0>0?-segExtent:Math.min(Math.max(-segExtent,-b1),segExtent);sqrDist=-s0*s0+s1*(s1+2*b1)+c}else if(s1<=extDet){s0=0;s1=Math.min(Math.max(-segExtent,-b1),segExtent);sqrDist=s1*(s1+2*b1)+c}else{s0=Math.max(0,-(a01*segExtent+b0));s1=s0>0?segExtent:Math.min(Math.max(-segExtent,-b1),segExtent);sqrDist=-s0*s0+s1*(s1+2*b1)+c}}}else{s1=a01>0?-segExtent:segExtent;s0=Math.max(0,-(a01*s1+b0));sqrDist=-s0*s0+s1*(s1+2*b1)+c}if(optionalPointOnRay){optionalPointOnRay.copy(this.origin).addScaledVector(this.direction,s0)}if(optionalPointOnSegment){optionalPointOnSegment.copy(_segCenter).addScaledVector(_segDir,s1)}return sqrDist}intersectSphere(sphere,target){_vector$a.subVectors(sphere.center,this.origin);const tca=_vector$a.dot(this.direction);const d2=_vector$a.dot(_vector$a)-tca*tca;const radius2=sphere.radius*sphere.radius;if(d2>radius2)return null;const thc=Math.sqrt(radius2-d2);const t0=tca-thc;const t1=tca+thc;if(t1<0)return null;if(t0<0)return this.at(t1,target);return this.at(t0,target)}intersectsSphere(sphere){return this.distanceSqToPoint(sphere.center)<=sphere.radius*sphere.radius}distanceToPlane(plane){const denominator=plane.normal.dot(this.direction);if(denominator===0){if(plane.distanceToPoint(this.origin)===0){return 0}return null}const t=-(this.origin.dot(plane.normal)+plane.constant)/denominator;return t>=0?t:null}intersectPlane(plane,target){const t=this.distanceToPlane(plane);if(t===null){return null}return this.at(t,target)}intersectsPlane(plane){const distToPoint=plane.distanceToPoint(this.origin);if(distToPoint===0){return true}const denominator=plane.normal.dot(this.direction);if(denominator*distToPoint<0){return true}return false}intersectBox(box,target){let tmin,tmax,tymin,tymax,tzmin,tzmax;const invdirx=1/this.direction.x,invdiry=1/this.direction.y,invdirz=1/this.direction.z;const origin=this.origin;if(invdirx>=0){tmin=(box.min.x-origin.x)*invdirx;tmax=(box.max.x-origin.x)*invdirx}else{tmin=(box.max.x-origin.x)*invdirx;tmax=(box.min.x-origin.x)*invdirx}if(invdiry>=0){tymin=(box.min.y-origin.y)*invdiry;tymax=(box.max.y-origin.y)*invdiry}else{tymin=(box.max.y-origin.y)*invdiry;tymax=(box.min.y-origin.y)*invdiry}if(tmin>tymax||tymin>tmax)return null;if(tymin>tmin||isNaN(tmin))tmin=tymin;if(tymax<tmax||isNaN(tmax))tmax=tymax;if(invdirz>=0){tzmin=(box.min.z-origin.z)*invdirz;tzmax=(box.max.z-origin.z)*invdirz}else{tzmin=(box.max.z-origin.z)*invdirz;tzmax=(box.min.z-origin.z)*invdirz}if(tmin>tzmax||tzmin>tmax)return null;if(tzmin>tmin||tmin!==tmin)tmin=tzmin;if(tzmax<tmax||tmax!==tmax)tmax=tzmax;if(tmax<0)return null;return this.at(tmin>=0?tmin:tmax,target)}intersectsBox(box){return this.intersectBox(box,_vector$a)!==null}intersectTriangle(a,b,c,backfaceCulling,target){_edge1.subVectors(b,a);_edge2.subVectors(c,a);_normal$1.crossVectors(_edge1,_edge2);let DdN=this.direction.dot(_normal$1);let sign;if(DdN>0){if(backfaceCulling)return null;sign=1}else if(DdN<0){sign=-1;DdN=-DdN}else{return null}_diff.subVectors(this.origin,a);const DdQxE2=sign*this.direction.dot(_edge2.crossVectors(_diff,_edge2));if(DdQxE2<0){return null}const DdE1xQ=sign*this.direction.dot(_edge1.cross(_diff));if(DdE1xQ<0){return null}if(DdQxE2+DdE1xQ>DdN){return null}const QdN=-sign*_diff.dot(_normal$1);if(QdN<0){return null}return this.at(QdN/DdN,target)}applyMatrix4(matrix4){this.origin.applyMatrix4(matrix4);this.direction.transformDirection(matrix4);return this}equals(ray){return ray.origin.equals(this.origin)&&ray.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Matrix4{constructor(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44){Matrix4.prototype.isMatrix4=true;this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];if(n11!==undefined){this.set(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44)}}set(n11,n12,n13,n14,n21,n22,n23,n24,n31,n32,n33,n34,n41,n42,n43,n44){const te=this.elements;te[0]=n11;te[4]=n12;te[8]=n13;te[12]=n14;te[1]=n21;te[5]=n22;te[9]=n23;te[13]=n24;te[2]=n31;te[6]=n32;te[10]=n33;te[14]=n34;te[3]=n41;te[7]=n42;te[11]=n43;te[15]=n44;return this}identity(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this}clone(){return new Matrix4().fromArray(this.elements)}copy(m){const te=this.elements;const me=m.elements;te[0]=me[0];te[1]=me[1];te[2]=me[2];te[3]=me[3];te[4]=me[4];te[5]=me[5];te[6]=me[6];te[7]=me[7];te[8]=me[8];te[9]=me[9];te[10]=me[10];te[11]=me[11];te[12]=me[12];te[13]=me[13];te[14]=me[14];te[15]=me[15];return this}copyPosition(m){const te=this.elements,me=m.elements;te[12]=me[12];te[13]=me[13];te[14]=me[14];return this}setFromMatrix3(m){const me=m.elements;this.set(me[0],me[3],me[6],0,me[1],me[4],me[7],0,me[2],me[5],me[8],0,0,0,0,1);return this}extractBasis(xAxis,yAxis,zAxis){xAxis.setFromMatrixColumn(this,0);yAxis.setFromMatrixColumn(this,1);zAxis.setFromMatrixColumn(this,2);return this}makeBasis(xAxis,yAxis,zAxis){this.set(xAxis.x,yAxis.x,zAxis.x,0,xAxis.y,yAxis.y,zAxis.y,0,xAxis.z,yAxis.z,zAxis.z,0,0,0,0,1);return this}extractRotation(m){const te=this.elements;const me=m.elements;const scaleX=1/_v1$5.setFromMatrixColumn(m,0).length();const scaleY=1/_v1$5.setFromMatrixColumn(m,1).length();const scaleZ=1/_v1$5.setFromMatrixColumn(m,2).length();te[0]=me[0]*scaleX;te[1]=me[1]*scaleX;te[2]=me[2]*scaleX;te[3]=0;te[4]=me[4]*scaleY;te[5]=me[5]*scaleY;te[6]=me[6]*scaleY;te[7]=0;te[8]=me[8]*scaleZ;te[9]=me[9]*scaleZ;te[10]=me[10]*scaleZ;te[11]=0;te[12]=0;te[13]=0;te[14]=0;te[15]=1;return this}makeRotationFromEuler(euler){const te=this.elements;const x=euler.x,y=euler.y,z=euler.z;const a=Math.cos(x),b=Math.sin(x);const c=Math.cos(y),d=Math.sin(y);const e=Math.cos(z),f=Math.sin(z);if(euler.order==="XYZ"){const ae=a*e,af=a*f,be=b*e,bf=b*f;te[0]=c*e;te[4]=-c*f;te[8]=d;te[1]=af+be*d;te[5]=ae-bf*d;te[9]=-b*c;te[2]=bf-ae*d;te[6]=be+af*d;te[10]=a*c}else if(euler.order==="YXZ"){const ce=c*e,cf=c*f,de=d*e,df=d*f;te[0]=ce+df*b;te[4]=de*b-cf;te[8]=a*d;te[1]=a*f;te[5]=a*e;te[9]=-b;te[2]=cf*b-de;te[6]=df+ce*b;te[10]=a*c}else if(euler.order==="ZXY"){const ce=c*e,cf=c*f,de=d*e,df=d*f;te[0]=ce-df*b;te[4]=-a*f;te[8]=de+cf*b;te[1]=cf+de*b;te[5]=a*e;te[9]=df-ce*b;te[2]=-a*d;te[6]=b;te[10]=a*c}else if(euler.order==="ZYX"){const ae=a*e,af=a*f,be=b*e,bf=b*f;te[0]=c*e;te[4]=be*d-af;te[8]=ae*d+bf;te[1]=c*f;te[5]=bf*d+ae;te[9]=af*d-be;te[2]=-d;te[6]=b*c;te[10]=a*c}else if(euler.order==="YZX"){const ac=a*c,ad=a*d,bc=b*c,bd=b*d;te[0]=c*e;te[4]=bd-ac*f;te[8]=bc*f+ad;te[1]=f;te[5]=a*e;te[9]=-b*e;te[2]=-d*e;te[6]=ad*f+bc;te[10]=ac-bd*f}else if(euler.order==="XZY"){const ac=a*c,ad=a*d,bc=b*c,bd=b*d;te[0]=c*e;te[4]=-f;te[8]=d*e;te[1]=ac*f+bd;te[5]=a*e;te[9]=ad*f-bc;te[2]=bc*f-ad;te[6]=b*e;te[10]=bd*f+ac}te[3]=0;te[7]=0;te[11]=0;te[12]=0;te[13]=0;te[14]=0;te[15]=1;return this}makeRotationFromQuaternion(q){return this.compose(_zero,q,_one)}lookAt(eye,target,up){const te=this.elements;_z.subVectors(eye,target);if(_z.lengthSq()===0){_z.z=1}_z.normalize();_x.crossVectors(up,_z);if(_x.lengthSq()===0){if(Math.abs(up.z)===1){_z.x+=0.0001}else{_z.z+=0.0001}_z.normalize();_x.crossVectors(up,_z)}_x.normalize();_y.crossVectors(_z,_x);te[0]=_x.x;te[4]=_y.x;te[8]=_z.x;te[1]=_x.y;te[5]=_y.y;te[9]=_z.y;te[2]=_x.z;te[6]=_y.z;te[10]=_z.z;return this}multiply(m){return this.multiplyMatrices(this,m)}premultiply(m){return this.multiplyMatrices(m,this)}multiplyMatrices(a,b){const ae=a.elements;const be=b.elements;const te=this.elements;const a11=ae[0],a12=ae[4],a13=ae[8],a14=ae[12];const a21=ae[1],a22=ae[5],a23=ae[9],a24=ae[13];const a31=ae[2],a32=ae[6],a33=ae[10],a34=ae[14];const a41=ae[3],a42=ae[7],a43=ae[11],a44=ae[15];const b11=be[0],b12=be[4],b13=be[8],b14=be[12];const b21=be[1],b22=be[5],b23=be[9],b24=be[13];const b31=be[2],b32=be[6],b33=be[10],b34=be[14];const b41=be[3],b42=be[7],b43=be[11],b44=be[15];te[0]=a11*b11+a12*b21+a13*b31+a14*b41;te[4]=a11*b12+a12*b22+a13*b32+a14*b42;te[8]=a11*b13+a12*b23+a13*b33+a14*b43;te[12]=a11*b14+a12*b24+a13*b34+a14*b44;te[1]=a21*b11+a22*b21+a23*b31+a24*b41;te[5]=a21*b12+a22*b22+a23*b32+a24*b42;te[9]=a21*b13+a22*b23+a23*b33+a24*b43;te[13]=a21*b14+a22*b24+a23*b34+a24*b44;te[2]=a31*b11+a32*b21+a33*b31+a34*b41;te[6]=a31*b12+a32*b22+a33*b32+a34*b42;te[10]=a31*b13+a32*b23+a33*b33+a34*b43;te[14]=a31*b14+a32*b24+a33*b34+a34*b44;te[3]=a41*b11+a42*b21+a43*b31+a44*b41;te[7]=a41*b12+a42*b22+a43*b32+a44*b42;te[11]=a41*b13+a42*b23+a43*b33+a44*b43;te[15]=a41*b14+a42*b24+a43*b34+a44*b44;return this}multiplyScalar(s){const te=this.elements;te[0]*=s;te[4]*=s;te[8]*=s;te[12]*=s;te[1]*=s;te[5]*=s;te[9]*=s;te[13]*=s;te[2]*=s;te[6]*=s;te[10]*=s;te[14]*=s;te[3]*=s;te[7]*=s;te[11]*=s;te[15]*=s;return this}determinant(){const te=this.elements;const n11=te[0],n12=te[4],n13=te[8],n14=te[12];const n21=te[1],n22=te[5],n23=te[9],n24=te[13];const n31=te[2],n32=te[6],n33=te[10],n34=te[14];const n41=te[3],n42=te[7],n43=te[11],n44=te[15];return n41*(+n14*n23*n32-n13*n24*n32-n14*n22*n33+n12*n24*n33+n13*n22*n34-n12*n23*n34)+n42*(+n11*n23*n34-n11*n24*n33+n14*n21*n33-n13*n21*n34+n13*n24*n31-n14*n23*n31)+n43*(+n11*n24*n32-n11*n22*n34-n14*n21*n32+n12*n21*n34+n14*n22*n31-n12*n24*n31)+n44*(-n13*n22*n31-n11*n23*n32+n11*n22*n33+n13*n21*n32-n12*n21*n33+n12*n23*n31)}transpose(){const te=this.elements;let tmp;tmp=te[1];te[1]=te[4];te[4]=tmp;tmp=te[2];te[2]=te[8];te[8]=tmp;tmp=te[6];te[6]=te[9];te[9]=tmp;tmp=te[3];te[3]=te[12];te[12]=tmp;tmp=te[7];te[7]=te[13];te[13]=tmp;tmp=te[11];te[11]=te[14];te[14]=tmp;return this}setPosition(x,y,z){const te=this.elements;if(x.isVector3){te[12]=x.x;te[13]=x.y;te[14]=x.z}else{te[12]=x;te[13]=y;te[14]=z}return this}invert(){const te=this.elements,n11=te[0],n21=te[1],n31=te[2],n41=te[3],n12=te[4],n22=te[5],n32=te[6],n42=te[7],n13=te[8],n23=te[9],n33=te[10],n43=te[11],n14=te[12],n24=te[13],n34=te[14],n44=te[15],t11=n23*n34*n42-n24*n33*n42+n24*n32*n43-n22*n34*n43-n23*n32*n44+n22*n33*n44,t12=n14*n33*n42-n13*n34*n42-n14*n32*n43+n12*n34*n43+n13*n32*n44-n12*n33*n44,t13=n13*n24*n42-n14*n23*n42+n14*n22*n43-n12*n24*n43-n13*n22*n44+n12*n23*n44,t14=n14*n23*n32-n13*n24*n32-n14*n22*n33+n12*n24*n33+n13*n22*n34-n12*n23*n34;const det=n11*t11+n21*t12+n31*t13+n41*t14;if(det===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const detInv=1/det;te[0]=t11*detInv;te[1]=(n24*n33*n41-n23*n34*n41-n24*n31*n43+n21*n34*n43+n23*n31*n44-n21*n33*n44)*detInv;te[2]=(n22*n34*n41-n24*n32*n41+n24*n31*n42-n21*n34*n42-n22*n31*n44+n21*n32*n44)*detInv;te[3]=(n23*n32*n41-n22*n33*n41-n23*n31*n42+n21*n33*n42+n22*n31*n43-n21*n32*n43)*detInv;te[4]=t12*detInv;te[5]=(n13*n34*n41-n14*n33*n41+n14*n31*n43-n11*n34*n43-n13*n31*n44+n11*n33*n44)*detInv;te[6]=(n14*n32*n41-n12*n34*n41-n14*n31*n42+n11*n34*n42+n12*n31*n44-n11*n32*n44)*detInv;te[7]=(n12*n33*n41-n13*n32*n41+n13*n31*n42-n11*n33*n42-n12*n31*n43+n11*n32*n43)*detInv;te[8]=t13*detInv;te[9]=(n14*n23*n41-n13*n24*n41-n14*n21*n43+n11*n24*n43+n13*n21*n44-n11*n23*n44)*detInv;te[10]=(n12*n24*n41-n14*n22*n41+n14*n21*n42-n11*n24*n42-n12*n21*n44+n11*n22*n44)*detInv;te[11]=(n13*n22*n41-n12*n23*n41-n13*n21*n42+n11*n23*n42+n12*n21*n43-n11*n22*n43)*detInv;te[12]=t14*detInv;te[13]=(n13*n24*n31-n14*n23*n31+n14*n21*n33-n11*n24*n33-n13*n21*n34+n11*n23*n34)*detInv;te[14]=(n14*n22*n31-n12*n24*n31-n14*n21*n32+n11*n24*n32+n12*n21*n34-n11*n22*n34)*detInv;te[15]=(n12*n23*n31-n13*n22*n31+n13*n21*n32-n11*n23*n32-n12*n21*n33+n11*n22*n33)*detInv;return this}scale(v){const te=this.elements;const x=v.x,y=v.y,z=v.z;te[0]*=x;te[4]*=y;te[8]*=z;te[1]*=x;te[5]*=y;te[9]*=z;te[2]*=x;te[6]*=y;te[10]*=z;te[3]*=x;te[7]*=y;te[11]*=z;return this}getMaxScaleOnAxis(){const te=this.elements;const scaleXSq=te[0]*te[0]+te[1]*te[1]+te[2]*te[2];const scaleYSq=te[4]*te[4]+te[5]*te[5]+te[6]*te[6];const scaleZSq=te[8]*te[8]+te[9]*te[9]+te[10]*te[10];return Math.sqrt(Math.max(scaleXSq,scaleYSq,scaleZSq))}makeTranslation(x,y,z){if(x.isVector3){this.set(1,0,0,x.x,0,1,0,x.y,0,0,1,x.z,0,0,0,1)}else{this.set(1,0,0,x,0,1,0,y,0,0,1,z,0,0,0,1)}return this}makeRotationX(theta){const c=Math.cos(theta),s=Math.sin(theta);this.set(1,0,0,0,0,c,-s,0,0,s,c,0,0,0,0,1);return this}makeRotationY(theta){const c=Math.cos(theta),s=Math.sin(theta);this.set(c,0,s,0,0,1,0,0,-s,0,c,0,0,0,0,1);return this}makeRotationZ(theta){const c=Math.cos(theta),s=Math.sin(theta);this.set(c,-s,0,0,s,c,0,0,0,0,1,0,0,0,0,1);return this}makeRotationAxis(axis,angle){const c=Math.cos(angle);const s=Math.sin(angle);const t=1-c;const x=axis.x,y=axis.y,z=axis.z;const tx=t*x,ty=t*y;this.set(tx*x+c,tx*y-s*z,tx*z+s*y,0,tx*y+s*z,ty*y+c,ty*z-s*x,0,tx*z-s*y,ty*z+s*x,t*z*z+c,0,0,0,0,1);return this}makeScale(x,y,z){this.set(x,0,0,0,0,y,0,0,0,0,z,0,0,0,0,1);return this}makeShear(xy,xz,yx,yz,zx,zy){this.set(1,yx,zx,0,xy,1,zy,0,xz,yz,1,0,0,0,0,1);return this}compose(position,quaternion,scale){const te=this.elements;const x=quaternion._x,y=quaternion._y,z=quaternion._z,w=quaternion._w;const x2=x+x,y2=y+y,z2=z+z;const xx=x*x2,xy=x*y2,xz=x*z2;const yy=y*y2,yz=y*z2,zz=z*z2;const wx=w*x2,wy=w*y2,wz=w*z2;const sx=scale.x,sy=scale.y,sz=scale.z;te[0]=(1-(yy+zz))*sx;te[1]=(xy+wz)*sx;te[2]=(xz-wy)*sx;te[3]=0;te[4]=(xy-wz)*sy;te[5]=(1-(xx+zz))*sy;te[6]=(yz+wx)*sy;te[7]=0;te[8]=(xz+wy)*sz;te[9]=(yz-wx)*sz;te[10]=(1-(xx+yy))*sz;te[11]=0;te[12]=position.x;te[13]=position.y;te[14]=position.z;te[15]=1;return this}decompose(position,quaternion,scale){const te=this.elements;let sx=_v1$5.set(te[0],te[1],te[2]).length();const sy=_v1$5.set(te[4],te[5],te[6]).length();const sz=_v1$5.set(te[8],te[9],te[10]).length();const det=this.determinant();if(det<0)sx=-sx;position.x=te[12];position.y=te[13];position.z=te[14];_m1$4.copy(this);const invSX=1/sx;const invSY=1/sy;const invSZ=1/sz;_m1$4.elements[0]*=invSX;_m1$4.elements[1]*=invSX;_m1$4.elements[2]*=invSX;_m1$4.elements[4]*=invSY;_m1$4.elements[5]*=invSY;_m1$4.elements[6]*=invSY;_m1$4.elements[8]*=invSZ;_m1$4.elements[9]*=invSZ;_m1$4.elements[10]*=invSZ;quaternion.setFromRotationMatrix(_m1$4);scale.x=sx;scale.y=sy;scale.z=sz;return this}makePerspective(left,right,top,bottom,near,far,coordinateSystem=WebGLCoordinateSystem){const te=this.elements;const x=2*near/(right-left);const y=2*near/(top-bottom);const a=(right+left)/(right-left);const b=(top+bottom)/(top-bottom);let c,d;if(coordinateSystem===WebGLCoordinateSystem){c=-(far+near)/(far-near);d=-2*far*near/(far-near)}else if(coordinateSystem===WebGPUCoordinateSystem){c=-far/(far-near);d=-far*near/(far-near)}else{throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+coordinateSystem)}te[0]=x;te[4]=0;te[8]=a;te[12]=0;te[1]=0;te[5]=y;te[9]=b;te[13]=0;te[2]=0;te[6]=0;te[10]=c;te[14]=d;te[3]=0;te[7]=0;te[11]=-1;te[15]=0;return this}makeOrthographic(left,right,top,bottom,near,far,coordinateSystem=WebGLCoordinateSystem){const te=this.elements;const w=1/(right-left);const h=1/(top-bottom);const p=1/(far-near);const x=(right+left)*w;const y=(top+bottom)*h;let z,zInv;if(coordinateSystem===WebGLCoordinateSystem){z=(far+near)*p;zInv=-2*p}else if(coordinateSystem===WebGPUCoordinateSystem){z=near*p;zInv=-1*p}else{throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+coordinateSystem)}te[0]=2*w;te[4]=0;te[8]=0;te[12]=-x;te[1]=0;te[5]=2*h;te[9]=0;te[13]=-y;te[2]=0;te[6]=0;te[10]=zInv;te[14]=-z;te[3]=0;te[7]=0;te[11]=0;te[15]=1;return this}equals(matrix){const te=this.elements;const me=matrix.elements;for(let i=0;i<16;i++){if(te[i]!==me[i])return false}return true}fromArray(array,offset=0){for(let i=0;i<16;i++){this.elements[i]=array[i+offset]}return this}toArray(array=[],offset=0){const te=this.elements;array[offset]=te[0];array[offset+1]=te[1];array[offset+2]=te[2];array[offset+3]=te[3];array[offset+4]=te[4];array[offset+5]=te[5];array[offset+6]=te[6];array[offset+7]=te[7];array[offset+8]=te[8];array[offset+9]=te[9];array[offset+10]=te[10];array[offset+11]=te[11];array[offset+12]=te[12];array[offset+13]=te[13];array[offset+14]=te[14];array[offset+15]=te[15];return array}}const _v1$5=new Vector3;const _m1$4=new Matrix4;const _zero=new Vector3(0,0,0);const _one=new Vector3(1,1,1);const _x=new Vector3;const _y=new Vector3;const _z=new Vector3;const _matrix$2=new Matrix4;const _quaternion$3=new Quaternion;class Euler{constructor(x=0,y=0,z=0,order=Euler.DEFAULT_ORDER){this.isEuler=true;this._x=x;this._y=y;this._z=z;this._order=order}get x(){return this._x}set x(value){this._x=value;this._onChangeCallback()}get y(){return this._y}set y(value){this._y=value;this._onChangeCallback()}get z(){return this._z}set z(value){this._z=value;this._onChangeCallback()}get order(){return this._order}set order(value){this._order=value;this._onChangeCallback()}set(x,y,z,order=this._order){this._x=x;this._y=y;this._z=z;this._order=order;this._onChangeCallback();return this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(euler){this._x=euler._x;this._y=euler._y;this._z=euler._z;this._order=euler._order;this._onChangeCallback();return this}setFromRotationMatrix(m,order=this._order,update=true){const te=m.elements;const m11=te[0],m12=te[4],m13=te[8];const m21=te[1],m22=te[5],m23=te[9];const m31=te[2],m32=te[6],m33=te[10];switch(order){case"XYZ":this._y=Math.asin(clamp(m13,-1,1));if(Math.abs(m13)<0.9999999){this._x=Math.atan2(-m23,m33);this._z=Math.atan2(-m12,m11)}else{this._x=Math.atan2(m32,m22);this._z=0}break;case"YXZ":this._x=Math.asin(-clamp(m23,-1,1));if(Math.abs(m23)<0.9999999){this._y=Math.atan2(m13,m33);this._z=Math.atan2(m21,m22)}else{this._y=Math.atan2(-m31,m11);this._z=0}break;case"ZXY":this._x=Math.asin(clamp(m32,-1,1));if(Math.abs(m32)<0.9999999){this._y=Math.atan2(-m31,m33);this._z=Math.atan2(-m12,m22)}else{this._y=0;this._z=Math.atan2(m21,m11)}break;case"ZYX":this._y=Math.asin(-clamp(m31,-1,1));if(Math.abs(m31)<0.9999999){this._x=Math.atan2(m32,m33);this._z=Math.atan2(m21,m11)}else{this._x=0;this._z=Math.atan2(-m12,m22)}break;case"YZX":this._z=Math.asin(clamp(m21,-1,1));if(Math.abs(m21)<0.9999999){this._x=Math.atan2(-m23,m22);this._y=Math.atan2(-m31,m11)}else{this._x=0;this._y=Math.atan2(m13,m33)}break;case"XZY":this._z=Math.asin(-clamp(m12,-1,1));if(Math.abs(m12)<0.9999999){this._x=Math.atan2(m32,m22);this._y=Math.atan2(m13,m11)}else{this._x=Math.atan2(-m23,m33);this._y=0}break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+order);}this._order=order;if(update===true)this._onChangeCallback();return this}setFromQuaternion(q,order,update){_matrix$2.makeRotationFromQuaternion(q);return this.setFromRotationMatrix(_matrix$2,order,update)}setFromVector3(v,order=this._order){return this.set(v.x,v.y,v.z,order)}reorder(newOrder){_quaternion$3.setFromEuler(this);return this.setFromQuaternion(_quaternion$3,newOrder)}equals(euler){return euler._x===this._x&&euler._y===this._y&&euler._z===this._z&&euler._order===this._order}fromArray(array){this._x=array[0];this._y=array[1];this._z=array[2];if(array[3]!==undefined)this._order=array[3];this._onChangeCallback();return this}toArray(array=[],offset=0){array[offset]=this._x;array[offset+1]=this._y;array[offset+2]=this._z;array[offset+3]=this._order;return array}_onChange(callback){this._onChangeCallback=callback;return this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x;yield this._y;yield this._z;yield this._order}}Euler.DEFAULT_ORDER="XYZ";class Layers{constructor(){this.mask=1|0}set(channel){this.mask=(1<<channel|0)>>>0}enable(channel){this.mask|=1<<channel|0}enableAll(){this.mask=4294967295|0}toggle(channel){this.mask^=1<<channel|0}disable(channel){this.mask&=~(1<<channel|0)}disableAll(){this.mask=0}test(layers){return(this.mask&layers.mask)!==0}isEnabled(channel){return(this.mask&(1<<channel|0))!==0}}let _object3DId=0;const _v1$4=new Vector3;const _q1=new Quaternion;const _m1$3=new Matrix4;const _target=new Vector3;const _position$3=new Vector3;const _scale$2=new Vector3;const _quaternion$2=new Quaternion;const _xAxis=new Vector3(1,0,0);const _yAxis=new Vector3(0,1,0);const _zAxis=new Vector3(0,0,1);const _addedEvent={type:"added"};const _removedEvent={type:"removed"};const _childaddedEvent={type:"childadded",child:null};const _childremovedEvent={type:"childremoved",child:null};class Object3D extends EventDispatcher{constructor(){super();this.isObject3D=true;Object.defineProperty(this,"id",{value:_object3DId++});this.uuid=generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=Object3D.DEFAULT_UP.clone();const position=new Vector3;const rotation=new Euler;const quaternion=new Quaternion;const scale=new Vector3(1,1,1);function onRotationChange(){quaternion.setFromEuler(rotation,false)}function onQuaternionChange(){rotation.setFromQuaternion(quaternion,undefined,false)}rotation._onChange(onRotationChange);quaternion._onChange(onQuaternionChange);Object.defineProperties(this,{position:{configurable:true,enumerable:true,value:position},rotation:{configurable:true,enumerable:true,value:rotation},quaternion:{configurable:true,enumerable:true,value:quaternion},scale:{configurable:true,enumerable:true,value:scale},modelViewMatrix:{value:new Matrix4},normalMatrix:{value:new Matrix3}});this.matrix=new Matrix4;this.matrixWorld=new Matrix4;this.matrixAutoUpdate=Object3D.DEFAULT_MATRIX_AUTO_UPDATE;this.matrixWorldAutoUpdate=Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE;this.matrixWorldNeedsUpdate=false;this.layers=new Layers;this.visible=true;this.castShadow=false;this.receiveShadow=false;this.frustumCulled=true;this.renderOrder=0;this.animations=[];this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(matrix){if(this.matrixAutoUpdate)this.updateMatrix();this.matrix.premultiply(matrix);this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(q){this.quaternion.premultiply(q);return this}setRotationFromAxisAngle(axis,angle){this.quaternion.setFromAxisAngle(axis,angle)}setRotationFromEuler(euler){this.quaternion.setFromEuler(euler,true)}setRotationFromMatrix(m){this.quaternion.setFromRotationMatrix(m)}setRotationFromQuaternion(q){this.quaternion.copy(q)}rotateOnAxis(axis,angle){_q1.setFromAxisAngle(axis,angle);this.quaternion.multiply(_q1);return this}rotateOnWorldAxis(axis,angle){_q1.setFromAxisAngle(axis,angle);this.quaternion.premultiply(_q1);return this}rotateX(angle){return this.rotateOnAxis(_xAxis,angle)}rotateY(angle){return this.rotateOnAxis(_yAxis,angle)}rotateZ(angle){return this.rotateOnAxis(_zAxis,angle)}translateOnAxis(axis,distance){_v1$4.copy(axis).applyQuaternion(this.quaternion);this.position.add(_v1$4.multiplyScalar(distance));return this}translateX(distance){return this.translateOnAxis(_xAxis,distance)}translateY(distance){return this.translateOnAxis(_yAxis,distance)}translateZ(distance){return this.translateOnAxis(_zAxis,distance)}localToWorld(vector){this.updateWorldMatrix(true,false);return vector.applyMatrix4(this.matrixWorld)}worldToLocal(vector){this.updateWorldMatrix(true,false);return vector.applyMatrix4(_m1$3.copy(this.matrixWorld).invert())}lookAt(x,y,z){if(x.isVector3){_target.copy(x)}else{_target.set(x,y,z)}const parent=this.parent;this.updateWorldMatrix(true,false);_position$3.setFromMatrixPosition(this.matrixWorld);if(this.isCamera||this.isLight){_m1$3.lookAt(_position$3,_target,this.up)}else{_m1$3.lookAt(_target,_position$3,this.up)}this.quaternion.setFromRotationMatrix(_m1$3);if(parent){_m1$3.extractRotation(parent.matrixWorld);_q1.setFromRotationMatrix(_m1$3);this.quaternion.premultiply(_q1.invert())}}add(object){if(arguments.length>1){for(let i=0;i<arguments.length;i++){this.add(arguments[i])}return this}if(object===this){console.error("THREE.Object3D.add: object can't be added as a child of itself.",object);return this}if(object&&object.isObject3D){object.removeFromParent();object.parent=this;this.children.push(object);object.dispatchEvent(_addedEvent);_childaddedEvent.child=object;this.dispatchEvent(_childaddedEvent);_childaddedEvent.child=null}else{console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",object)}return this}remove(object){if(arguments.length>1){for(let i=0;i<arguments.length;i++){this.remove(arguments[i])}return this}const index=this.children.indexOf(object);if(index!==-1){object.parent=null;this.children.splice(index,1);object.dispatchEvent(_removedEvent);_childremovedEvent.child=object;this.dispatchEvent(_childremovedEvent);_childremovedEvent.child=null}return this}removeFromParent(){const parent=this.parent;if(parent!==null){parent.remove(this)}return this}clear(){return this.remove(...this.children)}attach(object){this.updateWorldMatrix(true,false);_m1$3.copy(this.matrixWorld).invert();if(object.parent!==null){object.parent.updateWorldMatrix(true,false);_m1$3.multiply(object.parent.matrixWorld)}object.applyMatrix4(_m1$3);object.removeFromParent();object.parent=this;this.children.push(object);object.updateWorldMatrix(false,true);object.dispatchEvent(_addedEvent);_childaddedEvent.child=object;this.dispatchEvent(_childaddedEvent);_childaddedEvent.child=null;return this}getObjectById(id){return this.getObjectByProperty("id",id)}getObjectByName(name){return this.getObjectByProperty("name",name)}getObjectByProperty(name,value){if(this[name]===value)return this;for(let i=0,l=this.children.length;i<l;i++){const child=this.children[i];const object=child.getObjectByProperty(name,value);if(object!==undefined){return object}}return undefined}getObjectsByProperty(name,value,result=[]){if(this[name]===value)result.push(this);const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].getObjectsByProperty(name,value,result)}return result}getWorldPosition(target){this.updateWorldMatrix(true,false);return target.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(target){this.updateWorldMatrix(true,false);this.matrixWorld.decompose(_position$3,target,_scale$2);return target}getWorldScale(target){this.updateWorldMatrix(true,false);this.matrixWorld.decompose(_position$3,_quaternion$2,target);return target}getWorldDirection(target){this.updateWorldMatrix(true,false);const e=this.matrixWorld.elements;return target.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(callback){callback(this);const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].traverse(callback)}}traverseVisible(callback){if(this.visible===false)return;callback(this);const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].traverseVisible(callback)}}traverseAncestors(callback){const parent=this.parent;if(parent!==null){callback(parent);parent.traverseAncestors(callback)}}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);this.matrixWorldNeedsUpdate=true}updateMatrixWorld(force){if(this.matrixAutoUpdate)this.updateMatrix();if(this.matrixWorldNeedsUpdate||force){if(this.matrixWorldAutoUpdate===true){if(this.parent===null){this.matrixWorld.copy(this.matrix)}else{this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)}}this.matrixWorldNeedsUpdate=false;force=true}const children=this.children;for(let i=0,l=children.length;i<l;i++){const child=children[i];child.updateMatrixWorld(force)}}updateWorldMatrix(updateParents,updateChildren){const parent=this.parent;if(updateParents===true&&parent!==null){parent.updateWorldMatrix(true,false)}if(this.matrixAutoUpdate)this.updateMatrix();if(this.matrixWorldAutoUpdate===true){if(this.parent===null){this.matrixWorld.copy(this.matrix)}else{this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)}}if(updateChildren===true){const children=this.children;for(let i=0,l=children.length;i<l;i++){const child=children[i];child.updateWorldMatrix(false,true)}}}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";const output={};if(isRootObject){meta={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}};output.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"}}const object={};object.uuid=this.uuid;object.type=this.type;if(this.name!=="")object.name=this.name;if(this.castShadow===true)object.castShadow=true;if(this.receiveShadow===true)object.receiveShadow=true;if(this.visible===false)object.visible=false;if(this.frustumCulled===false)object.frustumCulled=false;if(this.renderOrder!==0)object.renderOrder=this.renderOrder;if(Object.keys(this.userData).length>0)object.userData=this.userData;object.layers=this.layers.mask;object.matrix=this.matrix.toArray();object.up=this.up.toArray();if(this.matrixAutoUpdate===false)object.matrixAutoUpdate=false;if(this.isInstancedMesh){object.type="InstancedMesh";object.count=this.count;object.instanceMatrix=this.instanceMatrix.toJSON();if(this.instanceColor!==null)object.instanceColor=this.instanceColor.toJSON()}if(this.isBatchedMesh){object.type="BatchedMesh";object.perObjectFrustumCulled=this.perObjectFrustumCulled;object.sortObjects=this.sortObjects;object.drawRanges=this._drawRanges;object.reservedRanges=this._reservedRanges;object.visibility=this._visibility;object.active=this._active;object.bounds=this._bounds.map(bound=>({boxInitialized:bound.boxInitialized,boxMin:bound.box.min.toArray(),boxMax:bound.box.max.toArray(),sphereInitialized:bound.sphereInitialized,sphereRadius:bound.sphere.radius,sphereCenter:bound.sphere.center.toArray()}));object.maxInstanceCount=this._maxInstanceCount;object.maxVertexCount=this._maxVertexCount;object.maxIndexCount=this._maxIndexCount;object.geometryInitialized=this._geometryInitialized;object.geometryCount=this._geometryCount;object.matricesTexture=this._matricesTexture.toJSON(meta);if(this._colorsTexture!==null)object.colorsTexture=this._colorsTexture.toJSON(meta);if(this.boundingSphere!==null){object.boundingSphere={center:object.boundingSphere.center.toArray(),radius:object.boundingSphere.radius}}if(this.boundingBox!==null){object.boundingBox={min:object.boundingBox.min.toArray(),max:object.boundingBox.max.toArray()}}}function serialize(library,element){if(library[element.uuid]===undefined){library[element.uuid]=element.toJSON(meta)}return element.uuid}if(this.isScene){if(this.background){if(this.background.isColor){object.background=this.background.toJSON()}else if(this.background.isTexture){object.background=this.background.toJSON(meta).uuid}}if(this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==true){object.environment=this.environment.toJSON(meta).uuid}}else if(this.isMesh||this.isLine||this.isPoints){object.geometry=serialize(meta.geometries,this.geometry);const parameters=this.geometry.parameters;if(parameters!==undefined&&parameters.shapes!==undefined){const shapes=parameters.shapes;if(Array.isArray(shapes)){for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];serialize(meta.shapes,shape)}}else{serialize(meta.shapes,shapes)}}}if(this.isSkinnedMesh){object.bindMode=this.bindMode;object.bindMatrix=this.bindMatrix.toArray();if(this.skeleton!==undefined){serialize(meta.skeletons,this.skeleton);object.skeleton=this.skeleton.uuid}}if(this.material!==undefined){if(Array.isArray(this.material)){const uuids=[];for(let i=0,l=this.material.length;i<l;i++){uuids.push(serialize(meta.materials,this.material[i]))}object.material=uuids}else{object.material=serialize(meta.materials,this.material)}}if(this.children.length>0){object.children=[];for(let i=0;i<this.children.length;i++){object.children.push(this.children[i].toJSON(meta).object)}}if(this.animations.length>0){object.animations=[];for(let i=0;i<this.animations.length;i++){const animation=this.animations[i];object.animations.push(serialize(meta.animations,animation))}}if(isRootObject){const geometries=extractFromCache(meta.geometries);const materials=extractFromCache(meta.materials);const textures=extractFromCache(meta.textures);const images=extractFromCache(meta.images);const shapes=extractFromCache(meta.shapes);const skeletons=extractFromCache(meta.skeletons);const animations=extractFromCache(meta.animations);const nodes=extractFromCache(meta.nodes);if(geometries.length>0)output.geometries=geometries;if(materials.length>0)output.materials=materials;if(textures.length>0)output.textures=textures;if(images.length>0)output.images=images;if(shapes.length>0)output.shapes=shapes;if(skeletons.length>0)output.skeletons=skeletons;if(animations.length>0)output.animations=animations;if(nodes.length>0)output.nodes=nodes}output.object=object;return output;function extractFromCache(cache){const values=[];for(const key in cache){const data=cache[key];delete data.metadata;values.push(data)}return values}}clone(recursive){return new this.constructor().copy(this,recursive)}copy(source,recursive=true){this.name=source.name;this.up.copy(source.up);this.position.copy(source.position);this.rotation.order=source.rotation.order;this.quaternion.copy(source.quaternion);this.scale.copy(source.scale);this.matrix.copy(source.matrix);this.matrixWorld.copy(source.matrixWorld);this.matrixAutoUpdate=source.matrixAutoUpdate;this.matrixWorldAutoUpdate=source.matrixWorldAutoUpdate;this.matrixWorldNeedsUpdate=source.matrixWorldNeedsUpdate;this.layers.mask=source.layers.mask;this.visible=source.visible;this.castShadow=source.castShadow;this.receiveShadow=source.receiveShadow;this.frustumCulled=source.frustumCulled;this.renderOrder=source.renderOrder;this.animations=source.animations.slice();this.userData=JSON.parse(JSON.stringify(source.userData));if(recursive===true){for(let i=0;i<source.children.length;i++){const child=source.children[i];this.add(child.clone())}}return this}}Object3D.DEFAULT_UP=new Vector3(0,1,0);Object3D.DEFAULT_MATRIX_AUTO_UPDATE=true;Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=true;const _v0$2=new Vector3;const _v1$3=new Vector3;const _v2$2=new Vector3;const _v3$2=new Vector3;const _vab=new Vector3;const _vac=new Vector3;const _vbc=new Vector3;const _vap=new Vector3;const _vbp=new Vector3;const _vcp=new Vector3;class Triangle{constructor(a=new Vector3,b=new Vector3,c=new Vector3){this.a=a;this.b=b;this.c=c}static getNormal(a,b,c,target){target.subVectors(c,b);_v0$2.subVectors(a,b);target.cross(_v0$2);const targetLengthSq=target.lengthSq();if(targetLengthSq>0){return target.multiplyScalar(1/Math.sqrt(targetLengthSq))}return target.set(0,0,0)}static getBarycoord(point,a,b,c,target){_v0$2.subVectors(c,a);_v1$3.subVectors(b,a);_v2$2.subVectors(point,a);const dot00=_v0$2.dot(_v0$2);const dot01=_v0$2.dot(_v1$3);const dot02=_v0$2.dot(_v2$2);const dot11=_v1$3.dot(_v1$3);const dot12=_v1$3.dot(_v2$2);const denom=dot00*dot11-dot01*dot01;if(denom===0){target.set(0,0,0);return null}const invDenom=1/denom;const u=(dot11*dot02-dot01*dot12)*invDenom;const v=(dot00*dot12-dot01*dot02)*invDenom;return target.set(1-u-v,v,u)}static containsPoint(point,a,b,c){if(this.getBarycoord(point,a,b,c,_v3$2)===null){return false}return _v3$2.x>=0&&_v3$2.y>=0&&_v3$2.x+_v3$2.y<=1}static getInterpolation(point,p1,p2,p3,v1,v2,v3,target){if(this.getBarycoord(point,p1,p2,p3,_v3$2)===null){target.x=0;target.y=0;if("z"in target)target.z=0;if("w"in target)target.w=0;return null}target.setScalar(0);target.addScaledVector(v1,_v3$2.x);target.addScaledVector(v2,_v3$2.y);target.addScaledVector(v3,_v3$2.z);return target}static isFrontFacing(a,b,c,direction){_v0$2.subVectors(c,b);_v1$3.subVectors(a,b);return _v0$2.cross(_v1$3).dot(direction)<0?true:false}set(a,b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this}setFromPointsAndIndices(points,i0,i1,i2){this.a.copy(points[i0]);this.b.copy(points[i1]);this.c.copy(points[i2]);return this}setFromAttributeAndIndices(attribute,i0,i1,i2){this.a.fromBufferAttribute(attribute,i0);this.b.fromBufferAttribute(attribute,i1);this.c.fromBufferAttribute(attribute,i2);return this}clone(){return new this.constructor().copy(this)}copy(triangle){this.a.copy(triangle.a);this.b.copy(triangle.b);this.c.copy(triangle.c);return this}getArea(){_v0$2.subVectors(this.c,this.b);_v1$3.subVectors(this.a,this.b);return _v0$2.cross(_v1$3).length()*0.5}getMidpoint(target){return target.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(target){return Triangle.getNormal(this.a,this.b,this.c,target)}getPlane(target){return target.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(point,target){return Triangle.getBarycoord(point,this.a,this.b,this.c,target)}getInterpolation(point,v1,v2,v3,target){return Triangle.getInterpolation(point,this.a,this.b,this.c,v1,v2,v3,target)}containsPoint(point){return Triangle.containsPoint(point,this.a,this.b,this.c)}isFrontFacing(direction){return Triangle.isFrontFacing(this.a,this.b,this.c,direction)}intersectsBox(box){return box.intersectsTriangle(this)}closestPointToPoint(p,target){const a=this.a,b=this.b,c=this.c;let v,w;_vab.subVectors(b,a);_vac.subVectors(c,a);_vap.subVectors(p,a);const d1=_vab.dot(_vap);const d2=_vac.dot(_vap);if(d1<=0&&d2<=0){return target.copy(a)}_vbp.subVectors(p,b);const d3=_vab.dot(_vbp);const d4=_vac.dot(_vbp);if(d3>=0&&d4<=d3){return target.copy(b)}const vc=d1*d4-d3*d2;if(vc<=0&&d1>=0&&d3<=0){v=d1/(d1-d3);return target.copy(a).addScaledVector(_vab,v)}_vcp.subVectors(p,c);const d5=_vab.dot(_vcp);const d6=_vac.dot(_vcp);if(d6>=0&&d5<=d6){return target.copy(c)}const vb=d5*d2-d1*d6;if(vb<=0&&d2>=0&&d6<=0){w=d2/(d2-d6);return target.copy(a).addScaledVector(_vac,w)}const va=d3*d6-d5*d4;if(va<=0&&d4-d3>=0&&d5-d6>=0){_vbc.subVectors(c,b);w=(d4-d3)/(d4-d3+(d5-d6));return target.copy(b).addScaledVector(_vbc,w)}const denom=1/(va+vb+vc);v=vb*denom;w=vc*denom;return target.copy(a).addScaledVector(_vab,v).addScaledVector(_vac,w)}equals(triangle){return triangle.a.equals(this.a)&&triangle.b.equals(this.b)&&triangle.c.equals(this.c)}}const _colorKeywords={"aliceblue":15792383,"antiquewhite":16444375,"aqua":65535,"aquamarine":8388564,"azure":15794175,"beige":16119260,"bisque":16770244,"black":0,"blanchedalmond":16772045,"blue":255,"blueviolet":9055202,"brown":10824234,"burlywood":14596231,"cadetblue":6266528,"chartreuse":8388352,"chocolate":13789470,"coral":16744272,"cornflowerblue":6591981,"cornsilk":16775388,"crimson":14423100,"cyan":65535,"darkblue":139,"darkcyan":35723,"darkgoldenrod":12092939,"darkgray":11119017,"darkgreen":25600,"darkgrey":11119017,"darkkhaki":12433259,"darkmagenta":9109643,"darkolivegreen":5597999,"darkorange":16747520,"darkorchid":10040012,"darkred":9109504,"darksalmon":15308410,"darkseagreen":9419919,"darkslateblue":4734347,"darkslategray":3100495,"darkslategrey":3100495,"darkturquoise":52945,"darkviolet":9699539,"deeppink":16716947,"deepskyblue":49151,"dimgray":6908265,"dimgrey":6908265,"dodgerblue":2003199,"firebrick":11674146,"floralwhite":16775920,"forestgreen":2263842,"fuchsia":16711935,"gainsboro":14474460,"ghostwhite":16316671,"gold":16766720,"goldenrod":14329120,"gray":8421504,"green":32768,"greenyellow":11403055,"grey":8421504,"honeydew":15794160,"hotpink":16738740,"indianred":13458524,"indigo":4915330,"ivory":16777200,"khaki":15787660,"lavender":15132410,"lavenderblush":16773365,"lawngreen":8190976,"lemonchiffon":16775885,"lightblue":11393254,"lightcoral":15761536,"lightcyan":14745599,"lightgoldenrodyellow":16448210,"lightgray":13882323,"lightgreen":9498256,"lightgrey":13882323,"lightpink":16758465,"lightsalmon":16752762,"lightseagreen":2142890,"lightskyblue":8900346,"lightslategray":7833753,"lightslategrey":7833753,"lightsteelblue":11584734,"lightyellow":16777184,"lime":65280,"limegreen":3329330,"linen":16445670,"magenta":16711935,"maroon":8388608,"mediumaquamarine":6737322,"mediumblue":205,"mediumorchid":12211667,"mediumpurple":9662683,"mediumseagreen":3978097,"mediumslateblue":8087790,"mediumspringgreen":64154,"mediumturquoise":4772300,"mediumvioletred":13047173,"midnightblue":1644912,"mintcream":16121850,"mistyrose":16770273,"moccasin":16770229,"navajowhite":16768685,"navy":128,"oldlace":16643558,"olive":8421376,"olivedrab":7048739,"orange":16753920,"orangered":16729344,"orchid":14315734,"palegoldenrod":15657130,"palegreen":10025880,"paleturquoise":11529966,"palevioletred":14381203,"papayawhip":16773077,"peachpuff":16767673,"peru":13468991,"pink":16761035,"plum":14524637,"powderblue":11591910,"purple":8388736,"rebeccapurple":6697881,"red":16711680,"rosybrown":12357519,"royalblue":4286945,"saddlebrown":9127187,"salmon":16416882,"sandybrown":16032864,"seagreen":3050327,"seashell":16774638,"sienna":10506797,"silver":12632256,"skyblue":8900331,"slateblue":6970061,"slategray":7372944,"slategrey":7372944,"snow":16775930,"springgreen":65407,"steelblue":4620980,"tan":13808780,"teal":32896,"thistle":14204888,"tomato":16737095,"turquoise":4251856,"violet":15631086,"wheat":16113331,"white":16777215,"whitesmoke":16119285,"yellow":16776960,"yellowgreen":10145074};const _hslA={h:0,s:0,l:0};const _hslB={h:0,s:0,l:0};function hue2rgb(p,q,t){if(t<0)t+=1;if(t>1)t-=1;if(t<1/6)return p+(q-p)*6*t;if(t<1/2)return q;if(t<2/3)return p+(q-p)*6*(2/3-t);return p}class Color{constructor(r,g,b){this.isColor=true;this.r=1;this.g=1;this.b=1;return this.set(r,g,b)}set(r,g,b){if(g===undefined&&b===undefined){const value=r;if(value&&value.isColor){this.copy(value)}else if(typeof value==="number"){this.setHex(value)}else if(typeof value==="string"){this.setStyle(value)}}else{this.setRGB(r,g,b)}return this}setScalar(scalar){this.r=scalar;this.g=scalar;this.b=scalar;return this}setHex(hex,colorSpace=SRGBColorSpace){hex=Math.floor(hex);this.r=(hex>>16&255)/255;this.g=(hex>>8&255)/255;this.b=(hex&255)/255;ColorManagement.toWorkingColorSpace(this,colorSpace);return this}setRGB(r,g,b,colorSpace=ColorManagement.workingColorSpace){this.r=r;this.g=g;this.b=b;ColorManagement.toWorkingColorSpace(this,colorSpace);return this}setHSL(h,s,l,colorSpace=ColorManagement.workingColorSpace){h=euclideanModulo(h,1);s=clamp(s,0,1);l=clamp(l,0,1);if(s===0){this.r=this.g=this.b=l}else{const p=l<=0.5?l*(1+s):l+s-l*s;const q=2*l-p;this.r=hue2rgb(q,p,h+1/3);this.g=hue2rgb(q,p,h);this.b=hue2rgb(q,p,h-1/3)}ColorManagement.toWorkingColorSpace(this,colorSpace);return this}setStyle(style,colorSpace=SRGBColorSpace){function handleAlpha(string){if(string===undefined)return;if(parseFloat(string)<1){console.warn("THREE.Color: Alpha component of "+style+" will be ignored.")}}let m;if(m=/^(\w+)\(([^\)]*)\)/.exec(style)){let color;const name=m[1];const components=m[2];switch(name){case"rgb":case"rgba":if(color=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)){handleAlpha(color[4]);return this.setRGB(Math.min(255,parseInt(color[1],10))/255,Math.min(255,parseInt(color[2],10))/255,Math.min(255,parseInt(color[3],10))/255,colorSpace)}if(color=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)){handleAlpha(color[4]);return this.setRGB(Math.min(100,parseInt(color[1],10))/100,Math.min(100,parseInt(color[2],10))/100,Math.min(100,parseInt(color[3],10))/100,colorSpace)}break;case"hsl":case"hsla":if(color=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)){handleAlpha(color[4]);return this.setHSL(parseFloat(color[1])/360,parseFloat(color[2])/100,parseFloat(color[3])/100,colorSpace)}break;default:console.warn("THREE.Color: Unknown color model "+style);}}else if(m=/^\#([A-Fa-f\d]+)$/.exec(style)){const hex=m[1];const size=hex.length;if(size===3){return this.setRGB(parseInt(hex.charAt(0),16)/15,parseInt(hex.charAt(1),16)/15,parseInt(hex.charAt(2),16)/15,colorSpace)}else if(size===6){return this.setHex(parseInt(hex,16),colorSpace)}else{console.warn("THREE.Color: Invalid hex color "+style)}}else if(style&&style.length>0){return this.setColorName(style,colorSpace)}return this}setColorName(style,colorSpace=SRGBColorSpace){const hex=_colorKeywords[style.toLowerCase()];if(hex!==undefined){this.setHex(hex,colorSpace)}else{console.warn("THREE.Color: Unknown color "+style)}return this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(color){this.r=color.r;this.g=color.g;this.b=color.b;return this}copySRGBToLinear(color){this.r=SRGBToLinear(color.r);this.g=SRGBToLinear(color.g);this.b=SRGBToLinear(color.b);return this}copyLinearToSRGB(color){this.r=LinearToSRGB(color.r);this.g=LinearToSRGB(color.g);this.b=LinearToSRGB(color.b);return this}convertSRGBToLinear(){this.copySRGBToLinear(this);return this}convertLinearToSRGB(){this.copyLinearToSRGB(this);return this}getHex(colorSpace=SRGBColorSpace){ColorManagement.fromWorkingColorSpace(_color.copy(this),colorSpace);return Math.round(clamp(_color.r*255,0,255))*65536+Math.round(clamp(_color.g*255,0,255))*256+Math.round(clamp(_color.b*255,0,255))}getHexString(colorSpace=SRGBColorSpace){return("000000"+this.getHex(colorSpace).toString(16)).slice(-6)}getHSL(target,colorSpace=ColorManagement.workingColorSpace){ColorManagement.fromWorkingColorSpace(_color.copy(this),colorSpace);const r=_color.r,g=_color.g,b=_color.b;const max=Math.max(r,g,b);const min=Math.min(r,g,b);let hue,saturation;const lightness=(min+max)/2;if(min===max){hue=0;saturation=0}else{const delta=max-min;saturation=lightness<=0.5?delta/(max+min):delta/(2-max-min);switch(max){case r:hue=(g-b)/delta+(g<b?6:0);break;case g:hue=(b-r)/delta+2;break;case b:hue=(r-g)/delta+4;break;}hue/=6}target.h=hue;target.s=saturation;target.l=lightness;return target}getRGB(target,colorSpace=ColorManagement.workingColorSpace){ColorManagement.fromWorkingColorSpace(_color.copy(this),colorSpace);target.r=_color.r;target.g=_color.g;target.b=_color.b;return target}getStyle(colorSpace=SRGBColorSpace){ColorManagement.fromWorkingColorSpace(_color.copy(this),colorSpace);const r=_color.r,g=_color.g,b=_color.b;if(colorSpace!==SRGBColorSpace){return`color(${colorSpace} ${r.toFixed(3)} ${g.toFixed(3)} ${b.toFixed(3)})`}return`rgb(${Math.round(r*255)},${Math.round(g*255)},${Math.round(b*255)})`}offsetHSL(h,s,l){this.getHSL(_hslA);return this.setHSL(_hslA.h+h,_hslA.s+s,_hslA.l+l)}add(color){this.r+=color.r;this.g+=color.g;this.b+=color.b;return this}addColors(color1,color2){this.r=color1.r+color2.r;this.g=color1.g+color2.g;this.b=color1.b+color2.b;return this}addScalar(s){this.r+=s;this.g+=s;this.b+=s;return this}sub(color){this.r=Math.max(0,this.r-color.r);this.g=Math.max(0,this.g-color.g);this.b=Math.max(0,this.b-color.b);return this}multiply(color){this.r*=color.r;this.g*=color.g;this.b*=color.b;return this}multiplyScalar(s){this.r*=s;this.g*=s;this.b*=s;return this}lerp(color,alpha){this.r+=(color.r-this.r)*alpha;this.g+=(color.g-this.g)*alpha;this.b+=(color.b-this.b)*alpha;return this}lerpColors(color1,color2,alpha){this.r=color1.r+(color2.r-color1.r)*alpha;this.g=color1.g+(color2.g-color1.g)*alpha;this.b=color1.b+(color2.b-color1.b)*alpha;return this}lerpHSL(color,alpha){this.getHSL(_hslA);color.getHSL(_hslB);const h=lerp(_hslA.h,_hslB.h,alpha);const s=lerp(_hslA.s,_hslB.s,alpha);const l=lerp(_hslA.l,_hslB.l,alpha);this.setHSL(h,s,l);return this}setFromVector3(v){this.r=v.x;this.g=v.y;this.b=v.z;return this}applyMatrix3(m){const r=this.r,g=this.g,b=this.b;const e=m.elements;this.r=e[0]*r+e[3]*g+e[6]*b;this.g=e[1]*r+e[4]*g+e[7]*b;this.b=e[2]*r+e[5]*g+e[8]*b;return this}equals(c){return c.r===this.r&&c.g===this.g&&c.b===this.b}fromArray(array,offset=0){this.r=array[offset];this.g=array[offset+1];this.b=array[offset+2];return this}toArray(array=[],offset=0){array[offset]=this.r;array[offset+1]=this.g;array[offset+2]=this.b;return array}fromBufferAttribute(attribute,index){this.r=attribute.getX(index);this.g=attribute.getY(index);this.b=attribute.getZ(index);return this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r;yield this.g;yield this.b}}const _color=new Color;Color.NAMES=_colorKeywords;let _materialId=0;class Material extends EventDispatcher{constructor(){super();this.isMaterial=true;Object.defineProperty(this,"id",{value:_materialId++});this.uuid=generateUUID();this.name="";this.type="Material";this.blending=NormalBlending;this.side=FrontSide;this.vertexColors=false;this.opacity=1;this.transparent=false;this.alphaHash=false;this.blendSrc=SrcAlphaFactor;this.blendDst=OneMinusSrcAlphaFactor;this.blendEquation=AddEquation;this.blendSrcAlpha=null;this.blendDstAlpha=null;this.blendEquationAlpha=null;this.blendColor=new Color(0,0,0);this.blendAlpha=0;this.depthFunc=LessEqualDepth;this.depthTest=true;this.depthWrite=true;this.stencilWriteMask=255;this.stencilFunc=AlwaysStencilFunc;this.stencilRef=0;this.stencilFuncMask=255;this.stencilFail=KeepStencilOp;this.stencilZFail=KeepStencilOp;this.stencilZPass=KeepStencilOp;this.stencilWrite=false;this.clippingPlanes=null;this.clipIntersection=false;this.clipShadows=false;this.shadowSide=null;this.colorWrite=true;this.precision=null;this.polygonOffset=false;this.polygonOffsetFactor=0;this.polygonOffsetUnits=0;this.dithering=false;this.alphaToCoverage=false;this.premultipliedAlpha=false;this.forceSinglePass=false;this.visible=true;this.toneMapped=true;this.userData={};this.version=0;this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(value){if(this._alphaTest>0!==value>0){this.version++}this._alphaTest=value}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(values){if(values===undefined)return;for(const key in values){const newValue=values[key];if(newValue===undefined){console.warn(`THREE.Material: parameter '${key}' has value of undefined.`);continue}const currentValue=this[key];if(currentValue===undefined){console.warn(`THREE.Material: '${key}' is not a property of THREE.${this.type}.`);continue}if(currentValue&&currentValue.isColor){currentValue.set(newValue)}else if(currentValue&&currentValue.isVector3&&newValue&&newValue.isVector3){currentValue.copy(newValue)}else{this[key]=newValue}}}toJSON(meta){const isRootObject=meta===undefined||typeof meta==="string";if(isRootObject){meta={textures:{},images:{}}}const data={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};data.uuid=this.uuid;data.type=this.type;if(this.name!=="")data.name=this.name;if(this.color&&this.color.isColor)data.color=this.color.getHex();if(this.roughness!==undefined)data.roughness=this.roughness;if(this.metalness!==undefined)data.metalness=this.metalness;if(this.sheen!==undefined)data.sheen=this.sheen;if(this.sheenColor&&this.sheenColor.isColor)data.sheenColor=this.sheenColor.getHex();if(this.sheenRoughness!==undefined)data.sheenRoughness=this.sheenRoughness;if(this.emissive&&this.emissive.isColor)data.emissive=this.emissive.getHex();if(this.emissiveIntensity!==undefined&&this.emissiveIntensity!==1)data.emissiveIntensity=this.emissiveIntensity;if(this.specular&&this.specular.isColor)data.specular=this.specular.getHex();if(this.specularIntensity!==undefined)data.specularIntensity=this.specularIntensity;if(this.specularColor&&this.specularColor.isColor)data.specularColor=this.specularColor.getHex();if(this.shininess!==undefined)data.shininess=this.shininess;if(this.clearcoat!==undefined)data.clearcoat=this.clearcoat;if(this.clearcoatRoughness!==undefined)data.clearcoatRoughness=this.clearcoatRoughness;if(this.clearcoatMap&&this.clearcoatMap.isTexture){data.clearcoatMap=this.clearcoatMap.toJSON(meta).uuid}if(this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture){data.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(meta).uuid}if(this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture){data.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(meta).uuid;data.clearcoatNormalScale=this.clearcoatNormalScale.toArray()}if(this.dispersion!==undefined)data.dispersion=this.dispersion;if(this.iridescence!==undefined)data.iridescence=this.iridescence;if(this.iridescenceIOR!==undefined)data.iridescenceIOR=this.iridescenceIOR;if(this.iridescenceThicknessRange!==undefined)data.iridescenceThicknessRange=this.iridescenceThicknessRange;if(this.iridescenceMap&&this.iridescenceMap.isTexture){data.iridescenceMap=this.iridescenceMap.toJSON(meta).uuid}if(this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture){data.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(meta).uuid}if(this.anisotropy!==undefined)data.anisotropy=this.anisotropy;if(this.anisotropyRotation!==undefined)data.anisotropyRotation=this.anisotropyRotation;if(this.anisotropyMap&&this.anisotropyMap.isTexture){data.anisotropyMap=this.anisotropyMap.toJSON(meta).uuid}if(this.map&&this.map.isTexture)data.map=this.map.toJSON(meta).uuid;if(this.matcap&&this.matcap.isTexture)data.matcap=this.matcap.toJSON(meta).uuid;if(this.alphaMap&&this.alphaMap.isTexture)data.alphaMap=this.alphaMap.toJSON(meta).uuid;if(this.lightMap&&this.lightMap.isTexture){data.lightMap=this.lightMap.toJSON(meta).uuid;data.lightMapIntensity=this.lightMapIntensity}if(this.aoMap&&this.aoMap.isTexture){data.aoMap=this.aoMap.toJSON(meta).uuid;data.aoMapIntensity=this.aoMapIntensity}if(this.bumpMap&&this.bumpMap.isTexture){data.bumpMap=this.bumpMap.toJSON(meta).uuid;data.bumpScale=this.bumpScale}if(this.normalMap&&this.normalMap.isTexture){data.normalMap=this.normalMap.toJSON(meta).uuid;data.normalMapType=this.normalMapType;data.normalScale=this.normalScale.toArray()}if(this.displacementMap&&this.displacementMap.isTexture){data.displacementMap=this.displacementMap.toJSON(meta).uuid;data.displacementScale=this.displacementScale;data.displacementBias=this.displacementBias}if(this.roughnessMap&&this.roughnessMap.isTexture)data.roughnessMap=this.roughnessMap.toJSON(meta).uuid;if(this.metalnessMap&&this.metalnessMap.isTexture)data.metalnessMap=this.metalnessMap.toJSON(meta).uuid;if(this.emissiveMap&&this.emissiveMap.isTexture)data.emissiveMap=this.emissiveMap.toJSON(meta).uuid;if(this.specularMap&&this.specularMap.isTexture)data.specularMap=this.specularMap.toJSON(meta).uuid;if(this.specularIntensityMap&&this.specularIntensityMap.isTexture)data.specularIntensityMap=this.specularIntensityMap.toJSON(meta).uuid;if(this.specularColorMap&&this.specularColorMap.isTexture)data.specularColorMap=this.specularColorMap.toJSON(meta).uuid;if(this.envMap&&this.envMap.isTexture){data.envMap=this.envMap.toJSON(meta).uuid;if(this.combine!==undefined)data.combine=this.combine}if(this.envMapRotation!==undefined)data.envMapRotation=this.envMapRotation.toArray();if(this.envMapIntensity!==undefined)data.envMapIntensity=this.envMapIntensity;if(this.reflectivity!==undefined)data.reflectivity=this.reflectivity;if(this.refractionRatio!==undefined)data.refractionRatio=this.refractionRatio;if(this.gradientMap&&this.gradientMap.isTexture){data.gradientMap=this.gradientMap.toJSON(meta).uuid}if(this.transmission!==undefined)data.transmission=this.transmission;if(this.transmissionMap&&this.transmissionMap.isTexture)data.transmissionMap=this.transmissionMap.toJSON(meta).uuid;if(this.thickness!==undefined)data.thickness=this.thickness;if(this.thicknessMap&&this.thicknessMap.isTexture)data.thicknessMap=this.thicknessMap.toJSON(meta).uuid;if(this.attenuationDistance!==undefined&&this.attenuationDistance!==Infinity)data.attenuationDistance=this.attenuationDistance;if(this.attenuationColor!==undefined)data.attenuationColor=this.attenuationColor.getHex();if(this.size!==undefined)data.size=this.size;if(this.shadowSide!==null)data.shadowSide=this.shadowSide;if(this.sizeAttenuation!==undefined)data.sizeAttenuation=this.sizeAttenuation;if(this.blending!==NormalBlending)data.blending=this.blending;if(this.side!==FrontSide)data.side=this.side;if(this.vertexColors===true)data.vertexColors=true;if(this.opacity<1)data.opacity=this.opacity;if(this.transparent===true)data.transparent=true;if(this.blendSrc!==SrcAlphaFactor)data.blendSrc=this.blendSrc;if(this.blendDst!==OneMinusSrcAlphaFactor)data.blendDst=this.blendDst;if(this.blendEquation!==AddEquation)data.blendEquation=this.blendEquation;if(this.blendSrcAlpha!==null)data.blendSrcAlpha=this.blendSrcAlpha;if(this.blendDstAlpha!==null)data.blendDstAlpha=this.blendDstAlpha;if(this.blendEquationAlpha!==null)data.blendEquationAlpha=this.blendEquationAlpha;if(this.blendColor&&this.blendColor.isColor)data.blendColor=this.blendColor.getHex();if(this.blendAlpha!==0)data.blendAlpha=this.blendAlpha;if(this.depthFunc!==LessEqualDepth)data.depthFunc=this.depthFunc;if(this.depthTest===false)data.depthTest=this.depthTest;if(this.depthWrite===false)data.depthWrite=this.depthWrite;if(this.colorWrite===false)data.colorWrite=this.colorWrite;if(this.stencilWriteMask!==255)data.stencilWriteMask=this.stencilWriteMask;if(this.stencilFunc!==AlwaysStencilFunc)data.stencilFunc=this.stencilFunc;if(this.stencilRef!==0)data.stencilRef=this.stencilRef;if(this.stencilFuncMask!==255)data.stencilFuncMask=this.stencilFuncMask;if(this.stencilFail!==KeepStencilOp)data.stencilFail=this.stencilFail;if(this.stencilZFail!==KeepStencilOp)data.stencilZFail=this.stencilZFail;if(this.stencilZPass!==KeepStencilOp)data.stencilZPass=this.stencilZPass;if(this.stencilWrite===true)data.stencilWrite=this.stencilWrite;if(this.rotation!==undefined&&this.rotation!==0)data.rotation=this.rotation;if(this.polygonOffset===true)data.polygonOffset=true;if(this.polygonOffsetFactor!==0)data.polygonOffsetFactor=this.polygonOffsetFactor;if(this.polygonOffsetUnits!==0)data.polygonOffsetUnits=this.polygonOffsetUnits;if(this.linewidth!==undefined&&this.linewidth!==1)data.linewidth=this.linewidth;if(this.dashSize!==undefined)data.dashSize=this.dashSize;if(this.gapSize!==undefined)data.gapSize=this.gapSize;if(this.scale!==undefined)data.scale=this.scale;if(this.dithering===true)data.dithering=true;if(this.alphaTest>0)data.alphaTest=this.alphaTest;if(this.alphaHash===true)data.alphaHash=true;if(this.alphaToCoverage===true)data.alphaToCoverage=true;if(this.premultipliedAlpha===true)data.premultipliedAlpha=true;if(this.forceSinglePass===true)data.forceSinglePass=true;if(this.wireframe===true)data.wireframe=true;if(this.wireframeLinewidth>1)data.wireframeLinewidth=this.wireframeLinewidth;if(this.wireframeLinecap!=="round")data.wireframeLinecap=this.wireframeLinecap;if(this.wireframeLinejoin!=="round")data.wireframeLinejoin=this.wireframeLinejoin;if(this.flatShading===true)data.flatShading=true;if(this.visible===false)data.visible=false;if(this.toneMapped===false)data.toneMapped=false;if(this.fog===false)data.fog=false;if(Object.keys(this.userData).length>0)data.userData=this.userData;function extractFromCache(cache){const values=[];for(const key in cache){const data=cache[key];delete data.metadata;values.push(data)}return values}if(isRootObject){const textures=extractFromCache(meta.textures);const images=extractFromCache(meta.images);if(textures.length>0)data.textures=textures;if(images.length>0)data.images=images}return data}clone(){return new this.constructor().copy(this)}copy(source){this.name=source.name;this.blending=source.blending;this.side=source.side;this.vertexColors=source.vertexColors;this.opacity=source.opacity;this.transparent=source.transparent;this.blendSrc=source.blendSrc;this.blendDst=source.blendDst;this.blendEquation=source.blendEquation;this.blendSrcAlpha=source.blendSrcAlpha;this.blendDstAlpha=source.blendDstAlpha;this.blendEquationAlpha=source.blendEquationAlpha;this.blendColor.copy(source.blendColor);this.blendAlpha=source.blendAlpha;this.depthFunc=source.depthFunc;this.depthTest=source.depthTest;this.depthWrite=source.depthWrite;this.stencilWriteMask=source.stencilWriteMask;this.stencilFunc=source.stencilFunc;this.stencilRef=source.stencilRef;this.stencilFuncMask=source.stencilFuncMask;this.stencilFail=source.stencilFail;this.stencilZFail=source.stencilZFail;this.stencilZPass=source.stencilZPass;this.stencilWrite=source.stencilWrite;const srcPlanes=source.clippingPlanes;let dstPlanes=null;if(srcPlanes!==null){const n=srcPlanes.length;dstPlanes=new Array(n);for(let i=0;i!==n;++i){dstPlanes[i]=srcPlanes[i].clone()}}this.clippingPlanes=dstPlanes;this.clipIntersection=source.clipIntersection;this.clipShadows=source.clipShadows;this.shadowSide=source.shadowSide;this.colorWrite=source.colorWrite;this.precision=source.precision;this.polygonOffset=source.polygonOffset;this.polygonOffsetFactor=source.polygonOffsetFactor;this.polygonOffsetUnits=source.polygonOffsetUnits;this.dithering=source.dithering;this.alphaTest=source.alphaTest;this.alphaHash=source.alphaHash;this.alphaToCoverage=source.alphaToCoverage;this.premultipliedAlpha=source.premultipliedAlpha;this.forceSinglePass=source.forceSinglePass;this.visible=source.visible;this.toneMapped=source.toneMapped;this.userData=JSON.parse(JSON.stringify(source.userData));return this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(value){if(value===true)this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class MeshBasicMaterial extends Material{constructor(parameters){super();this.isMeshBasicMaterial=true;this.type="MeshBasicMaterial";this.color=new Color(16777215);this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.specularMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.combine=MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.specularMap=source.specularMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.combine=source.combine;this.reflectivity=source.reflectivity;this.refractionRatio=source.refractionRatio;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.fog=source.fog;return this}}const _tables=_generateTables();function _generateTables(){const buffer=new ArrayBuffer(4);const floatView=new Float32Array(buffer);const uint32View=new Uint32Array(buffer);const baseTable=new Uint32Array(512);const shiftTable=new Uint32Array(512);for(let i=0;i<256;++i){const e=i-127;if(e<-27){baseTable[i]=0;baseTable[i|256]=32768;shiftTable[i]=24;shiftTable[i|256]=24}else if(e<-14){baseTable[i]=1024>>-e-14;baseTable[i|256]=1024>>-e-14|32768;shiftTable[i]=-e-1;shiftTable[i|256]=-e-1}else if(e<=15){baseTable[i]=e+15<<10;baseTable[i|256]=e+15<<10|32768;shiftTable[i]=13;shiftTable[i|256]=13}else if(e<128){baseTable[i]=31744;baseTable[i|256]=64512;shiftTable[i]=24;shiftTable[i|256]=24}else{baseTable[i]=31744;baseTable[i|256]=64512;shiftTable[i]=13;shiftTable[i|256]=13}}const mantissaTable=new Uint32Array(2048);const exponentTable=new Uint32Array(64);const offsetTable=new Uint32Array(64);for(let i=1;i<1024;++i){let m=i<<13;let e=0;while((m&8388608)===0){m<<=1;e-=8388608}m&=~8388608;e+=947912704;mantissaTable[i]=m|e}for(let i=1024;i<2048;++i){mantissaTable[i]=939524096+(i-1024<<13)}for(let i=1;i<31;++i){exponentTable[i]=i<<23}exponentTable[31]=1199570944;exponentTable[32]=2147483648;for(let i=33;i<63;++i){exponentTable[i]=2147483648+(i-32<<23)}exponentTable[63]=3347054592;for(let i=1;i<64;++i){if(i!==32){offsetTable[i]=1024}}return{floatView:floatView,uint32View:uint32View,baseTable:baseTable,shiftTable:shiftTable,mantissaTable:mantissaTable,exponentTable:exponentTable,offsetTable:offsetTable}}function toHalfFloat(val){if(Math.abs(val)>65504)console.warn("THREE.DataUtils.toHalfFloat(): Value out of range.");val=clamp(val,-65504,65504);_tables.floatView[0]=val;const f=_tables.uint32View[0];const e=f>>23&511;return _tables.baseTable[e]+((f&8388607)>>_tables.shiftTable[e])}function fromHalfFloat(val){const m=val>>10;_tables.uint32View[0]=_tables.mantissaTable[_tables.offsetTable[m]+(val&1023)]+_tables.exponentTable[m];return _tables.floatView[0]}const DataUtils={toHalfFloat:toHalfFloat,fromHalfFloat:fromHalfFloat};const _vector$9=new Vector3;const _vector2$1=new Vector2;class BufferAttribute{constructor(array,itemSize,normalized=false){if(Array.isArray(array)){throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.")}this.isBufferAttribute=true;this.name="";this.array=array;this.itemSize=itemSize;this.count=array!==undefined?array.length/itemSize:0;this.normalized=normalized;this.usage=StaticDrawUsage;this._updateRange={offset:0,count:-1};this.updateRanges=[];this.gpuType=FloatType;this.version=0}onUploadCallback(){}set needsUpdate(value){if(value===true)this.version++}get updateRange(){warnOnce("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.");return this._updateRange}setUsage(value){this.usage=value;return this}addUpdateRange(start,count){this.updateRanges.push({start,count})}clearUpdateRanges(){this.updateRanges.length=0}copy(source){this.name=source.name;this.array=new source.array.constructor(source.array);this.itemSize=source.itemSize;this.count=source.count;this.normalized=source.normalized;this.usage=source.usage;this.gpuType=source.gpuType;return this}copyAt(index1,attribute,index2){index1*=this.itemSize;index2*=attribute.itemSize;for(let i=0,l=this.itemSize;i<l;i++){this.array[index1+i]=attribute.array[index2+i]}return this}copyArray(array){this.array.set(array);return this}applyMatrix3(m){if(this.itemSize===2){for(let i=0,l=this.count;i<l;i++){_vector2$1.fromBufferAttribute(this,i);_vector2$1.applyMatrix3(m);this.setXY(i,_vector2$1.x,_vector2$1.y)}}else if(this.itemSize===3){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.applyMatrix3(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}}return this}applyMatrix4(m){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.applyMatrix4(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}return this}applyNormalMatrix(m){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.applyNormalMatrix(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}return this}transformDirection(m){for(let i=0,l=this.count;i<l;i++){_vector$9.fromBufferAttribute(this,i);_vector$9.transformDirection(m);this.setXYZ(i,_vector$9.x,_vector$9.y,_vector$9.z)}return this}set(value,offset=0){this.array.set(value,offset);return this}getComponent(index,component){let value=this.array[index*this.itemSize+component];if(this.normalized)value=denormalize(value,this.array);return value}setComponent(index,component,value){if(this.normalized)value=normalize(value,this.array);this.array[index*this.itemSize+component]=value;return this}getX(index){let x=this.array[index*this.itemSize];if(this.normalized)x=denormalize(x,this.array);return x}setX(index,x){if(this.normalized)x=normalize(x,this.array);this.array[index*this.itemSize]=x;return this}getY(index){let y=this.array[index*this.itemSize+1];if(this.normalized)y=denormalize(y,this.array);return y}setY(index,y){if(this.normalized)y=normalize(y,this.array);this.array[index*this.itemSize+1]=y;return this}getZ(index){let z=this.array[index*this.itemSize+2];if(this.normalized)z=denormalize(z,this.array);return z}setZ(index,z){if(this.normalized)z=normalize(z,this.array);this.array[index*this.itemSize+2]=z;return this}getW(index){let w=this.array[index*this.itemSize+3];if(this.normalized)w=denormalize(w,this.array);return w}setW(index,w){if(this.normalized)w=normalize(w,this.array);this.array[index*this.itemSize+3]=w;return this}setXY(index,x,y){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array)}this.array[index+0]=x;this.array[index+1]=y;return this}setXYZ(index,x,y,z){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array)}this.array[index+0]=x;this.array[index+1]=y;this.array[index+2]=z;return this}setXYZW(index,x,y,z,w){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array);w=normalize(w,this.array)}this.array[index+0]=x;this.array[index+1]=y;this.array[index+2]=z;this.array[index+3]=w;return this}onUpload(callback){this.onUploadCallback=callback;return this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const data={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};if(this.name!=="")data.name=this.name;if(this.usage!==StaticDrawUsage)data.usage=this.usage;return data}}class Int8BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Int8Array(array),itemSize,normalized)}}class Uint8BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint8Array(array),itemSize,normalized)}}class Uint8ClampedBufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint8ClampedArray(array),itemSize,normalized)}}class Int16BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Int16Array(array),itemSize,normalized)}}class Uint16BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint16Array(array),itemSize,normalized)}}class Int32BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Int32Array(array),itemSize,normalized)}}class Uint32BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint32Array(array),itemSize,normalized)}}class Float16BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Uint16Array(array),itemSize,normalized);this.isFloat16BufferAttribute=true}getX(index){let x=fromHalfFloat(this.array[index*this.itemSize]);if(this.normalized)x=denormalize(x,this.array);return x}setX(index,x){if(this.normalized)x=normalize(x,this.array);this.array[index*this.itemSize]=toHalfFloat(x);return this}getY(index){let y=fromHalfFloat(this.array[index*this.itemSize+1]);if(this.normalized)y=denormalize(y,this.array);return y}setY(index,y){if(this.normalized)y=normalize(y,this.array);this.array[index*this.itemSize+1]=toHalfFloat(y);return this}getZ(index){let z=fromHalfFloat(this.array[index*this.itemSize+2]);if(this.normalized)z=denormalize(z,this.array);return z}setZ(index,z){if(this.normalized)z=normalize(z,this.array);this.array[index*this.itemSize+2]=toHalfFloat(z);return this}getW(index){let w=fromHalfFloat(this.array[index*this.itemSize+3]);if(this.normalized)w=denormalize(w,this.array);return w}setW(index,w){if(this.normalized)w=normalize(w,this.array);this.array[index*this.itemSize+3]=toHalfFloat(w);return this}setXY(index,x,y){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array)}this.array[index+0]=toHalfFloat(x);this.array[index+1]=toHalfFloat(y);return this}setXYZ(index,x,y,z){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array)}this.array[index+0]=toHalfFloat(x);this.array[index+1]=toHalfFloat(y);this.array[index+2]=toHalfFloat(z);return this}setXYZW(index,x,y,z,w){index*=this.itemSize;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array);w=normalize(w,this.array)}this.array[index+0]=toHalfFloat(x);this.array[index+1]=toHalfFloat(y);this.array[index+2]=toHalfFloat(z);this.array[index+3]=toHalfFloat(w);return this}}class Float32BufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized){super(new Float32Array(array),itemSize,normalized)}}let _id$2=0;const _m1$2=new Matrix4;const _obj=new Object3D;const _offset=new Vector3;const _box$2=new Box3;const _boxMorphTargets=new Box3;const _vector$8=new Vector3;class BufferGeometry extends EventDispatcher{constructor(){super();this.isBufferGeometry=true;Object.defineProperty(this,"id",{value:_id$2++});this.uuid=generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.morphTargetsRelative=false;this.groups=[];this.boundingBox=null;this.boundingSphere=null;this.drawRange={start:0,count:Infinity};this.userData={}}getIndex(){return this.index}setIndex(index){if(Array.isArray(index)){this.index=new(arrayNeedsUint32(index)?Uint32BufferAttribute:Uint16BufferAttribute)(index,1)}else{this.index=index}return this}getAttribute(name){return this.attributes[name]}setAttribute(name,attribute){this.attributes[name]=attribute;return this}deleteAttribute(name){delete this.attributes[name];return this}hasAttribute(name){return this.attributes[name]!==undefined}addGroup(start,count,materialIndex=0){this.groups.push({start:start,count:count,materialIndex:materialIndex})}clearGroups(){this.groups=[]}setDrawRange(start,count){this.drawRange.start=start;this.drawRange.count=count}applyMatrix4(matrix){const position=this.attributes.position;if(position!==undefined){position.applyMatrix4(matrix);position.needsUpdate=true}const normal=this.attributes.normal;if(normal!==undefined){const normalMatrix=new Matrix3().getNormalMatrix(matrix);normal.applyNormalMatrix(normalMatrix);normal.needsUpdate=true}const tangent=this.attributes.tangent;if(tangent!==undefined){tangent.transformDirection(matrix);tangent.needsUpdate=true}if(this.boundingBox!==null){this.computeBoundingBox()}if(this.boundingSphere!==null){this.computeBoundingSphere()}return this}applyQuaternion(q){_m1$2.makeRotationFromQuaternion(q);this.applyMatrix4(_m1$2);return this}rotateX(angle){_m1$2.makeRotationX(angle);this.applyMatrix4(_m1$2);return this}rotateY(angle){_m1$2.makeRotationY(angle);this.applyMatrix4(_m1$2);return this}rotateZ(angle){_m1$2.makeRotationZ(angle);this.applyMatrix4(_m1$2);return this}translate(x,y,z){_m1$2.makeTranslation(x,y,z);this.applyMatrix4(_m1$2);return this}scale(x,y,z){_m1$2.makeScale(x,y,z);this.applyMatrix4(_m1$2);return this}lookAt(vector){_obj.lookAt(vector);_obj.updateMatrix();this.applyMatrix4(_obj.matrix);return this}center(){this.computeBoundingBox();this.boundingBox.getCenter(_offset).negate();this.translate(_offset.x,_offset.y,_offset.z);return this}setFromPoints(points){const position=[];for(let i=0,l=points.length;i<l;i++){const point=points[i];position.push(point.x,point.y,point.z||0)}this.setAttribute("position",new Float32BufferAttribute(position,3));return this}computeBoundingBox(){if(this.boundingBox===null){this.boundingBox=new Box3}const position=this.attributes.position;const morphAttributesPosition=this.morphAttributes.position;if(position&&position.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this);this.boundingBox.set(new Vector3(-Infinity,-Infinity,-Infinity),new Vector3(+Infinity,+Infinity,+Infinity));return}if(position!==undefined){this.boundingBox.setFromBufferAttribute(position);if(morphAttributesPosition){for(let i=0,il=morphAttributesPosition.length;i<il;i++){const morphAttribute=morphAttributesPosition[i];_box$2.setFromBufferAttribute(morphAttribute);if(this.morphTargetsRelative){_vector$8.addVectors(this.boundingBox.min,_box$2.min);this.boundingBox.expandByPoint(_vector$8);_vector$8.addVectors(this.boundingBox.max,_box$2.max);this.boundingBox.expandByPoint(_vector$8)}else{this.boundingBox.expandByPoint(_box$2.min);this.boundingBox.expandByPoint(_box$2.max)}}}}else{this.boundingBox.makeEmpty()}if(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z)){console.error("THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.",this)}}computeBoundingSphere(){if(this.boundingSphere===null){this.boundingSphere=new Sphere}const position=this.attributes.position;const morphAttributesPosition=this.morphAttributes.position;if(position&&position.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this);this.boundingSphere.set(new Vector3,Infinity);return}if(position){const center=this.boundingSphere.center;_box$2.setFromBufferAttribute(position);if(morphAttributesPosition){for(let i=0,il=morphAttributesPosition.length;i<il;i++){const morphAttribute=morphAttributesPosition[i];_boxMorphTargets.setFromBufferAttribute(morphAttribute);if(this.morphTargetsRelative){_vector$8.addVectors(_box$2.min,_boxMorphTargets.min);_box$2.expandByPoint(_vector$8);_vector$8.addVectors(_box$2.max,_boxMorphTargets.max);_box$2.expandByPoint(_vector$8)}else{_box$2.expandByPoint(_boxMorphTargets.min);_box$2.expandByPoint(_boxMorphTargets.max)}}}_box$2.getCenter(center);let maxRadiusSq=0;for(let i=0,il=position.count;i<il;i++){_vector$8.fromBufferAttribute(position,i);maxRadiusSq=Math.max(maxRadiusSq,center.distanceToSquared(_vector$8))}if(morphAttributesPosition){for(let i=0,il=morphAttributesPosition.length;i<il;i++){const morphAttribute=morphAttributesPosition[i];const morphTargetsRelative=this.morphTargetsRelative;for(let j=0,jl=morphAttribute.count;j<jl;j++){_vector$8.fromBufferAttribute(morphAttribute,j);if(morphTargetsRelative){_offset.fromBufferAttribute(position,j);_vector$8.add(_offset)}maxRadiusSq=Math.max(maxRadiusSq,center.distanceToSquared(_vector$8))}}}this.boundingSphere.radius=Math.sqrt(maxRadiusSq);if(isNaN(this.boundingSphere.radius)){console.error("THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.",this)}}}computeTangents(){const index=this.index;const attributes=this.attributes;if(index===null||attributes.position===undefined||attributes.normal===undefined||attributes.uv===undefined){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const positionAttribute=attributes.position;const normalAttribute=attributes.normal;const uvAttribute=attributes.uv;if(this.hasAttribute("tangent")===false){this.setAttribute("tangent",new BufferAttribute(new Float32Array(4*positionAttribute.count),4))}const tangentAttribute=this.getAttribute("tangent");const tan1=[],tan2=[];for(let i=0;i<positionAttribute.count;i++){tan1[i]=new Vector3;tan2[i]=new Vector3}const vA=new Vector3,vB=new Vector3,vC=new Vector3,uvA=new Vector2,uvB=new Vector2,uvC=new Vector2,sdir=new Vector3,tdir=new Vector3;function handleTriangle(a,b,c){vA.fromBufferAttribute(positionAttribute,a);vB.fromBufferAttribute(positionAttribute,b);vC.fromBufferAttribute(positionAttribute,c);uvA.fromBufferAttribute(uvAttribute,a);uvB.fromBufferAttribute(uvAttribute,b);uvC.fromBufferAttribute(uvAttribute,c);vB.sub(vA);vC.sub(vA);uvB.sub(uvA);uvC.sub(uvA);const r=1/(uvB.x*uvC.y-uvC.x*uvB.y);if(!isFinite(r))return;sdir.copy(vB).multiplyScalar(uvC.y).addScaledVector(vC,-uvB.y).multiplyScalar(r);tdir.copy(vC).multiplyScalar(uvB.x).addScaledVector(vB,-uvC.x).multiplyScalar(r);tan1[a].add(sdir);tan1[b].add(sdir);tan1[c].add(sdir);tan2[a].add(tdir);tan2[b].add(tdir);tan2[c].add(tdir)}let groups=this.groups;if(groups.length===0){groups=[{start:0,count:index.count}]}for(let i=0,il=groups.length;i<il;++i){const group=groups[i];const start=group.start;const count=group.count;for(let j=start,jl=start+count;j<jl;j+=3){handleTriangle(index.getX(j+0),index.getX(j+1),index.getX(j+2))}}const tmp=new Vector3,tmp2=new Vector3;const n=new Vector3,n2=new Vector3;function handleVertex(v){n.fromBufferAttribute(normalAttribute,v);n2.copy(n);const t=tan1[v];tmp.copy(t);tmp.sub(n.multiplyScalar(n.dot(t))).normalize();tmp2.crossVectors(n2,t);const test=tmp2.dot(tan2[v]);const w=test<0?-1:1;tangentAttribute.setXYZW(v,tmp.x,tmp.y,tmp.z,w)}for(let i=0,il=groups.length;i<il;++i){const group=groups[i];const start=group.start;const count=group.count;for(let j=start,jl=start+count;j<jl;j+=3){handleVertex(index.getX(j+0));handleVertex(index.getX(j+1));handleVertex(index.getX(j+2))}}}computeVertexNormals(){const index=this.index;const positionAttribute=this.getAttribute("position");if(positionAttribute!==undefined){let normalAttribute=this.getAttribute("normal");if(normalAttribute===undefined){normalAttribute=new BufferAttribute(new Float32Array(positionAttribute.count*3),3);this.setAttribute("normal",normalAttribute)}else{for(let i=0,il=normalAttribute.count;i<il;i++){normalAttribute.setXYZ(i,0,0,0)}}const pA=new Vector3,pB=new Vector3,pC=new Vector3;const nA=new Vector3,nB=new Vector3,nC=new Vector3;const cb=new Vector3,ab=new Vector3;if(index){for(let i=0,il=index.count;i<il;i+=3){const vA=index.getX(i+0);const vB=index.getX(i+1);const vC=index.getX(i+2);pA.fromBufferAttribute(positionAttribute,vA);pB.fromBufferAttribute(positionAttribute,vB);pC.fromBufferAttribute(positionAttribute,vC);cb.subVectors(pC,pB);ab.subVectors(pA,pB);cb.cross(ab);nA.fromBufferAttribute(normalAttribute,vA);nB.fromBufferAttribute(normalAttribute,vB);nC.fromBufferAttribute(normalAttribute,vC);nA.add(cb);nB.add(cb);nC.add(cb);normalAttribute.setXYZ(vA,nA.x,nA.y,nA.z);normalAttribute.setXYZ(vB,nB.x,nB.y,nB.z);normalAttribute.setXYZ(vC,nC.x,nC.y,nC.z)}}else{for(let i=0,il=positionAttribute.count;i<il;i+=3){pA.fromBufferAttribute(positionAttribute,i+0);pB.fromBufferAttribute(positionAttribute,i+1);pC.fromBufferAttribute(positionAttribute,i+2);cb.subVectors(pC,pB);ab.subVectors(pA,pB);cb.cross(ab);normalAttribute.setXYZ(i+0,cb.x,cb.y,cb.z);normalAttribute.setXYZ(i+1,cb.x,cb.y,cb.z);normalAttribute.setXYZ(i+2,cb.x,cb.y,cb.z)}}this.normalizeNormals();normalAttribute.needsUpdate=true}}normalizeNormals(){const normals=this.attributes.normal;for(let i=0,il=normals.count;i<il;i++){_vector$8.fromBufferAttribute(normals,i);_vector$8.normalize();normals.setXYZ(i,_vector$8.x,_vector$8.y,_vector$8.z)}}toNonIndexed(){function convertBufferAttribute(attribute,indices){const array=attribute.array;const itemSize=attribute.itemSize;const normalized=attribute.normalized;const array2=new array.constructor(indices.length*itemSize);let index=0,index2=0;for(let i=0,l=indices.length;i<l;i++){if(attribute.isInterleavedBufferAttribute){index=indices[i]*attribute.data.stride+attribute.offset}else{index=indices[i]*itemSize}for(let j=0;j<itemSize;j++){array2[index2++]=array[index++]}}return new BufferAttribute(array2,itemSize,normalized)}if(this.index===null){console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.");return this}const geometry2=new BufferGeometry;const indices=this.index.array;const attributes=this.attributes;for(const name in attributes){const attribute=attributes[name];const newAttribute=convertBufferAttribute(attribute,indices);geometry2.setAttribute(name,newAttribute)}const morphAttributes=this.morphAttributes;for(const name in morphAttributes){const morphArray=[];const morphAttribute=morphAttributes[name];for(let i=0,il=morphAttribute.length;i<il;i++){const attribute=morphAttribute[i];const newAttribute=convertBufferAttribute(attribute,indices);morphArray.push(newAttribute)}geometry2.morphAttributes[name]=morphArray}geometry2.morphTargetsRelative=this.morphTargetsRelative;const groups=this.groups;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];geometry2.addGroup(group.start,group.count,group.materialIndex)}return geometry2}toJSON(){const data={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};data.uuid=this.uuid;data.type=this.type;if(this.name!=="")data.name=this.name;if(Object.keys(this.userData).length>0)data.userData=this.userData;if(this.parameters!==undefined){const parameters=this.parameters;for(const key in parameters){if(parameters[key]!==undefined)data[key]=parameters[key]}return data}data.data={attributes:{}};const index=this.index;if(index!==null){data.data.index={type:index.array.constructor.name,array:Array.prototype.slice.call(index.array)}}const attributes=this.attributes;for(const key in attributes){const attribute=attributes[key];data.data.attributes[key]=attribute.toJSON(data.data)}const morphAttributes={};let hasMorphAttributes=false;for(const key in this.morphAttributes){const attributeArray=this.morphAttributes[key];const array=[];for(let i=0,il=attributeArray.length;i<il;i++){const attribute=attributeArray[i];array.push(attribute.toJSON(data.data))}if(array.length>0){morphAttributes[key]=array;hasMorphAttributes=true}}if(hasMorphAttributes){data.data.morphAttributes=morphAttributes;data.data.morphTargetsRelative=this.morphTargetsRelative}const groups=this.groups;if(groups.length>0){data.data.groups=JSON.parse(JSON.stringify(groups))}const boundingSphere=this.boundingSphere;if(boundingSphere!==null){data.data.boundingSphere={center:boundingSphere.center.toArray(),radius:boundingSphere.radius}}return data}clone(){return new this.constructor().copy(this)}copy(source){this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingBox=null;this.boundingSphere=null;const data={};this.name=source.name;const index=source.index;if(index!==null){this.setIndex(index.clone(data))}const attributes=source.attributes;for(const name in attributes){const attribute=attributes[name];this.setAttribute(name,attribute.clone(data))}const morphAttributes=source.morphAttributes;for(const name in morphAttributes){const array=[];const morphAttribute=morphAttributes[name];for(let i=0,l=morphAttribute.length;i<l;i++){array.push(morphAttribute[i].clone(data))}this.morphAttributes[name]=array}this.morphTargetsRelative=source.morphTargetsRelative;const groups=source.groups;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];this.addGroup(group.start,group.count,group.materialIndex)}const boundingBox=source.boundingBox;if(boundingBox!==null){this.boundingBox=boundingBox.clone()}const boundingSphere=source.boundingSphere;if(boundingSphere!==null){this.boundingSphere=boundingSphere.clone()}this.drawRange.start=source.drawRange.start;this.drawRange.count=source.drawRange.count;this.userData=source.userData;return this}dispose(){this.dispatchEvent({type:"dispose"})}}const _inverseMatrix$3=new Matrix4;const _ray$3=new Ray;const _sphere$6=new Sphere;const _sphereHitAt=new Vector3;const _vA$1=new Vector3;const _vB$1=new Vector3;const _vC$1=new Vector3;const _tempA=new Vector3;const _morphA=new Vector3;const _uvA$1=new Vector2;const _uvB$1=new Vector2;const _uvC$1=new Vector2;const _normalA=new Vector3;const _normalB=new Vector3;const _normalC=new Vector3;const _intersectionPoint=new Vector3;const _intersectionPointWorld=new Vector3;class Mesh extends Object3D{constructor(geometry=new BufferGeometry,material=new MeshBasicMaterial){super();this.isMesh=true;this.type="Mesh";this.geometry=geometry;this.material=material;this.updateMorphTargets()}copy(source,recursive){super.copy(source,recursive);if(source.morphTargetInfluences!==undefined){this.morphTargetInfluences=source.morphTargetInfluences.slice()}if(source.morphTargetDictionary!==undefined){this.morphTargetDictionary=Object.assign({},source.morphTargetDictionary)}this.material=Array.isArray(source.material)?source.material.slice():source.material;this.geometry=source.geometry;return this}updateMorphTargets(){const geometry=this.geometry;const morphAttributes=geometry.morphAttributes;const keys=Object.keys(morphAttributes);if(keys.length>0){const morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==undefined){this.morphTargetInfluences=[];this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;m<ml;m++){const name=morphAttribute[m].name||String(m);this.morphTargetInfluences.push(0);this.morphTargetDictionary[name]=m}}}}getVertexPosition(index,target){const geometry=this.geometry;const position=geometry.attributes.position;const morphPosition=geometry.morphAttributes.position;const morphTargetsRelative=geometry.morphTargetsRelative;target.fromBufferAttribute(position,index);const morphInfluences=this.morphTargetInfluences;if(morphPosition&&morphInfluences){_morphA.set(0,0,0);for(let i=0,il=morphPosition.length;i<il;i++){const influence=morphInfluences[i];const morphAttribute=morphPosition[i];if(influence===0)continue;_tempA.fromBufferAttribute(morphAttribute,index);if(morphTargetsRelative){_morphA.addScaledVector(_tempA,influence)}else{_morphA.addScaledVector(_tempA.sub(target),influence)}}target.add(_morphA)}return target}raycast(raycaster,intersects){const geometry=this.geometry;const material=this.material;const matrixWorld=this.matrixWorld;if(material===undefined)return;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere$6.copy(geometry.boundingSphere);_sphere$6.applyMatrix4(matrixWorld);_ray$3.copy(raycaster.ray).recast(raycaster.near);if(_sphere$6.containsPoint(_ray$3.origin)===false){if(_ray$3.intersectSphere(_sphere$6,_sphereHitAt)===null)return;if(_ray$3.origin.distanceToSquared(_sphereHitAt)>(raycaster.far-raycaster.near)**2)return}_inverseMatrix$3.copy(matrixWorld).invert();_ray$3.copy(raycaster.ray).applyMatrix4(_inverseMatrix$3);if(geometry.boundingBox!==null){if(_ray$3.intersectsBox(geometry.boundingBox)===false)return}this._computeIntersections(raycaster,intersects,_ray$3)}_computeIntersections(raycaster,intersects,rayLocalSpace){let intersection;const geometry=this.geometry;const material=this.material;const index=geometry.index;const position=geometry.attributes.position;const uv=geometry.attributes.uv;const uv1=geometry.attributes.uv1;const normal=geometry.attributes.normal;const groups=geometry.groups;const drawRange=geometry.drawRange;if(index!==null){if(Array.isArray(material)){for(let i=0,il=groups.length;i<il;i++){const group=groups[i];const groupMaterial=material[group.materialIndex];const start=Math.max(group.start,drawRange.start);const end=Math.min(index.count,Math.min(group.start+group.count,drawRange.start+drawRange.count));for(let j=start,jl=end;j<jl;j+=3){const a=index.getX(j);const b=index.getX(j+1);const c=index.getX(j+2);intersection=checkGeometryIntersection(this,groupMaterial,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(j/3);intersection.face.materialIndex=group.materialIndex;intersects.push(intersection)}}}}else{const start=Math.max(0,drawRange.start);const end=Math.min(index.count,drawRange.start+drawRange.count);for(let i=start,il=end;i<il;i+=3){const a=index.getX(i);const b=index.getX(i+1);const c=index.getX(i+2);intersection=checkGeometryIntersection(this,material,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(i/3);intersects.push(intersection)}}}}else if(position!==undefined){if(Array.isArray(material)){for(let i=0,il=groups.length;i<il;i++){const group=groups[i];const groupMaterial=material[group.materialIndex];const start=Math.max(group.start,drawRange.start);const end=Math.min(position.count,Math.min(group.start+group.count,drawRange.start+drawRange.count));for(let j=start,jl=end;j<jl;j+=3){const a=j;const b=j+1;const c=j+2;intersection=checkGeometryIntersection(this,groupMaterial,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(j/3);intersection.face.materialIndex=group.materialIndex;intersects.push(intersection)}}}}else{const start=Math.max(0,drawRange.start);const end=Math.min(position.count,drawRange.start+drawRange.count);for(let i=start,il=end;i<il;i+=3){const a=i;const b=i+1;const c=i+2;intersection=checkGeometryIntersection(this,material,raycaster,rayLocalSpace,uv,uv1,normal,a,b,c);if(intersection){intersection.faceIndex=Math.floor(i/3);intersects.push(intersection)}}}}}}function checkIntersection$1(object,material,raycaster,ray,pA,pB,pC,point){let intersect;if(material.side===BackSide){intersect=ray.intersectTriangle(pC,pB,pA,true,point)}else{intersect=ray.intersectTriangle(pA,pB,pC,material.side===FrontSide,point)}if(intersect===null)return null;_intersectionPointWorld.copy(point);_intersectionPointWorld.applyMatrix4(object.matrixWorld);const distance=raycaster.ray.origin.distanceTo(_intersectionPointWorld);if(distance<raycaster.near||distance>raycaster.far)return null;return{distance:distance,point:_intersectionPointWorld.clone(),object:object}}function checkGeometryIntersection(object,material,raycaster,ray,uv,uv1,normal,a,b,c){object.getVertexPosition(a,_vA$1);object.getVertexPosition(b,_vB$1);object.getVertexPosition(c,_vC$1);const intersection=checkIntersection$1(object,material,raycaster,ray,_vA$1,_vB$1,_vC$1,_intersectionPoint);if(intersection){if(uv){_uvA$1.fromBufferAttribute(uv,a);_uvB$1.fromBufferAttribute(uv,b);_uvC$1.fromBufferAttribute(uv,c);intersection.uv=Triangle.getInterpolation(_intersectionPoint,_vA$1,_vB$1,_vC$1,_uvA$1,_uvB$1,_uvC$1,new Vector2)}if(uv1){_uvA$1.fromBufferAttribute(uv1,a);_uvB$1.fromBufferAttribute(uv1,b);_uvC$1.fromBufferAttribute(uv1,c);intersection.uv1=Triangle.getInterpolation(_intersectionPoint,_vA$1,_vB$1,_vC$1,_uvA$1,_uvB$1,_uvC$1,new Vector2)}if(normal){_normalA.fromBufferAttribute(normal,a);_normalB.fromBufferAttribute(normal,b);_normalC.fromBufferAttribute(normal,c);intersection.normal=Triangle.getInterpolation(_intersectionPoint,_vA$1,_vB$1,_vC$1,_normalA,_normalB,_normalC,new Vector3);if(intersection.normal.dot(ray.direction)>0){intersection.normal.multiplyScalar(-1)}}const face={a:a,b:b,c:c,normal:new Vector3,materialIndex:0};Triangle.getNormal(_vA$1,_vB$1,_vC$1,face.normal);intersection.face=face}return intersection}class BoxGeometry extends BufferGeometry{constructor(width=1,height=1,depth=1,widthSegments=1,heightSegments=1,depthSegments=1){super();this.type="BoxGeometry";this.parameters={width:width,height:height,depth:depth,widthSegments:widthSegments,heightSegments:heightSegments,depthSegments:depthSegments};const scope=this;widthSegments=Math.floor(widthSegments);heightSegments=Math.floor(heightSegments);depthSegments=Math.floor(depthSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];let numberOfVertices=0;let groupStart=0;buildPlane("z","y","x",-1,-1,depth,height,width,depthSegments,heightSegments,0);buildPlane("z","y","x",1,-1,depth,height,-width,depthSegments,heightSegments,1);buildPlane("x","z","y",1,1,width,depth,height,widthSegments,depthSegments,2);buildPlane("x","z","y",1,-1,width,depth,-height,widthSegments,depthSegments,3);buildPlane("x","y","z",1,-1,width,height,depth,widthSegments,heightSegments,4);buildPlane("x","y","z",-1,-1,width,height,-depth,widthSegments,heightSegments,5);this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function buildPlane(u,v,w,udir,vdir,width,height,depth,gridX,gridY,materialIndex){const segmentWidth=width/gridX;const segmentHeight=height/gridY;const widthHalf=width/2;const heightHalf=height/2;const depthHalf=depth/2;const gridX1=gridX+1;const gridY1=gridY+1;let vertexCounter=0;let groupCount=0;const vector=new Vector3;for(let iy=0;iy<gridY1;iy++){const y=iy*segmentHeight-heightHalf;for(let ix=0;ix<gridX1;ix++){const x=ix*segmentWidth-widthHalf;vector[u]=x*udir;vector[v]=y*vdir;vector[w]=depthHalf;vertices.push(vector.x,vector.y,vector.z);vector[u]=0;vector[v]=0;vector[w]=depth>0?1:-1;normals.push(vector.x,vector.y,vector.z);uvs.push(ix/gridX);uvs.push(1-iy/gridY);vertexCounter+=1}}for(let iy=0;iy<gridY;iy++){for(let ix=0;ix<gridX;ix++){const a=numberOfVertices+ix+gridX1*iy;const b=numberOfVertices+ix+gridX1*(iy+1);const c=numberOfVertices+(ix+1)+gridX1*(iy+1);const d=numberOfVertices+(ix+1)+gridX1*iy;indices.push(a,b,d);indices.push(b,c,d);groupCount+=6}}scope.addGroup(groupStart,groupCount,materialIndex);groupStart+=groupCount;numberOfVertices+=vertexCounter}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new BoxGeometry(data.width,data.height,data.depth,data.widthSegments,data.heightSegments,data.depthSegments)}}function cloneUniforms(src){const dst={};for(const u in src){dst[u]={};for(const p in src[u]){const property=src[u][p];if(property&&(property.isColor||property.isMatrix3||property.isMatrix4||property.isVector2||property.isVector3||property.isVector4||property.isTexture||property.isQuaternion)){if(property.isRenderTargetTexture){console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().");dst[u][p]=null}else{dst[u][p]=property.clone()}}else if(Array.isArray(property)){dst[u][p]=property.slice()}else{dst[u][p]=property}}}return dst}function mergeUniforms(uniforms){const merged={};for(let u=0;u<uniforms.length;u++){const tmp=cloneUniforms(uniforms[u]);for(const p in tmp){merged[p]=tmp[p]}}return merged}function cloneUniformsGroups(src){const dst=[];for(let u=0;u<src.length;u++){dst.push(src[u].clone())}return dst}function getUnlitUniformColorSpace(renderer){const currentRenderTarget=renderer.getRenderTarget();if(currentRenderTarget===null){return renderer.outputColorSpace}if(currentRenderTarget.isXRRenderTarget===true){return currentRenderTarget.texture.colorSpace}return ColorManagement.workingColorSpace}const UniformsUtils={clone:cloneUniforms,merge:mergeUniforms};var default_vertex="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";var default_fragment="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";class ShaderMaterial extends Material{constructor(parameters){super();this.isShaderMaterial=true;this.type="ShaderMaterial";this.defines={};this.uniforms={};this.uniformsGroups=[];this.vertexShader=default_vertex;this.fragmentShader=default_fragment;this.linewidth=1;this.wireframe=false;this.wireframeLinewidth=1;this.fog=false;this.lights=false;this.clipping=false;this.forceSinglePass=true;this.extensions={clipCullDistance:false,multiDraw:false};this.defaultAttributeValues={"color":[1,1,1],"uv":[0,0],"uv1":[0,0]};this.index0AttributeName=undefined;this.uniformsNeedUpdate=false;this.glslVersion=null;if(parameters!==undefined){this.setValues(parameters)}}copy(source){super.copy(source);this.fragmentShader=source.fragmentShader;this.vertexShader=source.vertexShader;this.uniforms=cloneUniforms(source.uniforms);this.uniformsGroups=cloneUniformsGroups(source.uniformsGroups);this.defines=Object.assign({},source.defines);this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.fog=source.fog;this.lights=source.lights;this.clipping=source.clipping;this.extensions=Object.assign({},source.extensions);this.glslVersion=source.glslVersion;return this}toJSON(meta){const data=super.toJSON(meta);data.glslVersion=this.glslVersion;data.uniforms={};for(const name in this.uniforms){const uniform=this.uniforms[name];const value=uniform.value;if(value&&value.isTexture){data.uniforms[name]={type:"t",value:value.toJSON(meta).uuid}}else if(value&&value.isColor){data.uniforms[name]={type:"c",value:value.getHex()}}else if(value&&value.isVector2){data.uniforms[name]={type:"v2",value:value.toArray()}}else if(value&&value.isVector3){data.uniforms[name]={type:"v3",value:value.toArray()}}else if(value&&value.isVector4){data.uniforms[name]={type:"v4",value:value.toArray()}}else if(value&&value.isMatrix3){data.uniforms[name]={type:"m3",value:value.toArray()}}else if(value&&value.isMatrix4){data.uniforms[name]={type:"m4",value:value.toArray()}}else{data.uniforms[name]={value:value}}}if(Object.keys(this.defines).length>0)data.defines=this.defines;data.vertexShader=this.vertexShader;data.fragmentShader=this.fragmentShader;data.lights=this.lights;data.clipping=this.clipping;const extensions={};for(const key in this.extensions){if(this.extensions[key]===true)extensions[key]=true}if(Object.keys(extensions).length>0)data.extensions=extensions;return data}}class Camera extends Object3D{constructor(){super();this.isCamera=true;this.type="Camera";this.matrixWorldInverse=new Matrix4;this.projectionMatrix=new Matrix4;this.projectionMatrixInverse=new Matrix4;this.coordinateSystem=WebGLCoordinateSystem}copy(source,recursive){super.copy(source,recursive);this.matrixWorldInverse.copy(source.matrixWorldInverse);this.projectionMatrix.copy(source.projectionMatrix);this.projectionMatrixInverse.copy(source.projectionMatrixInverse);this.coordinateSystem=source.coordinateSystem;return this}getWorldDirection(target){return super.getWorldDirection(target).negate()}updateMatrixWorld(force){super.updateMatrixWorld(force);this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(updateParents,updateChildren){super.updateWorldMatrix(updateParents,updateChildren);this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const _v3$1=new Vector3;const _minTarget=new Vector2;const _maxTarget=new Vector2;class PerspectiveCamera extends Camera{constructor(fov=50,aspect=1,near=0.1,far=2000){super();this.isPerspectiveCamera=true;this.type="PerspectiveCamera";this.fov=fov;this.zoom=1;this.near=near;this.far=far;this.focus=10;this.aspect=aspect;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}copy(source,recursive){super.copy(source,recursive);this.fov=source.fov;this.zoom=source.zoom;this.near=source.near;this.far=source.far;this.focus=source.focus;this.aspect=source.aspect;this.view=source.view===null?null:Object.assign({},source.view);this.filmGauge=source.filmGauge;this.filmOffset=source.filmOffset;return this}setFocalLength(focalLength){const vExtentSlope=0.5*this.getFilmHeight()/focalLength;this.fov=RAD2DEG*2*Math.atan(vExtentSlope);this.updateProjectionMatrix()}getFocalLength(){const vExtentSlope=Math.tan(DEG2RAD*0.5*this.fov);return 0.5*this.getFilmHeight()/vExtentSlope}getEffectiveFOV(){return RAD2DEG*2*Math.atan(Math.tan(DEG2RAD*0.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(distance,minTarget,maxTarget){_v3$1.set(-1,-1,0.5).applyMatrix4(this.projectionMatrixInverse);minTarget.set(_v3$1.x,_v3$1.y).multiplyScalar(-distance/_v3$1.z);_v3$1.set(1,1,0.5).applyMatrix4(this.projectionMatrixInverse);maxTarget.set(_v3$1.x,_v3$1.y).multiplyScalar(-distance/_v3$1.z)}getViewSize(distance,target){this.getViewBounds(distance,_minTarget,_maxTarget);return target.subVectors(_maxTarget,_minTarget)}setViewOffset(fullWidth,fullHeight,x,y,width,height){this.aspect=fullWidth/fullHeight;if(this.view===null){this.view={enabled:true,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}}this.view.enabled=true;this.view.fullWidth=fullWidth;this.view.fullHeight=fullHeight;this.view.offsetX=x;this.view.offsetY=y;this.view.width=width;this.view.height=height;this.updateProjectionMatrix()}clearViewOffset(){if(this.view!==null){this.view.enabled=false}this.updateProjectionMatrix()}updateProjectionMatrix(){const near=this.near;let top=near*Math.tan(DEG2RAD*0.5*this.fov)/this.zoom;let height=2*top;let width=this.aspect*height;let left=-0.5*width;const view=this.view;if(this.view!==null&&this.view.enabled){const fullWidth=view.fullWidth,fullHeight=view.fullHeight;left+=view.offsetX*width/fullWidth;top-=view.offsetY*height/fullHeight;width*=view.width/fullWidth;height*=view.height/fullHeight}const skew=this.filmOffset;if(skew!==0)left+=near*skew/this.getFilmWidth();this.projectionMatrix.makePerspective(left,left+width,top,top-height,near,this.far,this.coordinateSystem);this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(meta){const data=super.toJSON(meta);data.object.fov=this.fov;data.object.zoom=this.zoom;data.object.near=this.near;data.object.far=this.far;data.object.focus=this.focus;data.object.aspect=this.aspect;if(this.view!==null)data.object.view=Object.assign({},this.view);data.object.filmGauge=this.filmGauge;data.object.filmOffset=this.filmOffset;return data}}const fov=-90;const aspect=1;class CubeCamera extends Object3D{constructor(near,far,renderTarget){super();this.type="CubeCamera";this.renderTarget=renderTarget;this.coordinateSystem=null;this.activeMipmapLevel=0;const cameraPX=new PerspectiveCamera(fov,aspect,near,far);cameraPX.layers=this.layers;this.add(cameraPX);const cameraNX=new PerspectiveCamera(fov,aspect,near,far);cameraNX.layers=this.layers;this.add(cameraNX);const cameraPY=new PerspectiveCamera(fov,aspect,near,far);cameraPY.layers=this.layers;this.add(cameraPY);const cameraNY=new PerspectiveCamera(fov,aspect,near,far);cameraNY.layers=this.layers;this.add(cameraNY);const cameraPZ=new PerspectiveCamera(fov,aspect,near,far);cameraPZ.layers=this.layers;this.add(cameraPZ);const cameraNZ=new PerspectiveCamera(fov,aspect,near,far);cameraNZ.layers=this.layers;this.add(cameraNZ)}updateCoordinateSystem(){const coordinateSystem=this.coordinateSystem;const cameras=this.children.concat();const[cameraPX,cameraNX,cameraPY,cameraNY,cameraPZ,cameraNZ]=cameras;for(const camera of cameras)this.remove(camera);if(coordinateSystem===WebGLCoordinateSystem){cameraPX.up.set(0,1,0);cameraPX.lookAt(1,0,0);cameraNX.up.set(0,1,0);cameraNX.lookAt(-1,0,0);cameraPY.up.set(0,0,-1);cameraPY.lookAt(0,1,0);cameraNY.up.set(0,0,1);cameraNY.lookAt(0,-1,0);cameraPZ.up.set(0,1,0);cameraPZ.lookAt(0,0,1);cameraNZ.up.set(0,1,0);cameraNZ.lookAt(0,0,-1)}else if(coordinateSystem===WebGPUCoordinateSystem){cameraPX.up.set(0,-1,0);cameraPX.lookAt(-1,0,0);cameraNX.up.set(0,-1,0);cameraNX.lookAt(1,0,0);cameraPY.up.set(0,0,1);cameraPY.lookAt(0,1,0);cameraNY.up.set(0,0,-1);cameraNY.lookAt(0,-1,0);cameraPZ.up.set(0,-1,0);cameraPZ.lookAt(0,0,1);cameraNZ.up.set(0,-1,0);cameraNZ.lookAt(0,0,-1)}else{throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+coordinateSystem)}for(const camera of cameras){this.add(camera);camera.updateMatrixWorld()}}update(renderer,scene){if(this.parent===null)this.updateMatrixWorld();const{renderTarget,activeMipmapLevel}=this;if(this.coordinateSystem!==renderer.coordinateSystem){this.coordinateSystem=renderer.coordinateSystem;this.updateCoordinateSystem()}const[cameraPX,cameraNX,cameraPY,cameraNY,cameraPZ,cameraNZ]=this.children;const currentRenderTarget=renderer.getRenderTarget();const currentActiveCubeFace=renderer.getActiveCubeFace();const currentActiveMipmapLevel=renderer.getActiveMipmapLevel();const currentXrEnabled=renderer.xr.enabled;renderer.xr.enabled=false;const generateMipmaps=renderTarget.texture.generateMipmaps;renderTarget.texture.generateMipmaps=false;renderer.setRenderTarget(renderTarget,0,activeMipmapLevel);renderer.render(scene,cameraPX);renderer.setRenderTarget(renderTarget,1,activeMipmapLevel);renderer.render(scene,cameraNX);renderer.setRenderTarget(renderTarget,2,activeMipmapLevel);renderer.render(scene,cameraPY);renderer.setRenderTarget(renderTarget,3,activeMipmapLevel);renderer.render(scene,cameraNY);renderer.setRenderTarget(renderTarget,4,activeMipmapLevel);renderer.render(scene,cameraPZ);renderTarget.texture.generateMipmaps=generateMipmaps;renderer.setRenderTarget(renderTarget,5,activeMipmapLevel);renderer.render(scene,cameraNZ);renderer.setRenderTarget(currentRenderTarget,currentActiveCubeFace,currentActiveMipmapLevel);renderer.xr.enabled=currentXrEnabled;renderTarget.texture.needsPMREMUpdate=true}}class CubeTexture extends Texture{constructor(images,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace){images=images!==undefined?images:[];mapping=mapping!==undefined?mapping:CubeReflectionMapping;super(images,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace);this.isCubeTexture=true;this.flipY=false}get images(){return this.image}set images(value){this.image=value}}class WebGLCubeRenderTarget extends WebGLRenderTarget{constructor(size=1,options={}){super(size,size,options);this.isWebGLCubeRenderTarget=true;const image={width:size,height:size,depth:1};const images=[image,image,image,image,image,image];this.texture=new CubeTexture(images,options.mapping,options.wrapS,options.wrapT,options.magFilter,options.minFilter,options.format,options.type,options.anisotropy,options.colorSpace);this.texture.isRenderTargetTexture=true;this.texture.generateMipmaps=options.generateMipmaps!==undefined?options.generateMipmaps:false;this.texture.minFilter=options.minFilter!==undefined?options.minFilter:LinearFilter}fromEquirectangularTexture(renderer,texture){this.texture.type=texture.type;this.texture.colorSpace=texture.colorSpace;this.texture.generateMipmaps=texture.generateMipmaps;this.texture.minFilter=texture.minFilter;this.texture.magFilter=texture.magFilter;const shader={uniforms:{tEquirect:{value:null}},vertexShader:`

				varying vec3 vWorldDirection;

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

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

				}

				void main() {

					vWorldDirection = transformDirection( position, modelMatrix );

					#include <begin_vertex>
					#include <project_vertex>

				}
			`,fragmentShader:`

				uniform sampler2D tEquirect;

				varying vec3 vWorldDirection;

				#include <common>

				void main() {

					vec3 direction = normalize( vWorldDirection );

					vec2 sampleUV = equirectUv( direction );

					gl_FragColor = texture2D( tEquirect, sampleUV );

				}
			`};const geometry=new BoxGeometry(5,5,5);const material=new ShaderMaterial({name:"CubemapFromEquirect",uniforms:cloneUniforms(shader.uniforms),vertexShader:shader.vertexShader,fragmentShader:shader.fragmentShader,side:BackSide,blending:NoBlending});material.uniforms.tEquirect.value=texture;const mesh=new Mesh(geometry,material);const currentMinFilter=texture.minFilter;if(texture.minFilter===LinearMipmapLinearFilter)texture.minFilter=LinearFilter;const camera=new CubeCamera(1,10,this);camera.update(renderer,mesh);texture.minFilter=currentMinFilter;mesh.geometry.dispose();mesh.material.dispose();return this}clear(renderer,color,depth,stencil){const currentRenderTarget=renderer.getRenderTarget();for(let i=0;i<6;i++){renderer.setRenderTarget(this,i);renderer.clear(color,depth,stencil)}renderer.setRenderTarget(currentRenderTarget)}}const _vector1=new Vector3;const _vector2=new Vector3;const _normalMatrix=new Matrix3;class Plane{constructor(normal=new Vector3(1,0,0),constant=0){this.isPlane=true;this.normal=normal;this.constant=constant}set(normal,constant){this.normal.copy(normal);this.constant=constant;return this}setComponents(x,y,z,w){this.normal.set(x,y,z);this.constant=w;return this}setFromNormalAndCoplanarPoint(normal,point){this.normal.copy(normal);this.constant=-point.dot(this.normal);return this}setFromCoplanarPoints(a,b,c){const normal=_vector1.subVectors(c,b).cross(_vector2.subVectors(a,b)).normalize();this.setFromNormalAndCoplanarPoint(normal,a);return this}copy(plane){this.normal.copy(plane.normal);this.constant=plane.constant;return this}normalize(){const inverseNormalLength=1/this.normal.length();this.normal.multiplyScalar(inverseNormalLength);this.constant*=inverseNormalLength;return this}negate(){this.constant*=-1;this.normal.negate();return this}distanceToPoint(point){return this.normal.dot(point)+this.constant}distanceToSphere(sphere){return this.distanceToPoint(sphere.center)-sphere.radius}projectPoint(point,target){return target.copy(point).addScaledVector(this.normal,-this.distanceToPoint(point))}intersectLine(line,target){const direction=line.delta(_vector1);const denominator=this.normal.dot(direction);if(denominator===0){if(this.distanceToPoint(line.start)===0){return target.copy(line.start)}return null}const t=-(line.start.dot(this.normal)+this.constant)/denominator;if(t<0||t>1){return null}return target.copy(line.start).addScaledVector(direction,t)}intersectsLine(line){const startSign=this.distanceToPoint(line.start);const endSign=this.distanceToPoint(line.end);return startSign<0&&endSign>0||endSign<0&&startSign>0}intersectsBox(box){return box.intersectsPlane(this)}intersectsSphere(sphere){return sphere.intersectsPlane(this)}coplanarPoint(target){return target.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(matrix,optionalNormalMatrix){const normalMatrix=optionalNormalMatrix||_normalMatrix.getNormalMatrix(matrix);const referencePoint=this.coplanarPoint(_vector1).applyMatrix4(matrix);const normal=this.normal.applyMatrix3(normalMatrix).normalize();this.constant=-referencePoint.dot(normal);return this}translate(offset){this.constant-=offset.dot(this.normal);return this}equals(plane){return plane.normal.equals(this.normal)&&plane.constant===this.constant}clone(){return new this.constructor().copy(this)}}const _sphere$5=new Sphere;const _vector$7=new Vector3;class Frustum{constructor(p0=new Plane,p1=new Plane,p2=new Plane,p3=new Plane,p4=new Plane,p5=new Plane){this.planes=[p0,p1,p2,p3,p4,p5]}set(p0,p1,p2,p3,p4,p5){const planes=this.planes;planes[0].copy(p0);planes[1].copy(p1);planes[2].copy(p2);planes[3].copy(p3);planes[4].copy(p4);planes[5].copy(p5);return this}copy(frustum){const planes=this.planes;for(let i=0;i<6;i++){planes[i].copy(frustum.planes[i])}return this}setFromProjectionMatrix(m,coordinateSystem=WebGLCoordinateSystem){const planes=this.planes;const me=m.elements;const me0=me[0],me1=me[1],me2=me[2],me3=me[3];const me4=me[4],me5=me[5],me6=me[6],me7=me[7];const me8=me[8],me9=me[9],me10=me[10],me11=me[11];const me12=me[12],me13=me[13],me14=me[14],me15=me[15];planes[0].setComponents(me3-me0,me7-me4,me11-me8,me15-me12).normalize();planes[1].setComponents(me3+me0,me7+me4,me11+me8,me15+me12).normalize();planes[2].setComponents(me3+me1,me7+me5,me11+me9,me15+me13).normalize();planes[3].setComponents(me3-me1,me7-me5,me11-me9,me15-me13).normalize();planes[4].setComponents(me3-me2,me7-me6,me11-me10,me15-me14).normalize();if(coordinateSystem===WebGLCoordinateSystem){planes[5].setComponents(me3+me2,me7+me6,me11+me10,me15+me14).normalize()}else if(coordinateSystem===WebGPUCoordinateSystem){planes[5].setComponents(me2,me6,me10,me14).normalize()}else{throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+coordinateSystem)}return this}intersectsObject(object){if(object.boundingSphere!==undefined){if(object.boundingSphere===null)object.computeBoundingSphere();_sphere$5.copy(object.boundingSphere).applyMatrix4(object.matrixWorld)}else{const geometry=object.geometry;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere$5.copy(geometry.boundingSphere).applyMatrix4(object.matrixWorld)}return this.intersectsSphere(_sphere$5)}intersectsSprite(sprite){_sphere$5.center.set(0,0,0);_sphere$5.radius=0.7071067811865476;_sphere$5.applyMatrix4(sprite.matrixWorld);return this.intersectsSphere(_sphere$5)}intersectsSphere(sphere){const planes=this.planes;const center=sphere.center;const negRadius=-sphere.radius;for(let i=0;i<6;i++){const distance=planes[i].distanceToPoint(center);if(distance<negRadius){return false}}return true}intersectsBox(box){const planes=this.planes;for(let i=0;i<6;i++){const plane=planes[i];_vector$7.x=plane.normal.x>0?box.max.x:box.min.x;_vector$7.y=plane.normal.y>0?box.max.y:box.min.y;_vector$7.z=plane.normal.z>0?box.max.z:box.min.z;if(plane.distanceToPoint(_vector$7)<0){return false}}return true}containsPoint(point){const planes=this.planes;for(let i=0;i<6;i++){if(planes[i].distanceToPoint(point)<0){return false}}return true}clone(){return new this.constructor().copy(this)}}function WebGLAnimation(){let context=null;let isAnimating=false;let animationLoop=null;let requestId=null;function onAnimationFrame(time,frame){animationLoop(time,frame);requestId=context.requestAnimationFrame(onAnimationFrame)}return{start:function(){if(isAnimating===true)return;if(animationLoop===null)return;requestId=context.requestAnimationFrame(onAnimationFrame);isAnimating=true},stop:function(){context.cancelAnimationFrame(requestId);isAnimating=false},setAnimationLoop:function(callback){animationLoop=callback},setContext:function(value){context=value}}}function WebGLAttributes(gl){const buffers=new WeakMap;function createBuffer(attribute,bufferType){const array=attribute.array;const usage=attribute.usage;const size=array.byteLength;const buffer=gl.createBuffer();gl.bindBuffer(bufferType,buffer);gl.bufferData(bufferType,array,usage);attribute.onUploadCallback();let type;if(array instanceof Float32Array){type=gl.FLOAT}else if(array instanceof Uint16Array){if(attribute.isFloat16BufferAttribute){type=gl.HALF_FLOAT}else{type=gl.UNSIGNED_SHORT}}else if(array instanceof Int16Array){type=gl.SHORT}else if(array instanceof Uint32Array){type=gl.UNSIGNED_INT}else if(array instanceof Int32Array){type=gl.INT}else if(array instanceof Int8Array){type=gl.BYTE}else if(array instanceof Uint8Array){type=gl.UNSIGNED_BYTE}else if(array instanceof Uint8ClampedArray){type=gl.UNSIGNED_BYTE}else{throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+array)}return{buffer:buffer,type:type,bytesPerElement:array.BYTES_PER_ELEMENT,version:attribute.version,size:size}}function updateBuffer(buffer,attribute,bufferType){const array=attribute.array;const updateRange=attribute._updateRange;const updateRanges=attribute.updateRanges;gl.bindBuffer(bufferType,buffer);if(updateRange.count===-1&&updateRanges.length===0){gl.bufferSubData(bufferType,0,array)}if(updateRanges.length!==0){for(let i=0,l=updateRanges.length;i<l;i++){const range=updateRanges[i];gl.bufferSubData(bufferType,range.start*array.BYTES_PER_ELEMENT,array,range.start,range.count)}attribute.clearUpdateRanges()}if(updateRange.count!==-1){gl.bufferSubData(bufferType,updateRange.offset*array.BYTES_PER_ELEMENT,array,updateRange.offset,updateRange.count);updateRange.count=-1}attribute.onUploadCallback()}function get(attribute){if(attribute.isInterleavedBufferAttribute)attribute=attribute.data;return buffers.get(attribute)}function remove(attribute){if(attribute.isInterleavedBufferAttribute)attribute=attribute.data;const data=buffers.get(attribute);if(data){gl.deleteBuffer(data.buffer);buffers.delete(attribute)}}function update(attribute,bufferType){if(attribute.isInterleavedBufferAttribute)attribute=attribute.data;if(attribute.isGLBufferAttribute){const cached=buffers.get(attribute);if(!cached||cached.version<attribute.version){buffers.set(attribute,{buffer:attribute.buffer,type:attribute.type,bytesPerElement:attribute.elementSize,version:attribute.version})}return}const data=buffers.get(attribute);if(data===undefined){buffers.set(attribute,createBuffer(attribute,bufferType))}else if(data.version<attribute.version){if(data.size!==attribute.array.byteLength){throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.")}updateBuffer(data.buffer,attribute,bufferType);data.version=attribute.version}}return{get:get,remove:remove,update:update}}class PlaneGeometry extends BufferGeometry{constructor(width=1,height=1,widthSegments=1,heightSegments=1){super();this.type="PlaneGeometry";this.parameters={width:width,height:height,widthSegments:widthSegments,heightSegments:heightSegments};const width_half=width/2;const height_half=height/2;const gridX=Math.floor(widthSegments);const gridY=Math.floor(heightSegments);const gridX1=gridX+1;const gridY1=gridY+1;const segment_width=width/gridX;const segment_height=height/gridY;const indices=[];const vertices=[];const normals=[];const uvs=[];for(let iy=0;iy<gridY1;iy++){const y=iy*segment_height-height_half;for(let ix=0;ix<gridX1;ix++){const x=ix*segment_width-width_half;vertices.push(x,-y,0);normals.push(0,0,1);uvs.push(ix/gridX);uvs.push(1-iy/gridY)}}for(let iy=0;iy<gridY;iy++){for(let ix=0;ix<gridX;ix++){const a=ix+gridX1*iy;const b=ix+gridX1*(iy+1);const c=ix+1+gridX1*(iy+1);const d=ix+1+gridX1*iy;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new PlaneGeometry(data.width,data.height,data.widthSegments,data.heightSegments)}}var alphahash_fragment="#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif";var alphahash_pars_fragment="#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif";var alphamap_fragment="#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif";var alphamap_pars_fragment="#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif";var alphatest_fragment="#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif";var alphatest_pars_fragment="#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif";var aomap_fragment="#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif";var aomap_pars_fragment="#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif";var batching_pars_vertex="#ifdef USE_BATCHING\n\t#if ! defined( GL_ANGLE_multi_draw )\n\t#define gl_DrawID _gl_DrawID\n\tuniform int _gl_DrawID;\n\t#endif\n\tuniform highp sampler2D batchingTexture;\n\tuniform highp usampler2D batchingIdTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n\tfloat getIndirectIndex( const in int i ) {\n\t\tint size = textureSize( batchingIdTexture, 0 ).x;\n\t\tint x = i % size;\n\t\tint y = i / size;\n\t\treturn float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n\t}\n#endif\n#ifdef USE_BATCHING_COLOR\n\tuniform sampler2D batchingColorTexture;\n\tvec3 getBatchingColor( const in float i ) {\n\t\tint size = textureSize( batchingColorTexture, 0 ).x;\n\t\tint j = int( i );\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\treturn texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;\n\t}\n#endif";var batching_vertex="#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif";var begin_vertex="vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif";var beginnormal_vertex="vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif";var bsdfs="float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated";var iridescence_fragment="#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660,  0.0556434,\n\t\t-1.5371385,  1.8760108, -0.2040259,\n\t\t-0.4985314,  0.0415560,  1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif";var bumpmap_pars_fragment="#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif";var clipping_planes_fragment="#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif";var clipping_planes_pars_fragment="#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif";var clipping_planes_pars_vertex="#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif";var clipping_planes_vertex="#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif";var color_fragment="#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif";var color_pars_fragment="#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif";var color_pars_vertex="#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvarying vec3 vColor;\n#endif";var color_vertex="#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.xyz;\n#endif";var common="#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated";var cube_uv_reflection_fragment="#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif";var defaultnormal_vertex="vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif";var displacementmap_pars_vertex="#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif";var displacementmap_vertex="#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif";var emissivemap_fragment="#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif";var emissivemap_pars_fragment="#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif";var colorspace_fragment="gl_FragColor = linearToOutputTexel( gl_FragColor );";var colorspace_pars_fragment="\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}";var envmap_fragment="#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif";var envmap_common_pars_fragment="#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif";var envmap_pars_fragment="#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif";var envmap_pars_vertex="#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif";var envmap_vertex="#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif";var fog_vertex="#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif";var fog_pars_vertex="#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif";var fog_fragment="#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif";var fog_pars_fragment="#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif";var gradientmap_pars_fragment="#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}";var lightmap_pars_fragment="#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif";var lights_lambert_fragment="LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;";var lights_lambert_pars_fragment="varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert";var lights_pars_begin="uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif";var envmap_physical_pars_fragment="#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif";var lights_toon_fragment="ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;";var lights_toon_pars_fragment="varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon";var lights_phong_fragment="BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;";var lights_phong_pars_fragment="varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong";var lights_physical_fragment="PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n\tmaterial.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif";var lights_physical_pars_fragment="struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\tfloat dispersion;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n    float x2 = x * x;\n    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}";var lights_fragment_begin="\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif";var lights_fragment_maps="#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif";var lights_fragment_end="#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif";var logdepthbuf_fragment="#if defined( USE_LOGDEPTHBUF )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif";var logdepthbuf_pars_fragment="#if defined( USE_LOGDEPTHBUF )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif";var logdepthbuf_pars_vertex="#ifdef USE_LOGDEPTHBUF\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif";var logdepthbuf_vertex="#ifdef USE_LOGDEPTHBUF\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif";var map_fragment="#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif";var map_pars_fragment="#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif";var map_particle_fragment="#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif";var map_particle_pars_fragment="#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif";var metalnessmap_fragment="float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif";var metalnessmap_pars_fragment="#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif";var morphinstance_vertex="#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] =  texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif";var morphcolor_vertex="#if defined( USE_MORPHCOLORS )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif";var morphnormal_vertex="#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif";var morphtarget_pars_vertex="#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif";var morphtarget_vertex="#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif";var normal_fragment_begin="float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;";var normal_fragment_maps="#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif";var normal_pars_fragment="#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif";var normal_pars_vertex="#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif";var normal_vertex="#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif";var normalmap_pars_fragment="#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif";var clearcoat_normal_fragment_begin="#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif";var clearcoat_normal_fragment_maps="#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif";var clearcoat_pars_fragment="#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif";var iridescence_pars_fragment="#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif";var opaque_fragment="#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );";var packing="vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}";var premultiplied_alpha_fragment="#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif";var project_vertex="vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;";var dithering_fragment="#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif";var dithering_pars_fragment="#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif";var roughnessmap_fragment="float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif";var roughnessmap_pars_fragment="#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif";var shadowmap_pars_fragment="#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\t\n\t\tfloat lightToPositionLength = length( lightToPosition );\n\t\tif ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\t\tdp += shadowBias;\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t\t) * ( 1.0 / 9.0 );\n\t\t\t#else\n\t\t\t\tshadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t\t#endif\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n#endif";var shadowmap_pars_vertex="#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif";var shadowmap_vertex="#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif";var shadowmask_pars_fragment="float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}";var skinbase_vertex="#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif";var skinning_pars_vertex="#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif";var skinning_vertex="#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif";var skinnormal_vertex="#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif";var specularmap_fragment="float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif";var specularmap_pars_fragment="#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif";var tonemapping_fragment="#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif";var tonemapping_pars_fragment="#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\tif ( peak < StartCompression ) return color;\n\tfloat d = 1. - StartCompression;\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\treturn mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }";var transmission_fragment="#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif";var transmission_pars_fragment="#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif";var uv_pars_fragment="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif";var uv_pars_vertex="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif";var uv_vertex="#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif";var worldpos_vertex="#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif";const vertex$h="varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}";const fragment$h="uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$g="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}";const fragment$g="#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$f="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}";const fragment$f="uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$e="#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}";const fragment$e="#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n\t#endif\n}";const vertex$d="#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}";const fragment$d="#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}";const vertex$c="varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}";const fragment$c="uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";const vertex$b="uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}";const fragment$b="uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}";const vertex$a="#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$a="uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$9="#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$9="#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$8="#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}";const fragment$8="#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$7="#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}";const fragment$7="#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}";const vertex$6="#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$6="#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$5="#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}";const fragment$5="#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$4="#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$4="#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}";const vertex$3="uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}";const fragment$3="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}";const vertex$2="#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";const fragment$2="uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}";const vertex$1="uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}";const fragment$1="uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}";const ShaderChunk={alphahash_fragment:alphahash_fragment,alphahash_pars_fragment:alphahash_pars_fragment,alphamap_fragment:alphamap_fragment,alphamap_pars_fragment:alphamap_pars_fragment,alphatest_fragment:alphatest_fragment,alphatest_pars_fragment:alphatest_pars_fragment,aomap_fragment:aomap_fragment,aomap_pars_fragment:aomap_pars_fragment,batching_pars_vertex:batching_pars_vertex,batching_vertex:batching_vertex,begin_vertex:begin_vertex,beginnormal_vertex:beginnormal_vertex,bsdfs:bsdfs,iridescence_fragment:iridescence_fragment,bumpmap_pars_fragment:bumpmap_pars_fragment,clipping_planes_fragment:clipping_planes_fragment,clipping_planes_pars_fragment:clipping_planes_pars_fragment,clipping_planes_pars_vertex:clipping_planes_pars_vertex,clipping_planes_vertex:clipping_planes_vertex,color_fragment:color_fragment,color_pars_fragment:color_pars_fragment,color_pars_vertex:color_pars_vertex,color_vertex:color_vertex,common:common,cube_uv_reflection_fragment:cube_uv_reflection_fragment,defaultnormal_vertex:defaultnormal_vertex,displacementmap_pars_vertex:displacementmap_pars_vertex,displacementmap_vertex:displacementmap_vertex,emissivemap_fragment:emissivemap_fragment,emissivemap_pars_fragment:emissivemap_pars_fragment,colorspace_fragment:colorspace_fragment,colorspace_pars_fragment:colorspace_pars_fragment,envmap_fragment:envmap_fragment,envmap_common_pars_fragment:envmap_common_pars_fragment,envmap_pars_fragment:envmap_pars_fragment,envmap_pars_vertex:envmap_pars_vertex,envmap_physical_pars_fragment:envmap_physical_pars_fragment,envmap_vertex:envmap_vertex,fog_vertex:fog_vertex,fog_pars_vertex:fog_pars_vertex,fog_fragment:fog_fragment,fog_pars_fragment:fog_pars_fragment,gradientmap_pars_fragment:gradientmap_pars_fragment,lightmap_pars_fragment:lightmap_pars_fragment,lights_lambert_fragment:lights_lambert_fragment,lights_lambert_pars_fragment:lights_lambert_pars_fragment,lights_pars_begin:lights_pars_begin,lights_toon_fragment:lights_toon_fragment,lights_toon_pars_fragment:lights_toon_pars_fragment,lights_phong_fragment:lights_phong_fragment,lights_phong_pars_fragment:lights_phong_pars_fragment,lights_physical_fragment:lights_physical_fragment,lights_physical_pars_fragment:lights_physical_pars_fragment,lights_fragment_begin:lights_fragment_begin,lights_fragment_maps:lights_fragment_maps,lights_fragment_end:lights_fragment_end,logdepthbuf_fragment:logdepthbuf_fragment,logdepthbuf_pars_fragment:logdepthbuf_pars_fragment,logdepthbuf_pars_vertex:logdepthbuf_pars_vertex,logdepthbuf_vertex:logdepthbuf_vertex,map_fragment:map_fragment,map_pars_fragment:map_pars_fragment,map_particle_fragment:map_particle_fragment,map_particle_pars_fragment:map_particle_pars_fragment,metalnessmap_fragment:metalnessmap_fragment,metalnessmap_pars_fragment:metalnessmap_pars_fragment,morphinstance_vertex:morphinstance_vertex,morphcolor_vertex:morphcolor_vertex,morphnormal_vertex:morphnormal_vertex,morphtarget_pars_vertex:morphtarget_pars_vertex,morphtarget_vertex:morphtarget_vertex,normal_fragment_begin:normal_fragment_begin,normal_fragment_maps:normal_fragment_maps,normal_pars_fragment:normal_pars_fragment,normal_pars_vertex:normal_pars_vertex,normal_vertex:normal_vertex,normalmap_pars_fragment:normalmap_pars_fragment,clearcoat_normal_fragment_begin:clearcoat_normal_fragment_begin,clearcoat_normal_fragment_maps:clearcoat_normal_fragment_maps,clearcoat_pars_fragment:clearcoat_pars_fragment,iridescence_pars_fragment:iridescence_pars_fragment,opaque_fragment:opaque_fragment,packing:packing,premultiplied_alpha_fragment:premultiplied_alpha_fragment,project_vertex:project_vertex,dithering_fragment:dithering_fragment,dithering_pars_fragment:dithering_pars_fragment,roughnessmap_fragment:roughnessmap_fragment,roughnessmap_pars_fragment:roughnessmap_pars_fragment,shadowmap_pars_fragment:shadowmap_pars_fragment,shadowmap_pars_vertex:shadowmap_pars_vertex,shadowmap_vertex:shadowmap_vertex,shadowmask_pars_fragment:shadowmask_pars_fragment,skinbase_vertex:skinbase_vertex,skinning_pars_vertex:skinning_pars_vertex,skinning_vertex:skinning_vertex,skinnormal_vertex:skinnormal_vertex,specularmap_fragment:specularmap_fragment,specularmap_pars_fragment:specularmap_pars_fragment,tonemapping_fragment:tonemapping_fragment,tonemapping_pars_fragment:tonemapping_pars_fragment,transmission_fragment:transmission_fragment,transmission_pars_fragment:transmission_pars_fragment,uv_pars_fragment:uv_pars_fragment,uv_pars_vertex:uv_pars_vertex,uv_vertex:uv_vertex,worldpos_vertex:worldpos_vertex,background_vert:vertex$h,background_frag:fragment$h,backgroundCube_vert:vertex$g,backgroundCube_frag:fragment$g,cube_vert:vertex$f,cube_frag:fragment$f,depth_vert:vertex$e,depth_frag:fragment$e,distanceRGBA_vert:vertex$d,distanceRGBA_frag:fragment$d,equirect_vert:vertex$c,equirect_frag:fragment$c,linedashed_vert:vertex$b,linedashed_frag:fragment$b,meshbasic_vert:vertex$a,meshbasic_frag:fragment$a,meshlambert_vert:vertex$9,meshlambert_frag:fragment$9,meshmatcap_vert:vertex$8,meshmatcap_frag:fragment$8,meshnormal_vert:vertex$7,meshnormal_frag:fragment$7,meshphong_vert:vertex$6,meshphong_frag:fragment$6,meshphysical_vert:vertex$5,meshphysical_frag:fragment$5,meshtoon_vert:vertex$4,meshtoon_frag:fragment$4,points_vert:vertex$3,points_frag:fragment$3,shadow_vert:vertex$2,shadow_frag:fragment$2,sprite_vert:vertex$1,sprite_frag:fragment$1};const UniformsLib={common:{diffuse:{value:new Color(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Matrix3}},envmap:{envMap:{value:null},envMapRotation:{value:new Matrix3},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:0.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Matrix3}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Matrix3}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Matrix3},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Matrix3},normalScale:{value:new Vector2(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Matrix3},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Matrix3}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Matrix3}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Matrix3}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:0.00025},fogNear:{value:1},fogFar:{value:2000},fogColor:{value:new Color(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Color(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0},uvTransform:{value:new Matrix3}},sprite:{diffuse:{value:new Color(16777215)},opacity:{value:1},center:{value:new Vector2(0.5,0.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Matrix3},alphaMap:{value:null},alphaMapTransform:{value:new Matrix3},alphaTest:{value:0}}};const ShaderLib={basic:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.fog]),vertexShader:ShaderChunk.meshbasic_vert,fragmentShader:ShaderChunk.meshbasic_frag},lambert:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)}}]),vertexShader:ShaderChunk.meshlambert_vert,fragmentShader:ShaderChunk.meshlambert_frag},phong:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.specularmap,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)},specular:{value:new Color(1118481)},shininess:{value:30}}]),vertexShader:ShaderChunk.meshphong_vert,fragmentShader:ShaderChunk.meshphong_frag},standard:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.envmap,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.roughnessmap,UniformsLib.metalnessmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ShaderChunk.meshphysical_vert,fragmentShader:ShaderChunk.meshphysical_frag},toon:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.aomap,UniformsLib.lightmap,UniformsLib.emissivemap,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.gradientmap,UniformsLib.fog,UniformsLib.lights,{emissive:{value:new Color(0)}}]),vertexShader:ShaderChunk.meshtoon_vert,fragmentShader:ShaderChunk.meshtoon_frag},matcap:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,UniformsLib.fog,{matcap:{value:null}}]),vertexShader:ShaderChunk.meshmatcap_vert,fragmentShader:ShaderChunk.meshmatcap_frag},points:{uniforms:mergeUniforms([UniformsLib.points,UniformsLib.fog]),vertexShader:ShaderChunk.points_vert,fragmentShader:ShaderChunk.points_frag},dashed:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ShaderChunk.linedashed_vert,fragmentShader:ShaderChunk.linedashed_frag},depth:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap]),vertexShader:ShaderChunk.depth_vert,fragmentShader:ShaderChunk.depth_frag},normal:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.bumpmap,UniformsLib.normalmap,UniformsLib.displacementmap,{opacity:{value:1}}]),vertexShader:ShaderChunk.meshnormal_vert,fragmentShader:ShaderChunk.meshnormal_frag},sprite:{uniforms:mergeUniforms([UniformsLib.sprite,UniformsLib.fog]),vertexShader:ShaderChunk.sprite_vert,fragmentShader:ShaderChunk.sprite_frag},background:{uniforms:{uvTransform:{value:new Matrix3},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ShaderChunk.background_vert,fragmentShader:ShaderChunk.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Matrix3}},vertexShader:ShaderChunk.backgroundCube_vert,fragmentShader:ShaderChunk.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ShaderChunk.cube_vert,fragmentShader:ShaderChunk.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ShaderChunk.equirect_vert,fragmentShader:ShaderChunk.equirect_frag},distanceRGBA:{uniforms:mergeUniforms([UniformsLib.common,UniformsLib.displacementmap,{referencePosition:{value:new Vector3},nearDistance:{value:1},farDistance:{value:1000}}]),vertexShader:ShaderChunk.distanceRGBA_vert,fragmentShader:ShaderChunk.distanceRGBA_frag},shadow:{uniforms:mergeUniforms([UniformsLib.lights,UniformsLib.fog,{color:{value:new Color(0)},opacity:{value:1}}]),vertexShader:ShaderChunk.shadow_vert,fragmentShader:ShaderChunk.shadow_frag}};ShaderLib.physical={uniforms:mergeUniforms([ShaderLib.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Matrix3},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Matrix3},clearcoatNormalScale:{value:new Vector2(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Matrix3},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Matrix3},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Matrix3},sheen:{value:0},sheenColor:{value:new Color(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Matrix3},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Matrix3},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Matrix3},transmissionSamplerSize:{value:new Vector2},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Matrix3},attenuationDistance:{value:0},attenuationColor:{value:new Color(0)},specularColor:{value:new Color(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Matrix3},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Matrix3},anisotropyVector:{value:new Vector2},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Matrix3}}]),vertexShader:ShaderChunk.meshphysical_vert,fragmentShader:ShaderChunk.meshphysical_frag};const _rgb={r:0,b:0,g:0};const _e1$1=new Euler;const _m1$1=new Matrix4;function WebGLBackground(renderer,cubemaps,cubeuvmaps,state,objects,alpha,premultipliedAlpha){const clearColor=new Color(0);let clearAlpha=alpha===true?0:1;let planeMesh;let boxMesh;let currentBackground=null;let currentBackgroundVersion=0;let currentTonemapping=null;function getBackground(scene){let background=scene.isScene===true?scene.background:null;if(background&&background.isTexture){const usePMREM=scene.backgroundBlurriness>0;background=(usePMREM?cubeuvmaps:cubemaps).get(background)}return background}function render(scene){let forceClear=false;const background=getBackground(scene);if(background===null){setClear(clearColor,clearAlpha)}else if(background&&background.isColor){setClear(background,1);forceClear=true}const environmentBlendMode=renderer.xr.getEnvironmentBlendMode();if(environmentBlendMode==="additive"){state.buffers.color.setClear(0,0,0,1,premultipliedAlpha)}else if(environmentBlendMode==="alpha-blend"){state.buffers.color.setClear(0,0,0,0,premultipliedAlpha)}if(renderer.autoClear||forceClear){state.buffers.depth.setTest(true);state.buffers.depth.setMask(true);state.buffers.color.setMask(true);renderer.clear(renderer.autoClearColor,renderer.autoClearDepth,renderer.autoClearStencil)}}function addToRenderList(renderList,scene){const background=getBackground(scene);if(background&&(background.isCubeTexture||background.mapping===CubeUVReflectionMapping)){if(boxMesh===undefined){boxMesh=new Mesh(new BoxGeometry(1,1,1),new ShaderMaterial({name:"BackgroundCubeMaterial",uniforms:cloneUniforms(ShaderLib.backgroundCube.uniforms),vertexShader:ShaderLib.backgroundCube.vertexShader,fragmentShader:ShaderLib.backgroundCube.fragmentShader,side:BackSide,depthTest:false,depthWrite:false,fog:false}));boxMesh.geometry.deleteAttribute("normal");boxMesh.geometry.deleteAttribute("uv");boxMesh.onBeforeRender=function(renderer,scene,camera){this.matrixWorld.copyPosition(camera.matrixWorld)};Object.defineProperty(boxMesh.material,"envMap",{get:function(){return this.uniforms.envMap.value}});objects.update(boxMesh)}_e1$1.copy(scene.backgroundRotation);_e1$1.x*=-1;_e1$1.y*=-1;_e1$1.z*=-1;if(background.isCubeTexture&&background.isRenderTargetTexture===false){_e1$1.y*=-1;_e1$1.z*=-1}boxMesh.material.uniforms.envMap.value=background;boxMesh.material.uniforms.flipEnvMap.value=background.isCubeTexture&&background.isRenderTargetTexture===false?-1:1;boxMesh.material.uniforms.backgroundBlurriness.value=scene.backgroundBlurriness;boxMesh.material.uniforms.backgroundIntensity.value=scene.backgroundIntensity;boxMesh.material.uniforms.backgroundRotation.value.setFromMatrix4(_m1$1.makeRotationFromEuler(_e1$1));boxMesh.material.toneMapped=ColorManagement.getTransfer(background.colorSpace)!==SRGBTransfer;if(currentBackground!==background||currentBackgroundVersion!==background.version||currentTonemapping!==renderer.toneMapping){boxMesh.material.needsUpdate=true;currentBackground=background;currentBackgroundVersion=background.version;currentTonemapping=renderer.toneMapping}boxMesh.layers.enableAll();renderList.unshift(boxMesh,boxMesh.geometry,boxMesh.material,0,0,null)}else if(background&&background.isTexture){if(planeMesh===undefined){planeMesh=new Mesh(new PlaneGeometry(2,2),new ShaderMaterial({name:"BackgroundMaterial",uniforms:cloneUniforms(ShaderLib.background.uniforms),vertexShader:ShaderLib.background.vertexShader,fragmentShader:ShaderLib.background.fragmentShader,side:FrontSide,depthTest:false,depthWrite:false,fog:false}));planeMesh.geometry.deleteAttribute("normal");Object.defineProperty(planeMesh.material,"map",{get:function(){return this.uniforms.t2D.value}});objects.update(planeMesh)}planeMesh.material.uniforms.t2D.value=background;planeMesh.material.uniforms.backgroundIntensity.value=scene.backgroundIntensity;planeMesh.material.toneMapped=ColorManagement.getTransfer(background.colorSpace)!==SRGBTransfer;if(background.matrixAutoUpdate===true){background.updateMatrix()}planeMesh.material.uniforms.uvTransform.value.copy(background.matrix);if(currentBackground!==background||currentBackgroundVersion!==background.version||currentTonemapping!==renderer.toneMapping){planeMesh.material.needsUpdate=true;currentBackground=background;currentBackgroundVersion=background.version;currentTonemapping=renderer.toneMapping}planeMesh.layers.enableAll();renderList.unshift(planeMesh,planeMesh.geometry,planeMesh.material,0,0,null)}}function setClear(color,alpha){color.getRGB(_rgb,getUnlitUniformColorSpace(renderer));state.buffers.color.setClear(_rgb.r,_rgb.g,_rgb.b,alpha,premultipliedAlpha)}return{getClearColor:function(){return clearColor},setClearColor:function(color,alpha=1){clearColor.set(color);clearAlpha=alpha;setClear(clearColor,clearAlpha)},getClearAlpha:function(){return clearAlpha},setClearAlpha:function(alpha){clearAlpha=alpha;setClear(clearColor,clearAlpha)},render:render,addToRenderList:addToRenderList}}function WebGLBindingStates(gl,attributes){const maxVertexAttributes=gl.getParameter(gl.MAX_VERTEX_ATTRIBS);const bindingStates={};const defaultState=createBindingState(null);let currentState=defaultState;let forceUpdate=false;function setup(object,material,program,geometry,index){let updateBuffers=false;const state=getBindingState(geometry,program,material);if(currentState!==state){currentState=state;bindVertexArrayObject(currentState.object)}updateBuffers=needsUpdate(object,geometry,program,index);if(updateBuffers)saveCache(object,geometry,program,index);if(index!==null){attributes.update(index,gl.ELEMENT_ARRAY_BUFFER)}if(updateBuffers||forceUpdate){forceUpdate=false;setupVertexAttributes(object,material,program,geometry);if(index!==null){gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,attributes.get(index).buffer)}}}function createVertexArrayObject(){return gl.createVertexArray()}function bindVertexArrayObject(vao){return gl.bindVertexArray(vao)}function deleteVertexArrayObject(vao){return gl.deleteVertexArray(vao)}function getBindingState(geometry,program,material){const wireframe=material.wireframe===true;let programMap=bindingStates[geometry.id];if(programMap===undefined){programMap={};bindingStates[geometry.id]=programMap}let stateMap=programMap[program.id];if(stateMap===undefined){stateMap={};programMap[program.id]=stateMap}let state=stateMap[wireframe];if(state===undefined){state=createBindingState(createVertexArrayObject());stateMap[wireframe]=state}return state}function createBindingState(vao){const newAttributes=[];const enabledAttributes=[];const attributeDivisors=[];for(let i=0;i<maxVertexAttributes;i++){newAttributes[i]=0;enabledAttributes[i]=0;attributeDivisors[i]=0}return{geometry:null,program:null,wireframe:false,newAttributes:newAttributes,enabledAttributes:enabledAttributes,attributeDivisors:attributeDivisors,object:vao,attributes:{},index:null}}function needsUpdate(object,geometry,program,index){const cachedAttributes=currentState.attributes;const geometryAttributes=geometry.attributes;let attributesNum=0;const programAttributes=program.getAttributes();for(const name in programAttributes){const programAttribute=programAttributes[name];if(programAttribute.location>=0){const cachedAttribute=cachedAttributes[name];let geometryAttribute=geometryAttributes[name];if(geometryAttribute===undefined){if(name==="instanceMatrix"&&object.instanceMatrix)geometryAttribute=object.instanceMatrix;if(name==="instanceColor"&&object.instanceColor)geometryAttribute=object.instanceColor}if(cachedAttribute===undefined)return true;if(cachedAttribute.attribute!==geometryAttribute)return true;if(geometryAttribute&&cachedAttribute.data!==geometryAttribute.data)return true;attributesNum++}}if(currentState.attributesNum!==attributesNum)return true;if(currentState.index!==index)return true;return false}function saveCache(object,geometry,program,index){const cache={};const attributes=geometry.attributes;let attributesNum=0;const programAttributes=program.getAttributes();for(const name in programAttributes){const programAttribute=programAttributes[name];if(programAttribute.location>=0){let attribute=attributes[name];if(attribute===undefined){if(name==="instanceMatrix"&&object.instanceMatrix)attribute=object.instanceMatrix;if(name==="instanceColor"&&object.instanceColor)attribute=object.instanceColor}const data={};data.attribute=attribute;if(attribute&&attribute.data){data.data=attribute.data}cache[name]=data;attributesNum++}}currentState.attributes=cache;currentState.attributesNum=attributesNum;currentState.index=index}function initAttributes(){const newAttributes=currentState.newAttributes;for(let i=0,il=newAttributes.length;i<il;i++){newAttributes[i]=0}}function enableAttribute(attribute){enableAttributeAndDivisor(attribute,0)}function enableAttributeAndDivisor(attribute,meshPerAttribute){const newAttributes=currentState.newAttributes;const enabledAttributes=currentState.enabledAttributes;const attributeDivisors=currentState.attributeDivisors;newAttributes[attribute]=1;if(enabledAttributes[attribute]===0){gl.enableVertexAttribArray(attribute);enabledAttributes[attribute]=1}if(attributeDivisors[attribute]!==meshPerAttribute){gl.vertexAttribDivisor(attribute,meshPerAttribute);attributeDivisors[attribute]=meshPerAttribute}}function disableUnusedAttributes(){const newAttributes=currentState.newAttributes;const enabledAttributes=currentState.enabledAttributes;for(let i=0,il=enabledAttributes.length;i<il;i++){if(enabledAttributes[i]!==newAttributes[i]){gl.disableVertexAttribArray(i);enabledAttributes[i]=0}}}function vertexAttribPointer(index,size,type,normalized,stride,offset,integer){if(integer===true){gl.vertexAttribIPointer(index,size,type,stride,offset)}else{gl.vertexAttribPointer(index,size,type,normalized,stride,offset)}}function setupVertexAttributes(object,material,program,geometry){initAttributes();const geometryAttributes=geometry.attributes;const programAttributes=program.getAttributes();const materialDefaultAttributeValues=material.defaultAttributeValues;for(const name in programAttributes){const programAttribute=programAttributes[name];if(programAttribute.location>=0){let geometryAttribute=geometryAttributes[name];if(geometryAttribute===undefined){if(name==="instanceMatrix"&&object.instanceMatrix)geometryAttribute=object.instanceMatrix;if(name==="instanceColor"&&object.instanceColor)geometryAttribute=object.instanceColor}if(geometryAttribute!==undefined){const normalized=geometryAttribute.normalized;const size=geometryAttribute.itemSize;const attribute=attributes.get(geometryAttribute);if(attribute===undefined)continue;const buffer=attribute.buffer;const type=attribute.type;const bytesPerElement=attribute.bytesPerElement;const integer=type===gl.INT||type===gl.UNSIGNED_INT||geometryAttribute.gpuType===IntType;if(geometryAttribute.isInterleavedBufferAttribute){const data=geometryAttribute.data;const stride=data.stride;const offset=geometryAttribute.offset;if(data.isInstancedInterleavedBuffer){for(let i=0;i<programAttribute.locationSize;i++){enableAttributeAndDivisor(programAttribute.location+i,data.meshPerAttribute)}if(object.isInstancedMesh!==true&&geometry._maxInstanceCount===undefined){geometry._maxInstanceCount=data.meshPerAttribute*data.count}}else{for(let i=0;i<programAttribute.locationSize;i++){enableAttribute(programAttribute.location+i)}}gl.bindBuffer(gl.ARRAY_BUFFER,buffer);for(let i=0;i<programAttribute.locationSize;i++){vertexAttribPointer(programAttribute.location+i,size/programAttribute.locationSize,type,normalized,stride*bytesPerElement,(offset+size/programAttribute.locationSize*i)*bytesPerElement,integer)}}else{if(geometryAttribute.isInstancedBufferAttribute){for(let i=0;i<programAttribute.locationSize;i++){enableAttributeAndDivisor(programAttribute.location+i,geometryAttribute.meshPerAttribute)}if(object.isInstancedMesh!==true&&geometry._maxInstanceCount===undefined){geometry._maxInstanceCount=geometryAttribute.meshPerAttribute*geometryAttribute.count}}else{for(let i=0;i<programAttribute.locationSize;i++){enableAttribute(programAttribute.location+i)}}gl.bindBuffer(gl.ARRAY_BUFFER,buffer);for(let i=0;i<programAttribute.locationSize;i++){vertexAttribPointer(programAttribute.location+i,size/programAttribute.locationSize,type,normalized,size*bytesPerElement,size/programAttribute.locationSize*i*bytesPerElement,integer)}}}else if(materialDefaultAttributeValues!==undefined){const value=materialDefaultAttributeValues[name];if(value!==undefined){switch(value.length){case 2:gl.vertexAttrib2fv(programAttribute.location,value);break;case 3:gl.vertexAttrib3fv(programAttribute.location,value);break;case 4:gl.vertexAttrib4fv(programAttribute.location,value);break;default:gl.vertexAttrib1fv(programAttribute.location,value);}}}}}disableUnusedAttributes()}function dispose(){reset();for(const geometryId in bindingStates){const programMap=bindingStates[geometryId];for(const programId in programMap){const stateMap=programMap[programId];for(const wireframe in stateMap){deleteVertexArrayObject(stateMap[wireframe].object);delete stateMap[wireframe]}delete programMap[programId]}delete bindingStates[geometryId]}}function releaseStatesOfGeometry(geometry){if(bindingStates[geometry.id]===undefined)return;const programMap=bindingStates[geometry.id];for(const programId in programMap){const stateMap=programMap[programId];for(const wireframe in stateMap){deleteVertexArrayObject(stateMap[wireframe].object);delete stateMap[wireframe]}delete programMap[programId]}delete bindingStates[geometry.id]}function releaseStatesOfProgram(program){for(const geometryId in bindingStates){const programMap=bindingStates[geometryId];if(programMap[program.id]===undefined)continue;const stateMap=programMap[program.id];for(const wireframe in stateMap){deleteVertexArrayObject(stateMap[wireframe].object);delete stateMap[wireframe]}delete programMap[program.id]}}function reset(){resetDefaultState();forceUpdate=true;if(currentState===defaultState)return;currentState=defaultState;bindVertexArrayObject(currentState.object)}function resetDefaultState(){defaultState.geometry=null;defaultState.program=null;defaultState.wireframe=false}return{setup:setup,reset:reset,resetDefaultState:resetDefaultState,dispose:dispose,releaseStatesOfGeometry:releaseStatesOfGeometry,releaseStatesOfProgram:releaseStatesOfProgram,initAttributes:initAttributes,enableAttribute:enableAttribute,disableUnusedAttributes:disableUnusedAttributes}}function WebGLBufferRenderer(gl,extensions,info){let mode;function setMode(value){mode=value}function render(start,count){gl.drawArrays(mode,start,count);info.update(count,mode,1)}function renderInstances(start,count,primcount){if(primcount===0)return;gl.drawArraysInstanced(mode,start,count,primcount);info.update(count,mode,primcount)}function renderMultiDraw(starts,counts,drawCount){if(drawCount===0)return;const extension=extensions.get("WEBGL_multi_draw");extension.multiDrawArraysWEBGL(mode,starts,0,counts,0,drawCount);let elementCount=0;for(let i=0;i<drawCount;i++){elementCount+=counts[i]}info.update(elementCount,mode,1)}function renderMultiDrawInstances(starts,counts,drawCount,primcount){if(drawCount===0)return;const extension=extensions.get("WEBGL_multi_draw");if(extension===null){for(let i=0;i<starts.length;i++){renderInstances(starts[i],counts[i],primcount[i])}}else{extension.multiDrawArraysInstancedWEBGL(mode,starts,0,counts,0,primcount,0,drawCount);let elementCount=0;for(let i=0;i<drawCount;i++){elementCount+=counts[i]}for(let i=0;i<primcount.length;i++){info.update(elementCount,mode,primcount[i])}}}this.setMode=setMode;this.render=render;this.renderInstances=renderInstances;this.renderMultiDraw=renderMultiDraw;this.renderMultiDrawInstances=renderMultiDrawInstances}function WebGLCapabilities(gl,extensions,parameters,utils){let maxAnisotropy;function getMaxAnisotropy(){if(maxAnisotropy!==undefined)return maxAnisotropy;if(extensions.has("EXT_texture_filter_anisotropic")===true){const extension=extensions.get("EXT_texture_filter_anisotropic");maxAnisotropy=gl.getParameter(extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else{maxAnisotropy=0}return maxAnisotropy}function textureFormatReadable(textureFormat){if(textureFormat!==RGBAFormat&&utils.convert(textureFormat)!==gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT)){return false}return true}function textureTypeReadable(textureType){const halfFloatSupportedByExt=textureType===HalfFloatType&&(extensions.has("EXT_color_buffer_half_float")||extensions.has("EXT_color_buffer_float"));if(textureType!==UnsignedByteType&&utils.convert(textureType)!==gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_TYPE)&&textureType!==FloatType&&!halfFloatSupportedByExt){return false}return true}function getMaxPrecision(precision){if(precision==="highp"){if(gl.getShaderPrecisionFormat(gl.VERTEX_SHADER,gl.HIGH_FLOAT).precision>0&&gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER,gl.HIGH_FLOAT).precision>0){return"highp"}precision="mediump"}if(precision==="mediump"){if(gl.getShaderPrecisionFormat(gl.VERTEX_SHADER,gl.MEDIUM_FLOAT).precision>0&&gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER,gl.MEDIUM_FLOAT).precision>0){return"mediump"}}return"lowp"}let precision=parameters.precision!==undefined?parameters.precision:"highp";const maxPrecision=getMaxPrecision(precision);if(maxPrecision!==precision){console.warn("THREE.WebGLRenderer:",precision,"not supported, using",maxPrecision,"instead.");precision=maxPrecision}const logarithmicDepthBuffer=parameters.logarithmicDepthBuffer===true;const maxTextures=gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);const maxVertexTextures=gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS);const maxTextureSize=gl.getParameter(gl.MAX_TEXTURE_SIZE);const maxCubemapSize=gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE);const maxAttributes=gl.getParameter(gl.MAX_VERTEX_ATTRIBS);const maxVertexUniforms=gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS);const maxVaryings=gl.getParameter(gl.MAX_VARYING_VECTORS);const maxFragmentUniforms=gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS);const vertexTextures=maxVertexTextures>0;const maxSamples=gl.getParameter(gl.MAX_SAMPLES);return{isWebGL2:true,getMaxAnisotropy:getMaxAnisotropy,getMaxPrecision:getMaxPrecision,textureFormatReadable:textureFormatReadable,textureTypeReadable:textureTypeReadable,precision:precision,logarithmicDepthBuffer:logarithmicDepthBuffer,maxTextures:maxTextures,maxVertexTextures:maxVertexTextures,maxTextureSize:maxTextureSize,maxCubemapSize:maxCubemapSize,maxAttributes:maxAttributes,maxVertexUniforms:maxVertexUniforms,maxVaryings:maxVaryings,maxFragmentUniforms:maxFragmentUniforms,vertexTextures:vertexTextures,maxSamples:maxSamples}}function WebGLClipping(properties){const scope=this;let globalState=null,numGlobalPlanes=0,localClippingEnabled=false,renderingShadows=false;const plane=new Plane,viewNormalMatrix=new Matrix3,uniform={value:null,needsUpdate:false};this.uniform=uniform;this.numPlanes=0;this.numIntersection=0;this.init=function(planes,enableLocalClipping){const enabled=planes.length!==0||enableLocalClipping||numGlobalPlanes!==0||localClippingEnabled;localClippingEnabled=enableLocalClipping;numGlobalPlanes=planes.length;return enabled};this.beginShadows=function(){renderingShadows=true;projectPlanes(null)};this.endShadows=function(){renderingShadows=false};this.setGlobalState=function(planes,camera){globalState=projectPlanes(planes,camera,0)};this.setState=function(material,camera,useCache){const planes=material.clippingPlanes,clipIntersection=material.clipIntersection,clipShadows=material.clipShadows;const materialProperties=properties.get(material);if(!localClippingEnabled||planes===null||planes.length===0||renderingShadows&&!clipShadows){if(renderingShadows){projectPlanes(null)}else{resetGlobalState()}}else{const nGlobal=renderingShadows?0:numGlobalPlanes,lGlobal=nGlobal*4;let dstArray=materialProperties.clippingState||null;uniform.value=dstArray;dstArray=projectPlanes(planes,camera,lGlobal,useCache);for(let i=0;i!==lGlobal;++i){dstArray[i]=globalState[i]}materialProperties.clippingState=dstArray;this.numIntersection=clipIntersection?this.numPlanes:0;this.numPlanes+=nGlobal}};function resetGlobalState(){if(uniform.value!==globalState){uniform.value=globalState;uniform.needsUpdate=numGlobalPlanes>0}scope.numPlanes=numGlobalPlanes;scope.numIntersection=0}function projectPlanes(planes,camera,dstOffset,skipTransform){const nPlanes=planes!==null?planes.length:0;let dstArray=null;if(nPlanes!==0){dstArray=uniform.value;if(skipTransform!==true||dstArray===null){const flatSize=dstOffset+nPlanes*4,viewMatrix=camera.matrixWorldInverse;viewNormalMatrix.getNormalMatrix(viewMatrix);if(dstArray===null||dstArray.length<flatSize){dstArray=new Float32Array(flatSize)}for(let i=0,i4=dstOffset;i!==nPlanes;++i,i4+=4){plane.copy(planes[i]).applyMatrix4(viewMatrix,viewNormalMatrix);plane.normal.toArray(dstArray,i4);dstArray[i4+3]=plane.constant}}uniform.value=dstArray;uniform.needsUpdate=true}scope.numPlanes=nPlanes;scope.numIntersection=0;return dstArray}}function WebGLCubeMaps(renderer){let cubemaps=new WeakMap;function mapTextureMapping(texture,mapping){if(mapping===EquirectangularReflectionMapping){texture.mapping=CubeReflectionMapping}else if(mapping===EquirectangularRefractionMapping){texture.mapping=CubeRefractionMapping}return texture}function get(texture){if(texture&&texture.isTexture){const mapping=texture.mapping;if(mapping===EquirectangularReflectionMapping||mapping===EquirectangularRefractionMapping){if(cubemaps.has(texture)){const cubemap=cubemaps.get(texture).texture;return mapTextureMapping(cubemap,texture.mapping)}else{const image=texture.image;if(image&&image.height>0){const renderTarget=new WebGLCubeRenderTarget(image.height);renderTarget.fromEquirectangularTexture(renderer,texture);cubemaps.set(texture,renderTarget);texture.addEventListener("dispose",onTextureDispose);return mapTextureMapping(renderTarget.texture,texture.mapping)}else{return null}}}}return texture}function onTextureDispose(event){const texture=event.target;texture.removeEventListener("dispose",onTextureDispose);const cubemap=cubemaps.get(texture);if(cubemap!==undefined){cubemaps.delete(texture);cubemap.dispose()}}function dispose(){cubemaps=new WeakMap}return{get:get,dispose:dispose}}class OrthographicCamera extends Camera{constructor(left=-1,right=1,top=1,bottom=-1,near=0.1,far=2000){super();this.isOrthographicCamera=true;this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=left;this.right=right;this.top=top;this.bottom=bottom;this.near=near;this.far=far;this.updateProjectionMatrix()}copy(source,recursive){super.copy(source,recursive);this.left=source.left;this.right=source.right;this.top=source.top;this.bottom=source.bottom;this.near=source.near;this.far=source.far;this.zoom=source.zoom;this.view=source.view===null?null:Object.assign({},source.view);return this}setViewOffset(fullWidth,fullHeight,x,y,width,height){if(this.view===null){this.view={enabled:true,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}}this.view.enabled=true;this.view.fullWidth=fullWidth;this.view.fullHeight=fullHeight;this.view.offsetX=x;this.view.offsetY=y;this.view.width=width;this.view.height=height;this.updateProjectionMatrix()}clearViewOffset(){if(this.view!==null){this.view.enabled=false}this.updateProjectionMatrix()}updateProjectionMatrix(){const dx=(this.right-this.left)/(2*this.zoom);const dy=(this.top-this.bottom)/(2*this.zoom);const cx=(this.right+this.left)/2;const cy=(this.top+this.bottom)/2;let left=cx-dx;let right=cx+dx;let top=cy+dy;let bottom=cy-dy;if(this.view!==null&&this.view.enabled){const scaleW=(this.right-this.left)/this.view.fullWidth/this.zoom;const scaleH=(this.top-this.bottom)/this.view.fullHeight/this.zoom;left+=scaleW*this.view.offsetX;right=left+scaleW*this.view.width;top-=scaleH*this.view.offsetY;bottom=top-scaleH*this.view.height}this.projectionMatrix.makeOrthographic(left,right,top,bottom,this.near,this.far,this.coordinateSystem);this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(meta){const data=super.toJSON(meta);data.object.zoom=this.zoom;data.object.left=this.left;data.object.right=this.right;data.object.top=this.top;data.object.bottom=this.bottom;data.object.near=this.near;data.object.far=this.far;if(this.view!==null)data.object.view=Object.assign({},this.view);return data}}const LOD_MIN=4;const EXTRA_LOD_SIGMA=[0.125,0.215,0.35,0.446,0.526,0.582];const MAX_SAMPLES=20;const _flatCamera=new OrthographicCamera;const _clearColor=new Color;let _oldTarget=null;let _oldActiveCubeFace=0;let _oldActiveMipmapLevel=0;let _oldXrEnabled=false;const PHI=(1+Math.sqrt(5))/2;const INV_PHI=1/PHI;const _axisDirections=[new Vector3(-PHI,INV_PHI,0),new Vector3(PHI,INV_PHI,0),new Vector3(-INV_PHI,0,PHI),new Vector3(INV_PHI,0,PHI),new Vector3(0,PHI,-INV_PHI),new Vector3(0,PHI,INV_PHI),new Vector3(-1,1,-1),new Vector3(1,1,-1),new Vector3(-1,1,1),new Vector3(1,1,1)];class PMREMGenerator{constructor(renderer){this._renderer=renderer;this._pingPongRenderTarget=null;this._lodMax=0;this._cubeSize=0;this._lodPlanes=[];this._sizeLods=[];this._sigmas=[];this._blurMaterial=null;this._cubemapMaterial=null;this._equirectMaterial=null;this._compileMaterial(this._blurMaterial)}fromScene(scene,sigma=0,near=0.1,far=100){_oldTarget=this._renderer.getRenderTarget();_oldActiveCubeFace=this._renderer.getActiveCubeFace();_oldActiveMipmapLevel=this._renderer.getActiveMipmapLevel();_oldXrEnabled=this._renderer.xr.enabled;this._renderer.xr.enabled=false;this._setSize(256);const cubeUVRenderTarget=this._allocateTargets();cubeUVRenderTarget.depthBuffer=true;this._sceneToCubeUV(scene,near,far,cubeUVRenderTarget);if(sigma>0){this._blur(cubeUVRenderTarget,0,0,sigma)}this._applyPMREM(cubeUVRenderTarget);this._cleanup(cubeUVRenderTarget);return cubeUVRenderTarget}fromEquirectangular(equirectangular,renderTarget=null){return this._fromTexture(equirectangular,renderTarget)}fromCubemap(cubemap,renderTarget=null){return this._fromTexture(cubemap,renderTarget)}compileCubemapShader(){if(this._cubemapMaterial===null){this._cubemapMaterial=_getCubemapMaterial();this._compileMaterial(this._cubemapMaterial)}}compileEquirectangularShader(){if(this._equirectMaterial===null){this._equirectMaterial=_getEquirectMaterial();this._compileMaterial(this._equirectMaterial)}}dispose(){this._dispose();if(this._cubemapMaterial!==null)this._cubemapMaterial.dispose();if(this._equirectMaterial!==null)this._equirectMaterial.dispose()}_setSize(cubeSize){this._lodMax=Math.floor(Math.log2(cubeSize));this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){if(this._blurMaterial!==null)this._blurMaterial.dispose();if(this._pingPongRenderTarget!==null)this._pingPongRenderTarget.dispose();for(let i=0;i<this._lodPlanes.length;i++){this._lodPlanes[i].dispose()}}_cleanup(outputTarget){this._renderer.setRenderTarget(_oldTarget,_oldActiveCubeFace,_oldActiveMipmapLevel);this._renderer.xr.enabled=_oldXrEnabled;outputTarget.scissorTest=false;_setViewport(outputTarget,0,0,outputTarget.width,outputTarget.height)}_fromTexture(texture,renderTarget){if(texture.mapping===CubeReflectionMapping||texture.mapping===CubeRefractionMapping){this._setSize(texture.image.length===0?16:texture.image[0].width||texture.image[0].image.width)}else{this._setSize(texture.image.width/4)}_oldTarget=this._renderer.getRenderTarget();_oldActiveCubeFace=this._renderer.getActiveCubeFace();_oldActiveMipmapLevel=this._renderer.getActiveMipmapLevel();_oldXrEnabled=this._renderer.xr.enabled;this._renderer.xr.enabled=false;const cubeUVRenderTarget=renderTarget||this._allocateTargets();this._textureToCubeUV(texture,cubeUVRenderTarget);this._applyPMREM(cubeUVRenderTarget);this._cleanup(cubeUVRenderTarget);return cubeUVRenderTarget}_allocateTargets(){const width=3*Math.max(this._cubeSize,16*7);const height=4*this._cubeSize;const params={magFilter:LinearFilter,minFilter:LinearFilter,generateMipmaps:false,type:HalfFloatType,format:RGBAFormat,colorSpace:LinearSRGBColorSpace,depthBuffer:false};const cubeUVRenderTarget=_createRenderTarget(width,height,params);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==width||this._pingPongRenderTarget.height!==height){if(this._pingPongRenderTarget!==null){this._dispose()}this._pingPongRenderTarget=_createRenderTarget(width,height,params);const{_lodMax}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=_createPlanes(_lodMax));this._blurMaterial=_getBlurShader(_lodMax,width,height)}return cubeUVRenderTarget}_compileMaterial(material){const tmpMesh=new Mesh(this._lodPlanes[0],material);this._renderer.compile(tmpMesh,_flatCamera)}_sceneToCubeUV(scene,near,far,cubeUVRenderTarget){const fov=90;const aspect=1;const cubeCamera=new PerspectiveCamera(fov,aspect,near,far);const upSign=[1,-1,1,1,1,1];const forwardSign=[1,1,1,-1,-1,-1];const renderer=this._renderer;const originalAutoClear=renderer.autoClear;const toneMapping=renderer.toneMapping;renderer.getClearColor(_clearColor);renderer.toneMapping=NoToneMapping;renderer.autoClear=false;const backgroundMaterial=new MeshBasicMaterial({name:"PMREM.Background",side:BackSide,depthWrite:false,depthTest:false});const backgroundBox=new Mesh(new BoxGeometry(),backgroundMaterial);let useSolidColor=false;const background=scene.background;if(background){if(background.isColor){backgroundMaterial.color.copy(background);scene.background=null;useSolidColor=true}}else{backgroundMaterial.color.copy(_clearColor);useSolidColor=true}for(let i=0;i<6;i++){const col=i%3;if(col===0){cubeCamera.up.set(0,upSign[i],0);cubeCamera.lookAt(forwardSign[i],0,0)}else if(col===1){cubeCamera.up.set(0,0,upSign[i]);cubeCamera.lookAt(0,forwardSign[i],0)}else{cubeCamera.up.set(0,upSign[i],0);cubeCamera.lookAt(0,0,forwardSign[i])}const size=this._cubeSize;_setViewport(cubeUVRenderTarget,col*size,i>2?size:0,size,size);renderer.setRenderTarget(cubeUVRenderTarget);if(useSolidColor){renderer.render(backgroundBox,cubeCamera)}renderer.render(scene,cubeCamera)}backgroundBox.geometry.dispose();backgroundBox.material.dispose();renderer.toneMapping=toneMapping;renderer.autoClear=originalAutoClear;scene.background=background}_textureToCubeUV(texture,cubeUVRenderTarget){const renderer=this._renderer;const isCubeTexture=texture.mapping===CubeReflectionMapping||texture.mapping===CubeRefractionMapping;if(isCubeTexture){if(this._cubemapMaterial===null){this._cubemapMaterial=_getCubemapMaterial()}this._cubemapMaterial.uniforms.flipEnvMap.value=texture.isRenderTargetTexture===false?-1:1}else{if(this._equirectMaterial===null){this._equirectMaterial=_getEquirectMaterial()}}const material=isCubeTexture?this._cubemapMaterial:this._equirectMaterial;const mesh=new Mesh(this._lodPlanes[0],material);const uniforms=material.uniforms;uniforms["envMap"].value=texture;const size=this._cubeSize;_setViewport(cubeUVRenderTarget,0,0,3*size,2*size);renderer.setRenderTarget(cubeUVRenderTarget);renderer.render(mesh,_flatCamera)}_applyPMREM(cubeUVRenderTarget){const renderer=this._renderer;const autoClear=renderer.autoClear;renderer.autoClear=false;const n=this._lodPlanes.length;for(let i=1;i<n;i++){const sigma=Math.sqrt(this._sigmas[i]*this._sigmas[i]-this._sigmas[i-1]*this._sigmas[i-1]);const poleAxis=_axisDirections[(n-i-1)%_axisDirections.length];this._blur(cubeUVRenderTarget,i-1,i,sigma,poleAxis)}renderer.autoClear=autoClear}_blur(cubeUVRenderTarget,lodIn,lodOut,sigma,poleAxis){const pingPongRenderTarget=this._pingPongRenderTarget;this._halfBlur(cubeUVRenderTarget,pingPongRenderTarget,lodIn,lodOut,sigma,"latitudinal",poleAxis);this._halfBlur(pingPongRenderTarget,cubeUVRenderTarget,lodOut,lodOut,sigma,"longitudinal",poleAxis)}_halfBlur(targetIn,targetOut,lodIn,lodOut,sigmaRadians,direction,poleAxis){const renderer=this._renderer;const blurMaterial=this._blurMaterial;if(direction!=="latitudinal"&&direction!=="longitudinal"){console.error("blur direction must be either latitudinal or longitudinal!")}const STANDARD_DEVIATIONS=3;const blurMesh=new Mesh(this._lodPlanes[lodOut],blurMaterial);const blurUniforms=blurMaterial.uniforms;const pixels=this._sizeLods[lodIn]-1;const radiansPerPixel=isFinite(sigmaRadians)?Math.PI/(2*pixels):2*Math.PI/(2*MAX_SAMPLES-1);const sigmaPixels=sigmaRadians/radiansPerPixel;const samples=isFinite(sigmaRadians)?1+Math.floor(STANDARD_DEVIATIONS*sigmaPixels):MAX_SAMPLES;if(samples>MAX_SAMPLES){console.warn(`sigmaRadians, ${sigmaRadians}, is too large and will clip, as it requested ${samples} samples when the maximum is set to ${MAX_SAMPLES}`)}const weights=[];let sum=0;for(let i=0;i<MAX_SAMPLES;++i){const x=i/sigmaPixels;const weight=Math.exp(-x*x/2);weights.push(weight);if(i===0){sum+=weight}else if(i<samples){sum+=2*weight}}for(let i=0;i<weights.length;i++){weights[i]=weights[i]/sum}blurUniforms["envMap"].value=targetIn.texture;blurUniforms["samples"].value=samples;blurUniforms["weights"].value=weights;blurUniforms["latitudinal"].value=direction==="latitudinal";if(poleAxis){blurUniforms["poleAxis"].value=poleAxis}const{_lodMax}=this;blurUniforms["dTheta"].value=radiansPerPixel;blurUniforms["mipInt"].value=_lodMax-lodIn;const outputSize=this._sizeLods[lodOut];const x=3*outputSize*(lodOut>_lodMax-LOD_MIN?lodOut-_lodMax+LOD_MIN:0);const y=4*(this._cubeSize-outputSize);_setViewport(targetOut,x,y,3*outputSize,2*outputSize);renderer.setRenderTarget(targetOut);renderer.render(blurMesh,_flatCamera)}}function _createPlanes(lodMax){const lodPlanes=[];const sizeLods=[];const sigmas=[];let lod=lodMax;const totalLods=lodMax-LOD_MIN+1+EXTRA_LOD_SIGMA.length;for(let i=0;i<totalLods;i++){const sizeLod=Math.pow(2,lod);sizeLods.push(sizeLod);let sigma=1/sizeLod;if(i>lodMax-LOD_MIN){sigma=EXTRA_LOD_SIGMA[i-lodMax+LOD_MIN-1]}else if(i===0){sigma=0}sigmas.push(sigma);const texelSize=1/(sizeLod-2);const min=-texelSize;const max=1+texelSize;const uv1=[min,min,max,min,max,max,min,min,max,max,min,max];const cubeFaces=6;const vertices=6;const positionSize=3;const uvSize=2;const faceIndexSize=1;const position=new Float32Array(positionSize*vertices*cubeFaces);const uv=new Float32Array(uvSize*vertices*cubeFaces);const faceIndex=new Float32Array(faceIndexSize*vertices*cubeFaces);for(let face=0;face<cubeFaces;face++){const x=face%3*2/3-1;const y=face>2?0:-1;const coordinates=[x,y,0,x+2/3,y,0,x+2/3,y+1,0,x,y,0,x+2/3,y+1,0,x,y+1,0];position.set(coordinates,positionSize*vertices*face);uv.set(uv1,uvSize*vertices*face);const fill=[face,face,face,face,face,face];faceIndex.set(fill,faceIndexSize*vertices*face)}const planes=new BufferGeometry;planes.setAttribute("position",new BufferAttribute(position,positionSize));planes.setAttribute("uv",new BufferAttribute(uv,uvSize));planes.setAttribute("faceIndex",new BufferAttribute(faceIndex,faceIndexSize));lodPlanes.push(planes);if(lod>LOD_MIN){lod--}}return{lodPlanes,sizeLods,sigmas}}function _createRenderTarget(width,height,params){const cubeUVRenderTarget=new WebGLRenderTarget(width,height,params);cubeUVRenderTarget.texture.mapping=CubeUVReflectionMapping;cubeUVRenderTarget.texture.name="PMREM.cubeUv";cubeUVRenderTarget.scissorTest=true;return cubeUVRenderTarget}function _setViewport(target,x,y,width,height){target.viewport.set(x,y,width,height);target.scissor.set(x,y,width,height)}function _getBlurShader(lodMax,width,height){const weights=new Float32Array(MAX_SAMPLES);const poleAxis=new Vector3(0,1,0);const shaderMaterial=new ShaderMaterial({name:"SphericalGaussianBlur",defines:{"n":MAX_SAMPLES,"CUBEUV_TEXEL_WIDTH":1/width,"CUBEUV_TEXEL_HEIGHT":1/height,"CUBEUV_MAX_MIP":`${lodMax}.0`},uniforms:{"envMap":{value:null},"samples":{value:1},"weights":{value:weights},"latitudinal":{value:false},"dTheta":{value:0},"mipInt":{value:0},"poleAxis":{value:poleAxis}},vertexShader:_getCommonVertexShader(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

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

			#define ENVMAP_TYPE_CUBE_UV
			#include <cube_uv_reflection_fragment>

			vec3 getSample( float theta, vec3 axis ) {

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

				return bilinearCubeUV( envMap, sampleDirection, mipInt );

			}

			void main() {

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

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

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

				}

				axis = normalize( axis );

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

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

					if ( i >= samples ) {

						break;

					}

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

				}

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

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;

			#include <common>

			void main() {

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

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

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

			precision mediump float;
			precision mediump int;

			uniform float flipEnvMap;

			varying vec3 vOutputDirection;

			uniform samplerCube envMap;

			void main() {

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

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

		precision mediump float;
		precision mediump int;

		attribute float faceIndex;

		varying vec3 vOutputDirection;

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

			uv = 2.0 * uv - 1.0;

			vec3 direction = vec3( uv, 1.0 );

			if ( face == 0.0 ) {

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

			} else if ( face == 1.0 ) {

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

			} else if ( face == 2.0 ) {

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

			} else if ( face == 3.0 ) {

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

			} else if ( face == 4.0 ) {

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

			} else if ( face == 5.0 ) {

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

			}

			return direction;

		}

		void main() {

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

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

	gl_Position = vec4( position, 1.0 );

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

void main() {

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

	if ( coord.x >= 1.0 ) {

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

	} else {

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

	}

}`;class WebXRDepthSensing{constructor(){this.texture=null;this.mesh=null;this.depthNear=0;this.depthFar=0}init(renderer,depthData,renderState){if(this.texture===null){const texture=new Texture;const texProps=renderer.properties.get(texture);texProps.__webglTexture=depthData.texture;if(depthData.depthNear!=renderState.depthNear||depthData.depthFar!=renderState.depthFar){this.depthNear=depthData.depthNear;this.depthFar=depthData.depthFar}this.texture=texture}}getMesh(cameraXR){if(this.texture!==null){if(this.mesh===null){const viewport=cameraXR.cameras[0].viewport;const material=new ShaderMaterial({vertexShader:_occlusion_vertex,fragmentShader:_occlusion_fragment,uniforms:{depthColor:{value:this.texture},depthWidth:{value:viewport.z},depthHeight:{value:viewport.w}}});this.mesh=new Mesh(new PlaneGeometry(20,20),material)}}return this.mesh}reset(){this.texture=null;this.mesh=null}getDepthTexture(){return this.texture}}class WebXRManager extends EventDispatcher{constructor(renderer,gl){super();const scope=this;let session=null;let framebufferScaleFactor=1;let referenceSpace=null;let referenceSpaceType="local-floor";let foveation=1;let customReferenceSpace=null;let pose=null;let glBinding=null;let glProjLayer=null;let glBaseLayer=null;let xrFrame=null;const depthSensing=new WebXRDepthSensing;const attributes=gl.getContextAttributes();let initialRenderTarget=null;let newRenderTarget=null;const controllers=[];const controllerInputSources=[];const currentSize=new Vector2;let currentPixelRatio=null;const cameraL=new PerspectiveCamera;cameraL.layers.enable(1);cameraL.viewport=new Vector4;const cameraR=new PerspectiveCamera;cameraR.layers.enable(2);cameraR.viewport=new Vector4;const cameras=[cameraL,cameraR];const cameraXR=new ArrayCamera;cameraXR.layers.enable(1);cameraXR.layers.enable(2);let _currentDepthNear=null;let _currentDepthFar=null;this.cameraAutoUpdate=true;this.enabled=false;this.isPresenting=false;this.getController=function(index){let controller=controllers[index];if(controller===undefined){controller=new WebXRController;controllers[index]=controller}return controller.getTargetRaySpace()};this.getControllerGrip=function(index){let controller=controllers[index];if(controller===undefined){controller=new WebXRController;controllers[index]=controller}return controller.getGripSpace()};this.getHand=function(index){let controller=controllers[index];if(controller===undefined){controller=new WebXRController;controllers[index]=controller}return controller.getHandSpace()};function onSessionEvent(event){const controllerIndex=controllerInputSources.indexOf(event.inputSource);if(controllerIndex===-1){return}const controller=controllers[controllerIndex];if(controller!==undefined){controller.update(event.inputSource,event.frame,customReferenceSpace||referenceSpace);controller.dispatchEvent({type:event.type,data:event.inputSource})}}function onSessionEnd(){session.removeEventListener("select",onSessionEvent);session.removeEventListener("selectstart",onSessionEvent);session.removeEventListener("selectend",onSessionEvent);session.removeEventListener("squeeze",onSessionEvent);session.removeEventListener("squeezestart",onSessionEvent);session.removeEventListener("squeezeend",onSessionEvent);session.removeEventListener("end",onSessionEnd);session.removeEventListener("inputsourceschange",onInputSourcesChange);for(let i=0;i<controllers.length;i++){const inputSource=controllerInputSources[i];if(inputSource===null)continue;controllerInputSources[i]=null;controllers[i].disconnect(inputSource)}_currentDepthNear=null;_currentDepthFar=null;depthSensing.reset();renderer.setRenderTarget(initialRenderTarget);glBaseLayer=null;glProjLayer=null;glBinding=null;session=null;newRenderTarget=null;animation.stop();scope.isPresenting=false;renderer.setPixelRatio(currentPixelRatio);renderer.setSize(currentSize.width,currentSize.height,false);scope.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(value){framebufferScaleFactor=value;if(scope.isPresenting===true){console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")}};this.setReferenceSpaceType=function(value){referenceSpaceType=value;if(scope.isPresenting===true){console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")}};this.getReferenceSpace=function(){return customReferenceSpace||referenceSpace};this.setReferenceSpace=function(space){customReferenceSpace=space};this.getBaseLayer=function(){return glProjLayer!==null?glProjLayer:glBaseLayer};this.getBinding=function(){return glBinding};this.getFrame=function(){return xrFrame};this.getSession=function(){return session};this.setSession=async function(value){session=value;if(session!==null){initialRenderTarget=renderer.getRenderTarget();session.addEventListener("select",onSessionEvent);session.addEventListener("selectstart",onSessionEvent);session.addEventListener("selectend",onSessionEvent);session.addEventListener("squeeze",onSessionEvent);session.addEventListener("squeezestart",onSessionEvent);session.addEventListener("squeezeend",onSessionEvent);session.addEventListener("end",onSessionEnd);session.addEventListener("inputsourceschange",onInputSourcesChange);if(attributes.xrCompatible!==true){await gl.makeXRCompatible()}currentPixelRatio=renderer.getPixelRatio();renderer.getSize(currentSize);if(session.renderState.layers===undefined){const layerInit={antialias:attributes.antialias,alpha:true,depth:attributes.depth,stencil:attributes.stencil,framebufferScaleFactor:framebufferScaleFactor};glBaseLayer=new XRWebGLLayer(session,gl,layerInit);session.updateRenderState({baseLayer:glBaseLayer});renderer.setPixelRatio(1);renderer.setSize(glBaseLayer.framebufferWidth,glBaseLayer.framebufferHeight,false);newRenderTarget=new WebGLRenderTarget(glBaseLayer.framebufferWidth,glBaseLayer.framebufferHeight,{format:RGBAFormat,type:UnsignedByteType,colorSpace:renderer.outputColorSpace,stencilBuffer:attributes.stencil})}else{let depthFormat=null;let depthType=null;let glDepthFormat=null;if(attributes.depth){glDepthFormat=attributes.stencil?gl.DEPTH24_STENCIL8:gl.DEPTH_COMPONENT24;depthFormat=attributes.stencil?DepthStencilFormat:DepthFormat;depthType=attributes.stencil?UnsignedInt248Type:UnsignedIntType}const projectionlayerInit={colorFormat:gl.RGBA8,depthFormat:glDepthFormat,scaleFactor:framebufferScaleFactor};glBinding=new XRWebGLBinding(session,gl);glProjLayer=glBinding.createProjectionLayer(projectionlayerInit);session.updateRenderState({layers:[glProjLayer]});renderer.setPixelRatio(1);renderer.setSize(glProjLayer.textureWidth,glProjLayer.textureHeight,false);newRenderTarget=new WebGLRenderTarget(glProjLayer.textureWidth,glProjLayer.textureHeight,{format:RGBAFormat,type:UnsignedByteType,depthTexture:new DepthTexture(glProjLayer.textureWidth,glProjLayer.textureHeight,depthType,undefined,undefined,undefined,undefined,undefined,undefined,depthFormat),stencilBuffer:attributes.stencil,colorSpace:renderer.outputColorSpace,samples:attributes.antialias?4:0,resolveDepthBuffer:glProjLayer.ignoreDepthValues===false})}newRenderTarget.isXRRenderTarget=true;this.setFoveation(foveation);customReferenceSpace=null;referenceSpace=await session.requestReferenceSpace(referenceSpaceType);animation.setContext(session);animation.start();scope.isPresenting=true;scope.dispatchEvent({type:"sessionstart"})}};this.getEnvironmentBlendMode=function(){if(session!==null){return session.environmentBlendMode}};this.getDepthTexture=function(){return depthSensing.getDepthTexture()};function onInputSourcesChange(event){for(let i=0;i<event.removed.length;i++){const inputSource=event.removed[i];const index=controllerInputSources.indexOf(inputSource);if(index>=0){controllerInputSources[index]=null;controllers[index].disconnect(inputSource)}}for(let i=0;i<event.added.length;i++){const inputSource=event.added[i];let controllerIndex=controllerInputSources.indexOf(inputSource);if(controllerIndex===-1){for(let i=0;i<controllers.length;i++){if(i>=controllerInputSources.length){controllerInputSources.push(inputSource);controllerIndex=i;break}else if(controllerInputSources[i]===null){controllerInputSources[i]=inputSource;controllerIndex=i;break}}if(controllerIndex===-1)break}const controller=controllers[controllerIndex];if(controller){controller.connect(inputSource)}}}const cameraLPos=new Vector3;const cameraRPos=new Vector3;function setProjectionFromUnion(camera,cameraL,cameraR){cameraLPos.setFromMatrixPosition(cameraL.matrixWorld);cameraRPos.setFromMatrixPosition(cameraR.matrixWorld);const ipd=cameraLPos.distanceTo(cameraRPos);const projL=cameraL.projectionMatrix.elements;const projR=cameraR.projectionMatrix.elements;const near=projL[14]/(projL[10]-1);const far=projL[14]/(projL[10]+1);const topFov=(projL[9]+1)/projL[5];const bottomFov=(projL[9]-1)/projL[5];const leftFov=(projL[8]-1)/projL[0];const rightFov=(projR[8]+1)/projR[0];const left=near*leftFov;const right=near*rightFov;const zOffset=ipd/(-leftFov+rightFov);const xOffset=zOffset*-leftFov;cameraL.matrixWorld.decompose(camera.position,camera.quaternion,camera.scale);camera.translateX(xOffset);camera.translateZ(zOffset);camera.matrixWorld.compose(camera.position,camera.quaternion,camera.scale);camera.matrixWorldInverse.copy(camera.matrixWorld).invert();if(projL[10]===-1){camera.projectionMatrix.copy(cameraL.projectionMatrix);camera.projectionMatrixInverse.copy(cameraL.projectionMatrixInverse)}else{const near2=near+zOffset;const far2=far+zOffset;const left2=left-xOffset;const right2=right+(ipd-xOffset);const top2=topFov*far/far2*near2;const bottom2=bottomFov*far/far2*near2;camera.projectionMatrix.makePerspective(left2,right2,top2,bottom2,near2,far2);camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert()}}function updateCamera(camera,parent){if(parent===null){camera.matrixWorld.copy(camera.matrix)}else{camera.matrixWorld.multiplyMatrices(parent.matrixWorld,camera.matrix)}camera.matrixWorldInverse.copy(camera.matrixWorld).invert()}this.updateCamera=function(camera){if(session===null)return;let depthNear=camera.near;let depthFar=camera.far;if(depthSensing.texture!==null){if(depthSensing.depthNear>0)depthNear=depthSensing.depthNear;if(depthSensing.depthFar>0)depthFar=depthSensing.depthFar}cameraXR.near=cameraR.near=cameraL.near=depthNear;cameraXR.far=cameraR.far=cameraL.far=depthFar;if(_currentDepthNear!==cameraXR.near||_currentDepthFar!==cameraXR.far){session.updateRenderState({depthNear:cameraXR.near,depthFar:cameraXR.far});_currentDepthNear=cameraXR.near;_currentDepthFar=cameraXR.far}const parent=camera.parent;const cameras=cameraXR.cameras;updateCamera(cameraXR,parent);for(let i=0;i<cameras.length;i++){updateCamera(cameras[i],parent)}if(cameras.length===2){setProjectionFromUnion(cameraXR,cameraL,cameraR)}else{cameraXR.projectionMatrix.copy(cameraL.projectionMatrix)}updateUserCamera(camera,cameraXR,parent)};function updateUserCamera(camera,cameraXR,parent){if(parent===null){camera.matrix.copy(cameraXR.matrixWorld)}else{camera.matrix.copy(parent.matrixWorld);camera.matrix.invert();camera.matrix.multiply(cameraXR.matrixWorld)}camera.matrix.decompose(camera.position,camera.quaternion,camera.scale);camera.updateMatrixWorld(true);camera.projectionMatrix.copy(cameraXR.projectionMatrix);camera.projectionMatrixInverse.copy(cameraXR.projectionMatrixInverse);if(camera.isPerspectiveCamera){camera.fov=RAD2DEG*2*Math.atan(1/camera.projectionMatrix.elements[5]);camera.zoom=1}}this.getCamera=function(){return cameraXR};this.getFoveation=function(){if(glProjLayer===null&&glBaseLayer===null){return undefined}return foveation};this.setFoveation=function(value){foveation=value;if(glProjLayer!==null){glProjLayer.fixedFoveation=value}if(glBaseLayer!==null&&glBaseLayer.fixedFoveation!==undefined){glBaseLayer.fixedFoveation=value}};this.hasDepthSensing=function(){return depthSensing.texture!==null};this.getDepthSensingMesh=function(){return depthSensing.getMesh(cameraXR)};let onAnimationFrameCallback=null;function onAnimationFrame(time,frame){pose=frame.getViewerPose(customReferenceSpace||referenceSpace);xrFrame=frame;if(pose!==null){const views=pose.views;if(glBaseLayer!==null){renderer.setRenderTargetFramebuffer(newRenderTarget,glBaseLayer.framebuffer);renderer.setRenderTarget(newRenderTarget)}let cameraXRNeedsUpdate=false;if(views.length!==cameraXR.cameras.length){cameraXR.cameras.length=0;cameraXRNeedsUpdate=true}for(let i=0;i<views.length;i++){const view=views[i];let viewport=null;if(glBaseLayer!==null){viewport=glBaseLayer.getViewport(view)}else{const glSubImage=glBinding.getViewSubImage(glProjLayer,view);viewport=glSubImage.viewport;if(i===0){renderer.setRenderTargetTextures(newRenderTarget,glSubImage.colorTexture,glProjLayer.ignoreDepthValues?undefined:glSubImage.depthStencilTexture);renderer.setRenderTarget(newRenderTarget)}}let camera=cameras[i];if(camera===undefined){camera=new PerspectiveCamera;camera.layers.enable(i);camera.viewport=new Vector4;cameras[i]=camera}camera.matrix.fromArray(view.transform.matrix);camera.matrix.decompose(camera.position,camera.quaternion,camera.scale);camera.projectionMatrix.fromArray(view.projectionMatrix);camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert();camera.viewport.set(viewport.x,viewport.y,viewport.width,viewport.height);if(i===0){cameraXR.matrix.copy(camera.matrix);cameraXR.matrix.decompose(cameraXR.position,cameraXR.quaternion,cameraXR.scale)}if(cameraXRNeedsUpdate===true){cameraXR.cameras.push(camera)}}const enabledFeatures=session.enabledFeatures;if(enabledFeatures&&enabledFeatures.includes("depth-sensing")){const depthData=glBinding.getDepthInformation(views[0]);if(depthData&&depthData.isValid&&depthData.texture){depthSensing.init(renderer,depthData,session.renderState)}}}for(let i=0;i<controllers.length;i++){const inputSource=controllerInputSources[i];const controller=controllers[i];if(inputSource!==null&&controller!==undefined){controller.update(inputSource,frame,customReferenceSpace||referenceSpace)}}if(onAnimationFrameCallback)onAnimationFrameCallback(time,frame);if(frame.detectedPlanes){scope.dispatchEvent({type:"planesdetected",data:frame})}xrFrame=null}const animation=new WebGLAnimation;animation.setAnimationLoop(onAnimationFrame);this.setAnimationLoop=function(callback){onAnimationFrameCallback=callback};this.dispose=function(){}}}const _e1=new Euler;const _m1=new Matrix4;function WebGLMaterials(renderer,properties){function refreshTransformUniform(map,uniform){if(map.matrixAutoUpdate===true){map.updateMatrix()}uniform.value.copy(map.matrix)}function refreshFogUniforms(uniforms,fog){fog.color.getRGB(uniforms.fogColor.value,getUnlitUniformColorSpace(renderer));if(fog.isFog){uniforms.fogNear.value=fog.near;uniforms.fogFar.value=fog.far}else if(fog.isFogExp2){uniforms.fogDensity.value=fog.density}}function refreshMaterialUniforms(uniforms,material,pixelRatio,height,transmissionRenderTarget){if(material.isMeshBasicMaterial){refreshUniformsCommon(uniforms,material)}else if(material.isMeshLambertMaterial){refreshUniformsCommon(uniforms,material)}else if(material.isMeshToonMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsToon(uniforms,material)}else if(material.isMeshPhongMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsPhong(uniforms,material)}else if(material.isMeshStandardMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsStandard(uniforms,material);if(material.isMeshPhysicalMaterial){refreshUniformsPhysical(uniforms,material,transmissionRenderTarget)}}else if(material.isMeshMatcapMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsMatcap(uniforms,material)}else if(material.isMeshDepthMaterial){refreshUniformsCommon(uniforms,material)}else if(material.isMeshDistanceMaterial){refreshUniformsCommon(uniforms,material);refreshUniformsDistance(uniforms,material)}else if(material.isMeshNormalMaterial){refreshUniformsCommon(uniforms,material)}else if(material.isLineBasicMaterial){refreshUniformsLine(uniforms,material);if(material.isLineDashedMaterial){refreshUniformsDash(uniforms,material)}}else if(material.isPointsMaterial){refreshUniformsPoints(uniforms,material,pixelRatio,height)}else if(material.isSpriteMaterial){refreshUniformsSprites(uniforms,material)}else if(material.isShadowMaterial){uniforms.color.value.copy(material.color);uniforms.opacity.value=material.opacity}else if(material.isShaderMaterial){material.uniformsNeedUpdate=false}}function refreshUniformsCommon(uniforms,material){uniforms.opacity.value=material.opacity;if(material.color){uniforms.diffuse.value.copy(material.color)}if(material.emissive){uniforms.emissive.value.copy(material.emissive).multiplyScalar(material.emissiveIntensity)}if(material.map){uniforms.map.value=material.map;refreshTransformUniform(material.map,uniforms.mapTransform)}if(material.alphaMap){uniforms.alphaMap.value=material.alphaMap;refreshTransformUniform(material.alphaMap,uniforms.alphaMapTransform)}if(material.bumpMap){uniforms.bumpMap.value=material.bumpMap;refreshTransformUniform(material.bumpMap,uniforms.bumpMapTransform);uniforms.bumpScale.value=material.bumpScale;if(material.side===BackSide){uniforms.bumpScale.value*=-1}}if(material.normalMap){uniforms.normalMap.value=material.normalMap;refreshTransformUniform(material.normalMap,uniforms.normalMapTransform);uniforms.normalScale.value.copy(material.normalScale);if(material.side===BackSide){uniforms.normalScale.value.negate()}}if(material.displacementMap){uniforms.displacementMap.value=material.displacementMap;refreshTransformUniform(material.displacementMap,uniforms.displacementMapTransform);uniforms.displacementScale.value=material.displacementScale;uniforms.displacementBias.value=material.displacementBias}if(material.emissiveMap){uniforms.emissiveMap.value=material.emissiveMap;refreshTransformUniform(material.emissiveMap,uniforms.emissiveMapTransform)}if(material.specularMap){uniforms.specularMap.value=material.specularMap;refreshTransformUniform(material.specularMap,uniforms.specularMapTransform)}if(material.alphaTest>0){uniforms.alphaTest.value=material.alphaTest}const materialProperties=properties.get(material);const envMap=materialProperties.envMap;const envMapRotation=materialProperties.envMapRotation;if(envMap){uniforms.envMap.value=envMap;_e1.copy(envMapRotation);_e1.x*=-1;_e1.y*=-1;_e1.z*=-1;if(envMap.isCubeTexture&&envMap.isRenderTargetTexture===false){_e1.y*=-1;_e1.z*=-1}uniforms.envMapRotation.value.setFromMatrix4(_m1.makeRotationFromEuler(_e1));uniforms.flipEnvMap.value=envMap.isCubeTexture&&envMap.isRenderTargetTexture===false?-1:1;uniforms.reflectivity.value=material.reflectivity;uniforms.ior.value=material.ior;uniforms.refractionRatio.value=material.refractionRatio}if(material.lightMap){uniforms.lightMap.value=material.lightMap;uniforms.lightMapIntensity.value=material.lightMapIntensity;refreshTransformUniform(material.lightMap,uniforms.lightMapTransform)}if(material.aoMap){uniforms.aoMap.value=material.aoMap;uniforms.aoMapIntensity.value=material.aoMapIntensity;refreshTransformUniform(material.aoMap,uniforms.aoMapTransform)}}function refreshUniformsLine(uniforms,material){uniforms.diffuse.value.copy(material.color);uniforms.opacity.value=material.opacity;if(material.map){uniforms.map.value=material.map;refreshTransformUniform(material.map,uniforms.mapTransform)}}function refreshUniformsDash(uniforms,material){uniforms.dashSize.value=material.dashSize;uniforms.totalSize.value=material.dashSize+material.gapSize;uniforms.scale.value=material.scale}function refreshUniformsPoints(uniforms,material,pixelRatio,height){uniforms.diffuse.value.copy(material.color);uniforms.opacity.value=material.opacity;uniforms.size.value=material.size*pixelRatio;uniforms.scale.value=height*0.5;if(material.map){uniforms.map.value=material.map;refreshTransformUniform(material.map,uniforms.uvTransform)}if(material.alphaMap){uniforms.alphaMap.value=material.alphaMap;refreshTransformUniform(material.alphaMap,uniforms.alphaMapTransform)}if(material.alphaTest>0){uniforms.alphaTest.value=material.alphaTest}}function refreshUniformsSprites(uniforms,material){uniforms.diffuse.value.copy(material.color);uniforms.opacity.value=material.opacity;uniforms.rotation.value=material.rotation;if(material.map){uniforms.map.value=material.map;refreshTransformUniform(material.map,uniforms.mapTransform)}if(material.alphaMap){uniforms.alphaMap.value=material.alphaMap;refreshTransformUniform(material.alphaMap,uniforms.alphaMapTransform)}if(material.alphaTest>0){uniforms.alphaTest.value=material.alphaTest}}function refreshUniformsPhong(uniforms,material){uniforms.specular.value.copy(material.specular);uniforms.shininess.value=Math.max(material.shininess,1e-4)}function refreshUniformsToon(uniforms,material){if(material.gradientMap){uniforms.gradientMap.value=material.gradientMap}}function refreshUniformsStandard(uniforms,material){uniforms.metalness.value=material.metalness;if(material.metalnessMap){uniforms.metalnessMap.value=material.metalnessMap;refreshTransformUniform(material.metalnessMap,uniforms.metalnessMapTransform)}uniforms.roughness.value=material.roughness;if(material.roughnessMap){uniforms.roughnessMap.value=material.roughnessMap;refreshTransformUniform(material.roughnessMap,uniforms.roughnessMapTransform)}if(material.envMap){uniforms.envMapIntensity.value=material.envMapIntensity}}function refreshUniformsPhysical(uniforms,material,transmissionRenderTarget){uniforms.ior.value=material.ior;if(material.sheen>0){uniforms.sheenColor.value.copy(material.sheenColor).multiplyScalar(material.sheen);uniforms.sheenRoughness.value=material.sheenRoughness;if(material.sheenColorMap){uniforms.sheenColorMap.value=material.sheenColorMap;refreshTransformUniform(material.sheenColorMap,uniforms.sheenColorMapTransform)}if(material.sheenRoughnessMap){uniforms.sheenRoughnessMap.value=material.sheenRoughnessMap;refreshTransformUniform(material.sheenRoughnessMap,uniforms.sheenRoughnessMapTransform)}}if(material.clearcoat>0){uniforms.clearcoat.value=material.clearcoat;uniforms.clearcoatRoughness.value=material.clearcoatRoughness;if(material.clearcoatMap){uniforms.clearcoatMap.value=material.clearcoatMap;refreshTransformUniform(material.clearcoatMap,uniforms.clearcoatMapTransform)}if(material.clearcoatRoughnessMap){uniforms.clearcoatRoughnessMap.value=material.clearcoatRoughnessMap;refreshTransformUniform(material.clearcoatRoughnessMap,uniforms.clearcoatRoughnessMapTransform)}if(material.clearcoatNormalMap){uniforms.clearcoatNormalMap.value=material.clearcoatNormalMap;refreshTransformUniform(material.clearcoatNormalMap,uniforms.clearcoatNormalMapTransform);uniforms.clearcoatNormalScale.value.copy(material.clearcoatNormalScale);if(material.side===BackSide){uniforms.clearcoatNormalScale.value.negate()}}}if(material.dispersion>0){uniforms.dispersion.value=material.dispersion}if(material.iridescence>0){uniforms.iridescence.value=material.iridescence;uniforms.iridescenceIOR.value=material.iridescenceIOR;uniforms.iridescenceThicknessMinimum.value=material.iridescenceThicknessRange[0];uniforms.iridescenceThicknessMaximum.value=material.iridescenceThicknessRange[1];if(material.iridescenceMap){uniforms.iridescenceMap.value=material.iridescenceMap;refreshTransformUniform(material.iridescenceMap,uniforms.iridescenceMapTransform)}if(material.iridescenceThicknessMap){uniforms.iridescenceThicknessMap.value=material.iridescenceThicknessMap;refreshTransformUniform(material.iridescenceThicknessMap,uniforms.iridescenceThicknessMapTransform)}}if(material.transmission>0){uniforms.transmission.value=material.transmission;uniforms.transmissionSamplerMap.value=transmissionRenderTarget.texture;uniforms.transmissionSamplerSize.value.set(transmissionRenderTarget.width,transmissionRenderTarget.height);if(material.transmissionMap){uniforms.transmissionMap.value=material.transmissionMap;refreshTransformUniform(material.transmissionMap,uniforms.transmissionMapTransform)}uniforms.thickness.value=material.thickness;if(material.thicknessMap){uniforms.thicknessMap.value=material.thicknessMap;refreshTransformUniform(material.thicknessMap,uniforms.thicknessMapTransform)}uniforms.attenuationDistance.value=material.attenuationDistance;uniforms.attenuationColor.value.copy(material.attenuationColor)}if(material.anisotropy>0){uniforms.anisotropyVector.value.set(material.anisotropy*Math.cos(material.anisotropyRotation),material.anisotropy*Math.sin(material.anisotropyRotation));if(material.anisotropyMap){uniforms.anisotropyMap.value=material.anisotropyMap;refreshTransformUniform(material.anisotropyMap,uniforms.anisotropyMapTransform)}}uniforms.specularIntensity.value=material.specularIntensity;uniforms.specularColor.value.copy(material.specularColor);if(material.specularColorMap){uniforms.specularColorMap.value=material.specularColorMap;refreshTransformUniform(material.specularColorMap,uniforms.specularColorMapTransform)}if(material.specularIntensityMap){uniforms.specularIntensityMap.value=material.specularIntensityMap;refreshTransformUniform(material.specularIntensityMap,uniforms.specularIntensityMapTransform)}}function refreshUniformsMatcap(uniforms,material){if(material.matcap){uniforms.matcap.value=material.matcap}}function refreshUniformsDistance(uniforms,material){const light=properties.get(material).light;uniforms.referencePosition.value.setFromMatrixPosition(light.matrixWorld);uniforms.nearDistance.value=light.shadow.camera.near;uniforms.farDistance.value=light.shadow.camera.far}return{refreshFogUniforms:refreshFogUniforms,refreshMaterialUniforms:refreshMaterialUniforms}}function WebGLUniformsGroups(gl,info,capabilities,state){let buffers={};let updateList={};let allocatedBindingPoints=[];const maxBindingPoints=gl.getParameter(gl.MAX_UNIFORM_BUFFER_BINDINGS);function bind(uniformsGroup,program){const webglProgram=program.program;state.uniformBlockBinding(uniformsGroup,webglProgram)}function update(uniformsGroup,program){let buffer=buffers[uniformsGroup.id];if(buffer===undefined){prepareUniformsGroup(uniformsGroup);buffer=createBuffer(uniformsGroup);buffers[uniformsGroup.id]=buffer;uniformsGroup.addEventListener("dispose",onUniformsGroupsDispose)}const webglProgram=program.program;state.updateUBOMapping(uniformsGroup,webglProgram);const frame=info.render.frame;if(updateList[uniformsGroup.id]!==frame){updateBufferData(uniformsGroup);updateList[uniformsGroup.id]=frame}}function createBuffer(uniformsGroup){const bindingPointIndex=allocateBindingPointIndex();uniformsGroup.__bindingPointIndex=bindingPointIndex;const buffer=gl.createBuffer();const size=uniformsGroup.__size;const usage=uniformsGroup.usage;gl.bindBuffer(gl.UNIFORM_BUFFER,buffer);gl.bufferData(gl.UNIFORM_BUFFER,size,usage);gl.bindBuffer(gl.UNIFORM_BUFFER,null);gl.bindBufferBase(gl.UNIFORM_BUFFER,bindingPointIndex,buffer);return buffer}function allocateBindingPointIndex(){for(let i=0;i<maxBindingPoints;i++){if(allocatedBindingPoints.indexOf(i)===-1){allocatedBindingPoints.push(i);return i}}console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached.");return 0}function updateBufferData(uniformsGroup){const buffer=buffers[uniformsGroup.id];const uniforms=uniformsGroup.uniforms;const cache=uniformsGroup.__cache;gl.bindBuffer(gl.UNIFORM_BUFFER,buffer);for(let i=0,il=uniforms.length;i<il;i++){const uniformArray=Array.isArray(uniforms[i])?uniforms[i]:[uniforms[i]];for(let j=0,jl=uniformArray.length;j<jl;j++){const uniform=uniformArray[j];if(hasUniformChanged(uniform,i,j,cache)===true){const offset=uniform.__offset;const values=Array.isArray(uniform.value)?uniform.value:[uniform.value];let arrayOffset=0;for(let k=0;k<values.length;k++){const value=values[k];const info=getUniformSize(value);if(typeof value==="number"||typeof value==="boolean"){uniform.__data[0]=value;gl.bufferSubData(gl.UNIFORM_BUFFER,offset+arrayOffset,uniform.__data)}else if(value.isMatrix3){uniform.__data[0]=value.elements[0];uniform.__data[1]=value.elements[1];uniform.__data[2]=value.elements[2];uniform.__data[3]=0;uniform.__data[4]=value.elements[3];uniform.__data[5]=value.elements[4];uniform.__data[6]=value.elements[5];uniform.__data[7]=0;uniform.__data[8]=value.elements[6];uniform.__data[9]=value.elements[7];uniform.__data[10]=value.elements[8];uniform.__data[11]=0}else{value.toArray(uniform.__data,arrayOffset);arrayOffset+=info.storage/Float32Array.BYTES_PER_ELEMENT}}gl.bufferSubData(gl.UNIFORM_BUFFER,offset,uniform.__data)}}}gl.bindBuffer(gl.UNIFORM_BUFFER,null)}function hasUniformChanged(uniform,index,indexArray,cache){const value=uniform.value;const indexString=index+"_"+indexArray;if(cache[indexString]===undefined){if(typeof value==="number"||typeof value==="boolean"){cache[indexString]=value}else{cache[indexString]=value.clone()}return true}else{const cachedObject=cache[indexString];if(typeof value==="number"||typeof value==="boolean"){if(cachedObject!==value){cache[indexString]=value;return true}}else{if(cachedObject.equals(value)===false){cachedObject.copy(value);return true}}}return false}function prepareUniformsGroup(uniformsGroup){const uniforms=uniformsGroup.uniforms;let offset=0;const chunkSize=16;for(let i=0,l=uniforms.length;i<l;i++){const uniformArray=Array.isArray(uniforms[i])?uniforms[i]:[uniforms[i]];for(let j=0,jl=uniformArray.length;j<jl;j++){const uniform=uniformArray[j];const values=Array.isArray(uniform.value)?uniform.value:[uniform.value];for(let k=0,kl=values.length;k<kl;k++){const value=values[k];const info=getUniformSize(value);const chunkOffset=offset%chunkSize;const chunkPadding=chunkOffset%info.boundary;const chunkStart=chunkOffset+chunkPadding;offset+=chunkPadding;if(chunkStart!==0&&chunkSize-chunkStart<info.storage){offset+=chunkSize-chunkStart}uniform.__data=new Float32Array(info.storage/Float32Array.BYTES_PER_ELEMENT);uniform.__offset=offset;offset+=info.storage}}}const chunkOffset=offset%chunkSize;if(chunkOffset>0)offset+=chunkSize-chunkOffset;uniformsGroup.__size=offset;uniformsGroup.__cache={};return this}function getUniformSize(value){const info={boundary:0,storage:0};if(typeof value==="number"||typeof value==="boolean"){info.boundary=4;info.storage=4}else if(value.isVector2){info.boundary=8;info.storage=8}else if(value.isVector3||value.isColor){info.boundary=16;info.storage=12}else if(value.isVector4){info.boundary=16;info.storage=16}else if(value.isMatrix3){info.boundary=48;info.storage=48}else if(value.isMatrix4){info.boundary=64;info.storage=64}else if(value.isTexture){console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.")}else{console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",value)}return info}function onUniformsGroupsDispose(event){const uniformsGroup=event.target;uniformsGroup.removeEventListener("dispose",onUniformsGroupsDispose);const index=allocatedBindingPoints.indexOf(uniformsGroup.__bindingPointIndex);allocatedBindingPoints.splice(index,1);gl.deleteBuffer(buffers[uniformsGroup.id]);delete buffers[uniformsGroup.id];delete updateList[uniformsGroup.id]}function dispose(){for(const id in buffers){gl.deleteBuffer(buffers[id])}allocatedBindingPoints=[];buffers={};updateList={}}return{bind:bind,update:update,dispose:dispose}}class WebGLRenderer{constructor(parameters={}){const{canvas=createCanvasElement(),context=null,depth=true,stencil=false,alpha=false,antialias=false,premultipliedAlpha=true,preserveDrawingBuffer=false,powerPreference="default",failIfMajorPerformanceCaveat=false}=parameters;this.isWebGLRenderer=true;let _alpha;if(context!==null){if(typeof WebGLRenderingContext!=="undefined"&&context instanceof WebGLRenderingContext){throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.")}_alpha=context.getContextAttributes().alpha}else{_alpha=alpha}const uintClearColor=new Uint32Array(4);const intClearColor=new Int32Array(4);let currentRenderList=null;let currentRenderState=null;const renderListStack=[];const renderStateStack=[];this.domElement=canvas;this.debug={checkShaderErrors:true,onShaderError:null};this.autoClear=true;this.autoClearColor=true;this.autoClearDepth=true;this.autoClearStencil=true;this.sortObjects=true;this.clippingPlanes=[];this.localClippingEnabled=false;this._outputColorSpace=SRGBColorSpace;this.toneMapping=NoToneMapping;this.toneMappingExposure=1;const _this=this;let _isContextLost=false;let _currentActiveCubeFace=0;let _currentActiveMipmapLevel=0;let _currentRenderTarget=null;let _currentMaterialId=-1;let _currentCamera=null;const _currentViewport=new Vector4;const _currentScissor=new Vector4;let _currentScissorTest=null;const _currentClearColor=new Color(0);let _currentClearAlpha=0;let _width=canvas.width;let _height=canvas.height;let _pixelRatio=1;let _opaqueSort=null;let _transparentSort=null;const _viewport=new Vector4(0,0,_width,_height);const _scissor=new Vector4(0,0,_width,_height);let _scissorTest=false;const _frustum=new Frustum;let _clippingEnabled=false;let _localClippingEnabled=false;const _projScreenMatrix=new Matrix4;const _vector3=new Vector3;const _vector4=new Vector4;const _emptyScene={background:null,fog:null,environment:null,overrideMaterial:null,isScene:true};let _renderBackground=false;function getTargetPixelRatio(){return _currentRenderTarget===null?_pixelRatio:1}let _gl=context;function getContext(contextName,contextAttributes){return canvas.getContext(contextName,contextAttributes)}try{const contextAttributes={alpha:true,depth,stencil,antialias,premultipliedAlpha,preserveDrawingBuffer,powerPreference,failIfMajorPerformanceCaveat};if("setAttribute"in canvas)canvas.setAttribute("data-engine",`three.js r${REVISION}`);canvas.addEventListener("webglcontextlost",onContextLost,false);canvas.addEventListener("webglcontextrestored",onContextRestore,false);canvas.addEventListener("webglcontextcreationerror",onContextCreationError,false);if(_gl===null){const contextName="webgl2";_gl=getContext(contextName,contextAttributes);if(_gl===null){if(getContext(contextName)){throw new Error("Error creating WebGL context with your selected attributes.")}else{throw new Error("Error creating WebGL context.")}}}}catch(error){console.error("THREE.WebGLRenderer: "+error.message);throw error}let extensions,capabilities,state,info;let properties,textures,cubemaps,cubeuvmaps,attributes,geometries,objects;let programCache,materials,renderLists,renderStates,clipping,shadowMap;let background,morphtargets,bufferRenderer,indexedBufferRenderer;let utils,bindingStates,uniformsGroups;function initGLContext(){extensions=new WebGLExtensions(_gl);extensions.init();utils=new WebGLUtils(_gl,extensions);capabilities=new WebGLCapabilities(_gl,extensions,parameters,utils);state=new WebGLState(_gl);info=new WebGLInfo(_gl);properties=new WebGLProperties;textures=new WebGLTextures(_gl,extensions,state,properties,capabilities,utils,info);cubemaps=new WebGLCubeMaps(_this);cubeuvmaps=new WebGLCubeUVMaps(_this);attributes=new WebGLAttributes(_gl);bindingStates=new WebGLBindingStates(_gl,attributes);geometries=new WebGLGeometries(_gl,attributes,info,bindingStates);objects=new WebGLObjects(_gl,geometries,attributes,info);morphtargets=new WebGLMorphtargets(_gl,capabilities,textures);clipping=new WebGLClipping(properties);programCache=new WebGLPrograms(_this,cubemaps,cubeuvmaps,extensions,capabilities,bindingStates,clipping);materials=new WebGLMaterials(_this,properties);renderLists=new WebGLRenderLists;renderStates=new WebGLRenderStates(extensions);background=new WebGLBackground(_this,cubemaps,cubeuvmaps,state,objects,_alpha,premultipliedAlpha);shadowMap=new WebGLShadowMap(_this,objects,capabilities);uniformsGroups=new WebGLUniformsGroups(_gl,info,capabilities,state);bufferRenderer=new WebGLBufferRenderer(_gl,extensions,info);indexedBufferRenderer=new WebGLIndexedBufferRenderer(_gl,extensions,info);info.programs=programCache.programs;_this.capabilities=capabilities;_this.extensions=extensions;_this.properties=properties;_this.renderLists=renderLists;_this.shadowMap=shadowMap;_this.state=state;_this.info=info}initGLContext();const xr=new WebXRManager(_this,_gl);this.xr=xr;this.getContext=function(){return _gl};this.getContextAttributes=function(){return _gl.getContextAttributes()};this.forceContextLoss=function(){const extension=extensions.get("WEBGL_lose_context");if(extension)extension.loseContext()};this.forceContextRestore=function(){const extension=extensions.get("WEBGL_lose_context");if(extension)extension.restoreContext()};this.getPixelRatio=function(){return _pixelRatio};this.setPixelRatio=function(value){if(value===undefined)return;_pixelRatio=value;this.setSize(_width,_height,false)};this.getSize=function(target){return target.set(_width,_height)};this.setSize=function(width,height,updateStyle=true){if(xr.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}_width=width;_height=height;canvas.width=Math.floor(width*_pixelRatio);canvas.height=Math.floor(height*_pixelRatio);if(updateStyle===true){canvas.style.width=width+"px";canvas.style.height=height+"px"}this.setViewport(0,0,width,height)};this.getDrawingBufferSize=function(target){return target.set(_width*_pixelRatio,_height*_pixelRatio).floor()};this.setDrawingBufferSize=function(width,height,pixelRatio){_width=width;_height=height;_pixelRatio=pixelRatio;canvas.width=Math.floor(width*pixelRatio);canvas.height=Math.floor(height*pixelRatio);this.setViewport(0,0,width,height)};this.getCurrentViewport=function(target){return target.copy(_currentViewport)};this.getViewport=function(target){return target.copy(_viewport)};this.setViewport=function(x,y,width,height){if(x.isVector4){_viewport.set(x.x,x.y,x.z,x.w)}else{_viewport.set(x,y,width,height)}state.viewport(_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).round())};this.getScissor=function(target){return target.copy(_scissor)};this.setScissor=function(x,y,width,height){if(x.isVector4){_scissor.set(x.x,x.y,x.z,x.w)}else{_scissor.set(x,y,width,height)}state.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).round())};this.getScissorTest=function(){return _scissorTest};this.setScissorTest=function(boolean){state.setScissorTest(_scissorTest=boolean)};this.setOpaqueSort=function(method){_opaqueSort=method};this.setTransparentSort=function(method){_transparentSort=method};this.getClearColor=function(target){return target.copy(background.getClearColor())};this.setClearColor=function(){background.setClearColor.apply(background,arguments)};this.getClearAlpha=function(){return background.getClearAlpha()};this.setClearAlpha=function(){background.setClearAlpha.apply(background,arguments)};this.clear=function(color=true,depth=true,stencil=true){let bits=0;if(color){let isIntegerFormat=false;if(_currentRenderTarget!==null){const targetFormat=_currentRenderTarget.texture.format;isIntegerFormat=targetFormat===RGBAIntegerFormat||targetFormat===RGIntegerFormat||targetFormat===RedIntegerFormat}if(isIntegerFormat){const targetType=_currentRenderTarget.texture.type;const isUnsignedType=targetType===UnsignedByteType||targetType===UnsignedIntType||targetType===UnsignedShortType||targetType===UnsignedInt248Type||targetType===UnsignedShort4444Type||targetType===UnsignedShort5551Type;const clearColor=background.getClearColor();const a=background.getClearAlpha();const r=clearColor.r;const g=clearColor.g;const b=clearColor.b;if(isUnsignedType){uintClearColor[0]=r;uintClearColor[1]=g;uintClearColor[2]=b;uintClearColor[3]=a;_gl.clearBufferuiv(_gl.COLOR,0,uintClearColor)}else{intClearColor[0]=r;intClearColor[1]=g;intClearColor[2]=b;intClearColor[3]=a;_gl.clearBufferiv(_gl.COLOR,0,intClearColor)}}else{bits|=_gl.COLOR_BUFFER_BIT}}if(depth)bits|=_gl.DEPTH_BUFFER_BIT;if(stencil){bits|=_gl.STENCIL_BUFFER_BIT;this.state.buffers.stencil.setMask(4294967295)}_gl.clear(bits)};this.clearColor=function(){this.clear(true,false,false)};this.clearDepth=function(){this.clear(false,true,false)};this.clearStencil=function(){this.clear(false,false,true)};this.dispose=function(){canvas.removeEventListener("webglcontextlost",onContextLost,false);canvas.removeEventListener("webglcontextrestored",onContextRestore,false);canvas.removeEventListener("webglcontextcreationerror",onContextCreationError,false);renderLists.dispose();renderStates.dispose();properties.dispose();cubemaps.dispose();cubeuvmaps.dispose();objects.dispose();bindingStates.dispose();uniformsGroups.dispose();programCache.dispose();xr.dispose();xr.removeEventListener("sessionstart",onXRSessionStart);xr.removeEventListener("sessionend",onXRSessionEnd);animation.stop()};function onContextLost(event){event.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");_isContextLost=true}function onContextRestore(){console.log("THREE.WebGLRenderer: Context Restored.");_isContextLost=false;const infoAutoReset=info.autoReset;const shadowMapEnabled=shadowMap.enabled;const shadowMapAutoUpdate=shadowMap.autoUpdate;const shadowMapNeedsUpdate=shadowMap.needsUpdate;const shadowMapType=shadowMap.type;initGLContext();info.autoReset=infoAutoReset;shadowMap.enabled=shadowMapEnabled;shadowMap.autoUpdate=shadowMapAutoUpdate;shadowMap.needsUpdate=shadowMapNeedsUpdate;shadowMap.type=shadowMapType}function onContextCreationError(event){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",event.statusMessage)}function onMaterialDispose(event){const material=event.target;material.removeEventListener("dispose",onMaterialDispose);deallocateMaterial(material)}function deallocateMaterial(material){releaseMaterialProgramReferences(material);properties.remove(material)}function releaseMaterialProgramReferences(material){const programs=properties.get(material).programs;if(programs!==undefined){programs.forEach(function(program){programCache.releaseProgram(program)});if(material.isShaderMaterial){programCache.releaseShaderCache(material)}}}this.renderBufferDirect=function(camera,scene,geometry,material,object,group){if(scene===null)scene=_emptyScene;const frontFaceCW=object.isMesh&&object.matrixWorld.determinant()<0;const program=setProgram(camera,scene,geometry,material,object);state.setMaterial(material,frontFaceCW);let index=geometry.index;let rangeFactor=1;if(material.wireframe===true){index=geometries.getWireframeAttribute(geometry);if(index===undefined)return;rangeFactor=2}const drawRange=geometry.drawRange;const position=geometry.attributes.position;let drawStart=drawRange.start*rangeFactor;let drawEnd=(drawRange.start+drawRange.count)*rangeFactor;if(group!==null){drawStart=Math.max(drawStart,group.start*rangeFactor);drawEnd=Math.min(drawEnd,(group.start+group.count)*rangeFactor)}if(index!==null){drawStart=Math.max(drawStart,0);drawEnd=Math.min(drawEnd,index.count)}else if(position!==undefined&&position!==null){drawStart=Math.max(drawStart,0);drawEnd=Math.min(drawEnd,position.count)}const drawCount=drawEnd-drawStart;if(drawCount<0||drawCount===Infinity)return;bindingStates.setup(object,material,program,geometry,index);let attribute;let renderer=bufferRenderer;if(index!==null){attribute=attributes.get(index);renderer=indexedBufferRenderer;renderer.setIndex(attribute)}if(object.isMesh){if(material.wireframe===true){state.setLineWidth(material.wireframeLinewidth*getTargetPixelRatio());renderer.setMode(_gl.LINES)}else{renderer.setMode(_gl.TRIANGLES)}}else if(object.isLine){let lineWidth=material.linewidth;if(lineWidth===undefined)lineWidth=1;state.setLineWidth(lineWidth*getTargetPixelRatio());if(object.isLineSegments){renderer.setMode(_gl.LINES)}else if(object.isLineLoop){renderer.setMode(_gl.LINE_LOOP)}else{renderer.setMode(_gl.LINE_STRIP)}}else if(object.isPoints){renderer.setMode(_gl.POINTS)}else if(object.isSprite){renderer.setMode(_gl.TRIANGLES)}if(object.isBatchedMesh){if(object._multiDrawInstances!==null){renderer.renderMultiDrawInstances(object._multiDrawStarts,object._multiDrawCounts,object._multiDrawCount,object._multiDrawInstances)}else{if(!extensions.get("WEBGL_multi_draw")){const starts=object._multiDrawStarts;const counts=object._multiDrawCounts;const drawCount=object._multiDrawCount;const bytesPerElement=index?attributes.get(index).bytesPerElement:1;const uniforms=properties.get(material).currentProgram.getUniforms();for(let i=0;i<drawCount;i++){uniforms.setValue(_gl,"_gl_DrawID",i);renderer.render(starts[i]/bytesPerElement,counts[i])}}else{renderer.renderMultiDraw(object._multiDrawStarts,object._multiDrawCounts,object._multiDrawCount)}}}else if(object.isInstancedMesh){renderer.renderInstances(drawStart,drawCount,object.count)}else if(geometry.isInstancedBufferGeometry){const maxInstanceCount=geometry._maxInstanceCount!==undefined?geometry._maxInstanceCount:Infinity;const instanceCount=Math.min(geometry.instanceCount,maxInstanceCount);renderer.renderInstances(drawStart,drawCount,instanceCount)}else{renderer.render(drawStart,drawCount)}};function prepareMaterial(material,scene,object){if(material.transparent===true&&material.side===DoubleSide&&material.forceSinglePass===false){material.side=BackSide;material.needsUpdate=true;getProgram(material,scene,object);material.side=FrontSide;material.needsUpdate=true;getProgram(material,scene,object);material.side=DoubleSide}else{getProgram(material,scene,object)}}this.compile=function(scene,camera,targetScene=null){if(targetScene===null)targetScene=scene;currentRenderState=renderStates.get(targetScene);currentRenderState.init(camera);renderStateStack.push(currentRenderState);targetScene.traverseVisible(function(object){if(object.isLight&&object.layers.test(camera.layers)){currentRenderState.pushLight(object);if(object.castShadow){currentRenderState.pushShadow(object)}}});if(scene!==targetScene){scene.traverseVisible(function(object){if(object.isLight&&object.layers.test(camera.layers)){currentRenderState.pushLight(object);if(object.castShadow){currentRenderState.pushShadow(object)}}})}currentRenderState.setupLights();const materials=new Set;scene.traverse(function(object){const material=object.material;if(material){if(Array.isArray(material)){for(let i=0;i<material.length;i++){const material2=material[i];prepareMaterial(material2,targetScene,object);materials.add(material2)}}else{prepareMaterial(material,targetScene,object);materials.add(material)}}});renderStateStack.pop();currentRenderState=null;return materials};this.compileAsync=function(scene,camera,targetScene=null){const materials=this.compile(scene,camera,targetScene);return new Promise(resolve=>{function checkMaterialsReady(){materials.forEach(function(material){const materialProperties=properties.get(material);const program=materialProperties.currentProgram;if(program.isReady()){materials.delete(material)}});if(materials.size===0){resolve(scene);return}setTimeout(checkMaterialsReady,10)}if(extensions.get("KHR_parallel_shader_compile")!==null){checkMaterialsReady()}else{setTimeout(checkMaterialsReady,10)}})};let onAnimationFrameCallback=null;function onAnimationFrame(time){if(onAnimationFrameCallback)onAnimationFrameCallback(time)}function onXRSessionStart(){animation.stop()}function onXRSessionEnd(){animation.start()}const animation=new WebGLAnimation;animation.setAnimationLoop(onAnimationFrame);if(typeof self!=="undefined")animation.setContext(self);this.setAnimationLoop=function(callback){onAnimationFrameCallback=callback;xr.setAnimationLoop(callback);callback===null?animation.stop():animation.start()};xr.addEventListener("sessionstart",onXRSessionStart);xr.addEventListener("sessionend",onXRSessionEnd);this.render=function(scene,camera){if(camera!==undefined&&camera.isCamera!==true){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(_isContextLost===true)return;if(scene.matrixWorldAutoUpdate===true)scene.updateMatrixWorld();if(camera.parent===null&&camera.matrixWorldAutoUpdate===true)camera.updateMatrixWorld();if(xr.enabled===true&&xr.isPresenting===true){if(xr.cameraAutoUpdate===true)xr.updateCamera(camera);camera=xr.getCamera()}if(scene.isScene===true)scene.onBeforeRender(_this,scene,camera,_currentRenderTarget);currentRenderState=renderStates.get(scene,renderStateStack.length);currentRenderState.init(camera);renderStateStack.push(currentRenderState);_projScreenMatrix.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);_frustum.setFromProjectionMatrix(_projScreenMatrix);_localClippingEnabled=this.localClippingEnabled;_clippingEnabled=clipping.init(this.clippingPlanes,_localClippingEnabled);currentRenderList=renderLists.get(scene,renderListStack.length);currentRenderList.init();renderListStack.push(currentRenderList);if(xr.enabled===true&&xr.isPresenting===true){const depthSensingMesh=_this.xr.getDepthSensingMesh();if(depthSensingMesh!==null){projectObject(depthSensingMesh,camera,-Infinity,_this.sortObjects)}}projectObject(scene,camera,0,_this.sortObjects);currentRenderList.finish();if(_this.sortObjects===true){currentRenderList.sort(_opaqueSort,_transparentSort)}_renderBackground=xr.enabled===false||xr.isPresenting===false||xr.hasDepthSensing()===false;if(_renderBackground){background.addToRenderList(currentRenderList,scene)}this.info.render.frame++;if(_clippingEnabled===true)clipping.beginShadows();const shadowsArray=currentRenderState.state.shadowsArray;shadowMap.render(shadowsArray,scene,camera);if(_clippingEnabled===true)clipping.endShadows();if(this.info.autoReset===true)this.info.reset();const opaqueObjects=currentRenderList.opaque;const transmissiveObjects=currentRenderList.transmissive;currentRenderState.setupLights();if(camera.isArrayCamera){const cameras=camera.cameras;if(transmissiveObjects.length>0){for(let i=0,l=cameras.length;i<l;i++){const camera2=cameras[i];renderTransmissionPass(opaqueObjects,transmissiveObjects,scene,camera2)}}if(_renderBackground)background.render(scene);for(let i=0,l=cameras.length;i<l;i++){const camera2=cameras[i];renderScene(currentRenderList,scene,camera2,camera2.viewport)}}else{if(transmissiveObjects.length>0)renderTransmissionPass(opaqueObjects,transmissiveObjects,scene,camera);if(_renderBackground)background.render(scene);renderScene(currentRenderList,scene,camera)}if(_currentRenderTarget!==null){textures.updateMultisampleRenderTarget(_currentRenderTarget);textures.updateRenderTargetMipmap(_currentRenderTarget)}if(scene.isScene===true)scene.onAfterRender(_this,scene,camera);bindingStates.resetDefaultState();_currentMaterialId=-1;_currentCamera=null;renderStateStack.pop();if(renderStateStack.length>0){currentRenderState=renderStateStack[renderStateStack.length-1];if(_clippingEnabled===true)clipping.setGlobalState(_this.clippingPlanes,currentRenderState.state.camera)}else{currentRenderState=null}renderListStack.pop();if(renderListStack.length>0){currentRenderList=renderListStack[renderListStack.length-1]}else{currentRenderList=null}};function projectObject(object,camera,groupOrder,sortObjects){if(object.visible===false)return;const visible=object.layers.test(camera.layers);if(visible){if(object.isGroup){groupOrder=object.renderOrder}else if(object.isLOD){if(object.autoUpdate===true)object.update(camera)}else if(object.isLight){currentRenderState.pushLight(object);if(object.castShadow){currentRenderState.pushShadow(object)}}else if(object.isSprite){if(!object.frustumCulled||_frustum.intersectsSprite(object)){if(sortObjects){_vector4.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix)}const geometry=objects.update(object);const material=object.material;if(material.visible){currentRenderList.push(object,geometry,material,groupOrder,_vector4.z,null)}}}else if(object.isMesh||object.isLine||object.isPoints){if(!object.frustumCulled||_frustum.intersectsObject(object)){const geometry=objects.update(object);const material=object.material;if(sortObjects){if(object.boundingSphere!==undefined){if(object.boundingSphere===null)object.computeBoundingSphere();_vector4.copy(object.boundingSphere.center)}else{if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_vector4.copy(geometry.boundingSphere.center)}_vector4.applyMatrix4(object.matrixWorld).applyMatrix4(_projScreenMatrix)}if(Array.isArray(material)){const groups=geometry.groups;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];const groupMaterial=material[group.materialIndex];if(groupMaterial&&groupMaterial.visible){currentRenderList.push(object,geometry,groupMaterial,groupOrder,_vector4.z,group)}}}else if(material.visible){currentRenderList.push(object,geometry,material,groupOrder,_vector4.z,null)}}}}const children=object.children;for(let i=0,l=children.length;i<l;i++){projectObject(children[i],camera,groupOrder,sortObjects)}}function renderScene(currentRenderList,scene,camera,viewport){const opaqueObjects=currentRenderList.opaque;const transmissiveObjects=currentRenderList.transmissive;const transparentObjects=currentRenderList.transparent;currentRenderState.setupLightsView(camera);if(_clippingEnabled===true)clipping.setGlobalState(_this.clippingPlanes,camera);if(viewport)state.viewport(_currentViewport.copy(viewport));if(opaqueObjects.length>0)renderObjects(opaqueObjects,scene,camera);if(transmissiveObjects.length>0)renderObjects(transmissiveObjects,scene,camera);if(transparentObjects.length>0)renderObjects(transparentObjects,scene,camera);state.buffers.depth.setTest(true);state.buffers.depth.setMask(true);state.buffers.color.setMask(true);state.setPolygonOffset(false)}function renderTransmissionPass(opaqueObjects,transmissiveObjects,scene,camera){const overrideMaterial=scene.isScene===true?scene.overrideMaterial:null;if(overrideMaterial!==null){return}if(currentRenderState.state.transmissionRenderTarget[camera.id]===undefined){currentRenderState.state.transmissionRenderTarget[camera.id]=new WebGLRenderTarget(1,1,{generateMipmaps:true,type:extensions.has("EXT_color_buffer_half_float")||extensions.has("EXT_color_buffer_float")?HalfFloatType:UnsignedByteType,minFilter:LinearMipmapLinearFilter,samples:4,stencilBuffer:stencil,resolveDepthBuffer:false,resolveStencilBuffer:false,colorSpace:ColorManagement.workingColorSpace})}const transmissionRenderTarget=currentRenderState.state.transmissionRenderTarget[camera.id];const activeViewport=camera.viewport||_currentViewport;transmissionRenderTarget.setSize(activeViewport.z,activeViewport.w);const currentRenderTarget=_this.getRenderTarget();_this.setRenderTarget(transmissionRenderTarget);_this.getClearColor(_currentClearColor);_currentClearAlpha=_this.getClearAlpha();if(_currentClearAlpha<1)_this.setClearColor(16777215,0.5);_this.clear();if(_renderBackground)background.render(scene);const currentToneMapping=_this.toneMapping;_this.toneMapping=NoToneMapping;const currentCameraViewport=camera.viewport;if(camera.viewport!==undefined)camera.viewport=undefined;currentRenderState.setupLightsView(camera);if(_clippingEnabled===true)clipping.setGlobalState(_this.clippingPlanes,camera);renderObjects(opaqueObjects,scene,camera);textures.updateMultisampleRenderTarget(transmissionRenderTarget);textures.updateRenderTargetMipmap(transmissionRenderTarget);if(extensions.has("WEBGL_multisampled_render_to_texture")===false){let renderTargetNeedsUpdate=false;for(let i=0,l=transmissiveObjects.length;i<l;i++){const renderItem=transmissiveObjects[i];const object=renderItem.object;const geometry=renderItem.geometry;const material=renderItem.material;const group=renderItem.group;if(material.side===DoubleSide&&object.layers.test(camera.layers)){const currentSide=material.side;material.side=BackSide;material.needsUpdate=true;renderObject(object,scene,camera,geometry,material,group);material.side=currentSide;material.needsUpdate=true;renderTargetNeedsUpdate=true}}if(renderTargetNeedsUpdate===true){textures.updateMultisampleRenderTarget(transmissionRenderTarget);textures.updateRenderTargetMipmap(transmissionRenderTarget)}}_this.setRenderTarget(currentRenderTarget);_this.setClearColor(_currentClearColor,_currentClearAlpha);if(currentCameraViewport!==undefined)camera.viewport=currentCameraViewport;_this.toneMapping=currentToneMapping}function renderObjects(renderList,scene,camera){const overrideMaterial=scene.isScene===true?scene.overrideMaterial:null;for(let i=0,l=renderList.length;i<l;i++){const renderItem=renderList[i];const object=renderItem.object;const geometry=renderItem.geometry;const material=overrideMaterial===null?renderItem.material:overrideMaterial;const group=renderItem.group;if(object.layers.test(camera.layers)){renderObject(object,scene,camera,geometry,material,group)}}}function renderObject(object,scene,camera,geometry,material,group){object.onBeforeRender(_this,scene,camera,geometry,material,group);object.modelViewMatrix.multiplyMatrices(camera.matrixWorldInverse,object.matrixWorld);object.normalMatrix.getNormalMatrix(object.modelViewMatrix);material.onBeforeRender(_this,scene,camera,geometry,object,group);if(material.transparent===true&&material.side===DoubleSide&&material.forceSinglePass===false){material.side=BackSide;material.needsUpdate=true;_this.renderBufferDirect(camera,scene,geometry,material,object,group);material.side=FrontSide;material.needsUpdate=true;_this.renderBufferDirect(camera,scene,geometry,material,object,group);material.side=DoubleSide}else{_this.renderBufferDirect(camera,scene,geometry,material,object,group)}object.onAfterRender(_this,scene,camera,geometry,material,group)}function getProgram(material,scene,object){if(scene.isScene!==true)scene=_emptyScene;const materialProperties=properties.get(material);const lights=currentRenderState.state.lights;const shadowsArray=currentRenderState.state.shadowsArray;const lightsStateVersion=lights.state.version;const parameters=programCache.getParameters(material,lights.state,shadowsArray,scene,object);const programCacheKey=programCache.getProgramCacheKey(parameters);let programs=materialProperties.programs;materialProperties.environment=material.isMeshStandardMaterial?scene.environment:null;materialProperties.fog=scene.fog;materialProperties.envMap=(material.isMeshStandardMaterial?cubeuvmaps:cubemaps).get(material.envMap||materialProperties.environment);materialProperties.envMapRotation=materialProperties.environment!==null&&material.envMap===null?scene.environmentRotation:material.envMapRotation;if(programs===undefined){material.addEventListener("dispose",onMaterialDispose);programs=new Map;materialProperties.programs=programs}let program=programs.get(programCacheKey);if(program!==undefined){if(materialProperties.currentProgram===program&&materialProperties.lightsStateVersion===lightsStateVersion){updateCommonMaterialProperties(material,parameters);return program}}else{parameters.uniforms=programCache.getUniforms(material);material.onBeforeCompile(parameters,_this);program=programCache.acquireProgram(parameters,programCacheKey);programs.set(programCacheKey,program);materialProperties.uniforms=parameters.uniforms}const uniforms=materialProperties.uniforms;if(!material.isShaderMaterial&&!material.isRawShaderMaterial||material.clipping===true){uniforms.clippingPlanes=clipping.uniform}updateCommonMaterialProperties(material,parameters);materialProperties.needsLights=materialNeedsLights(material);materialProperties.lightsStateVersion=lightsStateVersion;if(materialProperties.needsLights){uniforms.ambientLightColor.value=lights.state.ambient;uniforms.lightProbe.value=lights.state.probe;uniforms.directionalLights.value=lights.state.directional;uniforms.directionalLightShadows.value=lights.state.directionalShadow;uniforms.spotLights.value=lights.state.spot;uniforms.spotLightShadows.value=lights.state.spotShadow;uniforms.rectAreaLights.value=lights.state.rectArea;uniforms.ltc_1.value=lights.state.rectAreaLTC1;uniforms.ltc_2.value=lights.state.rectAreaLTC2;uniforms.pointLights.value=lights.state.point;uniforms.pointLightShadows.value=lights.state.pointShadow;uniforms.hemisphereLights.value=lights.state.hemi;uniforms.directionalShadowMap.value=lights.state.directionalShadowMap;uniforms.directionalShadowMatrix.value=lights.state.directionalShadowMatrix;uniforms.spotShadowMap.value=lights.state.spotShadowMap;uniforms.spotLightMatrix.value=lights.state.spotLightMatrix;uniforms.spotLightMap.value=lights.state.spotLightMap;uniforms.pointShadowMap.value=lights.state.pointShadowMap;uniforms.pointShadowMatrix.value=lights.state.pointShadowMatrix}materialProperties.currentProgram=program;materialProperties.uniformsList=null;return program}function getUniformList(materialProperties){if(materialProperties.uniformsList===null){const progUniforms=materialProperties.currentProgram.getUniforms();materialProperties.uniformsList=WebGLUniforms.seqWithValue(progUniforms.seq,materialProperties.uniforms)}return materialProperties.uniformsList}function updateCommonMaterialProperties(material,parameters){const materialProperties=properties.get(material);materialProperties.outputColorSpace=parameters.outputColorSpace;materialProperties.batching=parameters.batching;materialProperties.batchingColor=parameters.batchingColor;materialProperties.instancing=parameters.instancing;materialProperties.instancingColor=parameters.instancingColor;materialProperties.instancingMorph=parameters.instancingMorph;materialProperties.skinning=parameters.skinning;materialProperties.morphTargets=parameters.morphTargets;materialProperties.morphNormals=parameters.morphNormals;materialProperties.morphColors=parameters.morphColors;materialProperties.morphTargetsCount=parameters.morphTargetsCount;materialProperties.numClippingPlanes=parameters.numClippingPlanes;materialProperties.numIntersection=parameters.numClipIntersection;materialProperties.vertexAlphas=parameters.vertexAlphas;materialProperties.vertexTangents=parameters.vertexTangents;materialProperties.toneMapping=parameters.toneMapping}function setProgram(camera,scene,geometry,material,object){if(scene.isScene!==true)scene=_emptyScene;textures.resetTextureUnits();const fog=scene.fog;const environment=material.isMeshStandardMaterial?scene.environment:null;const colorSpace=_currentRenderTarget===null?_this.outputColorSpace:_currentRenderTarget.isXRRenderTarget===true?_currentRenderTarget.texture.colorSpace:LinearSRGBColorSpace;const envMap=(material.isMeshStandardMaterial?cubeuvmaps:cubemaps).get(material.envMap||environment);const vertexAlphas=material.vertexColors===true&&!!geometry.attributes.color&&geometry.attributes.color.itemSize===4;const vertexTangents=!!geometry.attributes.tangent&&(!!material.normalMap||material.anisotropy>0);const morphTargets=!!geometry.morphAttributes.position;const morphNormals=!!geometry.morphAttributes.normal;const morphColors=!!geometry.morphAttributes.color;let toneMapping=NoToneMapping;if(material.toneMapped){if(_currentRenderTarget===null||_currentRenderTarget.isXRRenderTarget===true){toneMapping=_this.toneMapping}}const morphAttribute=geometry.morphAttributes.position||geometry.morphAttributes.normal||geometry.morphAttributes.color;const morphTargetsCount=morphAttribute!==undefined?morphAttribute.length:0;const materialProperties=properties.get(material);const lights=currentRenderState.state.lights;if(_clippingEnabled===true){if(_localClippingEnabled===true||camera!==_currentCamera){const useCache=camera===_currentCamera&&material.id===_currentMaterialId;clipping.setState(material,camera,useCache)}}let needsProgramChange=false;if(material.version===materialProperties.__version){if(materialProperties.needsLights&&materialProperties.lightsStateVersion!==lights.state.version){needsProgramChange=true}else if(materialProperties.outputColorSpace!==colorSpace){needsProgramChange=true}else if(object.isBatchedMesh&&materialProperties.batching===false){needsProgramChange=true}else if(!object.isBatchedMesh&&materialProperties.batching===true){needsProgramChange=true}else if(object.isBatchedMesh&&materialProperties.batchingColor===true&&object.colorTexture===null){needsProgramChange=true}else if(object.isBatchedMesh&&materialProperties.batchingColor===false&&object.colorTexture!==null){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancing===false){needsProgramChange=true}else if(!object.isInstancedMesh&&materialProperties.instancing===true){needsProgramChange=true}else if(object.isSkinnedMesh&&materialProperties.skinning===false){needsProgramChange=true}else if(!object.isSkinnedMesh&&materialProperties.skinning===true){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancingColor===true&&object.instanceColor===null){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancingColor===false&&object.instanceColor!==null){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancingMorph===true&&object.morphTexture===null){needsProgramChange=true}else if(object.isInstancedMesh&&materialProperties.instancingMorph===false&&object.morphTexture!==null){needsProgramChange=true}else if(materialProperties.envMap!==envMap){needsProgramChange=true}else if(material.fog===true&&materialProperties.fog!==fog){needsProgramChange=true}else if(materialProperties.numClippingPlanes!==undefined&&(materialProperties.numClippingPlanes!==clipping.numPlanes||materialProperties.numIntersection!==clipping.numIntersection)){needsProgramChange=true}else if(materialProperties.vertexAlphas!==vertexAlphas){needsProgramChange=true}else if(materialProperties.vertexTangents!==vertexTangents){needsProgramChange=true}else if(materialProperties.morphTargets!==morphTargets){needsProgramChange=true}else if(materialProperties.morphNormals!==morphNormals){needsProgramChange=true}else if(materialProperties.morphColors!==morphColors){needsProgramChange=true}else if(materialProperties.toneMapping!==toneMapping){needsProgramChange=true}else if(materialProperties.morphTargetsCount!==morphTargetsCount){needsProgramChange=true}}else{needsProgramChange=true;materialProperties.__version=material.version}let program=materialProperties.currentProgram;if(needsProgramChange===true){program=getProgram(material,scene,object)}let refreshProgram=false;let refreshMaterial=false;let refreshLights=false;const p_uniforms=program.getUniforms(),m_uniforms=materialProperties.uniforms;if(state.useProgram(program.program)){refreshProgram=true;refreshMaterial=true;refreshLights=true}if(material.id!==_currentMaterialId){_currentMaterialId=material.id;refreshMaterial=true}if(refreshProgram||_currentCamera!==camera){p_uniforms.setValue(_gl,"projectionMatrix",camera.projectionMatrix);p_uniforms.setValue(_gl,"viewMatrix",camera.matrixWorldInverse);const uCamPos=p_uniforms.map.cameraPosition;if(uCamPos!==undefined){uCamPos.setValue(_gl,_vector3.setFromMatrixPosition(camera.matrixWorld))}if(capabilities.logarithmicDepthBuffer){p_uniforms.setValue(_gl,"logDepthBufFC",2/(Math.log(camera.far+1)/Math.LN2))}if(material.isMeshPhongMaterial||material.isMeshToonMaterial||material.isMeshLambertMaterial||material.isMeshBasicMaterial||material.isMeshStandardMaterial||material.isShaderMaterial){p_uniforms.setValue(_gl,"isOrthographic",camera.isOrthographicCamera===true)}if(_currentCamera!==camera){_currentCamera=camera;refreshMaterial=true;refreshLights=true}}if(object.isSkinnedMesh){p_uniforms.setOptional(_gl,object,"bindMatrix");p_uniforms.setOptional(_gl,object,"bindMatrixInverse");const skeleton=object.skeleton;if(skeleton){if(skeleton.boneTexture===null)skeleton.computeBoneTexture();p_uniforms.setValue(_gl,"boneTexture",skeleton.boneTexture,textures)}}if(object.isBatchedMesh){p_uniforms.setOptional(_gl,object,"batchingTexture");p_uniforms.setValue(_gl,"batchingTexture",object._matricesTexture,textures);p_uniforms.setOptional(_gl,object,"batchingIdTexture");p_uniforms.setValue(_gl,"batchingIdTexture",object._indirectTexture,textures);p_uniforms.setOptional(_gl,object,"batchingColorTexture");if(object._colorsTexture!==null){p_uniforms.setValue(_gl,"batchingColorTexture",object._colorsTexture,textures)}}const morphAttributes=geometry.morphAttributes;if(morphAttributes.position!==undefined||morphAttributes.normal!==undefined||morphAttributes.color!==undefined){morphtargets.update(object,geometry,program)}if(refreshMaterial||materialProperties.receiveShadow!==object.receiveShadow){materialProperties.receiveShadow=object.receiveShadow;p_uniforms.setValue(_gl,"receiveShadow",object.receiveShadow)}if(material.isMeshGouraudMaterial&&material.envMap!==null){m_uniforms.envMap.value=envMap;m_uniforms.flipEnvMap.value=envMap.isCubeTexture&&envMap.isRenderTargetTexture===false?-1:1}if(material.isMeshStandardMaterial&&material.envMap===null&&scene.environment!==null){m_uniforms.envMapIntensity.value=scene.environmentIntensity}if(refreshMaterial){p_uniforms.setValue(_gl,"toneMappingExposure",_this.toneMappingExposure);if(materialProperties.needsLights){markUniformsLightsNeedsUpdate(m_uniforms,refreshLights)}if(fog&&material.fog===true){materials.refreshFogUniforms(m_uniforms,fog)}materials.refreshMaterialUniforms(m_uniforms,material,_pixelRatio,_height,currentRenderState.state.transmissionRenderTarget[camera.id]);WebGLUniforms.upload(_gl,getUniformList(materialProperties),m_uniforms,textures)}if(material.isShaderMaterial&&material.uniformsNeedUpdate===true){WebGLUniforms.upload(_gl,getUniformList(materialProperties),m_uniforms,textures);material.uniformsNeedUpdate=false}if(material.isSpriteMaterial){p_uniforms.setValue(_gl,"center",object.center)}p_uniforms.setValue(_gl,"modelViewMatrix",object.modelViewMatrix);p_uniforms.setValue(_gl,"normalMatrix",object.normalMatrix);p_uniforms.setValue(_gl,"modelMatrix",object.matrixWorld);if(material.isShaderMaterial||material.isRawShaderMaterial){const groups=material.uniformsGroups;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];uniformsGroups.update(group,program);uniformsGroups.bind(group,program)}}return program}function markUniformsLightsNeedsUpdate(uniforms,value){uniforms.ambientLightColor.needsUpdate=value;uniforms.lightProbe.needsUpdate=value;uniforms.directionalLights.needsUpdate=value;uniforms.directionalLightShadows.needsUpdate=value;uniforms.pointLights.needsUpdate=value;uniforms.pointLightShadows.needsUpdate=value;uniforms.spotLights.needsUpdate=value;uniforms.spotLightShadows.needsUpdate=value;uniforms.rectAreaLights.needsUpdate=value;uniforms.hemisphereLights.needsUpdate=value}function materialNeedsLights(material){return material.isMeshLambertMaterial||material.isMeshToonMaterial||material.isMeshPhongMaterial||material.isMeshStandardMaterial||material.isShadowMaterial||material.isShaderMaterial&&material.lights===true}this.getActiveCubeFace=function(){return _currentActiveCubeFace};this.getActiveMipmapLevel=function(){return _currentActiveMipmapLevel};this.getRenderTarget=function(){return _currentRenderTarget};this.setRenderTargetTextures=function(renderTarget,colorTexture,depthTexture){properties.get(renderTarget.texture).__webglTexture=colorTexture;properties.get(renderTarget.depthTexture).__webglTexture=depthTexture;const renderTargetProperties=properties.get(renderTarget);renderTargetProperties.__hasExternalTextures=true;renderTargetProperties.__autoAllocateDepthBuffer=depthTexture===undefined;if(!renderTargetProperties.__autoAllocateDepthBuffer){if(extensions.has("WEBGL_multisampled_render_to_texture")===true){console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided");renderTargetProperties.__useRenderToTexture=false}}};this.setRenderTargetFramebuffer=function(renderTarget,defaultFramebuffer){const renderTargetProperties=properties.get(renderTarget);renderTargetProperties.__webglFramebuffer=defaultFramebuffer;renderTargetProperties.__useDefaultFramebuffer=defaultFramebuffer===undefined};this.setRenderTarget=function(renderTarget,activeCubeFace=0,activeMipmapLevel=0){_currentRenderTarget=renderTarget;_currentActiveCubeFace=activeCubeFace;_currentActiveMipmapLevel=activeMipmapLevel;let useDefaultFramebuffer=true;let framebuffer=null;let isCube=false;let isRenderTarget3D=false;if(renderTarget){const renderTargetProperties=properties.get(renderTarget);if(renderTargetProperties.__useDefaultFramebuffer!==undefined){state.bindFramebuffer(_gl.FRAMEBUFFER,null);useDefaultFramebuffer=false}else if(renderTargetProperties.__webglFramebuffer===undefined){textures.setupRenderTarget(renderTarget)}else if(renderTargetProperties.__hasExternalTextures){textures.rebindTextures(renderTarget,properties.get(renderTarget.texture).__webglTexture,properties.get(renderTarget.depthTexture).__webglTexture)}else if(renderTarget.depthBuffer){const depthTexture=renderTarget.depthTexture;if(renderTargetProperties.__boundDepthTexture!==depthTexture){if(depthTexture!==null&&properties.has(depthTexture)&&(renderTarget.width!==depthTexture.image.width||renderTarget.height!==depthTexture.image.height)){throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.")}textures.setupDepthRenderbuffer(renderTarget)}}const texture=renderTarget.texture;if(texture.isData3DTexture||texture.isDataArrayTexture||texture.isCompressedArrayTexture){isRenderTarget3D=true}const __webglFramebuffer=properties.get(renderTarget).__webglFramebuffer;if(renderTarget.isWebGLCubeRenderTarget){if(Array.isArray(__webglFramebuffer[activeCubeFace])){framebuffer=__webglFramebuffer[activeCubeFace][activeMipmapLevel]}else{framebuffer=__webglFramebuffer[activeCubeFace]}isCube=true}else if(renderTarget.samples>0&&textures.useMultisampledRTT(renderTarget)===false){framebuffer=properties.get(renderTarget).__webglMultisampledFramebuffer}else{if(Array.isArray(__webglFramebuffer)){framebuffer=__webglFramebuffer[activeMipmapLevel]}else{framebuffer=__webglFramebuffer}}_currentViewport.copy(renderTarget.viewport);_currentScissor.copy(renderTarget.scissor);_currentScissorTest=renderTarget.scissorTest}else{_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor();_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor();_currentScissorTest=_scissorTest}const framebufferBound=state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);if(framebufferBound&&useDefaultFramebuffer){state.drawBuffers(renderTarget,framebuffer)}state.viewport(_currentViewport);state.scissor(_currentScissor);state.setScissorTest(_currentScissorTest);if(isCube){const textureProperties=properties.get(renderTarget.texture);_gl.framebufferTexture2D(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,_gl.TEXTURE_CUBE_MAP_POSITIVE_X+activeCubeFace,textureProperties.__webglTexture,activeMipmapLevel)}else if(isRenderTarget3D){const textureProperties=properties.get(renderTarget.texture);const layer=activeCubeFace||0;_gl.framebufferTextureLayer(_gl.FRAMEBUFFER,_gl.COLOR_ATTACHMENT0,textureProperties.__webglTexture,activeMipmapLevel||0,layer)}_currentMaterialId=-1};this.readRenderTargetPixels=function(renderTarget,x,y,width,height,buffer,activeCubeFaceIndex){if(!(renderTarget&&renderTarget.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let framebuffer=properties.get(renderTarget).__webglFramebuffer;if(renderTarget.isWebGLCubeRenderTarget&&activeCubeFaceIndex!==undefined){framebuffer=framebuffer[activeCubeFaceIndex]}if(framebuffer){state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);try{const texture=renderTarget.texture;const textureFormat=texture.format;const textureType=texture.type;if(!capabilities.textureFormatReadable(textureFormat)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!capabilities.textureTypeReadable(textureType)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}if(x>=0&&x<=renderTarget.width-width&&y>=0&&y<=renderTarget.height-height){_gl.readPixels(x,y,width,height,utils.convert(textureFormat),utils.convert(textureType),buffer)}}finally{const framebuffer=_currentRenderTarget!==null?properties.get(_currentRenderTarget).__webglFramebuffer:null;state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer)}}};this.readRenderTargetPixelsAsync=async function(renderTarget,x,y,width,height,buffer,activeCubeFaceIndex){if(!(renderTarget&&renderTarget.isWebGLRenderTarget)){throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")}let framebuffer=properties.get(renderTarget).__webglFramebuffer;if(renderTarget.isWebGLCubeRenderTarget&&activeCubeFaceIndex!==undefined){framebuffer=framebuffer[activeCubeFaceIndex]}if(framebuffer){state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer);try{const texture=renderTarget.texture;const textureFormat=texture.format;const textureType=texture.type;if(!capabilities.textureFormatReadable(textureFormat)){throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.")}if(!capabilities.textureTypeReadable(textureType)){throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.")}if(x>=0&&x<=renderTarget.width-width&&y>=0&&y<=renderTarget.height-height){const glBuffer=_gl.createBuffer();_gl.bindBuffer(_gl.PIXEL_PACK_BUFFER,glBuffer);_gl.bufferData(_gl.PIXEL_PACK_BUFFER,buffer.byteLength,_gl.STREAM_READ);_gl.readPixels(x,y,width,height,utils.convert(textureFormat),utils.convert(textureType),0);_gl.flush();const sync=_gl.fenceSync(_gl.SYNC_GPU_COMMANDS_COMPLETE,0);await probeAsync(_gl,sync,4);try{_gl.bindBuffer(_gl.PIXEL_PACK_BUFFER,glBuffer);_gl.getBufferSubData(_gl.PIXEL_PACK_BUFFER,0,buffer)}finally{_gl.deleteBuffer(glBuffer);_gl.deleteSync(sync)}return buffer}}finally{const framebuffer=_currentRenderTarget!==null?properties.get(_currentRenderTarget).__webglFramebuffer:null;state.bindFramebuffer(_gl.FRAMEBUFFER,framebuffer)}}};this.copyFramebufferToTexture=function(texture,position=null,level=0){if(texture.isTexture!==true){warnOnce("WebGLRenderer: copyFramebufferToTexture function signature has changed.");position=arguments[0]||null;texture=arguments[1]}const levelScale=Math.pow(2,-level);const width=Math.floor(texture.image.width*levelScale);const height=Math.floor(texture.image.height*levelScale);const x=position!==null?position.x:0;const y=position!==null?position.y:0;textures.setTexture2D(texture,0);_gl.copyTexSubImage2D(_gl.TEXTURE_2D,level,0,0,x,y,width,height);state.unbindTexture()};this.copyTextureToTexture=function(srcTexture,dstTexture,srcRegion=null,dstPosition=null,level=0){if(srcTexture.isTexture!==true){warnOnce("WebGLRenderer: copyTextureToTexture function signature has changed.");dstPosition=arguments[0]||null;srcTexture=arguments[1];dstTexture=arguments[2];level=arguments[3]||0;srcRegion=null}let width,height,minX,minY;let dstX,dstY;if(srcRegion!==null){width=srcRegion.max.x-srcRegion.min.x;height=srcRegion.max.y-srcRegion.min.y;minX=srcRegion.min.x;minY=srcRegion.min.y}else{width=srcTexture.image.width;height=srcTexture.image.height;minX=0;minY=0}if(dstPosition!==null){dstX=dstPosition.x;dstY=dstPosition.y}else{dstX=0;dstY=0}const glFormat=utils.convert(dstTexture.format);const glType=utils.convert(dstTexture.type);textures.setTexture2D(dstTexture,0);_gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL,dstTexture.flipY);_gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,dstTexture.premultiplyAlpha);_gl.pixelStorei(_gl.UNPACK_ALIGNMENT,dstTexture.unpackAlignment);const currentUnpackRowLen=_gl.getParameter(_gl.UNPACK_ROW_LENGTH);const currentUnpackImageHeight=_gl.getParameter(_gl.UNPACK_IMAGE_HEIGHT);const currentUnpackSkipPixels=_gl.getParameter(_gl.UNPACK_SKIP_PIXELS);const currentUnpackSkipRows=_gl.getParameter(_gl.UNPACK_SKIP_ROWS);const currentUnpackSkipImages=_gl.getParameter(_gl.UNPACK_SKIP_IMAGES);const image=srcTexture.isCompressedTexture?srcTexture.mipmaps[level]:srcTexture.image;_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH,image.width);_gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT,image.height);_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS,minX);_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS,minY);if(srcTexture.isDataTexture){_gl.texSubImage2D(_gl.TEXTURE_2D,level,dstX,dstY,width,height,glFormat,glType,image.data)}else{if(srcTexture.isCompressedTexture){_gl.compressedTexSubImage2D(_gl.TEXTURE_2D,level,dstX,dstY,image.width,image.height,glFormat,image.data)}else{_gl.texSubImage2D(_gl.TEXTURE_2D,level,dstX,dstY,width,height,glFormat,glType,image)}}_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH,currentUnpackRowLen);_gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT,currentUnpackImageHeight);_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS,currentUnpackSkipPixels);_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS,currentUnpackSkipRows);_gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES,currentUnpackSkipImages);if(level===0&&dstTexture.generateMipmaps)_gl.generateMipmap(_gl.TEXTURE_2D);state.unbindTexture()};this.copyTextureToTexture3D=function(srcTexture,dstTexture,srcRegion=null,dstPosition=null,level=0){if(srcTexture.isTexture!==true){warnOnce("WebGLRenderer: copyTextureToTexture3D function signature has changed.");srcRegion=arguments[0]||null;dstPosition=arguments[1]||null;srcTexture=arguments[2];dstTexture=arguments[3];level=arguments[4]||0}let width,height,depth,minX,minY,minZ;let dstX,dstY,dstZ;const image=srcTexture.isCompressedTexture?srcTexture.mipmaps[level]:srcTexture.image;if(srcRegion!==null){width=srcRegion.max.x-srcRegion.min.x;height=srcRegion.max.y-srcRegion.min.y;depth=srcRegion.max.z-srcRegion.min.z;minX=srcRegion.min.x;minY=srcRegion.min.y;minZ=srcRegion.min.z}else{width=image.width;height=image.height;depth=image.depth;minX=0;minY=0;minZ=0}if(dstPosition!==null){dstX=dstPosition.x;dstY=dstPosition.y;dstZ=dstPosition.z}else{dstX=0;dstY=0;dstZ=0}const glFormat=utils.convert(dstTexture.format);const glType=utils.convert(dstTexture.type);let glTarget;if(dstTexture.isData3DTexture){textures.setTexture3D(dstTexture,0);glTarget=_gl.TEXTURE_3D}else if(dstTexture.isDataArrayTexture||dstTexture.isCompressedArrayTexture){textures.setTexture2DArray(dstTexture,0);glTarget=_gl.TEXTURE_2D_ARRAY}else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}_gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL,dstTexture.flipY);_gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,dstTexture.premultiplyAlpha);_gl.pixelStorei(_gl.UNPACK_ALIGNMENT,dstTexture.unpackAlignment);const currentUnpackRowLen=_gl.getParameter(_gl.UNPACK_ROW_LENGTH);const currentUnpackImageHeight=_gl.getParameter(_gl.UNPACK_IMAGE_HEIGHT);const currentUnpackSkipPixels=_gl.getParameter(_gl.UNPACK_SKIP_PIXELS);const currentUnpackSkipRows=_gl.getParameter(_gl.UNPACK_SKIP_ROWS);const currentUnpackSkipImages=_gl.getParameter(_gl.UNPACK_SKIP_IMAGES);_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH,image.width);_gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT,image.height);_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS,minX);_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS,minY);_gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES,minZ);if(srcTexture.isDataTexture||srcTexture.isData3DTexture){_gl.texSubImage3D(glTarget,level,dstX,dstY,dstZ,width,height,depth,glFormat,glType,image.data)}else{if(dstTexture.isCompressedArrayTexture){_gl.compressedTexSubImage3D(glTarget,level,dstX,dstY,dstZ,width,height,depth,glFormat,image.data)}else{_gl.texSubImage3D(glTarget,level,dstX,dstY,dstZ,width,height,depth,glFormat,glType,image)}}_gl.pixelStorei(_gl.UNPACK_ROW_LENGTH,currentUnpackRowLen);_gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT,currentUnpackImageHeight);_gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS,currentUnpackSkipPixels);_gl.pixelStorei(_gl.UNPACK_SKIP_ROWS,currentUnpackSkipRows);_gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES,currentUnpackSkipImages);if(level===0&&dstTexture.generateMipmaps)_gl.generateMipmap(glTarget);state.unbindTexture()};this.initRenderTarget=function(target){if(properties.get(target).__webglFramebuffer===undefined){textures.setupRenderTarget(target)}};this.initTexture=function(texture){if(texture.isCubeTexture){textures.setTextureCube(texture,0)}else if(texture.isData3DTexture){textures.setTexture3D(texture,0)}else if(texture.isDataArrayTexture||texture.isCompressedArrayTexture){textures.setTexture2DArray(texture,0)}else{textures.setTexture2D(texture,0)}state.unbindTexture()};this.resetState=function(){_currentActiveCubeFace=0;_currentActiveMipmapLevel=0;_currentRenderTarget=null;state.reset();bindingStates.reset()};if(typeof __THREE_DEVTOOLS__!=="undefined"){__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}}get coordinateSystem(){return WebGLCoordinateSystem}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(colorSpace){this._outputColorSpace=colorSpace;const gl=this.getContext();gl.drawingBufferColorSpace=colorSpace===DisplayP3ColorSpace?"display-p3":"srgb";gl.unpackColorSpace=ColorManagement.workingColorSpace===LinearDisplayP3ColorSpace?"display-p3":"srgb"}}class FogExp2{constructor(color,density=0.00025){this.isFogExp2=true;this.name="";this.color=new Color(color);this.density=density}clone(){return new FogExp2(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Fog{constructor(color,near=1,far=1000){this.isFog=true;this.name="";this.color=new Color(color);this.near=near;this.far=far}clone(){return new Fog(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Scene extends Object3D{constructor(){super();this.isScene=true;this.type="Scene";this.background=null;this.environment=null;this.fog=null;this.backgroundBlurriness=0;this.backgroundIntensity=1;this.backgroundRotation=new Euler;this.environmentIntensity=1;this.environmentRotation=new Euler;this.overrideMaterial=null;if(typeof __THREE_DEVTOOLS__!=="undefined"){__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}}copy(source,recursive){super.copy(source,recursive);if(source.background!==null)this.background=source.background.clone();if(source.environment!==null)this.environment=source.environment.clone();if(source.fog!==null)this.fog=source.fog.clone();this.backgroundBlurriness=source.backgroundBlurriness;this.backgroundIntensity=source.backgroundIntensity;this.backgroundRotation.copy(source.backgroundRotation);this.environmentIntensity=source.environmentIntensity;this.environmentRotation.copy(source.environmentRotation);if(source.overrideMaterial!==null)this.overrideMaterial=source.overrideMaterial.clone();this.matrixAutoUpdate=source.matrixAutoUpdate;return this}toJSON(meta){const data=super.toJSON(meta);if(this.fog!==null)data.object.fog=this.fog.toJSON();if(this.backgroundBlurriness>0)data.object.backgroundBlurriness=this.backgroundBlurriness;if(this.backgroundIntensity!==1)data.object.backgroundIntensity=this.backgroundIntensity;data.object.backgroundRotation=this.backgroundRotation.toArray();if(this.environmentIntensity!==1)data.object.environmentIntensity=this.environmentIntensity;data.object.environmentRotation=this.environmentRotation.toArray();return data}}class InterleavedBuffer{constructor(array,stride){this.isInterleavedBuffer=true;this.array=array;this.stride=stride;this.count=array!==undefined?array.length/stride:0;this.usage=StaticDrawUsage;this._updateRange={offset:0,count:-1};this.updateRanges=[];this.version=0;this.uuid=generateUUID()}onUploadCallback(){}set needsUpdate(value){if(value===true)this.version++}get updateRange(){warnOnce("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.");return this._updateRange}setUsage(value){this.usage=value;return this}addUpdateRange(start,count){this.updateRanges.push({start,count})}clearUpdateRanges(){this.updateRanges.length=0}copy(source){this.array=new source.array.constructor(source.array);this.count=source.count;this.stride=source.stride;this.usage=source.usage;return this}copyAt(index1,attribute,index2){index1*=this.stride;index2*=attribute.stride;for(let i=0,l=this.stride;i<l;i++){this.array[index1+i]=attribute.array[index2+i]}return this}set(value,offset=0){this.array.set(value,offset);return this}clone(data){if(data.arrayBuffers===undefined){data.arrayBuffers={}}if(this.array.buffer._uuid===undefined){this.array.buffer._uuid=generateUUID()}if(data.arrayBuffers[this.array.buffer._uuid]===undefined){data.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer}const array=new this.array.constructor(data.arrayBuffers[this.array.buffer._uuid]);const ib=new this.constructor(array,this.stride);ib.setUsage(this.usage);return ib}onUpload(callback){this.onUploadCallback=callback;return this}toJSON(data){if(data.arrayBuffers===undefined){data.arrayBuffers={}}if(this.array.buffer._uuid===undefined){this.array.buffer._uuid=generateUUID()}if(data.arrayBuffers[this.array.buffer._uuid]===undefined){data.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))}return{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const _vector$6=new Vector3;class InterleavedBufferAttribute{constructor(interleavedBuffer,itemSize,offset,normalized=false){this.isInterleavedBufferAttribute=true;this.name="";this.data=interleavedBuffer;this.itemSize=itemSize;this.offset=offset;this.normalized=normalized}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(value){this.data.needsUpdate=value}applyMatrix4(m){for(let i=0,l=this.data.count;i<l;i++){_vector$6.fromBufferAttribute(this,i);_vector$6.applyMatrix4(m);this.setXYZ(i,_vector$6.x,_vector$6.y,_vector$6.z)}return this}applyNormalMatrix(m){for(let i=0,l=this.count;i<l;i++){_vector$6.fromBufferAttribute(this,i);_vector$6.applyNormalMatrix(m);this.setXYZ(i,_vector$6.x,_vector$6.y,_vector$6.z)}return this}transformDirection(m){for(let i=0,l=this.count;i<l;i++){_vector$6.fromBufferAttribute(this,i);_vector$6.transformDirection(m);this.setXYZ(i,_vector$6.x,_vector$6.y,_vector$6.z)}return this}getComponent(index,component){let value=this.array[index*this.data.stride+this.offset+component];if(this.normalized)value=denormalize(value,this.array);return value}setComponent(index,component,value){if(this.normalized)value=normalize(value,this.array);this.data.array[index*this.data.stride+this.offset+component]=value;return this}setX(index,x){if(this.normalized)x=normalize(x,this.array);this.data.array[index*this.data.stride+this.offset]=x;return this}setY(index,y){if(this.normalized)y=normalize(y,this.array);this.data.array[index*this.data.stride+this.offset+1]=y;return this}setZ(index,z){if(this.normalized)z=normalize(z,this.array);this.data.array[index*this.data.stride+this.offset+2]=z;return this}setW(index,w){if(this.normalized)w=normalize(w,this.array);this.data.array[index*this.data.stride+this.offset+3]=w;return this}getX(index){let x=this.data.array[index*this.data.stride+this.offset];if(this.normalized)x=denormalize(x,this.array);return x}getY(index){let y=this.data.array[index*this.data.stride+this.offset+1];if(this.normalized)y=denormalize(y,this.array);return y}getZ(index){let z=this.data.array[index*this.data.stride+this.offset+2];if(this.normalized)z=denormalize(z,this.array);return z}getW(index){let w=this.data.array[index*this.data.stride+this.offset+3];if(this.normalized)w=denormalize(w,this.array);return w}setXY(index,x,y){index=index*this.data.stride+this.offset;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array)}this.data.array[index+0]=x;this.data.array[index+1]=y;return this}setXYZ(index,x,y,z){index=index*this.data.stride+this.offset;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array)}this.data.array[index+0]=x;this.data.array[index+1]=y;this.data.array[index+2]=z;return this}setXYZW(index,x,y,z,w){index=index*this.data.stride+this.offset;if(this.normalized){x=normalize(x,this.array);y=normalize(y,this.array);z=normalize(z,this.array);w=normalize(w,this.array)}this.data.array[index+0]=x;this.data.array[index+1]=y;this.data.array[index+2]=z;this.data.array[index+3]=w;return this}clone(data){if(data===undefined){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const array=[];for(let i=0;i<this.count;i++){const index=i*this.data.stride+this.offset;for(let j=0;j<this.itemSize;j++){array.push(this.data.array[index+j])}}return new BufferAttribute(new this.array.constructor(array),this.itemSize,this.normalized)}else{if(data.interleavedBuffers===undefined){data.interleavedBuffers={}}if(data.interleavedBuffers[this.data.uuid]===undefined){data.interleavedBuffers[this.data.uuid]=this.data.clone(data)}return new InterleavedBufferAttribute(data.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}}toJSON(data){if(data===undefined){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const array=[];for(let i=0;i<this.count;i++){const index=i*this.data.stride+this.offset;for(let j=0;j<this.itemSize;j++){array.push(this.data.array[index+j])}}return{itemSize:this.itemSize,type:this.array.constructor.name,array:array,normalized:this.normalized}}else{if(data.interleavedBuffers===undefined){data.interleavedBuffers={}}if(data.interleavedBuffers[this.data.uuid]===undefined){data.interleavedBuffers[this.data.uuid]=this.data.toJSON(data)}return{isInterleavedBufferAttribute:true,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}}class SpriteMaterial extends Material{constructor(parameters){super();this.isSpriteMaterial=true;this.type="SpriteMaterial";this.color=new Color(16777215);this.map=null;this.alphaMap=null;this.rotation=0;this.sizeAttenuation=true;this.transparent=true;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.alphaMap=source.alphaMap;this.rotation=source.rotation;this.sizeAttenuation=source.sizeAttenuation;this.fog=source.fog;return this}}let _geometry;const _intersectPoint=new Vector3;const _worldScale=new Vector3;const _mvPosition=new Vector3;const _alignedPosition=new Vector2;const _rotatedPosition=new Vector2;const _viewWorldMatrix=new Matrix4;const _vA=new Vector3;const _vB=new Vector3;const _vC=new Vector3;const _uvA=new Vector2;const _uvB=new Vector2;const _uvC=new Vector2;class Sprite extends Object3D{constructor(material=new SpriteMaterial){super();this.isSprite=true;this.type="Sprite";if(_geometry===undefined){_geometry=new BufferGeometry;const float32Array=new Float32Array([-0.5,-0.5,0,0,0,0.5,-0.5,0,1,0,0.5,0.5,0,1,1,-0.5,0.5,0,0,1]);const interleavedBuffer=new InterleavedBuffer(float32Array,5);_geometry.setIndex([0,1,2,0,2,3]);_geometry.setAttribute("position",new InterleavedBufferAttribute(interleavedBuffer,3,0,false));_geometry.setAttribute("uv",new InterleavedBufferAttribute(interleavedBuffer,2,3,false))}this.geometry=_geometry;this.material=material;this.center=new Vector2(0.5,0.5)}raycast(raycaster,intersects){if(raycaster.camera===null){console.error("THREE.Sprite: \"Raycaster.camera\" needs to be set in order to raycast against sprites.")}_worldScale.setFromMatrixScale(this.matrixWorld);_viewWorldMatrix.copy(raycaster.camera.matrixWorld);this.modelViewMatrix.multiplyMatrices(raycaster.camera.matrixWorldInverse,this.matrixWorld);_mvPosition.setFromMatrixPosition(this.modelViewMatrix);if(raycaster.camera.isPerspectiveCamera&&this.material.sizeAttenuation===false){_worldScale.multiplyScalar(-_mvPosition.z)}const rotation=this.material.rotation;let sin,cos;if(rotation!==0){cos=Math.cos(rotation);sin=Math.sin(rotation)}const center=this.center;transformVertex(_vA.set(-0.5,-0.5,0),_mvPosition,center,_worldScale,sin,cos);transformVertex(_vB.set(0.5,-0.5,0),_mvPosition,center,_worldScale,sin,cos);transformVertex(_vC.set(0.5,0.5,0),_mvPosition,center,_worldScale,sin,cos);_uvA.set(0,0);_uvB.set(1,0);_uvC.set(1,1);let intersect=raycaster.ray.intersectTriangle(_vA,_vB,_vC,false,_intersectPoint);if(intersect===null){transformVertex(_vB.set(-0.5,0.5,0),_mvPosition,center,_worldScale,sin,cos);_uvB.set(0,1);intersect=raycaster.ray.intersectTriangle(_vA,_vC,_vB,false,_intersectPoint);if(intersect===null){return}}const distance=raycaster.ray.origin.distanceTo(_intersectPoint);if(distance<raycaster.near||distance>raycaster.far)return;intersects.push({distance:distance,point:_intersectPoint.clone(),uv:Triangle.getInterpolation(_intersectPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new Vector2),face:null,object:this})}copy(source,recursive){super.copy(source,recursive);if(source.center!==undefined)this.center.copy(source.center);this.material=source.material;return this}}function transformVertex(vertexPosition,mvPosition,center,scale,sin,cos){_alignedPosition.subVectors(vertexPosition,center).addScalar(0.5).multiply(scale);if(sin!==undefined){_rotatedPosition.x=cos*_alignedPosition.x-sin*_alignedPosition.y;_rotatedPosition.y=sin*_alignedPosition.x+cos*_alignedPosition.y}else{_rotatedPosition.copy(_alignedPosition)}vertexPosition.copy(mvPosition);vertexPosition.x+=_rotatedPosition.x;vertexPosition.y+=_rotatedPosition.y;vertexPosition.applyMatrix4(_viewWorldMatrix)}const _v1$2=new Vector3;const _v2$1=new Vector3;class LOD extends Object3D{constructor(){super();this._currentLevel=0;this.type="LOD";Object.defineProperties(this,{levels:{enumerable:true,value:[]},isLOD:{value:true}});this.autoUpdate=true}copy(source){super.copy(source,false);const levels=source.levels;for(let i=0,l=levels.length;i<l;i++){const level=levels[i];this.addLevel(level.object.clone(),level.distance,level.hysteresis)}this.autoUpdate=source.autoUpdate;return this}addLevel(object,distance=0,hysteresis=0){distance=Math.abs(distance);const levels=this.levels;let l;for(l=0;l<levels.length;l++){if(distance<levels[l].distance){break}}levels.splice(l,0,{distance:distance,hysteresis:hysteresis,object:object});this.add(object);return this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(distance){const levels=this.levels;if(levels.length>0){let i,l;for(i=1,l=levels.length;i<l;i++){let levelDistance=levels[i].distance;if(levels[i].object.visible){levelDistance-=levelDistance*levels[i].hysteresis}if(distance<levelDistance){break}}return levels[i-1].object}return null}raycast(raycaster,intersects){const levels=this.levels;if(levels.length>0){_v1$2.setFromMatrixPosition(this.matrixWorld);const distance=raycaster.ray.origin.distanceTo(_v1$2);this.getObjectForDistance(distance).raycast(raycaster,intersects)}}update(camera){const levels=this.levels;if(levels.length>1){_v1$2.setFromMatrixPosition(camera.matrixWorld);_v2$1.setFromMatrixPosition(this.matrixWorld);const distance=_v1$2.distanceTo(_v2$1)/camera.zoom;levels[0].object.visible=true;let i,l;for(i=1,l=levels.length;i<l;i++){let levelDistance=levels[i].distance;if(levels[i].object.visible){levelDistance-=levelDistance*levels[i].hysteresis}if(distance>=levelDistance){levels[i-1].object.visible=false;levels[i].object.visible=true}else{break}}this._currentLevel=i-1;for(;i<l;i++){levels[i].object.visible=false}}}toJSON(meta){const data=super.toJSON(meta);if(this.autoUpdate===false)data.object.autoUpdate=false;data.object.levels=[];const levels=this.levels;for(let i=0,l=levels.length;i<l;i++){const level=levels[i];data.object.levels.push({object:level.object.uuid,distance:level.distance,hysteresis:level.hysteresis})}return data}}const _basePosition=new Vector3;const _skinIndex=new Vector4;const _skinWeight=new Vector4;const _vector3=new Vector3;const _matrix4=new Matrix4;const _vertex=new Vector3;const _sphere$4=new Sphere;const _inverseMatrix$2=new Matrix4;const _ray$2=new Ray;class SkinnedMesh extends Mesh{constructor(geometry,material){super(geometry,material);this.isSkinnedMesh=true;this.type="SkinnedMesh";this.bindMode=AttachedBindMode;this.bindMatrix=new Matrix4;this.bindMatrixInverse=new Matrix4;this.boundingBox=null;this.boundingSphere=null}computeBoundingBox(){const geometry=this.geometry;if(this.boundingBox===null){this.boundingBox=new Box3}this.boundingBox.makeEmpty();const positionAttribute=geometry.getAttribute("position");for(let i=0;i<positionAttribute.count;i++){this.getVertexPosition(i,_vertex);this.boundingBox.expandByPoint(_vertex)}}computeBoundingSphere(){const geometry=this.geometry;if(this.boundingSphere===null){this.boundingSphere=new Sphere}this.boundingSphere.makeEmpty();const positionAttribute=geometry.getAttribute("position");for(let i=0;i<positionAttribute.count;i++){this.getVertexPosition(i,_vertex);this.boundingSphere.expandByPoint(_vertex)}}copy(source,recursive){super.copy(source,recursive);this.bindMode=source.bindMode;this.bindMatrix.copy(source.bindMatrix);this.bindMatrixInverse.copy(source.bindMatrixInverse);this.skeleton=source.skeleton;if(source.boundingBox!==null)this.boundingBox=source.boundingBox.clone();if(source.boundingSphere!==null)this.boundingSphere=source.boundingSphere.clone();return this}raycast(raycaster,intersects){const material=this.material;const matrixWorld=this.matrixWorld;if(material===undefined)return;if(this.boundingSphere===null)this.computeBoundingSphere();_sphere$4.copy(this.boundingSphere);_sphere$4.applyMatrix4(matrixWorld);if(raycaster.ray.intersectsSphere(_sphere$4)===false)return;_inverseMatrix$2.copy(matrixWorld).invert();_ray$2.copy(raycaster.ray).applyMatrix4(_inverseMatrix$2);if(this.boundingBox!==null){if(_ray$2.intersectsBox(this.boundingBox)===false)return}this._computeIntersections(raycaster,intersects,_ray$2)}getVertexPosition(index,target){super.getVertexPosition(index,target);this.applyBoneTransform(index,target);return target}bind(skeleton,bindMatrix){this.skeleton=skeleton;if(bindMatrix===undefined){this.updateMatrixWorld(true);this.skeleton.calculateInverses();bindMatrix=this.matrixWorld}this.bindMatrix.copy(bindMatrix);this.bindMatrixInverse.copy(bindMatrix).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const vector=new Vector4;const skinWeight=this.geometry.attributes.skinWeight;for(let i=0,l=skinWeight.count;i<l;i++){vector.fromBufferAttribute(skinWeight,i);const scale=1/vector.manhattanLength();if(scale!==Infinity){vector.multiplyScalar(scale)}else{vector.set(1,0,0,0)}skinWeight.setXYZW(i,vector.x,vector.y,vector.z,vector.w)}}updateMatrixWorld(force){super.updateMatrixWorld(force);if(this.bindMode===AttachedBindMode){this.bindMatrixInverse.copy(this.matrixWorld).invert()}else if(this.bindMode===DetachedBindMode){this.bindMatrixInverse.copy(this.bindMatrix).invert()}else{console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}}applyBoneTransform(index,vector){const skeleton=this.skeleton;const geometry=this.geometry;_skinIndex.fromBufferAttribute(geometry.attributes.skinIndex,index);_skinWeight.fromBufferAttribute(geometry.attributes.skinWeight,index);_basePosition.copy(vector).applyMatrix4(this.bindMatrix);vector.set(0,0,0);for(let i=0;i<4;i++){const weight=_skinWeight.getComponent(i);if(weight!==0){const boneIndex=_skinIndex.getComponent(i);_matrix4.multiplyMatrices(skeleton.bones[boneIndex].matrixWorld,skeleton.boneInverses[boneIndex]);vector.addScaledVector(_vector3.copy(_basePosition).applyMatrix4(_matrix4),weight)}}return vector.applyMatrix4(this.bindMatrixInverse)}}class Bone extends Object3D{constructor(){super();this.isBone=true;this.type="Bone"}}class DataTexture extends Texture{constructor(data=null,width=1,height=1,format,type,mapping,wrapS,wrapT,magFilter=NearestFilter,minFilter=NearestFilter,anisotropy,colorSpace){super(null,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace);this.isDataTexture=true;this.image={data:data,width:width,height:height};this.generateMipmaps=false;this.flipY=false;this.unpackAlignment=1}}const _offsetMatrix=new Matrix4;const _identityMatrix$1=new Matrix4;class Skeleton{constructor(bones=[],boneInverses=[]){this.uuid=generateUUID();this.bones=bones.slice(0);this.boneInverses=boneInverses;this.boneMatrices=null;this.boneTexture=null;this.init()}init(){const bones=this.bones;const boneInverses=this.boneInverses;this.boneMatrices=new Float32Array(bones.length*16);if(boneInverses.length===0){this.calculateInverses()}else{if(bones.length!==boneInverses.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.");this.boneInverses=[];for(let i=0,il=this.bones.length;i<il;i++){this.boneInverses.push(new Matrix4)}}}}calculateInverses(){this.boneInverses.length=0;for(let i=0,il=this.bones.length;i<il;i++){const inverse=new Matrix4;if(this.bones[i]){inverse.copy(this.bones[i].matrixWorld).invert()}this.boneInverses.push(inverse)}}pose(){for(let i=0,il=this.bones.length;i<il;i++){const bone=this.bones[i];if(bone){bone.matrixWorld.copy(this.boneInverses[i]).invert()}}for(let i=0,il=this.bones.length;i<il;i++){const bone=this.bones[i];if(bone){if(bone.parent&&bone.parent.isBone){bone.matrix.copy(bone.parent.matrixWorld).invert();bone.matrix.multiply(bone.matrixWorld)}else{bone.matrix.copy(bone.matrixWorld)}bone.matrix.decompose(bone.position,bone.quaternion,bone.scale)}}}update(){const bones=this.bones;const boneInverses=this.boneInverses;const boneMatrices=this.boneMatrices;const boneTexture=this.boneTexture;for(let i=0,il=bones.length;i<il;i++){const matrix=bones[i]?bones[i].matrixWorld:_identityMatrix$1;_offsetMatrix.multiplyMatrices(matrix,boneInverses[i]);_offsetMatrix.toArray(boneMatrices,i*16)}if(boneTexture!==null){boneTexture.needsUpdate=true}}clone(){return new Skeleton(this.bones,this.boneInverses)}computeBoneTexture(){let size=Math.sqrt(this.bones.length*4);size=Math.ceil(size/4)*4;size=Math.max(size,4);const boneMatrices=new Float32Array(size*size*4);boneMatrices.set(this.boneMatrices);const boneTexture=new DataTexture(boneMatrices,size,size,RGBAFormat,FloatType);boneTexture.needsUpdate=true;this.boneMatrices=boneMatrices;this.boneTexture=boneTexture;return this}getBoneByName(name){for(let i=0,il=this.bones.length;i<il;i++){const bone=this.bones[i];if(bone.name===name){return bone}}return undefined}dispose(){if(this.boneTexture!==null){this.boneTexture.dispose();this.boneTexture=null}}fromJSON(json,bones){this.uuid=json.uuid;for(let i=0,l=json.bones.length;i<l;i++){const uuid=json.bones[i];let bone=bones[uuid];if(bone===undefined){console.warn("THREE.Skeleton: No bone found with UUID:",uuid);bone=new Bone}this.bones.push(bone);this.boneInverses.push(new Matrix4().fromArray(json.boneInverses[i]))}this.init();return this}toJSON(){const data={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};data.uuid=this.uuid;const bones=this.bones;const boneInverses=this.boneInverses;for(let i=0,l=bones.length;i<l;i++){const bone=bones[i];data.bones.push(bone.uuid);const boneInverse=boneInverses[i];data.boneInverses.push(boneInverse.toArray())}return data}}class InstancedBufferAttribute extends BufferAttribute{constructor(array,itemSize,normalized,meshPerAttribute=1){super(array,itemSize,normalized);this.isInstancedBufferAttribute=true;this.meshPerAttribute=meshPerAttribute}copy(source){super.copy(source);this.meshPerAttribute=source.meshPerAttribute;return this}toJSON(){const data=super.toJSON();data.meshPerAttribute=this.meshPerAttribute;data.isInstancedBufferAttribute=true;return data}}const _instanceLocalMatrix=new Matrix4;const _instanceWorldMatrix=new Matrix4;const _instanceIntersects=[];const _box3=new Box3;const _identity=new Matrix4;const _mesh$1=new Mesh;const _sphere$3=new Sphere;class InstancedMesh extends Mesh{constructor(geometry,material,count){super(geometry,material);this.isInstancedMesh=true;this.instanceMatrix=new InstancedBufferAttribute(new Float32Array(count*16),16);this.instanceColor=null;this.morphTexture=null;this.count=count;this.boundingBox=null;this.boundingSphere=null;for(let i=0;i<count;i++){this.setMatrixAt(i,_identity)}}computeBoundingBox(){const geometry=this.geometry;const count=this.count;if(this.boundingBox===null){this.boundingBox=new Box3}if(geometry.boundingBox===null){geometry.computeBoundingBox()}this.boundingBox.makeEmpty();for(let i=0;i<count;i++){this.getMatrixAt(i,_instanceLocalMatrix);_box3.copy(geometry.boundingBox).applyMatrix4(_instanceLocalMatrix);this.boundingBox.union(_box3)}}computeBoundingSphere(){const geometry=this.geometry;const count=this.count;if(this.boundingSphere===null){this.boundingSphere=new Sphere}if(geometry.boundingSphere===null){geometry.computeBoundingSphere()}this.boundingSphere.makeEmpty();for(let i=0;i<count;i++){this.getMatrixAt(i,_instanceLocalMatrix);_sphere$3.copy(geometry.boundingSphere).applyMatrix4(_instanceLocalMatrix);this.boundingSphere.union(_sphere$3)}}copy(source,recursive){super.copy(source,recursive);this.instanceMatrix.copy(source.instanceMatrix);if(source.morphTexture!==null)this.morphTexture=source.morphTexture.clone();if(source.instanceColor!==null)this.instanceColor=source.instanceColor.clone();this.count=source.count;if(source.boundingBox!==null)this.boundingBox=source.boundingBox.clone();if(source.boundingSphere!==null)this.boundingSphere=source.boundingSphere.clone();return this}getColorAt(index,color){color.fromArray(this.instanceColor.array,index*3)}getMatrixAt(index,matrix){matrix.fromArray(this.instanceMatrix.array,index*16)}getMorphAt(index,object){const objectInfluences=object.morphTargetInfluences;const array=this.morphTexture.source.data.data;const len=objectInfluences.length+1;const dataIndex=index*len+1;for(let i=0;i<objectInfluences.length;i++){objectInfluences[i]=array[dataIndex+i]}}raycast(raycaster,intersects){const matrixWorld=this.matrixWorld;const raycastTimes=this.count;_mesh$1.geometry=this.geometry;_mesh$1.material=this.material;if(_mesh$1.material===undefined)return;if(this.boundingSphere===null)this.computeBoundingSphere();_sphere$3.copy(this.boundingSphere);_sphere$3.applyMatrix4(matrixWorld);if(raycaster.ray.intersectsSphere(_sphere$3)===false)return;for(let instanceId=0;instanceId<raycastTimes;instanceId++){this.getMatrixAt(instanceId,_instanceLocalMatrix);_instanceWorldMatrix.multiplyMatrices(matrixWorld,_instanceLocalMatrix);_mesh$1.matrixWorld=_instanceWorldMatrix;_mesh$1.raycast(raycaster,_instanceIntersects);for(let i=0,l=_instanceIntersects.length;i<l;i++){const intersect=_instanceIntersects[i];intersect.instanceId=instanceId;intersect.object=this;intersects.push(intersect)}_instanceIntersects.length=0}}setColorAt(index,color){if(this.instanceColor===null){this.instanceColor=new InstancedBufferAttribute(new Float32Array(this.instanceMatrix.count*3).fill(1),3)}color.toArray(this.instanceColor.array,index*3)}setMatrixAt(index,matrix){matrix.toArray(this.instanceMatrix.array,index*16)}setMorphAt(index,object){const objectInfluences=object.morphTargetInfluences;const len=objectInfluences.length+1;if(this.morphTexture===null){this.morphTexture=new DataTexture(new Float32Array(len*this.count),len,this.count,RedFormat,FloatType)}const array=this.morphTexture.source.data.data;let morphInfluencesSum=0;for(let i=0;i<objectInfluences.length;i++){morphInfluencesSum+=objectInfluences[i]}const morphBaseInfluence=this.geometry.morphTargetsRelative?1:1-morphInfluencesSum;const dataIndex=len*index;array[dataIndex]=morphBaseInfluence;array.set(objectInfluences,dataIndex+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"});if(this.morphTexture!==null){this.morphTexture.dispose();this.morphTexture=null}return this}}function sortOpaque(a,b){return a.z-b.z}function sortTransparent(a,b){return b.z-a.z}class MultiDrawRenderList{constructor(){this.index=0;this.pool=[];this.list=[]}push(drawRange,z,index){const pool=this.pool;const list=this.list;if(this.index>=pool.length){pool.push({start:-1,count:-1,z:-1,index:-1})}const item=pool[this.index];list.push(item);this.index++;item.start=drawRange.start;item.count=drawRange.count;item.z=z;item.index=index}reset(){this.list.length=0;this.index=0}}const _matrix$1=new Matrix4;const _invMatrixWorld=new Matrix4;const _identityMatrix=new Matrix4;const _whiteColor=new Color(1,1,1);const _projScreenMatrix$2=new Matrix4;const _frustum=new Frustum;const _box$1=new Box3;const _sphere$2=new Sphere;const _vector$5=new Vector3;const _forward=new Vector3;const _temp=new Vector3;const _renderList=new MultiDrawRenderList;const _mesh=new Mesh;const _batchIntersects=[];function copyAttributeData(src,target,targetOffset=0){const itemSize=target.itemSize;if(src.isInterleavedBufferAttribute||src.array.constructor!==target.array.constructor){const vertexCount=src.count;for(let i=0;i<vertexCount;i++){for(let c=0;c<itemSize;c++){target.setComponent(i+targetOffset,c,src.getComponent(i,c))}}}else{target.array.set(src.array,targetOffset*itemSize)}target.needsUpdate=true}class BatchedMesh extends Mesh{get maxInstanceCount(){return this._maxInstanceCount}constructor(maxInstanceCount,maxVertexCount,maxIndexCount=maxVertexCount*2,material){super(new BufferGeometry,material);this.isBatchedMesh=true;this.perObjectFrustumCulled=true;this.sortObjects=true;this.boundingBox=null;this.boundingSphere=null;this.customSort=null;this._drawInfo=[];this._drawRanges=[];this._reservedRanges=[];this._bounds=[];this._maxInstanceCount=maxInstanceCount;this._maxVertexCount=maxVertexCount;this._maxIndexCount=maxIndexCount;this._geometryInitialized=false;this._geometryCount=0;this._multiDrawCounts=new Int32Array(maxInstanceCount);this._multiDrawStarts=new Int32Array(maxInstanceCount);this._multiDrawCount=0;this._multiDrawInstances=null;this._visibilityChanged=true;this._matricesTexture=null;this._indirectTexture=null;this._colorsTexture=null;this._initMatricesTexture();this._initIndirectTexture()}_initMatricesTexture(){let size=Math.sqrt(this._maxInstanceCount*4);size=Math.ceil(size/4)*4;size=Math.max(size,4);const matricesArray=new Float32Array(size*size*4);const matricesTexture=new DataTexture(matricesArray,size,size,RGBAFormat,FloatType);this._matricesTexture=matricesTexture}_initIndirectTexture(){let size=Math.sqrt(this._maxInstanceCount);size=Math.ceil(size);const indirectArray=new Uint32Array(size*size);const indirectTexture=new DataTexture(indirectArray,size,size,RedIntegerFormat,UnsignedIntType);this._indirectTexture=indirectTexture}_initColorsTexture(){let size=Math.sqrt(this._maxInstanceCount);size=Math.ceil(size);const colorsArray=new Float32Array(size*size*4).fill(1);const colorsTexture=new DataTexture(colorsArray,size,size,RGBAFormat,FloatType);colorsTexture.colorSpace=ColorManagement.workingColorSpace;this._colorsTexture=colorsTexture}_initializeGeometry(reference){const geometry=this.geometry;const maxVertexCount=this._maxVertexCount;const maxIndexCount=this._maxIndexCount;if(this._geometryInitialized===false){for(const attributeName in reference.attributes){const srcAttribute=reference.getAttribute(attributeName);const{array,itemSize,normalized}=srcAttribute;const dstArray=new array.constructor(maxVertexCount*itemSize);const dstAttribute=new BufferAttribute(dstArray,itemSize,normalized);geometry.setAttribute(attributeName,dstAttribute)}if(reference.getIndex()!==null){const indexArray=maxVertexCount>65535?new Uint32Array(maxIndexCount):new Uint16Array(maxIndexCount);geometry.setIndex(new BufferAttribute(indexArray,1))}this._geometryInitialized=true}}_validateGeometry(geometry){const batchGeometry=this.geometry;if(Boolean(geometry.getIndex())!==Boolean(batchGeometry.getIndex())){throw new Error("BatchedMesh: All geometries must consistently have \"index\".")}for(const attributeName in batchGeometry.attributes){if(!geometry.hasAttribute(attributeName)){throw new Error(`BatchedMesh: Added geometry missing "${attributeName}". All geometries must have consistent attributes.`)}const srcAttribute=geometry.getAttribute(attributeName);const dstAttribute=batchGeometry.getAttribute(attributeName);if(srcAttribute.itemSize!==dstAttribute.itemSize||srcAttribute.normalized!==dstAttribute.normalized){throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}}setCustomSort(func){this.customSort=func;return this}computeBoundingBox(){if(this.boundingBox===null){this.boundingBox=new Box3}const boundingBox=this.boundingBox;const drawInfo=this._drawInfo;boundingBox.makeEmpty();for(let i=0,l=drawInfo.length;i<l;i++){if(drawInfo[i].active===false)continue;const geometryId=drawInfo[i].geometryIndex;this.getMatrixAt(i,_matrix$1);this.getBoundingBoxAt(geometryId,_box$1).applyMatrix4(_matrix$1);boundingBox.union(_box$1)}}computeBoundingSphere(){if(this.boundingSphere===null){this.boundingSphere=new Sphere}const boundingSphere=this.boundingSphere;const drawInfo=this._drawInfo;boundingSphere.makeEmpty();for(let i=0,l=drawInfo.length;i<l;i++){if(drawInfo[i].active===false)continue;const geometryId=drawInfo[i].geometryIndex;this.getMatrixAt(i,_matrix$1);this.getBoundingSphereAt(geometryId,_sphere$2).applyMatrix4(_matrix$1);boundingSphere.union(_sphere$2)}}addInstance(geometryId){if(this._drawInfo.length>=this._maxInstanceCount){throw new Error("BatchedMesh: Maximum item count reached.")}this._drawInfo.push({visible:true,active:true,geometryIndex:geometryId});const drawId=this._drawInfo.length-1;const matricesTexture=this._matricesTexture;const matricesArray=matricesTexture.image.data;_identityMatrix.toArray(matricesArray,drawId*16);matricesTexture.needsUpdate=true;const colorsTexture=this._colorsTexture;if(colorsTexture){_whiteColor.toArray(colorsTexture.image.data,drawId*4);colorsTexture.needsUpdate=true}return drawId}addGeometry(geometry,vertexCount=-1,indexCount=-1){this._initializeGeometry(geometry);this._validateGeometry(geometry);if(this._drawInfo.length>=this._maxInstanceCount){throw new Error("BatchedMesh: Maximum item count reached.")}const reservedRange={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let lastRange=null;const reservedRanges=this._reservedRanges;const drawRanges=this._drawRanges;const bounds=this._bounds;if(this._geometryCount!==0){lastRange=reservedRanges[reservedRanges.length-1]}if(vertexCount===-1){reservedRange.vertexCount=geometry.getAttribute("position").count}else{reservedRange.vertexCount=vertexCount}if(lastRange===null){reservedRange.vertexStart=0}else{reservedRange.vertexStart=lastRange.vertexStart+lastRange.vertexCount}const index=geometry.getIndex();const hasIndex=index!==null;if(hasIndex){if(indexCount===-1){reservedRange.indexCount=index.count}else{reservedRange.indexCount=indexCount}if(lastRange===null){reservedRange.indexStart=0}else{reservedRange.indexStart=lastRange.indexStart+lastRange.indexCount}}if(reservedRange.indexStart!==-1&&reservedRange.indexStart+reservedRange.indexCount>this._maxIndexCount||reservedRange.vertexStart+reservedRange.vertexCount>this._maxVertexCount){throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.")}const geometryId=this._geometryCount;this._geometryCount++;reservedRanges.push(reservedRange);drawRanges.push({start:hasIndex?reservedRange.indexStart:reservedRange.vertexStart,count:-1});bounds.push({boxInitialized:false,box:new Box3,sphereInitialized:false,sphere:new Sphere});this.setGeometryAt(geometryId,geometry);return geometryId}setGeometryAt(geometryId,geometry){if(geometryId>=this._geometryCount){throw new Error("BatchedMesh: Maximum geometry count reached.")}this._validateGeometry(geometry);const batchGeometry=this.geometry;const hasIndex=batchGeometry.getIndex()!==null;const dstIndex=batchGeometry.getIndex();const srcIndex=geometry.getIndex();const reservedRange=this._reservedRanges[geometryId];if(hasIndex&&srcIndex.count>reservedRange.indexCount||geometry.attributes.position.count>reservedRange.vertexCount){throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.")}const vertexStart=reservedRange.vertexStart;const vertexCount=reservedRange.vertexCount;for(const attributeName in batchGeometry.attributes){const srcAttribute=geometry.getAttribute(attributeName);const dstAttribute=batchGeometry.getAttribute(attributeName);copyAttributeData(srcAttribute,dstAttribute,vertexStart);const itemSize=srcAttribute.itemSize;for(let i=srcAttribute.count,l=vertexCount;i<l;i++){const index=vertexStart+i;for(let c=0;c<itemSize;c++){dstAttribute.setComponent(index,c,0)}}dstAttribute.needsUpdate=true;dstAttribute.addUpdateRange(vertexStart*itemSize,vertexCount*itemSize)}if(hasIndex){const indexStart=reservedRange.indexStart;for(let i=0;i<srcIndex.count;i++){dstIndex.setX(indexStart+i,vertexStart+srcIndex.getX(i))}for(let i=srcIndex.count,l=reservedRange.indexCount;i<l;i++){dstIndex.setX(indexStart+i,vertexStart)}dstIndex.needsUpdate=true;dstIndex.addUpdateRange(indexStart,reservedRange.indexCount)}const bound=this._bounds[geometryId];if(geometry.boundingBox!==null){bound.box.copy(geometry.boundingBox);bound.boxInitialized=true}else{bound.boxInitialized=false}if(geometry.boundingSphere!==null){bound.sphere.copy(geometry.boundingSphere);bound.sphereInitialized=true}else{bound.sphereInitialized=false}const drawRange=this._drawRanges[geometryId];const posAttr=geometry.getAttribute("position");drawRange.count=hasIndex?srcIndex.count:posAttr.count;this._visibilityChanged=true;return geometryId}getBoundingBoxAt(geometryId,target){if(geometryId>=this._geometryCount){return null}const bound=this._bounds[geometryId];const box=bound.box;const geometry=this.geometry;if(bound.boxInitialized===false){box.makeEmpty();const index=geometry.index;const position=geometry.attributes.position;const drawRange=this._drawRanges[geometryId];for(let i=drawRange.start,l=drawRange.start+drawRange.count;i<l;i++){let iv=i;if(index){iv=index.getX(iv)}box.expandByPoint(_vector$5.fromBufferAttribute(position,iv))}bound.boxInitialized=true}target.copy(box);return target}getBoundingSphereAt(geometryId,target){if(geometryId>=this._geometryCount){return null}const bound=this._bounds[geometryId];const sphere=bound.sphere;const geometry=this.geometry;if(bound.sphereInitialized===false){sphere.makeEmpty();this.getBoundingBoxAt(geometryId,_box$1);_box$1.getCenter(sphere.center);const index=geometry.index;const position=geometry.attributes.position;const drawRange=this._drawRanges[geometryId];let maxRadiusSq=0;for(let i=drawRange.start,l=drawRange.start+drawRange.count;i<l;i++){let iv=i;if(index){iv=index.getX(iv)}_vector$5.fromBufferAttribute(position,iv);maxRadiusSq=Math.max(maxRadiusSq,sphere.center.distanceToSquared(_vector$5))}sphere.radius=Math.sqrt(maxRadiusSq);bound.sphereInitialized=true}target.copy(sphere);return target}setMatrixAt(instanceId,matrix){const drawInfo=this._drawInfo;const matricesTexture=this._matricesTexture;const matricesArray=this._matricesTexture.image.data;if(instanceId>=drawInfo.length||drawInfo[instanceId].active===false){return this}matrix.toArray(matricesArray,instanceId*16);matricesTexture.needsUpdate=true;return this}getMatrixAt(instanceId,matrix){const drawInfo=this._drawInfo;const matricesArray=this._matricesTexture.image.data;if(instanceId>=drawInfo.length||drawInfo[instanceId].active===false){return null}return matrix.fromArray(matricesArray,instanceId*16)}setColorAt(instanceId,color){if(this._colorsTexture===null){this._initColorsTexture()}const colorsTexture=this._colorsTexture;const colorsArray=this._colorsTexture.image.data;const drawInfo=this._drawInfo;if(instanceId>=drawInfo.length||drawInfo[instanceId].active===false){return this}color.toArray(colorsArray,instanceId*4);colorsTexture.needsUpdate=true;return this}getColorAt(instanceId,color){const colorsArray=this._colorsTexture.image.data;const drawInfo=this._drawInfo;if(instanceId>=drawInfo.length||drawInfo[instanceId].active===false){return null}return color.fromArray(colorsArray,instanceId*4)}setVisibleAt(instanceId,value){const drawInfo=this._drawInfo;if(instanceId>=drawInfo.length||drawInfo[instanceId].active===false||drawInfo[instanceId].visible===value){return this}drawInfo[instanceId].visible=value;this._visibilityChanged=true;return this}getVisibleAt(instanceId){const drawInfo=this._drawInfo;if(instanceId>=drawInfo.length||drawInfo[instanceId].active===false){return false}return drawInfo[instanceId].visible}raycast(raycaster,intersects){const drawInfo=this._drawInfo;const drawRanges=this._drawRanges;const matrixWorld=this.matrixWorld;const batchGeometry=this.geometry;_mesh.material=this.material;_mesh.geometry.index=batchGeometry.index;_mesh.geometry.attributes=batchGeometry.attributes;if(_mesh.geometry.boundingBox===null){_mesh.geometry.boundingBox=new Box3}if(_mesh.geometry.boundingSphere===null){_mesh.geometry.boundingSphere=new Sphere}for(let i=0,l=drawInfo.length;i<l;i++){if(!drawInfo[i].visible||!drawInfo[i].active){continue}const geometryId=drawInfo[i].geometryIndex;const drawRange=drawRanges[geometryId];_mesh.geometry.setDrawRange(drawRange.start,drawRange.count);this.getMatrixAt(i,_mesh.matrixWorld).premultiply(matrixWorld);this.getBoundingBoxAt(geometryId,_mesh.geometry.boundingBox);this.getBoundingSphereAt(geometryId,_mesh.geometry.boundingSphere);_mesh.raycast(raycaster,_batchIntersects);for(let j=0,l=_batchIntersects.length;j<l;j++){const intersect=_batchIntersects[j];intersect.object=this;intersect.batchId=i;intersects.push(intersect)}_batchIntersects.length=0}_mesh.material=null;_mesh.geometry.index=null;_mesh.geometry.attributes={};_mesh.geometry.setDrawRange(0,Infinity)}copy(source){super.copy(source);this.geometry=source.geometry.clone();this.perObjectFrustumCulled=source.perObjectFrustumCulled;this.sortObjects=source.sortObjects;this.boundingBox=source.boundingBox!==null?source.boundingBox.clone():null;this.boundingSphere=source.boundingSphere!==null?source.boundingSphere.clone():null;this._drawRanges=source._drawRanges.map(range=>({...range}));this._reservedRanges=source._reservedRanges.map(range=>({...range}));this._drawInfo=source._drawInfo.map(inf=>({...inf}));this._bounds=source._bounds.map(bound=>({boxInitialized:bound.boxInitialized,box:bound.box.clone(),sphereInitialized:bound.sphereInitialized,sphere:bound.sphere.clone()}));this._maxInstanceCount=source._maxInstanceCount;this._maxVertexCount=source._maxVertexCount;this._maxIndexCount=source._maxIndexCount;this._geometryInitialized=source._geometryInitialized;this._geometryCount=source._geometryCount;this._multiDrawCounts=source._multiDrawCounts.slice();this._multiDrawStarts=source._multiDrawStarts.slice();this._matricesTexture=source._matricesTexture.clone();this._matricesTexture.image.data=this._matricesTexture.image.data.slice();if(this._colorsTexture!==null){this._colorsTexture=source._colorsTexture.clone();this._colorsTexture.image.data=this._colorsTexture.image.data.slice()}return this}dispose(){this.geometry.dispose();this._matricesTexture.dispose();this._matricesTexture=null;this._indirectTexture.dispose();this._indirectTexture=null;if(this._colorsTexture!==null){this._colorsTexture.dispose();this._colorsTexture=null}return this}onBeforeRender(renderer,scene,camera,geometry,material){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects){return}const index=geometry.getIndex();const bytesPerElement=index===null?1:index.array.BYTES_PER_ELEMENT;const drawInfo=this._drawInfo;const multiDrawStarts=this._multiDrawStarts;const multiDrawCounts=this._multiDrawCounts;const drawRanges=this._drawRanges;const perObjectFrustumCulled=this.perObjectFrustumCulled;const indirectTexture=this._indirectTexture;const indirectArray=indirectTexture.image.data;if(perObjectFrustumCulled){_projScreenMatrix$2.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse).multiply(this.matrixWorld);_frustum.setFromProjectionMatrix(_projScreenMatrix$2,renderer.coordinateSystem)}let count=0;if(this.sortObjects){_invMatrixWorld.copy(this.matrixWorld).invert();_vector$5.setFromMatrixPosition(camera.matrixWorld).applyMatrix4(_invMatrixWorld);_forward.set(0,0,-1).transformDirection(camera.matrixWorld).transformDirection(_invMatrixWorld);for(let i=0,l=drawInfo.length;i<l;i++){if(drawInfo[i].visible&&drawInfo[i].active){const geometryId=drawInfo[i].geometryIndex;this.getMatrixAt(i,_matrix$1);this.getBoundingSphereAt(geometryId,_sphere$2).applyMatrix4(_matrix$1);let culled=false;if(perObjectFrustumCulled){culled=!_frustum.intersectsSphere(_sphere$2)}if(!culled){const z=_temp.subVectors(_sphere$2.center,_vector$5).dot(_forward);_renderList.push(drawRanges[geometryId],z,i)}}}const list=_renderList.list;const customSort=this.customSort;if(customSort===null){list.sort(material.transparent?sortTransparent:sortOpaque)}else{customSort.call(this,list,camera)}for(let i=0,l=list.length;i<l;i++){const item=list[i];multiDrawStarts[count]=item.start*bytesPerElement;multiDrawCounts[count]=item.count;indirectArray[count]=item.index;count++}_renderList.reset()}else{for(let i=0,l=drawInfo.length;i<l;i++){if(drawInfo[i].visible&&drawInfo[i].active){const geometryId=drawInfo[i].geometryIndex;let culled=false;if(perObjectFrustumCulled){this.getMatrixAt(i,_matrix$1);this.getBoundingSphereAt(geometryId,_sphere$2).applyMatrix4(_matrix$1);culled=!_frustum.intersectsSphere(_sphere$2)}if(!culled){const range=drawRanges[geometryId];multiDrawStarts[count]=range.start*bytesPerElement;multiDrawCounts[count]=range.count;indirectArray[count]=i;count++}}}}indirectTexture.needsUpdate=true;this._multiDrawCount=count;this._visibilityChanged=false}onBeforeShadow(renderer,object,camera,shadowCamera,geometry,depthMaterial){this.onBeforeRender(renderer,null,shadowCamera,geometry,depthMaterial)}}class LineBasicMaterial extends Material{constructor(parameters){super();this.isLineBasicMaterial=true;this.type="LineBasicMaterial";this.color=new Color(16777215);this.map=null;this.linewidth=1;this.linecap="round";this.linejoin="round";this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.linewidth=source.linewidth;this.linecap=source.linecap;this.linejoin=source.linejoin;this.fog=source.fog;return this}}const _vStart=new Vector3;const _vEnd=new Vector3;const _inverseMatrix$1=new Matrix4;const _ray$1=new Ray;const _sphere$1=new Sphere;const _intersectPointOnRay=new Vector3;const _intersectPointOnSegment=new Vector3;class Line extends Object3D{constructor(geometry=new BufferGeometry,material=new LineBasicMaterial){super();this.isLine=true;this.type="Line";this.geometry=geometry;this.material=material;this.updateMorphTargets()}copy(source,recursive){super.copy(source,recursive);this.material=Array.isArray(source.material)?source.material.slice():source.material;this.geometry=source.geometry;return this}computeLineDistances(){const geometry=this.geometry;if(geometry.index===null){const positionAttribute=geometry.attributes.position;const lineDistances=[0];for(let i=1,l=positionAttribute.count;i<l;i++){_vStart.fromBufferAttribute(positionAttribute,i-1);_vEnd.fromBufferAttribute(positionAttribute,i);lineDistances[i]=lineDistances[i-1];lineDistances[i]+=_vStart.distanceTo(_vEnd)}geometry.setAttribute("lineDistance",new Float32BufferAttribute(lineDistances,1))}else{console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.")}return this}raycast(raycaster,intersects){const geometry=this.geometry;const matrixWorld=this.matrixWorld;const threshold=raycaster.params.Line.threshold;const drawRange=geometry.drawRange;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere$1.copy(geometry.boundingSphere);_sphere$1.applyMatrix4(matrixWorld);_sphere$1.radius+=threshold;if(raycaster.ray.intersectsSphere(_sphere$1)===false)return;_inverseMatrix$1.copy(matrixWorld).invert();_ray$1.copy(raycaster.ray).applyMatrix4(_inverseMatrix$1);const localThreshold=threshold/((this.scale.x+this.scale.y+this.scale.z)/3);const localThresholdSq=localThreshold*localThreshold;const step=this.isLineSegments?2:1;const index=geometry.index;const attributes=geometry.attributes;const positionAttribute=attributes.position;if(index!==null){const start=Math.max(0,drawRange.start);const end=Math.min(index.count,drawRange.start+drawRange.count);for(let i=start,l=end-1;i<l;i+=step){const a=index.getX(i);const b=index.getX(i+1);const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,a,b);if(intersect){intersects.push(intersect)}}if(this.isLineLoop){const a=index.getX(end-1);const b=index.getX(start);const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,a,b);if(intersect){intersects.push(intersect)}}}else{const start=Math.max(0,drawRange.start);const end=Math.min(positionAttribute.count,drawRange.start+drawRange.count);for(let i=start,l=end-1;i<l;i+=step){const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,i,i+1);if(intersect){intersects.push(intersect)}}if(this.isLineLoop){const intersect=checkIntersection(this,raycaster,_ray$1,localThresholdSq,end-1,start);if(intersect){intersects.push(intersect)}}}}updateMorphTargets(){const geometry=this.geometry;const morphAttributes=geometry.morphAttributes;const keys=Object.keys(morphAttributes);if(keys.length>0){const morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==undefined){this.morphTargetInfluences=[];this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;m<ml;m++){const name=morphAttribute[m].name||String(m);this.morphTargetInfluences.push(0);this.morphTargetDictionary[name]=m}}}}}function checkIntersection(object,raycaster,ray,thresholdSq,a,b){const positionAttribute=object.geometry.attributes.position;_vStart.fromBufferAttribute(positionAttribute,a);_vEnd.fromBufferAttribute(positionAttribute,b);const distSq=ray.distanceSqToSegment(_vStart,_vEnd,_intersectPointOnRay,_intersectPointOnSegment);if(distSq>thresholdSq)return;_intersectPointOnRay.applyMatrix4(object.matrixWorld);const distance=raycaster.ray.origin.distanceTo(_intersectPointOnRay);if(distance<raycaster.near||distance>raycaster.far)return;return{distance:distance,point:_intersectPointOnSegment.clone().applyMatrix4(object.matrixWorld),index:a,face:null,faceIndex:null,object:object}}const _start=new Vector3;const _end=new Vector3;class LineSegments extends Line{constructor(geometry,material){super(geometry,material);this.isLineSegments=true;this.type="LineSegments"}computeLineDistances(){const geometry=this.geometry;if(geometry.index===null){const positionAttribute=geometry.attributes.position;const lineDistances=[];for(let i=0,l=positionAttribute.count;i<l;i+=2){_start.fromBufferAttribute(positionAttribute,i);_end.fromBufferAttribute(positionAttribute,i+1);lineDistances[i]=i===0?0:lineDistances[i-1];lineDistances[i+1]=lineDistances[i]+_start.distanceTo(_end)}geometry.setAttribute("lineDistance",new Float32BufferAttribute(lineDistances,1))}else{console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.")}return this}}class LineLoop extends Line{constructor(geometry,material){super(geometry,material);this.isLineLoop=true;this.type="LineLoop"}}class PointsMaterial extends Material{constructor(parameters){super();this.isPointsMaterial=true;this.type="PointsMaterial";this.color=new Color(16777215);this.map=null;this.alphaMap=null;this.size=1;this.sizeAttenuation=true;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.alphaMap=source.alphaMap;this.size=source.size;this.sizeAttenuation=source.sizeAttenuation;this.fog=source.fog;return this}}const _inverseMatrix=new Matrix4;const _ray=new Ray;const _sphere=new Sphere;const _position$2=new Vector3;class Points extends Object3D{constructor(geometry=new BufferGeometry,material=new PointsMaterial){super();this.isPoints=true;this.type="Points";this.geometry=geometry;this.material=material;this.updateMorphTargets()}copy(source,recursive){super.copy(source,recursive);this.material=Array.isArray(source.material)?source.material.slice():source.material;this.geometry=source.geometry;return this}raycast(raycaster,intersects){const geometry=this.geometry;const matrixWorld=this.matrixWorld;const threshold=raycaster.params.Points.threshold;const drawRange=geometry.drawRange;if(geometry.boundingSphere===null)geometry.computeBoundingSphere();_sphere.copy(geometry.boundingSphere);_sphere.applyMatrix4(matrixWorld);_sphere.radius+=threshold;if(raycaster.ray.intersectsSphere(_sphere)===false)return;_inverseMatrix.copy(matrixWorld).invert();_ray.copy(raycaster.ray).applyMatrix4(_inverseMatrix);const localThreshold=threshold/((this.scale.x+this.scale.y+this.scale.z)/3);const localThresholdSq=localThreshold*localThreshold;const index=geometry.index;const attributes=geometry.attributes;const positionAttribute=attributes.position;if(index!==null){const start=Math.max(0,drawRange.start);const end=Math.min(index.count,drawRange.start+drawRange.count);for(let i=start,il=end;i<il;i++){const a=index.getX(i);_position$2.fromBufferAttribute(positionAttribute,a);testPoint(_position$2,a,localThresholdSq,matrixWorld,raycaster,intersects,this)}}else{const start=Math.max(0,drawRange.start);const end=Math.min(positionAttribute.count,drawRange.start+drawRange.count);for(let i=start,l=end;i<l;i++){_position$2.fromBufferAttribute(positionAttribute,i);testPoint(_position$2,i,localThresholdSq,matrixWorld,raycaster,intersects,this)}}}updateMorphTargets(){const geometry=this.geometry;const morphAttributes=geometry.morphAttributes;const keys=Object.keys(morphAttributes);if(keys.length>0){const morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==undefined){this.morphTargetInfluences=[];this.morphTargetDictionary={};for(let m=0,ml=morphAttribute.length;m<ml;m++){const name=morphAttribute[m].name||String(m);this.morphTargetInfluences.push(0);this.morphTargetDictionary[name]=m}}}}}function testPoint(point,index,localThresholdSq,matrixWorld,raycaster,intersects,object){const rayPointDistanceSq=_ray.distanceSqToPoint(point);if(rayPointDistanceSq<localThresholdSq){const intersectPoint=new Vector3;_ray.closestPointToPoint(point,intersectPoint);intersectPoint.applyMatrix4(matrixWorld);const distance=raycaster.ray.origin.distanceTo(intersectPoint);if(distance<raycaster.near||distance>raycaster.far)return;intersects.push({distance:distance,distanceToRay:Math.sqrt(rayPointDistanceSq),point:intersectPoint,index:index,face:null,object:object})}}class VideoTexture extends Texture{constructor(video,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy){super(video,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isVideoTexture=true;this.minFilter=minFilter!==undefined?minFilter:LinearFilter;this.magFilter=magFilter!==undefined?magFilter:LinearFilter;this.generateMipmaps=false;const scope=this;function updateVideo(){scope.needsUpdate=true;video.requestVideoFrameCallback(updateVideo)}if("requestVideoFrameCallback"in video){video.requestVideoFrameCallback(updateVideo)}}clone(){return new this.constructor(this.image).copy(this)}update(){const video=this.image;const hasVideoFrameCallback=("requestVideoFrameCallback"in video);if(hasVideoFrameCallback===false&&video.readyState>=video.HAVE_CURRENT_DATA){this.needsUpdate=true}}}class FramebufferTexture extends Texture{constructor(width,height){super({width,height});this.isFramebufferTexture=true;this.magFilter=NearestFilter;this.minFilter=NearestFilter;this.generateMipmaps=false;this.needsUpdate=true}}class CompressedTexture extends Texture{constructor(mipmaps,width,height,format,type,mapping,wrapS,wrapT,magFilter,minFilter,anisotropy,colorSpace){super(null,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy,colorSpace);this.isCompressedTexture=true;this.image={width:width,height:height};this.mipmaps=mipmaps;this.flipY=false;this.generateMipmaps=false}}class CompressedArrayTexture extends CompressedTexture{constructor(mipmaps,width,height,depth,format,type){super(mipmaps,width,height,format,type);this.isCompressedArrayTexture=true;this.image.depth=depth;this.wrapR=ClampToEdgeWrapping;this.layerUpdates=new Set}addLayerUpdate(layerIndex){this.layerUpdates.add(layerIndex)}clearLayerUpdates(){this.layerUpdates.clear()}}class CompressedCubeTexture extends CompressedTexture{constructor(images,format,type){super(undefined,images[0].width,images[0].height,format,type,CubeReflectionMapping);this.isCompressedCubeTexture=true;this.isCubeTexture=true;this.image=images}}class CanvasTexture extends Texture{constructor(canvas,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy){super(canvas,mapping,wrapS,wrapT,magFilter,minFilter,format,type,anisotropy);this.isCanvasTexture=true;this.needsUpdate=true}}class Curve{constructor(){this.type="Curve";this.arcLengthDivisions=200}getPoint(){console.warn("THREE.Curve: .getPoint() not implemented.");return null}getPointAt(u,optionalTarget){const t=this.getUtoTmapping(u);return this.getPoint(t,optionalTarget)}getPoints(divisions=5){const points=[];for(let d=0;d<=divisions;d++){points.push(this.getPoint(d/divisions))}return points}getSpacedPoints(divisions=5){const points=[];for(let d=0;d<=divisions;d++){points.push(this.getPointAt(d/divisions))}return points}getLength(){const lengths=this.getLengths();return lengths[lengths.length-1]}getLengths(divisions=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===divisions+1&&!this.needsUpdate){return this.cacheArcLengths}this.needsUpdate=false;const cache=[];let current,last=this.getPoint(0);let sum=0;cache.push(0);for(let p=1;p<=divisions;p++){current=this.getPoint(p/divisions);sum+=current.distanceTo(last);cache.push(sum);last=current}this.cacheArcLengths=cache;return cache}updateArcLengths(){this.needsUpdate=true;this.getLengths()}getUtoTmapping(u,distance){const arcLengths=this.getLengths();let i=0;const il=arcLengths.length;let targetArcLength;if(distance){targetArcLength=distance}else{targetArcLength=u*arcLengths[il-1]}let low=0,high=il-1,comparison;while(low<=high){i=Math.floor(low+(high-low)/2);comparison=arcLengths[i]-targetArcLength;if(comparison<0){low=i+1}else if(comparison>0){high=i-1}else{high=i;break}}i=high;if(arcLengths[i]===targetArcLength){return i/(il-1)}const lengthBefore=arcLengths[i];const lengthAfter=arcLengths[i+1];const segmentLength=lengthAfter-lengthBefore;const segmentFraction=(targetArcLength-lengthBefore)/segmentLength;const t=(i+segmentFraction)/(il-1);return t}getTangent(t,optionalTarget){const delta=0.0001;let t1=t-delta;let t2=t+delta;if(t1<0)t1=0;if(t2>1)t2=1;const pt1=this.getPoint(t1);const pt2=this.getPoint(t2);const tangent=optionalTarget||(pt1.isVector2?new Vector2:new Vector3);tangent.copy(pt2).sub(pt1).normalize();return tangent}getTangentAt(u,optionalTarget){const t=this.getUtoTmapping(u);return this.getTangent(t,optionalTarget)}computeFrenetFrames(segments,closed){const normal=new Vector3;const tangents=[];const normals=[];const binormals=[];const vec=new Vector3;const mat=new Matrix4;for(let i=0;i<=segments;i++){const u=i/segments;tangents[i]=this.getTangentAt(u,new Vector3)}normals[0]=new Vector3;binormals[0]=new Vector3;let min=Number.MAX_VALUE;const tx=Math.abs(tangents[0].x);const ty=Math.abs(tangents[0].y);const tz=Math.abs(tangents[0].z);if(tx<=min){min=tx;normal.set(1,0,0)}if(ty<=min){min=ty;normal.set(0,1,0)}if(tz<=min){normal.set(0,0,1)}vec.crossVectors(tangents[0],normal).normalize();normals[0].crossVectors(tangents[0],vec);binormals[0].crossVectors(tangents[0],normals[0]);for(let i=1;i<=segments;i++){normals[i]=normals[i-1].clone();binormals[i]=binormals[i-1].clone();vec.crossVectors(tangents[i-1],tangents[i]);if(vec.length()>Number.EPSILON){vec.normalize();const theta=Math.acos(clamp(tangents[i-1].dot(tangents[i]),-1,1));normals[i].applyMatrix4(mat.makeRotationAxis(vec,theta))}binormals[i].crossVectors(tangents[i],normals[i])}if(closed===true){let theta=Math.acos(clamp(normals[0].dot(normals[segments]),-1,1));theta/=segments;if(tangents[0].dot(vec.crossVectors(normals[0],normals[segments]))>0){theta=-theta}for(let i=1;i<=segments;i++){normals[i].applyMatrix4(mat.makeRotationAxis(tangents[i],theta*i));binormals[i].crossVectors(tangents[i],normals[i])}}return{tangents:tangents,normals:normals,binormals:binormals}}clone(){return new this.constructor().copy(this)}copy(source){this.arcLengthDivisions=source.arcLengthDivisions;return this}toJSON(){const data={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};data.arcLengthDivisions=this.arcLengthDivisions;data.type=this.type;return data}fromJSON(json){this.arcLengthDivisions=json.arcLengthDivisions;return this}}class EllipseCurve extends Curve{constructor(aX=0,aY=0,xRadius=1,yRadius=1,aStartAngle=0,aEndAngle=Math.PI*2,aClockwise=false,aRotation=0){super();this.isEllipseCurve=true;this.type="EllipseCurve";this.aX=aX;this.aY=aY;this.xRadius=xRadius;this.yRadius=yRadius;this.aStartAngle=aStartAngle;this.aEndAngle=aEndAngle;this.aClockwise=aClockwise;this.aRotation=aRotation}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const twoPi=Math.PI*2;let deltaAngle=this.aEndAngle-this.aStartAngle;const samePoints=Math.abs(deltaAngle)<Number.EPSILON;while(deltaAngle<0)deltaAngle+=twoPi;while(deltaAngle>twoPi)deltaAngle-=twoPi;if(deltaAngle<Number.EPSILON){if(samePoints){deltaAngle=0}else{deltaAngle=twoPi}}if(this.aClockwise===true&&!samePoints){if(deltaAngle===twoPi){deltaAngle=-twoPi}else{deltaAngle=deltaAngle-twoPi}}const angle=this.aStartAngle+t*deltaAngle;let x=this.aX+this.xRadius*Math.cos(angle);let y=this.aY+this.yRadius*Math.sin(angle);if(this.aRotation!==0){const cos=Math.cos(this.aRotation);const sin=Math.sin(this.aRotation);const tx=x-this.aX;const ty=y-this.aY;x=tx*cos-ty*sin+this.aX;y=tx*sin+ty*cos+this.aY}return point.set(x,y)}copy(source){super.copy(source);this.aX=source.aX;this.aY=source.aY;this.xRadius=source.xRadius;this.yRadius=source.yRadius;this.aStartAngle=source.aStartAngle;this.aEndAngle=source.aEndAngle;this.aClockwise=source.aClockwise;this.aRotation=source.aRotation;return this}toJSON(){const data=super.toJSON();data.aX=this.aX;data.aY=this.aY;data.xRadius=this.xRadius;data.yRadius=this.yRadius;data.aStartAngle=this.aStartAngle;data.aEndAngle=this.aEndAngle;data.aClockwise=this.aClockwise;data.aRotation=this.aRotation;return data}fromJSON(json){super.fromJSON(json);this.aX=json.aX;this.aY=json.aY;this.xRadius=json.xRadius;this.yRadius=json.yRadius;this.aStartAngle=json.aStartAngle;this.aEndAngle=json.aEndAngle;this.aClockwise=json.aClockwise;this.aRotation=json.aRotation;return this}}class ArcCurve extends EllipseCurve{constructor(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){super(aX,aY,aRadius,aRadius,aStartAngle,aEndAngle,aClockwise);this.isArcCurve=true;this.type="ArcCurve"}}function CubicPoly(){let c0=0,c1=0,c2=0,c3=0;function init(x0,x1,t0,t1){c0=x0;c1=t0;c2=-3*x0+3*x1-2*t0-t1;c3=2*x0-2*x1+t0+t1}return{initCatmullRom:function(x0,x1,x2,x3,tension){init(x1,x2,tension*(x2-x0),tension*(x3-x1))},initNonuniformCatmullRom:function(x0,x1,x2,x3,dt0,dt1,dt2){let t1=(x1-x0)/dt0-(x2-x0)/(dt0+dt1)+(x2-x1)/dt1;let t2=(x2-x1)/dt1-(x3-x1)/(dt1+dt2)+(x3-x2)/dt2;t1*=dt1;t2*=dt1;init(x1,x2,t1,t2)},calc:function(t){const t2=t*t;const t3=t2*t;return c0+c1*t+c2*t2+c3*t3}}}const tmp=new Vector3;const px=new CubicPoly;const py=new CubicPoly;const pz=new CubicPoly;class CatmullRomCurve3 extends Curve{constructor(points=[],closed=false,curveType="centripetal",tension=0.5){super();this.isCatmullRomCurve3=true;this.type="CatmullRomCurve3";this.points=points;this.closed=closed;this.curveType=curveType;this.tension=tension}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;const points=this.points;const l=points.length;const p=(l-(this.closed?0:1))*t;let intPoint=Math.floor(p);let weight=p-intPoint;if(this.closed){intPoint+=intPoint>0?0:(Math.floor(Math.abs(intPoint)/l)+1)*l}else if(weight===0&&intPoint===l-1){intPoint=l-2;weight=1}let p0,p3;if(this.closed||intPoint>0){p0=points[(intPoint-1)%l]}else{tmp.subVectors(points[0],points[1]).add(points[0]);p0=tmp}const p1=points[intPoint%l];const p2=points[(intPoint+1)%l];if(this.closed||intPoint+2<l){p3=points[(intPoint+2)%l]}else{tmp.subVectors(points[l-1],points[l-2]).add(points[l-1]);p3=tmp}if(this.curveType==="centripetal"||this.curveType==="chordal"){const pow=this.curveType==="chordal"?0.5:0.25;let dt0=Math.pow(p0.distanceToSquared(p1),pow);let dt1=Math.pow(p1.distanceToSquared(p2),pow);let dt2=Math.pow(p2.distanceToSquared(p3),pow);if(dt1<1e-4)dt1=1;if(dt0<1e-4)dt0=dt1;if(dt2<1e-4)dt2=dt1;px.initNonuniformCatmullRom(p0.x,p1.x,p2.x,p3.x,dt0,dt1,dt2);py.initNonuniformCatmullRom(p0.y,p1.y,p2.y,p3.y,dt0,dt1,dt2);pz.initNonuniformCatmullRom(p0.z,p1.z,p2.z,p3.z,dt0,dt1,dt2)}else if(this.curveType==="catmullrom"){px.initCatmullRom(p0.x,p1.x,p2.x,p3.x,this.tension);py.initCatmullRom(p0.y,p1.y,p2.y,p3.y,this.tension);pz.initCatmullRom(p0.z,p1.z,p2.z,p3.z,this.tension)}point.set(px.calc(weight),py.calc(weight),pz.calc(weight));return point}copy(source){super.copy(source);this.points=[];for(let i=0,l=source.points.length;i<l;i++){const point=source.points[i];this.points.push(point.clone())}this.closed=source.closed;this.curveType=source.curveType;this.tension=source.tension;return this}toJSON(){const data=super.toJSON();data.points=[];for(let i=0,l=this.points.length;i<l;i++){const point=this.points[i];data.points.push(point.toArray())}data.closed=this.closed;data.curveType=this.curveType;data.tension=this.tension;return data}fromJSON(json){super.fromJSON(json);this.points=[];for(let i=0,l=json.points.length;i<l;i++){const point=json.points[i];this.points.push(new Vector3().fromArray(point))}this.closed=json.closed;this.curveType=json.curveType;this.tension=json.tension;return this}}function CatmullRom(t,p0,p1,p2,p3){const v0=(p2-p0)*0.5;const v1=(p3-p1)*0.5;const t2=t*t;const t3=t*t2;return(2*p1-2*p2+v0+v1)*t3+(-3*p1+3*p2-2*v0-v1)*t2+v0*t+p1}function QuadraticBezierP0(t,p){const k=1-t;return k*k*p}function QuadraticBezierP1(t,p){return 2*(1-t)*t*p}function QuadraticBezierP2(t,p){return t*t*p}function QuadraticBezier(t,p0,p1,p2){return QuadraticBezierP0(t,p0)+QuadraticBezierP1(t,p1)+QuadraticBezierP2(t,p2)}function CubicBezierP0(t,p){const k=1-t;return k*k*k*p}function CubicBezierP1(t,p){const k=1-t;return 3*k*k*t*p}function CubicBezierP2(t,p){return 3*(1-t)*t*t*p}function CubicBezierP3(t,p){return t*t*t*p}function CubicBezier(t,p0,p1,p2,p3){return CubicBezierP0(t,p0)+CubicBezierP1(t,p1)+CubicBezierP2(t,p2)+CubicBezierP3(t,p3)}class CubicBezierCurve extends Curve{constructor(v0=new Vector2,v1=new Vector2,v2=new Vector2,v3=new Vector2){super();this.isCubicBezierCurve=true;this.type="CubicBezierCurve";this.v0=v0;this.v1=v1;this.v2=v2;this.v3=v3}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2,v3=this.v3;point.set(CubicBezier(t,v0.x,v1.x,v2.x,v3.x),CubicBezier(t,v0.y,v1.y,v2.y,v3.y));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);this.v3.copy(source.v3);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();data.v3=this.v3.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);this.v3.fromArray(json.v3);return this}}class CubicBezierCurve3 extends Curve{constructor(v0=new Vector3,v1=new Vector3,v2=new Vector3,v3=new Vector3){super();this.isCubicBezierCurve3=true;this.type="CubicBezierCurve3";this.v0=v0;this.v1=v1;this.v2=v2;this.v3=v3}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2,v3=this.v3;point.set(CubicBezier(t,v0.x,v1.x,v2.x,v3.x),CubicBezier(t,v0.y,v1.y,v2.y,v3.y),CubicBezier(t,v0.z,v1.z,v2.z,v3.z));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);this.v3.copy(source.v3);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();data.v3=this.v3.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);this.v3.fromArray(json.v3);return this}}class LineCurve extends Curve{constructor(v1=new Vector2,v2=new Vector2){super();this.isLineCurve=true;this.type="LineCurve";this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;if(t===1){point.copy(this.v2)}else{point.copy(this.v2).sub(this.v1);point.multiplyScalar(t).add(this.v1)}return point}getPointAt(u,optionalTarget){return this.getPoint(u,optionalTarget)}getTangent(t,optionalTarget=new Vector2){return optionalTarget.subVectors(this.v2,this.v1).normalize()}getTangentAt(u,optionalTarget){return this.getTangent(u,optionalTarget)}copy(source){super.copy(source);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class LineCurve3 extends Curve{constructor(v1=new Vector3,v2=new Vector3){super();this.isLineCurve3=true;this.type="LineCurve3";this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;if(t===1){point.copy(this.v2)}else{point.copy(this.v2).sub(this.v1);point.multiplyScalar(t).add(this.v1)}return point}getPointAt(u,optionalTarget){return this.getPoint(u,optionalTarget)}getTangent(t,optionalTarget=new Vector3){return optionalTarget.subVectors(this.v2,this.v1).normalize()}getTangentAt(u,optionalTarget){return this.getTangent(u,optionalTarget)}copy(source){super.copy(source);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class QuadraticBezierCurve extends Curve{constructor(v0=new Vector2,v1=new Vector2,v2=new Vector2){super();this.isQuadraticBezierCurve=true;this.type="QuadraticBezierCurve";this.v0=v0;this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2;point.set(QuadraticBezier(t,v0.x,v1.x,v2.x),QuadraticBezier(t,v0.y,v1.y,v2.y));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class QuadraticBezierCurve3 extends Curve{constructor(v0=new Vector3,v1=new Vector3,v2=new Vector3){super();this.isQuadraticBezierCurve3=true;this.type="QuadraticBezierCurve3";this.v0=v0;this.v1=v1;this.v2=v2}getPoint(t,optionalTarget=new Vector3){const point=optionalTarget;const v0=this.v0,v1=this.v1,v2=this.v2;point.set(QuadraticBezier(t,v0.x,v1.x,v2.x),QuadraticBezier(t,v0.y,v1.y,v2.y),QuadraticBezier(t,v0.z,v1.z,v2.z));return point}copy(source){super.copy(source);this.v0.copy(source.v0);this.v1.copy(source.v1);this.v2.copy(source.v2);return this}toJSON(){const data=super.toJSON();data.v0=this.v0.toArray();data.v1=this.v1.toArray();data.v2=this.v2.toArray();return data}fromJSON(json){super.fromJSON(json);this.v0.fromArray(json.v0);this.v1.fromArray(json.v1);this.v2.fromArray(json.v2);return this}}class SplineCurve extends Curve{constructor(points=[]){super();this.isSplineCurve=true;this.type="SplineCurve";this.points=points}getPoint(t,optionalTarget=new Vector2){const point=optionalTarget;const points=this.points;const p=(points.length-1)*t;const intPoint=Math.floor(p);const weight=p-intPoint;const p0=points[intPoint===0?intPoint:intPoint-1];const p1=points[intPoint];const p2=points[intPoint>points.length-2?points.length-1:intPoint+1];const p3=points[intPoint>points.length-3?points.length-1:intPoint+2];point.set(CatmullRom(weight,p0.x,p1.x,p2.x,p3.x),CatmullRom(weight,p0.y,p1.y,p2.y,p3.y));return point}copy(source){super.copy(source);this.points=[];for(let i=0,l=source.points.length;i<l;i++){const point=source.points[i];this.points.push(point.clone())}return this}toJSON(){const data=super.toJSON();data.points=[];for(let i=0,l=this.points.length;i<l;i++){const point=this.points[i];data.points.push(point.toArray())}return data}fromJSON(json){super.fromJSON(json);this.points=[];for(let i=0,l=json.points.length;i<l;i++){const point=json.points[i];this.points.push(new Vector2().fromArray(point))}return this}}var Curves=Object.freeze({__proto__:null,ArcCurve:ArcCurve,CatmullRomCurve3:CatmullRomCurve3,CubicBezierCurve:CubicBezierCurve,CubicBezierCurve3:CubicBezierCurve3,EllipseCurve:EllipseCurve,LineCurve:LineCurve,LineCurve3:LineCurve3,QuadraticBezierCurve:QuadraticBezierCurve,QuadraticBezierCurve3:QuadraticBezierCurve3,SplineCurve:SplineCurve});class CurvePath extends Curve{constructor(){super();this.type="CurvePath";this.curves=[];this.autoClose=false}add(curve){this.curves.push(curve)}closePath(){const startPoint=this.curves[0].getPoint(0);const endPoint=this.curves[this.curves.length-1].getPoint(1);if(!startPoint.equals(endPoint)){const lineType=startPoint.isVector2===true?"LineCurve":"LineCurve3";this.curves.push(new Curves[lineType](endPoint,startPoint))}return this}getPoint(t,optionalTarget){const d=t*this.getLength();const curveLengths=this.getCurveLengths();let i=0;while(i<curveLengths.length){if(curveLengths[i]>=d){const diff=curveLengths[i]-d;const curve=this.curves[i];const segmentLength=curve.getLength();const u=segmentLength===0?0:1-diff/segmentLength;return curve.getPointAt(u,optionalTarget)}i++}return null}getLength(){const lens=this.getCurveLengths();return lens[lens.length-1]}updateArcLengths(){this.needsUpdate=true;this.cacheLengths=null;this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length){return this.cacheLengths}const lengths=[];let sums=0;for(let i=0,l=this.curves.length;i<l;i++){sums+=this.curves[i].getLength();lengths.push(sums)}this.cacheLengths=lengths;return lengths}getSpacedPoints(divisions=40){const points=[];for(let i=0;i<=divisions;i++){points.push(this.getPoint(i/divisions))}if(this.autoClose){points.push(points[0])}return points}getPoints(divisions=12){const points=[];let last;for(let i=0,curves=this.curves;i<curves.length;i++){const curve=curves[i];const resolution=curve.isEllipseCurve?divisions*2:curve.isLineCurve||curve.isLineCurve3?1:curve.isSplineCurve?divisions*curve.points.length:divisions;const pts=curve.getPoints(resolution);for(let j=0;j<pts.length;j++){const point=pts[j];if(last&&last.equals(point))continue;points.push(point);last=point}}if(this.autoClose&&points.length>1&&!points[points.length-1].equals(points[0])){points.push(points[0])}return points}copy(source){super.copy(source);this.curves=[];for(let i=0,l=source.curves.length;i<l;i++){const curve=source.curves[i];this.curves.push(curve.clone())}this.autoClose=source.autoClose;return this}toJSON(){const data=super.toJSON();data.autoClose=this.autoClose;data.curves=[];for(let i=0,l=this.curves.length;i<l;i++){const curve=this.curves[i];data.curves.push(curve.toJSON())}return data}fromJSON(json){super.fromJSON(json);this.autoClose=json.autoClose;this.curves=[];for(let i=0,l=json.curves.length;i<l;i++){const curve=json.curves[i];this.curves.push(new Curves[curve.type]().fromJSON(curve))}return this}}class Path extends CurvePath{constructor(points){super();this.type="Path";this.currentPoint=new Vector2;if(points){this.setFromPoints(points)}}setFromPoints(points){this.moveTo(points[0].x,points[0].y);for(let i=1,l=points.length;i<l;i++){this.lineTo(points[i].x,points[i].y)}return this}moveTo(x,y){this.currentPoint.set(x,y);return this}lineTo(x,y){const curve=new LineCurve(this.currentPoint.clone(),new Vector2(x,y));this.curves.push(curve);this.currentPoint.set(x,y);return this}quadraticCurveTo(aCPx,aCPy,aX,aY){const curve=new QuadraticBezierCurve(this.currentPoint.clone(),new Vector2(aCPx,aCPy),new Vector2(aX,aY));this.curves.push(curve);this.currentPoint.set(aX,aY);return this}bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY){const curve=new CubicBezierCurve(this.currentPoint.clone(),new Vector2(aCP1x,aCP1y),new Vector2(aCP2x,aCP2y),new Vector2(aX,aY));this.curves.push(curve);this.currentPoint.set(aX,aY);return this}splineThru(pts){const npts=[this.currentPoint.clone()].concat(pts);const curve=new SplineCurve(npts);this.curves.push(curve);this.currentPoint.copy(pts[pts.length-1]);return this}arc(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){const x0=this.currentPoint.x;const y0=this.currentPoint.y;this.absarc(aX+x0,aY+y0,aRadius,aStartAngle,aEndAngle,aClockwise);return this}absarc(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){this.absellipse(aX,aY,aRadius,aRadius,aStartAngle,aEndAngle,aClockwise);return this}ellipse(aX,aY,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation){const x0=this.currentPoint.x;const y0=this.currentPoint.y;this.absellipse(aX+x0,aY+y0,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation);return this}absellipse(aX,aY,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation){const curve=new EllipseCurve(aX,aY,xRadius,yRadius,aStartAngle,aEndAngle,aClockwise,aRotation);if(this.curves.length>0){const firstPoint=curve.getPoint(0);if(!firstPoint.equals(this.currentPoint)){this.lineTo(firstPoint.x,firstPoint.y)}}this.curves.push(curve);const lastPoint=curve.getPoint(1);this.currentPoint.copy(lastPoint);return this}copy(source){super.copy(source);this.currentPoint.copy(source.currentPoint);return this}toJSON(){const data=super.toJSON();data.currentPoint=this.currentPoint.toArray();return data}fromJSON(json){super.fromJSON(json);this.currentPoint.fromArray(json.currentPoint);return this}}class LatheGeometry extends BufferGeometry{constructor(points=[new Vector2(0,-0.5),new Vector2(0.5,0),new Vector2(0,0.5)],segments=12,phiStart=0,phiLength=Math.PI*2){super();this.type="LatheGeometry";this.parameters={points:points,segments:segments,phiStart:phiStart,phiLength:phiLength};segments=Math.floor(segments);phiLength=clamp(phiLength,0,Math.PI*2);const indices=[];const vertices=[];const uvs=[];const initNormals=[];const normals=[];const inverseSegments=1/segments;const vertex=new Vector3;const uv=new Vector2;const normal=new Vector3;const curNormal=new Vector3;const prevNormal=new Vector3;let dx=0;let dy=0;for(let j=0;j<=points.length-1;j++){switch(j){case 0:dx=points[j+1].x-points[j].x;dy=points[j+1].y-points[j].y;normal.x=dy*1;normal.y=-dx;normal.z=dy*0;prevNormal.copy(normal);normal.normalize();initNormals.push(normal.x,normal.y,normal.z);break;case points.length-1:initNormals.push(prevNormal.x,prevNormal.y,prevNormal.z);break;default:dx=points[j+1].x-points[j].x;dy=points[j+1].y-points[j].y;normal.x=dy*1;normal.y=-dx;normal.z=dy*0;curNormal.copy(normal);normal.x+=prevNormal.x;normal.y+=prevNormal.y;normal.z+=prevNormal.z;normal.normalize();initNormals.push(normal.x,normal.y,normal.z);prevNormal.copy(curNormal);}}for(let i=0;i<=segments;i++){const phi=phiStart+i*inverseSegments*phiLength;const sin=Math.sin(phi);const cos=Math.cos(phi);for(let j=0;j<=points.length-1;j++){vertex.x=points[j].x*sin;vertex.y=points[j].y;vertex.z=points[j].x*cos;vertices.push(vertex.x,vertex.y,vertex.z);uv.x=i/segments;uv.y=j/(points.length-1);uvs.push(uv.x,uv.y);const x=initNormals[3*j+0]*sin;const y=initNormals[3*j+1];const z=initNormals[3*j+0]*cos;normals.push(x,y,z)}}for(let i=0;i<segments;i++){for(let j=0;j<points.length-1;j++){const base=j+i*points.length;const a=base;const b=base+points.length;const c=base+points.length+1;const d=base+1;indices.push(a,b,d);indices.push(c,d,b)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));this.setAttribute("normal",new Float32BufferAttribute(normals,3))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new LatheGeometry(data.points,data.segments,data.phiStart,data.phiLength)}}class CapsuleGeometry extends LatheGeometry{constructor(radius=1,length=1,capSegments=4,radialSegments=8){const path=new Path;path.absarc(0,-length/2,radius,Math.PI*1.5,0);path.absarc(0,length/2,radius,0,Math.PI*0.5);super(path.getPoints(capSegments),radialSegments);this.type="CapsuleGeometry";this.parameters={radius:radius,length:length,capSegments:capSegments,radialSegments:radialSegments}}static fromJSON(data){return new CapsuleGeometry(data.radius,data.length,data.capSegments,data.radialSegments)}}class CircleGeometry extends BufferGeometry{constructor(radius=1,segments=32,thetaStart=0,thetaLength=Math.PI*2){super();this.type="CircleGeometry";this.parameters={radius:radius,segments:segments,thetaStart:thetaStart,thetaLength:thetaLength};segments=Math.max(3,segments);const indices=[];const vertices=[];const normals=[];const uvs=[];const vertex=new Vector3;const uv=new Vector2;vertices.push(0,0,0);normals.push(0,0,1);uvs.push(0.5,0.5);for(let s=0,i=3;s<=segments;s++,i+=3){const segment=thetaStart+s/segments*thetaLength;vertex.x=radius*Math.cos(segment);vertex.y=radius*Math.sin(segment);vertices.push(vertex.x,vertex.y,vertex.z);normals.push(0,0,1);uv.x=(vertices[i]/radius+1)/2;uv.y=(vertices[i+1]/radius+1)/2;uvs.push(uv.x,uv.y)}for(let i=1;i<=segments;i++){indices.push(i,i+1,0)}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new CircleGeometry(data.radius,data.segments,data.thetaStart,data.thetaLength)}}class CylinderGeometry extends BufferGeometry{constructor(radiusTop=1,radiusBottom=1,height=1,radialSegments=32,heightSegments=1,openEnded=false,thetaStart=0,thetaLength=Math.PI*2){super();this.type="CylinderGeometry";this.parameters={radiusTop:radiusTop,radiusBottom:radiusBottom,height:height,radialSegments:radialSegments,heightSegments:heightSegments,openEnded:openEnded,thetaStart:thetaStart,thetaLength:thetaLength};const scope=this;radialSegments=Math.floor(radialSegments);heightSegments=Math.floor(heightSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];let index=0;const indexArray=[];const halfHeight=height/2;let groupStart=0;generateTorso();if(openEnded===false){if(radiusTop>0)generateCap(true);if(radiusBottom>0)generateCap(false)}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function generateTorso(){const normal=new Vector3;const vertex=new Vector3;let groupCount=0;const slope=(radiusBottom-radiusTop)/height;for(let y=0;y<=heightSegments;y++){const indexRow=[];const v=y/heightSegments;const radius=v*(radiusBottom-radiusTop)+radiusTop;for(let x=0;x<=radialSegments;x++){const u=x/radialSegments;const theta=u*thetaLength+thetaStart;const sinTheta=Math.sin(theta);const cosTheta=Math.cos(theta);vertex.x=radius*sinTheta;vertex.y=-v*height+halfHeight;vertex.z=radius*cosTheta;vertices.push(vertex.x,vertex.y,vertex.z);normal.set(sinTheta,slope,cosTheta).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(u,1-v);indexRow.push(index++)}indexArray.push(indexRow)}for(let x=0;x<radialSegments;x++){for(let y=0;y<heightSegments;y++){const a=indexArray[y][x];const b=indexArray[y+1][x];const c=indexArray[y+1][x+1];const d=indexArray[y][x+1];indices.push(a,b,d);indices.push(b,c,d);groupCount+=6}}scope.addGroup(groupStart,groupCount,0);groupStart+=groupCount}function generateCap(top){const centerIndexStart=index;const uv=new Vector2;const vertex=new Vector3;let groupCount=0;const radius=top===true?radiusTop:radiusBottom;const sign=top===true?1:-1;for(let x=1;x<=radialSegments;x++){vertices.push(0,halfHeight*sign,0);normals.push(0,sign,0);uvs.push(0.5,0.5);index++}const centerIndexEnd=index;for(let x=0;x<=radialSegments;x++){const u=x/radialSegments;const theta=u*thetaLength+thetaStart;const cosTheta=Math.cos(theta);const sinTheta=Math.sin(theta);vertex.x=radius*sinTheta;vertex.y=halfHeight*sign;vertex.z=radius*cosTheta;vertices.push(vertex.x,vertex.y,vertex.z);normals.push(0,sign,0);uv.x=cosTheta*0.5+0.5;uv.y=sinTheta*0.5*sign+0.5;uvs.push(uv.x,uv.y);index++}for(let x=0;x<radialSegments;x++){const c=centerIndexStart+x;const i=centerIndexEnd+x;if(top===true){indices.push(i,i+1,c)}else{indices.push(i+1,i,c)}groupCount+=3}scope.addGroup(groupStart,groupCount,top===true?1:2);groupStart+=groupCount}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new CylinderGeometry(data.radiusTop,data.radiusBottom,data.height,data.radialSegments,data.heightSegments,data.openEnded,data.thetaStart,data.thetaLength)}}class ConeGeometry extends CylinderGeometry{constructor(radius=1,height=1,radialSegments=32,heightSegments=1,openEnded=false,thetaStart=0,thetaLength=Math.PI*2){super(0,radius,height,radialSegments,heightSegments,openEnded,thetaStart,thetaLength);this.type="ConeGeometry";this.parameters={radius:radius,height:height,radialSegments:radialSegments,heightSegments:heightSegments,openEnded:openEnded,thetaStart:thetaStart,thetaLength:thetaLength}}static fromJSON(data){return new ConeGeometry(data.radius,data.height,data.radialSegments,data.heightSegments,data.openEnded,data.thetaStart,data.thetaLength)}}class PolyhedronGeometry extends BufferGeometry{constructor(vertices=[],indices=[],radius=1,detail=0){super();this.type="PolyhedronGeometry";this.parameters={vertices:vertices,indices:indices,radius:radius,detail:detail};const vertexBuffer=[];const uvBuffer=[];subdivide(detail);applyRadius(radius);generateUVs();this.setAttribute("position",new Float32BufferAttribute(vertexBuffer,3));this.setAttribute("normal",new Float32BufferAttribute(vertexBuffer.slice(),3));this.setAttribute("uv",new Float32BufferAttribute(uvBuffer,2));if(detail===0){this.computeVertexNormals()}else{this.normalizeNormals()}function subdivide(detail){const a=new Vector3;const b=new Vector3;const c=new Vector3;for(let i=0;i<indices.length;i+=3){getVertexByIndex(indices[i+0],a);getVertexByIndex(indices[i+1],b);getVertexByIndex(indices[i+2],c);subdivideFace(a,b,c,detail)}}function subdivideFace(a,b,c,detail){const cols=detail+1;const v=[];for(let i=0;i<=cols;i++){v[i]=[];const aj=a.clone().lerp(c,i/cols);const bj=b.clone().lerp(c,i/cols);const rows=cols-i;for(let j=0;j<=rows;j++){if(j===0&&i===cols){v[i][j]=aj}else{v[i][j]=aj.clone().lerp(bj,j/rows)}}}for(let i=0;i<cols;i++){for(let j=0;j<2*(cols-i)-1;j++){const k=Math.floor(j/2);if(j%2===0){pushVertex(v[i][k+1]);pushVertex(v[i+1][k]);pushVertex(v[i][k])}else{pushVertex(v[i][k+1]);pushVertex(v[i+1][k+1]);pushVertex(v[i+1][k])}}}}function applyRadius(radius){const vertex=new Vector3;for(let i=0;i<vertexBuffer.length;i+=3){vertex.x=vertexBuffer[i+0];vertex.y=vertexBuffer[i+1];vertex.z=vertexBuffer[i+2];vertex.normalize().multiplyScalar(radius);vertexBuffer[i+0]=vertex.x;vertexBuffer[i+1]=vertex.y;vertexBuffer[i+2]=vertex.z}}function generateUVs(){const vertex=new Vector3;for(let i=0;i<vertexBuffer.length;i+=3){vertex.x=vertexBuffer[i+0];vertex.y=vertexBuffer[i+1];vertex.z=vertexBuffer[i+2];const u=azimuth(vertex)/2/Math.PI+0.5;const v=inclination(vertex)/Math.PI+0.5;uvBuffer.push(u,1-v)}correctUVs();correctSeam()}function correctSeam(){for(let i=0;i<uvBuffer.length;i+=6){const x0=uvBuffer[i+0];const x1=uvBuffer[i+2];const x2=uvBuffer[i+4];const max=Math.max(x0,x1,x2);const min=Math.min(x0,x1,x2);if(max>0.9&&min<0.1){if(x0<0.2)uvBuffer[i+0]+=1;if(x1<0.2)uvBuffer[i+2]+=1;if(x2<0.2)uvBuffer[i+4]+=1}}}function pushVertex(vertex){vertexBuffer.push(vertex.x,vertex.y,vertex.z)}function getVertexByIndex(index,vertex){const stride=index*3;vertex.x=vertices[stride+0];vertex.y=vertices[stride+1];vertex.z=vertices[stride+2]}function correctUVs(){const a=new Vector3;const b=new Vector3;const c=new Vector3;const centroid=new Vector3;const uvA=new Vector2;const uvB=new Vector2;const uvC=new Vector2;for(let i=0,j=0;i<vertexBuffer.length;i+=9,j+=6){a.set(vertexBuffer[i+0],vertexBuffer[i+1],vertexBuffer[i+2]);b.set(vertexBuffer[i+3],vertexBuffer[i+4],vertexBuffer[i+5]);c.set(vertexBuffer[i+6],vertexBuffer[i+7],vertexBuffer[i+8]);uvA.set(uvBuffer[j+0],uvBuffer[j+1]);uvB.set(uvBuffer[j+2],uvBuffer[j+3]);uvC.set(uvBuffer[j+4],uvBuffer[j+5]);centroid.copy(a).add(b).add(c).divideScalar(3);const azi=azimuth(centroid);correctUV(uvA,j+0,a,azi);correctUV(uvB,j+2,b,azi);correctUV(uvC,j+4,c,azi)}}function correctUV(uv,stride,vector,azimuth){if(azimuth<0&&uv.x===1){uvBuffer[stride]=uv.x-1}if(vector.x===0&&vector.z===0){uvBuffer[stride]=azimuth/2/Math.PI+0.5}}function azimuth(vector){return Math.atan2(vector.z,-vector.x)}function inclination(vector){return Math.atan2(-vector.y,Math.sqrt(vector.x*vector.x+vector.z*vector.z))}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new PolyhedronGeometry(data.vertices,data.indices,data.radius,data.details)}}class DodecahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const t=(1+Math.sqrt(5))/2;const r=1/t;const vertices=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-t,0,-r,t,0,r,-t,0,r,t,-r,-t,0,-r,t,0,r,-t,0,r,t,0,-t,0,-r,t,0,-r,-t,0,r,t,0,r];const indices=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(vertices,indices,radius,detail);this.type="DodecahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new DodecahedronGeometry(data.radius,data.detail)}}const _v0=new Vector3;const _v1$1=new Vector3;const _normal=new Vector3;const _triangle=new Triangle;class EdgesGeometry extends BufferGeometry{constructor(geometry=null,thresholdAngle=1){super();this.type="EdgesGeometry";this.parameters={geometry:geometry,thresholdAngle:thresholdAngle};if(geometry!==null){const precisionPoints=4;const precision=Math.pow(10,precisionPoints);const thresholdDot=Math.cos(DEG2RAD*thresholdAngle);const indexAttr=geometry.getIndex();const positionAttr=geometry.getAttribute("position");const indexCount=indexAttr?indexAttr.count:positionAttr.count;const indexArr=[0,0,0];const vertKeys=["a","b","c"];const hashes=new Array(3);const edgeData={};const vertices=[];for(let i=0;i<indexCount;i+=3){if(indexAttr){indexArr[0]=indexAttr.getX(i);indexArr[1]=indexAttr.getX(i+1);indexArr[2]=indexAttr.getX(i+2)}else{indexArr[0]=i;indexArr[1]=i+1;indexArr[2]=i+2}const{a,b,c}=_triangle;a.fromBufferAttribute(positionAttr,indexArr[0]);b.fromBufferAttribute(positionAttr,indexArr[1]);c.fromBufferAttribute(positionAttr,indexArr[2]);_triangle.getNormal(_normal);hashes[0]=`${Math.round(a.x*precision)},${Math.round(a.y*precision)},${Math.round(a.z*precision)}`;hashes[1]=`${Math.round(b.x*precision)},${Math.round(b.y*precision)},${Math.round(b.z*precision)}`;hashes[2]=`${Math.round(c.x*precision)},${Math.round(c.y*precision)},${Math.round(c.z*precision)}`;if(hashes[0]===hashes[1]||hashes[1]===hashes[2]||hashes[2]===hashes[0]){continue}for(let j=0;j<3;j++){const jNext=(j+1)%3;const vecHash0=hashes[j];const vecHash1=hashes[jNext];const v0=_triangle[vertKeys[j]];const v1=_triangle[vertKeys[jNext]];const hash=`${vecHash0}_${vecHash1}`;const reverseHash=`${vecHash1}_${vecHash0}`;if(reverseHash in edgeData&&edgeData[reverseHash]){if(_normal.dot(edgeData[reverseHash].normal)<=thresholdDot){vertices.push(v0.x,v0.y,v0.z);vertices.push(v1.x,v1.y,v1.z)}edgeData[reverseHash]=null}else if(!(hash in edgeData)){edgeData[hash]={index0:indexArr[j],index1:indexArr[jNext],normal:_normal.clone()}}}}for(const key in edgeData){if(edgeData[key]){const{index0,index1}=edgeData[key];_v0.fromBufferAttribute(positionAttr,index0);_v1$1.fromBufferAttribute(positionAttr,index1);vertices.push(_v0.x,_v0.y,_v0.z);vertices.push(_v1$1.x,_v1$1.y,_v1$1.z)}}this.setAttribute("position",new Float32BufferAttribute(vertices,3))}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}}class Shape extends Path{constructor(points){super(points);this.uuid=generateUUID();this.type="Shape";this.holes=[]}getPointsHoles(divisions){const holesPts=[];for(let i=0,l=this.holes.length;i<l;i++){holesPts[i]=this.holes[i].getPoints(divisions)}return holesPts}extractPoints(divisions){return{shape:this.getPoints(divisions),holes:this.getPointsHoles(divisions)}}copy(source){super.copy(source);this.holes=[];for(let i=0,l=source.holes.length;i<l;i++){const hole=source.holes[i];this.holes.push(hole.clone())}return this}toJSON(){const data=super.toJSON();data.uuid=this.uuid;data.holes=[];for(let i=0,l=this.holes.length;i<l;i++){const hole=this.holes[i];data.holes.push(hole.toJSON())}return data}fromJSON(json){super.fromJSON(json);this.uuid=json.uuid;this.holes=[];for(let i=0,l=json.holes.length;i<l;i++){const hole=json.holes[i];this.holes.push(new Path().fromJSON(hole))}return this}}const Earcut={triangulate:function(data,holeIndices,dim=2){const hasHoles=holeIndices&&holeIndices.length;const outerLen=hasHoles?holeIndices[0]*dim:data.length;let outerNode=linkedList(data,0,outerLen,dim,true);const triangles=[];if(!outerNode||outerNode.next===outerNode.prev)return triangles;let minX,minY,maxX,maxY,x,y,invSize;if(hasHoles)outerNode=eliminateHoles(data,holeIndices,outerNode,dim);if(data.length>80*dim){minX=maxX=data[0];minY=maxY=data[1];for(let i=dim;i<outerLen;i+=dim){x=data[i];y=data[i+1];if(x<minX)minX=x;if(y<minY)minY=y;if(x>maxX)maxX=x;if(y>maxY)maxY=y}invSize=Math.max(maxX-minX,maxY-minY);invSize=invSize!==0?32767/invSize:0}earcutLinked(outerNode,triangles,dim,minX,minY,invSize,0);return triangles}};function linkedList(data,start,end,dim,clockwise){let i,last;if(clockwise===signedArea(data,start,end,dim)>0){for(i=start;i<end;i+=dim)last=insertNode(i,data[i],data[i+1],last)}else{for(i=end-dim;i>=start;i-=dim)last=insertNode(i,data[i],data[i+1],last)}if(last&&equals(last,last.next)){removeNode(last);last=last.next}return last}function filterPoints(start,end){if(!start)return start;if(!end)end=start;let p=start,again;do{again=false;if(!p.steiner&&(equals(p,p.next)||area(p.prev,p,p.next)===0)){removeNode(p);p=end=p.prev;if(p===p.next)break;again=true}else{p=p.next}}while(again||p!==end);return end}function earcutLinked(ear,triangles,dim,minX,minY,invSize,pass){if(!ear)return;if(!pass&&invSize)indexCurve(ear,minX,minY,invSize);let stop=ear,prev,next;while(ear.prev!==ear.next){prev=ear.prev;next=ear.next;if(invSize?isEarHashed(ear,minX,minY,invSize):isEar(ear)){triangles.push(prev.i/dim|0);triangles.push(ear.i/dim|0);triangles.push(next.i/dim|0);removeNode(ear);ear=next.next;stop=next.next;continue}ear=next;if(ear===stop){if(!pass){earcutLinked(filterPoints(ear),triangles,dim,minX,minY,invSize,1)}else if(pass===1){ear=cureLocalIntersections(filterPoints(ear),triangles,dim);earcutLinked(ear,triangles,dim,minX,minY,invSize,2)}else if(pass===2){splitEarcut(ear,triangles,dim,minX,minY,invSize)}break}}}function isEar(ear){const a=ear.prev,b=ear,c=ear.next;if(area(a,b,c)>=0)return false;const ax=a.x,bx=b.x,cx=c.x,ay=a.y,by=b.y,cy=c.y;const x0=ax<bx?ax<cx?ax:cx:bx<cx?bx:cx,y0=ay<by?ay<cy?ay:cy:by<cy?by:cy,x1=ax>bx?ax>cx?ax:cx:bx>cx?bx:cx,y1=ay>by?ay>cy?ay:cy:by>cy?by:cy;let p=c.next;while(p!==a){if(p.x>=x0&&p.x<=x1&&p.y>=y0&&p.y<=y1&&pointInTriangle(ax,ay,bx,by,cx,cy,p.x,p.y)&&area(p.prev,p,p.next)>=0)return false;p=p.next}return true}function isEarHashed(ear,minX,minY,invSize){const a=ear.prev,b=ear,c=ear.next;if(area(a,b,c)>=0)return false;const ax=a.x,bx=b.x,cx=c.x,ay=a.y,by=b.y,cy=c.y;const x0=ax<bx?ax<cx?ax:cx:bx<cx?bx:cx,y0=ay<by?ay<cy?ay:cy:by<cy?by:cy,x1=ax>bx?ax>cx?ax:cx:bx>cx?bx:cx,y1=ay>by?ay>cy?ay:cy:by>cy?by:cy;const minZ=zOrder(x0,y0,minX,minY,invSize),maxZ=zOrder(x1,y1,minX,minY,invSize);let p=ear.prevZ,n=ear.nextZ;while(p&&p.z>=minZ&&n&&n.z<=maxZ){if(p.x>=x0&&p.x<=x1&&p.y>=y0&&p.y<=y1&&p!==a&&p!==c&&pointInTriangle(ax,ay,bx,by,cx,cy,p.x,p.y)&&area(p.prev,p,p.next)>=0)return false;p=p.prevZ;if(n.x>=x0&&n.x<=x1&&n.y>=y0&&n.y<=y1&&n!==a&&n!==c&&pointInTriangle(ax,ay,bx,by,cx,cy,n.x,n.y)&&area(n.prev,n,n.next)>=0)return false;n=n.nextZ}while(p&&p.z>=minZ){if(p.x>=x0&&p.x<=x1&&p.y>=y0&&p.y<=y1&&p!==a&&p!==c&&pointInTriangle(ax,ay,bx,by,cx,cy,p.x,p.y)&&area(p.prev,p,p.next)>=0)return false;p=p.prevZ}while(n&&n.z<=maxZ){if(n.x>=x0&&n.x<=x1&&n.y>=y0&&n.y<=y1&&n!==a&&n!==c&&pointInTriangle(ax,ay,bx,by,cx,cy,n.x,n.y)&&area(n.prev,n,n.next)>=0)return false;n=n.nextZ}return true}function cureLocalIntersections(start,triangles,dim){let p=start;do{const a=p.prev,b=p.next.next;if(!equals(a,b)&&intersects(a,p,p.next,b)&&locallyInside(a,b)&&locallyInside(b,a)){triangles.push(a.i/dim|0);triangles.push(p.i/dim|0);triangles.push(b.i/dim|0);removeNode(p);removeNode(p.next);p=start=b}p=p.next}while(p!==start);return filterPoints(p)}function splitEarcut(start,triangles,dim,minX,minY,invSize){let a=start;do{let b=a.next.next;while(b!==a.prev){if(a.i!==b.i&&isValidDiagonal(a,b)){let c=splitPolygon(a,b);a=filterPoints(a,a.next);c=filterPoints(c,c.next);earcutLinked(a,triangles,dim,minX,minY,invSize,0);earcutLinked(c,triangles,dim,minX,minY,invSize,0);return}b=b.next}a=a.next}while(a!==start)}function eliminateHoles(data,holeIndices,outerNode,dim){const queue=[];let i,len,start,end,list;for(i=0,len=holeIndices.length;i<len;i++){start=holeIndices[i]*dim;end=i<len-1?holeIndices[i+1]*dim:data.length;list=linkedList(data,start,end,dim,false);if(list===list.next)list.steiner=true;queue.push(getLeftmost(list))}queue.sort(compareX);for(i=0;i<queue.length;i++){outerNode=eliminateHole(queue[i],outerNode)}return outerNode}function compareX(a,b){return a.x-b.x}function eliminateHole(hole,outerNode){const bridge=findHoleBridge(hole,outerNode);if(!bridge){return outerNode}const bridgeReverse=splitPolygon(bridge,hole);filterPoints(bridgeReverse,bridgeReverse.next);return filterPoints(bridge,bridge.next)}function findHoleBridge(hole,outerNode){let p=outerNode,qx=-Infinity,m;const hx=hole.x,hy=hole.y;do{if(hy<=p.y&&hy>=p.next.y&&p.next.y!==p.y){const x=p.x+(hy-p.y)*(p.next.x-p.x)/(p.next.y-p.y);if(x<=hx&&x>qx){qx=x;m=p.x<p.next.x?p:p.next;if(x===hx)return m}}p=p.next}while(p!==outerNode);if(!m)return null;const stop=m,mx=m.x,my=m.y;let tanMin=Infinity,tan;p=m;do{if(hx>=p.x&&p.x>=mx&&hx!==p.x&&pointInTriangle(hy<my?hx:qx,hy,mx,my,hy<my?qx:hx,hy,p.x,p.y)){tan=Math.abs(hy-p.y)/(hx-p.x);if(locallyInside(p,hole)&&(tan<tanMin||tan===tanMin&&(p.x>m.x||p.x===m.x&&sectorContainsSector(m,p)))){m=p;tanMin=tan}}p=p.next}while(p!==stop);return m}function sectorContainsSector(m,p){return area(m.prev,m,p.prev)<0&&area(p.next,m,m.next)<0}function indexCurve(start,minX,minY,invSize){let p=start;do{if(p.z===0)p.z=zOrder(p.x,p.y,minX,minY,invSize);p.prevZ=p.prev;p.nextZ=p.next;p=p.next}while(p!==start);p.prevZ.nextZ=null;p.prevZ=null;sortLinked(p)}function sortLinked(list){let i,p,q,e,tail,numMerges,pSize,qSize,inSize=1;do{p=list;list=null;tail=null;numMerges=0;while(p){numMerges++;q=p;pSize=0;for(i=0;i<inSize;i++){pSize++;q=q.nextZ;if(!q)break}qSize=inSize;while(pSize>0||qSize>0&&q){if(pSize!==0&&(qSize===0||!q||p.z<=q.z)){e=p;p=p.nextZ;pSize--}else{e=q;q=q.nextZ;qSize--}if(tail)tail.nextZ=e;else list=e;e.prevZ=tail;tail=e}p=q}tail.nextZ=null;inSize*=2}while(numMerges>1);return list}function zOrder(x,y,minX,minY,invSize){x=(x-minX)*invSize|0;y=(y-minY)*invSize|0;x=(x|x<<8)&16711935;x=(x|x<<4)&252645135;x=(x|x<<2)&858993459;x=(x|x<<1)&1431655765;y=(y|y<<8)&16711935;y=(y|y<<4)&252645135;y=(y|y<<2)&858993459;y=(y|y<<1)&1431655765;return x|y<<1}function getLeftmost(start){let p=start,leftmost=start;do{if(p.x<leftmost.x||p.x===leftmost.x&&p.y<leftmost.y)leftmost=p;p=p.next}while(p!==start);return leftmost}function pointInTriangle(ax,ay,bx,by,cx,cy,px,py){return(cx-px)*(ay-py)>=(ax-px)*(cy-py)&&(ax-px)*(by-py)>=(bx-px)*(ay-py)&&(bx-px)*(cy-py)>=(cx-px)*(by-py)}function isValidDiagonal(a,b){return a.next.i!==b.i&&a.prev.i!==b.i&&!intersectsPolygon(a,b)&&(locallyInside(a,b)&&locallyInside(b,a)&&middleInside(a,b)&&(area(a.prev,a,b.prev)||area(a,b.prev,b))||equals(a,b)&&area(a.prev,a,a.next)>0&&area(b.prev,b,b.next)>0)}function area(p,q,r){return(q.y-p.y)*(r.x-q.x)-(q.x-p.x)*(r.y-q.y)}function equals(p1,p2){return p1.x===p2.x&&p1.y===p2.y}function intersects(p1,q1,p2,q2){const o1=sign(area(p1,q1,p2));const o2=sign(area(p1,q1,q2));const o3=sign(area(p2,q2,p1));const o4=sign(area(p2,q2,q1));if(o1!==o2&&o3!==o4)return true;if(o1===0&&onSegment(p1,p2,q1))return true;if(o2===0&&onSegment(p1,q2,q1))return true;if(o3===0&&onSegment(p2,p1,q2))return true;if(o4===0&&onSegment(p2,q1,q2))return true;return false}function onSegment(p,q,r){return q.x<=Math.max(p.x,r.x)&&q.x>=Math.min(p.x,r.x)&&q.y<=Math.max(p.y,r.y)&&q.y>=Math.min(p.y,r.y)}function sign(num){return num>0?1:num<0?-1:0}function intersectsPolygon(a,b){let p=a;do{if(p.i!==a.i&&p.next.i!==a.i&&p.i!==b.i&&p.next.i!==b.i&&intersects(p,p.next,a,b))return true;p=p.next}while(p!==a);return false}function locallyInside(a,b){return area(a.prev,a,a.next)<0?area(a,b,a.next)>=0&&area(a,a.prev,b)>=0:area(a,b,a.prev)<0||area(a,a.next,b)<0}function middleInside(a,b){let p=a,inside=false;const px=(a.x+b.x)/2,py=(a.y+b.y)/2;do{if(p.y>py!==p.next.y>py&&p.next.y!==p.y&&px<(p.next.x-p.x)*(py-p.y)/(p.next.y-p.y)+p.x)inside=!inside;p=p.next}while(p!==a);return inside}function splitPolygon(a,b){const a2=new Node(a.i,a.x,a.y),b2=new Node(b.i,b.x,b.y),an=a.next,bp=b.prev;a.next=b;b.prev=a;a2.next=an;an.prev=a2;b2.next=a2;a2.prev=b2;bp.next=b2;b2.prev=bp;return b2}function insertNode(i,x,y,last){const p=new Node(i,x,y);if(!last){p.prev=p;p.next=p}else{p.next=last.next;p.prev=last;last.next.prev=p;last.next=p}return p}function removeNode(p){p.next.prev=p.prev;p.prev.next=p.next;if(p.prevZ)p.prevZ.nextZ=p.nextZ;if(p.nextZ)p.nextZ.prevZ=p.prevZ}function Node(i,x,y){this.i=i;this.x=x;this.y=y;this.prev=null;this.next=null;this.z=0;this.prevZ=null;this.nextZ=null;this.steiner=false}function signedArea(data,start,end,dim){let sum=0;for(let i=start,j=end-dim;i<end;i+=dim){sum+=(data[j]-data[i])*(data[i+1]+data[j+1]);j=i}return sum}class ShapeUtils{static area(contour){const n=contour.length;let a=0;for(let p=n-1,q=0;q<n;p=q++){a+=contour[p].x*contour[q].y-contour[q].x*contour[p].y}return a*0.5}static isClockWise(pts){return ShapeUtils.area(pts)<0}static triangulateShape(contour,holes){const vertices=[];const holeIndices=[];const faces=[];removeDupEndPts(contour);addContour(vertices,contour);let holeIndex=contour.length;holes.forEach(removeDupEndPts);for(let i=0;i<holes.length;i++){holeIndices.push(holeIndex);holeIndex+=holes[i].length;addContour(vertices,holes[i])}const triangles=Earcut.triangulate(vertices,holeIndices);for(let i=0;i<triangles.length;i+=3){faces.push(triangles.slice(i,i+3))}return faces}}function removeDupEndPts(points){const l=points.length;if(l>2&&points[l-1].equals(points[0])){points.pop()}}function addContour(vertices,contour){for(let i=0;i<contour.length;i++){vertices.push(contour[i].x);vertices.push(contour[i].y)}}class ExtrudeGeometry extends BufferGeometry{constructor(shapes=new Shape([new Vector2(0.5,0.5),new Vector2(-0.5,0.5),new Vector2(-0.5,-0.5),new Vector2(0.5,-0.5)]),options={}){super();this.type="ExtrudeGeometry";this.parameters={shapes:shapes,options:options};shapes=Array.isArray(shapes)?shapes:[shapes];const scope=this;const verticesArray=[];const uvArray=[];for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];addShape(shape)}this.setAttribute("position",new Float32BufferAttribute(verticesArray,3));this.setAttribute("uv",new Float32BufferAttribute(uvArray,2));this.computeVertexNormals();function addShape(shape){const placeholder=[];const curveSegments=options.curveSegments!==undefined?options.curveSegments:12;const steps=options.steps!==undefined?options.steps:1;const depth=options.depth!==undefined?options.depth:1;let bevelEnabled=options.bevelEnabled!==undefined?options.bevelEnabled:true;let bevelThickness=options.bevelThickness!==undefined?options.bevelThickness:0.2;let bevelSize=options.bevelSize!==undefined?options.bevelSize:bevelThickness-0.1;let bevelOffset=options.bevelOffset!==undefined?options.bevelOffset:0;let bevelSegments=options.bevelSegments!==undefined?options.bevelSegments:3;const extrudePath=options.extrudePath;const uvgen=options.UVGenerator!==undefined?options.UVGenerator:WorldUVGenerator;let extrudePts,extrudeByPath=false;let splineTube,binormal,normal,position2;if(extrudePath){extrudePts=extrudePath.getSpacedPoints(steps);extrudeByPath=true;bevelEnabled=false;splineTube=extrudePath.computeFrenetFrames(steps,false);binormal=new Vector3;normal=new Vector3;position2=new Vector3}if(!bevelEnabled){bevelSegments=0;bevelThickness=0;bevelSize=0;bevelOffset=0}const shapePoints=shape.extractPoints(curveSegments);let vertices=shapePoints.shape;const holes=shapePoints.holes;const reverse=!ShapeUtils.isClockWise(vertices);if(reverse){vertices=vertices.reverse();for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];if(ShapeUtils.isClockWise(ahole)){holes[h]=ahole.reverse()}}}const faces=ShapeUtils.triangulateShape(vertices,holes);const contour=vertices;for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];vertices=vertices.concat(ahole)}function scalePt2(pt,vec,size){if(!vec)console.error("THREE.ExtrudeGeometry: vec does not exist");return pt.clone().addScaledVector(vec,size)}const vlen=vertices.length,flen=faces.length;function getBevelVec(inPt,inPrev,inNext){let v_trans_x,v_trans_y,shrink_by;const v_prev_x=inPt.x-inPrev.x,v_prev_y=inPt.y-inPrev.y;const v_next_x=inNext.x-inPt.x,v_next_y=inNext.y-inPt.y;const v_prev_lensq=v_prev_x*v_prev_x+v_prev_y*v_prev_y;const collinear0=v_prev_x*v_next_y-v_prev_y*v_next_x;if(Math.abs(collinear0)>Number.EPSILON){const v_prev_len=Math.sqrt(v_prev_lensq);const v_next_len=Math.sqrt(v_next_x*v_next_x+v_next_y*v_next_y);const ptPrevShift_x=inPrev.x-v_prev_y/v_prev_len;const ptPrevShift_y=inPrev.y+v_prev_x/v_prev_len;const ptNextShift_x=inNext.x-v_next_y/v_next_len;const ptNextShift_y=inNext.y+v_next_x/v_next_len;const sf=((ptNextShift_x-ptPrevShift_x)*v_next_y-(ptNextShift_y-ptPrevShift_y)*v_next_x)/(v_prev_x*v_next_y-v_prev_y*v_next_x);v_trans_x=ptPrevShift_x+v_prev_x*sf-inPt.x;v_trans_y=ptPrevShift_y+v_prev_y*sf-inPt.y;const v_trans_lensq=v_trans_x*v_trans_x+v_trans_y*v_trans_y;if(v_trans_lensq<=2){return new Vector2(v_trans_x,v_trans_y)}else{shrink_by=Math.sqrt(v_trans_lensq/2)}}else{let direction_eq=false;if(v_prev_x>Number.EPSILON){if(v_next_x>Number.EPSILON){direction_eq=true}}else{if(v_prev_x<-Number.EPSILON){if(v_next_x<-Number.EPSILON){direction_eq=true}}else{if(Math.sign(v_prev_y)===Math.sign(v_next_y)){direction_eq=true}}}if(direction_eq){v_trans_x=-v_prev_y;v_trans_y=v_prev_x;shrink_by=Math.sqrt(v_prev_lensq)}else{v_trans_x=v_prev_x;v_trans_y=v_prev_y;shrink_by=Math.sqrt(v_prev_lensq/2)}}return new Vector2(v_trans_x/shrink_by,v_trans_y/shrink_by)}const contourMovements=[];for(let i=0,il=contour.length,j=il-1,k=i+1;i<il;i++,j++,k++){if(j===il)j=0;if(k===il)k=0;contourMovements[i]=getBevelVec(contour[i],contour[j],contour[k])}const holesMovements=[];let oneHoleMovements,verticesMovements=contourMovements.concat();for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];oneHoleMovements=[];for(let i=0,il=ahole.length,j=il-1,k=i+1;i<il;i++,j++,k++){if(j===il)j=0;if(k===il)k=0;oneHoleMovements[i]=getBevelVec(ahole[i],ahole[j],ahole[k])}holesMovements.push(oneHoleMovements);verticesMovements=verticesMovements.concat(oneHoleMovements)}for(let b=0;b<bevelSegments;b++){const t=b/bevelSegments;const z=bevelThickness*Math.cos(t*Math.PI/2);const bs=bevelSize*Math.sin(t*Math.PI/2)+bevelOffset;for(let i=0,il=contour.length;i<il;i++){const vert=scalePt2(contour[i],contourMovements[i],bs);v(vert.x,vert.y,-z)}for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];oneHoleMovements=holesMovements[h];for(let i=0,il=ahole.length;i<il;i++){const vert=scalePt2(ahole[i],oneHoleMovements[i],bs);v(vert.x,vert.y,-z)}}}const bs=bevelSize+bevelOffset;for(let i=0;i<vlen;i++){const vert=bevelEnabled?scalePt2(vertices[i],verticesMovements[i],bs):vertices[i];if(!extrudeByPath){v(vert.x,vert.y,0)}else{normal.copy(splineTube.normals[0]).multiplyScalar(vert.x);binormal.copy(splineTube.binormals[0]).multiplyScalar(vert.y);position2.copy(extrudePts[0]).add(normal).add(binormal);v(position2.x,position2.y,position2.z)}}for(let s=1;s<=steps;s++){for(let i=0;i<vlen;i++){const vert=bevelEnabled?scalePt2(vertices[i],verticesMovements[i],bs):vertices[i];if(!extrudeByPath){v(vert.x,vert.y,depth/steps*s)}else{normal.copy(splineTube.normals[s]).multiplyScalar(vert.x);binormal.copy(splineTube.binormals[s]).multiplyScalar(vert.y);position2.copy(extrudePts[s]).add(normal).add(binormal);v(position2.x,position2.y,position2.z)}}}for(let b=bevelSegments-1;b>=0;b--){const t=b/bevelSegments;const z=bevelThickness*Math.cos(t*Math.PI/2);const bs=bevelSize*Math.sin(t*Math.PI/2)+bevelOffset;for(let i=0,il=contour.length;i<il;i++){const vert=scalePt2(contour[i],contourMovements[i],bs);v(vert.x,vert.y,depth+z)}for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];oneHoleMovements=holesMovements[h];for(let i=0,il=ahole.length;i<il;i++){const vert=scalePt2(ahole[i],oneHoleMovements[i],bs);if(!extrudeByPath){v(vert.x,vert.y,depth+z)}else{v(vert.x,vert.y+extrudePts[steps-1].y,extrudePts[steps-1].x+z)}}}}buildLidFaces();buildSideFaces();function buildLidFaces(){const start=verticesArray.length/3;if(bevelEnabled){let layer=0;let offset=vlen*layer;for(let i=0;i<flen;i++){const face=faces[i];f3(face[2]+offset,face[1]+offset,face[0]+offset)}layer=steps+bevelSegments*2;offset=vlen*layer;for(let i=0;i<flen;i++){const face=faces[i];f3(face[0]+offset,face[1]+offset,face[2]+offset)}}else{for(let i=0;i<flen;i++){const face=faces[i];f3(face[2],face[1],face[0])}for(let i=0;i<flen;i++){const face=faces[i];f3(face[0]+vlen*steps,face[1]+vlen*steps,face[2]+vlen*steps)}}scope.addGroup(start,verticesArray.length/3-start,0)}function buildSideFaces(){const start=verticesArray.length/3;let layeroffset=0;sidewalls(contour,layeroffset);layeroffset+=contour.length;for(let h=0,hl=holes.length;h<hl;h++){const ahole=holes[h];sidewalls(ahole,layeroffset);layeroffset+=ahole.length}scope.addGroup(start,verticesArray.length/3-start,1)}function sidewalls(contour,layeroffset){let i=contour.length;while(--i>=0){const j=i;let k=i-1;if(k<0)k=contour.length-1;for(let s=0,sl=steps+bevelSegments*2;s<sl;s++){const slen1=vlen*s;const slen2=vlen*(s+1);const a=layeroffset+j+slen1,b=layeroffset+k+slen1,c=layeroffset+k+slen2,d=layeroffset+j+slen2;f4(a,b,c,d)}}}function v(x,y,z){placeholder.push(x);placeholder.push(y);placeholder.push(z)}function f3(a,b,c){addVertex(a);addVertex(b);addVertex(c);const nextIndex=verticesArray.length/3;const uvs=uvgen.generateTopUV(scope,verticesArray,nextIndex-3,nextIndex-2,nextIndex-1);addUV(uvs[0]);addUV(uvs[1]);addUV(uvs[2])}function f4(a,b,c,d){addVertex(a);addVertex(b);addVertex(d);addVertex(b);addVertex(c);addVertex(d);const nextIndex=verticesArray.length/3;const uvs=uvgen.generateSideWallUV(scope,verticesArray,nextIndex-6,nextIndex-3,nextIndex-2,nextIndex-1);addUV(uvs[0]);addUV(uvs[1]);addUV(uvs[3]);addUV(uvs[1]);addUV(uvs[2]);addUV(uvs[3])}function addVertex(index){verticesArray.push(placeholder[index*3+0]);verticesArray.push(placeholder[index*3+1]);verticesArray.push(placeholder[index*3+2])}function addUV(vector2){uvArray.push(vector2.x);uvArray.push(vector2.y)}}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}toJSON(){const data=super.toJSON();const shapes=this.parameters.shapes;const options=this.parameters.options;return toJSON$1(shapes,options,data)}static fromJSON(data,shapes){const geometryShapes=[];for(let j=0,jl=data.shapes.length;j<jl;j++){const shape=shapes[data.shapes[j]];geometryShapes.push(shape)}const extrudePath=data.options.extrudePath;if(extrudePath!==undefined){data.options.extrudePath=new Curves[extrudePath.type]().fromJSON(extrudePath)}return new ExtrudeGeometry(geometryShapes,data.options)}}const WorldUVGenerator={generateTopUV:function(geometry,vertices,indexA,indexB,indexC){const a_x=vertices[indexA*3];const a_y=vertices[indexA*3+1];const b_x=vertices[indexB*3];const b_y=vertices[indexB*3+1];const c_x=vertices[indexC*3];const c_y=vertices[indexC*3+1];return[new Vector2(a_x,a_y),new Vector2(b_x,b_y),new Vector2(c_x,c_y)]},generateSideWallUV:function(geometry,vertices,indexA,indexB,indexC,indexD){const a_x=vertices[indexA*3];const a_y=vertices[indexA*3+1];const a_z=vertices[indexA*3+2];const b_x=vertices[indexB*3];const b_y=vertices[indexB*3+1];const b_z=vertices[indexB*3+2];const c_x=vertices[indexC*3];const c_y=vertices[indexC*3+1];const c_z=vertices[indexC*3+2];const d_x=vertices[indexD*3];const d_y=vertices[indexD*3+1];const d_z=vertices[indexD*3+2];if(Math.abs(a_y-b_y)<Math.abs(a_x-b_x)){return[new Vector2(a_x,1-a_z),new Vector2(b_x,1-b_z),new Vector2(c_x,1-c_z),new Vector2(d_x,1-d_z)]}else{return[new Vector2(a_y,1-a_z),new Vector2(b_y,1-b_z),new Vector2(c_y,1-c_z),new Vector2(d_y,1-d_z)]}}};function toJSON$1(shapes,options,data){data.shapes=[];if(Array.isArray(shapes)){for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];data.shapes.push(shape.uuid)}}else{data.shapes.push(shapes.uuid)}data.options=Object.assign({},options);if(options.extrudePath!==undefined)data.options.extrudePath=options.extrudePath.toJSON();return data}class IcosahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const t=(1+Math.sqrt(5))/2;const vertices=[-1,t,0,1,t,0,-1,-t,0,1,-t,0,0,-1,t,0,1,t,0,-1,-t,0,1,-t,t,0,-1,t,0,1,-t,0,-1,-t,0,1];const indices=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(vertices,indices,radius,detail);this.type="IcosahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new IcosahedronGeometry(data.radius,data.detail)}}class OctahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const vertices=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1];const indices=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(vertices,indices,radius,detail);this.type="OctahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new OctahedronGeometry(data.radius,data.detail)}}class RingGeometry extends BufferGeometry{constructor(innerRadius=0.5,outerRadius=1,thetaSegments=32,phiSegments=1,thetaStart=0,thetaLength=Math.PI*2){super();this.type="RingGeometry";this.parameters={innerRadius:innerRadius,outerRadius:outerRadius,thetaSegments:thetaSegments,phiSegments:phiSegments,thetaStart:thetaStart,thetaLength:thetaLength};thetaSegments=Math.max(3,thetaSegments);phiSegments=Math.max(1,phiSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];let radius=innerRadius;const radiusStep=(outerRadius-innerRadius)/phiSegments;const vertex=new Vector3;const uv=new Vector2;for(let j=0;j<=phiSegments;j++){for(let i=0;i<=thetaSegments;i++){const segment=thetaStart+i/thetaSegments*thetaLength;vertex.x=radius*Math.cos(segment);vertex.y=radius*Math.sin(segment);vertices.push(vertex.x,vertex.y,vertex.z);normals.push(0,0,1);uv.x=(vertex.x/outerRadius+1)/2;uv.y=(vertex.y/outerRadius+1)/2;uvs.push(uv.x,uv.y)}radius+=radiusStep}for(let j=0;j<phiSegments;j++){const thetaSegmentLevel=j*(thetaSegments+1);for(let i=0;i<thetaSegments;i++){const segment=i+thetaSegmentLevel;const a=segment;const b=segment+thetaSegments+1;const c=segment+thetaSegments+2;const d=segment+1;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new RingGeometry(data.innerRadius,data.outerRadius,data.thetaSegments,data.phiSegments,data.thetaStart,data.thetaLength)}}class ShapeGeometry extends BufferGeometry{constructor(shapes=new Shape([new Vector2(0,0.5),new Vector2(-0.5,-0.5),new Vector2(0.5,-0.5)]),curveSegments=12){super();this.type="ShapeGeometry";this.parameters={shapes:shapes,curveSegments:curveSegments};const indices=[];const vertices=[];const normals=[];const uvs=[];let groupStart=0;let groupCount=0;if(Array.isArray(shapes)===false){addShape(shapes)}else{for(let i=0;i<shapes.length;i++){addShape(shapes[i]);this.addGroup(groupStart,groupCount,i);groupStart+=groupCount;groupCount=0}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function addShape(shape){const indexOffset=vertices.length/3;const points=shape.extractPoints(curveSegments);let shapeVertices=points.shape;const shapeHoles=points.holes;if(ShapeUtils.isClockWise(shapeVertices)===false){shapeVertices=shapeVertices.reverse()}for(let i=0,l=shapeHoles.length;i<l;i++){const shapeHole=shapeHoles[i];if(ShapeUtils.isClockWise(shapeHole)===true){shapeHoles[i]=shapeHole.reverse()}}const faces=ShapeUtils.triangulateShape(shapeVertices,shapeHoles);for(let i=0,l=shapeHoles.length;i<l;i++){const shapeHole=shapeHoles[i];shapeVertices=shapeVertices.concat(shapeHole)}for(let i=0,l=shapeVertices.length;i<l;i++){const vertex=shapeVertices[i];vertices.push(vertex.x,vertex.y,0);normals.push(0,0,1);uvs.push(vertex.x,vertex.y)}for(let i=0,l=faces.length;i<l;i++){const face=faces[i];const a=face[0]+indexOffset;const b=face[1]+indexOffset;const c=face[2]+indexOffset;indices.push(a,b,c);groupCount+=3}}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}toJSON(){const data=super.toJSON();const shapes=this.parameters.shapes;return toJSON(shapes,data)}static fromJSON(data,shapes){const geometryShapes=[];for(let j=0,jl=data.shapes.length;j<jl;j++){const shape=shapes[data.shapes[j]];geometryShapes.push(shape)}return new ShapeGeometry(geometryShapes,data.curveSegments)}}function toJSON(shapes,data){data.shapes=[];if(Array.isArray(shapes)){for(let i=0,l=shapes.length;i<l;i++){const shape=shapes[i];data.shapes.push(shape.uuid)}}else{data.shapes.push(shapes.uuid)}return data}class SphereGeometry extends BufferGeometry{constructor(radius=1,widthSegments=32,heightSegments=16,phiStart=0,phiLength=Math.PI*2,thetaStart=0,thetaLength=Math.PI){super();this.type="SphereGeometry";this.parameters={radius:radius,widthSegments:widthSegments,heightSegments:heightSegments,phiStart:phiStart,phiLength:phiLength,thetaStart:thetaStart,thetaLength:thetaLength};widthSegments=Math.max(3,Math.floor(widthSegments));heightSegments=Math.max(2,Math.floor(heightSegments));const thetaEnd=Math.min(thetaStart+thetaLength,Math.PI);let index=0;const grid=[];const vertex=new Vector3;const normal=new Vector3;const indices=[];const vertices=[];const normals=[];const uvs=[];for(let iy=0;iy<=heightSegments;iy++){const verticesRow=[];const v=iy/heightSegments;let uOffset=0;if(iy===0&&thetaStart===0){uOffset=0.5/widthSegments}else if(iy===heightSegments&&thetaEnd===Math.PI){uOffset=-0.5/widthSegments}for(let ix=0;ix<=widthSegments;ix++){const u=ix/widthSegments;vertex.x=-radius*Math.cos(phiStart+u*phiLength)*Math.sin(thetaStart+v*thetaLength);vertex.y=radius*Math.cos(thetaStart+v*thetaLength);vertex.z=radius*Math.sin(phiStart+u*phiLength)*Math.sin(thetaStart+v*thetaLength);vertices.push(vertex.x,vertex.y,vertex.z);normal.copy(vertex).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(u+uOffset,1-v);verticesRow.push(index++)}grid.push(verticesRow)}for(let iy=0;iy<heightSegments;iy++){for(let ix=0;ix<widthSegments;ix++){const a=grid[iy][ix+1];const b=grid[iy][ix];const c=grid[iy+1][ix];const d=grid[iy+1][ix+1];if(iy!==0||thetaStart>0)indices.push(a,b,d);if(iy!==heightSegments-1||thetaEnd<Math.PI)indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new SphereGeometry(data.radius,data.widthSegments,data.heightSegments,data.phiStart,data.phiLength,data.thetaStart,data.thetaLength)}}class TetrahedronGeometry extends PolyhedronGeometry{constructor(radius=1,detail=0){const vertices=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1];const indices=[2,1,0,0,3,2,1,3,0,2,3,1];super(vertices,indices,radius,detail);this.type="TetrahedronGeometry";this.parameters={radius:radius,detail:detail}}static fromJSON(data){return new TetrahedronGeometry(data.radius,data.detail)}}class TorusGeometry extends BufferGeometry{constructor(radius=1,tube=0.4,radialSegments=12,tubularSegments=48,arc=Math.PI*2){super();this.type="TorusGeometry";this.parameters={radius:radius,tube:tube,radialSegments:radialSegments,tubularSegments:tubularSegments,arc:arc};radialSegments=Math.floor(radialSegments);tubularSegments=Math.floor(tubularSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];const center=new Vector3;const vertex=new Vector3;const normal=new Vector3;for(let j=0;j<=radialSegments;j++){for(let i=0;i<=tubularSegments;i++){const u=i/tubularSegments*arc;const v=j/radialSegments*Math.PI*2;vertex.x=(radius+tube*Math.cos(v))*Math.cos(u);vertex.y=(radius+tube*Math.cos(v))*Math.sin(u);vertex.z=tube*Math.sin(v);vertices.push(vertex.x,vertex.y,vertex.z);center.x=radius*Math.cos(u);center.y=radius*Math.sin(u);normal.subVectors(vertex,center).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(i/tubularSegments);uvs.push(j/radialSegments)}}for(let j=1;j<=radialSegments;j++){for(let i=1;i<=tubularSegments;i++){const a=(tubularSegments+1)*j+i-1;const b=(tubularSegments+1)*(j-1)+i-1;const c=(tubularSegments+1)*(j-1)+i;const d=(tubularSegments+1)*j+i;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2))}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new TorusGeometry(data.radius,data.tube,data.radialSegments,data.tubularSegments,data.arc)}}class TorusKnotGeometry extends BufferGeometry{constructor(radius=1,tube=0.4,tubularSegments=64,radialSegments=8,p=2,q=3){super();this.type="TorusKnotGeometry";this.parameters={radius:radius,tube:tube,tubularSegments:tubularSegments,radialSegments:radialSegments,p:p,q:q};tubularSegments=Math.floor(tubularSegments);radialSegments=Math.floor(radialSegments);const indices=[];const vertices=[];const normals=[];const uvs=[];const vertex=new Vector3;const normal=new Vector3;const P1=new Vector3;const P2=new Vector3;const B=new Vector3;const T=new Vector3;const N=new Vector3;for(let i=0;i<=tubularSegments;++i){const u=i/tubularSegments*p*Math.PI*2;calculatePositionOnCurve(u,p,q,radius,P1);calculatePositionOnCurve(u+0.01,p,q,radius,P2);T.subVectors(P2,P1);N.addVectors(P2,P1);B.crossVectors(T,N);N.crossVectors(B,T);B.normalize();N.normalize();for(let j=0;j<=radialSegments;++j){const v=j/radialSegments*Math.PI*2;const cx=-tube*Math.cos(v);const cy=tube*Math.sin(v);vertex.x=P1.x+(cx*N.x+cy*B.x);vertex.y=P1.y+(cx*N.y+cy*B.y);vertex.z=P1.z+(cx*N.z+cy*B.z);vertices.push(vertex.x,vertex.y,vertex.z);normal.subVectors(vertex,P1).normalize();normals.push(normal.x,normal.y,normal.z);uvs.push(i/tubularSegments);uvs.push(j/radialSegments)}}for(let j=1;j<=tubularSegments;j++){for(let i=1;i<=radialSegments;i++){const a=(radialSegments+1)*(j-1)+(i-1);const b=(radialSegments+1)*j+(i-1);const c=(radialSegments+1)*j+i;const d=(radialSegments+1)*(j-1)+i;indices.push(a,b,d);indices.push(b,c,d)}}this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function calculatePositionOnCurve(u,p,q,radius,position){const cu=Math.cos(u);const su=Math.sin(u);const quOverP=q/p*u;const cs=Math.cos(quOverP);position.x=radius*(2+cs)*0.5*cu;position.y=radius*(2+cs)*su*0.5;position.z=radius*Math.sin(quOverP)*0.5}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}static fromJSON(data){return new TorusKnotGeometry(data.radius,data.tube,data.tubularSegments,data.radialSegments,data.p,data.q)}}class TubeGeometry extends BufferGeometry{constructor(path=new QuadraticBezierCurve3(new Vector3(-1,-1,0),new Vector3(-1,1,0),new Vector3(1,1,0)),tubularSegments=64,radius=1,radialSegments=8,closed=false){super();this.type="TubeGeometry";this.parameters={path:path,tubularSegments:tubularSegments,radius:radius,radialSegments:radialSegments,closed:closed};const frames=path.computeFrenetFrames(tubularSegments,closed);this.tangents=frames.tangents;this.normals=frames.normals;this.binormals=frames.binormals;const vertex=new Vector3;const normal=new Vector3;const uv=new Vector2;let P=new Vector3;const vertices=[];const normals=[];const uvs=[];const indices=[];generateBufferData();this.setIndex(indices);this.setAttribute("position",new Float32BufferAttribute(vertices,3));this.setAttribute("normal",new Float32BufferAttribute(normals,3));this.setAttribute("uv",new Float32BufferAttribute(uvs,2));function generateBufferData(){for(let i=0;i<tubularSegments;i++){generateSegment(i)}generateSegment(closed===false?tubularSegments:0);generateUVs();generateIndices()}function generateSegment(i){P=path.getPointAt(i/tubularSegments,P);const N=frames.normals[i];const B=frames.binormals[i];for(let j=0;j<=radialSegments;j++){const v=j/radialSegments*Math.PI*2;const sin=Math.sin(v);const cos=-Math.cos(v);normal.x=cos*N.x+sin*B.x;normal.y=cos*N.y+sin*B.y;normal.z=cos*N.z+sin*B.z;normal.normalize();normals.push(normal.x,normal.y,normal.z);vertex.x=P.x+radius*normal.x;vertex.y=P.y+radius*normal.y;vertex.z=P.z+radius*normal.z;vertices.push(vertex.x,vertex.y,vertex.z)}}function generateIndices(){for(let j=1;j<=tubularSegments;j++){for(let i=1;i<=radialSegments;i++){const a=(radialSegments+1)*(j-1)+(i-1);const b=(radialSegments+1)*j+(i-1);const c=(radialSegments+1)*j+i;const d=(radialSegments+1)*(j-1)+i;indices.push(a,b,d);indices.push(b,c,d)}}}function generateUVs(){for(let i=0;i<=tubularSegments;i++){for(let j=0;j<=radialSegments;j++){uv.x=i/tubularSegments;uv.y=j/radialSegments;uvs.push(uv.x,uv.y)}}}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}toJSON(){const data=super.toJSON();data.path=this.parameters.path.toJSON();return data}static fromJSON(data){return new TubeGeometry(new Curves[data.path.type]().fromJSON(data.path),data.tubularSegments,data.radius,data.radialSegments,data.closed)}}class WireframeGeometry extends BufferGeometry{constructor(geometry=null){super();this.type="WireframeGeometry";this.parameters={geometry:geometry};if(geometry!==null){const vertices=[];const edges=new Set;const start=new Vector3;const end=new Vector3;if(geometry.index!==null){const position=geometry.attributes.position;const indices=geometry.index;let groups=geometry.groups;if(groups.length===0){groups=[{start:0,count:indices.count,materialIndex:0}]}for(let o=0,ol=groups.length;o<ol;++o){const group=groups[o];const groupStart=group.start;const groupCount=group.count;for(let i=groupStart,l=groupStart+groupCount;i<l;i+=3){for(let j=0;j<3;j++){const index1=indices.getX(i+j);const index2=indices.getX(i+(j+1)%3);start.fromBufferAttribute(position,index1);end.fromBufferAttribute(position,index2);if(isUniqueEdge(start,end,edges)===true){vertices.push(start.x,start.y,start.z);vertices.push(end.x,end.y,end.z)}}}}}else{const position=geometry.attributes.position;for(let i=0,l=position.count/3;i<l;i++){for(let j=0;j<3;j++){const index1=3*i+j;const index2=3*i+(j+1)%3;start.fromBufferAttribute(position,index1);end.fromBufferAttribute(position,index2);if(isUniqueEdge(start,end,edges)===true){vertices.push(start.x,start.y,start.z);vertices.push(end.x,end.y,end.z)}}}}this.setAttribute("position",new Float32BufferAttribute(vertices,3))}}copy(source){super.copy(source);this.parameters=Object.assign({},source.parameters);return this}}function isUniqueEdge(start,end,edges){const hash1=`${start.x},${start.y},${start.z}-${end.x},${end.y},${end.z}`;const hash2=`${end.x},${end.y},${end.z}-${start.x},${start.y},${start.z}`;if(edges.has(hash1)===true||edges.has(hash2)===true){return false}else{edges.add(hash1);edges.add(hash2);return true}}var Geometries=Object.freeze({__proto__:null,BoxGeometry:BoxGeometry,CapsuleGeometry:CapsuleGeometry,CircleGeometry:CircleGeometry,ConeGeometry:ConeGeometry,CylinderGeometry:CylinderGeometry,DodecahedronGeometry:DodecahedronGeometry,EdgesGeometry:EdgesGeometry,ExtrudeGeometry:ExtrudeGeometry,IcosahedronGeometry:IcosahedronGeometry,LatheGeometry:LatheGeometry,OctahedronGeometry:OctahedronGeometry,PlaneGeometry:PlaneGeometry,PolyhedronGeometry:PolyhedronGeometry,RingGeometry:RingGeometry,ShapeGeometry:ShapeGeometry,SphereGeometry:SphereGeometry,TetrahedronGeometry:TetrahedronGeometry,TorusGeometry:TorusGeometry,TorusKnotGeometry:TorusKnotGeometry,TubeGeometry:TubeGeometry,WireframeGeometry:WireframeGeometry});class ShadowMaterial extends Material{constructor(parameters){super();this.isShadowMaterial=true;this.type="ShadowMaterial";this.color=new Color(0);this.transparent=true;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.fog=source.fog;return this}}class RawShaderMaterial extends ShaderMaterial{constructor(parameters){super(parameters);this.isRawShaderMaterial=true;this.type="RawShaderMaterial"}}class MeshStandardMaterial extends Material{constructor(parameters){super();this.isMeshStandardMaterial=true;this.defines={"STANDARD":""};this.type="MeshStandardMaterial";this.color=new Color(16777215);this.roughness=1;this.metalness=0;this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.roughnessMap=null;this.metalnessMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.envMapIntensity=1;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.defines={"STANDARD":""};this.color.copy(source.color);this.roughness=source.roughness;this.metalness=source.metalness;this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.roughnessMap=source.roughnessMap;this.metalnessMap=source.metalnessMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.envMapIntensity=source.envMapIntensity;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class MeshPhysicalMaterial extends MeshStandardMaterial{constructor(parameters){super();this.isMeshPhysicalMaterial=true;this.defines={"STANDARD":"","PHYSICAL":""};this.type="MeshPhysicalMaterial";this.anisotropyRotation=0;this.anisotropyMap=null;this.clearcoatMap=null;this.clearcoatRoughness=0;this.clearcoatRoughnessMap=null;this.clearcoatNormalScale=new Vector2(1,1);this.clearcoatNormalMap=null;this.ior=1.5;Object.defineProperty(this,"reflectivity",{get:function(){return clamp(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(reflectivity){this.ior=(1+0.4*reflectivity)/(1-0.4*reflectivity)}});this.iridescenceMap=null;this.iridescenceIOR=1.3;this.iridescenceThicknessRange=[100,400];this.iridescenceThicknessMap=null;this.sheenColor=new Color(0);this.sheenColorMap=null;this.sheenRoughness=1;this.sheenRoughnessMap=null;this.transmissionMap=null;this.thickness=0;this.thicknessMap=null;this.attenuationDistance=Infinity;this.attenuationColor=new Color(1,1,1);this.specularIntensity=1;this.specularIntensityMap=null;this.specularColor=new Color(1,1,1);this.specularColorMap=null;this._anisotropy=0;this._clearcoat=0;this._dispersion=0;this._iridescence=0;this._sheen=0;this._transmission=0;this.setValues(parameters)}get anisotropy(){return this._anisotropy}set anisotropy(value){if(this._anisotropy>0!==value>0){this.version++}this._anisotropy=value}get clearcoat(){return this._clearcoat}set clearcoat(value){if(this._clearcoat>0!==value>0){this.version++}this._clearcoat=value}get iridescence(){return this._iridescence}set iridescence(value){if(this._iridescence>0!==value>0){this.version++}this._iridescence=value}get dispersion(){return this._dispersion}set dispersion(value){if(this._dispersion>0!==value>0){this.version++}this._dispersion=value}get sheen(){return this._sheen}set sheen(value){if(this._sheen>0!==value>0){this.version++}this._sheen=value}get transmission(){return this._transmission}set transmission(value){if(this._transmission>0!==value>0){this.version++}this._transmission=value}copy(source){super.copy(source);this.defines={"STANDARD":"","PHYSICAL":""};this.anisotropy=source.anisotropy;this.anisotropyRotation=source.anisotropyRotation;this.anisotropyMap=source.anisotropyMap;this.clearcoat=source.clearcoat;this.clearcoatMap=source.clearcoatMap;this.clearcoatRoughness=source.clearcoatRoughness;this.clearcoatRoughnessMap=source.clearcoatRoughnessMap;this.clearcoatNormalMap=source.clearcoatNormalMap;this.clearcoatNormalScale.copy(source.clearcoatNormalScale);this.dispersion=source.dispersion;this.ior=source.ior;this.iridescence=source.iridescence;this.iridescenceMap=source.iridescenceMap;this.iridescenceIOR=source.iridescenceIOR;this.iridescenceThicknessRange=[...source.iridescenceThicknessRange];this.iridescenceThicknessMap=source.iridescenceThicknessMap;this.sheen=source.sheen;this.sheenColor.copy(source.sheenColor);this.sheenColorMap=source.sheenColorMap;this.sheenRoughness=source.sheenRoughness;this.sheenRoughnessMap=source.sheenRoughnessMap;this.transmission=source.transmission;this.transmissionMap=source.transmissionMap;this.thickness=source.thickness;this.thicknessMap=source.thicknessMap;this.attenuationDistance=source.attenuationDistance;this.attenuationColor.copy(source.attenuationColor);this.specularIntensity=source.specularIntensity;this.specularIntensityMap=source.specularIntensityMap;this.specularColor.copy(source.specularColor);this.specularColorMap=source.specularColorMap;return this}}class MeshPhongMaterial extends Material{constructor(parameters){super();this.isMeshPhongMaterial=true;this.type="MeshPhongMaterial";this.color=new Color(16777215);this.specular=new Color(1118481);this.shininess=30;this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.specularMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.combine=MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.specular.copy(source.specular);this.shininess=source.shininess;this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.specularMap=source.specularMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.combine=source.combine;this.reflectivity=source.reflectivity;this.refractionRatio=source.refractionRatio;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class MeshToonMaterial extends Material{constructor(parameters){super();this.isMeshToonMaterial=true;this.defines={"TOON":""};this.type="MeshToonMaterial";this.color=new Color(16777215);this.map=null;this.gradientMap=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.gradientMap=source.gradientMap;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.alphaMap=source.alphaMap;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.fog=source.fog;return this}}class MeshNormalMaterial extends Material{constructor(parameters){super();this.isMeshNormalMaterial=true;this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=false;this.wireframeLinewidth=1;this.flatShading=false;this.setValues(parameters)}copy(source){super.copy(source);this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.flatShading=source.flatShading;return this}}class MeshLambertMaterial extends Material{constructor(parameters){super();this.isMeshLambertMaterial=true;this.type="MeshLambertMaterial";this.color=new Color(16777215);this.map=null;this.lightMap=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new Color(0);this.emissiveIntensity=1;this.emissiveMap=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.specularMap=null;this.alphaMap=null;this.envMap=null;this.envMapRotation=new Euler;this.combine=MultiplyOperation;this.reflectivity=1;this.refractionRatio=0.98;this.wireframe=false;this.wireframeLinewidth=1;this.wireframeLinecap="round";this.wireframeLinejoin="round";this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.color.copy(source.color);this.map=source.map;this.lightMap=source.lightMap;this.lightMapIntensity=source.lightMapIntensity;this.aoMap=source.aoMap;this.aoMapIntensity=source.aoMapIntensity;this.emissive.copy(source.emissive);this.emissiveMap=source.emissiveMap;this.emissiveIntensity=source.emissiveIntensity;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.specularMap=source.specularMap;this.alphaMap=source.alphaMap;this.envMap=source.envMap;this.envMapRotation.copy(source.envMapRotation);this.combine=source.combine;this.reflectivity=source.reflectivity;this.refractionRatio=source.refractionRatio;this.wireframe=source.wireframe;this.wireframeLinewidth=source.wireframeLinewidth;this.wireframeLinecap=source.wireframeLinecap;this.wireframeLinejoin=source.wireframeLinejoin;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class MeshMatcapMaterial extends Material{constructor(parameters){super();this.isMeshMatcapMaterial=true;this.defines={"MATCAP":""};this.type="MeshMatcapMaterial";this.color=new Color(16777215);this.matcap=null;this.map=null;this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=TangentSpaceNormalMap;this.normalScale=new Vector2(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.flatShading=false;this.fog=true;this.setValues(parameters)}copy(source){super.copy(source);this.defines={"MATCAP":""};this.color.copy(source.color);this.matcap=source.matcap;this.map=source.map;this.bumpMap=source.bumpMap;this.bumpScale=source.bumpScale;this.normalMap=source.normalMap;this.normalMapType=source.normalMapType;this.normalScale.copy(source.normalScale);this.displacementMap=source.displacementMap;this.displacementScale=source.displacementScale;this.displacementBias=source.displacementBias;this.alphaMap=source.alphaMap;this.flatShading=source.flatShading;this.fog=source.fog;return this}}class LineDashedMaterial extends LineBasicMaterial{constructor(parameters){super();this.isLineDashedMaterial=true;this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(parameters)}copy(source){super.copy(source);this.scale=source.scale;this.dashSize=source.dashSize;this.gapSize=source.gapSize;return this}}function convertArray(array,type,forceClone){if(!array||!forceClone&&array.constructor===type)return array;if(typeof type.BYTES_PER_ELEMENT==="number"){return new type(array)}return Array.prototype.slice.call(array)}function isTypedArray(object){return ArrayBuffer.isView(object)&&!(object instanceof DataView)}function getKeyframeOrder(times){function compareTime(i,j){return times[i]-times[j]}const n=times.length;const result=new Array(n);for(let i=0;i!==n;++i)result[i]=i;result.sort(compareTime);return result}function sortedArray(values,stride,order){const nValues=values.length;const result=new values.constructor(nValues);for(let i=0,dstOffset=0;dstOffset!==nValues;++i){const srcOffset=order[i]*stride;for(let j=0;j!==stride;++j){result[dstOffset++]=values[srcOffset+j]}}return result}function flattenJSON(jsonKeys,times,values,valuePropertyName){let i=1,key=jsonKeys[0];while(key!==undefined&&key[valuePropertyName]===undefined){key=jsonKeys[i++]}if(key===undefined)return;let value=key[valuePropertyName];if(value===undefined)return;if(Array.isArray(value)){do{value=key[valuePropertyName];if(value!==undefined){times.push(key.time);values.push.apply(values,value)}key=jsonKeys[i++]}while(key!==undefined)}else if(value.toArray!==undefined){do{value=key[valuePropertyName];if(value!==undefined){times.push(key.time);value.toArray(values,values.length)}key=jsonKeys[i++]}while(key!==undefined)}else{do{value=key[valuePropertyName];if(value!==undefined){times.push(key.time);values.push(value)}key=jsonKeys[i++]}while(key!==undefined)}}function subclip(sourceClip,name,startFrame,endFrame,fps=30){const clip=sourceClip.clone();clip.name=name;const tracks=[];for(let i=0;i<clip.tracks.length;++i){const track=clip.tracks[i];const valueSize=track.getValueSize();const times=[];const values=[];for(let j=0;j<track.times.length;++j){const frame=track.times[j]*fps;if(frame<startFrame||frame>=endFrame)continue;times.push(track.times[j]);for(let k=0;k<valueSize;++k){values.push(track.values[j*valueSize+k])}}if(times.length===0)continue;track.times=convertArray(times,track.times.constructor);track.values=convertArray(values,track.values.constructor);tracks.push(track)}clip.tracks=tracks;let minStartTime=Infinity;for(let i=0;i<clip.tracks.length;++i){if(minStartTime>clip.tracks[i].times[0]){minStartTime=clip.tracks[i].times[0]}}for(let i=0;i<clip.tracks.length;++i){clip.tracks[i].shift(-1*minStartTime)}clip.resetDuration();return clip}function makeClipAdditive(targetClip,referenceFrame=0,referenceClip=targetClip,fps=30){if(fps<=0)fps=30;const numTracks=referenceClip.tracks.length;const referenceTime=referenceFrame/fps;for(let i=0;i<numTracks;++i){const referenceTrack=referenceClip.tracks[i];const referenceTrackType=referenceTrack.ValueTypeName;if(referenceTrackType==="bool"||referenceTrackType==="string")continue;const targetTrack=targetClip.tracks.find(function(track){return track.name===referenceTrack.name&&track.ValueTypeName===referenceTrackType});if(targetTrack===undefined)continue;let referenceOffset=0;const referenceValueSize=referenceTrack.getValueSize();if(referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline){referenceOffset=referenceValueSize/3}let targetOffset=0;const targetValueSize=targetTrack.getValueSize();if(targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline){targetOffset=targetValueSize/3}const lastIndex=referenceTrack.times.length-1;let referenceValue;if(referenceTime<=referenceTrack.times[0]){const startIndex=referenceOffset;const endIndex=referenceValueSize-referenceOffset;referenceValue=referenceTrack.values.slice(startIndex,endIndex)}else if(referenceTime>=referenceTrack.times[lastIndex]){const startIndex=lastIndex*referenceValueSize+referenceOffset;const endIndex=startIndex+referenceValueSize-referenceOffset;referenceValue=referenceTrack.values.slice(startIndex,endIndex)}else{const interpolant=referenceTrack.createInterpolant();const startIndex=referenceOffset;const endIndex=referenceValueSize-referenceOffset;interpolant.evaluate(referenceTime);referenceValue=interpolant.resultBuffer.slice(startIndex,endIndex)}if(referenceTrackType==="quaternion"){const referenceQuat=new Quaternion().fromArray(referenceValue).normalize().conjugate();referenceQuat.toArray(referenceValue)}const numTimes=targetTrack.times.length;for(let j=0;j<numTimes;++j){const valueStart=j*targetValueSize+targetOffset;if(referenceTrackType==="quaternion"){Quaternion.multiplyQuaternionsFlat(targetTrack.values,valueStart,referenceValue,0,targetTrack.values,valueStart)}else{const valueEnd=targetValueSize-targetOffset*2;for(let k=0;k<valueEnd;++k){targetTrack.values[valueStart+k]-=referenceValue[k]}}}}targetClip.blendMode=AdditiveAnimationBlendMode;return targetClip}const AnimationUtils={convertArray:convertArray,isTypedArray:isTypedArray,getKeyframeOrder:getKeyframeOrder,sortedArray:sortedArray,flattenJSON:flattenJSON,subclip:subclip,makeClipAdditive:makeClipAdditive};class Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){this.parameterPositions=parameterPositions;this._cachedIndex=0;this.resultBuffer=resultBuffer!==undefined?resultBuffer:new sampleValues.constructor(sampleSize);this.sampleValues=sampleValues;this.valueSize=sampleSize;this.settings=null;this.DefaultSettings_={}}evaluate(t){const pp=this.parameterPositions;let i1=this._cachedIndex,t1=pp[i1],t0=pp[i1-1];validate_interval:{seek:{let right;linear_scan:{forward_scan:if(!(t<t1)){for(let giveUpAt=i1+2;;){if(t1===undefined){if(t<t0)break forward_scan;i1=pp.length;this._cachedIndex=i1;return this.copySampleValue_(i1-1)}if(i1===giveUpAt)break;t0=t1;t1=pp[++i1];if(t<t1){break seek}}right=pp.length;break linear_scan}if(!(t>=t0)){const t1global=pp[1];if(t<t1global){i1=2;t0=t1global}for(let giveUpAt=i1-2;;){if(t0===undefined){this._cachedIndex=0;return this.copySampleValue_(0)}if(i1===giveUpAt)break;t1=t0;t0=pp[--i1-1];if(t>=t0){break seek}}right=i1;i1=0;break linear_scan}break validate_interval}while(i1<right){const mid=i1+right>>>1;if(t<pp[mid]){right=mid}else{i1=mid+1}}t1=pp[i1];t0=pp[i1-1];if(t0===undefined){this._cachedIndex=0;return this.copySampleValue_(0)}if(t1===undefined){i1=pp.length;this._cachedIndex=i1;return this.copySampleValue_(i1-1)}}this._cachedIndex=i1;this.intervalChanged_(i1,t0,t1)}return this.interpolate_(i1,t0,t,t1)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(index){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,offset=index*stride;for(let i=0;i!==stride;++i){result[i]=values[offset+i]}return result}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class CubicInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer);this._weightPrev=-0;this._offsetPrev=-0;this._weightNext=-0;this._offsetNext=-0;this.DefaultSettings_={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding}}intervalChanged_(i1,t0,t1){const pp=this.parameterPositions;let iPrev=i1-2,iNext=i1+1,tPrev=pp[iPrev],tNext=pp[iNext];if(tPrev===undefined){switch(this.getSettings_().endingStart){case ZeroSlopeEnding:iPrev=i1;tPrev=2*t0-t1;break;case WrapAroundEnding:iPrev=pp.length-2;tPrev=t0+pp[iPrev]-pp[iPrev+1];break;default:iPrev=i1;tPrev=t1;}}if(tNext===undefined){switch(this.getSettings_().endingEnd){case ZeroSlopeEnding:iNext=i1;tNext=2*t1-t0;break;case WrapAroundEnding:iNext=1;tNext=t1+pp[1]-pp[0];break;default:iNext=i1-1;tNext=t0;}}const halfDt=(t1-t0)*0.5,stride=this.valueSize;this._weightPrev=halfDt/(t0-tPrev);this._weightNext=halfDt/(tNext-t1);this._offsetPrev=iPrev*stride;this._offsetNext=iNext*stride}interpolate_(i1,t0,t,t1){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,o1=i1*stride,o0=o1-stride,oP=this._offsetPrev,oN=this._offsetNext,wP=this._weightPrev,wN=this._weightNext,p=(t-t0)/(t1-t0),pp=p*p,ppp=pp*p;const sP=-wP*ppp+2*wP*pp-wP*p;const s0=(1+wP)*ppp+(-1.5-2*wP)*pp+(-0.5+wP)*p+1;const s1=(-1-wN)*ppp+(1.5+wN)*pp+0.5*p;const sN=wN*ppp-wN*pp;for(let i=0;i!==stride;++i){result[i]=sP*values[oP+i]+s0*values[o0+i]+s1*values[o1+i]+sN*values[oN+i]}return result}}class LinearInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}interpolate_(i1,t0,t,t1){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,offset1=i1*stride,offset0=offset1-stride,weight1=(t-t0)/(t1-t0),weight0=1-weight1;for(let i=0;i!==stride;++i){result[i]=values[offset0+i]*weight0+values[offset1+i]*weight1}return result}}class DiscreteInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}interpolate_(i1){return this.copySampleValue_(i1-1)}}class KeyframeTrack{constructor(name,times,values,interpolation){if(name===undefined)throw new Error("THREE.KeyframeTrack: track name is undefined");if(times===undefined||times.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+name);this.name=name;this.times=convertArray(times,this.TimeBufferType);this.values=convertArray(values,this.ValueBufferType);this.setInterpolation(interpolation||this.DefaultInterpolation)}static toJSON(track){const trackType=track.constructor;let json;if(trackType.toJSON!==this.toJSON){json=trackType.toJSON(track)}else{json={"name":track.name,"times":convertArray(track.times,Array),"values":convertArray(track.values,Array)};const interpolation=track.getInterpolation();if(interpolation!==track.DefaultInterpolation){json.interpolation=interpolation}}json.type=track.ValueTypeName;return json}InterpolantFactoryMethodDiscrete(result){return new DiscreteInterpolant(this.times,this.values,this.getValueSize(),result)}InterpolantFactoryMethodLinear(result){return new LinearInterpolant(this.times,this.values,this.getValueSize(),result)}InterpolantFactoryMethodSmooth(result){return new CubicInterpolant(this.times,this.values,this.getValueSize(),result)}setInterpolation(interpolation){let factoryMethod;switch(interpolation){case InterpolateDiscrete:factoryMethod=this.InterpolantFactoryMethodDiscrete;break;case InterpolateLinear:factoryMethod=this.InterpolantFactoryMethodLinear;break;case InterpolateSmooth:factoryMethod=this.InterpolantFactoryMethodSmooth;break;}if(factoryMethod===undefined){const message="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===undefined){if(interpolation!==this.DefaultInterpolation){this.setInterpolation(this.DefaultInterpolation)}else{throw new Error(message)}}console.warn("THREE.KeyframeTrack:",message);return this}this.createInterpolant=factoryMethod;return this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return InterpolateDiscrete;case this.InterpolantFactoryMethodLinear:return InterpolateLinear;case this.InterpolantFactoryMethodSmooth:return InterpolateSmooth;}}getValueSize(){return this.values.length/this.times.length}shift(timeOffset){if(timeOffset!==0){const times=this.times;for(let i=0,n=times.length;i!==n;++i){times[i]+=timeOffset}}return this}scale(timeScale){if(timeScale!==1){const times=this.times;for(let i=0,n=times.length;i!==n;++i){times[i]*=timeScale}}return this}trim(startTime,endTime){const times=this.times,nKeys=times.length;let from=0,to=nKeys-1;while(from!==nKeys&&times[from]<startTime){++from}while(to!==-1&&times[to]>endTime){--to}++to;if(from!==0||to!==nKeys){if(from>=to){to=Math.max(to,1);from=to-1}const stride=this.getValueSize();this.times=times.slice(from,to);this.values=this.values.slice(from*stride,to*stride)}return this}validate(){let valid=true;const valueSize=this.getValueSize();if(valueSize-Math.floor(valueSize)!==0){console.error("THREE.KeyframeTrack: Invalid value size in track.",this);valid=false}const times=this.times,values=this.values,nKeys=times.length;if(nKeys===0){console.error("THREE.KeyframeTrack: Track is empty.",this);valid=false}let prevTime=null;for(let i=0;i!==nKeys;i++){const currTime=times[i];if(typeof currTime==="number"&&isNaN(currTime)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,i,currTime);valid=false;break}if(prevTime!==null&&prevTime>currTime){console.error("THREE.KeyframeTrack: Out of order keys.",this,i,currTime,prevTime);valid=false;break}prevTime=currTime}if(values!==undefined){if(isTypedArray(values)){for(let i=0,n=values.length;i!==n;++i){const value=values[i];if(isNaN(value)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,i,value);valid=false;break}}}}return valid}optimize(){const times=this.times.slice(),values=this.values.slice(),stride=this.getValueSize(),smoothInterpolation=this.getInterpolation()===InterpolateSmooth,lastIndex=times.length-1;let writeIndex=1;for(let i=1;i<lastIndex;++i){let keep=false;const time=times[i];const timeNext=times[i+1];if(time!==timeNext&&(i!==1||time!==times[0])){if(!smoothInterpolation){const offset=i*stride,offsetP=offset-stride,offsetN=offset+stride;for(let j=0;j!==stride;++j){const value=values[offset+j];if(value!==values[offsetP+j]||value!==values[offsetN+j]){keep=true;break}}}else{keep=true}}if(keep){if(i!==writeIndex){times[writeIndex]=times[i];const readOffset=i*stride,writeOffset=writeIndex*stride;for(let j=0;j!==stride;++j){values[writeOffset+j]=values[readOffset+j]}}++writeIndex}}if(lastIndex>0){times[writeIndex]=times[lastIndex];for(let readOffset=lastIndex*stride,writeOffset=writeIndex*stride,j=0;j!==stride;++j){values[writeOffset+j]=values[readOffset+j]}++writeIndex}if(writeIndex!==times.length){this.times=times.slice(0,writeIndex);this.values=values.slice(0,writeIndex*stride)}else{this.times=times;this.values=values}return this}clone(){const times=this.times.slice();const values=this.values.slice();const TypedKeyframeTrack=this.constructor;const track=new TypedKeyframeTrack(this.name,times,values);track.createInterpolant=this.createInterpolant;return track}}KeyframeTrack.prototype.TimeBufferType=Float32Array;KeyframeTrack.prototype.ValueBufferType=Float32Array;KeyframeTrack.prototype.DefaultInterpolation=InterpolateLinear;class BooleanKeyframeTrack extends KeyframeTrack{constructor(name,times,values){super(name,times,values)}}BooleanKeyframeTrack.prototype.ValueTypeName="bool";BooleanKeyframeTrack.prototype.ValueBufferType=Array;BooleanKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete;BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear=undefined;BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=undefined;class ColorKeyframeTrack extends KeyframeTrack{}ColorKeyframeTrack.prototype.ValueTypeName="color";class NumberKeyframeTrack extends KeyframeTrack{}NumberKeyframeTrack.prototype.ValueTypeName="number";class QuaternionLinearInterpolant extends Interpolant{constructor(parameterPositions,sampleValues,sampleSize,resultBuffer){super(parameterPositions,sampleValues,sampleSize,resultBuffer)}interpolate_(i1,t0,t,t1){const result=this.resultBuffer,values=this.sampleValues,stride=this.valueSize,alpha=(t-t0)/(t1-t0);let offset=i1*stride;for(let end=offset+stride;offset!==end;offset+=4){Quaternion.slerpFlat(result,0,values,offset-stride,values,offset,alpha)}return result}}class QuaternionKeyframeTrack extends KeyframeTrack{InterpolantFactoryMethodLinear(result){return new QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),result)}}QuaternionKeyframeTrack.prototype.ValueTypeName="quaternion";QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=undefined;class StringKeyframeTrack extends KeyframeTrack{constructor(name,times,values){super(name,times,values)}}StringKeyframeTrack.prototype.ValueTypeName="string";StringKeyframeTrack.prototype.ValueBufferType=Array;StringKeyframeTrack.prototype.DefaultInterpolation=InterpolateDiscrete;StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear=undefined;StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth=undefined;class VectorKeyframeTrack extends KeyframeTrack{}VectorKeyframeTrack.prototype.ValueTypeName="vector";class AnimationClip{constructor(name="",duration=-1,tracks=[],blendMode=NormalAnimationBlendMode){this.name=name;this.tracks=tracks;this.duration=duration;this.blendMode=blendMode;this.uuid=generateUUID();if(this.duration<0){this.resetDuration()}}static parse(json){const tracks=[],jsonTracks=json.tracks,frameTime=1/(json.fps||1);for(let i=0,n=jsonTracks.length;i!==n;++i){tracks.push(parseKeyframeTrack(jsonTracks[i]).scale(frameTime))}const clip=new this(json.name,json.duration,tracks,json.blendMode);clip.uuid=json.uuid;return clip}static toJSON(clip){const tracks=[],clipTracks=clip.tracks;const json={"name":clip.name,"duration":clip.duration,"tracks":tracks,"uuid":clip.uuid,"blendMode":clip.blendMode};for(let i=0,n=clipTracks.length;i!==n;++i){tracks.push(KeyframeTrack.toJSON(clipTracks[i]))}return json}static CreateFromMorphTargetSequence(name,morphTargetSequence,fps,noLoop){const numMorphTargets=morphTargetSequence.length;const tracks=[];for(let i=0;i<numMorphTargets;i++){let times=[];let values=[];times.push((i+numMorphTargets-1)%numMorphTargets,i,(i+1)%numMorphTargets);values.push(0,1,0);const order=getKeyframeOrder(times);times=sortedArray(times,1,order);values=sortedArray(values,1,order);if(!noLoop&&times[0]===0){times.push(numMorphTargets);values.push(values[0])}tracks.push(new NumberKeyframeTrack(".morphTargetInfluences["+morphTargetSequence[i].name+"]",times,values).scale(1/fps))}return new this(name,-1,tracks)}static findByName(objectOrClipArray,name){let clipArray=objectOrClipArray;if(!Array.isArray(objectOrClipArray)){const o=objectOrClipArray;clipArray=o.geometry&&o.geometry.animations||o.animations}for(let i=0;i<clipArray.length;i++){if(clipArray[i].name===name){return clipArray[i]}}return null}static CreateClipsFromMorphTargetSequences(morphTargets,fps,noLoop){const animationToMorphTargets={};const pattern=/^([\w-]*?)([\d]+)$/;for(let i=0,il=morphTargets.length;i<il;i++){const morphTarget=morphTargets[i];const parts=morphTarget.name.match(pattern);if(parts&&parts.length>1){const name=parts[1];let animationMorphTargets=animationToMorphTargets[name];if(!animationMorphTargets){animationToMorphTargets[name]=animationMorphTargets=[]}animationMorphTargets.push(morphTarget)}}const clips=[];for(const name in animationToMorphTargets){clips.push(this.CreateFromMorphTargetSequence(name,animationToMorphTargets[name],fps,noLoop))}return clips}static parseAnimation(animation,bones){if(!animation){console.error("THREE.AnimationClip: No animation in JSONLoader data.");return null}const addNonemptyTrack=function(trackType,trackName,animationKeys,propertyName,destTracks){if(animationKeys.length!==0){const times=[];const values=[];flattenJSON(animationKeys,times,values,propertyName);if(times.length!==0){destTracks.push(new trackType(trackName,times,values))}}};const tracks=[];const clipName=animation.name||"default";const fps=animation.fps||30;const blendMode=animation.blendMode;let duration=animation.length||-1;const hierarchyTracks=animation.hierarchy||[];for(let h=0;h<hierarchyTracks.length;h++){const animationKeys=hierarchyTracks[h].keys;if(!animationKeys||animationKeys.length===0)continue;if(animationKeys[0].morphTargets){const morphTargetNames={};let k;for(k=0;k<animationKeys.length;k++){if(animationKeys[k].morphTargets){for(let m=0;m<animationKeys[k].morphTargets.length;m++){morphTargetNames[animationKeys[k].morphTargets[m]]=-1}}}for(const morphTargetName in morphTargetNames){const times=[];const values=[];for(let m=0;m!==animationKeys[k].morphTargets.length;++m){const animationKey=animationKeys[k];times.push(animationKey.time);values.push(animationKey.morphTarget===morphTargetName?1:0)}tracks.push(new NumberKeyframeTrack(".morphTargetInfluence["+morphTargetName+"]",times,values))}duration=morphTargetNames.length*fps}else{const boneName=".bones["+bones[h].name+"]";addNonemptyTrack(VectorKeyframeTrack,boneName+".position",animationKeys,"pos",tracks);addNonemptyTrack(QuaternionKeyframeTrack,boneName+".quaternion",animationKeys,"rot",tracks);addNonemptyTrack(VectorKeyframeTrack,boneName+".scale",animationKeys,"scl",tracks)}}if(tracks.length===0){return null}const clip=new this(clipName,duration,tracks,blendMode);return clip}resetDuration(){const tracks=this.tracks;let duration=0;for(let i=0,n=tracks.length;i!==n;++i){const track=this.tracks[i];duration=Math.max(duration,track.times[track.times.length-1])}this.duration=duration;return this}trim(){for(let i=0;i<this.tracks.length;i++){this.tracks[i].trim(0,this.duration)}return this}validate(){let valid=true;for(let i=0;i<this.tracks.length;i++){valid=valid&&this.tracks[i].validate()}return valid}optimize(){for(let i=0;i<this.tracks.length;i++){this.tracks[i].optimize()}return this}clone(){const tracks=[];for(let i=0;i<this.tracks.length;i++){tracks.push(this.tracks[i].clone())}return new this.constructor(this.name,this.duration,tracks,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function getTrackTypeForValueTypeName(typeName){switch(typeName.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return NumberKeyframeTrack;case"vector":case"vector2":case"vector3":case"vector4":return VectorKeyframeTrack;case"color":return ColorKeyframeTrack;case"quaternion":return QuaternionKeyframeTrack;case"bool":case"boolean":return BooleanKeyframeTrack;case"string":return StringKeyframeTrack;}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+typeName)}function parseKeyframeTrack(json){if(json.type===undefined){throw new Error("THREE.KeyframeTrack: track type undefined, can not parse")}const trackType=getTrackTypeForValueTypeName(json.type);if(json.times===undefined){const times=[],values=[];flattenJSON(json.keys,times,values,"value");json.times=times;json.values=values}if(trackType.parse!==undefined){return trackType.parse(json)}else{return new trackType(json.name,json.times,json.values,json.interpolation)}}const Cache={enabled:false,files:{},add:function(key,file){if(this.enabled===false)return;this.files[key]=file},get:function(key){if(this.enabled===false)return;return this.files[key]},remove:function(key){delete this.files[key]},clear:function(){this.files={}}};class LoadingManager{constructor(onLoad,onProgress,onError){const scope=this;let isLoading=false;let itemsLoaded=0;let itemsTotal=0;let urlModifier=undefined;const handlers=[];this.onStart=undefined;this.onLoad=onLoad;this.onProgress=onProgress;this.onError=onError;this.itemStart=function(url){itemsTotal++;if(isLoading===false){if(scope.onStart!==undefined){scope.onStart(url,itemsLoaded,itemsTotal)}}isLoading=true};this.itemEnd=function(url){itemsLoaded++;if(scope.onProgress!==undefined){scope.onProgress(url,itemsLoaded,itemsTotal)}if(itemsLoaded===itemsTotal){isLoading=false;if(scope.onLoad!==undefined){scope.onLoad()}}};this.itemError=function(url){if(scope.onError!==undefined){scope.onError(url)}};this.resolveURL=function(url){if(urlModifier){return urlModifier(url)}return url};this.setURLModifier=function(transform){urlModifier=transform;return this};this.addHandler=function(regex,loader){handlers.push(regex,loader);return this};this.removeHandler=function(regex){const index=handlers.indexOf(regex);if(index!==-1){handlers.splice(index,2)}return this};this.getHandler=function(file){for(let i=0,l=handlers.length;i<l;i+=2){const regex=handlers[i];const loader=handlers[i+1];if(regex.global)regex.lastIndex=0;if(regex.test(file)){return loader}}return null}}}const DefaultLoadingManager=new LoadingManager;class Loader{constructor(manager){this.manager=manager!==undefined?manager:DefaultLoadingManager;this.crossOrigin="anonymous";this.withCredentials=false;this.path="";this.resourcePath="";this.requestHeader={}}load(){}loadAsync(url,onProgress){const scope=this;return new Promise(function(resolve,reject){scope.load(url,resolve,onProgress,reject)})}parse(){}setCrossOrigin(crossOrigin){this.crossOrigin=crossOrigin;return this}setWithCredentials(value){this.withCredentials=value;return this}setPath(path){this.path=path;return this}setResourcePath(resourcePath){this.resourcePath=resourcePath;return this}setRequestHeader(requestHeader){this.requestHeader=requestHeader;return this}}Loader.DEFAULT_MATERIAL_NAME="__DEFAULT";const loading={};class HttpError extends Error{constructor(message,response){super(message);this.response=response}}class FileLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){if(url===undefined)url="";if(this.path!==undefined)url=this.path+url;url=this.manager.resolveURL(url);const cached=Cache.get(url);if(cached!==undefined){this.manager.itemStart(url);setTimeout(()=>{if(onLoad)onLoad(cached);this.manager.itemEnd(url)},0);return cached}if(loading[url]!==undefined){loading[url].push({onLoad:onLoad,onProgress:onProgress,onError:onError});return}loading[url]=[];loading[url].push({onLoad:onLoad,onProgress:onProgress,onError:onError});const req=new Request(url,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"});const mimeType=this.mimeType;const responseType=this.responseType;fetch(req).then(response=>{if(response.status===200||response.status===0){if(response.status===0){console.warn("THREE.FileLoader: HTTP Status 0 received.")}if(typeof ReadableStream==="undefined"||response.body===undefined||response.body.getReader===undefined){return response}const callbacks=loading[url];const reader=response.body.getReader();const contentLength=response.headers.get("X-File-Size")||response.headers.get("Content-Length");const total=contentLength?parseInt(contentLength):0;const lengthComputable=total!==0;let loaded=0;const stream=new ReadableStream({start(controller){readData();function readData(){reader.read().then(({done,value})=>{if(done){controller.close()}else{loaded+=value.byteLength;const event=new ProgressEvent("progress",{lengthComputable,loaded,total});for(let i=0,il=callbacks.length;i<il;i++){const callback=callbacks[i];if(callback.onProgress)callback.onProgress(event)}controller.enqueue(value);readData()}},e=>{controller.error(e)})}}});return new Response(stream)}else{throw new HttpError(`fetch for "${response.url}" responded with ${response.status}: ${response.statusText}`,response)}}).then(response=>{switch(responseType){case"arraybuffer":return response.arrayBuffer();case"blob":return response.blob();case"document":return response.text().then(text=>{const parser=new DOMParser;return parser.parseFromString(text,mimeType)});case"json":return response.json();default:if(mimeType===undefined){return response.text()}else{const re=/charset="?([^;"\s]*)"?/i;const exec=re.exec(mimeType);const label=exec&&exec[1]?exec[1].toLowerCase():undefined;const decoder=new TextDecoder(label);return response.arrayBuffer().then(ab=>decoder.decode(ab))}}}).then(data=>{Cache.add(url,data);const callbacks=loading[url];delete loading[url];for(let i=0,il=callbacks.length;i<il;i++){const callback=callbacks[i];if(callback.onLoad)callback.onLoad(data)}}).catch(err=>{const callbacks=loading[url];if(callbacks===undefined){this.manager.itemError(url);throw err}delete loading[url];for(let i=0,il=callbacks.length;i<il;i++){const callback=callbacks[i];if(callback.onError)callback.onError(err)}this.manager.itemError(url)}).finally(()=>{this.manager.itemEnd(url)});this.manager.itemStart(url)}setResponseType(value){this.responseType=value;return this}setMimeType(value){this.mimeType=value;return this}}class AnimationLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,function(text){try{onLoad(scope.parse(JSON.parse(text)))}catch(e){if(onError){onError(e)}else{console.error(e)}scope.manager.itemError(url)}},onProgress,onError)}parse(json){const animations=[];for(let i=0;i<json.length;i++){const clip=AnimationClip.parse(json[i]);animations.push(clip)}return animations}}class CompressedTextureLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const images=[];const texture=new CompressedTexture;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setResponseType("arraybuffer");loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(scope.withCredentials);let loaded=0;function loadTexture(i){loader.load(url[i],function(buffer){const texDatas=scope.parse(buffer,true);images[i]={width:texDatas.width,height:texDatas.height,format:texDatas.format,mipmaps:texDatas.mipmaps};loaded+=1;if(loaded===6){if(texDatas.mipmapCount===1)texture.minFilter=LinearFilter;texture.image=images;texture.format=texDatas.format;texture.needsUpdate=true;if(onLoad)onLoad(texture)}},onProgress,onError)}if(Array.isArray(url)){for(let i=0,il=url.length;i<il;++i){loadTexture(i)}}else{loader.load(url,function(buffer){const texDatas=scope.parse(buffer,true);if(texDatas.isCubemap){const faces=texDatas.mipmaps.length/texDatas.mipmapCount;for(let f=0;f<faces;f++){images[f]={mipmaps:[]};for(let i=0;i<texDatas.mipmapCount;i++){images[f].mipmaps.push(texDatas.mipmaps[f*texDatas.mipmapCount+i]);images[f].format=texDatas.format;images[f].width=texDatas.width;images[f].height=texDatas.height}}texture.image=images}else{texture.image.width=texDatas.width;texture.image.height=texDatas.height;texture.mipmaps=texDatas.mipmaps}if(texDatas.mipmapCount===1){texture.minFilter=LinearFilter}texture.format=texDatas.format;texture.needsUpdate=true;if(onLoad)onLoad(texture)},onProgress,onError)}return texture}}class ImageLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){if(this.path!==undefined)url=this.path+url;url=this.manager.resolveURL(url);const scope=this;const cached=Cache.get(url);if(cached!==undefined){scope.manager.itemStart(url);setTimeout(function(){if(onLoad)onLoad(cached);scope.manager.itemEnd(url)},0);return cached}const image=createElementNS("img");function onImageLoad(){removeEventListeners();Cache.add(url,this);if(onLoad)onLoad(this);scope.manager.itemEnd(url)}function onImageError(event){removeEventListeners();if(onError)onError(event);scope.manager.itemError(url);scope.manager.itemEnd(url)}function removeEventListeners(){image.removeEventListener("load",onImageLoad,false);image.removeEventListener("error",onImageError,false)}image.addEventListener("load",onImageLoad,false);image.addEventListener("error",onImageError,false);if(url.slice(0,5)!=="data:"){if(this.crossOrigin!==undefined)image.crossOrigin=this.crossOrigin}scope.manager.itemStart(url);image.src=url;return image}}class CubeTextureLoader extends Loader{constructor(manager){super(manager)}load(urls,onLoad,onProgress,onError){const texture=new CubeTexture;texture.colorSpace=SRGBColorSpace;const loader=new ImageLoader(this.manager);loader.setCrossOrigin(this.crossOrigin);loader.setPath(this.path);let loaded=0;function loadTexture(i){loader.load(urls[i],function(image){texture.images[i]=image;loaded++;if(loaded===6){texture.needsUpdate=true;if(onLoad)onLoad(texture)}},undefined,onError)}for(let i=0;i<urls.length;++i){loadTexture(i)}return texture}}class DataTextureLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const texture=new DataTexture;const loader=new FileLoader(this.manager);loader.setResponseType("arraybuffer");loader.setRequestHeader(this.requestHeader);loader.setPath(this.path);loader.setWithCredentials(scope.withCredentials);loader.load(url,function(buffer){let texData;try{texData=scope.parse(buffer)}catch(error){if(onError!==undefined){onError(error)}else{console.error(error);return}}if(texData.image!==undefined){texture.image=texData.image}else if(texData.data!==undefined){texture.image.width=texData.width;texture.image.height=texData.height;texture.image.data=texData.data}texture.wrapS=texData.wrapS!==undefined?texData.wrapS:ClampToEdgeWrapping;texture.wrapT=texData.wrapT!==undefined?texData.wrapT:ClampToEdgeWrapping;texture.magFilter=texData.magFilter!==undefined?texData.magFilter:LinearFilter;texture.minFilter=texData.minFilter!==undefined?texData.minFilter:LinearFilter;texture.anisotropy=texData.anisotropy!==undefined?texData.anisotropy:1;if(texData.colorSpace!==undefined){texture.colorSpace=texData.colorSpace}if(texData.flipY!==undefined){texture.flipY=texData.flipY}if(texData.format!==undefined){texture.format=texData.format}if(texData.type!==undefined){texture.type=texData.type}if(texData.mipmaps!==undefined){texture.mipmaps=texData.mipmaps;texture.minFilter=LinearMipmapLinearFilter}if(texData.mipmapCount===1){texture.minFilter=LinearFilter}if(texData.generateMipmaps!==undefined){texture.generateMipmaps=texData.generateMipmaps}texture.needsUpdate=true;if(onLoad)onLoad(texture,texData)},onProgress,onError);return texture}}class TextureLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const texture=new Texture;const loader=new ImageLoader(this.manager);loader.setCrossOrigin(this.crossOrigin);loader.setPath(this.path);loader.load(url,function(image){texture.image=image;texture.needsUpdate=true;if(onLoad!==undefined){onLoad(texture)}},onProgress,onError);return texture}}class Light extends Object3D{constructor(color,intensity=1){super();this.isLight=true;this.type="Light";this.color=new Color(color);this.intensity=intensity}dispose(){}copy(source,recursive){super.copy(source,recursive);this.color.copy(source.color);this.intensity=source.intensity;return this}toJSON(meta){const data=super.toJSON(meta);data.object.color=this.color.getHex();data.object.intensity=this.intensity;if(this.groundColor!==undefined)data.object.groundColor=this.groundColor.getHex();if(this.distance!==undefined)data.object.distance=this.distance;if(this.angle!==undefined)data.object.angle=this.angle;if(this.decay!==undefined)data.object.decay=this.decay;if(this.penumbra!==undefined)data.object.penumbra=this.penumbra;if(this.shadow!==undefined)data.object.shadow=this.shadow.toJSON();if(this.target!==undefined)data.object.target=this.target.uuid;return data}}class HemisphereLight extends Light{constructor(skyColor,groundColor,intensity){super(skyColor,intensity);this.isHemisphereLight=true;this.type="HemisphereLight";this.position.copy(Object3D.DEFAULT_UP);this.updateMatrix();this.groundColor=new Color(groundColor)}copy(source,recursive){super.copy(source,recursive);this.groundColor.copy(source.groundColor);return this}}const _projScreenMatrix$1=new Matrix4;const _lightPositionWorld$1=new Vector3;const _lookTarget$1=new Vector3;class LightShadow{constructor(camera){this.camera=camera;this.intensity=1;this.bias=0;this.normalBias=0;this.radius=1;this.blurSamples=8;this.mapSize=new Vector2(512,512);this.map=null;this.mapPass=null;this.matrix=new Matrix4;this.autoUpdate=true;this.needsUpdate=false;this._frustum=new Frustum;this._frameExtents=new Vector2(1,1);this._viewportCount=1;this._viewports=[new Vector4(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(light){const shadowCamera=this.camera;const shadowMatrix=this.matrix;_lightPositionWorld$1.setFromMatrixPosition(light.matrixWorld);shadowCamera.position.copy(_lightPositionWorld$1);_lookTarget$1.setFromMatrixPosition(light.target.matrixWorld);shadowCamera.lookAt(_lookTarget$1);shadowCamera.updateMatrixWorld();_projScreenMatrix$1.multiplyMatrices(shadowCamera.projectionMatrix,shadowCamera.matrixWorldInverse);this._frustum.setFromProjectionMatrix(_projScreenMatrix$1);shadowMatrix.set(0.5,0,0,0.5,0,0.5,0,0.5,0,0,0.5,0.5,0,0,0,1);shadowMatrix.multiply(_projScreenMatrix$1)}getViewport(viewportIndex){return this._viewports[viewportIndex]}getFrameExtents(){return this._frameExtents}dispose(){if(this.map){this.map.dispose()}if(this.mapPass){this.mapPass.dispose()}}copy(source){this.camera=source.camera.clone();this.intensity=source.intensity;this.bias=source.bias;this.radius=source.radius;this.mapSize.copy(source.mapSize);return this}clone(){return new this.constructor().copy(this)}toJSON(){const object={};if(this.intensity!==1)object.intensity=this.intensity;if(this.bias!==0)object.bias=this.bias;if(this.normalBias!==0)object.normalBias=this.normalBias;if(this.radius!==1)object.radius=this.radius;if(this.mapSize.x!==512||this.mapSize.y!==512)object.mapSize=this.mapSize.toArray();object.camera=this.camera.toJSON(false).object;delete object.camera.matrix;return object}}class SpotLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(50,1,0.5,500));this.isSpotLightShadow=true;this.focus=1}updateMatrices(light){const camera=this.camera;const fov=RAD2DEG*2*light.angle*this.focus;const aspect=this.mapSize.width/this.mapSize.height;const far=light.distance||camera.far;if(fov!==camera.fov||aspect!==camera.aspect||far!==camera.far){camera.fov=fov;camera.aspect=aspect;camera.far=far;camera.updateProjectionMatrix()}super.updateMatrices(light)}copy(source){super.copy(source);this.focus=source.focus;return this}}class SpotLight extends Light{constructor(color,intensity,distance=0,angle=Math.PI/3,penumbra=0,decay=2){super(color,intensity);this.isSpotLight=true;this.type="SpotLight";this.position.copy(Object3D.DEFAULT_UP);this.updateMatrix();this.target=new Object3D;this.distance=distance;this.angle=angle;this.penumbra=penumbra;this.decay=decay;this.map=null;this.shadow=new SpotLightShadow}get power(){return this.intensity*Math.PI}set power(power){this.intensity=power/Math.PI}dispose(){this.shadow.dispose()}copy(source,recursive){super.copy(source,recursive);this.distance=source.distance;this.angle=source.angle;this.penumbra=source.penumbra;this.decay=source.decay;this.target=source.target.clone();this.shadow=source.shadow.clone();return this}}const _projScreenMatrix=new Matrix4;const _lightPositionWorld=new Vector3;const _lookTarget=new Vector3;class PointLightShadow extends LightShadow{constructor(){super(new PerspectiveCamera(90,1,0.5,500));this.isPointLightShadow=true;this._frameExtents=new Vector2(4,2);this._viewportCount=6;this._viewports=[new Vector4(2,1,1,1),new Vector4(0,1,1,1),new Vector4(3,1,1,1),new Vector4(1,1,1,1),new Vector4(3,0,1,1),new Vector4(1,0,1,1)];this._cubeDirections=[new Vector3(1,0,0),new Vector3(-1,0,0),new Vector3(0,0,1),new Vector3(0,0,-1),new Vector3(0,1,0),new Vector3(0,-1,0)];this._cubeUps=[new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,1,0),new Vector3(0,0,1),new Vector3(0,0,-1)]}updateMatrices(light,viewportIndex=0){const camera=this.camera;const shadowMatrix=this.matrix;const far=light.distance||camera.far;if(far!==camera.far){camera.far=far;camera.updateProjectionMatrix()}_lightPositionWorld.setFromMatrixPosition(light.matrixWorld);camera.position.copy(_lightPositionWorld);_lookTarget.copy(camera.position);_lookTarget.add(this._cubeDirections[viewportIndex]);camera.up.copy(this._cubeUps[viewportIndex]);camera.lookAt(_lookTarget);camera.updateMatrixWorld();shadowMatrix.makeTranslation(-_lightPositionWorld.x,-_lightPositionWorld.y,-_lightPositionWorld.z);_projScreenMatrix.multiplyMatrices(camera.projectionMatrix,camera.matrixWorldInverse);this._frustum.setFromProjectionMatrix(_projScreenMatrix)}}class PointLight extends Light{constructor(color,intensity,distance=0,decay=2){super(color,intensity);this.isPointLight=true;this.type="PointLight";this.distance=distance;this.decay=decay;this.shadow=new PointLightShadow}get power(){return this.intensity*4*Math.PI}set power(power){this.intensity=power/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(source,recursive){super.copy(source,recursive);this.distance=source.distance;this.decay=source.decay;this.shadow=source.shadow.clone();return this}}class DirectionalLightShadow extends LightShadow{constructor(){super(new OrthographicCamera(-5,5,5,-5,0.5,500));this.isDirectionalLightShadow=true}}class DirectionalLight extends Light{constructor(color,intensity){super(color,intensity);this.isDirectionalLight=true;this.type="DirectionalLight";this.position.copy(Object3D.DEFAULT_UP);this.updateMatrix();this.target=new Object3D;this.shadow=new DirectionalLightShadow}dispose(){this.shadow.dispose()}copy(source){super.copy(source);this.target=source.target.clone();this.shadow=source.shadow.clone();return this}}class AmbientLight extends Light{constructor(color,intensity){super(color,intensity);this.isAmbientLight=true;this.type="AmbientLight"}}class RectAreaLight extends Light{constructor(color,intensity,width=10,height=10){super(color,intensity);this.isRectAreaLight=true;this.type="RectAreaLight";this.width=width;this.height=height}get power(){return this.intensity*this.width*this.height*Math.PI}set power(power){this.intensity=power/(this.width*this.height*Math.PI)}copy(source){super.copy(source);this.width=source.width;this.height=source.height;return this}toJSON(meta){const data=super.toJSON(meta);data.object.width=this.width;data.object.height=this.height;return data}}class SphericalHarmonics3{constructor(){this.isSphericalHarmonics3=true;this.coefficients=[];for(let i=0;i<9;i++){this.coefficients.push(new Vector3)}}set(coefficients){for(let i=0;i<9;i++){this.coefficients[i].copy(coefficients[i])}return this}zero(){for(let i=0;i<9;i++){this.coefficients[i].set(0,0,0)}return this}getAt(normal,target){const x=normal.x,y=normal.y,z=normal.z;const coeff=this.coefficients;target.copy(coeff[0]).multiplyScalar(0.282095);target.addScaledVector(coeff[1],0.488603*y);target.addScaledVector(coeff[2],0.488603*z);target.addScaledVector(coeff[3],0.488603*x);target.addScaledVector(coeff[4],1.092548*(x*y));target.addScaledVector(coeff[5],1.092548*(y*z));target.addScaledVector(coeff[6],0.315392*(3*z*z-1));target.addScaledVector(coeff[7],1.092548*(x*z));target.addScaledVector(coeff[8],0.546274*(x*x-y*y));return target}getIrradianceAt(normal,target){const x=normal.x,y=normal.y,z=normal.z;const coeff=this.coefficients;target.copy(coeff[0]).multiplyScalar(0.886227);target.addScaledVector(coeff[1],2*0.511664*y);target.addScaledVector(coeff[2],2*0.511664*z);target.addScaledVector(coeff[3],2*0.511664*x);target.addScaledVector(coeff[4],2*0.429043*x*y);target.addScaledVector(coeff[5],2*0.429043*y*z);target.addScaledVector(coeff[6],0.743125*z*z-0.247708);target.addScaledVector(coeff[7],2*0.429043*x*z);target.addScaledVector(coeff[8],0.429043*(x*x-y*y));return target}add(sh){for(let i=0;i<9;i++){this.coefficients[i].add(sh.coefficients[i])}return this}addScaledSH(sh,s){for(let i=0;i<9;i++){this.coefficients[i].addScaledVector(sh.coefficients[i],s)}return this}scale(s){for(let i=0;i<9;i++){this.coefficients[i].multiplyScalar(s)}return this}lerp(sh,alpha){for(let i=0;i<9;i++){this.coefficients[i].lerp(sh.coefficients[i],alpha)}return this}equals(sh){for(let i=0;i<9;i++){if(!this.coefficients[i].equals(sh.coefficients[i])){return false}}return true}copy(sh){return this.set(sh.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(array,offset=0){const coefficients=this.coefficients;for(let i=0;i<9;i++){coefficients[i].fromArray(array,offset+i*3)}return this}toArray(array=[],offset=0){const coefficients=this.coefficients;for(let i=0;i<9;i++){coefficients[i].toArray(array,offset+i*3)}return array}static getBasisAt(normal,shBasis){const x=normal.x,y=normal.y,z=normal.z;shBasis[0]=0.282095;shBasis[1]=0.488603*y;shBasis[2]=0.488603*z;shBasis[3]=0.488603*x;shBasis[4]=1.092548*x*y;shBasis[5]=1.092548*y*z;shBasis[6]=0.315392*(3*z*z-1);shBasis[7]=1.092548*x*z;shBasis[8]=0.546274*(x*x-y*y)}}class LightProbe extends Light{constructor(sh=new SphericalHarmonics3,intensity=1){super(undefined,intensity);this.isLightProbe=true;this.sh=sh}copy(source){super.copy(source);this.sh.copy(source.sh);return this}fromJSON(json){this.intensity=json.intensity;this.sh.fromArray(json.sh);return this}toJSON(meta){const data=super.toJSON(meta);data.object.sh=this.sh.toArray();return data}}class MaterialLoader extends Loader{constructor(manager){super(manager);this.textures={}}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(scope.manager);loader.setPath(scope.path);loader.setRequestHeader(scope.requestHeader);loader.setWithCredentials(scope.withCredentials);loader.load(url,function(text){try{onLoad(scope.parse(JSON.parse(text)))}catch(e){if(onError){onError(e)}else{console.error(e)}scope.manager.itemError(url)}},onProgress,onError)}parse(json){const textures=this.textures;function getTexture(name){if(textures[name]===undefined){console.warn("THREE.MaterialLoader: Undefined texture",name)}return textures[name]}const material=MaterialLoader.createMaterialFromType(json.type);if(json.uuid!==undefined)material.uuid=json.uuid;if(json.name!==undefined)material.name=json.name;if(json.color!==undefined&&material.color!==undefined)material.color.setHex(json.color);if(json.roughness!==undefined)material.roughness=json.roughness;if(json.metalness!==undefined)material.metalness=json.metalness;if(json.sheen!==undefined)material.sheen=json.sheen;if(json.sheenColor!==undefined)material.sheenColor=new Color().setHex(json.sheenColor);if(json.sheenRoughness!==undefined)material.sheenRoughness=json.sheenRoughness;if(json.emissive!==undefined&&material.emissive!==undefined)material.emissive.setHex(json.emissive);if(json.specular!==undefined&&material.specular!==undefined)material.specular.setHex(json.specular);if(json.specularIntensity!==undefined)material.specularIntensity=json.specularIntensity;if(json.specularColor!==undefined&&material.specularColor!==undefined)material.specularColor.setHex(json.specularColor);if(json.shininess!==undefined)material.shininess=json.shininess;if(json.clearcoat!==undefined)material.clearcoat=json.clearcoat;if(json.clearcoatRoughness!==undefined)material.clearcoatRoughness=json.clearcoatRoughness;if(json.dispersion!==undefined)material.dispersion=json.dispersion;if(json.iridescence!==undefined)material.iridescence=json.iridescence;if(json.iridescenceIOR!==undefined)material.iridescenceIOR=json.iridescenceIOR;if(json.iridescenceThicknessRange!==undefined)material.iridescenceThicknessRange=json.iridescenceThicknessRange;if(json.transmission!==undefined)material.transmission=json.transmission;if(json.thickness!==undefined)material.thickness=json.thickness;if(json.attenuationDistance!==undefined)material.attenuationDistance=json.attenuationDistance;if(json.attenuationColor!==undefined&&material.attenuationColor!==undefined)material.attenuationColor.setHex(json.attenuationColor);if(json.anisotropy!==undefined)material.anisotropy=json.anisotropy;if(json.anisotropyRotation!==undefined)material.anisotropyRotation=json.anisotropyRotation;if(json.fog!==undefined)material.fog=json.fog;if(json.flatShading!==undefined)material.flatShading=json.flatShading;if(json.blending!==undefined)material.blending=json.blending;if(json.combine!==undefined)material.combine=json.combine;if(json.side!==undefined)material.side=json.side;if(json.shadowSide!==undefined)material.shadowSide=json.shadowSide;if(json.opacity!==undefined)material.opacity=json.opacity;if(json.transparent!==undefined)material.transparent=json.transparent;if(json.alphaTest!==undefined)material.alphaTest=json.alphaTest;if(json.alphaHash!==undefined)material.alphaHash=json.alphaHash;if(json.depthFunc!==undefined)material.depthFunc=json.depthFunc;if(json.depthTest!==undefined)material.depthTest=json.depthTest;if(json.depthWrite!==undefined)material.depthWrite=json.depthWrite;if(json.colorWrite!==undefined)material.colorWrite=json.colorWrite;if(json.blendSrc!==undefined)material.blendSrc=json.blendSrc;if(json.blendDst!==undefined)material.blendDst=json.blendDst;if(json.blendEquation!==undefined)material.blendEquation=json.blendEquation;if(json.blendSrcAlpha!==undefined)material.blendSrcAlpha=json.blendSrcAlpha;if(json.blendDstAlpha!==undefined)material.blendDstAlpha=json.blendDstAlpha;if(json.blendEquationAlpha!==undefined)material.blendEquationAlpha=json.blendEquationAlpha;if(json.blendColor!==undefined&&material.blendColor!==undefined)material.blendColor.setHex(json.blendColor);if(json.blendAlpha!==undefined)material.blendAlpha=json.blendAlpha;if(json.stencilWriteMask!==undefined)material.stencilWriteMask=json.stencilWriteMask;if(json.stencilFunc!==undefined)material.stencilFunc=json.stencilFunc;if(json.stencilRef!==undefined)material.stencilRef=json.stencilRef;if(json.stencilFuncMask!==undefined)material.stencilFuncMask=json.stencilFuncMask;if(json.stencilFail!==undefined)material.stencilFail=json.stencilFail;if(json.stencilZFail!==undefined)material.stencilZFail=json.stencilZFail;if(json.stencilZPass!==undefined)material.stencilZPass=json.stencilZPass;if(json.stencilWrite!==undefined)material.stencilWrite=json.stencilWrite;if(json.wireframe!==undefined)material.wireframe=json.wireframe;if(json.wireframeLinewidth!==undefined)material.wireframeLinewidth=json.wireframeLinewidth;if(json.wireframeLinecap!==undefined)material.wireframeLinecap=json.wireframeLinecap;if(json.wireframeLinejoin!==undefined)material.wireframeLinejoin=json.wireframeLinejoin;if(json.rotation!==undefined)material.rotation=json.rotation;if(json.linewidth!==undefined)material.linewidth=json.linewidth;if(json.dashSize!==undefined)material.dashSize=json.dashSize;if(json.gapSize!==undefined)material.gapSize=json.gapSize;if(json.scale!==undefined)material.scale=json.scale;if(json.polygonOffset!==undefined)material.polygonOffset=json.polygonOffset;if(json.polygonOffsetFactor!==undefined)material.polygonOffsetFactor=json.polygonOffsetFactor;if(json.polygonOffsetUnits!==undefined)material.polygonOffsetUnits=json.polygonOffsetUnits;if(json.dithering!==undefined)material.dithering=json.dithering;if(json.alphaToCoverage!==undefined)material.alphaToCoverage=json.alphaToCoverage;if(json.premultipliedAlpha!==undefined)material.premultipliedAlpha=json.premultipliedAlpha;if(json.forceSinglePass!==undefined)material.forceSinglePass=json.forceSinglePass;if(json.visible!==undefined)material.visible=json.visible;if(json.toneMapped!==undefined)material.toneMapped=json.toneMapped;if(json.userData!==undefined)material.userData=json.userData;if(json.vertexColors!==undefined){if(typeof json.vertexColors==="number"){material.vertexColors=json.vertexColors>0?true:false}else{material.vertexColors=json.vertexColors}}if(json.uniforms!==undefined){for(const name in json.uniforms){const uniform=json.uniforms[name];material.uniforms[name]={};switch(uniform.type){case"t":material.uniforms[name].value=getTexture(uniform.value);break;case"c":material.uniforms[name].value=new Color().setHex(uniform.value);break;case"v2":material.uniforms[name].value=new Vector2().fromArray(uniform.value);break;case"v3":material.uniforms[name].value=new Vector3().fromArray(uniform.value);break;case"v4":material.uniforms[name].value=new Vector4().fromArray(uniform.value);break;case"m3":material.uniforms[name].value=new Matrix3().fromArray(uniform.value);break;case"m4":material.uniforms[name].value=new Matrix4().fromArray(uniform.value);break;default:material.uniforms[name].value=uniform.value;}}}if(json.defines!==undefined)material.defines=json.defines;if(json.vertexShader!==undefined)material.vertexShader=json.vertexShader;if(json.fragmentShader!==undefined)material.fragmentShader=json.fragmentShader;if(json.glslVersion!==undefined)material.glslVersion=json.glslVersion;if(json.extensions!==undefined){for(const key in json.extensions){material.extensions[key]=json.extensions[key]}}if(json.lights!==undefined)material.lights=json.lights;if(json.clipping!==undefined)material.clipping=json.clipping;if(json.size!==undefined)material.size=json.size;if(json.sizeAttenuation!==undefined)material.sizeAttenuation=json.sizeAttenuation;if(json.map!==undefined)material.map=getTexture(json.map);if(json.matcap!==undefined)material.matcap=getTexture(json.matcap);if(json.alphaMap!==undefined)material.alphaMap=getTexture(json.alphaMap);if(json.bumpMap!==undefined)material.bumpMap=getTexture(json.bumpMap);if(json.bumpScale!==undefined)material.bumpScale=json.bumpScale;if(json.normalMap!==undefined)material.normalMap=getTexture(json.normalMap);if(json.normalMapType!==undefined)material.normalMapType=json.normalMapType;if(json.normalScale!==undefined){let normalScale=json.normalScale;if(Array.isArray(normalScale)===false){normalScale=[normalScale,normalScale]}material.normalScale=new Vector2().fromArray(normalScale)}if(json.displacementMap!==undefined)material.displacementMap=getTexture(json.displacementMap);if(json.displacementScale!==undefined)material.displacementScale=json.displacementScale;if(json.displacementBias!==undefined)material.displacementBias=json.displacementBias;if(json.roughnessMap!==undefined)material.roughnessMap=getTexture(json.roughnessMap);if(json.metalnessMap!==undefined)material.metalnessMap=getTexture(json.metalnessMap);if(json.emissiveMap!==undefined)material.emissiveMap=getTexture(json.emissiveMap);if(json.emissiveIntensity!==undefined)material.emissiveIntensity=json.emissiveIntensity;if(json.specularMap!==undefined)material.specularMap=getTexture(json.specularMap);if(json.specularIntensityMap!==undefined)material.specularIntensityMap=getTexture(json.specularIntensityMap);if(json.specularColorMap!==undefined)material.specularColorMap=getTexture(json.specularColorMap);if(json.envMap!==undefined)material.envMap=getTexture(json.envMap);if(json.envMapRotation!==undefined)material.envMapRotation.fromArray(json.envMapRotation);if(json.envMapIntensity!==undefined)material.envMapIntensity=json.envMapIntensity;if(json.reflectivity!==undefined)material.reflectivity=json.reflectivity;if(json.refractionRatio!==undefined)material.refractionRatio=json.refractionRatio;if(json.lightMap!==undefined)material.lightMap=getTexture(json.lightMap);if(json.lightMapIntensity!==undefined)material.lightMapIntensity=json.lightMapIntensity;if(json.aoMap!==undefined)material.aoMap=getTexture(json.aoMap);if(json.aoMapIntensity!==undefined)material.aoMapIntensity=json.aoMapIntensity;if(json.gradientMap!==undefined)material.gradientMap=getTexture(json.gradientMap);if(json.clearcoatMap!==undefined)material.clearcoatMap=getTexture(json.clearcoatMap);if(json.clearcoatRoughnessMap!==undefined)material.clearcoatRoughnessMap=getTexture(json.clearcoatRoughnessMap);if(json.clearcoatNormalMap!==undefined)material.clearcoatNormalMap=getTexture(json.clearcoatNormalMap);if(json.clearcoatNormalScale!==undefined)material.clearcoatNormalScale=new Vector2().fromArray(json.clearcoatNormalScale);if(json.iridescenceMap!==undefined)material.iridescenceMap=getTexture(json.iridescenceMap);if(json.iridescenceThicknessMap!==undefined)material.iridescenceThicknessMap=getTexture(json.iridescenceThicknessMap);if(json.transmissionMap!==undefined)material.transmissionMap=getTexture(json.transmissionMap);if(json.thicknessMap!==undefined)material.thicknessMap=getTexture(json.thicknessMap);if(json.anisotropyMap!==undefined)material.anisotropyMap=getTexture(json.anisotropyMap);if(json.sheenColorMap!==undefined)material.sheenColorMap=getTexture(json.sheenColorMap);if(json.sheenRoughnessMap!==undefined)material.sheenRoughnessMap=getTexture(json.sheenRoughnessMap);return material}setTextures(value){this.textures=value;return this}static createMaterialFromType(type){const materialLib={ShadowMaterial,SpriteMaterial,RawShaderMaterial,ShaderMaterial,PointsMaterial,MeshPhysicalMaterial,MeshStandardMaterial,MeshPhongMaterial,MeshToonMaterial,MeshNormalMaterial,MeshLambertMaterial,MeshDepthMaterial,MeshDistanceMaterial,MeshBasicMaterial,MeshMatcapMaterial,LineDashedMaterial,LineBasicMaterial,Material};return new materialLib[type]}}class LoaderUtils{static decodeText(array){console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead.");if(typeof TextDecoder!=="undefined"){return new TextDecoder().decode(array)}let s="";for(let i=0,il=array.length;i<il;i++){s+=String.fromCharCode(array[i])}try{return decodeURIComponent(escape(s))}catch(e){return s}}static extractUrlBase(url){const index=url.lastIndexOf("/");if(index===-1)return"./";return url.slice(0,index+1)}static resolveURL(url,path){if(typeof url!=="string"||url==="")return"";if(/^https?:\/\//i.test(path)&&/^\//.test(url)){path=path.replace(/(^https?:\/\/[^\/]+).*/i,"$1")}if(/^(https?:)?\/\//i.test(url))return url;if(/^data:.*,.*$/i.test(url))return url;if(/^blob:.*$/i.test(url))return url;return path+url}}class InstancedBufferGeometry extends BufferGeometry{constructor(){super();this.isInstancedBufferGeometry=true;this.type="InstancedBufferGeometry";this.instanceCount=Infinity}copy(source){super.copy(source);this.instanceCount=source.instanceCount;return this}toJSON(){const data=super.toJSON();data.instanceCount=this.instanceCount;data.isInstancedBufferGeometry=true;return data}}class BufferGeometryLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(scope.manager);loader.setPath(scope.path);loader.setRequestHeader(scope.requestHeader);loader.setWithCredentials(scope.withCredentials);loader.load(url,function(text){try{onLoad(scope.parse(JSON.parse(text)))}catch(e){if(onError){onError(e)}else{console.error(e)}scope.manager.itemError(url)}},onProgress,onError)}parse(json){const interleavedBufferMap={};const arrayBufferMap={};function getInterleavedBuffer(json,uuid){if(interleavedBufferMap[uuid]!==undefined)return interleavedBufferMap[uuid];const interleavedBuffers=json.interleavedBuffers;const interleavedBuffer=interleavedBuffers[uuid];const buffer=getArrayBuffer(json,interleavedBuffer.buffer);const array=getTypedArray(interleavedBuffer.type,buffer);const ib=new InterleavedBuffer(array,interleavedBuffer.stride);ib.uuid=interleavedBuffer.uuid;interleavedBufferMap[uuid]=ib;return ib}function getArrayBuffer(json,uuid){if(arrayBufferMap[uuid]!==undefined)return arrayBufferMap[uuid];const arrayBuffers=json.arrayBuffers;const arrayBuffer=arrayBuffers[uuid];const ab=new Uint32Array(arrayBuffer).buffer;arrayBufferMap[uuid]=ab;return ab}const geometry=json.isInstancedBufferGeometry?new InstancedBufferGeometry:new BufferGeometry;const index=json.data.index;if(index!==undefined){const typedArray=getTypedArray(index.type,index.array);geometry.setIndex(new BufferAttribute(typedArray,1))}const attributes=json.data.attributes;for(const key in attributes){const attribute=attributes[key];let bufferAttribute;if(attribute.isInterleavedBufferAttribute){const interleavedBuffer=getInterleavedBuffer(json.data,attribute.data);bufferAttribute=new InterleavedBufferAttribute(interleavedBuffer,attribute.itemSize,attribute.offset,attribute.normalized)}else{const typedArray=getTypedArray(attribute.type,attribute.array);const bufferAttributeConstr=attribute.isInstancedBufferAttribute?InstancedBufferAttribute:BufferAttribute;bufferAttribute=new bufferAttributeConstr(typedArray,attribute.itemSize,attribute.normalized)}if(attribute.name!==undefined)bufferAttribute.name=attribute.name;if(attribute.usage!==undefined)bufferAttribute.setUsage(attribute.usage);geometry.setAttribute(key,bufferAttribute)}const morphAttributes=json.data.morphAttributes;if(morphAttributes){for(const key in morphAttributes){const attributeArray=morphAttributes[key];const array=[];for(let i=0,il=attributeArray.length;i<il;i++){const attribute=attributeArray[i];let bufferAttribute;if(attribute.isInterleavedBufferAttribute){const interleavedBuffer=getInterleavedBuffer(json.data,attribute.data);bufferAttribute=new InterleavedBufferAttribute(interleavedBuffer,attribute.itemSize,attribute.offset,attribute.normalized)}else{const typedArray=getTypedArray(attribute.type,attribute.array);bufferAttribute=new BufferAttribute(typedArray,attribute.itemSize,attribute.normalized)}if(attribute.name!==undefined)bufferAttribute.name=attribute.name;array.push(bufferAttribute)}geometry.morphAttributes[key]=array}}const morphTargetsRelative=json.data.morphTargetsRelative;if(morphTargetsRelative){geometry.morphTargetsRelative=true}const groups=json.data.groups||json.data.drawcalls||json.data.offsets;if(groups!==undefined){for(let i=0,n=groups.length;i!==n;++i){const group=groups[i];geometry.addGroup(group.start,group.count,group.materialIndex)}}const boundingSphere=json.data.boundingSphere;if(boundingSphere!==undefined){const center=new Vector3;if(boundingSphere.center!==undefined){center.fromArray(boundingSphere.center)}geometry.boundingSphere=new Sphere(center,boundingSphere.radius)}if(json.name)geometry.name=json.name;if(json.userData)geometry.userData=json.userData;return geometry}}class ObjectLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const path=this.path===""?LoaderUtils.extractUrlBase(url):this.path;this.resourcePath=this.resourcePath||path;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,function(text){let json=null;try{json=JSON.parse(text)}catch(error){if(onError!==undefined)onError(error);console.error("THREE:ObjectLoader: Can't parse "+url+".",error.message);return}const metadata=json.metadata;if(metadata===undefined||metadata.type===undefined||metadata.type.toLowerCase()==="geometry"){if(onError!==undefined)onError(new Error("THREE.ObjectLoader: Can't load "+url));console.error("THREE.ObjectLoader: Can't load "+url);return}scope.parse(json,onLoad)},onProgress,onError)}async loadAsync(url,onProgress){const scope=this;const path=this.path===""?LoaderUtils.extractUrlBase(url):this.path;this.resourcePath=this.resourcePath||path;const loader=new FileLoader(this.manager);loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);const text=await loader.loadAsync(url,onProgress);const json=JSON.parse(text);const metadata=json.metadata;if(metadata===undefined||metadata.type===undefined||metadata.type.toLowerCase()==="geometry"){throw new Error("THREE.ObjectLoader: Can't load "+url)}return await scope.parseAsync(json)}parse(json,onLoad){const animations=this.parseAnimations(json.animations);const shapes=this.parseShapes(json.shapes);const geometries=this.parseGeometries(json.geometries,shapes);const images=this.parseImages(json.images,function(){if(onLoad!==undefined)onLoad(object)});const textures=this.parseTextures(json.textures,images);const materials=this.parseMaterials(json.materials,textures);const object=this.parseObject(json.object,geometries,materials,textures,animations);const skeletons=this.parseSkeletons(json.skeletons,object);this.bindSkeletons(object,skeletons);this.bindLightTargets(object);if(onLoad!==undefined){let hasImages=false;for(const uuid in images){if(images[uuid].data instanceof HTMLImageElement){hasImages=true;break}}if(hasImages===false)onLoad(object)}return object}async parseAsync(json){const animations=this.parseAnimations(json.animations);const shapes=this.parseShapes(json.shapes);const geometries=this.parseGeometries(json.geometries,shapes);const images=await this.parseImagesAsync(json.images);const textures=this.parseTextures(json.textures,images);const materials=this.parseMaterials(json.materials,textures);const object=this.parseObject(json.object,geometries,materials,textures,animations);const skeletons=this.parseSkeletons(json.skeletons,object);this.bindSkeletons(object,skeletons);this.bindLightTargets(object);return object}parseShapes(json){const shapes={};if(json!==undefined){for(let i=0,l=json.length;i<l;i++){const shape=new Shape().fromJSON(json[i]);shapes[shape.uuid]=shape}}return shapes}parseSkeletons(json,object){const skeletons={};const bones={};object.traverse(function(child){if(child.isBone)bones[child.uuid]=child});if(json!==undefined){for(let i=0,l=json.length;i<l;i++){const skeleton=new Skeleton().fromJSON(json[i],bones);skeletons[skeleton.uuid]=skeleton}}return skeletons}parseGeometries(json,shapes){const geometries={};if(json!==undefined){const bufferGeometryLoader=new BufferGeometryLoader;for(let i=0,l=json.length;i<l;i++){let geometry;const data=json[i];switch(data.type){case"BufferGeometry":case"InstancedBufferGeometry":geometry=bufferGeometryLoader.parse(data);break;default:if(data.type in Geometries){geometry=Geometries[data.type].fromJSON(data,shapes)}else{console.warn(`THREE.ObjectLoader: Unsupported geometry type "${data.type}"`)}}geometry.uuid=data.uuid;if(data.name!==undefined)geometry.name=data.name;if(data.userData!==undefined)geometry.userData=data.userData;geometries[data.uuid]=geometry}}return geometries}parseMaterials(json,textures){const cache={};const materials={};if(json!==undefined){const loader=new MaterialLoader;loader.setTextures(textures);for(let i=0,l=json.length;i<l;i++){const data=json[i];if(cache[data.uuid]===undefined){cache[data.uuid]=loader.parse(data)}materials[data.uuid]=cache[data.uuid]}}return materials}parseAnimations(json){const animations={};if(json!==undefined){for(let i=0;i<json.length;i++){const data=json[i];const clip=AnimationClip.parse(data);animations[clip.uuid]=clip}}return animations}parseImages(json,onLoad){const scope=this;const images={};let loader;function loadImage(url){scope.manager.itemStart(url);return loader.load(url,function(){scope.manager.itemEnd(url)},undefined,function(){scope.manager.itemError(url);scope.manager.itemEnd(url)})}function deserializeImage(image){if(typeof image==="string"){const url=image;const path=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(url)?url:scope.resourcePath+url;return loadImage(path)}else{if(image.data){return{data:getTypedArray(image.type,image.data),width:image.width,height:image.height}}else{return null}}}if(json!==undefined&&json.length>0){const manager=new LoadingManager(onLoad);loader=new ImageLoader(manager);loader.setCrossOrigin(this.crossOrigin);for(let i=0,il=json.length;i<il;i++){const image=json[i];const url=image.url;if(Array.isArray(url)){const imageArray=[];for(let j=0,jl=url.length;j<jl;j++){const currentUrl=url[j];const deserializedImage=deserializeImage(currentUrl);if(deserializedImage!==null){if(deserializedImage instanceof HTMLImageElement){imageArray.push(deserializedImage)}else{imageArray.push(new DataTexture(deserializedImage.data,deserializedImage.width,deserializedImage.height))}}}images[image.uuid]=new Source(imageArray)}else{const deserializedImage=deserializeImage(image.url);images[image.uuid]=new Source(deserializedImage)}}}return images}async parseImagesAsync(json){const scope=this;const images={};let loader;async function deserializeImage(image){if(typeof image==="string"){const url=image;const path=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(url)?url:scope.resourcePath+url;return await loader.loadAsync(path)}else{if(image.data){return{data:getTypedArray(image.type,image.data),width:image.width,height:image.height}}else{return null}}}if(json!==undefined&&json.length>0){loader=new ImageLoader(this.manager);loader.setCrossOrigin(this.crossOrigin);for(let i=0,il=json.length;i<il;i++){const image=json[i];const url=image.url;if(Array.isArray(url)){const imageArray=[];for(let j=0,jl=url.length;j<jl;j++){const currentUrl=url[j];const deserializedImage=await deserializeImage(currentUrl);if(deserializedImage!==null){if(deserializedImage instanceof HTMLImageElement){imageArray.push(deserializedImage)}else{imageArray.push(new DataTexture(deserializedImage.data,deserializedImage.width,deserializedImage.height))}}}images[image.uuid]=new Source(imageArray)}else{const deserializedImage=await deserializeImage(image.url);images[image.uuid]=new Source(deserializedImage)}}}return images}parseTextures(json,images){function parseConstant(value,type){if(typeof value==="number")return value;console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",value);return type[value]}const textures={};if(json!==undefined){for(let i=0,l=json.length;i<l;i++){const data=json[i];if(data.image===undefined){console.warn("THREE.ObjectLoader: No \"image\" specified for",data.uuid)}if(images[data.image]===undefined){console.warn("THREE.ObjectLoader: Undefined image",data.image)}const source=images[data.image];const image=source.data;let texture;if(Array.isArray(image)){texture=new CubeTexture;if(image.length===6)texture.needsUpdate=true}else{if(image&&image.data){texture=new DataTexture}else{texture=new Texture}if(image)texture.needsUpdate=true}texture.source=source;texture.uuid=data.uuid;if(data.name!==undefined)texture.name=data.name;if(data.mapping!==undefined)texture.mapping=parseConstant(data.mapping,TEXTURE_MAPPING);if(data.channel!==undefined)texture.channel=data.channel;if(data.offset!==undefined)texture.offset.fromArray(data.offset);if(data.repeat!==undefined)texture.repeat.fromArray(data.repeat);if(data.center!==undefined)texture.center.fromArray(data.center);if(data.rotation!==undefined)texture.rotation=data.rotation;if(data.wrap!==undefined){texture.wrapS=parseConstant(data.wrap[0],TEXTURE_WRAPPING);texture.wrapT=parseConstant(data.wrap[1],TEXTURE_WRAPPING)}if(data.format!==undefined)texture.format=data.format;if(data.internalFormat!==undefined)texture.internalFormat=data.internalFormat;if(data.type!==undefined)texture.type=data.type;if(data.colorSpace!==undefined)texture.colorSpace=data.colorSpace;if(data.minFilter!==undefined)texture.minFilter=parseConstant(data.minFilter,TEXTURE_FILTER);if(data.magFilter!==undefined)texture.magFilter=parseConstant(data.magFilter,TEXTURE_FILTER);if(data.anisotropy!==undefined)texture.anisotropy=data.anisotropy;if(data.flipY!==undefined)texture.flipY=data.flipY;if(data.generateMipmaps!==undefined)texture.generateMipmaps=data.generateMipmaps;if(data.premultiplyAlpha!==undefined)texture.premultiplyAlpha=data.premultiplyAlpha;if(data.unpackAlignment!==undefined)texture.unpackAlignment=data.unpackAlignment;if(data.compareFunction!==undefined)texture.compareFunction=data.compareFunction;if(data.userData!==undefined)texture.userData=data.userData;textures[data.uuid]=texture}}return textures}parseObject(data,geometries,materials,textures,animations){let object;function getGeometry(name){if(geometries[name]===undefined){console.warn("THREE.ObjectLoader: Undefined geometry",name)}return geometries[name]}function getMaterial(name){if(name===undefined)return undefined;if(Array.isArray(name)){const array=[];for(let i=0,l=name.length;i<l;i++){const uuid=name[i];if(materials[uuid]===undefined){console.warn("THREE.ObjectLoader: Undefined material",uuid)}array.push(materials[uuid])}return array}if(materials[name]===undefined){console.warn("THREE.ObjectLoader: Undefined material",name)}return materials[name]}function getTexture(uuid){if(textures[uuid]===undefined){console.warn("THREE.ObjectLoader: Undefined texture",uuid)}return textures[uuid]}let geometry,material;switch(data.type){case"Scene":object=new Scene;if(data.background!==undefined){if(Number.isInteger(data.background)){object.background=new Color(data.background)}else{object.background=getTexture(data.background)}}if(data.environment!==undefined){object.environment=getTexture(data.environment)}if(data.fog!==undefined){if(data.fog.type==="Fog"){object.fog=new Fog(data.fog.color,data.fog.near,data.fog.far)}else if(data.fog.type==="FogExp2"){object.fog=new FogExp2(data.fog.color,data.fog.density)}if(data.fog.name!==""){object.fog.name=data.fog.name}}if(data.backgroundBlurriness!==undefined)object.backgroundBlurriness=data.backgroundBlurriness;if(data.backgroundIntensity!==undefined)object.backgroundIntensity=data.backgroundIntensity;if(data.backgroundRotation!==undefined)object.backgroundRotation.fromArray(data.backgroundRotation);if(data.environmentIntensity!==undefined)object.environmentIntensity=data.environmentIntensity;if(data.environmentRotation!==undefined)object.environmentRotation.fromArray(data.environmentRotation);break;case"PerspectiveCamera":object=new PerspectiveCamera(data.fov,data.aspect,data.near,data.far);if(data.focus!==undefined)object.focus=data.focus;if(data.zoom!==undefined)object.zoom=data.zoom;if(data.filmGauge!==undefined)object.filmGauge=data.filmGauge;if(data.filmOffset!==undefined)object.filmOffset=data.filmOffset;if(data.view!==undefined)object.view=Object.assign({},data.view);break;case"OrthographicCamera":object=new OrthographicCamera(data.left,data.right,data.top,data.bottom,data.near,data.far);if(data.zoom!==undefined)object.zoom=data.zoom;if(data.view!==undefined)object.view=Object.assign({},data.view);break;case"AmbientLight":object=new AmbientLight(data.color,data.intensity);break;case"DirectionalLight":object=new DirectionalLight(data.color,data.intensity);object.target=data.target||"";break;case"PointLight":object=new PointLight(data.color,data.intensity,data.distance,data.decay);break;case"RectAreaLight":object=new RectAreaLight(data.color,data.intensity,data.width,data.height);break;case"SpotLight":object=new SpotLight(data.color,data.intensity,data.distance,data.angle,data.penumbra,data.decay);object.target=data.target||"";break;case"HemisphereLight":object=new HemisphereLight(data.color,data.groundColor,data.intensity);break;case"LightProbe":object=new LightProbe().fromJSON(data);break;case"SkinnedMesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);object=new SkinnedMesh(geometry,material);if(data.bindMode!==undefined)object.bindMode=data.bindMode;if(data.bindMatrix!==undefined)object.bindMatrix.fromArray(data.bindMatrix);if(data.skeleton!==undefined)object.skeleton=data.skeleton;break;case"Mesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);object=new Mesh(geometry,material);break;case"InstancedMesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);const count=data.count;const instanceMatrix=data.instanceMatrix;const instanceColor=data.instanceColor;object=new InstancedMesh(geometry,material,count);object.instanceMatrix=new InstancedBufferAttribute(new Float32Array(instanceMatrix.array),16);if(instanceColor!==undefined)object.instanceColor=new InstancedBufferAttribute(new Float32Array(instanceColor.array),instanceColor.itemSize);break;case"BatchedMesh":geometry=getGeometry(data.geometry);material=getMaterial(data.material);object=new BatchedMesh(data.maxInstanceCount,data.maxVertexCount,data.maxIndexCount,material);object.geometry=geometry;object.perObjectFrustumCulled=data.perObjectFrustumCulled;object.sortObjects=data.sortObjects;object._drawRanges=data.drawRanges;object._reservedRanges=data.reservedRanges;object._visibility=data.visibility;object._active=data.active;object._bounds=data.bounds.map(bound=>{const box=new Box3;box.min.fromArray(bound.boxMin);box.max.fromArray(bound.boxMax);const sphere=new Sphere;sphere.radius=bound.sphereRadius;sphere.center.fromArray(bound.sphereCenter);return{boxInitialized:bound.boxInitialized,box:box,sphereInitialized:bound.sphereInitialized,sphere:sphere}});object._maxInstanceCount=data.maxInstanceCount;object._maxVertexCount=data.maxVertexCount;object._maxIndexCount=data.maxIndexCount;object._geometryInitialized=data.geometryInitialized;object._geometryCount=data.geometryCount;object._matricesTexture=getTexture(data.matricesTexture.uuid);if(data.colorsTexture!==undefined)object._colorsTexture=getTexture(data.colorsTexture.uuid);break;case"LOD":object=new LOD;break;case"Line":object=new Line(getGeometry(data.geometry),getMaterial(data.material));break;case"LineLoop":object=new LineLoop(getGeometry(data.geometry),getMaterial(data.material));break;case"LineSegments":object=new LineSegments(getGeometry(data.geometry),getMaterial(data.material));break;case"PointCloud":case"Points":object=new Points(getGeometry(data.geometry),getMaterial(data.material));break;case"Sprite":object=new Sprite(getMaterial(data.material));break;case"Group":object=new Group;break;case"Bone":object=new Bone;break;default:object=new Object3D;}object.uuid=data.uuid;if(data.name!==undefined)object.name=data.name;if(data.matrix!==undefined){object.matrix.fromArray(data.matrix);if(data.matrixAutoUpdate!==undefined)object.matrixAutoUpdate=data.matrixAutoUpdate;if(object.matrixAutoUpdate)object.matrix.decompose(object.position,object.quaternion,object.scale)}else{if(data.position!==undefined)object.position.fromArray(data.position);if(data.rotation!==undefined)object.rotation.fromArray(data.rotation);if(data.quaternion!==undefined)object.quaternion.fromArray(data.quaternion);if(data.scale!==undefined)object.scale.fromArray(data.scale)}if(data.up!==undefined)object.up.fromArray(data.up);if(data.castShadow!==undefined)object.castShadow=data.castShadow;if(data.receiveShadow!==undefined)object.receiveShadow=data.receiveShadow;if(data.shadow){if(data.shadow.intensity!==undefined)object.shadow.intensity=data.shadow.intensity;if(data.shadow.bias!==undefined)object.shadow.bias=data.shadow.bias;if(data.shadow.normalBias!==undefined)object.shadow.normalBias=data.shadow.normalBias;if(data.shadow.radius!==undefined)object.shadow.radius=data.shadow.radius;if(data.shadow.mapSize!==undefined)object.shadow.mapSize.fromArray(data.shadow.mapSize);if(data.shadow.camera!==undefined)object.shadow.camera=this.parseObject(data.shadow.camera)}if(data.visible!==undefined)object.visible=data.visible;if(data.frustumCulled!==undefined)object.frustumCulled=data.frustumCulled;if(data.renderOrder!==undefined)object.renderOrder=data.renderOrder;if(data.userData!==undefined)object.userData=data.userData;if(data.layers!==undefined)object.layers.mask=data.layers;if(data.children!==undefined){const children=data.children;for(let i=0;i<children.length;i++){object.add(this.parseObject(children[i],geometries,materials,textures,animations))}}if(data.animations!==undefined){const objectAnimations=data.animations;for(let i=0;i<objectAnimations.length;i++){const uuid=objectAnimations[i];object.animations.push(animations[uuid])}}if(data.type==="LOD"){if(data.autoUpdate!==undefined)object.autoUpdate=data.autoUpdate;const levels=data.levels;for(let l=0;l<levels.length;l++){const level=levels[l];const child=object.getObjectByProperty("uuid",level.object);if(child!==undefined){object.addLevel(child,level.distance,level.hysteresis)}}}return object}bindSkeletons(object,skeletons){if(Object.keys(skeletons).length===0)return;object.traverse(function(child){if(child.isSkinnedMesh===true&&child.skeleton!==undefined){const skeleton=skeletons[child.skeleton];if(skeleton===undefined){console.warn("THREE.ObjectLoader: No skeleton found with UUID:",child.skeleton)}else{child.bind(skeleton,child.bindMatrix)}}})}bindLightTargets(object){object.traverse(function(child){if(child.isDirectionalLight||child.isSpotLight){const uuid=child.target;const target=object.getObjectByProperty("uuid",uuid);if(target!==undefined){child.target=target}else{child.target=new Object3D}}})}}const TEXTURE_MAPPING={UVMapping:UVMapping,CubeReflectionMapping:CubeReflectionMapping,CubeRefractionMapping:CubeRefractionMapping,EquirectangularReflectionMapping:EquirectangularReflectionMapping,EquirectangularRefractionMapping:EquirectangularRefractionMapping,CubeUVReflectionMapping:CubeUVReflectionMapping};const TEXTURE_WRAPPING={RepeatWrapping:RepeatWrapping,ClampToEdgeWrapping:ClampToEdgeWrapping,MirroredRepeatWrapping:MirroredRepeatWrapping};const TEXTURE_FILTER={NearestFilter:NearestFilter,NearestMipmapNearestFilter:NearestMipmapNearestFilter,NearestMipmapLinearFilter:NearestMipmapLinearFilter,LinearFilter:LinearFilter,LinearMipmapNearestFilter:LinearMipmapNearestFilter,LinearMipmapLinearFilter:LinearMipmapLinearFilter};class ImageBitmapLoader extends Loader{constructor(manager){super(manager);this.isImageBitmapLoader=true;if(typeof createImageBitmap==="undefined"){console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.")}if(typeof fetch==="undefined"){console.warn("THREE.ImageBitmapLoader: fetch() not supported.")}this.options={premultiplyAlpha:"none"}}setOptions(options){this.options=options;return this}load(url,onLoad,onProgress,onError){if(url===undefined)url="";if(this.path!==undefined)url=this.path+url;url=this.manager.resolveURL(url);const scope=this;const cached=Cache.get(url);if(cached!==undefined){scope.manager.itemStart(url);if(cached.then){cached.then(imageBitmap=>{if(onLoad)onLoad(imageBitmap);scope.manager.itemEnd(url)}).catch(e=>{if(onError)onError(e)});return}setTimeout(function(){if(onLoad)onLoad(cached);scope.manager.itemEnd(url)},0);return cached}const fetchOptions={};fetchOptions.credentials=this.crossOrigin==="anonymous"?"same-origin":"include";fetchOptions.headers=this.requestHeader;const promise=fetch(url,fetchOptions).then(function(res){return res.blob()}).then(function(blob){return createImageBitmap(blob,Object.assign(scope.options,{colorSpaceConversion:"none"}))}).then(function(imageBitmap){Cache.add(url,imageBitmap);if(onLoad)onLoad(imageBitmap);scope.manager.itemEnd(url);return imageBitmap}).catch(function(e){if(onError)onError(e);Cache.remove(url);scope.manager.itemError(url);scope.manager.itemEnd(url)});Cache.add(url,promise);scope.manager.itemStart(url)}}let _context;class AudioContext{static getContext(){if(_context===undefined){_context=new(window.AudioContext||window.webkitAudioContext)}return _context}static setContext(value){_context=value}}class AudioLoader extends Loader{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){const scope=this;const loader=new FileLoader(this.manager);loader.setResponseType("arraybuffer");loader.setPath(this.path);loader.setRequestHeader(this.requestHeader);loader.setWithCredentials(this.withCredentials);loader.load(url,function(buffer){try{const bufferCopy=buffer.slice(0);const context=AudioContext.getContext();context.decodeAudioData(bufferCopy,function(audioBuffer){onLoad(audioBuffer)}).catch(handleError)}catch(e){handleError(e)}},onProgress,onError);function handleError(e){if(onError){onError(e)}else{console.error(e)}scope.manager.itemError(url)}}}const _eyeRight=new Matrix4;const _eyeLeft=new Matrix4;const _projectionMatrix=new Matrix4;class StereoCamera{constructor(){this.type="StereoCamera";this.aspect=1;this.eyeSep=0.064;this.cameraL=new PerspectiveCamera;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=false;this.cameraR=new PerspectiveCamera;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=false;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(camera){const cache=this._cache;const needsUpdate=cache.focus!==camera.focus||cache.fov!==camera.fov||cache.aspect!==camera.aspect*this.aspect||cache.near!==camera.near||cache.far!==camera.far||cache.zoom!==camera.zoom||cache.eyeSep!==this.eyeSep;if(needsUpdate){cache.focus=camera.focus;cache.fov=camera.fov;cache.aspect=camera.aspect*this.aspect;cache.near=camera.near;cache.far=camera.far;cache.zoom=camera.zoom;cache.eyeSep=this.eyeSep;_projectionMatrix.copy(camera.projectionMatrix);const eyeSepHalf=cache.eyeSep/2;const eyeSepOnProjection=eyeSepHalf*cache.near/cache.focus;const ymax=cache.near*Math.tan(DEG2RAD*cache.fov*0.5)/cache.zoom;let xmin,xmax;_eyeLeft.elements[12]=-eyeSepHalf;_eyeRight.elements[12]=eyeSepHalf;xmin=-ymax*cache.aspect+eyeSepOnProjection;xmax=ymax*cache.aspect+eyeSepOnProjection;_projectionMatrix.elements[0]=2*cache.near/(xmax-xmin);_projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin);this.cameraL.projectionMatrix.copy(_projectionMatrix);xmin=-ymax*cache.aspect-eyeSepOnProjection;xmax=ymax*cache.aspect-eyeSepOnProjection;_projectionMatrix.elements[0]=2*cache.near/(xmax-xmin);_projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin);this.cameraR.projectionMatrix.copy(_projectionMatrix)}this.cameraL.matrixWorld.copy(camera.matrixWorld).multiply(_eyeLeft);this.cameraR.matrixWorld.copy(camera.matrixWorld).multiply(_eyeRight)}}class Clock{constructor(autoStart=true){this.autoStart=autoStart;this.startTime=0;this.oldTime=0;this.elapsedTime=0;this.running=false}start(){this.startTime=now();this.oldTime=this.startTime;this.elapsedTime=0;this.running=true}stop(){this.getElapsedTime();this.running=false;this.autoStart=false}getElapsedTime(){this.getDelta();return this.elapsedTime}getDelta(){let diff=0;if(this.autoStart&&!this.running){this.start();return 0}if(this.running){const newTime=now();diff=(newTime-this.oldTime)/1000;this.oldTime=newTime;this.elapsedTime+=diff}return diff}}function now(){return(typeof performance==="undefined"?Date:performance).now()}const _position$1=new Vector3;const _quaternion$1=new Quaternion;const _scale$1=new Vector3;const _orientation$1=new Vector3;class AudioListener extends Object3D{constructor(){super();this.type="AudioListener";this.context=AudioContext.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Clock}getInput(){return this.gain}removeFilter(){if(this.filter!==null){this.gain.disconnect(this.filter);this.filter.disconnect(this.context.destination);this.gain.connect(this.context.destination);this.filter=null}return this}getFilter(){return this.filter}setFilter(value){if(this.filter!==null){this.gain.disconnect(this.filter);this.filter.disconnect(this.context.destination)}else{this.gain.disconnect(this.context.destination)}this.filter=value;this.gain.connect(this.filter);this.filter.connect(this.context.destination);return this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(value){this.gain.gain.setTargetAtTime(value,this.context.currentTime,0.01);return this}updateMatrixWorld(force){super.updateMatrixWorld(force);const listener=this.context.listener;const up=this.up;this.timeDelta=this._clock.getDelta();this.matrixWorld.decompose(_position$1,_quaternion$1,_scale$1);_orientation$1.set(0,0,-1).applyQuaternion(_quaternion$1);if(listener.positionX){const endTime=this.context.currentTime+this.timeDelta;listener.positionX.linearRampToValueAtTime(_position$1.x,endTime);listener.positionY.linearRampToValueAtTime(_position$1.y,endTime);listener.positionZ.linearRampToValueAtTime(_position$1.z,endTime);listener.forwardX.linearRampToValueAtTime(_orientation$1.x,endTime);listener.forwardY.linearRampToValueAtTime(_orientation$1.y,endTime);listener.forwardZ.linearRampToValueAtTime(_orientation$1.z,endTime);listener.upX.linearRampToValueAtTime(up.x,endTime);listener.upY.linearRampToValueAtTime(up.y,endTime);listener.upZ.linearRampToValueAtTime(up.z,endTime)}else{listener.setPosition(_position$1.x,_position$1.y,_position$1.z);listener.setOrientation(_orientation$1.x,_orientation$1.y,_orientation$1.z,up.x,up.y,up.z)}}}class Audio extends Object3D{constructor(listener){super();this.type="Audio";this.listener=listener;this.context=listener.context;this.gain=this.context.createGain();this.gain.connect(listener.getInput());this.autoplay=false;this.buffer=null;this.detune=0;this.loop=false;this.loopStart=0;this.loopEnd=0;this.offset=0;this.duration=undefined;this.playbackRate=1;this.isPlaying=false;this.hasPlaybackControl=true;this.source=null;this.sourceType="empty";this._startedAt=0;this._progress=0;this._connected=false;this.filters=[]}getOutput(){return this.gain}setNodeSource(audioNode){this.hasPlaybackControl=false;this.sourceType="audioNode";this.source=audioNode;this.connect();return this}setMediaElementSource(mediaElement){this.hasPlaybackControl=false;this.sourceType="mediaNode";this.source=this.context.createMediaElementSource(mediaElement);this.connect();return this}setMediaStreamSource(mediaStream){this.hasPlaybackControl=false;this.sourceType="mediaStreamNode";this.source=this.context.createMediaStreamSource(mediaStream);this.connect();return this}setBuffer(audioBuffer){this.buffer=audioBuffer;this.sourceType="buffer";if(this.autoplay)this.play();return this}play(delay=0){if(this.isPlaying===true){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===false){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+delay;const source=this.context.createBufferSource();source.buffer=this.buffer;source.loop=this.loop;source.loopStart=this.loopStart;source.loopEnd=this.loopEnd;source.onended=this.onEnded.bind(this);source.start(this._startedAt,this._progress+this.offset,this.duration);this.isPlaying=true;this.source=source;this.setDetune(this.detune);this.setPlaybackRate(this.playbackRate);return this.connect()}pause(){if(this.hasPlaybackControl===false){console.warn("THREE.Audio: this Audio has no playback control.");return}if(this.isPlaying===true){this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate;if(this.loop===true){this._progress=this._progress%(this.duration||this.buffer.duration)}this.source.stop();this.source.onended=null;this.isPlaying=false}return this}stop(){if(this.hasPlaybackControl===false){console.warn("THREE.Audio: this Audio has no playback control.");return}this._progress=0;if(this.source!==null){this.source.stop();this.source.onended=null}this.isPlaying=false;return this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let i=1,l=this.filters.length;i<l;i++){this.filters[i-1].connect(this.filters[i])}this.filters[this.filters.length-1].connect(this.getOutput())}else{this.source.connect(this.getOutput())}this._connected=true;return this}disconnect(){if(this._connected===false){return}if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let i=1,l=this.filters.length;i<l;i++){this.filters[i-1].disconnect(this.filters[i])}this.filters[this.filters.length-1].disconnect(this.getOutput())}else{this.source.disconnect(this.getOutput())}this._connected=false;return this}getFilters(){return this.filters}setFilters(value){if(!value)value=[];if(this._connected===true){this.disconnect();this.filters=value.slice();this.connect()}else{this.filters=value.slice()}return this}setDetune(value){this.detune=value;if(this.isPlaying===true&&this.source.detune!==undefined){this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,0.01)}return this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(filter){return this.setFilters(filter?[filter]:[])}setPlaybackRate(value){if(this.hasPlaybackControl===false){console.warn("THREE.Audio: this Audio has no playback control.");return}this.playbackRate=value;if(this.isPlaying===true){this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,0.01)}return this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=false}getLoop(){if(this.hasPlaybackControl===false){console.warn("THREE.Audio: this Audio has no playback control.");return false}return this.loop}setLoop(value){if(this.hasPlaybackControl===false){console.warn("THREE.Audio: this Audio has no playback control.");return}this.loop=value;if(this.isPlaying===true){this.source.loop=this.loop}return this}setLoopStart(value){this.loopStart=value;return this}setLoopEnd(value){this.loopEnd=value;return this}getVolume(){return this.gain.gain.value}setVolume(value){this.gain.gain.setTargetAtTime(value,this.context.currentTime,0.01);return this}}const _position=new Vector3;const _quaternion=new Quaternion;const _scale=new Vector3;const _orientation=new Vector3;class PositionalAudio extends Audio{constructor(listener){super(listener);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}connect(){super.connect();this.panner.connect(this.gain)}disconnect(){super.disconnect();this.panner.disconnect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(value){this.panner.refDistance=value;return this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(value){this.panner.rolloffFactor=value;return this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(value){this.panner.distanceModel=value;return this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(value){this.panner.maxDistance=value;return this}setDirectionalCone(coneInnerAngle,coneOuterAngle,coneOuterGain){this.panner.coneInnerAngle=coneInnerAngle;this.panner.coneOuterAngle=coneOuterAngle;this.panner.coneOuterGain=coneOuterGain;return this}updateMatrixWorld(force){super.updateMatrixWorld(force);if(this.hasPlaybackControl===true&&this.isPlaying===false)return;this.matrixWorld.decompose(_position,_quaternion,_scale);_orientation.set(0,0,1).applyQuaternion(_quaternion);const panner=this.panner;if(panner.positionX){const endTime=this.context.currentTime+this.listener.timeDelta;panner.positionX.linearRampToValueAtTime(_position.x,endTime);panner.positionY.linearRampToValueAtTime(_position.y,endTime);panner.positionZ.linearRampToValueAtTime(_position.z,endTime);panner.orientationX.linearRampToValueAtTime(_orientation.x,endTime);panner.orientationY.linearRampToValueAtTime(_orientation.y,endTime);panner.orientationZ.linearRampToValueAtTime(_orientation.z,endTime)}else{panner.setPosition(_position.x,_position.y,_position.z);panner.setOrientation(_orientation.x,_orientation.y,_orientation.z)}}}class AudioAnalyser{constructor(audio,fftSize=2048){this.analyser=audio.context.createAnalyser();this.analyser.fftSize=fftSize;this.data=new Uint8Array(this.analyser.frequencyBinCount);audio.getOutput().connect(this.analyser)}getFrequencyData(){this.analyser.getByteFrequencyData(this.data);return this.data}getAverageFrequency(){let value=0;const data=this.getFrequencyData();for(let i=0;i<data.length;i++){value+=data[i]}return value/data.length}}class PropertyMixer{constructor(binding,typeName,valueSize){this.binding=binding;this.valueSize=valueSize;let mixFunction,mixFunctionAdditive,setIdentity;switch(typeName){case"quaternion":mixFunction=this._slerp;mixFunctionAdditive=this._slerpAdditive;setIdentity=this._setAdditiveIdentityQuaternion;this.buffer=new Float64Array(valueSize*6);this._workIndex=5;break;case"string":case"bool":mixFunction=this._select;mixFunctionAdditive=this._select;setIdentity=this._setAdditiveIdentityOther;this.buffer=new Array(valueSize*5);break;default:mixFunction=this._lerp;mixFunctionAdditive=this._lerpAdditive;setIdentity=this._setAdditiveIdentityNumeric;this.buffer=new Float64Array(valueSize*5);}this._mixBufferRegion=mixFunction;this._mixBufferRegionAdditive=mixFunctionAdditive;this._setIdentity=setIdentity;this._origIndex=3;this._addIndex=4;this.cumulativeWeight=0;this.cumulativeWeightAdditive=0;this.useCount=0;this.referenceCount=0}accumulate(accuIndex,weight){const buffer=this.buffer,stride=this.valueSize,offset=accuIndex*stride+stride;let currentWeight=this.cumulativeWeight;if(currentWeight===0){for(let i=0;i!==stride;++i){buffer[offset+i]=buffer[i]}currentWeight=weight}else{currentWeight+=weight;const mix=weight/currentWeight;this._mixBufferRegion(buffer,offset,0,mix,stride)}this.cumulativeWeight=currentWeight}accumulateAdditive(weight){const buffer=this.buffer,stride=this.valueSize,offset=stride*this._addIndex;if(this.cumulativeWeightAdditive===0){this._setIdentity()}this._mixBufferRegionAdditive(buffer,offset,0,weight,stride);this.cumulativeWeightAdditive+=weight}apply(accuIndex){const stride=this.valueSize,buffer=this.buffer,offset=accuIndex*stride+stride,weight=this.cumulativeWeight,weightAdditive=this.cumulativeWeightAdditive,binding=this.binding;this.cumulativeWeight=0;this.cumulativeWeightAdditive=0;if(weight<1){const originalValueOffset=stride*this._origIndex;this._mixBufferRegion(buffer,offset,originalValueOffset,1-weight,stride)}if(weightAdditive>0){this._mixBufferRegionAdditive(buffer,offset,this._addIndex*stride,1,stride)}for(let i=stride,e=stride+stride;i!==e;++i){if(buffer[i]!==buffer[i+stride]){binding.setValue(buffer,offset);break}}}saveOriginalState(){const binding=this.binding;const buffer=this.buffer,stride=this.valueSize,originalValueOffset=stride*this._origIndex;binding.getValue(buffer,originalValueOffset);for(let i=stride,e=originalValueOffset;i!==e;++i){buffer[i]=buffer[originalValueOffset+i%stride]}this._setIdentity();this.cumulativeWeight=0;this.cumulativeWeightAdditive=0}restoreOriginalState(){const originalValueOffset=this.valueSize*3;this.binding.setValue(this.buffer,originalValueOffset)}_setAdditiveIdentityNumeric(){const startIndex=this._addIndex*this.valueSize;const endIndex=startIndex+this.valueSize;for(let i=startIndex;i<endIndex;i++){this.buffer[i]=0}}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric();this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const startIndex=this._origIndex*this.valueSize;const targetIndex=this._addIndex*this.valueSize;for(let i=0;i<this.valueSize;i++){this.buffer[targetIndex+i]=this.buffer[startIndex+i]}}_select(buffer,dstOffset,srcOffset,t,stride){if(t>=0.5){for(let i=0;i!==stride;++i){buffer[dstOffset+i]=buffer[srcOffset+i]}}}_slerp(buffer,dstOffset,srcOffset,t){Quaternion.slerpFlat(buffer,dstOffset,buffer,dstOffset,buffer,srcOffset,t)}_slerpAdditive(buffer,dstOffset,srcOffset,t,stride){const workOffset=this._workIndex*stride;Quaternion.multiplyQuaternionsFlat(buffer,workOffset,buffer,dstOffset,buffer,srcOffset);Quaternion.slerpFlat(buffer,dstOffset,buffer,dstOffset,buffer,workOffset,t)}_lerp(buffer,dstOffset,srcOffset,t,stride){const s=1-t;for(let i=0;i!==stride;++i){const j=dstOffset+i;buffer[j]=buffer[j]*s+buffer[srcOffset+i]*t}}_lerpAdditive(buffer,dstOffset,srcOffset,t,stride){for(let i=0;i!==stride;++i){const j=dstOffset+i;buffer[j]=buffer[j]+buffer[srcOffset+i]*t}}}const _RESERVED_CHARS_RE="\\[\\]\\.:\\/";const _reservedRe=new RegExp("["+_RESERVED_CHARS_RE+"]","g");const _wordChar="[^"+_RESERVED_CHARS_RE+"]";const _wordCharOrDot="[^"+_RESERVED_CHARS_RE.replace("\\.","")+"]";const _directoryRe=/((?:WC+[\/:])*)/.source.replace("WC",_wordChar);const _nodeRe=/(WCOD+)?/.source.replace("WCOD",_wordCharOrDot);const _objectRe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",_wordChar);const _propertyRe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",_wordChar);const _trackRe=new RegExp(""+"^"+_directoryRe+_nodeRe+_objectRe+_propertyRe+"$");const _supportedObjectNames=["material","materials","bones","map"];class Composite{constructor(targetGroup,path,optionalParsedPath){const parsedPath=optionalParsedPath||PropertyBinding.parseTrackName(path);this._targetGroup=targetGroup;this._bindings=targetGroup.subscribe_(path,parsedPath)}getValue(array,offset){this.bind();const firstValidIndex=this._targetGroup.nCachedObjects_,binding=this._bindings[firstValidIndex];if(binding!==undefined)binding.getValue(array,offset)}setValue(array,offset){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].setValue(array,offset)}}bind(){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].bind()}}unbind(){const bindings=this._bindings;for(let i=this._targetGroup.nCachedObjects_,n=bindings.length;i!==n;++i){bindings[i].unbind()}}}class PropertyBinding{constructor(rootNode,path,parsedPath){this.path=path;this.parsedPath=parsedPath||PropertyBinding.parseTrackName(path);this.node=PropertyBinding.findNode(rootNode,this.parsedPath.nodeName);this.rootNode=rootNode;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}static create(root,path,parsedPath){if(!(root&&root.isAnimationObjectGroup)){return new PropertyBinding(root,path,parsedPath)}else{return new PropertyBinding.Composite(root,path,parsedPath)}}static sanitizeNodeName(name){return name.replace(/\s/g,"_").replace(_reservedRe,"")}static parseTrackName(trackName){const matches=_trackRe.exec(trackName);if(matches===null){throw new Error("PropertyBinding: Cannot parse trackName: "+trackName)}const results={nodeName:matches[2],objectName:matches[3],objectIndex:matches[4],propertyName:matches[5],propertyIndex:matches[6]};const lastDot=results.nodeName&&results.nodeName.lastIndexOf(".");if(lastDot!==undefined&&lastDot!==-1){const objectName=results.nodeName.substring(lastDot+1);if(_supportedObjectNames.indexOf(objectName)!==-1){results.nodeName=results.nodeName.substring(0,lastDot);results.objectName=objectName}}if(results.propertyName===null||results.propertyName.length===0){throw new Error("PropertyBinding: can not parse propertyName from trackName: "+trackName)}return results}static findNode(root,nodeName){if(nodeName===undefined||nodeName===""||nodeName==="."||nodeName===-1||nodeName===root.name||nodeName===root.uuid){return root}if(root.skeleton){const bone=root.skeleton.getBoneByName(nodeName);if(bone!==undefined){return bone}}if(root.children){const searchNodeSubtree=function(children){for(let i=0;i<children.length;i++){const childNode=children[i];if(childNode.name===nodeName||childNode.uuid===nodeName){return childNode}const result=searchNodeSubtree(childNode.children);if(result)return result}return null};const subTreeNode=searchNodeSubtree(root.children);if(subTreeNode){return subTreeNode}}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(buffer,offset){buffer[offset]=this.targetObject[this.propertyName]}_getValue_array(buffer,offset){const source=this.resolvedProperty;for(let i=0,n=source.length;i!==n;++i){buffer[offset++]=source[i]}}_getValue_arrayElement(buffer,offset){buffer[offset]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(buffer,offset){this.resolvedProperty.toArray(buffer,offset)}_setValue_direct(buffer,offset){this.targetObject[this.propertyName]=buffer[offset]}_setValue_direct_setNeedsUpdate(buffer,offset){this.targetObject[this.propertyName]=buffer[offset];this.targetObject.needsUpdate=true}_setValue_direct_setMatrixWorldNeedsUpdate(buffer,offset){this.targetObject[this.propertyName]=buffer[offset];this.targetObject.matrixWorldNeedsUpdate=true}_setValue_array(buffer,offset){const dest=this.resolvedProperty;for(let i=0,n=dest.length;i!==n;++i){dest[i]=buffer[offset++]}}_setValue_array_setNeedsUpdate(buffer,offset){const dest=this.resolvedProperty;for(let i=0,n=dest.length;i!==n;++i){dest[i]=buffer[offset++]}this.targetObject.needsUpdate=true}_setValue_array_setMatrixWorldNeedsUpdate(buffer,offset){const dest=this.resolvedProperty;for(let i=0,n=dest.length;i!==n;++i){dest[i]=buffer[offset++]}this.targetObject.matrixWorldNeedsUpdate=true}_setValue_arrayElement(buffer,offset){this.resolvedProperty[this.propertyIndex]=buffer[offset]}_setValue_arrayElement_setNeedsUpdate(buffer,offset){this.resolvedProperty[this.propertyIndex]=buffer[offset];this.targetObject.needsUpdate=true}_setValue_arrayElement_setMatrixWorldNeedsUpdate(buffer,offset){this.resolvedProperty[this.propertyIndex]=buffer[offset];this.targetObject.matrixWorldNeedsUpdate=true}_setValue_fromArray(buffer,offset){this.resolvedProperty.fromArray(buffer,offset)}_setValue_fromArray_setNeedsUpdate(buffer,offset){this.resolvedProperty.fromArray(buffer,offset);this.targetObject.needsUpdate=true}_setValue_fromArray_setMatrixWorldNeedsUpdate(buffer,offset){this.resolvedProperty.fromArray(buffer,offset);this.targetObject.matrixWorldNeedsUpdate=true}_getValue_unbound(targetArray,offset){this.bind();this.getValue(targetArray,offset)}_setValue_unbound(sourceArray,offset){this.bind();this.setValue(sourceArray,offset)}bind(){let targetObject=this.node;const parsedPath=this.parsedPath;const objectName=parsedPath.objectName;const propertyName=parsedPath.propertyName;let propertyIndex=parsedPath.propertyIndex;if(!targetObject){targetObject=PropertyBinding.findNode(this.rootNode,parsedPath.nodeName);this.node=targetObject}this.getValue=this._getValue_unavailable;this.setValue=this._setValue_unavailable;if(!targetObject){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(objectName){let objectIndex=parsedPath.objectIndex;switch(objectName){case"materials":if(!targetObject.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!targetObject.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}targetObject=targetObject.material.materials;break;case"bones":if(!targetObject.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}targetObject=targetObject.skeleton.bones;for(let i=0;i<targetObject.length;i++){if(targetObject[i].name===objectIndex){objectIndex=i;break}}break;case"map":if("map"in targetObject){targetObject=targetObject.map;break}if(!targetObject.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!targetObject.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}targetObject=targetObject.material.map;break;default:if(targetObject[objectName]===undefined){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}targetObject=targetObject[objectName];}if(objectIndex!==undefined){if(targetObject[objectIndex]===undefined){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,targetObject);return}targetObject=targetObject[objectIndex]}}const nodeProperty=targetObject[propertyName];if(nodeProperty===undefined){const nodeName=parsedPath.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+nodeName+"."+propertyName+" but it wasn't found.",targetObject);return}let versioning=this.Versioning.None;this.targetObject=targetObject;if(targetObject.needsUpdate!==undefined){versioning=this.Versioning.NeedsUpdate}else if(targetObject.matrixWorldNeedsUpdate!==undefined){versioning=this.Versioning.MatrixWorldNeedsUpdate}let bindingType=this.BindingType.Direct;if(propertyIndex!==undefined){if(propertyName==="morphTargetInfluences"){if(!targetObject.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!targetObject.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}if(targetObject.morphTargetDictionary[propertyIndex]!==undefined){propertyIndex=targetObject.morphTargetDictionary[propertyIndex]}}bindingType=this.BindingType.ArrayElement;this.resolvedProperty=nodeProperty;this.propertyIndex=propertyIndex}else if(nodeProperty.fromArray!==undefined&&nodeProperty.toArray!==undefined){bindingType=this.BindingType.HasFromToArray;this.resolvedProperty=nodeProperty}else if(Array.isArray(nodeProperty)){bindingType=this.BindingType.EntireArray;this.resolvedProperty=nodeProperty}else{this.propertyName=propertyName}this.getValue=this.GetterByBindingType[bindingType];this.setValue=this.SetterByBindingTypeAndVersioning[bindingType][versioning]}unbind(){this.node=null;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}}PropertyBinding.Composite=Composite;PropertyBinding.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};PropertyBinding.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};PropertyBinding.prototype.GetterByBindingType=[PropertyBinding.prototype._getValue_direct,PropertyBinding.prototype._getValue_array,PropertyBinding.prototype._getValue_arrayElement,PropertyBinding.prototype._getValue_toArray];PropertyBinding.prototype.SetterByBindingTypeAndVersioning=[[PropertyBinding.prototype._setValue_direct,PropertyBinding.prototype._setValue_direct_setNeedsUpdate,PropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_array,PropertyBinding.prototype._setValue_array_setNeedsUpdate,PropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_arrayElement,PropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate,PropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[PropertyBinding.prototype._setValue_fromArray,PropertyBinding.prototype._setValue_fromArray_setNeedsUpdate,PropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class AnimationObjectGroup{constructor(){this.isAnimationObjectGroup=true;this.uuid=generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;const indices={};this._indicesByUUID=indices;for(let i=0,n=arguments.length;i!==n;++i){indices[arguments[i].uuid]=i}this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};const scope=this;this.stats={objects:{get total(){return scope._objects.length},get inUse(){return this.total-scope.nCachedObjects_}},get bindingsPerObject(){return scope._bindings.length}}}add(){const objects=this._objects,indicesByUUID=this._indicesByUUID,paths=this._paths,parsedPaths=this._parsedPaths,bindings=this._bindings,nBindings=bindings.length;let knownObject=undefined,nObjects=objects.length,nCachedObjects=this.nCachedObjects_;for(let i=0,n=arguments.length;i!==n;++i){const object=arguments[i],uuid=object.uuid;let index=indicesByUUID[uuid];if(index===undefined){index=nObjects++;indicesByUUID[uuid]=index;objects.push(object);for(let j=0,m=nBindings;j!==m;++j){bindings[j].push(new PropertyBinding(object,paths[j],parsedPaths[j]))}}else if(index<nCachedObjects){knownObject=objects[index];const firstActiveIndex=--nCachedObjects,lastCachedObject=objects[firstActiveIndex];indicesByUUID[lastCachedObject.uuid]=index;objects[index]=lastCachedObject;indicesByUUID[uuid]=firstActiveIndex;objects[firstActiveIndex]=object;for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j],lastCached=bindingsForPath[firstActiveIndex];let binding=bindingsForPath[index];bindingsForPath[index]=lastCached;if(binding===undefined){binding=new PropertyBinding(object,paths[j],parsedPaths[j])}bindingsForPath[firstActiveIndex]=binding}}else if(objects[index]!==knownObject){console.error("THREE.AnimationObjectGroup: Different objects with the same UUID "+"detected. Clean the caches or recreate your infrastructure when reloading scenes.")}}this.nCachedObjects_=nCachedObjects}remove(){const objects=this._objects,indicesByUUID=this._indicesByUUID,bindings=this._bindings,nBindings=bindings.length;let nCachedObjects=this.nCachedObjects_;for(let i=0,n=arguments.length;i!==n;++i){const object=arguments[i],uuid=object.uuid,index=indicesByUUID[uuid];if(index!==undefined&&index>=nCachedObjects){const lastCachedIndex=nCachedObjects++,firstActiveObject=objects[lastCachedIndex];indicesByUUID[firstActiveObject.uuid]=index;objects[index]=firstActiveObject;indicesByUUID[uuid]=lastCachedIndex;objects[lastCachedIndex]=object;for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j],firstActive=bindingsForPath[lastCachedIndex],binding=bindingsForPath[index];bindingsForPath[index]=firstActive;bindingsForPath[lastCachedIndex]=binding}}}this.nCachedObjects_=nCachedObjects}uncache(){const objects=this._objects,indicesByUUID=this._indicesByUUID,bindings=this._bindings,nBindings=bindings.length;let nCachedObjects=this.nCachedObjects_,nObjects=objects.length;for(let i=0,n=arguments.length;i!==n;++i){const object=arguments[i],uuid=object.uuid,index=indicesByUUID[uuid];if(index!==undefined){delete indicesByUUID[uuid];if(index<nCachedObjects){const firstActiveIndex=--nCachedObjects,lastCachedObject=objects[firstActiveIndex],lastIndex=--nObjects,lastObject=objects[lastIndex];indicesByUUID[lastCachedObject.uuid]=index;objects[index]=lastCachedObject;indicesByUUID[lastObject.uuid]=firstActiveIndex;objects[firstActiveIndex]=lastObject;objects.pop();for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j],lastCached=bindingsForPath[firstActiveIndex],last=bindingsForPath[lastIndex];bindingsForPath[index]=lastCached;bindingsForPath[firstActiveIndex]=last;bindingsForPath.pop()}}else{const lastIndex=--nObjects,lastObject=objects[lastIndex];if(lastIndex>0){indicesByUUID[lastObject.uuid]=index}objects[index]=lastObject;objects.pop();for(let j=0,m=nBindings;j!==m;++j){const bindingsForPath=bindings[j];bindingsForPath[index]=bindingsForPath[lastIndex];bindingsForPath.pop()}}}}this.nCachedObjects_=nCachedObjects}subscribe_(path,parsedPath){const indicesByPath=this._bindingsIndicesByPath;let index=indicesByPath[path];const bindings=this._bindings;if(index!==undefined)return bindings[index];const paths=this._paths,parsedPaths=this._parsedPaths,objects=this._objects,nObjects=objects.length,nCachedObjects=this.nCachedObjects_,bindingsForPath=new Array(nObjects);index=bindings.length;indicesByPath[path]=index;paths.push(path);parsedPaths.push(parsedPath);bindings.push(bindingsForPath);for(let i=nCachedObjects,n=objects.length;i!==n;++i){const object=objects[i];bindingsForPath[i]=new PropertyBinding(object,path,parsedPath)}return bindingsForPath}unsubscribe_(path){const indicesByPath=this._bindingsIndicesByPath,index=indicesByPath[path];if(index!==undefined){const paths=this._paths,parsedPaths=this._parsedPaths,bindings=this._bindings,lastBindingsIndex=bindings.length-1,lastBindings=bindings[lastBindingsIndex],lastBindingsPath=path[lastBindingsIndex];indicesByPath[lastBindingsPath]=index;bindings[index]=lastBindings;bindings.pop();parsedPaths[index]=parsedPaths[lastBindingsIndex];parsedPaths.pop();paths[index]=paths[lastBindingsIndex];paths.pop()}}}class AnimationAction{constructor(mixer,clip,localRoot=null,blendMode=clip.blendMode){this._mixer=mixer;this._clip=clip;this._localRoot=localRoot;this.blendMode=blendMode;const tracks=clip.tracks,nTracks=tracks.length,interpolants=new Array(nTracks);const interpolantSettings={endingStart:ZeroCurvatureEnding,endingEnd:ZeroCurvatureEnding};for(let i=0;i!==nTracks;++i){const interpolant=tracks[i].createInterpolant(null);interpolants[i]=interpolant;interpolant.settings=interpolantSettings}this._interpolantSettings=interpolantSettings;this._interpolants=interpolants;this._propertyBindings=new Array(nTracks);this._cacheIndex=null;this._byClipCacheIndex=null;this._timeScaleInterpolant=null;this._weightInterpolant=null;this.loop=LoopRepeat;this._loopCount=-1;this._startTime=null;this.time=0;this.timeScale=1;this._effectiveTimeScale=1;this.weight=1;this._effectiveWeight=1;this.repetitions=Infinity;this.paused=false;this.enabled=true;this.clampWhenFinished=false;this.zeroSlopeAtStart=true;this.zeroSlopeAtEnd=true}play(){this._mixer._activateAction(this);return this}stop(){this._mixer._deactivateAction(this);return this.reset()}reset(){this.paused=false;this.enabled=true;this.time=0;this._loopCount=-1;this._startTime=null;return this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(time){this._startTime=time;return this}setLoop(mode,repetitions){this.loop=mode;this.repetitions=repetitions;return this}setEffectiveWeight(weight){this.weight=weight;this._effectiveWeight=this.enabled?weight:0;return this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(duration){return this._scheduleFading(duration,0,1)}fadeOut(duration){return this._scheduleFading(duration,1,0)}crossFadeFrom(fadeOutAction,duration,warp){fadeOutAction.fadeOut(duration);this.fadeIn(duration);if(warp){const fadeInDuration=this._clip.duration,fadeOutDuration=fadeOutAction._clip.duration,startEndRatio=fadeOutDuration/fadeInDuration,endStartRatio=fadeInDuration/fadeOutDuration;fadeOutAction.warp(1,startEndRatio,duration);this.warp(endStartRatio,1,duration)}return this}crossFadeTo(fadeInAction,duration,warp){return fadeInAction.crossFadeFrom(this,duration,warp)}stopFading(){const weightInterpolant=this._weightInterpolant;if(weightInterpolant!==null){this._weightInterpolant=null;this._mixer._takeBackControlInterpolant(weightInterpolant)}return this}setEffectiveTimeScale(timeScale){this.timeScale=timeScale;this._effectiveTimeScale=this.paused?0:timeScale;return this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(duration){this.timeScale=this._clip.duration/duration;return this.stopWarping()}syncWith(action){this.time=action.time;this.timeScale=action.timeScale;return this.stopWarping()}halt(duration){return this.warp(this._effectiveTimeScale,0,duration)}warp(startTimeScale,endTimeScale,duration){const mixer=this._mixer,now=mixer.time,timeScale=this.timeScale;let interpolant=this._timeScaleInterpolant;if(interpolant===null){interpolant=mixer._lendControlInterpolant();this._timeScaleInterpolant=interpolant}const times=interpolant.parameterPositions,values=interpolant.sampleValues;times[0]=now;times[1]=now+duration;values[0]=startTimeScale/timeScale;values[1]=endTimeScale/timeScale;return this}stopWarping(){const timeScaleInterpolant=this._timeScaleInterpolant;if(timeScaleInterpolant!==null){this._timeScaleInterpolant=null;this._mixer._takeBackControlInterpolant(timeScaleInterpolant)}return this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(time,deltaTime,timeDirection,accuIndex){if(!this.enabled){this._updateWeight(time);return}const startTime=this._startTime;if(startTime!==null){const timeRunning=(time-startTime)*timeDirection;if(timeRunning<0||timeDirection===0){deltaTime=0}else{this._startTime=null;deltaTime=timeDirection*timeRunning}}deltaTime*=this._updateTimeScale(time);const clipTime=this._updateTime(deltaTime);const weight=this._updateWeight(time);if(weight>0){const interpolants=this._interpolants;const propertyMixers=this._propertyBindings;switch(this.blendMode){case AdditiveAnimationBlendMode:for(let j=0,m=interpolants.length;j!==m;++j){interpolants[j].evaluate(clipTime);propertyMixers[j].accumulateAdditive(weight)}break;case NormalAnimationBlendMode:default:for(let j=0,m=interpolants.length;j!==m;++j){interpolants[j].evaluate(clipTime);propertyMixers[j].accumulate(accuIndex,weight)}}}}_updateWeight(time){let weight=0;if(this.enabled){weight=this.weight;const interpolant=this._weightInterpolant;if(interpolant!==null){const interpolantValue=interpolant.evaluate(time)[0];weight*=interpolantValue;if(time>interpolant.parameterPositions[1]){this.stopFading();if(interpolantValue===0){this.enabled=false}}}}this._effectiveWeight=weight;return weight}_updateTimeScale(time){let timeScale=0;if(!this.paused){timeScale=this.timeScale;const interpolant=this._timeScaleInterpolant;if(interpolant!==null){const interpolantValue=interpolant.evaluate(time)[0];timeScale*=interpolantValue;if(time>interpolant.parameterPositions[1]){this.stopWarping();if(timeScale===0){this.paused=true}else{this.timeScale=timeScale}}}}this._effectiveTimeScale=timeScale;return timeScale}_updateTime(deltaTime){const duration=this._clip.duration;const loop=this.loop;let time=this.time+deltaTime;let loopCount=this._loopCount;const pingPong=loop===LoopPingPong;if(deltaTime===0){if(loopCount===-1)return time;return pingPong&&(loopCount&1)===1?duration-time:time}if(loop===LoopOnce){if(loopCount===-1){this._loopCount=0;this._setEndings(true,true,false)}handle_stop:{if(time>=duration){time=duration}else if(time<0){time=0}else{this.time=time;break handle_stop}if(this.clampWhenFinished)this.paused=true;else this.enabled=false;this.time=time;this._mixer.dispatchEvent({type:"finished",action:this,direction:deltaTime<0?-1:1})}}else{if(loopCount===-1){if(deltaTime>=0){loopCount=0;this._setEndings(true,this.repetitions===0,pingPong)}else{this._setEndings(this.repetitions===0,true,pingPong)}}if(time>=duration||time<0){const loopDelta=Math.floor(time/duration);time-=duration*loopDelta;loopCount+=Math.abs(loopDelta);const pending=this.repetitions-loopCount;if(pending<=0){if(this.clampWhenFinished)this.paused=true;else this.enabled=false;time=deltaTime>0?duration:0;this.time=time;this._mixer.dispatchEvent({type:"finished",action:this,direction:deltaTime>0?1:-1})}else{if(pending===1){const atStart=deltaTime<0;this._setEndings(atStart,!atStart,pingPong)}else{this._setEndings(false,false,pingPong)}this._loopCount=loopCount;this.time=time;this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:loopDelta})}}else{this.time=time}if(pingPong&&(loopCount&1)===1){return duration-time}}return time}_setEndings(atStart,atEnd,pingPong){const settings=this._interpolantSettings;if(pingPong){settings.endingStart=ZeroSlopeEnding;settings.endingEnd=ZeroSlopeEnding}else{if(atStart){settings.endingStart=this.zeroSlopeAtStart?ZeroSlopeEnding:ZeroCurvatureEnding}else{settings.endingStart=WrapAroundEnding}if(atEnd){settings.endingEnd=this.zeroSlopeAtEnd?ZeroSlopeEnding:ZeroCurvatureEnding}else{settings.endingEnd=WrapAroundEnding}}}_scheduleFading(duration,weightNow,weightThen){const mixer=this._mixer,now=mixer.time;let interpolant=this._weightInterpolant;if(interpolant===null){interpolant=mixer._lendControlInterpolant();this._weightInterpolant=interpolant}const times=interpolant.parameterPositions,values=interpolant.sampleValues;times[0]=now;values[0]=weightNow;times[1]=now+duration;values[1]=weightThen;return this}}const _controlInterpolantsResultBuffer=new Float32Array(1);class AnimationMixer extends EventDispatcher{constructor(root){super();this._root=root;this._initMemoryManager();this._accuIndex=0;this.time=0;this.timeScale=1}_bindAction(action,prototypeAction){const root=action._localRoot||this._root,tracks=action._clip.tracks,nTracks=tracks.length,bindings=action._propertyBindings,interpolants=action._interpolants,rootUuid=root.uuid,bindingsByRoot=this._bindingsByRootAndName;let bindingsByName=bindingsByRoot[rootUuid];if(bindingsByName===undefined){bindingsByName={};bindingsByRoot[rootUuid]=bindingsByName}for(let i=0;i!==nTracks;++i){const track=tracks[i],trackName=track.name;let binding=bindingsByName[trackName];if(binding!==undefined){++binding.referenceCount;bindings[i]=binding}else{binding=bindings[i];if(binding!==undefined){if(binding._cacheIndex===null){++binding.referenceCount;this._addInactiveBinding(binding,rootUuid,trackName)}continue}const path=prototypeAction&&prototypeAction._propertyBindings[i].binding.parsedPath;binding=new PropertyMixer(PropertyBinding.create(root,trackName,path),track.ValueTypeName,track.getValueSize());++binding.referenceCount;this._addInactiveBinding(binding,rootUuid,trackName);bindings[i]=binding}interpolants[i].resultBuffer=binding.buffer}}_activateAction(action){if(!this._isActiveAction(action)){if(action._cacheIndex===null){const rootUuid=(action._localRoot||this._root).uuid,clipUuid=action._clip.uuid,actionsForClip=this._actionsByClip[clipUuid];this._bindAction(action,actionsForClip&&actionsForClip.knownActions[0]);this._addInactiveAction(action,clipUuid,rootUuid)}const bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){const binding=bindings[i];if(binding.useCount++===0){this._lendBinding(binding);binding.saveOriginalState()}}this._lendAction(action)}}_deactivateAction(action){if(this._isActiveAction(action)){const bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){const binding=bindings[i];if(--binding.useCount===0){binding.restoreOriginalState();this._takeBackBinding(binding)}}this._takeBackAction(action)}}_initMemoryManager(){this._actions=[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;const scope=this;this.stats={actions:{get total(){return scope._actions.length},get inUse(){return scope._nActiveActions}},bindings:{get total(){return scope._bindings.length},get inUse(){return scope._nActiveBindings}},controlInterpolants:{get total(){return scope._controlInterpolants.length},get inUse(){return scope._nActiveControlInterpolants}}}}_isActiveAction(action){const index=action._cacheIndex;return index!==null&&index<this._nActiveActions}_addInactiveAction(action,clipUuid,rootUuid){const actions=this._actions,actionsByClip=this._actionsByClip;let actionsForClip=actionsByClip[clipUuid];if(actionsForClip===undefined){actionsForClip={knownActions:[action],actionByRoot:{}};action._byClipCacheIndex=0;actionsByClip[clipUuid]=actionsForClip}else{const knownActions=actionsForClip.knownActions;action._byClipCacheIndex=knownActions.length;knownActions.push(action)}action._cacheIndex=actions.length;actions.push(action);actionsForClip.actionByRoot[rootUuid]=action}_removeInactiveAction(action){const actions=this._actions,lastInactiveAction=actions[actions.length-1],cacheIndex=action._cacheIndex;lastInactiveAction._cacheIndex=cacheIndex;actions[cacheIndex]=lastInactiveAction;actions.pop();action._cacheIndex=null;const clipUuid=action._clip.uuid,actionsByClip=this._actionsByClip,actionsForClip=actionsByClip[clipUuid],knownActionsForClip=actionsForClip.knownActions,lastKnownAction=knownActionsForClip[knownActionsForClip.length-1],byClipCacheIndex=action._byClipCacheIndex;lastKnownAction._byClipCacheIndex=byClipCacheIndex;knownActionsForClip[byClipCacheIndex]=lastKnownAction;knownActionsForClip.pop();action._byClipCacheIndex=null;const actionByRoot=actionsForClip.actionByRoot,rootUuid=(action._localRoot||this._root).uuid;delete actionByRoot[rootUuid];if(knownActionsForClip.length===0){delete actionsByClip[clipUuid]}this._removeInactiveBindingsForAction(action)}_removeInactiveBindingsForAction(action){const bindings=action._propertyBindings;for(let i=0,n=bindings.length;i!==n;++i){const binding=bindings[i];if(--binding.referenceCount===0){this._removeInactiveBinding(binding)}}}_lendAction(action){const actions=this._actions,prevIndex=action._cacheIndex,lastActiveIndex=this._nActiveActions++,firstInactiveAction=actions[lastActiveIndex];action._cacheIndex=lastActiveIndex;actions[lastActiveIndex]=action;firstInactiveAction._cacheIndex=prevIndex;actions[prevIndex]=firstInactiveAction}_takeBackAction(action){const actions=this._actions,prevIndex=action._cacheIndex,firstInactiveIndex=--this._nActiveActions,lastActiveAction=actions[firstInactiveIndex];action._cacheIndex=firstInactiveIndex;actions[firstInactiveIndex]=action;lastActiveAction._cacheIndex=prevIndex;actions[prevIndex]=lastActiveAction}_addInactiveBinding(binding,rootUuid,trackName){const bindingsByRoot=this._bindingsByRootAndName,bindings=this._bindings;let bindingByName=bindingsByRoot[rootUuid];if(bindingByName===undefined){bindingByName={};bindingsByRoot[rootUuid]=bindingByName}bindingByName[trackName]=binding;binding._cacheIndex=bindings.length;bindings.push(binding)}_removeInactiveBinding(binding){const bindings=this._bindings,propBinding=binding.binding,rootUuid=propBinding.rootNode.uuid,trackName=propBinding.path,bindingsByRoot=this._bindingsByRootAndName,bindingByName=bindingsByRoot[rootUuid],lastInactiveBinding=bindings[bindings.length-1],cacheIndex=binding._cacheIndex;lastInactiveBinding._cacheIndex=cacheIndex;bindings[cacheIndex]=lastInactiveBinding;bindings.pop();delete bindingByName[trackName];if(Object.keys(bindingByName).length===0){delete bindingsByRoot[rootUuid]}}_lendBinding(binding){const bindings=this._bindings,prevIndex=binding._cacheIndex,lastActiveIndex=this._nActiveBindings++,firstInactiveBinding=bindings[lastActiveIndex];binding._cacheIndex=lastActiveIndex;bindings[lastActiveIndex]=binding;firstInactiveBinding._cacheIndex=prevIndex;bindings[prevIndex]=firstInactiveBinding}_takeBackBinding(binding){const bindings=this._bindings,prevIndex=binding._cacheIndex,firstInactiveIndex=--this._nActiveBindings,lastActiveBinding=bindings[firstInactiveIndex];binding._cacheIndex=firstInactiveIndex;bindings[firstInactiveIndex]=binding;lastActiveBinding._cacheIndex=prevIndex;bindings[prevIndex]=lastActiveBinding}_lendControlInterpolant(){const interpolants=this._controlInterpolants,lastActiveIndex=this._nActiveControlInterpolants++;let interpolant=interpolants[lastActiveIndex];if(interpolant===undefined){interpolant=new LinearInterpolant(new Float32Array(2),new Float32Array(2),1,_controlInterpolantsResultBuffer);interpolant.__cacheIndex=lastActiveIndex;interpolants[lastActiveIndex]=interpolant}return interpolant}_takeBackControlInterpolant(interpolant){const interpolants=this._controlInterpolants,prevIndex=interpolant.__cacheIndex,firstInactiveIndex=--this._nActiveControlInterpolants,lastActiveInterpolant=interpolants[firstInactiveIndex];interpolant.__cacheIndex=firstInactiveIndex;interpolants[firstInactiveIndex]=interpolant;lastActiveInterpolant.__cacheIndex=prevIndex;interpolants[prevIndex]=lastActiveInterpolant}clipAction(clip,optionalRoot,blendMode){const root=optionalRoot||this._root,rootUuid=root.uuid;let clipObject=typeof clip==="string"?AnimationClip.findByName(root,clip):clip;const clipUuid=clipObject!==null?clipObject.uuid:clip;const actionsForClip=this._actionsByClip[clipUuid];let prototypeAction=null;if(blendMode===undefined){if(clipObject!==null){blendMode=clipObject.blendMode}else{blendMode=NormalAnimationBlendMode}}if(actionsForClip!==undefined){const existingAction=actionsForClip.actionByRoot[rootUuid];if(existingAction!==undefined&&existingAction.blendMode===blendMode){return existingAction}prototypeAction=actionsForClip.knownActions[0];if(clipObject===null)clipObject=prototypeAction._clip}if(clipObject===null)return null;const newAction=new AnimationAction(this,clipObject,optionalRoot,blendMode);this._bindAction(newAction,prototypeAction);this._addInactiveAction(newAction,clipUuid,rootUuid);return newAction}existingAction(clip,optionalRoot){const root=optionalRoot||this._root,rootUuid=root.uuid,clipObject=typeof clip==="string"?AnimationClip.findByName(root,clip):clip,clipUuid=clipObject?clipObject.uuid:clip,actionsForClip=this._actionsByClip[clipUuid];if(actionsForClip!==undefined){return actionsForClip.actionByRoot[rootUuid]||null}return null}stopAllAction(){const actions=this._actions,nActions=this._nActiveActions;for(let i=nActions-1;i>=0;--i){actions[i].stop()}return this}update(deltaTime){deltaTime*=this.timeScale;const actions=this._actions,nActions=this._nActiveActions,time=this.time+=deltaTime,timeDirection=Math.sign(deltaTime),accuIndex=this._accuIndex^=1;for(let i=0;i!==nActions;++i){const action=actions[i];action._update(time,deltaTime,timeDirection,accuIndex)}const bindings=this._bindings,nBindings=this._nActiveBindings;for(let i=0;i!==nBindings;++i){bindings[i].apply(accuIndex)}return this}setTime(timeInSeconds){this.time=0;for(let i=0;i<this._actions.length;i++){this._actions[i].time=0}return this.update(timeInSeconds)}getRoot(){return this._root}uncacheClip(clip){const actions=this._actions,clipUuid=clip.uuid,actionsByClip=this._actionsByClip,actionsForClip=actionsByClip[clipUuid];if(actionsForClip!==undefined){const actionsToRemove=actionsForClip.knownActions;for(let i=0,n=actionsToRemove.length;i!==n;++i){const action=actionsToRemove[i];this._deactivateAction(action);const cacheIndex=action._cacheIndex,lastInactiveAction=actions[actions.length-1];action._cacheIndex=null;action._byClipCacheIndex=null;lastInactiveAction._cacheIndex=cacheIndex;actions[cacheIndex]=lastInactiveAction;actions.pop();this._removeInactiveBindingsForAction(action)}delete actionsByClip[clipUuid]}}uncacheRoot(root){const rootUuid=root.uuid,actionsByClip=this._actionsByClip;for(const clipUuid in actionsByClip){const actionByRoot=actionsByClip[clipUuid].actionByRoot,action=actionByRoot[rootUuid];if(action!==undefined){this._deactivateAction(action);this._removeInactiveAction(action)}}const bindingsByRoot=this._bindingsByRootAndName,bindingByName=bindingsByRoot[rootUuid];if(bindingByName!==undefined){for(const trackName in bindingByName){const binding=bindingByName[trackName];binding.restoreOriginalState();this._removeInactiveBinding(binding)}}}uncacheAction(clip,optionalRoot){const action=this.existingAction(clip,optionalRoot);if(action!==null){this._deactivateAction(action);this._removeInactiveAction(action)}}}class Uniform{constructor(value){this.value=value}clone(){return new Uniform(this.value.clone===undefined?this.value:this.value.clone())}}let _id=0;class UniformsGroup extends EventDispatcher{constructor(){super();this.isUniformsGroup=true;Object.defineProperty(this,"id",{value:_id++});this.name="";this.usage=StaticDrawUsage;this.uniforms=[]}add(uniform){this.uniforms.push(uniform);return this}remove(uniform){const index=this.uniforms.indexOf(uniform);if(index!==-1)this.uniforms.splice(index,1);return this}setName(name){this.name=name;return this}setUsage(value){this.usage=value;return this}dispose(){this.dispatchEvent({type:"dispose"});return this}copy(source){this.name=source.name;this.usage=source.usage;const uniformsSource=source.uniforms;this.uniforms.length=0;for(let i=0,l=uniformsSource.length;i<l;i++){const uniforms=Array.isArray(uniformsSource[i])?uniformsSource[i]:[uniformsSource[i]];for(let j=0;j<uniforms.length;j++){this.uniforms.push(uniforms[j].clone())}}return this}clone(){return new this.constructor().copy(this)}}class InstancedInterleavedBuffer extends InterleavedBuffer{constructor(array,stride,meshPerAttribute=1){super(array,stride);this.isInstancedInterleavedBuffer=true;this.meshPerAttribute=meshPerAttribute}copy(source){super.copy(source);this.meshPerAttribute=source.meshPerAttribute;return this}clone(data){const ib=super.clone(data);ib.meshPerAttribute=this.meshPerAttribute;return ib}toJSON(data){const json=super.toJSON(data);json.isInstancedInterleavedBuffer=true;json.meshPerAttribute=this.meshPerAttribute;return json}}class GLBufferAttribute{constructor(buffer,type,itemSize,elementSize,count){this.isGLBufferAttribute=true;this.name="";this.buffer=buffer;this.type=type;this.itemSize=itemSize;this.elementSize=elementSize;this.count=count;this.version=0}set needsUpdate(value){if(value===true)this.version++}setBuffer(buffer){this.buffer=buffer;return this}setType(type,elementSize){this.type=type;this.elementSize=elementSize;return this}setItemSize(itemSize){this.itemSize=itemSize;return this}setCount(count){this.count=count;return this}}const _matrix=new Matrix4;class Raycaster{constructor(origin,direction,near=0,far=Infinity){this.ray=new Ray(origin,direction);this.near=near;this.far=far;this.camera=null;this.layers=new Layers;this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(origin,direction){this.ray.set(origin,direction)}setFromCamera(coords,camera){if(camera.isPerspectiveCamera){this.ray.origin.setFromMatrixPosition(camera.matrixWorld);this.ray.direction.set(coords.x,coords.y,0.5).unproject(camera).sub(this.ray.origin).normalize();this.camera=camera}else if(camera.isOrthographicCamera){this.ray.origin.set(coords.x,coords.y,(camera.near+camera.far)/(camera.near-camera.far)).unproject(camera);this.ray.direction.set(0,0,-1).transformDirection(camera.matrixWorld);this.camera=camera}else{console.error("THREE.Raycaster: Unsupported camera type: "+camera.type)}}setFromXRController(controller){_matrix.identity().extractRotation(controller.matrixWorld);this.ray.origin.setFromMatrixPosition(controller.matrixWorld);this.ray.direction.set(0,0,-1).applyMatrix4(_matrix);return this}intersectObject(object,recursive=true,intersects=[]){intersect(object,this,intersects,recursive);intersects.sort(ascSort);return intersects}intersectObjects(objects,recursive=true,intersects=[]){for(let i=0,l=objects.length;i<l;i++){intersect(objects[i],this,intersects,recursive)}intersects.sort(ascSort);return intersects}}function ascSort(a,b){return a.distance-b.distance}function intersect(object,raycaster,intersects,recursive){let propagate=true;if(object.layers.test(raycaster.layers)){const result=object.raycast(raycaster,intersects);if(result===false)propagate=false}if(propagate===true&&recursive===true){const children=object.children;for(let i=0,l=children.length;i<l;i++){intersect(children[i],raycaster,intersects,true)}}}class Spherical{constructor(radius=1,phi=0,theta=0){this.radius=radius;this.phi=phi;this.theta=theta;return this}set(radius,phi,theta){this.radius=radius;this.phi=phi;this.theta=theta;return this}copy(other){this.radius=other.radius;this.phi=other.phi;this.theta=other.theta;return this}makeSafe(){const EPS=0.000001;this.phi=Math.max(EPS,Math.min(Math.PI-EPS,this.phi));return this}setFromVector3(v){return this.setFromCartesianCoords(v.x,v.y,v.z)}setFromCartesianCoords(x,y,z){this.radius=Math.sqrt(x*x+y*y+z*z);if(this.radius===0){this.theta=0;this.phi=0}else{this.theta=Math.atan2(x,z);this.phi=Math.acos(clamp(y/this.radius,-1,1))}return this}clone(){return new this.constructor().copy(this)}}class Cylindrical{constructor(radius=1,theta=0,y=0){this.radius=radius;this.theta=theta;this.y=y;return this}set(radius,theta,y){this.radius=radius;this.theta=theta;this.y=y;return this}copy(other){this.radius=other.radius;this.theta=other.theta;this.y=other.y;return this}setFromVector3(v){return this.setFromCartesianCoords(v.x,v.y,v.z)}setFromCartesianCoords(x,y,z){this.radius=Math.sqrt(x*x+z*z);this.theta=Math.atan2(x,z);this.y=y;return this}clone(){return new this.constructor().copy(this)}}class Matrix2{constructor(n11,n12,n21,n22){Matrix2.prototype.isMatrix2=true;this.elements=[1,0,0,1];if(n11!==undefined){this.set(n11,n12,n21,n22)}}identity(){this.set(1,0,0,1);return this}fromArray(array,offset=0){for(let i=0;i<4;i++){this.elements[i]=array[i+offset]}return this}set(n11,n12,n21,n22){const te=this.elements;te[0]=n11;te[2]=n12;te[1]=n21;te[3]=n22;return this}}const _vector$4=new Vector2;class Box2{constructor(min=new Vector2(+Infinity,+Infinity),max=new Vector2(-Infinity,-Infinity)){this.isBox2=true;this.min=min;this.max=max}set(min,max){this.min.copy(min);this.max.copy(max);return this}setFromPoints(points){this.makeEmpty();for(let i=0,il=points.length;i<il;i++){this.expandByPoint(points[i])}return this}setFromCenterAndSize(center,size){const halfSize=_vector$4.copy(size).multiplyScalar(0.5);this.min.copy(center).sub(halfSize);this.max.copy(center).add(halfSize);return this}clone(){return new this.constructor().copy(this)}copy(box){this.min.copy(box.min);this.max.copy(box.max);return this}makeEmpty(){this.min.x=this.min.y=+Infinity;this.max.x=this.max.y=-Infinity;return this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(target){return this.isEmpty()?target.set(0,0):target.addVectors(this.min,this.max).multiplyScalar(0.5)}getSize(target){return this.isEmpty()?target.set(0,0):target.subVectors(this.max,this.min)}expandByPoint(point){this.min.min(point);this.max.max(point);return this}expandByVector(vector){this.min.sub(vector);this.max.add(vector);return this}expandByScalar(scalar){this.min.addScalar(-scalar);this.max.addScalar(scalar);return this}containsPoint(point){return point.x>=this.min.x&&point.x<=this.max.x&&point.y>=this.min.y&&point.y<=this.max.y}containsBox(box){return this.min.x<=box.min.x&&box.max.x<=this.max.x&&this.min.y<=box.min.y&&box.max.y<=this.max.y}getParameter(point,target){return target.set((point.x-this.min.x)/(this.max.x-this.min.x),(point.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(box){return box.max.x>=this.min.x&&box.min.x<=this.max.x&&box.max.y>=this.min.y&&box.min.y<=this.max.y}clampPoint(point,target){return target.copy(point).clamp(this.min,this.max)}distanceToPoint(point){return this.clampPoint(point,_vector$4).distanceTo(point)}intersect(box){this.min.max(box.min);this.max.min(box.max);if(this.isEmpty())this.makeEmpty();return this}union(box){this.min.min(box.min);this.max.max(box.max);return this}translate(offset){this.min.add(offset);this.max.add(offset);return this}equals(box){return box.min.equals(this.min)&&box.max.equals(this.max)}}const _startP=new Vector3;const _startEnd=new Vector3;class Line3{constructor(start=new Vector3,end=new Vector3){this.start=start;this.end=end}set(start,end){this.start.copy(start);this.end.copy(end);return this}copy(line){this.start.copy(line.start);this.end.copy(line.end);return this}getCenter(target){return target.addVectors(this.start,this.end).multiplyScalar(0.5)}delta(target){return target.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,target){return this.delta(target).multiplyScalar(t).add(this.start)}closestPointToPointParameter(point,clampToLine){_startP.subVectors(point,this.start);_startEnd.subVectors(this.end,this.start);const startEnd2=_startEnd.dot(_startEnd);const startEnd_startP=_startEnd.dot(_startP);let t=startEnd_startP/startEnd2;if(clampToLine){t=clamp(t,0,1)}return t}closestPointToPoint(point,clampToLine,target){const t=this.closestPointToPointParameter(point,clampToLine);return this.delta(target).multiplyScalar(t).add(this.start)}applyMatrix4(matrix){this.start.applyMatrix4(matrix);this.end.applyMatrix4(matrix);return this}equals(line){return line.start.equals(this.start)&&line.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const _vector$3=new Vector3;class SpotLightHelper extends Object3D{constructor(light,color){super();this.light=light;this.matrixAutoUpdate=false;this.color=color;this.type="SpotLightHelper";const geometry=new BufferGeometry;const positions=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let i=0,j=1,l=32;i<l;i++,j++){const p1=i/l*Math.PI*2;const p2=j/l*Math.PI*2;positions.push(Math.cos(p1),Math.sin(p1),1,Math.cos(p2),Math.sin(p2),1)}geometry.setAttribute("position",new Float32BufferAttribute(positions,3));const material=new LineBasicMaterial({fog:false,toneMapped:false});this.cone=new LineSegments(geometry,material);this.add(this.cone);this.update()}dispose(){this.cone.geometry.dispose();this.cone.material.dispose()}update(){this.light.updateWorldMatrix(true,false);this.light.target.updateWorldMatrix(true,false);if(this.parent){this.parent.updateWorldMatrix(true);this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)}else{this.matrix.copy(this.light.matrixWorld)}this.matrixWorld.copy(this.light.matrixWorld);const coneLength=this.light.distance?this.light.distance:1000;const coneWidth=coneLength*Math.tan(this.light.angle);this.cone.scale.set(coneWidth,coneWidth,coneLength);_vector$3.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(_vector$3);if(this.color!==undefined){this.cone.material.color.set(this.color)}else{this.cone.material.color.copy(this.light.color)}}}const _vector$2=new Vector3;const _boneMatrix=new Matrix4;const _matrixWorldInv=new Matrix4;class SkeletonHelper extends LineSegments{constructor(object){const bones=getBoneList(object);const geometry=new BufferGeometry;const vertices=[];const colors=[];const color1=new Color(0,0,1);const color2=new Color(0,1,0);for(let i=0;i<bones.length;i++){const bone=bones[i];if(bone.parent&&bone.parent.isBone){vertices.push(0,0,0);vertices.push(0,0,0);colors.push(color1.r,color1.g,color1.b);colors.push(color2.r,color2.g,color2.b)}}geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,depthTest:false,depthWrite:false,toneMapped:false,transparent:true});super(geometry,material);this.isSkeletonHelper=true;this.type="SkeletonHelper";this.root=object;this.bones=bones;this.matrix=object.matrixWorld;this.matrixAutoUpdate=false}updateMatrixWorld(force){const bones=this.bones;const geometry=this.geometry;const position=geometry.getAttribute("position");_matrixWorldInv.copy(this.root.matrixWorld).invert();for(let i=0,j=0;i<bones.length;i++){const bone=bones[i];if(bone.parent&&bone.parent.isBone){_boneMatrix.multiplyMatrices(_matrixWorldInv,bone.matrixWorld);_vector$2.setFromMatrixPosition(_boneMatrix);position.setXYZ(j,_vector$2.x,_vector$2.y,_vector$2.z);_boneMatrix.multiplyMatrices(_matrixWorldInv,bone.parent.matrixWorld);_vector$2.setFromMatrixPosition(_boneMatrix);position.setXYZ(j+1,_vector$2.x,_vector$2.y,_vector$2.z);j+=2}}geometry.getAttribute("position").needsUpdate=true;super.updateMatrixWorld(force)}dispose(){this.geometry.dispose();this.material.dispose()}}function getBoneList(object){const boneList=[];if(object.isBone===true){boneList.push(object)}for(let i=0;i<object.children.length;i++){boneList.push.apply(boneList,getBoneList(object.children[i]))}return boneList}class PointLightHelper extends Mesh{constructor(light,sphereSize,color){const geometry=new SphereGeometry(sphereSize,4,2);const material=new MeshBasicMaterial({wireframe:true,fog:false,toneMapped:false});super(geometry,material);this.light=light;this.color=color;this.type="PointLightHelper";this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=false;this.update()}dispose(){this.geometry.dispose();this.material.dispose()}update(){this.light.updateWorldMatrix(true,false);if(this.color!==undefined){this.material.color.set(this.color)}else{this.material.color.copy(this.light.color)}}}const _vector$1=new Vector3;const _color1=new Color;const _color2=new Color;class HemisphereLightHelper extends Object3D{constructor(light,size,color){super();this.light=light;this.matrix=light.matrixWorld;this.matrixAutoUpdate=false;this.color=color;this.type="HemisphereLightHelper";const geometry=new OctahedronGeometry(size);geometry.rotateY(Math.PI*0.5);this.material=new MeshBasicMaterial({wireframe:true,fog:false,toneMapped:false});if(this.color===undefined)this.material.vertexColors=true;const position=geometry.getAttribute("position");const colors=new Float32Array(position.count*3);geometry.setAttribute("color",new BufferAttribute(colors,3));this.add(new Mesh(geometry,this.material));this.update()}dispose(){this.children[0].geometry.dispose();this.children[0].material.dispose()}update(){const mesh=this.children[0];if(this.color!==undefined){this.material.color.set(this.color)}else{const colors=mesh.geometry.getAttribute("color");_color1.copy(this.light.color);_color2.copy(this.light.groundColor);for(let i=0,l=colors.count;i<l;i++){const color=i<l/2?_color1:_color2;colors.setXYZ(i,color.r,color.g,color.b)}colors.needsUpdate=true}this.light.updateWorldMatrix(true,false);mesh.lookAt(_vector$1.setFromMatrixPosition(this.light.matrixWorld).negate())}}class GridHelper extends LineSegments{constructor(size=10,divisions=10,color1=4473924,color2=8947848){color1=new Color(color1);color2=new Color(color2);const center=divisions/2;const step=size/divisions;const halfSize=size/2;const vertices=[],colors=[];for(let i=0,j=0,k=-halfSize;i<=divisions;i++,k+=step){vertices.push(-halfSize,0,k,halfSize,0,k);vertices.push(k,0,-halfSize,k,0,halfSize);const color=i===center?color1:color2;color.toArray(colors,j);j+=3;color.toArray(colors,j);j+=3;color.toArray(colors,j);j+=3;color.toArray(colors,j);j+=3}const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,toneMapped:false});super(geometry,material);this.type="GridHelper"}dispose(){this.geometry.dispose();this.material.dispose()}}class PolarGridHelper extends LineSegments{constructor(radius=10,sectors=16,rings=8,divisions=64,color1=4473924,color2=8947848){color1=new Color(color1);color2=new Color(color2);const vertices=[];const colors=[];if(sectors>1){for(let i=0;i<sectors;i++){const v=i/sectors*(Math.PI*2);const x=Math.sin(v)*radius;const z=Math.cos(v)*radius;vertices.push(0,0,0);vertices.push(x,0,z);const color=i&1?color1:color2;colors.push(color.r,color.g,color.b);colors.push(color.r,color.g,color.b)}}for(let i=0;i<rings;i++){const color=i&1?color1:color2;const r=radius-radius/rings*i;for(let j=0;j<divisions;j++){let v=j/divisions*(Math.PI*2);let x=Math.sin(v)*r;let z=Math.cos(v)*r;vertices.push(x,0,z);colors.push(color.r,color.g,color.b);v=(j+1)/divisions*(Math.PI*2);x=Math.sin(v)*r;z=Math.cos(v)*r;vertices.push(x,0,z);colors.push(color.r,color.g,color.b)}}const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,toneMapped:false});super(geometry,material);this.type="PolarGridHelper"}dispose(){this.geometry.dispose();this.material.dispose()}}const _v1=new Vector3;const _v2=new Vector3;const _v3=new Vector3;class DirectionalLightHelper extends Object3D{constructor(light,size,color){super();this.light=light;this.matrix=light.matrixWorld;this.matrixAutoUpdate=false;this.color=color;this.type="DirectionalLightHelper";if(size===undefined)size=1;let geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute([-size,size,0,size,size,0,size,-size,0,-size,-size,0,-size,size,0],3));const material=new LineBasicMaterial({fog:false,toneMapped:false});this.lightPlane=new Line(geometry,material);this.add(this.lightPlane);geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute([0,0,0,0,0,1],3));this.targetLine=new Line(geometry,material);this.add(this.targetLine);this.update()}dispose(){this.lightPlane.geometry.dispose();this.lightPlane.material.dispose();this.targetLine.geometry.dispose();this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(true,false);this.light.target.updateWorldMatrix(true,false);_v1.setFromMatrixPosition(this.light.matrixWorld);_v2.setFromMatrixPosition(this.light.target.matrixWorld);_v3.subVectors(_v2,_v1);this.lightPlane.lookAt(_v2);if(this.color!==undefined){this.lightPlane.material.color.set(this.color);this.targetLine.material.color.set(this.color)}else{this.lightPlane.material.color.copy(this.light.color);this.targetLine.material.color.copy(this.light.color)}this.targetLine.lookAt(_v2);this.targetLine.scale.z=_v3.length()}}const _vector=new Vector3;const _camera=new Camera;class CameraHelper extends LineSegments{constructor(camera){const geometry=new BufferGeometry;const material=new LineBasicMaterial({color:16777215,vertexColors:true,toneMapped:false});const vertices=[];const colors=[];const pointMap={};addLine("n1","n2");addLine("n2","n4");addLine("n4","n3");addLine("n3","n1");addLine("f1","f2");addLine("f2","f4");addLine("f4","f3");addLine("f3","f1");addLine("n1","f1");addLine("n2","f2");addLine("n3","f3");addLine("n4","f4");addLine("p","n1");addLine("p","n2");addLine("p","n3");addLine("p","n4");addLine("u1","u2");addLine("u2","u3");addLine("u3","u1");addLine("c","t");addLine("p","c");addLine("cn1","cn2");addLine("cn3","cn4");addLine("cf1","cf2");addLine("cf3","cf4");function addLine(a,b){addPoint(a);addPoint(b)}function addPoint(id){vertices.push(0,0,0);colors.push(0,0,0);if(pointMap[id]===undefined){pointMap[id]=[]}pointMap[id].push(vertices.length/3-1)}geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));super(geometry,material);this.type="CameraHelper";this.camera=camera;if(this.camera.updateProjectionMatrix)this.camera.updateProjectionMatrix();this.matrix=camera.matrixWorld;this.matrixAutoUpdate=false;this.pointMap=pointMap;this.update();const colorFrustum=new Color(16755200);const colorCone=new Color(16711680);const colorUp=new Color(43775);const colorTarget=new Color(16777215);const colorCross=new Color(3355443);this.setColors(colorFrustum,colorCone,colorUp,colorTarget,colorCross)}setColors(frustum,cone,up,target,cross){const geometry=this.geometry;const colorAttribute=geometry.getAttribute("color");colorAttribute.setXYZ(0,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(1,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(2,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(3,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(4,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(5,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(6,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(7,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(8,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(9,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(10,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(11,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(12,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(13,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(14,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(15,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(16,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(17,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(18,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(19,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(20,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(21,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(22,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(23,frustum.r,frustum.g,frustum.b);colorAttribute.setXYZ(24,cone.r,cone.g,cone.b);colorAttribute.setXYZ(25,cone.r,cone.g,cone.b);colorAttribute.setXYZ(26,cone.r,cone.g,cone.b);colorAttribute.setXYZ(27,cone.r,cone.g,cone.b);colorAttribute.setXYZ(28,cone.r,cone.g,cone.b);colorAttribute.setXYZ(29,cone.r,cone.g,cone.b);colorAttribute.setXYZ(30,cone.r,cone.g,cone.b);colorAttribute.setXYZ(31,cone.r,cone.g,cone.b);colorAttribute.setXYZ(32,up.r,up.g,up.b);colorAttribute.setXYZ(33,up.r,up.g,up.b);colorAttribute.setXYZ(34,up.r,up.g,up.b);colorAttribute.setXYZ(35,up.r,up.g,up.b);colorAttribute.setXYZ(36,up.r,up.g,up.b);colorAttribute.setXYZ(37,up.r,up.g,up.b);colorAttribute.setXYZ(38,target.r,target.g,target.b);colorAttribute.setXYZ(39,target.r,target.g,target.b);colorAttribute.setXYZ(40,cross.r,cross.g,cross.b);colorAttribute.setXYZ(41,cross.r,cross.g,cross.b);colorAttribute.setXYZ(42,cross.r,cross.g,cross.b);colorAttribute.setXYZ(43,cross.r,cross.g,cross.b);colorAttribute.setXYZ(44,cross.r,cross.g,cross.b);colorAttribute.setXYZ(45,cross.r,cross.g,cross.b);colorAttribute.setXYZ(46,cross.r,cross.g,cross.b);colorAttribute.setXYZ(47,cross.r,cross.g,cross.b);colorAttribute.setXYZ(48,cross.r,cross.g,cross.b);colorAttribute.setXYZ(49,cross.r,cross.g,cross.b);colorAttribute.needsUpdate=true}update(){const geometry=this.geometry;const pointMap=this.pointMap;const w=1,h=1;_camera.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);setPoint("c",pointMap,geometry,_camera,0,0,-1);setPoint("t",pointMap,geometry,_camera,0,0,1);setPoint("n1",pointMap,geometry,_camera,-w,-h,-1);setPoint("n2",pointMap,geometry,_camera,w,-h,-1);setPoint("n3",pointMap,geometry,_camera,-w,h,-1);setPoint("n4",pointMap,geometry,_camera,w,h,-1);setPoint("f1",pointMap,geometry,_camera,-w,-h,1);setPoint("f2",pointMap,geometry,_camera,w,-h,1);setPoint("f3",pointMap,geometry,_camera,-w,h,1);setPoint("f4",pointMap,geometry,_camera,w,h,1);setPoint("u1",pointMap,geometry,_camera,w*0.7,h*1.1,-1);setPoint("u2",pointMap,geometry,_camera,-w*0.7,h*1.1,-1);setPoint("u3",pointMap,geometry,_camera,0,h*2,-1);setPoint("cf1",pointMap,geometry,_camera,-w,0,1);setPoint("cf2",pointMap,geometry,_camera,w,0,1);setPoint("cf3",pointMap,geometry,_camera,0,-h,1);setPoint("cf4",pointMap,geometry,_camera,0,h,1);setPoint("cn1",pointMap,geometry,_camera,-w,0,-1);setPoint("cn2",pointMap,geometry,_camera,w,0,-1);setPoint("cn3",pointMap,geometry,_camera,0,-h,-1);setPoint("cn4",pointMap,geometry,_camera,0,h,-1);geometry.getAttribute("position").needsUpdate=true}dispose(){this.geometry.dispose();this.material.dispose()}}function setPoint(point,pointMap,geometry,camera,x,y,z){_vector.set(x,y,z).unproject(camera);const points=pointMap[point];if(points!==undefined){const position=geometry.getAttribute("position");for(let i=0,l=points.length;i<l;i++){position.setXYZ(points[i],_vector.x,_vector.y,_vector.z)}}}const _box=new Box3;class BoxHelper extends LineSegments{constructor(object,color=16776960){const indices=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);const positions=new Float32Array(8*3);const geometry=new BufferGeometry;geometry.setIndex(new BufferAttribute(indices,1));geometry.setAttribute("position",new BufferAttribute(positions,3));super(geometry,new LineBasicMaterial({color:color,toneMapped:false}));this.object=object;this.type="BoxHelper";this.matrixAutoUpdate=false;this.update()}update(object){if(object!==undefined){console.warn("THREE.BoxHelper: .update() has no longer arguments.")}if(this.object!==undefined){_box.setFromObject(this.object)}if(_box.isEmpty())return;const min=_box.min;const max=_box.max;const position=this.geometry.attributes.position;const array=position.array;array[0]=max.x;array[1]=max.y;array[2]=max.z;array[3]=min.x;array[4]=max.y;array[5]=max.z;array[6]=min.x;array[7]=min.y;array[8]=max.z;array[9]=max.x;array[10]=min.y;array[11]=max.z;array[12]=max.x;array[13]=max.y;array[14]=min.z;array[15]=min.x;array[16]=max.y;array[17]=min.z;array[18]=min.x;array[19]=min.y;array[20]=min.z;array[21]=max.x;array[22]=min.y;array[23]=min.z;position.needsUpdate=true;this.geometry.computeBoundingSphere()}setFromObject(object){this.object=object;this.update();return this}copy(source,recursive){super.copy(source,recursive);this.object=source.object;return this}dispose(){this.geometry.dispose();this.material.dispose()}}class Box3Helper extends LineSegments{constructor(box,color=16776960){const indices=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);const positions=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1];const geometry=new BufferGeometry;geometry.setIndex(new BufferAttribute(indices,1));geometry.setAttribute("position",new Float32BufferAttribute(positions,3));super(geometry,new LineBasicMaterial({color:color,toneMapped:false}));this.box=box;this.type="Box3Helper";this.geometry.computeBoundingSphere()}updateMatrixWorld(force){const box=this.box;if(box.isEmpty())return;box.getCenter(this.position);box.getSize(this.scale);this.scale.multiplyScalar(0.5);super.updateMatrixWorld(force)}dispose(){this.geometry.dispose();this.material.dispose()}}class PlaneHelper extends Line{constructor(plane,size=1,hex=16776960){const color=hex;const positions=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0];const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(positions,3));geometry.computeBoundingSphere();super(geometry,new LineBasicMaterial({color:color,toneMapped:false}));this.type="PlaneHelper";this.plane=plane;this.size=size;const positions2=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0];const geometry2=new BufferGeometry;geometry2.setAttribute("position",new Float32BufferAttribute(positions2,3));geometry2.computeBoundingSphere();this.add(new Mesh(geometry2,new MeshBasicMaterial({color:color,opacity:0.2,transparent:true,depthWrite:false,toneMapped:false})))}updateMatrixWorld(force){this.position.set(0,0,0);this.scale.set(0.5*this.size,0.5*this.size,1);this.lookAt(this.plane.normal);this.translateZ(-this.plane.constant);super.updateMatrixWorld(force)}dispose(){this.geometry.dispose();this.material.dispose();this.children[0].geometry.dispose();this.children[0].material.dispose()}}const _axis=new Vector3;let _lineGeometry,_coneGeometry;class ArrowHelper extends Object3D{constructor(dir=new Vector3(0,0,1),origin=new Vector3(0,0,0),length=1,color=16776960,headLength=length*0.2,headWidth=headLength*0.2){super();this.type="ArrowHelper";if(_lineGeometry===undefined){_lineGeometry=new BufferGeometry;_lineGeometry.setAttribute("position",new Float32BufferAttribute([0,0,0,0,1,0],3));_coneGeometry=new CylinderGeometry(0,0.5,1,5,1);_coneGeometry.translate(0,-0.5,0)}this.position.copy(origin);this.line=new Line(_lineGeometry,new LineBasicMaterial({color:color,toneMapped:false}));this.line.matrixAutoUpdate=false;this.add(this.line);this.cone=new Mesh(_coneGeometry,new MeshBasicMaterial({color:color,toneMapped:false}));this.cone.matrixAutoUpdate=false;this.add(this.cone);this.setDirection(dir);this.setLength(length,headLength,headWidth)}setDirection(dir){if(dir.y>0.99999){this.quaternion.set(0,0,0,1)}else if(dir.y<-0.99999){this.quaternion.set(1,0,0,0)}else{_axis.set(dir.z,0,-dir.x).normalize();const radians=Math.acos(dir.y);this.quaternion.setFromAxisAngle(_axis,radians)}}setLength(length,headLength=length*0.2,headWidth=headLength*0.2){this.line.scale.set(1,Math.max(0.0001,length-headLength),1);this.line.updateMatrix();this.cone.scale.set(headWidth,headLength,headWidth);this.cone.position.y=length;this.cone.updateMatrix()}setColor(color){this.line.material.color.set(color);this.cone.material.color.set(color)}copy(source){super.copy(source,false);this.line.copy(source.line);this.cone.copy(source.cone);return this}dispose(){this.line.geometry.dispose();this.line.material.dispose();this.cone.geometry.dispose();this.cone.material.dispose()}}class AxesHelper extends LineSegments{constructor(size=1){const vertices=[0,0,0,size,0,0,0,0,0,0,size,0,0,0,0,0,0,size];const colors=[1,0,0,1,0.6,0,0,1,0,0.6,1,0,0,0,1,0,0.6,1];const geometry=new BufferGeometry;geometry.setAttribute("position",new Float32BufferAttribute(vertices,3));geometry.setAttribute("color",new Float32BufferAttribute(colors,3));const material=new LineBasicMaterial({vertexColors:true,toneMapped:false});super(geometry,material);this.type="AxesHelper"}setColors(xAxisColor,yAxisColor,zAxisColor){const color=new Color;const array=this.geometry.attributes.color.array;color.set(xAxisColor);color.toArray(array,0);color.toArray(array,3);color.set(yAxisColor);color.toArray(array,6);color.toArray(array,9);color.set(zAxisColor);color.toArray(array,12);color.toArray(array,15);this.geometry.attributes.color.needsUpdate=true;return this}dispose(){this.geometry.dispose();this.material.dispose()}}class ShapePath{constructor(){this.type="ShapePath";this.color=new Color;this.subPaths=[];this.currentPath=null}moveTo(x,y){this.currentPath=new Path;this.subPaths.push(this.currentPath);this.currentPath.moveTo(x,y);return this}lineTo(x,y){this.currentPath.lineTo(x,y);return this}quadraticCurveTo(aCPx,aCPy,aX,aY){this.currentPath.quadraticCurveTo(aCPx,aCPy,aX,aY);return this}bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY){this.currentPath.bezierCurveTo(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY);return this}splineThru(pts){this.currentPath.splineThru(pts);return this}toShapes(isCCW){function toShapesNoHoles(inSubpaths){const shapes=[];for(let i=0,l=inSubpaths.length;i<l;i++){const tmpPath=inSubpaths[i];const tmpShape=new Shape;tmpShape.curves=tmpPath.curves;shapes.push(tmpShape)}return shapes}function isPointInsidePolygon(inPt,inPolygon){const polyLen=inPolygon.length;let inside=false;for(let p=polyLen-1,q=0;q<polyLen;p=q++){let edgeLowPt=inPolygon[p];let edgeHighPt=inPolygon[q];let edgeDx=edgeHighPt.x-edgeLowPt.x;let edgeDy=edgeHighPt.y-edgeLowPt.y;if(Math.abs(edgeDy)>Number.EPSILON){if(edgeDy<0){edgeLowPt=inPolygon[q];edgeDx=-edgeDx;edgeHighPt=inPolygon[p];edgeDy=-edgeDy}if(inPt.y<edgeLowPt.y||inPt.y>edgeHighPt.y)continue;if(inPt.y===edgeLowPt.y){if(inPt.x===edgeLowPt.x)return true}else{const perpEdge=edgeDy*(inPt.x-edgeLowPt.x)-edgeDx*(inPt.y-edgeLowPt.y);if(perpEdge===0)return true;if(perpEdge<0)continue;inside=!inside}}else{if(inPt.y!==edgeLowPt.y)continue;if(edgeHighPt.x<=inPt.x&&inPt.x<=edgeLowPt.x||edgeLowPt.x<=inPt.x&&inPt.x<=edgeHighPt.x)return true}}return inside}const isClockWise=ShapeUtils.isClockWise;const subPaths=this.subPaths;if(subPaths.length===0)return[];let solid,tmpPath,tmpShape;const shapes=[];if(subPaths.length===1){tmpPath=subPaths[0];tmpShape=new Shape;tmpShape.curves=tmpPath.curves;shapes.push(tmpShape);return shapes}let holesFirst=!isClockWise(subPaths[0].getPoints());holesFirst=isCCW?!holesFirst:holesFirst;const betterShapeHoles=[];const newShapes=[];let newShapeHoles=[];let mainIdx=0;let tmpPoints;newShapes[mainIdx]=undefined;newShapeHoles[mainIdx]=[];for(let i=0,l=subPaths.length;i<l;i++){tmpPath=subPaths[i];tmpPoints=tmpPath.getPoints();solid=isClockWise(tmpPoints);solid=isCCW?!solid:solid;if(solid){if(!holesFirst&&newShapes[mainIdx])mainIdx++;newShapes[mainIdx]={s:new Shape,p:tmpPoints};newShapes[mainIdx].s.curves=tmpPath.curves;if(holesFirst)mainIdx++;newShapeHoles[mainIdx]=[]}else{newShapeHoles[mainIdx].push({h:tmpPath,p:tmpPoints[0]})}}if(!newShapes[0])return toShapesNoHoles(subPaths);if(newShapes.length>1){let ambiguous=false;let toChange=0;for(let sIdx=0,sLen=newShapes.length;sIdx<sLen;sIdx++){betterShapeHoles[sIdx]=[]}for(let sIdx=0,sLen=newShapes.length;sIdx<sLen;sIdx++){const sho=newShapeHoles[sIdx];for(let hIdx=0;hIdx<sho.length;hIdx++){const ho=sho[hIdx];let hole_unassigned=true;for(let s2Idx=0;s2Idx<newShapes.length;s2Idx++){if(isPointInsidePolygon(ho.p,newShapes[s2Idx].p)){if(sIdx!==s2Idx)toChange++;if(hole_unassigned){hole_unassigned=false;betterShapeHoles[s2Idx].push(ho)}else{ambiguous=true}}}if(hole_unassigned){betterShapeHoles[sIdx].push(ho)}}}if(toChange>0&&ambiguous===false){newShapeHoles=betterShapeHoles}}let tmpHoles;for(let i=0,il=newShapes.length;i<il;i++){tmpShape=newShapes[i].s;shapes.push(tmpShape);tmpHoles=newShapeHoles[i];for(let j=0,jl=tmpHoles.length;j<jl;j++){tmpShape.holes.push(tmpHoles[j].h)}}return shapes}}class Controls extends EventDispatcher{constructor(object,domElement){super();this.object=object;this.domElement=domElement;this.enabled=true;this.state=-1;this.keys={};this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null};this.touches={ONE:null,TWO:null}}connect(){}disconnect(){}dispose(){}update(){}}class WebGLMultipleRenderTargets extends WebGLRenderTarget{constructor(width=1,height=1,count=1,options={}){console.warn("THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the \"count\" parameter to enable MRT.");super(width,height,{...options,count});this.isWebGLMultipleRenderTargets=true}get texture(){return this.textures}}if(typeof __THREE_DEVTOOLS__!=="undefined"){__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:REVISION}}))}if(typeof window!=="undefined"){if(window.__THREE__){console.warn("WARNING: Multiple instances of Three.js being imported.")}else{window.__THREE__=REVISION}}exports.ACESFilmicToneMapping=ACESFilmicToneMapping;exports.AddEquation=AddEquation;exports.AddOperation=AddOperation;exports.AdditiveAnimationBlendMode=AdditiveAnimationBlendMode;exports.AdditiveBlending=AdditiveBlending;exports.AgXToneMapping=AgXToneMapping;exports.AlphaFormat=AlphaFormat;exports.AlwaysCompare=AlwaysCompare;exports.AlwaysDepth=AlwaysDepth;exports.AlwaysStencilFunc=AlwaysStencilFunc;exports.AmbientLight=AmbientLight;exports.AnimationAction=AnimationAction;exports.AnimationClip=AnimationClip;exports.AnimationLoader=AnimationLoader;exports.AnimationMixer=AnimationMixer;exports.AnimationObjectGroup=AnimationObjectGroup;exports.AnimationUtils=AnimationUtils;exports.ArcCurve=ArcCurve;exports.ArrayCamera=ArrayCamera;exports.ArrowHelper=ArrowHelper;exports.AttachedBindMode=AttachedBindMode;exports.Audio=Audio;exports.AudioAnalyser=AudioAnalyser;exports.AudioContext=AudioContext;exports.AudioListener=AudioListener;exports.AudioLoader=AudioLoader;exports.AxesHelper=AxesHelper;exports.BackSide=BackSide;exports.BasicDepthPacking=BasicDepthPacking;exports.BasicShadowMap=BasicShadowMap;exports.BatchedMesh=BatchedMesh;exports.Bone=Bone;exports.BooleanKeyframeTrack=BooleanKeyframeTrack;exports.Box2=Box2;exports.Box3=Box3;exports.Box3Helper=Box3Helper;exports.BoxGeometry=BoxGeometry;exports.BoxHelper=BoxHelper;exports.BufferAttribute=BufferAttribute;exports.BufferGeometry=BufferGeometry;exports.BufferGeometryLoader=BufferGeometryLoader;exports.ByteType=ByteType;exports.Cache=Cache;exports.Camera=Camera;exports.CameraHelper=CameraHelper;exports.CanvasTexture=CanvasTexture;exports.CapsuleGeometry=CapsuleGeometry;exports.CatmullRomCurve3=CatmullRomCurve3;exports.CineonToneMapping=CineonToneMapping;exports.CircleGeometry=CircleGeometry;exports.ClampToEdgeWrapping=ClampToEdgeWrapping;exports.Clock=Clock;exports.Color=Color;exports.ColorKeyframeTrack=ColorKeyframeTrack;exports.ColorManagement=ColorManagement;exports.CompressedArrayTexture=CompressedArrayTexture;exports.CompressedCubeTexture=CompressedCubeTexture;exports.CompressedTexture=CompressedTexture;exports.CompressedTextureLoader=CompressedTextureLoader;exports.ConeGeometry=ConeGeometry;exports.ConstantAlphaFactor=ConstantAlphaFactor;exports.ConstantColorFactor=ConstantColorFactor;exports.Controls=Controls;exports.CubeCamera=CubeCamera;exports.CubeReflectionMapping=CubeReflectionMapping;exports.CubeRefractionMapping=CubeRefractionMapping;exports.CubeTexture=CubeTexture;exports.CubeTextureLoader=CubeTextureLoader;exports.CubeUVReflectionMapping=CubeUVReflectionMapping;exports.CubicBezierCurve=CubicBezierCurve;exports.CubicBezierCurve3=CubicBezierCurve3;exports.CubicInterpolant=CubicInterpolant;exports.CullFaceBack=CullFaceBack;exports.CullFaceFront=CullFaceFront;exports.CullFaceFrontBack=CullFaceFrontBack;exports.CullFaceNone=CullFaceNone;exports.Curve=Curve;exports.CurvePath=CurvePath;exports.CustomBlending=CustomBlending;exports.CustomToneMapping=CustomToneMapping;exports.CylinderGeometry=CylinderGeometry;exports.Cylindrical=Cylindrical;exports.Data3DTexture=Data3DTexture;exports.DataArrayTexture=DataArrayTexture;exports.DataTexture=DataTexture;exports.DataTextureLoader=DataTextureLoader;exports.DataUtils=DataUtils;exports.DecrementStencilOp=DecrementStencilOp;exports.DecrementWrapStencilOp=DecrementWrapStencilOp;exports.DefaultLoadingManager=DefaultLoadingManager;exports.DepthFormat=DepthFormat;exports.DepthStencilFormat=DepthStencilFormat;exports.DepthTexture=DepthTexture;exports.DetachedBindMode=DetachedBindMode;exports.DirectionalLight=DirectionalLight;exports.DirectionalLightHelper=DirectionalLightHelper;exports.DiscreteInterpolant=DiscreteInterpolant;exports.DisplayP3ColorSpace=DisplayP3ColorSpace;exports.DodecahedronGeometry=DodecahedronGeometry;exports.DoubleSide=DoubleSide;exports.DstAlphaFactor=DstAlphaFactor;exports.DstColorFactor=DstColorFactor;exports.DynamicCopyUsage=DynamicCopyUsage;exports.DynamicDrawUsage=DynamicDrawUsage;exports.DynamicReadUsage=DynamicReadUsage;exports.EdgesGeometry=EdgesGeometry;exports.EllipseCurve=EllipseCurve;exports.EqualCompare=EqualCompare;exports.EqualDepth=EqualDepth;exports.EqualStencilFunc=EqualStencilFunc;exports.EquirectangularReflectionMapping=EquirectangularReflectionMapping;exports.EquirectangularRefractionMapping=EquirectangularRefractionMapping;exports.Euler=Euler;exports.EventDispatcher=EventDispatcher;exports.ExtrudeGeometry=ExtrudeGeometry;exports.FileLoader=FileLoader;exports.Float16BufferAttribute=Float16BufferAttribute;exports.Float32BufferAttribute=Float32BufferAttribute;exports.FloatType=FloatType;exports.Fog=Fog;exports.FogExp2=FogExp2;exports.FramebufferTexture=FramebufferTexture;exports.FrontSide=FrontSide;exports.Frustum=Frustum;exports.GLBufferAttribute=GLBufferAttribute;exports.GLSL1=GLSL1;exports.GLSL3=GLSL3;exports.GreaterCompare=GreaterCompare;exports.GreaterDepth=GreaterDepth;exports.GreaterEqualCompare=GreaterEqualCompare;exports.GreaterEqualDepth=GreaterEqualDepth;exports.GreaterEqualStencilFunc=GreaterEqualStencilFunc;exports.GreaterStencilFunc=GreaterStencilFunc;exports.GridHelper=GridHelper;exports.Group=Group;exports.HalfFloatType=HalfFloatType;exports.HemisphereLight=HemisphereLight;exports.HemisphereLightHelper=HemisphereLightHelper;exports.IcosahedronGeometry=IcosahedronGeometry;exports.ImageBitmapLoader=ImageBitmapLoader;exports.ImageLoader=ImageLoader;exports.ImageUtils=ImageUtils;exports.IncrementStencilOp=IncrementStencilOp;exports.IncrementWrapStencilOp=IncrementWrapStencilOp;exports.InstancedBufferAttribute=InstancedBufferAttribute;exports.InstancedBufferGeometry=InstancedBufferGeometry;exports.InstancedInterleavedBuffer=InstancedInterleavedBuffer;exports.InstancedMesh=InstancedMesh;exports.Int16BufferAttribute=Int16BufferAttribute;exports.Int32BufferAttribute=Int32BufferAttribute;exports.Int8BufferAttribute=Int8BufferAttribute;exports.IntType=IntType;exports.InterleavedBuffer=InterleavedBuffer;exports.InterleavedBufferAttribute=InterleavedBufferAttribute;exports.Interpolant=Interpolant;exports.InterpolateDiscrete=InterpolateDiscrete;exports.InterpolateLinear=InterpolateLinear;exports.InterpolateSmooth=InterpolateSmooth;exports.InvertStencilOp=InvertStencilOp;exports.KeepStencilOp=KeepStencilOp;exports.KeyframeTrack=KeyframeTrack;exports.LOD=LOD;exports.LatheGeometry=LatheGeometry;exports.Layers=Layers;exports.LessCompare=LessCompare;exports.LessDepth=LessDepth;exports.LessEqualCompare=LessEqualCompare;exports.LessEqualDepth=LessEqualDepth;exports.LessEqualStencilFunc=LessEqualStencilFunc;exports.LessStencilFunc=LessStencilFunc;exports.Light=Light;exports.LightProbe=LightProbe;exports.Line=Line;exports.Line3=Line3;exports.LineBasicMaterial=LineBasicMaterial;exports.LineCurve=LineCurve;exports.LineCurve3=LineCurve3;exports.LineDashedMaterial=LineDashedMaterial;exports.LineLoop=LineLoop;exports.LineSegments=LineSegments;exports.LinearDisplayP3ColorSpace=LinearDisplayP3ColorSpace;exports.LinearFilter=LinearFilter;exports.LinearInterpolant=LinearInterpolant;exports.LinearMipMapLinearFilter=LinearMipMapLinearFilter;exports.LinearMipMapNearestFilter=LinearMipMapNearestFilter;exports.LinearMipmapLinearFilter=LinearMipmapLinearFilter;exports.LinearMipmapNearestFilter=LinearMipmapNearestFilter;exports.LinearSRGBColorSpace=LinearSRGBColorSpace;exports.LinearToneMapping=LinearToneMapping;exports.LinearTransfer=LinearTransfer;exports.Loader=Loader;exports.LoaderUtils=LoaderUtils;exports.LoadingManager=LoadingManager;exports.LoopOnce=LoopOnce;exports.LoopPingPong=LoopPingPong;exports.LoopRepeat=LoopRepeat;exports.LuminanceAlphaFormat=LuminanceAlphaFormat;exports.LuminanceFormat=LuminanceFormat;exports.MOUSE=MOUSE;exports.Material=Material;exports.MaterialLoader=MaterialLoader;exports.MathUtils=MathUtils;exports.Matrix2=Matrix2;exports.Matrix3=Matrix3;exports.Matrix4=Matrix4;exports.MaxEquation=MaxEquation;exports.Mesh=Mesh;exports.MeshBasicMaterial=MeshBasicMaterial;exports.MeshDepthMaterial=MeshDepthMaterial;exports.MeshDistanceMaterial=MeshDistanceMaterial;exports.MeshLambertMaterial=MeshLambertMaterial;exports.MeshMatcapMaterial=MeshMatcapMaterial;exports.MeshNormalMaterial=MeshNormalMaterial;exports.MeshPhongMaterial=MeshPhongMaterial;exports.MeshPhysicalMaterial=MeshPhysicalMaterial;exports.MeshStandardMaterial=MeshStandardMaterial;exports.MeshToonMaterial=MeshToonMaterial;exports.MinEquation=MinEquation;exports.MirroredRepeatWrapping=MirroredRepeatWrapping;exports.MixOperation=MixOperation;exports.MultiplyBlending=MultiplyBlending;exports.MultiplyOperation=MultiplyOperation;exports.NearestFilter=NearestFilter;exports.NearestMipMapLinearFilter=NearestMipMapLinearFilter;exports.NearestMipMapNearestFilter=NearestMipMapNearestFilter;exports.NearestMipmapLinearFilter=NearestMipmapLinearFilter;exports.NearestMipmapNearestFilter=NearestMipmapNearestFilter;exports.NeutralToneMapping=NeutralToneMapping;exports.NeverCompare=NeverCompare;exports.NeverDepth=NeverDepth;exports.NeverStencilFunc=NeverStencilFunc;exports.NoBlending=NoBlending;exports.NoColorSpace=NoColorSpace;exports.NoToneMapping=NoToneMapping;exports.NormalAnimationBlendMode=NormalAnimationBlendMode;exports.NormalBlending=NormalBlending;exports.NotEqualCompare=NotEqualCompare;exports.NotEqualDepth=NotEqualDepth;exports.NotEqualStencilFunc=NotEqualStencilFunc;exports.NumberKeyframeTrack=NumberKeyframeTrack;exports.Object3D=Object3D;exports.ObjectLoader=ObjectLoader;exports.ObjectSpaceNormalMap=ObjectSpaceNormalMap;exports.OctahedronGeometry=OctahedronGeometry;exports.OneFactor=OneFactor;exports.OneMinusConstantAlphaFactor=OneMinusConstantAlphaFactor;exports.OneMinusConstantColorFactor=OneMinusConstantColorFactor;exports.OneMinusDstAlphaFactor=OneMinusDstAlphaFactor;exports.OneMinusDstColorFactor=OneMinusDstColorFactor;exports.OneMinusSrcAlphaFactor=OneMinusSrcAlphaFactor;exports.OneMinusSrcColorFactor=OneMinusSrcColorFactor;exports.OrthographicCamera=OrthographicCamera;exports.P3Primaries=P3Primaries;exports.PCFShadowMap=PCFShadowMap;exports.PCFSoftShadowMap=PCFSoftShadowMap;exports.PMREMGenerator=PMREMGenerator;exports.Path=Path;exports.PerspectiveCamera=PerspectiveCamera;exports.Plane=Plane;exports.PlaneGeometry=PlaneGeometry;exports.PlaneHelper=PlaneHelper;exports.PointLight=PointLight;exports.PointLightHelper=PointLightHelper;exports.Points=Points;exports.PointsMaterial=PointsMaterial;exports.PolarGridHelper=PolarGridHelper;exports.PolyhedronGeometry=PolyhedronGeometry;exports.PositionalAudio=PositionalAudio;exports.PropertyBinding=PropertyBinding;exports.PropertyMixer=PropertyMixer;exports.QuadraticBezierCurve=QuadraticBezierCurve;exports.QuadraticBezierCurve3=QuadraticBezierCurve3;exports.Quaternion=Quaternion;exports.QuaternionKeyframeTrack=QuaternionKeyframeTrack;exports.QuaternionLinearInterpolant=QuaternionLinearInterpolant;exports.RED_GREEN_RGTC2_Format=RED_GREEN_RGTC2_Format;exports.RED_RGTC1_Format=RED_RGTC1_Format;exports.REVISION=REVISION;exports.RGBADepthPacking=RGBADepthPacking;exports.RGBAFormat=RGBAFormat;exports.RGBAIntegerFormat=RGBAIntegerFormat;exports.RGBA_ASTC_10x10_Format=RGBA_ASTC_10x10_Format;exports.RGBA_ASTC_10x5_Format=RGBA_ASTC_10x5_Format;exports.RGBA_ASTC_10x6_Format=RGBA_ASTC_10x6_Format;exports.RGBA_ASTC_10x8_Format=RGBA_ASTC_10x8_Format;exports.RGBA_ASTC_12x10_Format=RGBA_ASTC_12x10_Format;exports.RGBA_ASTC_12x12_Format=RGBA_ASTC_12x12_Format;exports.RGBA_ASTC_4x4_Format=RGBA_ASTC_4x4_Format;exports.RGBA_ASTC_5x4_Format=RGBA_ASTC_5x4_Format;exports.RGBA_ASTC_5x5_Format=RGBA_ASTC_5x5_Format;exports.RGBA_ASTC_6x5_Format=RGBA_ASTC_6x5_Format;exports.RGBA_ASTC_6x6_Format=RGBA_ASTC_6x6_Format;exports.RGBA_ASTC_8x5_Format=RGBA_ASTC_8x5_Format;exports.RGBA_ASTC_8x6_Format=RGBA_ASTC_8x6_Format;exports.RGBA_ASTC_8x8_Format=RGBA_ASTC_8x8_Format;exports.RGBA_BPTC_Format=RGBA_BPTC_Format;exports.RGBA_ETC2_EAC_Format=RGBA_ETC2_EAC_Format;exports.RGBA_PVRTC_2BPPV1_Format=RGBA_PVRTC_2BPPV1_Format;exports.RGBA_PVRTC_4BPPV1_Format=RGBA_PVRTC_4BPPV1_Format;exports.RGBA_S3TC_DXT1_Format=RGBA_S3TC_DXT1_Format;exports.RGBA_S3TC_DXT3_Format=RGBA_S3TC_DXT3_Format;exports.RGBA_S3TC_DXT5_Format=RGBA_S3TC_DXT5_Format;exports.RGBDepthPacking=RGBDepthPacking;exports.RGBFormat=RGBFormat;exports.RGBIntegerFormat=RGBIntegerFormat;exports.RGB_BPTC_SIGNED_Format=RGB_BPTC_SIGNED_Format;exports.RGB_BPTC_UNSIGNED_Format=RGB_BPTC_UNSIGNED_Format;exports.RGB_ETC1_Format=RGB_ETC1_Format;exports.RGB_ETC2_Format=RGB_ETC2_Format;exports.RGB_PVRTC_2BPPV1_Format=RGB_PVRTC_2BPPV1_Format;exports.RGB_PVRTC_4BPPV1_Format=RGB_PVRTC_4BPPV1_Format;exports.RGB_S3TC_DXT1_Format=RGB_S3TC_DXT1_Format;exports.RGDepthPacking=RGDepthPacking;exports.RGFormat=RGFormat;exports.RGIntegerFormat=RGIntegerFormat;exports.RawShaderMaterial=RawShaderMaterial;exports.Ray=Ray;exports.Raycaster=Raycaster;exports.Rec709Primaries=Rec709Primaries;exports.RectAreaLight=RectAreaLight;exports.RedFormat=RedFormat;exports.RedIntegerFormat=RedIntegerFormat;exports.ReinhardToneMapping=ReinhardToneMapping;exports.RenderTarget=RenderTarget;exports.RepeatWrapping=RepeatWrapping;exports.ReplaceStencilOp=ReplaceStencilOp;exports.ReverseSubtractEquation=ReverseSubtractEquation;exports.RingGeometry=RingGeometry;exports.SIGNED_RED_GREEN_RGTC2_Format=SIGNED_RED_GREEN_RGTC2_Format;exports.SIGNED_RED_RGTC1_Format=SIGNED_RED_RGTC1_Format;exports.SRGBColorSpace=SRGBColorSpace;exports.SRGBTransfer=SRGBTransfer;exports.Scene=Scene;exports.ShaderChunk=ShaderChunk;exports.ShaderLib=ShaderLib;exports.ShaderMaterial=ShaderMaterial;exports.ShadowMaterial=ShadowMaterial;exports.Shape=Shape;exports.ShapeGeometry=ShapeGeometry;exports.ShapePath=ShapePath;exports.ShapeUtils=ShapeUtils;exports.ShortType=ShortType;exports.Skeleton=Skeleton;exports.SkeletonHelper=SkeletonHelper;exports.SkinnedMesh=SkinnedMesh;exports.Source=Source;exports.Sphere=Sphere;exports.SphereGeometry=SphereGeometry;exports.Spherical=Spherical;exports.SphericalHarmonics3=SphericalHarmonics3;exports.SplineCurve=SplineCurve;exports.SpotLight=SpotLight;exports.SpotLightHelper=SpotLightHelper;exports.Sprite=Sprite;exports.SpriteMaterial=SpriteMaterial;exports.SrcAlphaFactor=SrcAlphaFactor;exports.SrcAlphaSaturateFactor=SrcAlphaSaturateFactor;exports.SrcColorFactor=SrcColorFactor;exports.StaticCopyUsage=StaticCopyUsage;exports.StaticDrawUsage=StaticDrawUsage;exports.StaticReadUsage=StaticReadUsage;exports.StereoCamera=StereoCamera;exports.StreamCopyUsage=StreamCopyUsage;exports.StreamDrawUsage=StreamDrawUsage;exports.StreamReadUsage=StreamReadUsage;exports.StringKeyframeTrack=StringKeyframeTrack;exports.SubtractEquation=SubtractEquation;exports.SubtractiveBlending=SubtractiveBlending;exports.TOUCH=TOUCH;exports.TangentSpaceNormalMap=TangentSpaceNormalMap;exports.TetrahedronGeometry=TetrahedronGeometry;exports.Texture=Texture;exports.TextureLoader=TextureLoader;exports.TextureUtils=TextureUtils;exports.TorusGeometry=TorusGeometry;exports.TorusKnotGeometry=TorusKnotGeometry;exports.Triangle=Triangle;exports.TriangleFanDrawMode=TriangleFanDrawMode;exports.TriangleStripDrawMode=TriangleStripDrawMode;exports.TrianglesDrawMode=TrianglesDrawMode;exports.TubeGeometry=TubeGeometry;exports.UVMapping=UVMapping;exports.Uint16BufferAttribute=Uint16BufferAttribute;exports.Uint32BufferAttribute=Uint32BufferAttribute;exports.Uint8BufferAttribute=Uint8BufferAttribute;exports.Uint8ClampedBufferAttribute=Uint8ClampedBufferAttribute;exports.Uniform=Uniform;exports.UniformsGroup=UniformsGroup;exports.UniformsLib=UniformsLib;exports.UniformsUtils=UniformsUtils;exports.UnsignedByteType=UnsignedByteType;exports.UnsignedInt248Type=UnsignedInt248Type;exports.UnsignedInt5999Type=UnsignedInt5999Type;exports.UnsignedIntType=UnsignedIntType;exports.UnsignedShort4444Type=UnsignedShort4444Type;exports.UnsignedShort5551Type=UnsignedShort5551Type;exports.UnsignedShortType=UnsignedShortType;exports.VSMShadowMap=VSMShadowMap;exports.Vector2=Vector2;exports.Vector3=Vector3;exports.Vector4=Vector4;exports.VectorKeyframeTrack=VectorKeyframeTrack;exports.VideoTexture=VideoTexture;exports.WebGL3DRenderTarget=WebGL3DRenderTarget;exports.WebGLArrayRenderTarget=WebGLArrayRenderTarget;exports.WebGLCoordinateSystem=WebGLCoordinateSystem;exports.WebGLCubeRenderTarget=WebGLCubeRenderTarget;exports.WebGLMultipleRenderTargets=WebGLMultipleRenderTargets;exports.WebGLRenderTarget=WebGLRenderTarget;exports.WebGLRenderer=WebGLRenderer;exports.WebGLUtils=WebGLUtils;exports.WebGPUCoordinateSystem=WebGPUCoordinateSystem;exports.WireframeGeometry=WireframeGeometry;exports.WrapAroundEnding=WrapAroundEnding;exports.ZeroCurvatureEnding=ZeroCurvatureEnding;exports.ZeroFactor=ZeroFactor;exports.ZeroSlopeEnding=ZeroSlopeEnding;exports.ZeroStencilOp=ZeroStencilOp;exports.createCanvasElement=createCanvasElement});(function(t,e){e(t.MeshBVHLib=t.MeshBVHLib||{},t.THREE=t.THREE||{})})(this,function(exports,three){const CENTER=0;const AVERAGE=1;const SAH=2;const NOT_INTERSECTED=0;const INTERSECTED=1;const CONTAINED=2;const TRIANGLE_INTERSECT_COST=1.25;const TRAVERSAL_COST=1;const BYTES_PER_NODE=6*4+4+4;const IS_LEAFNODE_FLAG=65535;const FLOAT32_EPSILON=Math.pow(2,-24);const SKIP_GENERATION=Symbol("SKIP_GENERATION");function getVertexCount(geo){return geo.index?geo.index.count:geo.attributes.position.count}function getTriCount(geo){return getVertexCount(geo)/3}function getIndexArray(vertexCount,BufferConstructor=ArrayBuffer){if(vertexCount>65535){return new Uint32Array(new BufferConstructor(4*vertexCount))}else{return new Uint16Array(new BufferConstructor(2*vertexCount))}}function ensureIndex(geo,options){if(!geo.index){const vertexCount=geo.attributes.position.count;const BufferConstructor=options.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;const index=getIndexArray(vertexCount,BufferConstructor);geo.setIndex(new three.BufferAttribute(index,1));for(let i=0;i<vertexCount;i++){index[i]=i}}}function getFullGeometryRange(geo){const triCount=getTriCount(geo);const drawRange=geo.drawRange;const start=drawRange.start/3;const end=(drawRange.start+drawRange.count)/3;const offset=Math.max(0,start);const count=Math.min(triCount,end)-offset;return[{offset:Math.floor(offset),count:Math.floor(count)}]}function getRootIndexRanges(geo){if(!geo.groups||!geo.groups.length){return getFullGeometryRange(geo)}const ranges=[];const rangeBoundaries=new Set;const drawRange=geo.drawRange;const drawRangeStart=drawRange.start/3;const drawRangeEnd=(drawRange.start+drawRange.count)/3;for(const group of geo.groups){const groupStart=group.start/3;const groupEnd=(group.start+group.count)/3;rangeBoundaries.add(Math.max(drawRangeStart,groupStart));rangeBoundaries.add(Math.min(drawRangeEnd,groupEnd))}const sortedBoundaries=Array.from(rangeBoundaries.values()).sort((a,b)=>a-b);for(let i=0;i<sortedBoundaries.length-1;i++){const start=sortedBoundaries[i];const end=sortedBoundaries[i+1];ranges.push({offset:Math.floor(start),count:Math.floor(end-start)})}return ranges}function hasGroupGaps(geometry){if(geometry.groups.length===0){return false}const vertexCount=getTriCount(geometry);const groups=getRootIndexRanges(geometry).sort((a,b)=>a.offset-b.offset);const finalGroup=groups[groups.length-1];finalGroup.count=Math.min(vertexCount-finalGroup.offset,finalGroup.count);let total=0;groups.forEach(({count})=>total+=count);return vertexCount!==total}function getBounds(triangleBounds,offset,count,target,centroidTarget){let minx=Infinity;let miny=Infinity;let minz=Infinity;let maxx=-Infinity;let maxy=-Infinity;let maxz=-Infinity;let cminx=Infinity;let cminy=Infinity;let cminz=Infinity;let cmaxx=-Infinity;let cmaxy=-Infinity;let cmaxz=-Infinity;for(let i=offset*6,end=(offset+count)*6;i<end;i+=6){const cx=triangleBounds[i+0];const hx=triangleBounds[i+1];const lx=cx-hx;const rx=cx+hx;if(lx<minx)minx=lx;if(rx>maxx)maxx=rx;if(cx<cminx)cminx=cx;if(cx>cmaxx)cmaxx=cx;const cy=triangleBounds[i+2];const hy=triangleBounds[i+3];const ly=cy-hy;const ry=cy+hy;if(ly<miny)miny=ly;if(ry>maxy)maxy=ry;if(cy<cminy)cminy=cy;if(cy>cmaxy)cmaxy=cy;const cz=triangleBounds[i+4];const hz=triangleBounds[i+5];const lz=cz-hz;const rz=cz+hz;if(lz<minz)minz=lz;if(rz>maxz)maxz=rz;if(cz<cminz)cminz=cz;if(cz>cmaxz)cmaxz=cz}target[0]=minx;target[1]=miny;target[2]=minz;target[3]=maxx;target[4]=maxy;target[5]=maxz;centroidTarget[0]=cminx;centroidTarget[1]=cminy;centroidTarget[2]=cminz;centroidTarget[3]=cmaxx;centroidTarget[4]=cmaxy;centroidTarget[5]=cmaxz}function computeTriangleBounds(geo,target=null,offset=null,count=null){const posAttr=geo.attributes.position;const index=geo.index?geo.index.array:null;const triCount=getTriCount(geo);const normalized=posAttr.normalized;let triangleBounds;if(target===null){triangleBounds=new Float32Array(triCount*6*4);offset=0;count=triCount}else{triangleBounds=target;offset=offset||0;count=count||triCount}const posArr=posAttr.array;const bufferOffset=posAttr.offset||0;let stride=3;if(posAttr.isInterleavedBufferAttribute){stride=posAttr.data.stride}const getters=["getX","getY","getZ"];for(let tri=offset;tri<offset+count;tri++){const tri3=tri*3;const tri6=tri*6;let ai=tri3+0;let bi=tri3+1;let ci=tri3+2;if(index){ai=index[ai];bi=index[bi];ci=index[ci]}if(!normalized){ai=ai*stride+bufferOffset;bi=bi*stride+bufferOffset;ci=ci*stride+bufferOffset}for(let el=0;el<3;el++){let a,b,c;if(normalized){a=posAttr[getters[el]](ai);b=posAttr[getters[el]](bi);c=posAttr[getters[el]](ci)}else{a=posArr[ai+el];b=posArr[bi+el];c=posArr[ci+el]}let min=a;if(b<min)min=b;if(c<min)min=c;let max=a;if(b>max)max=b;if(c>max)max=c;const halfExtents=(max-min)/2;const el2=el*2;triangleBounds[tri6+el2+0]=min+halfExtents;triangleBounds[tri6+el2+1]=halfExtents+(Math.abs(min)+halfExtents)*FLOAT32_EPSILON}}return triangleBounds}function arrayToBox(nodeIndex32,array,target){target.min.x=array[nodeIndex32];target.min.y=array[nodeIndex32+1];target.min.z=array[nodeIndex32+2];target.max.x=array[nodeIndex32+3];target.max.y=array[nodeIndex32+4];target.max.z=array[nodeIndex32+5];return target}function makeEmptyBounds(target){target[0]=target[1]=target[2]=Infinity;target[3]=target[4]=target[5]=-Infinity}function getLongestEdgeIndex(bounds){let splitDimIdx=-1;let splitDist=-Infinity;for(let i=0;i<3;i++){const dist=bounds[i+3]-bounds[i];if(dist>splitDist){splitDist=dist;splitDimIdx=i}}return splitDimIdx}function copyBounds(source,target){target.set(source)}function unionBounds(a,b,target){let aVal,bVal;for(let d=0;d<3;d++){const d3=d+3;aVal=a[d];bVal=b[d];target[d]=aVal<bVal?aVal:bVal;aVal=a[d3];bVal=b[d3];target[d3]=aVal>bVal?aVal:bVal}}function expandByTriangleBounds(startIndex,triangleBounds,bounds){for(let d=0;d<3;d++){const tCenter=triangleBounds[startIndex+2*d];const tHalf=triangleBounds[startIndex+2*d+1];const tMin=tCenter-tHalf;const tMax=tCenter+tHalf;if(tMin<bounds[d]){bounds[d]=tMin}if(tMax>bounds[d+3]){bounds[d+3]=tMax}}}function computeSurfaceArea(bounds){const d0=bounds[3]-bounds[0];const d1=bounds[4]-bounds[1];const d2=bounds[5]-bounds[2];return 2*(d0*d1+d1*d2+d2*d0)}const BIN_COUNT=32;const binsSort=(a,b)=>a.candidate-b.candidate;const sahBins=new Array(BIN_COUNT).fill().map(()=>{return{count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0}});const leftBounds=new Float32Array(6);function getOptimalSplit(nodeBoundingData,centroidBoundingData,triangleBounds,offset,count,strategy){let axis=-1;let pos=0;if(strategy===CENTER){axis=getLongestEdgeIndex(centroidBoundingData);if(axis!==-1){pos=(centroidBoundingData[axis]+centroidBoundingData[axis+3])/2}}else if(strategy===AVERAGE){axis=getLongestEdgeIndex(nodeBoundingData);if(axis!==-1){pos=getAverage(triangleBounds,offset,count,axis)}}else if(strategy===SAH){const rootSurfaceArea=computeSurfaceArea(nodeBoundingData);let bestCost=TRIANGLE_INTERSECT_COST*count;const cStart=offset*6;const cEnd=(offset+count)*6;for(let a=0;a<3;a++){const axisLeft=centroidBoundingData[a];const axisRight=centroidBoundingData[a+3];const axisLength=axisRight-axisLeft;const binWidth=axisLength/BIN_COUNT;if(count<BIN_COUNT/4){const truncatedBins=[...sahBins];truncatedBins.length=count;let b=0;for(let c=cStart;c<cEnd;c+=6,b++){const bin=truncatedBins[b];bin.candidate=triangleBounds[c+2*a];bin.count=0;const{bounds,leftCacheBounds,rightCacheBounds}=bin;for(let d=0;d<3;d++){rightCacheBounds[d]=Infinity;rightCacheBounds[d+3]=-Infinity;leftCacheBounds[d]=Infinity;leftCacheBounds[d+3]=-Infinity;bounds[d]=Infinity;bounds[d+3]=-Infinity}expandByTriangleBounds(c,triangleBounds,bounds)}truncatedBins.sort(binsSort);let splitCount=count;for(let bi=0;bi<splitCount;bi++){const bin=truncatedBins[bi];while(bi+1<splitCount&&truncatedBins[bi+1].candidate===bin.candidate){truncatedBins.splice(bi+1,1);splitCount--}}for(let c=cStart;c<cEnd;c+=6){const center=triangleBounds[c+2*a];for(let bi=0;bi<splitCount;bi++){const bin=truncatedBins[bi];if(center>=bin.candidate){expandByTriangleBounds(c,triangleBounds,bin.rightCacheBounds)}else{expandByTriangleBounds(c,triangleBounds,bin.leftCacheBounds);bin.count++}}}for(let bi=0;bi<splitCount;bi++){const bin=truncatedBins[bi];const leftCount=bin.count;const rightCount=count-bin.count;const leftBounds=bin.leftCacheBounds;const rightBounds=bin.rightCacheBounds;let leftProb=0;if(leftCount!==0){leftProb=computeSurfaceArea(leftBounds)/rootSurfaceArea}let rightProb=0;if(rightCount!==0){rightProb=computeSurfaceArea(rightBounds)/rootSurfaceArea}const cost=TRAVERSAL_COST+TRIANGLE_INTERSECT_COST*(leftProb*leftCount+rightProb*rightCount);if(cost<bestCost){axis=a;bestCost=cost;pos=bin.candidate}}}else{for(let i=0;i<BIN_COUNT;i++){const bin=sahBins[i];bin.count=0;bin.candidate=axisLeft+binWidth+i*binWidth;const bounds=bin.bounds;for(let d=0;d<3;d++){bounds[d]=Infinity;bounds[d+3]=-Infinity}}for(let c=cStart;c<cEnd;c+=6){const triCenter=triangleBounds[c+2*a];const relativeCenter=triCenter-axisLeft;let binIndex=~~(relativeCenter/binWidth);if(binIndex>=BIN_COUNT)binIndex=BIN_COUNT-1;const bin=sahBins[binIndex];bin.count++;expandByTriangleBounds(c,triangleBounds,bin.bounds)}const lastBin=sahBins[BIN_COUNT-1];copyBounds(lastBin.bounds,lastBin.rightCacheBounds);for(let i=BIN_COUNT-2;i>=0;i--){const bin=sahBins[i];const nextBin=sahBins[i+1];unionBounds(bin.bounds,nextBin.rightCacheBounds,bin.rightCacheBounds)}let leftCount=0;for(let i=0;i<BIN_COUNT-1;i++){const bin=sahBins[i];const binCount=bin.count;const bounds=bin.bounds;const nextBin=sahBins[i+1];const rightBounds=nextBin.rightCacheBounds;if(binCount!==0){if(leftCount===0){copyBounds(bounds,leftBounds)}else{unionBounds(bounds,leftBounds,leftBounds)}}leftCount+=binCount;let leftProb=0;let rightProb=0;if(leftCount!==0){leftProb=computeSurfaceArea(leftBounds)/rootSurfaceArea}const rightCount=count-leftCount;if(rightCount!==0){rightProb=computeSurfaceArea(rightBounds)/rootSurfaceArea}const cost=TRAVERSAL_COST+TRIANGLE_INTERSECT_COST*(leftProb*leftCount+rightProb*rightCount);if(cost<bestCost){axis=a;bestCost=cost;pos=bin.candidate}}}}}else{console.warn(`MeshBVH: Invalid build strategy value ${strategy} used.`)}return{axis,pos}}function getAverage(triangleBounds,offset,count,axis){let avg=0;for(let i=offset,end=offset+count;i<end;i++){avg+=triangleBounds[i*6+axis*2]}return avg/count}class MeshBVHNode{constructor(){this.boundingData=new Float32Array(6)}}function partition(indirectBuffer,index,triangleBounds,offset,count,split){let left=offset;let right=offset+count-1;const pos=split.pos;const axisOffset=split.axis*2;while(true){while(left<=right&&triangleBounds[left*6+axisOffset]<pos){left++}while(left<=right&&triangleBounds[right*6+axisOffset]>=pos){right--}if(left<right){for(let i=0;i<3;i++){let t0=index[left*3+i];index[left*3+i]=index[right*3+i];index[right*3+i]=t0}for(let i=0;i<6;i++){let tb=triangleBounds[left*6+i];triangleBounds[left*6+i]=triangleBounds[right*6+i];triangleBounds[right*6+i]=tb}left++;right--}else{return left}}}function partition_indirect(indirectBuffer,index,triangleBounds,offset,count,split){let left=offset;let right=offset+count-1;const pos=split.pos;const axisOffset=split.axis*2;while(true){while(left<=right&&triangleBounds[left*6+axisOffset]<pos){left++}while(left<=right&&triangleBounds[right*6+axisOffset]>=pos){right--}if(left<right){let t=indirectBuffer[left];indirectBuffer[left]=indirectBuffer[right];indirectBuffer[right]=t;for(let i=0;i<6;i++){let tb=triangleBounds[left*6+i];triangleBounds[left*6+i]=triangleBounds[right*6+i];triangleBounds[right*6+i]=tb}left++;right--}else{return left}}}function IS_LEAF(n16,uint16Array){return uint16Array[n16+15]===65535}function OFFSET(n32,uint32Array){return uint32Array[n32+6]}function COUNT(n16,uint16Array){return uint16Array[n16+14]}function LEFT_NODE(n32){return n32+8}function RIGHT_NODE(n32,uint32Array){return uint32Array[n32+6]}function SPLIT_AXIS(n32,uint32Array){return uint32Array[n32+7]}function BOUNDING_DATA_INDEX(n32){return n32}let float32Array,uint32Array,uint16Array,uint8Array;const MAX_POINTER=Math.pow(2,32);function countNodes(node){if("count"in node){return 1}else{return 1+countNodes(node.left)+countNodes(node.right)}}function populateBuffer(byteOffset,node,buffer){float32Array=new Float32Array(buffer);uint32Array=new Uint32Array(buffer);uint16Array=new Uint16Array(buffer);uint8Array=new Uint8Array(buffer);return _populateBuffer(byteOffset,node)}function _populateBuffer(byteOffset,node){const stride4Offset=byteOffset/4;const stride2Offset=byteOffset/2;const isLeaf=("count"in node);const boundingData=node.boundingData;for(let i=0;i<6;i++){float32Array[stride4Offset+i]=boundingData[i]}if(isLeaf){if(node.buffer){const buffer=node.buffer;uint8Array.set(new Uint8Array(buffer),byteOffset);for(let offset=byteOffset,l=byteOffset+buffer.byteLength;offset<l;offset+=BYTES_PER_NODE){const offset2=offset/2;if(!IS_LEAF(offset2,uint16Array)){uint32Array[offset/4+6]+=stride4Offset}}return byteOffset+buffer.byteLength}else{const offset=node.offset;const count=node.count;uint32Array[stride4Offset+6]=offset;uint16Array[stride2Offset+14]=count;uint16Array[stride2Offset+15]=IS_LEAFNODE_FLAG;return byteOffset+BYTES_PER_NODE}}else{const left=node.left;const right=node.right;const splitAxis=node.splitAxis;let nextUnusedPointer;nextUnusedPointer=_populateBuffer(byteOffset+BYTES_PER_NODE,left);if(nextUnusedPointer/4>MAX_POINTER){throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.")}uint32Array[stride4Offset+6]=nextUnusedPointer/4;nextUnusedPointer=_populateBuffer(nextUnusedPointer,right);uint32Array[stride4Offset+7]=splitAxis;return nextUnusedPointer}}function generateIndirectBuffer(geometry,useSharedArrayBuffer){const triCount=(geometry.index?geometry.index.count:geometry.attributes.position.count)/3;const useUint32=triCount>2**16;const byteCount=useUint32?4:2;const buffer=useSharedArrayBuffer?new SharedArrayBuffer(triCount*byteCount):new ArrayBuffer(triCount*byteCount);const indirectBuffer=useUint32?new Uint32Array(buffer):new Uint16Array(buffer);for(let i=0,l=indirectBuffer.length;i<l;i++){indirectBuffer[i]=i}return indirectBuffer}function buildTree(bvh,triangleBounds,offset,count,options){const{maxDepth,verbose,maxLeafTris,strategy,onProgress,indirect}=options;const indirectBuffer=bvh._indirectBuffer;const geometry=bvh.geometry;const indexArray=geometry.index?geometry.index.array:null;const partionFunc=indirect?partition_indirect:partition;const totalTriangles=getTriCount(geometry);const cacheCentroidBoundingData=new Float32Array(6);let reachedMaxDepth=false;const root=new MeshBVHNode;getBounds(triangleBounds,offset,count,root.boundingData,cacheCentroidBoundingData);splitNode(root,offset,count,cacheCentroidBoundingData);return root;function triggerProgress(trianglesProcessed){if(onProgress){onProgress(trianglesProcessed/totalTriangles)}}function splitNode(node,offset,count,centroidBoundingData=null,depth=0){if(!reachedMaxDepth&&depth>=maxDepth){reachedMaxDepth=true;if(verbose){console.warn(`MeshBVH: Max depth of ${maxDepth} reached when generating BVH. Consider increasing maxDepth.`);console.warn(geometry)}}if(count<=maxLeafTris||depth>=maxDepth){triggerProgress(offset+count);node.offset=offset;node.count=count;return node}const split=getOptimalSplit(node.boundingData,centroidBoundingData,triangleBounds,offset,count,strategy);if(split.axis===-1){triggerProgress(offset+count);node.offset=offset;node.count=count;return node}const splitOffset=partionFunc(indirectBuffer,indexArray,triangleBounds,offset,count,split);if(splitOffset===offset||splitOffset===offset+count){triggerProgress(offset+count);node.offset=offset;node.count=count}else{node.splitAxis=split.axis;const left=new MeshBVHNode;const lstart=offset;const lcount=splitOffset-offset;node.left=left;getBounds(triangleBounds,lstart,lcount,left.boundingData,cacheCentroidBoundingData);splitNode(left,lstart,lcount,cacheCentroidBoundingData,depth+1);const right=new MeshBVHNode;const rstart=splitOffset;const rcount=count-lcount;node.right=right;getBounds(triangleBounds,rstart,rcount,right.boundingData,cacheCentroidBoundingData);splitNode(right,rstart,rcount,cacheCentroidBoundingData,depth+1)}return node}}function buildPackedTree(bvh,options){const geometry=bvh.geometry;if(options.indirect){bvh._indirectBuffer=generateIndirectBuffer(geometry,options.useSharedArrayBuffer);if(hasGroupGaps(geometry)&&!options.verbose){console.warn("MeshBVH: Provided geometry contains groups that do not fully span the vertex contents while using the \"indirect\" option. "+"BVH may incorrectly report intersections on unrendered portions of the geometry.")}}if(!bvh._indirectBuffer){ensureIndex(geometry,options)}const BufferConstructor=options.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;const triangleBounds=computeTriangleBounds(geometry);const geometryRanges=options.indirect?getFullGeometryRange(geometry):getRootIndexRanges(geometry);bvh._roots=geometryRanges.map(range=>{const root=buildTree(bvh,triangleBounds,range.offset,range.count,options);const nodeCount=countNodes(root);const buffer=new BufferConstructor(BYTES_PER_NODE*nodeCount);populateBuffer(0,root,buffer);return buffer})}class SeparatingAxisBounds{constructor(){this.min=Infinity;this.max=-Infinity}setFromPointsField(points,field){let min=Infinity;let max=-Infinity;for(let i=0,l=points.length;i<l;i++){const p=points[i];const val=p[field];min=val<min?val:min;max=val>max?val:max}this.min=min;this.max=max}setFromPoints(axis,points){let min=Infinity;let max=-Infinity;for(let i=0,l=points.length;i<l;i++){const p=points[i];const val=axis.dot(p);min=val<min?val:min;max=val>max?val:max}this.min=min;this.max=max}isSeparated(other){return this.min>other.max||other.min>this.max}}SeparatingAxisBounds.prototype.setFromBox=function(){const p=new three.Vector3;return function setFromBox(axis,box){const boxMin=box.min;const boxMax=box.max;let min=Infinity;let max=-Infinity;for(let x=0;x<=1;x++){for(let y=0;y<=1;y++){for(let z=0;z<=1;z++){p.x=boxMin.x*x+boxMax.x*(1-x);p.y=boxMin.y*y+boxMax.y*(1-y);p.z=boxMin.z*z+boxMax.z*(1-z);const val=axis.dot(p);min=Math.min(val,min);max=Math.max(val,max)}}}this.min=min;this.max=max}}();const areIntersecting=function(){const cacheSatBounds=new SeparatingAxisBounds;return function areIntersecting(shape1,shape2){const points1=shape1.points;const satAxes1=shape1.satAxes;const satBounds1=shape1.satBounds;const points2=shape2.points;const satAxes2=shape2.satAxes;const satBounds2=shape2.satBounds;for(let i=0;i<3;i++){const sb=satBounds1[i];const sa=satAxes1[i];cacheSatBounds.setFromPoints(sa,points2);if(sb.isSeparated(cacheSatBounds))return false}for(let i=0;i<3;i++){const sb=satBounds2[i];const sa=satAxes2[i];cacheSatBounds.setFromPoints(sa,points1);if(sb.isSeparated(cacheSatBounds))return false}}}();const closestPointLineToLine=function(){const dir1=new three.Vector3;const dir2=new three.Vector3;const v02=new three.Vector3;return function closestPointLineToLine(l1,l2,result){const v0=l1.start;const v10=dir1;const v2=l2.start;const v32=dir2;v02.subVectors(v0,v2);dir1.subVectors(l1.end,l1.start);dir2.subVectors(l2.end,l2.start);const d0232=v02.dot(v32);const d3210=v32.dot(v10);const d3232=v32.dot(v32);const d0210=v02.dot(v10);const d1010=v10.dot(v10);const denom=d1010*d3232-d3210*d3210;let d,d2;if(denom!==0){d=(d0232*d3210-d0210*d3232)/denom}else{d=0}d2=(d0232+d*d3210)/d3232;result.x=d;result.y=d2}}();const closestPointsSegmentToSegment=function(){const paramResult=new three.Vector2;const temp1=new three.Vector3;const temp2=new three.Vector3;return function closestPointsSegmentToSegment(l1,l2,target1,target2){closestPointLineToLine(l1,l2,paramResult);let d=paramResult.x;let d2=paramResult.y;if(d>=0&&d<=1&&d2>=0&&d2<=1){l1.at(d,target1);l2.at(d2,target2);return}else if(d>=0&&d<=1){if(d2<0){l2.at(0,target2)}else{l2.at(1,target2)}l1.closestPointToPoint(target2,true,target1);return}else if(d2>=0&&d2<=1){if(d<0){l1.at(0,target1)}else{l1.at(1,target1)}l2.closestPointToPoint(target1,true,target2);return}else{let p;if(d<0){p=l1.start}else{p=l1.end}let p2;if(d2<0){p2=l2.start}else{p2=l2.end}const closestPoint=temp1;const closestPoint2=temp2;l1.closestPointToPoint(p2,true,temp1);l2.closestPointToPoint(p,true,temp2);if(closestPoint.distanceToSquared(p2)<=closestPoint2.distanceToSquared(p)){target1.copy(closestPoint);target2.copy(p2);return}else{target1.copy(p);target2.copy(closestPoint2);return}}}}();const sphereIntersectTriangle=function(){const closestPointTemp=new three.Vector3;const projectedPointTemp=new three.Vector3;const planeTemp=new three.Plane;const lineTemp=new three.Line3;return function sphereIntersectTriangle(sphere,triangle){const{radius,center}=sphere;const{a,b,c}=triangle;lineTemp.start=a;lineTemp.end=b;const closestPoint1=lineTemp.closestPointToPoint(center,true,closestPointTemp);if(closestPoint1.distanceTo(center)<=radius)return true;lineTemp.start=a;lineTemp.end=c;const closestPoint2=lineTemp.closestPointToPoint(center,true,closestPointTemp);if(closestPoint2.distanceTo(center)<=radius)return true;lineTemp.start=b;lineTemp.end=c;const closestPoint3=lineTemp.closestPointToPoint(center,true,closestPointTemp);if(closestPoint3.distanceTo(center)<=radius)return true;const plane=triangle.getPlane(planeTemp);const dp=Math.abs(plane.distanceToPoint(center));if(dp<=radius){const pp=plane.projectPoint(center,projectedPointTemp);const cp=triangle.containsPoint(pp);if(cp)return true}return false}}();const ZERO_EPSILON=1e-15;function isNearZero(value){return Math.abs(value)<ZERO_EPSILON}class ExtendedTriangle extends three.Triangle{constructor(...args){super(...args);this.isExtendedTriangle=true;this.satAxes=new Array(4).fill().map(()=>new three.Vector3);this.satBounds=new Array(4).fill().map(()=>new SeparatingAxisBounds);this.points=[this.a,this.b,this.c];this.sphere=new three.Sphere;this.plane=new three.Plane;this.needsUpdate=true}intersectsSphere(sphere){return sphereIntersectTriangle(sphere,this)}update(){const a=this.a;const b=this.b;const c=this.c;const points=this.points;const satAxes=this.satAxes;const satBounds=this.satBounds;const axis0=satAxes[0];const sab0=satBounds[0];this.getNormal(axis0);sab0.setFromPoints(axis0,points);const axis1=satAxes[1];const sab1=satBounds[1];axis1.subVectors(a,b);sab1.setFromPoints(axis1,points);const axis2=satAxes[2];const sab2=satBounds[2];axis2.subVectors(b,c);sab2.setFromPoints(axis2,points);const axis3=satAxes[3];const sab3=satBounds[3];axis3.subVectors(c,a);sab3.setFromPoints(axis3,points);this.sphere.setFromPoints(this.points);this.plane.setFromNormalAndCoplanarPoint(axis0,a);this.needsUpdate=false}}ExtendedTriangle.prototype.closestPointToSegment=function(){const point1=new three.Vector3;const point2=new three.Vector3;const edge=new three.Line3;return function distanceToSegment(segment,target1=null,target2=null){const{start,end}=segment;const points=this.points;let distSq;let closestDistanceSq=Infinity;for(let i=0;i<3;i++){const nexti=(i+1)%3;edge.start.copy(points[i]);edge.end.copy(points[nexti]);closestPointsSegmentToSegment(edge,segment,point1,point2);distSq=point1.distanceToSquared(point2);if(distSq<closestDistanceSq){closestDistanceSq=distSq;if(target1)target1.copy(point1);if(target2)target2.copy(point2)}}this.closestPointToPoint(start,point1);distSq=start.distanceToSquared(point1);if(distSq<closestDistanceSq){closestDistanceSq=distSq;if(target1)target1.copy(point1);if(target2)target2.copy(start)}this.closestPointToPoint(end,point1);distSq=end.distanceToSquared(point1);if(distSq<closestDistanceSq){closestDistanceSq=distSq;if(target1)target1.copy(point1);if(target2)target2.copy(end)}return Math.sqrt(closestDistanceSq)}}();ExtendedTriangle.prototype.intersectsTriangle=function(){const saTri2=new ExtendedTriangle;const arr1=new Array(3);const arr2=new Array(3);const cachedSatBounds=new SeparatingAxisBounds;const cachedSatBounds2=new SeparatingAxisBounds;const cachedAxis=new three.Vector3;const dir=new three.Vector3;const dir1=new three.Vector3;const dir2=new three.Vector3;const tempDir=new three.Vector3;const edge=new three.Line3;const edge1=new three.Line3;const edge2=new three.Line3;const tempPoint=new three.Vector3;function triIntersectPlane(tri,plane,targetEdge){const points=tri.points;let count=0;let startPointIntersection=-1;for(let i=0;i<3;i++){const{start,end}=edge;start.copy(points[i]);end.copy(points[(i+1)%3]);edge.delta(dir);const startIntersects=isNearZero(plane.distanceToPoint(start));if(isNearZero(plane.normal.dot(dir))&&startIntersects){targetEdge.copy(edge);count=2;break}const doesIntersect=plane.intersectLine(edge,tempPoint);if(!doesIntersect&&startIntersects){tempPoint.copy(start)}if((doesIntersect||startIntersects)&&!isNearZero(tempPoint.distanceTo(end))){if(count<=1){const point=count===1?targetEdge.start:targetEdge.end;point.copy(tempPoint);if(startIntersects){startPointIntersection=count}}else if(count>=2){const point=startPointIntersection===1?targetEdge.start:targetEdge.end;point.copy(tempPoint);count=2;break}count++;if(count===2&&startPointIntersection===-1){break}}}return count}return function intersectsTriangle(other,target=null,suppressLog=false){if(this.needsUpdate){this.update()}if(!other.isExtendedTriangle){saTri2.copy(other);saTri2.update();other=saTri2}else if(other.needsUpdate){other.update()}const plane1=this.plane;const plane2=other.plane;if(Math.abs(plane1.normal.dot(plane2.normal))>1-1e-10){const satBounds1=this.satBounds;const satAxes1=this.satAxes;arr2[0]=other.a;arr2[1]=other.b;arr2[2]=other.c;for(let i=0;i<4;i++){const sb=satBounds1[i];const sa=satAxes1[i];cachedSatBounds.setFromPoints(sa,arr2);if(sb.isSeparated(cachedSatBounds))return false}const satBounds2=other.satBounds;const satAxes2=other.satAxes;arr1[0]=this.a;arr1[1]=this.b;arr1[2]=this.c;for(let i=0;i<4;i++){const sb=satBounds2[i];const sa=satAxes2[i];cachedSatBounds.setFromPoints(sa,arr1);if(sb.isSeparated(cachedSatBounds))return false}for(let i=0;i<4;i++){const sa1=satAxes1[i];for(let i2=0;i2<4;i2++){const sa2=satAxes2[i2];cachedAxis.crossVectors(sa1,sa2);cachedSatBounds.setFromPoints(cachedAxis,arr1);cachedSatBounds2.setFromPoints(cachedAxis,arr2);if(cachedSatBounds.isSeparated(cachedSatBounds2))return false}}if(target){if(!suppressLog){console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0.")}target.start.set(0,0,0);target.end.set(0,0,0)}return true}else{const count1=triIntersectPlane(this,plane2,edge1);if(count1===1&&other.containsPoint(edge1.end)){if(target){target.start.copy(edge1.end);target.end.copy(edge1.end)}return true}else if(count1!==2){return false}const count2=triIntersectPlane(other,plane1,edge2);if(count2===1&&this.containsPoint(edge2.end)){if(target){target.start.copy(edge2.end);target.end.copy(edge2.end)}return true}else if(count2!==2){return false}edge1.delta(dir1);edge2.delta(dir2);if(dir1.dot(dir2)<0){let tmp=edge2.start;edge2.start=edge2.end;edge2.end=tmp}const s1=edge1.start.dot(dir1);const e1=edge1.end.dot(dir1);const s2=edge2.start.dot(dir1);const e2=edge2.end.dot(dir1);const separated1=e1<s2;const separated2=s1<e2;if(s1!==e2&&s2!==e1&&separated1===separated2){return false}if(target){tempDir.subVectors(edge1.start,edge2.start);if(tempDir.dot(dir1)>0){target.start.copy(edge1.start)}else{target.start.copy(edge2.start)}tempDir.subVectors(edge1.end,edge2.end);if(tempDir.dot(dir1)<0){target.end.copy(edge1.end)}else{target.end.copy(edge2.end)}}return true}}}();ExtendedTriangle.prototype.distanceToPoint=function(){const target=new three.Vector3;return function distanceToPoint(point){this.closestPointToPoint(point,target);return point.distanceTo(target)}}();ExtendedTriangle.prototype.distanceToTriangle=function(){const point=new three.Vector3;const point2=new three.Vector3;const cornerFields=["a","b","c"];const line1=new three.Line3;const line2=new three.Line3;return function distanceToTriangle(other,target1=null,target2=null){const lineTarget=target1||target2?line1:null;if(this.intersectsTriangle(other,lineTarget)){if(target1||target2){if(target1)lineTarget.getCenter(target1);if(target2)lineTarget.getCenter(target2)}return 0}let closestDistanceSq=Infinity;for(let i=0;i<3;i++){let dist;const field=cornerFields[i];const otherVec=other[field];this.closestPointToPoint(otherVec,point);dist=otherVec.distanceToSquared(point);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(point);if(target2)target2.copy(otherVec)}const thisVec=this[field];other.closestPointToPoint(thisVec,point);dist=thisVec.distanceToSquared(point);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(thisVec);if(target2)target2.copy(point)}}for(let i=0;i<3;i++){const f11=cornerFields[i];const f12=cornerFields[(i+1)%3];line1.set(this[f11],this[f12]);for(let i2=0;i2<3;i2++){const f21=cornerFields[i2];const f22=cornerFields[(i2+1)%3];line2.set(other[f21],other[f22]);closestPointsSegmentToSegment(line1,line2,point,point2);const dist=point.distanceToSquared(point2);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(point);if(target2)target2.copy(point2)}}}return Math.sqrt(closestDistanceSq)}}();class OrientedBox{constructor(min,max,matrix){this.isOrientedBox=true;this.min=new three.Vector3;this.max=new three.Vector3;this.matrix=new three.Matrix4;this.invMatrix=new three.Matrix4;this.points=new Array(8).fill().map(()=>new three.Vector3);this.satAxes=new Array(3).fill().map(()=>new three.Vector3);this.satBounds=new Array(3).fill().map(()=>new SeparatingAxisBounds);this.alignedSatBounds=new Array(3).fill().map(()=>new SeparatingAxisBounds);this.needsUpdate=false;if(min)this.min.copy(min);if(max)this.max.copy(max);if(matrix)this.matrix.copy(matrix)}set(min,max,matrix){this.min.copy(min);this.max.copy(max);this.matrix.copy(matrix);this.needsUpdate=true}copy(other){this.min.copy(other.min);this.max.copy(other.max);this.matrix.copy(other.matrix);this.needsUpdate=true}}OrientedBox.prototype.update=function(){return function update(){const matrix=this.matrix;const min=this.min;const max=this.max;const points=this.points;for(let x=0;x<=1;x++){for(let y=0;y<=1;y++){for(let z=0;z<=1;z++){const i=(1<<0)*x|(1<<1)*y|(1<<2)*z;const v=points[i];v.x=x?max.x:min.x;v.y=y?max.y:min.y;v.z=z?max.z:min.z;v.applyMatrix4(matrix)}}}const satBounds=this.satBounds;const satAxes=this.satAxes;const minVec=points[0];for(let i=0;i<3;i++){const axis=satAxes[i];const sb=satBounds[i];const index=1<<i;const pi=points[index];axis.subVectors(minVec,pi);sb.setFromPoints(axis,points)}const alignedSatBounds=this.alignedSatBounds;alignedSatBounds[0].setFromPointsField(points,"x");alignedSatBounds[1].setFromPointsField(points,"y");alignedSatBounds[2].setFromPointsField(points,"z");this.invMatrix.copy(this.matrix).invert();this.needsUpdate=false}}();OrientedBox.prototype.intersectsBox=function(){const aabbBounds=new SeparatingAxisBounds;return function intersectsBox(box){if(this.needsUpdate){this.update()}const min=box.min;const max=box.max;const satBounds=this.satBounds;const satAxes=this.satAxes;const alignedSatBounds=this.alignedSatBounds;aabbBounds.min=min.x;aabbBounds.max=max.x;if(alignedSatBounds[0].isSeparated(aabbBounds))return false;aabbBounds.min=min.y;aabbBounds.max=max.y;if(alignedSatBounds[1].isSeparated(aabbBounds))return false;aabbBounds.min=min.z;aabbBounds.max=max.z;if(alignedSatBounds[2].isSeparated(aabbBounds))return false;for(let i=0;i<3;i++){const axis=satAxes[i];const sb=satBounds[i];aabbBounds.setFromBox(axis,box);if(sb.isSeparated(aabbBounds))return false}return true}}();OrientedBox.prototype.intersectsTriangle=function(){const saTri=new ExtendedTriangle;const pointsArr=new Array(3);const cachedSatBounds=new SeparatingAxisBounds;const cachedSatBounds2=new SeparatingAxisBounds;const cachedAxis=new three.Vector3;return function intersectsTriangle(triangle){if(this.needsUpdate){this.update()}if(!triangle.isExtendedTriangle){saTri.copy(triangle);saTri.update();triangle=saTri}else if(triangle.needsUpdate){triangle.update()}const satBounds=this.satBounds;const satAxes=this.satAxes;pointsArr[0]=triangle.a;pointsArr[1]=triangle.b;pointsArr[2]=triangle.c;for(let i=0;i<3;i++){const sb=satBounds[i];const sa=satAxes[i];cachedSatBounds.setFromPoints(sa,pointsArr);if(sb.isSeparated(cachedSatBounds))return false}const triSatBounds=triangle.satBounds;const triSatAxes=triangle.satAxes;const points=this.points;for(let i=0;i<3;i++){const sb=triSatBounds[i];const sa=triSatAxes[i];cachedSatBounds.setFromPoints(sa,points);if(sb.isSeparated(cachedSatBounds))return false}for(let i=0;i<3;i++){const sa1=satAxes[i];for(let i2=0;i2<4;i2++){const sa2=triSatAxes[i2];cachedAxis.crossVectors(sa1,sa2);cachedSatBounds.setFromPoints(cachedAxis,pointsArr);cachedSatBounds2.setFromPoints(cachedAxis,points);if(cachedSatBounds.isSeparated(cachedSatBounds2))return false}}return true}}();OrientedBox.prototype.closestPointToPoint=function(){return function closestPointToPoint(point,target1){if(this.needsUpdate){this.update()}target1.copy(point).applyMatrix4(this.invMatrix).clamp(this.min,this.max).applyMatrix4(this.matrix);return target1}}();OrientedBox.prototype.distanceToPoint=function(){const target=new three.Vector3;return function distanceToPoint(point){this.closestPointToPoint(point,target);return point.distanceTo(target)}}();OrientedBox.prototype.distanceToBox=function(){const xyzFields=["x","y","z"];const segments1=new Array(12).fill().map(()=>new three.Line3);const segments2=new Array(12).fill().map(()=>new three.Line3);const point1=new three.Vector3;const point2=new three.Vector3;return function distanceToBox(box,threshold=0,target1=null,target2=null){if(this.needsUpdate){this.update()}if(this.intersectsBox(box)){if(target1||target2){box.getCenter(point2);this.closestPointToPoint(point2,point1);box.closestPointToPoint(point1,point2);if(target1)target1.copy(point1);if(target2)target2.copy(point2)}return 0}const threshold2=threshold*threshold;const min=box.min;const max=box.max;const points=this.points;let closestDistanceSq=Infinity;for(let i=0;i<8;i++){const p=points[i];point2.copy(p).clamp(min,max);const dist=p.distanceToSquared(point2);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(p);if(target2)target2.copy(point2);if(dist<threshold2)return Math.sqrt(dist)}}let count=0;for(let i=0;i<3;i++){for(let i1=0;i1<=1;i1++){for(let i2=0;i2<=1;i2++){const nextIndex=(i+1)%3;const nextIndex2=(i+2)%3;const index=i1<<nextIndex|i2<<nextIndex2;const index2=1<<i|i1<<nextIndex|i2<<nextIndex2;const p1=points[index];const p2=points[index2];const line1=segments1[count];line1.set(p1,p2);const f1=xyzFields[i];const f2=xyzFields[nextIndex];const f3=xyzFields[nextIndex2];const line2=segments2[count];const start=line2.start;const end=line2.end;start[f1]=min[f1];start[f2]=i1?min[f2]:max[f2];start[f3]=i2?min[f3]:max[f2];end[f1]=max[f1];end[f2]=i1?min[f2]:max[f2];end[f3]=i2?min[f3]:max[f2];count++}}}for(let x=0;x<=1;x++){for(let y=0;y<=1;y++){for(let z=0;z<=1;z++){point2.x=x?max.x:min.x;point2.y=y?max.y:min.y;point2.z=z?max.z:min.z;this.closestPointToPoint(point2,point1);const dist=point2.distanceToSquared(point1);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(point1);if(target2)target2.copy(point2);if(dist<threshold2)return Math.sqrt(dist)}}}}for(let i=0;i<12;i++){const l1=segments1[i];for(let i2=0;i2<12;i2++){const l2=segments2[i2];closestPointsSegmentToSegment(l1,l2,point1,point2);const dist=point1.distanceToSquared(point2);if(dist<closestDistanceSq){closestDistanceSq=dist;if(target1)target1.copy(point1);if(target2)target2.copy(point2);if(dist<threshold2)return Math.sqrt(dist)}}}return Math.sqrt(closestDistanceSq)}}();class PrimitivePool{constructor(getNewPrimitive){this._getNewPrimitive=getNewPrimitive;this._primitives=[]}getPrimitive(){const primitives=this._primitives;if(primitives.length===0){return this._getNewPrimitive()}else{return primitives.pop()}}releasePrimitive(primitive){this._primitives.push(primitive)}}class ExtendedTrianglePoolBase extends PrimitivePool{constructor(){super(()=>new ExtendedTriangle)}}const ExtendedTrianglePool=new ExtendedTrianglePoolBase;class _BufferStack{constructor(){this.float32Array=null;this.uint16Array=null;this.uint32Array=null;const stack=[];let prevBuffer=null;this.setBuffer=buffer=>{if(prevBuffer){stack.push(prevBuffer)}prevBuffer=buffer;this.float32Array=new Float32Array(buffer);this.uint16Array=new Uint16Array(buffer);this.uint32Array=new Uint32Array(buffer)};this.clearBuffer=()=>{prevBuffer=null;this.float32Array=null;this.uint16Array=null;this.uint32Array=null;if(stack.length!==0){this.setBuffer(stack.pop())}}}}const BufferStack=new _BufferStack;let _box1$1,_box2$1;const boxStack=[];const boxPool=new PrimitivePool(()=>new three.Box3);function shapecast(bvh,root,intersectsBounds,intersectsRange,boundsTraverseOrder,byteOffset){_box1$1=boxPool.getPrimitive();_box2$1=boxPool.getPrimitive();boxStack.push(_box1$1,_box2$1);BufferStack.setBuffer(bvh._roots[root]);const result=shapecastTraverse(0,bvh.geometry,intersectsBounds,intersectsRange,boundsTraverseOrder,byteOffset);BufferStack.clearBuffer();boxPool.releasePrimitive(_box1$1);boxPool.releasePrimitive(_box2$1);boxStack.pop();boxStack.pop();const length=boxStack.length;if(length>0){_box2$1=boxStack[length-1];_box1$1=boxStack[length-2]}return result}function shapecastTraverse(nodeIndex32,geometry,intersectsBoundsFunc,intersectsRangeFunc,nodeScoreFunc=null,nodeIndexByteOffset=0,depth=0){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);arrayToBox(BOUNDING_DATA_INDEX(nodeIndex32),float32Array,_box1$1);return intersectsRangeFunc(offset,count,false,depth,nodeIndexByteOffset+nodeIndex32,_box1$1)}else{const left=LEFT_NODE(nodeIndex32);const right=RIGHT_NODE(nodeIndex32,uint32Array);let c1=left;let c2=right;let score1,score2;let box1,box2;if(nodeScoreFunc){box1=_box1$1;box2=_box2$1;arrayToBox(BOUNDING_DATA_INDEX(c1),float32Array,box1);arrayToBox(BOUNDING_DATA_INDEX(c2),float32Array,box2);score1=nodeScoreFunc(box1);score2=nodeScoreFunc(box2);if(score2<score1){c1=right;c2=left;const temp=score1;score1=score2;score2=temp;box1=box2}}if(!box1){box1=_box1$1;arrayToBox(BOUNDING_DATA_INDEX(c1),float32Array,box1)}const isC1Leaf=IS_LEAF(c1*2,uint16Array);const c1Intersection=intersectsBoundsFunc(box1,isC1Leaf,score1,depth+1,nodeIndexByteOffset+c1);let c1StopTraversal;if(c1Intersection===CONTAINED){const offset=getLeftOffset(c1);const end=getRightEndOffset(c1);const count=end-offset;c1StopTraversal=intersectsRangeFunc(offset,count,true,depth+1,nodeIndexByteOffset+c1,box1)}else{c1StopTraversal=c1Intersection&&shapecastTraverse(c1,geometry,intersectsBoundsFunc,intersectsRangeFunc,nodeScoreFunc,nodeIndexByteOffset,depth+1)}if(c1StopTraversal)return true;box2=_box2$1;arrayToBox(BOUNDING_DATA_INDEX(c2),float32Array,box2);const isC2Leaf=IS_LEAF(c2*2,uint16Array);const c2Intersection=intersectsBoundsFunc(box2,isC2Leaf,score2,depth+1,nodeIndexByteOffset+c2);let c2StopTraversal;if(c2Intersection===CONTAINED){const offset=getLeftOffset(c2);const end=getRightEndOffset(c2);const count=end-offset;c2StopTraversal=intersectsRangeFunc(offset,count,true,depth+1,nodeIndexByteOffset+c2,box2)}else{c2StopTraversal=c2Intersection&&shapecastTraverse(c2,geometry,intersectsBoundsFunc,intersectsRangeFunc,nodeScoreFunc,nodeIndexByteOffset,depth+1)}if(c2StopTraversal)return true;return false;function getLeftOffset(nodeIndex32){const{uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;while(!IS_LEAF(nodeIndex16,uint16Array)){nodeIndex32=LEFT_NODE(nodeIndex32);nodeIndex16=nodeIndex32*2}return OFFSET(nodeIndex32,uint32Array)}function getRightEndOffset(nodeIndex32){const{uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;while(!IS_LEAF(nodeIndex16,uint16Array)){nodeIndex32=RIGHT_NODE(nodeIndex32,uint32Array);nodeIndex16=nodeIndex32*2}return OFFSET(nodeIndex32,uint32Array)+COUNT(nodeIndex16,uint16Array)}}}const temp=new three.Vector3;const temp1$2=new three.Vector3;function closestPointToPoint(bvh,point,target={},minThreshold=0,maxThreshold=Infinity){const minThresholdSq=minThreshold*minThreshold;const maxThresholdSq=maxThreshold*maxThreshold;let closestDistanceSq=Infinity;let closestDistanceTriIndex=null;bvh.shapecast({boundsTraverseOrder:box=>{temp.copy(point).clamp(box.min,box.max);return temp.distanceToSquared(point)},intersectsBounds:(box,isLeaf,score)=>{return score<closestDistanceSq&&score<maxThresholdSq},intersectsTriangle:(tri,triIndex)=>{tri.closestPointToPoint(point,temp);const distSq=point.distanceToSquared(temp);if(distSq<closestDistanceSq){temp1$2.copy(temp);closestDistanceSq=distSq;closestDistanceTriIndex=triIndex}if(distSq<minThresholdSq){return true}else{return false}}});if(closestDistanceSq===Infinity)return null;const closestDistance=Math.sqrt(closestDistanceSq);if(!target.point)target.point=temp1$2.clone();else target.point.copy(temp1$2);target.distance=closestDistance,target.faceIndex=closestDistanceTriIndex;return target}const _vA=new three.Vector3;const _vB=new three.Vector3;const _vC=new three.Vector3;const _uvA=new three.Vector2;const _uvB=new three.Vector2;const _uvC=new three.Vector2;const _normalA=new three.Vector3;const _normalB=new three.Vector3;const _normalC=new three.Vector3;const _intersectionPoint=new three.Vector3;function checkIntersection(ray,pA,pB,pC,point,side){let intersect;if(side===three.BackSide){intersect=ray.intersectTriangle(pC,pB,pA,true,point)}else{intersect=ray.intersectTriangle(pA,pB,pC,side!==three.DoubleSide,point)}if(intersect===null)return null;const distance=ray.origin.distanceTo(point);return{distance:distance,point:point.clone()}}function checkBufferGeometryIntersection(ray,position,normal,uv,uv1,a,b,c,side){_vA.fromBufferAttribute(position,a);_vB.fromBufferAttribute(position,b);_vC.fromBufferAttribute(position,c);const intersection=checkIntersection(ray,_vA,_vB,_vC,_intersectionPoint,side);if(intersection){if(uv){_uvA.fromBufferAttribute(uv,a);_uvB.fromBufferAttribute(uv,b);_uvC.fromBufferAttribute(uv,c);intersection.uv=three.Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new three.Vector2)}if(uv1){_uvA.fromBufferAttribute(uv1,a);_uvB.fromBufferAttribute(uv1,b);_uvC.fromBufferAttribute(uv1,c);intersection.uv1=three.Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_uvA,_uvB,_uvC,new three.Vector2)}if(normal){_normalA.fromBufferAttribute(normal,a);_normalB.fromBufferAttribute(normal,b);_normalC.fromBufferAttribute(normal,c);intersection.normal=three.Triangle.getInterpolation(_intersectionPoint,_vA,_vB,_vC,_normalA,_normalB,_normalC,new three.Vector3);if(intersection.normal.dot(ray.direction)>0){intersection.normal.multiplyScalar(-1)}}const face={a:a,b:b,c:c,normal:new three.Vector3,materialIndex:0};three.Triangle.getNormal(_vA,_vB,_vC,face.normal);intersection.face=face;intersection.faceIndex=a}return intersection}function intersectTri(geo,side,ray,tri,intersections){const triOffset=tri*3;let a=triOffset+0;let b=triOffset+1;let c=triOffset+2;const index=geo.index;if(geo.index){a=index.getX(a);b=index.getX(b);c=index.getX(c)}const{position,normal,uv,uv1}=geo.attributes;const intersection=checkBufferGeometryIntersection(ray,position,normal,uv,uv1,a,b,c,side);if(intersection){intersection.faceIndex=tri;if(intersections)intersections.push(intersection);return intersection}return null}function setTriangle(tri,i,index,pos){const ta=tri.a;const tb=tri.b;const tc=tri.c;let i0=i;let i1=i+1;let i2=i+2;if(index){i0=index.getX(i0);i1=index.getX(i1);i2=index.getX(i2)}ta.x=pos.getX(i0);ta.y=pos.getY(i0);ta.z=pos.getZ(i0);tb.x=pos.getX(i1);tb.y=pos.getY(i1);tb.z=pos.getZ(i1);tc.x=pos.getX(i2);tc.y=pos.getY(i2);tc.z=pos.getZ(i2)}const tempV1=new three.Vector3;const tempV2=new three.Vector3;const tempV3=new three.Vector3;const tempUV1=new three.Vector2;const tempUV2=new three.Vector2;const tempUV3=new three.Vector2;function getTriangleHitPointInfo(point,geometry,triangleIndex,target){const indices=geometry.getIndex().array;const positions=geometry.getAttribute("position");const uvs=geometry.getAttribute("uv");const a=indices[triangleIndex*3];const b=indices[triangleIndex*3+1];const c=indices[triangleIndex*3+2];tempV1.fromBufferAttribute(positions,a);tempV2.fromBufferAttribute(positions,b);tempV3.fromBufferAttribute(positions,c);let materialIndex=0;const groups=geometry.groups;const firstVertexIndex=triangleIndex*3;for(let i=0,l=groups.length;i<l;i++){const group=groups[i];const{start,count}=group;if(firstVertexIndex>=start&&firstVertexIndex<start+count){materialIndex=group.materialIndex;break}}let uv=null;if(uvs){tempUV1.fromBufferAttribute(uvs,a);tempUV2.fromBufferAttribute(uvs,b);tempUV3.fromBufferAttribute(uvs,c);if(target&&target.uv)uv=target.uv;else uv=new three.Vector2;three.Triangle.getInterpolation(point,tempV1,tempV2,tempV3,tempUV1,tempUV2,tempUV3,uv)}if(target){if(!target.face)target.face={};target.face.a=a;target.face.b=b;target.face.c=c;target.face.materialIndex=materialIndex;if(!target.face.normal)target.face.normal=new three.Vector3;three.Triangle.getNormal(tempV1,tempV2,tempV3,target.face.normal);if(uv)target.uv=uv;return target}else{return{face:{a:a,b:b,c:c,materialIndex:materialIndex,normal:three.Triangle.getNormal(tempV1,tempV2,tempV3,new three.Vector3)},uv:uv}}}function intersectTris(bvh,side,ray,offset,count,intersections){const{geometry,_indirectBuffer}=bvh;for(let i=offset,end=offset+count;i<end;i++){intersectTri(geometry,side,ray,i,intersections)}}function intersectClosestTri(bvh,side,ray,offset,count){const{geometry,_indirectBuffer}=bvh;let dist=Infinity;let res=null;for(let i=offset,end=offset+count;i<end;i++){let intersection;intersection=intersectTri(geometry,side,ray,i);if(intersection&&intersection.distance<dist){res=intersection;dist=intersection.distance}}return res}function iterateOverTriangles(offset,count,bvh,intersectsTriangleFunc,contained,depth,triangle){const{geometry}=bvh;const{index}=geometry;const pos=geometry.attributes.position;for(let i=offset,l=count+offset;i<l;i++){let tri;tri=i;setTriangle(triangle,tri*3,index,pos);triangle.needsUpdate=true;if(intersectsTriangleFunc(triangle,tri,contained,depth)){return true}}return false}function refit(bvh,nodeIndices=null){if(nodeIndices&&Array.isArray(nodeIndices)){nodeIndices=new Set(nodeIndices)}const geometry=bvh.geometry;const indexArr=geometry.index?geometry.index.array:null;const posAttr=geometry.attributes.position;let buffer,uint32Array,uint16Array,float32Array;let byteOffset=0;const roots=bvh._roots;for(let i=0,l=roots.length;i<l;i++){buffer=roots[i];uint32Array=new Uint32Array(buffer);uint16Array=new Uint16Array(buffer);float32Array=new Float32Array(buffer);_traverse(0,byteOffset);byteOffset+=buffer.byteLength}function _traverse(node32Index,byteOffset,force=false){const node16Index=node32Index*2;const isLeaf=uint16Array[node16Index+15]===IS_LEAFNODE_FLAG;if(isLeaf){const offset=uint32Array[node32Index+6];const count=uint16Array[node16Index+14];let minx=Infinity;let miny=Infinity;let minz=Infinity;let maxx=-Infinity;let maxy=-Infinity;let maxz=-Infinity;for(let i=3*offset,l=3*(offset+count);i<l;i++){let index=indexArr[i];const x=posAttr.getX(index);const y=posAttr.getY(index);const z=posAttr.getZ(index);if(x<minx)minx=x;if(x>maxx)maxx=x;if(y<miny)miny=y;if(y>maxy)maxy=y;if(z<minz)minz=z;if(z>maxz)maxz=z}if(float32Array[node32Index+0]!==minx||float32Array[node32Index+1]!==miny||float32Array[node32Index+2]!==minz||float32Array[node32Index+3]!==maxx||float32Array[node32Index+4]!==maxy||float32Array[node32Index+5]!==maxz){float32Array[node32Index+0]=minx;float32Array[node32Index+1]=miny;float32Array[node32Index+2]=minz;float32Array[node32Index+3]=maxx;float32Array[node32Index+4]=maxy;float32Array[node32Index+5]=maxz;return true}else{return false}}else{const left=node32Index+8;const right=uint32Array[node32Index+6];const offsetLeft=left+byteOffset;const offsetRight=right+byteOffset;let forceChildren=force;let includesLeft=false;let includesRight=false;if(nodeIndices){if(!forceChildren){includesLeft=nodeIndices.has(offsetLeft);includesRight=nodeIndices.has(offsetRight);forceChildren=!includesLeft&&!includesRight}}else{includesLeft=true;includesRight=true}const traverseLeft=forceChildren||includesLeft;const traverseRight=forceChildren||includesRight;let leftChange=false;if(traverseLeft){leftChange=_traverse(left,byteOffset,forceChildren)}let rightChange=false;if(traverseRight){rightChange=_traverse(right,byteOffset,forceChildren)}const didChange=leftChange||rightChange;if(didChange){for(let i=0;i<3;i++){const lefti=left+i;const righti=right+i;const minLeftValue=float32Array[lefti];const maxLeftValue=float32Array[lefti+3];const minRightValue=float32Array[righti];const maxRightValue=float32Array[righti+3];float32Array[node32Index+i]=minLeftValue<minRightValue?minLeftValue:minRightValue;float32Array[node32Index+i+3]=maxLeftValue>maxRightValue?maxLeftValue:maxRightValue}}return didChange}}}function intersectRay(nodeIndex32,array,ray){let tmin,tmax,tymin,tymax,tzmin,tzmax;const invdirx=1/ray.direction.x,invdiry=1/ray.direction.y,invdirz=1/ray.direction.z;const ox=ray.origin.x;const oy=ray.origin.y;const oz=ray.origin.z;let minx=array[nodeIndex32];let maxx=array[nodeIndex32+3];let miny=array[nodeIndex32+1];let maxy=array[nodeIndex32+3+1];let minz=array[nodeIndex32+2];let maxz=array[nodeIndex32+3+2];if(invdirx>=0){tmin=(minx-ox)*invdirx;tmax=(maxx-ox)*invdirx}else{tmin=(maxx-ox)*invdirx;tmax=(minx-ox)*invdirx}if(invdiry>=0){tymin=(miny-oy)*invdiry;tymax=(maxy-oy)*invdiry}else{tymin=(maxy-oy)*invdiry;tymax=(miny-oy)*invdiry}if(tmin>tymax||tymin>tmax)return false;if(tymin>tmin||isNaN(tmin))tmin=tymin;if(tymax<tmax||isNaN(tmax))tmax=tymax;if(invdirz>=0){tzmin=(minz-oz)*invdirz;tzmax=(maxz-oz)*invdirz}else{tzmin=(maxz-oz)*invdirz;tzmax=(minz-oz)*invdirz}if(tmin>tzmax||tzmin>tmax)return false;if(tzmax<tmax||tmax!==tmax)tmax=tzmax;if(tmax<0)return false;return true}function intersectTris_indirect(bvh,side,ray,offset,count,intersections){const{geometry,_indirectBuffer}=bvh;for(let i=offset,end=offset+count;i<end;i++){let vi=_indirectBuffer?_indirectBuffer[i]:i;intersectTri(geometry,side,ray,vi,intersections)}}function intersectClosestTri_indirect(bvh,side,ray,offset,count){const{geometry,_indirectBuffer}=bvh;let dist=Infinity;let res=null;for(let i=offset,end=offset+count;i<end;i++){let intersection;intersection=intersectTri(geometry,side,ray,_indirectBuffer?_indirectBuffer[i]:i);if(intersection&&intersection.distance<dist){res=intersection;dist=intersection.distance}}return res}function iterateOverTriangles_indirect(offset,count,bvh,intersectsTriangleFunc,contained,depth,triangle){const{geometry}=bvh;const{index}=geometry;const pos=geometry.attributes.position;for(let i=offset,l=count+offset;i<l;i++){let tri;tri=bvh.resolveTriangleIndex(i);setTriangle(triangle,tri*3,index,pos);triangle.needsUpdate=true;if(intersectsTriangleFunc(triangle,tri,contained,depth)){return true}}return false}function raycast(bvh,root,side,ray,intersects){BufferStack.setBuffer(bvh._roots[root]);_raycast$1(0,bvh,side,ray,intersects);BufferStack.clearBuffer()}function _raycast$1(nodeIndex32,bvh,side,ray,intersects){const{float32Array,uint16Array,uint32Array}=BufferStack;const nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);intersectTris(bvh,side,ray,offset,count,intersects)}else{const leftIndex=LEFT_NODE(nodeIndex32);if(intersectRay(leftIndex,float32Array,ray)){_raycast$1(leftIndex,bvh,side,ray,intersects)}const rightIndex=RIGHT_NODE(nodeIndex32,uint32Array);if(intersectRay(rightIndex,float32Array,ray)){_raycast$1(rightIndex,bvh,side,ray,intersects)}}}const _xyzFields$1=["x","y","z"];function raycastFirst(bvh,root,side,ray){BufferStack.setBuffer(bvh._roots[root]);const result=_raycastFirst$1(0,bvh,side,ray);BufferStack.clearBuffer();return result}function _raycastFirst$1(nodeIndex32,bvh,side,ray){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);return intersectClosestTri(bvh,side,ray,offset,count)}else{const splitAxis=SPLIT_AXIS(nodeIndex32,uint32Array);const xyzAxis=_xyzFields$1[splitAxis];const rayDir=ray.direction[xyzAxis];const leftToRight=rayDir>=0;let c1,c2;if(leftToRight){c1=LEFT_NODE(nodeIndex32);c2=RIGHT_NODE(nodeIndex32,uint32Array)}else{c1=RIGHT_NODE(nodeIndex32,uint32Array);c2=LEFT_NODE(nodeIndex32)}const c1Intersection=intersectRay(c1,float32Array,ray);const c1Result=c1Intersection?_raycastFirst$1(c1,bvh,side,ray):null;if(c1Result){const point=c1Result.point[xyzAxis];const isOutside=leftToRight?point<=float32Array[c2+splitAxis]:point>=float32Array[c2+splitAxis+3];if(isOutside){return c1Result}}const c2Intersection=intersectRay(c2,float32Array,ray);const c2Result=c2Intersection?_raycastFirst$1(c2,bvh,side,ray):null;if(c1Result&&c2Result){return c1Result.distance<=c2Result.distance?c1Result:c2Result}else{return c1Result||c2Result||null}}}const boundingBox$2=new three.Box3;const triangle$1=new ExtendedTriangle;const triangle2$1=new ExtendedTriangle;const invertedMat$1=new three.Matrix4;const obb$4=new OrientedBox;const obb2$3=new OrientedBox;function intersectsGeometry(bvh,root,otherGeometry,geometryToBvh){BufferStack.setBuffer(bvh._roots[root]);const result=_intersectsGeometry$1(0,bvh,otherGeometry,geometryToBvh);BufferStack.clearBuffer();return result}function _intersectsGeometry$1(nodeIndex32,bvh,otherGeometry,geometryToBvh,cachedObb=null){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;if(cachedObb===null){if(!otherGeometry.boundingBox){otherGeometry.computeBoundingBox()}obb$4.set(otherGeometry.boundingBox.min,otherGeometry.boundingBox.max,geometryToBvh);cachedObb=obb$4}const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const thisGeometry=bvh.geometry;const thisIndex=thisGeometry.index;const thisPos=thisGeometry.attributes.position;const index=otherGeometry.index;const pos=otherGeometry.attributes.position;const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);invertedMat$1.copy(geometryToBvh).invert();if(otherGeometry.boundsTree){arrayToBox(BOUNDING_DATA_INDEX(nodeIndex32),float32Array,obb2$3);obb2$3.matrix.copy(invertedMat$1);obb2$3.needsUpdate=true;const res=otherGeometry.boundsTree.shapecast({intersectsBounds:box=>obb2$3.intersectsBox(box),intersectsTriangle:tri=>{tri.a.applyMatrix4(geometryToBvh);tri.b.applyMatrix4(geometryToBvh);tri.c.applyMatrix4(geometryToBvh);tri.needsUpdate=true;for(let i=offset*3,l=(count+offset)*3;i<l;i+=3){setTriangle(triangle2$1,i,thisIndex,thisPos);triangle2$1.needsUpdate=true;if(tri.intersectsTriangle(triangle2$1)){return true}}return false}});return res}else{for(let i=offset*3,l=(count+offset)*3;i<l;i+=3){setTriangle(triangle$1,i,thisIndex,thisPos);triangle$1.a.applyMatrix4(invertedMat$1);triangle$1.b.applyMatrix4(invertedMat$1);triangle$1.c.applyMatrix4(invertedMat$1);triangle$1.needsUpdate=true;for(let i2=0,l2=index.count;i2<l2;i2+=3){setTriangle(triangle2$1,i2,index,pos);triangle2$1.needsUpdate=true;if(triangle$1.intersectsTriangle(triangle2$1)){return true}}}}}else{const left=nodeIndex32+8;const right=uint32Array[nodeIndex32+6];arrayToBox(BOUNDING_DATA_INDEX(left),float32Array,boundingBox$2);const leftIntersection=cachedObb.intersectsBox(boundingBox$2)&&_intersectsGeometry$1(left,bvh,otherGeometry,geometryToBvh,cachedObb);if(leftIntersection)return true;arrayToBox(BOUNDING_DATA_INDEX(right),float32Array,boundingBox$2);const rightIntersection=cachedObb.intersectsBox(boundingBox$2)&&_intersectsGeometry$1(right,bvh,otherGeometry,geometryToBvh,cachedObb);if(rightIntersection)return true;return false}}const tempMatrix$1=new three.Matrix4;const obb$3=new OrientedBox;const obb2$2=new OrientedBox;const temp1$1=new three.Vector3;const temp2$1=new three.Vector3;const temp3$1=new three.Vector3;const temp4$1=new three.Vector3;function closestPointToGeometry(bvh,otherGeometry,geometryToBvh,target1={},target2={},minThreshold=0,maxThreshold=Infinity){if(!otherGeometry.boundingBox){otherGeometry.computeBoundingBox()}obb$3.set(otherGeometry.boundingBox.min,otherGeometry.boundingBox.max,geometryToBvh);obb$3.needsUpdate=true;const geometry=bvh.geometry;const pos=geometry.attributes.position;const index=geometry.index;const otherPos=otherGeometry.attributes.position;const otherIndex=otherGeometry.index;const triangle=ExtendedTrianglePool.getPrimitive();const triangle2=ExtendedTrianglePool.getPrimitive();let tempTarget1=temp1$1;let tempTargetDest1=temp2$1;let tempTarget2=null;let tempTargetDest2=null;if(target2){tempTarget2=temp3$1;tempTargetDest2=temp4$1}let closestDistance=Infinity;let closestDistanceTriIndex=null;let closestDistanceOtherTriIndex=null;tempMatrix$1.copy(geometryToBvh).invert();obb2$2.matrix.copy(tempMatrix$1);bvh.shapecast({boundsTraverseOrder:box=>{return obb$3.distanceToBox(box)},intersectsBounds:(box,isLeaf,score)=>{if(score<closestDistance&&score<maxThreshold){if(isLeaf){obb2$2.min.copy(box.min);obb2$2.max.copy(box.max);obb2$2.needsUpdate=true}return true}return false},intersectsRange:(offset,count)=>{if(otherGeometry.boundsTree){const otherBvh=otherGeometry.boundsTree;return otherBvh.shapecast({boundsTraverseOrder:box=>{return obb2$2.distanceToBox(box)},intersectsBounds:(box,isLeaf,score)=>{return score<closestDistance&&score<maxThreshold},intersectsRange:(otherOffset,otherCount)=>{for(let i2=otherOffset,l2=otherOffset+otherCount;i2<l2;i2++){setTriangle(triangle2,3*i2,otherIndex,otherPos);triangle2.a.applyMatrix4(geometryToBvh);triangle2.b.applyMatrix4(geometryToBvh);triangle2.c.applyMatrix4(geometryToBvh);triangle2.needsUpdate=true;for(let i=offset,l=offset+count;i<l;i++){setTriangle(triangle,3*i,index,pos);triangle.needsUpdate=true;const dist=triangle.distanceToTriangle(triangle2,tempTarget1,tempTarget2);if(dist<closestDistance){tempTargetDest1.copy(tempTarget1);if(tempTargetDest2){tempTargetDest2.copy(tempTarget2)}closestDistance=dist;closestDistanceTriIndex=i;closestDistanceOtherTriIndex=i2}if(dist<minThreshold){return true}}}}})}else{const triCount=getTriCount(otherGeometry);for(let i2=0,l2=triCount;i2<l2;i2++){setTriangle(triangle2,3*i2,otherIndex,otherPos);triangle2.a.applyMatrix4(geometryToBvh);triangle2.b.applyMatrix4(geometryToBvh);triangle2.c.applyMatrix4(geometryToBvh);triangle2.needsUpdate=true;for(let i=offset,l=offset+count;i<l;i++){setTriangle(triangle,3*i,index,pos);triangle.needsUpdate=true;const dist=triangle.distanceToTriangle(triangle2,tempTarget1,tempTarget2);if(dist<closestDistance){tempTargetDest1.copy(tempTarget1);if(tempTargetDest2){tempTargetDest2.copy(tempTarget2)}closestDistance=dist;closestDistanceTriIndex=i;closestDistanceOtherTriIndex=i2}if(dist<minThreshold){return true}}}}}});ExtendedTrianglePool.releasePrimitive(triangle);ExtendedTrianglePool.releasePrimitive(triangle2);if(closestDistance===Infinity){return null}if(!target1.point){target1.point=tempTargetDest1.clone()}else{target1.point.copy(tempTargetDest1)}target1.distance=closestDistance,target1.faceIndex=closestDistanceTriIndex;if(target2){if(!target2.point)target2.point=tempTargetDest2.clone();else target2.point.copy(tempTargetDest2);target2.point.applyMatrix4(tempMatrix$1);tempTargetDest1.applyMatrix4(tempMatrix$1);target2.distance=tempTargetDest1.sub(target2.point).length();target2.faceIndex=closestDistanceOtherTriIndex}return target1}function refit_indirect(bvh,nodeIndices=null){if(nodeIndices&&Array.isArray(nodeIndices)){nodeIndices=new Set(nodeIndices)}const geometry=bvh.geometry;const indexArr=geometry.index?geometry.index.array:null;const posAttr=geometry.attributes.position;let buffer,uint32Array,uint16Array,float32Array;let byteOffset=0;const roots=bvh._roots;for(let i=0,l=roots.length;i<l;i++){buffer=roots[i];uint32Array=new Uint32Array(buffer);uint16Array=new Uint16Array(buffer);float32Array=new Float32Array(buffer);_traverse(0,byteOffset);byteOffset+=buffer.byteLength}function _traverse(node32Index,byteOffset,force=false){const node16Index=node32Index*2;const isLeaf=uint16Array[node16Index+15]===IS_LEAFNODE_FLAG;if(isLeaf){const offset=uint32Array[node32Index+6];const count=uint16Array[node16Index+14];let minx=Infinity;let miny=Infinity;let minz=Infinity;let maxx=-Infinity;let maxy=-Infinity;let maxz=-Infinity;for(let i=offset,l=offset+count;i<l;i++){const t=3*bvh.resolveTriangleIndex(i);for(let j=0;j<3;j++){let index=t+j;index=indexArr?indexArr[index]:index;const x=posAttr.getX(index);const y=posAttr.getY(index);const z=posAttr.getZ(index);if(x<minx)minx=x;if(x>maxx)maxx=x;if(y<miny)miny=y;if(y>maxy)maxy=y;if(z<minz)minz=z;if(z>maxz)maxz=z}}if(float32Array[node32Index+0]!==minx||float32Array[node32Index+1]!==miny||float32Array[node32Index+2]!==minz||float32Array[node32Index+3]!==maxx||float32Array[node32Index+4]!==maxy||float32Array[node32Index+5]!==maxz){float32Array[node32Index+0]=minx;float32Array[node32Index+1]=miny;float32Array[node32Index+2]=minz;float32Array[node32Index+3]=maxx;float32Array[node32Index+4]=maxy;float32Array[node32Index+5]=maxz;return true}else{return false}}else{const left=node32Index+8;const right=uint32Array[node32Index+6];const offsetLeft=left+byteOffset;const offsetRight=right+byteOffset;let forceChildren=force;let includesLeft=false;let includesRight=false;if(nodeIndices){if(!forceChildren){includesLeft=nodeIndices.has(offsetLeft);includesRight=nodeIndices.has(offsetRight);forceChildren=!includesLeft&&!includesRight}}else{includesLeft=true;includesRight=true}const traverseLeft=forceChildren||includesLeft;const traverseRight=forceChildren||includesRight;let leftChange=false;if(traverseLeft){leftChange=_traverse(left,byteOffset,forceChildren)}let rightChange=false;if(traverseRight){rightChange=_traverse(right,byteOffset,forceChildren)}const didChange=leftChange||rightChange;if(didChange){for(let i=0;i<3;i++){const lefti=left+i;const righti=right+i;const minLeftValue=float32Array[lefti];const maxLeftValue=float32Array[lefti+3];const minRightValue=float32Array[righti];const maxRightValue=float32Array[righti+3];float32Array[node32Index+i]=minLeftValue<minRightValue?minLeftValue:minRightValue;float32Array[node32Index+i+3]=maxLeftValue>maxRightValue?maxLeftValue:maxRightValue}}return didChange}}}function raycast_indirect(bvh,root,side,ray,intersects){BufferStack.setBuffer(bvh._roots[root]);_raycast(0,bvh,side,ray,intersects);BufferStack.clearBuffer()}function _raycast(nodeIndex32,bvh,side,ray,intersects){const{float32Array,uint16Array,uint32Array}=BufferStack;const nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);intersectTris_indirect(bvh,side,ray,offset,count,intersects)}else{const leftIndex=LEFT_NODE(nodeIndex32);if(intersectRay(leftIndex,float32Array,ray)){_raycast(leftIndex,bvh,side,ray,intersects)}const rightIndex=RIGHT_NODE(nodeIndex32,uint32Array);if(intersectRay(rightIndex,float32Array,ray)){_raycast(rightIndex,bvh,side,ray,intersects)}}}const _xyzFields=["x","y","z"];function raycastFirst_indirect(bvh,root,side,ray){BufferStack.setBuffer(bvh._roots[root]);const result=_raycastFirst(0,bvh,side,ray);BufferStack.clearBuffer();return result}function _raycastFirst(nodeIndex32,bvh,side,ray){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);return intersectClosestTri_indirect(bvh,side,ray,offset,count)}else{const splitAxis=SPLIT_AXIS(nodeIndex32,uint32Array);const xyzAxis=_xyzFields[splitAxis];const rayDir=ray.direction[xyzAxis];const leftToRight=rayDir>=0;let c1,c2;if(leftToRight){c1=LEFT_NODE(nodeIndex32);c2=RIGHT_NODE(nodeIndex32,uint32Array)}else{c1=RIGHT_NODE(nodeIndex32,uint32Array);c2=LEFT_NODE(nodeIndex32)}const c1Intersection=intersectRay(c1,float32Array,ray);const c1Result=c1Intersection?_raycastFirst(c1,bvh,side,ray):null;if(c1Result){const point=c1Result.point[xyzAxis];const isOutside=leftToRight?point<=float32Array[c2+splitAxis]:point>=float32Array[c2+splitAxis+3];if(isOutside){return c1Result}}const c2Intersection=intersectRay(c2,float32Array,ray);const c2Result=c2Intersection?_raycastFirst(c2,bvh,side,ray):null;if(c1Result&&c2Result){return c1Result.distance<=c2Result.distance?c1Result:c2Result}else{return c1Result||c2Result||null}}}const boundingBox$1=new three.Box3;const triangle=new ExtendedTriangle;const triangle2=new ExtendedTriangle;const invertedMat=new three.Matrix4;const obb$2=new OrientedBox;const obb2$1=new OrientedBox;function intersectsGeometry_indirect(bvh,root,otherGeometry,geometryToBvh){BufferStack.setBuffer(bvh._roots[root]);const result=_intersectsGeometry(0,bvh,otherGeometry,geometryToBvh);BufferStack.clearBuffer();return result}function _intersectsGeometry(nodeIndex32,bvh,otherGeometry,geometryToBvh,cachedObb=null){const{float32Array,uint16Array,uint32Array}=BufferStack;let nodeIndex16=nodeIndex32*2;if(cachedObb===null){if(!otherGeometry.boundingBox){otherGeometry.computeBoundingBox()}obb$2.set(otherGeometry.boundingBox.min,otherGeometry.boundingBox.max,geometryToBvh);cachedObb=obb$2}const isLeaf=IS_LEAF(nodeIndex16,uint16Array);if(isLeaf){const thisGeometry=bvh.geometry;const thisIndex=thisGeometry.index;const thisPos=thisGeometry.attributes.position;const index=otherGeometry.index;const pos=otherGeometry.attributes.position;const offset=OFFSET(nodeIndex32,uint32Array);const count=COUNT(nodeIndex16,uint16Array);invertedMat.copy(geometryToBvh).invert();if(otherGeometry.boundsTree){arrayToBox(BOUNDING_DATA_INDEX(nodeIndex32),float32Array,obb2$1);obb2$1.matrix.copy(invertedMat);obb2$1.needsUpdate=true;const res=otherGeometry.boundsTree.shapecast({intersectsBounds:box=>obb2$1.intersectsBox(box),intersectsTriangle:tri=>{tri.a.applyMatrix4(geometryToBvh);tri.b.applyMatrix4(geometryToBvh);tri.c.applyMatrix4(geometryToBvh);tri.needsUpdate=true;for(let i=offset,l=count+offset;i<l;i++){setTriangle(triangle2,3*bvh.resolveTriangleIndex(i),thisIndex,thisPos);triangle2.needsUpdate=true;if(tri.intersectsTriangle(triangle2)){return true}}return false}});return res}else{for(let i=offset,l=count+offset;i<l;i++){const ti=bvh.resolveTriangleIndex(i);setTriangle(triangle,3*ti,thisIndex,thisPos);triangle.a.applyMatrix4(invertedMat);triangle.b.applyMatrix4(invertedMat);triangle.c.applyMatrix4(invertedMat);triangle.needsUpdate=true;for(let i2=0,l2=index.count;i2<l2;i2+=3){setTriangle(triangle2,i2,index,pos);triangle2.needsUpdate=true;if(triangle.intersectsTriangle(triangle2)){return true}}}}}else{const left=nodeIndex32+8;const right=uint32Array[nodeIndex32+6];arrayToBox(BOUNDING_DATA_INDEX(left),float32Array,boundingBox$1);const leftIntersection=cachedObb.intersectsBox(boundingBox$1)&&_intersectsGeometry(left,bvh,otherGeometry,geometryToBvh,cachedObb);if(leftIntersection)return true;arrayToBox(BOUNDING_DATA_INDEX(right),float32Array,boundingBox$1);const rightIntersection=cachedObb.intersectsBox(boundingBox$1)&&_intersectsGeometry(right,bvh,otherGeometry,geometryToBvh,cachedObb);if(rightIntersection)return true;return false}}const tempMatrix=new three.Matrix4;const obb$1=new OrientedBox;const obb2=new OrientedBox;const temp1=new three.Vector3;const temp2=new three.Vector3;const temp3=new three.Vector3;const temp4=new three.Vector3;function closestPointToGeometry_indirect(bvh,otherGeometry,geometryToBvh,target1={},target2={},minThreshold=0,maxThreshold=Infinity){if(!otherGeometry.boundingBox){otherGeometry.computeBoundingBox()}obb$1.set(otherGeometry.boundingBox.min,otherGeometry.boundingBox.max,geometryToBvh);obb$1.needsUpdate=true;const geometry=bvh.geometry;const pos=geometry.attributes.position;const index=geometry.index;const otherPos=otherGeometry.attributes.position;const otherIndex=otherGeometry.index;const triangle=ExtendedTrianglePool.getPrimitive();const triangle2=ExtendedTrianglePool.getPrimitive();let tempTarget1=temp1;let tempTargetDest1=temp2;let tempTarget2=null;let tempTargetDest2=null;if(target2){tempTarget2=temp3;tempTargetDest2=temp4}let closestDistance=Infinity;let closestDistanceTriIndex=null;let closestDistanceOtherTriIndex=null;tempMatrix.copy(geometryToBvh).invert();obb2.matrix.copy(tempMatrix);bvh.shapecast({boundsTraverseOrder:box=>{return obb$1.distanceToBox(box)},intersectsBounds:(box,isLeaf,score)=>{if(score<closestDistance&&score<maxThreshold){if(isLeaf){obb2.min.copy(box.min);obb2.max.copy(box.max);obb2.needsUpdate=true}return true}return false},intersectsRange:(offset,count)=>{if(otherGeometry.boundsTree){const otherBvh=otherGeometry.boundsTree;return otherBvh.shapecast({boundsTraverseOrder:box=>{return obb2.distanceToBox(box)},intersectsBounds:(box,isLeaf,score)=>{return score<closestDistance&&score<maxThreshold},intersectsRange:(otherOffset,otherCount)=>{for(let i2=otherOffset,l2=otherOffset+otherCount;i2<l2;i2++){const ti2=otherBvh.resolveTriangleIndex(i2);setTriangle(triangle2,3*ti2,otherIndex,otherPos);triangle2.a.applyMatrix4(geometryToBvh);triangle2.b.applyMatrix4(geometryToBvh);triangle2.c.applyMatrix4(geometryToBvh);triangle2.needsUpdate=true;for(let i=offset,l=offset+count;i<l;i++){const ti=bvh.resolveTriangleIndex(i);setTriangle(triangle,3*ti,index,pos);triangle.needsUpdate=true;const dist=triangle.distanceToTriangle(triangle2,tempTarget1,tempTarget2);if(dist<closestDistance){tempTargetDest1.copy(tempTarget1);if(tempTargetDest2){tempTargetDest2.copy(tempTarget2)}closestDistance=dist;closestDistanceTriIndex=i;closestDistanceOtherTriIndex=i2}if(dist<minThreshold){return true}}}}})}else{const triCount=getTriCount(otherGeometry);for(let i2=0,l2=triCount;i2<l2;i2++){setTriangle(triangle2,3*i2,otherIndex,otherPos);triangle2.a.applyMatrix4(geometryToBvh);triangle2.b.applyMatrix4(geometryToBvh);triangle2.c.applyMatrix4(geometryToBvh);triangle2.needsUpdate=true;for(let i=offset,l=offset+count;i<l;i++){const ti=bvh.resolveTriangleIndex(i);setTriangle(triangle,3*ti,index,pos);triangle.needsUpdate=true;const dist=triangle.distanceToTriangle(triangle2,tempTarget1,tempTarget2);if(dist<closestDistance){tempTargetDest1.copy(tempTarget1);if(tempTargetDest2){tempTargetDest2.copy(tempTarget2)}closestDistance=dist;closestDistanceTriIndex=i;closestDistanceOtherTriIndex=i2}if(dist<minThreshold){return true}}}}}});ExtendedTrianglePool.releasePrimitive(triangle);ExtendedTrianglePool.releasePrimitive(triangle2);if(closestDistance===Infinity){return null}if(!target1.point){target1.point=tempTargetDest1.clone()}else{target1.point.copy(tempTargetDest1)}target1.distance=closestDistance,target1.faceIndex=closestDistanceTriIndex;if(target2){if(!target2.point)target2.point=tempTargetDest2.clone();else target2.point.copy(tempTargetDest2);target2.point.applyMatrix4(tempMatrix);tempTargetDest1.applyMatrix4(tempMatrix);target2.distance=tempTargetDest1.sub(target2.point).length();target2.faceIndex=closestDistanceOtherTriIndex}return target1}function isSharedArrayBufferSupported(){return typeof SharedArrayBuffer!=="undefined"}function convertToBufferType(array,BufferConstructor){if(array===null){return array}else if(array.buffer){const buffer=array.buffer;if(buffer.constructor===BufferConstructor){return array}const ArrayConstructor=array.constructor;const result=new ArrayConstructor(new BufferConstructor(buffer.byteLength));result.set(array);return result}else{if(array.constructor===BufferConstructor){return array}const result=new BufferConstructor(array.byteLength);new Uint8Array(result).set(new Uint8Array(array));return result}}const _bufferStack1=new BufferStack.constructor;const _bufferStack2=new BufferStack.constructor;const _boxPool=new PrimitivePool(()=>new three.Box3);const _leftBox1=new three.Box3;const _rightBox1=new three.Box3;const _leftBox2=new three.Box3;const _rightBox2=new three.Box3;let _active=false;function bvhcast(bvh,otherBvh,matrixToLocal,intersectsRanges){if(_active){throw new Error("MeshBVH: Recursive calls to bvhcast not supported.")}_active=true;const roots=bvh._roots;const otherRoots=otherBvh._roots;let result;let offset1=0;let offset2=0;const invMat=new three.Matrix4().copy(matrixToLocal).invert();for(let i=0,il=roots.length;i<il;i++){_bufferStack1.setBuffer(roots[i]);offset2=0;const localBox=_boxPool.getPrimitive();arrayToBox(BOUNDING_DATA_INDEX(0),_bufferStack1.float32Array,localBox);localBox.applyMatrix4(invMat);for(let j=0,jl=otherRoots.length;j<jl;j++){_bufferStack2.setBuffer(otherRoots[i]);result=_traverse(0,0,matrixToLocal,invMat,intersectsRanges,offset1,offset2,0,0,localBox);_bufferStack2.clearBuffer();offset2+=otherRoots[j].length;if(result){break}}_boxPool.releasePrimitive(localBox);_bufferStack1.clearBuffer();offset1+=roots[i].length;if(result){break}}_active=false;return result}function _traverse(node1Index32,node2Index32,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset=0,node2IndexByteOffset=0,depth1=0,depth2=0,currBox=null,reversed=false){let bufferStack1,bufferStack2;if(reversed){bufferStack1=_bufferStack2;bufferStack2=_bufferStack1}else{bufferStack1=_bufferStack1;bufferStack2=_bufferStack2}const float32Array1=bufferStack1.float32Array,uint32Array1=bufferStack1.uint32Array,uint16Array1=bufferStack1.uint16Array,float32Array2=bufferStack2.float32Array,uint32Array2=bufferStack2.uint32Array,uint16Array2=bufferStack2.uint16Array;const node1Index16=node1Index32*2;const node2Index16=node2Index32*2;const isLeaf1=IS_LEAF(node1Index16,uint16Array1);const isLeaf2=IS_LEAF(node2Index16,uint16Array2);let result=false;if(isLeaf2&&isLeaf1){if(reversed){result=intersectsRangesFunc(OFFSET(node2Index32,uint32Array2),COUNT(node2Index32*2,uint16Array2),OFFSET(node1Index32,uint32Array1),COUNT(node1Index32*2,uint16Array1),depth2,node2IndexByteOffset+node2Index32,depth1,node1IndexByteOffset+node1Index32)}else{result=intersectsRangesFunc(OFFSET(node1Index32,uint32Array1),COUNT(node1Index32*2,uint16Array1),OFFSET(node2Index32,uint32Array2),COUNT(node2Index32*2,uint16Array2),depth1,node1IndexByteOffset+node1Index32,depth2,node2IndexByteOffset+node2Index32)}}else if(isLeaf2){const newBox=_boxPool.getPrimitive();arrayToBox(BOUNDING_DATA_INDEX(node2Index32),float32Array2,newBox);newBox.applyMatrix4(matrix2to1);const cl1=LEFT_NODE(node1Index32);const cr1=RIGHT_NODE(node1Index32,uint32Array1);arrayToBox(BOUNDING_DATA_INDEX(cl1),float32Array1,_leftBox1);arrayToBox(BOUNDING_DATA_INDEX(cr1),float32Array1,_rightBox1);const intersectCl1=newBox.intersectsBox(_leftBox1);const intersectCr1=newBox.intersectsBox(_rightBox1);result=intersectCl1&&_traverse(node2Index32,cl1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed)||intersectCr1&&_traverse(node2Index32,cr1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed);_boxPool.releasePrimitive(newBox)}else{const cl2=LEFT_NODE(node2Index32);const cr2=RIGHT_NODE(node2Index32,uint32Array2);arrayToBox(BOUNDING_DATA_INDEX(cl2),float32Array2,_leftBox2);arrayToBox(BOUNDING_DATA_INDEX(cr2),float32Array2,_rightBox2);const leftIntersects=currBox.intersectsBox(_leftBox2);const rightIntersects=currBox.intersectsBox(_rightBox2);if(leftIntersects&&rightIntersects){result=_traverse(node1Index32,cl2,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset,node2IndexByteOffset,depth1,depth2+1,currBox,reversed)||_traverse(node1Index32,cr2,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset,node2IndexByteOffset,depth1,depth2+1,currBox,reversed)}else if(leftIntersects){if(isLeaf1){result=_traverse(node1Index32,cl2,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset,node2IndexByteOffset,depth1,depth2+1,currBox,reversed)}else{const newBox=_boxPool.getPrimitive();newBox.copy(_leftBox2).applyMatrix4(matrix2to1);const cl1=LEFT_NODE(node1Index32);const cr1=RIGHT_NODE(node1Index32,uint32Array1);arrayToBox(BOUNDING_DATA_INDEX(cl1),float32Array1,_leftBox1);arrayToBox(BOUNDING_DATA_INDEX(cr1),float32Array1,_rightBox1);const intersectCl1=newBox.intersectsBox(_leftBox1);const intersectCr1=newBox.intersectsBox(_rightBox1);result=intersectCl1&&_traverse(cl2,cl1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed)||intersectCr1&&_traverse(cl2,cr1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed);_boxPool.releasePrimitive(newBox)}}else if(rightIntersects){if(isLeaf1){result=_traverse(node1Index32,cr2,matrix2to1,matrix1to2,intersectsRangesFunc,node1IndexByteOffset,node2IndexByteOffset,depth1,depth2+1,currBox,reversed)}else{const newBox=_boxPool.getPrimitive();newBox.copy(_rightBox2).applyMatrix4(matrix2to1);const cl1=LEFT_NODE(node1Index32);const cr1=RIGHT_NODE(node1Index32,uint32Array1);arrayToBox(BOUNDING_DATA_INDEX(cl1),float32Array1,_leftBox1);arrayToBox(BOUNDING_DATA_INDEX(cr1),float32Array1,_rightBox1);const intersectCl1=newBox.intersectsBox(_leftBox1);const intersectCr1=newBox.intersectsBox(_rightBox1);result=intersectCl1&&_traverse(cr2,cl1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed)||intersectCr1&&_traverse(cr2,cr1,matrix1to2,matrix2to1,intersectsRangesFunc,node2IndexByteOffset,node1IndexByteOffset,depth2,depth1+1,newBox,!reversed);_boxPool.releasePrimitive(newBox)}}}return result}const obb=new OrientedBox;const tempBox=new three.Box3;const DEFAULT_OPTIONS={strategy:CENTER,maxDepth:40,maxLeafTris:10,useSharedArrayBuffer:false,setBoundingBox:true,onProgress:null,indirect:false,verbose:true};class MeshBVH{static serialize(bvh,options={}){options={cloneBuffers:true,...options};const geometry=bvh.geometry;const rootData=bvh._roots;const indirectBuffer=bvh._indirectBuffer;const indexAttribute=geometry.getIndex();let result;if(options.cloneBuffers){result={roots:rootData.map(root=>root.slice()),index:indexAttribute?indexAttribute.array.slice():null,indirectBuffer:indirectBuffer?indirectBuffer.slice():null}}else{result={roots:rootData,index:indexAttribute?indexAttribute.array:null,indirectBuffer:indirectBuffer}}return result}static deserialize(data,geometry,options={}){options={setIndex:true,indirect:Boolean(data.indirectBuffer),...options};const{index,roots,indirectBuffer}=data;const bvh=new MeshBVH(geometry,{...options,[SKIP_GENERATION]:true});bvh._roots=roots;bvh._indirectBuffer=indirectBuffer||null;if(options.setIndex){const indexAttribute=geometry.getIndex();if(indexAttribute===null){const newIndex=new three.BufferAttribute(data.index,1,false);geometry.setIndex(newIndex)}else if(indexAttribute.array!==index){indexAttribute.array.set(index);indexAttribute.needsUpdate=true}}return bvh}get indirect(){return!!this._indirectBuffer}constructor(geometry,options={}){if(!geometry.isBufferGeometry){throw new Error("MeshBVH: Only BufferGeometries are supported.")}else if(geometry.index&&geometry.index.isInterleavedBufferAttribute){throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}options=Object.assign({...DEFAULT_OPTIONS,[SKIP_GENERATION]:false},options);if(options.useSharedArrayBuffer&&!isSharedArrayBufferSupported()){throw new Error("MeshBVH: SharedArrayBuffer is not available.")}this.geometry=geometry;this._roots=null;this._indirectBuffer=null;if(!options[SKIP_GENERATION]){buildPackedTree(this,options);if(!geometry.boundingBox&&options.setBoundingBox){geometry.boundingBox=this.getBoundingBox(new three.Box3)}}this.resolveTriangleIndex=this._indirectBuffer?i=>this._indirectBuffer[i]:i=>i}refit(nodeIndices=null){const refitFunc=this.indirect?refit_indirect:refit;return refitFunc(this,nodeIndices)}traverse(callback,rootIndex=0){const buffer=this._roots[rootIndex];const uint32Array=new Uint32Array(buffer);const uint16Array=new Uint16Array(buffer);_traverse(0);function _traverse(node32Index,depth=0){const node16Index=node32Index*2;const isLeaf=uint16Array[node16Index+15]===IS_LEAFNODE_FLAG;if(isLeaf){const offset=uint32Array[node32Index+6];const count=uint16Array[node16Index+14];callback(depth,isLeaf,new Float32Array(buffer,node32Index*4,6),offset,count)}else{const left=node32Index+BYTES_PER_NODE/4;const right=uint32Array[node32Index+6];const splitAxis=uint32Array[node32Index+7];const stopTraversal=callback(depth,isLeaf,new Float32Array(buffer,node32Index*4,6),splitAxis);if(!stopTraversal){_traverse(left,depth+1);_traverse(right,depth+1)}}}}raycast(ray,materialOrSide=three.FrontSide){const roots=this._roots;const geometry=this.geometry;const intersects=[];const isMaterial=materialOrSide.isMaterial;const isArrayMaterial=Array.isArray(materialOrSide);const groups=geometry.groups;const side=isMaterial?materialOrSide.side:materialOrSide;const raycastFunc=this.indirect?raycast_indirect:raycast;for(let i=0,l=roots.length;i<l;i++){const materialSide=isArrayMaterial?materialOrSide[groups[i].materialIndex].side:side;const startCount=intersects.length;raycastFunc(this,i,materialSide,ray,intersects);if(isArrayMaterial){const materialIndex=groups[i].materialIndex;for(let j=startCount,jl=intersects.length;j<jl;j++){intersects[j].face.materialIndex=materialIndex}}}return intersects}raycastFirst(ray,materialOrSide=three.FrontSide){const roots=this._roots;const geometry=this.geometry;const isMaterial=materialOrSide.isMaterial;const isArrayMaterial=Array.isArray(materialOrSide);let closestResult=null;const groups=geometry.groups;const side=isMaterial?materialOrSide.side:materialOrSide;const raycastFirstFunc=this.indirect?raycastFirst_indirect:raycastFirst;for(let i=0,l=roots.length;i<l;i++){const materialSide=isArrayMaterial?materialOrSide[groups[i].materialIndex].side:side;const result=raycastFirstFunc(this,i,materialSide,ray);if(result!=null&&(closestResult==null||result.distance<closestResult.distance)){closestResult=result;if(isArrayMaterial){result.face.materialIndex=groups[i].materialIndex}}}return closestResult}intersectsGeometry(otherGeometry,geomToMesh){let result=false;const roots=this._roots;const intersectsGeometryFunc=this.indirect?intersectsGeometry_indirect:intersectsGeometry;for(let i=0,l=roots.length;i<l;i++){result=intersectsGeometryFunc(this,i,otherGeometry,geomToMesh);if(result){break}}return result}shapecast(callbacks){const triangle=ExtendedTrianglePool.getPrimitive();const iterateFunc=this.indirect?iterateOverTriangles_indirect:iterateOverTriangles;let{boundsTraverseOrder,intersectsBounds,intersectsRange,intersectsTriangle}=callbacks;if(intersectsRange&&intersectsTriangle){const originalIntersectsRange=intersectsRange;intersectsRange=(offset,count,contained,depth,nodeIndex)=>{if(!originalIntersectsRange(offset,count,contained,depth,nodeIndex)){return iterateFunc(offset,count,this,intersectsTriangle,contained,depth,triangle)}return true}}else if(!intersectsRange){if(intersectsTriangle){intersectsRange=(offset,count,contained,depth)=>{return iterateFunc(offset,count,this,intersectsTriangle,contained,depth,triangle)}}else{intersectsRange=(offset,count,contained)=>{return contained}}}let result=false;let byteOffset=0;const roots=this._roots;for(let i=0,l=roots.length;i<l;i++){const root=roots[i];result=shapecast(this,i,intersectsBounds,intersectsRange,boundsTraverseOrder,byteOffset);if(result){break}byteOffset+=root.byteLength}ExtendedTrianglePool.releasePrimitive(triangle);return result}bvhcast(otherBvh,matrixToLocal,callbacks){let{intersectsRanges,intersectsTriangles}=callbacks;const triangle1=ExtendedTrianglePool.getPrimitive();const indexAttr1=this.geometry.index;const positionAttr1=this.geometry.attributes.position;const assignTriangle1=this.indirect?i1=>{const ti=this.resolveTriangleIndex(i1);setTriangle(triangle1,ti*3,indexAttr1,positionAttr1)}:i1=>{setTriangle(triangle1,i1*3,indexAttr1,positionAttr1)};const triangle2=ExtendedTrianglePool.getPrimitive();const indexAttr2=otherBvh.geometry.index;const positionAttr2=otherBvh.geometry.attributes.position;const assignTriangle2=otherBvh.indirect?i2=>{const ti2=otherBvh.resolveTriangleIndex(i2);setTriangle(triangle2,ti2*3,indexAttr2,positionAttr2)}:i2=>{setTriangle(triangle2,i2*3,indexAttr2,positionAttr2)};if(intersectsTriangles){const iterateOverDoubleTriangles=(offset1,count1,offset2,count2,depth1,index1,depth2,index2)=>{for(let i2=offset2,l2=offset2+count2;i2<l2;i2++){assignTriangle2(i2);triangle2.a.applyMatrix4(matrixToLocal);triangle2.b.applyMatrix4(matrixToLocal);triangle2.c.applyMatrix4(matrixToLocal);triangle2.needsUpdate=true;for(let i1=offset1,l1=offset1+count1;i1<l1;i1++){assignTriangle1(i1);triangle1.needsUpdate=true;if(intersectsTriangles(triangle1,triangle2,i1,i2,depth1,index1,depth2,index2)){return true}}}return false};if(intersectsRanges){const originalIntersectsRanges=intersectsRanges;intersectsRanges=function(offset1,count1,offset2,count2,depth1,index1,depth2,index2){if(!originalIntersectsRanges(offset1,count1,offset2,count2,depth1,index1,depth2,index2)){return iterateOverDoubleTriangles(offset1,count1,offset2,count2,depth1,index1,depth2,index2)}return true}}else{intersectsRanges=iterateOverDoubleTriangles}}return bvhcast(this,otherBvh,matrixToLocal,intersectsRanges)}intersectsBox(box,boxToMesh){obb.set(box.min,box.max,boxToMesh);obb.needsUpdate=true;return this.shapecast({intersectsBounds:box=>obb.intersectsBox(box),intersectsTriangle:tri=>obb.intersectsTriangle(tri)})}intersectsSphere(sphere){return this.shapecast({intersectsBounds:box=>sphere.intersectsBox(box),intersectsTriangle:tri=>tri.intersectsSphere(sphere)})}closestPointToGeometry(otherGeometry,geometryToBvh,target1={},target2={},minThreshold=0,maxThreshold=Infinity){const closestPointToGeometryFunc=this.indirect?closestPointToGeometry_indirect:closestPointToGeometry;return closestPointToGeometryFunc(this,otherGeometry,geometryToBvh,target1,target2,minThreshold,maxThreshold)}closestPointToPoint(point,target={},minThreshold=0,maxThreshold=Infinity){return closestPointToPoint(this,point,target,minThreshold,maxThreshold)}getBoundingBox(target){target.makeEmpty();const roots=this._roots;roots.forEach(buffer=>{arrayToBox(0,new Float32Array(buffer),tempBox);target.union(tempBox)});return target}}const boundingBox=new three.Box3;class MeshBVHRootHelper extends three.Object3D{get isMesh(){return!this.displayEdges}get isLineSegments(){return this.displayEdges}get isLine(){return this.displayEdges}constructor(bvh,material,depth=10,group=0){super();this.material=material;this.geometry=new three.BufferGeometry;this.name="MeshBVHRootHelper";this.depth=depth;this.displayParents=false;this.bvh=bvh;this.displayEdges=true;this._group=group}raycast(){}update(){const geometry=this.geometry;const boundsTree=this.bvh;const group=this._group;geometry.dispose();this.visible=false;if(boundsTree){const targetDepth=this.depth-1;const displayParents=this.displayParents;let boundsCount=0;boundsTree.traverse((depth,isLeaf)=>{if(depth>=targetDepth||isLeaf){boundsCount++;return true}else if(displayParents){boundsCount++}},group);let posIndex=0;const positionArray=new Float32Array(8*3*boundsCount);boundsTree.traverse((depth,isLeaf,boundingData)=>{const terminate=depth>=targetDepth||isLeaf;if(terminate||displayParents){arrayToBox(0,boundingData,boundingBox);const{min,max}=boundingBox;for(let x=-1;x<=1;x+=2){const xVal=x<0?min.x:max.x;for(let y=-1;y<=1;y+=2){const yVal=y<0?min.y:max.y;for(let z=-1;z<=1;z+=2){const zVal=z<0?min.z:max.z;positionArray[posIndex+0]=xVal;positionArray[posIndex+1]=yVal;positionArray[posIndex+2]=zVal;posIndex+=3}}}return terminate}},group);let indexArray;let indices;if(this.displayEdges){indices=new Uint8Array([0,4,1,5,2,6,3,7,0,2,1,3,4,6,5,7,0,1,2,3,4,5,6,7])}else{indices=new Uint8Array([0,1,2,2,1,3,4,6,5,6,7,5,1,4,5,0,4,1,2,3,6,3,7,6,0,2,4,2,6,4,1,5,3,3,5,7])}if(positionArray.length>65535){indexArray=new Uint32Array(indices.length*boundsCount)}else{indexArray=new Uint16Array(indices.length*boundsCount)}const indexLength=indices.length;for(let i=0;i<boundsCount;i++){const posOffset=i*8;const indexOffset=i*indexLength;for(let j=0;j<indexLength;j++){indexArray[indexOffset+j]=posOffset+indices[j]}}geometry.setIndex(new three.BufferAttribute(indexArray,1,false));geometry.setAttribute("position",new three.BufferAttribute(positionArray,3,false));this.visible=true}}}class MeshBVHHelper extends three.Group{get color(){return this.edgeMaterial.color}get opacity(){return this.edgeMaterial.opacity}set opacity(v){this.edgeMaterial.opacity=v;this.meshMaterial.opacity=v}constructor(mesh=null,bvh=null,depth=10){if(mesh instanceof MeshBVH){depth=bvh||10;bvh=mesh;mesh=null}if(typeof bvh==="number"){depth=bvh;bvh=null}super();this.name="MeshBVHHelper";this.depth=depth;this.mesh=mesh;this.bvh=bvh;this.displayParents=false;this.displayEdges=true;this._roots=[];const edgeMaterial=new three.LineBasicMaterial({color:65416,transparent:true,opacity:0.3,depthWrite:false});const meshMaterial=new three.MeshBasicMaterial({color:65416,transparent:true,opacity:0.3,depthWrite:false});meshMaterial.color=edgeMaterial.color;this.edgeMaterial=edgeMaterial;this.meshMaterial=meshMaterial;this.update()}update(){const bvh=this.bvh||this.mesh.geometry.boundsTree;const totalRoots=bvh?bvh._roots.length:0;while(this._roots.length>totalRoots){const root=this._roots.pop();root.geometry.dispose();this.remove(root)}for(let i=0;i<totalRoots;i++){const{depth,edgeMaterial,meshMaterial,displayParents,displayEdges}=this;if(i>=this._roots.length){const root=new MeshBVHRootHelper(bvh,edgeMaterial,depth,i);this.add(root);this._roots.push(root)}const root=this._roots[i];root.bvh=bvh;root.depth=depth;root.displayParents=displayParents;root.displayEdges=displayEdges;root.material=displayEdges?edgeMaterial:meshMaterial;root.update()}}updateMatrixWorld(...args){const mesh=this.mesh;const parent=this.parent;if(mesh!==null){mesh.updateWorldMatrix(true,false);if(parent){this.matrix.copy(parent.matrixWorld).invert().multiply(mesh.matrixWorld)}else{this.matrix.copy(mesh.matrixWorld)}this.matrix.decompose(this.position,this.quaternion,this.scale)}super.updateMatrixWorld(...args)}copy(source){this.depth=source.depth;this.mesh=source.mesh;this.bvh=source.bvh;this.opacity=source.opacity;this.color.copy(source.color)}clone(){return new MeshBVHHelper(this.mesh,this.bvh,this.depth)}dispose(){this.edgeMaterial.dispose();this.meshMaterial.dispose();const children=this.children;for(let i=0,l=children.length;i<l;i++){children[i].geometry.dispose()}}}class MeshBVHVisualizer extends MeshBVHHelper{constructor(...args){super(...args);console.warn("MeshBVHVisualizer: MeshBVHVisualizer has been deprecated. Use MeshBVHHelper, instead.")}}const _box1=new three.Box3;const _box2=new three.Box3;const _vec=new three.Vector3;function getPrimitiveSize(el){switch(typeof el){case"number":return 8;case"string":return el.length*2;case"boolean":return 4;default:return 0;}}function isTypedArray(arr){const regex=/(Uint|Int|Float)(8|16|32)Array/;return regex.test(arr.constructor.name)}function getRootExtremes(bvh,group){const result={nodeCount:0,leafNodeCount:0,depth:{min:Infinity,max:-Infinity},tris:{min:Infinity,max:-Infinity},splits:[0,0,0],surfaceAreaScore:0};bvh.traverse((depth,isLeaf,boundingData,offsetOrSplit,count)=>{const l0=boundingData[0+3]-boundingData[0];const l1=boundingData[1+3]-boundingData[1];const l2=boundingData[2+3]-boundingData[2];const surfaceArea=2*(l0*l1+l1*l2+l2*l0);result.nodeCount++;if(isLeaf){result.leafNodeCount++;result.depth.min=Math.min(depth,result.depth.min);result.depth.max=Math.max(depth,result.depth.max);result.tris.min=Math.min(count,result.tris.min);result.tris.max=Math.max(count,result.tris.max);result.surfaceAreaScore+=surfaceArea*TRIANGLE_INTERSECT_COST*count}else{result.splits[offsetOrSplit]++;result.surfaceAreaScore+=surfaceArea*TRAVERSAL_COST}},group);if(result.tris.min===Infinity){result.tris.min=0;result.tris.max=0}if(result.depth.min===Infinity){result.depth.min=0;result.depth.max=0}return result}function getBVHExtremes(bvh){return bvh._roots.map((root,i)=>getRootExtremes(bvh,i))}function estimateMemoryInBytes(obj){const traversed=new Set;const stack=[obj];let bytes=0;while(stack.length){const curr=stack.pop();if(traversed.has(curr)){continue}traversed.add(curr);for(let key in curr){if(!curr.hasOwnProperty(key)){continue}bytes+=getPrimitiveSize(key);const value=curr[key];if(value&&(typeof value==="object"||typeof value==="function")){if(isTypedArray(value)){bytes+=value.byteLength}else if(isSharedArrayBufferSupported()&&value instanceof SharedArrayBuffer){bytes+=value.byteLength}else if(value instanceof ArrayBuffer){bytes+=value.byteLength}else{stack.push(value)}}else{bytes+=getPrimitiveSize(value)}}}return bytes}function validateBounds(bvh){const geometry=bvh.geometry;const depthStack=[];const index=geometry.index;const position=geometry.getAttribute("position");let passes=true;bvh.traverse((depth,isLeaf,boundingData,offset,count)=>{const info={depth,isLeaf,boundingData,offset,count};depthStack[depth]=info;arrayToBox(0,boundingData,_box1);const parent=depthStack[depth-1];if(isLeaf){for(let i=offset,l=offset+count;i<l;i++){const triIndex=bvh.resolveTriangleIndex(i);let i0=3*triIndex;let i1=3*triIndex+1;let i2=3*triIndex+2;if(index){i0=index.getX(i0);i1=index.getX(i1);i2=index.getX(i2)}let isContained;_vec.fromBufferAttribute(position,i0);isContained=_box1.containsPoint(_vec);_vec.fromBufferAttribute(position,i1);isContained=isContained&&_box1.containsPoint(_vec);_vec.fromBufferAttribute(position,i2);isContained=isContained&&_box1.containsPoint(_vec);console.assert(isContained,"Leaf bounds does not fully contain triangle.");passes=passes&&isContained}}if(parent){arrayToBox(0,boundingData,_box2);const isContained=_box2.containsBox(_box1);console.assert(isContained,"Parent bounds does not fully contain child.");passes=passes&&isContained}});return passes}function getJSONStructure(bvh){const depthStack=[];bvh.traverse((depth,isLeaf,boundingData,offset,count)=>{const info={bounds:arrayToBox(0,boundingData,new three.Box3)};if(isLeaf){info.count=count;info.offset=offset}else{info.left=null;info.right=null}depthStack[depth]=info;const parent=depthStack[depth-1];if(parent){if(parent.left===null){parent.left=info}else{parent.right=info}}});return depthStack[0]}function convertRaycastIntersect(hit,object,raycaster){if(hit===null){return null}hit.point.applyMatrix4(object.matrixWorld);hit.distance=hit.point.distanceTo(raycaster.ray.origin);hit.object=object;if(hit.distance<raycaster.near||hit.distance>raycaster.far){return null}else{return hit}}const ray=new three.Ray;const tmpInverseMatrix=new three.Matrix4;const origMeshRaycastFunc=three.Mesh.prototype.raycast;function acceleratedRaycast(raycaster,intersects){if(this.geometry.boundsTree){if(this.material===undefined)return;tmpInverseMatrix.copy(this.matrixWorld).invert();ray.copy(raycaster.ray).applyMatrix4(tmpInverseMatrix);const bvh=this.geometry.boundsTree;if(raycaster.firstHitOnly===true){const hit=convertRaycastIntersect(bvh.raycastFirst(ray,this.material),this,raycaster);if(hit){intersects.push(hit)}}else{const hits=bvh.raycast(ray,this.material);for(let i=0,l=hits.length;i<l;i++){const hit=convertRaycastIntersect(hits[i],this,raycaster);if(hit){intersects.push(hit)}}}}else{origMeshRaycastFunc.call(this,raycaster,intersects)}}function computeBoundsTree(options){this.boundsTree=new MeshBVH(this,options);return this.boundsTree}function disposeBoundsTree(){this.boundsTree=null}function countToStringFormat(count){switch(count){case 1:return"R";case 2:return"RG";case 3:return"RGBA";case 4:return"RGBA";}throw new Error}function countToFormat(count){switch(count){case 1:return three.RedFormat;case 2:return three.RGFormat;case 3:return three.RGBAFormat;case 4:return three.RGBAFormat;}}function countToIntFormat(count){switch(count){case 1:return three.RedIntegerFormat;case 2:return three.RGIntegerFormat;case 3:return three.RGBAIntegerFormat;case 4:return three.RGBAIntegerFormat;}}class VertexAttributeTexture extends three.DataTexture{constructor(){super();this.minFilter=three.NearestFilter;this.magFilter=three.NearestFilter;this.generateMipmaps=false;this.overrideItemSize=null;this._forcedType=null}updateFrom(attr){const overrideItemSize=this.overrideItemSize;const originalItemSize=attr.itemSize;const originalCount=attr.count;if(overrideItemSize!==null){if(originalItemSize*originalCount%overrideItemSize!==0){throw new Error("VertexAttributeTexture: overrideItemSize must divide evenly into buffer length.")}attr.itemSize=overrideItemSize;attr.count=originalCount*originalItemSize/overrideItemSize}const itemSize=attr.itemSize;const count=attr.count;const normalized=attr.normalized;const originalBufferCons=attr.array.constructor;const byteCount=originalBufferCons.BYTES_PER_ELEMENT;let targetType=this._forcedType;let finalStride=itemSize;if(targetType===null){switch(originalBufferCons){case Float32Array:targetType=three.FloatType;break;case Uint8Array:case Uint16Array:case Uint32Array:targetType=three.UnsignedIntType;break;case Int8Array:case Int16Array:case Int32Array:targetType=three.IntType;break;}}let type,format,normalizeValue,targetBufferCons;let internalFormat=countToStringFormat(itemSize);switch(targetType){case three.FloatType:normalizeValue=1;format=countToFormat(itemSize);if(normalized&&byteCount===1){targetBufferCons=originalBufferCons;internalFormat+="8";if(originalBufferCons===Uint8Array){type=three.UnsignedByteType}else{type=three.ByteType;internalFormat+="_SNORM"}}else{targetBufferCons=Float32Array;internalFormat+="32F";type=three.FloatType}break;case three.IntType:internalFormat+=byteCount*8+"I";normalizeValue=normalized?Math.pow(2,originalBufferCons.BYTES_PER_ELEMENT*8-1):1;format=countToIntFormat(itemSize);if(byteCount===1){targetBufferCons=Int8Array;type=three.ByteType}else if(byteCount===2){targetBufferCons=Int16Array;type=three.ShortType}else{targetBufferCons=Int32Array;type=three.IntType}break;case three.UnsignedIntType:internalFormat+=byteCount*8+"UI";normalizeValue=normalized?Math.pow(2,originalBufferCons.BYTES_PER_ELEMENT*8-1):1;format=countToIntFormat(itemSize);if(byteCount===1){targetBufferCons=Uint8Array;type=three.UnsignedByteType}else if(byteCount===2){targetBufferCons=Uint16Array;type=three.UnsignedShortType}else{targetBufferCons=Uint32Array;type=three.UnsignedIntType}break;}if(finalStride===3&&(format===three.RGBAFormat||format===three.RGBAIntegerFormat)){finalStride=4}const dimension=Math.ceil(Math.sqrt(count))||1;const length=finalStride*dimension*dimension;const dataArray=new targetBufferCons(length);const originalNormalized=attr.normalized;attr.normalized=false;for(let i=0;i<count;i++){const ii=finalStride*i;dataArray[ii]=attr.getX(i)/normalizeValue;if(itemSize>=2){dataArray[ii+1]=attr.getY(i)/normalizeValue}if(itemSize>=3){dataArray[ii+2]=attr.getZ(i)/normalizeValue;if(finalStride===4){dataArray[ii+3]=1}}if(itemSize>=4){dataArray[ii+3]=attr.getW(i)/normalizeValue}}attr.normalized=originalNormalized;this.internalFormat=internalFormat;this.format=format;this.type=type;this.image.width=dimension;this.image.height=dimension;this.image.data=dataArray;this.needsUpdate=true;this.dispose();attr.itemSize=originalItemSize;attr.count=originalCount}}class UIntVertexAttributeTexture extends VertexAttributeTexture{constructor(){super();this._forcedType=three.UnsignedIntType}}class IntVertexAttributeTexture extends VertexAttributeTexture{constructor(){super();this._forcedType=three.IntType}}class FloatVertexAttributeTexture extends VertexAttributeTexture{constructor(){super();this._forcedType=three.FloatType}}class MeshBVHUniformStruct{constructor(){this.index=new UIntVertexAttributeTexture;this.position=new FloatVertexAttributeTexture;this.bvhBounds=new three.DataTexture;this.bvhContents=new three.DataTexture;this._cachedIndexAttr=null;this.index.overrideItemSize=3}updateFrom(bvh){const{geometry}=bvh;bvhToTextures(bvh,this.bvhBounds,this.bvhContents);this.position.updateFrom(geometry.attributes.position);if(bvh.indirect){const indirectBuffer=bvh._indirectBuffer;if(this._cachedIndexAttr===null||this._cachedIndexAttr.count!==indirectBuffer.length){if(geometry.index){this._cachedIndexAttr=geometry.index.clone()}else{const array=getIndexArray(getVertexCount(geometry));this._cachedIndexAttr=new three.BufferAttribute(array,1,false)}}dereferenceIndex(geometry,indirectBuffer,this._cachedIndexAttr);this.index.updateFrom(this._cachedIndexAttr)}else{this.index.updateFrom(geometry.index)}}dispose(){const{index,position,bvhBounds,bvhContents}=this;if(index)index.dispose();if(position)position.dispose();if(bvhBounds)bvhBounds.dispose();if(bvhContents)bvhContents.dispose()}}function dereferenceIndex(geometry,indirectBuffer,target){const unpacked=target.array;const indexArray=geometry.index?geometry.index.array:null;for(let i=0,l=indirectBuffer.length;i<l;i++){const i3=3*i;const v3=3*indirectBuffer[i];for(let c=0;c<3;c++){unpacked[i3+c]=indexArray?indexArray[v3+c]:v3+c}}}function bvhToTextures(bvh,boundsTexture,contentsTexture){const roots=bvh._roots;if(roots.length!==1){throw new Error("MeshBVHUniformStruct: Multi-root BVHs not supported.")}const root=roots[0];const uint16Array=new Uint16Array(root);const uint32Array=new Uint32Array(root);const float32Array=new Float32Array(root);const nodeCount=root.byteLength/BYTES_PER_NODE;const boundsDimension=2*Math.ceil(Math.sqrt(nodeCount/2));const boundsArray=new Float32Array(4*boundsDimension*boundsDimension);const contentsDimension=Math.ceil(Math.sqrt(nodeCount));const contentsArray=new Uint32Array(2*contentsDimension*contentsDimension);for(let i=0;i<nodeCount;i++){const nodeIndex32=i*BYTES_PER_NODE/4;const nodeIndex16=nodeIndex32*2;const boundsIndex=BOUNDING_DATA_INDEX(nodeIndex32);for(let b=0;b<3;b++){boundsArray[8*i+0+b]=float32Array[boundsIndex+0+b];boundsArray[8*i+4+b]=float32Array[boundsIndex+3+b]}if(IS_LEAF(nodeIndex16,uint16Array)){const count=COUNT(nodeIndex16,uint16Array);const offset=OFFSET(nodeIndex32,uint32Array);const mergedLeafCount=4294901760|count;contentsArray[i*2+0]=mergedLeafCount;contentsArray[i*2+1]=offset}else{const rightIndex=4*RIGHT_NODE(nodeIndex32,uint32Array)/BYTES_PER_NODE;const splitAxis=SPLIT_AXIS(nodeIndex32,uint32Array);contentsArray[i*2+0]=splitAxis;contentsArray[i*2+1]=rightIndex}}boundsTexture.image.data=boundsArray;boundsTexture.image.width=boundsDimension;boundsTexture.image.height=boundsDimension;boundsTexture.format=three.RGBAFormat;boundsTexture.type=three.FloatType;boundsTexture.internalFormat="RGBA32F";boundsTexture.minFilter=three.NearestFilter;boundsTexture.magFilter=three.NearestFilter;boundsTexture.generateMipmaps=false;boundsTexture.needsUpdate=true;boundsTexture.dispose();contentsTexture.image.data=contentsArray;contentsTexture.image.width=contentsDimension;contentsTexture.image.height=contentsDimension;contentsTexture.format=three.RGIntegerFormat;contentsTexture.type=three.UnsignedIntType;contentsTexture.internalFormat="RG32UI";contentsTexture.minFilter=three.NearestFilter;contentsTexture.magFilter=three.NearestFilter;contentsTexture.generateMipmaps=false;contentsTexture.needsUpdate=true;contentsTexture.dispose()}const _positionVector=new three.Vector3;const _normalVector=new three.Vector3;const _tangentVector=new three.Vector3;const _tangentVector4=new three.Vector4;const _morphVector=new three.Vector3;const _temp=new three.Vector3;const _skinIndex=new three.Vector4;const _skinWeight=new three.Vector4;const _matrix=new three.Matrix4;const _boneMatrix=new three.Matrix4;function validateAttributes(attr1,attr2){if(!attr1&&!attr2){return}const sameCount=attr1.count===attr2.count;const sameNormalized=attr1.normalized===attr2.normalized;const sameType=attr1.array.constructor===attr2.array.constructor;const sameItemSize=attr1.itemSize===attr2.itemSize;if(!sameCount||!sameNormalized||!sameType||!sameItemSize){throw new Error}}function createAttributeClone(attr,countOverride=null){const cons=attr.array.constructor;const normalized=attr.normalized;const itemSize=attr.itemSize;const count=countOverride===null?attr.count:countOverride;return new three.BufferAttribute(new cons(itemSize*count),itemSize,normalized)}function copyAttributeContents(attr,target,targetOffset=0){if(attr.isInterleavedBufferAttribute){const itemSize=attr.itemSize;for(let i=0,l=attr.count;i<l;i++){const io=i+targetOffset;target.setX(io,attr.getX(i));if(itemSize>=2)target.setY(io,attr.getY(i));if(itemSize>=3)target.setZ(io,attr.getZ(i));if(itemSize>=4)target.setW(io,attr.getW(i))}}else{const array=target.array;const cons=array.constructor;const byteOffset=array.BYTES_PER_ELEMENT*attr.itemSize*targetOffset;const temp=new cons(array.buffer,byteOffset,attr.array.length);temp.set(attr.array)}}function addScaledMatrix(target,matrix,scale){const targetArray=target.elements;const matrixArray=matrix.elements;for(let i=0,l=matrixArray.length;i<l;i++){targetArray[i]+=matrixArray[i]*scale}}function boneNormalTransform(mesh,index,target){const skeleton=mesh.skeleton;const geometry=mesh.geometry;const bones=skeleton.bones;const boneInverses=skeleton.boneInverses;_skinIndex.fromBufferAttribute(geometry.attributes.skinIndex,index);_skinWeight.fromBufferAttribute(geometry.attributes.skinWeight,index);_matrix.elements.fill(0);for(let i=0;i<4;i++){const weight=_skinWeight.getComponent(i);if(weight!==0){const boneIndex=_skinIndex.getComponent(i);_boneMatrix.multiplyMatrices(bones[boneIndex].matrixWorld,boneInverses[boneIndex]);addScaledMatrix(_matrix,_boneMatrix,weight)}}_matrix.multiply(mesh.bindMatrix).premultiply(mesh.bindMatrixInverse);target.transformDirection(_matrix);return target}function applyMorphTarget(morphData,morphInfluences,morphTargetsRelative,i,target){_morphVector.set(0,0,0);for(let j=0,jl=morphData.length;j<jl;j++){const influence=morphInfluences[j];const morphAttribute=morphData[j];if(influence===0)continue;_temp.fromBufferAttribute(morphAttribute,i);if(morphTargetsRelative){_morphVector.addScaledVector(_temp,influence)}else{_morphVector.addScaledVector(_temp.sub(target),influence)}}target.add(_morphVector)}function mergeBufferGeometries(geometries,options={useGroups:false,updateIndex:false,skipAttributes:[]},targetGeometry=new three.BufferGeometry){const isIndexed=geometries[0].index!==null;const{useGroups=false,updateIndex=false,skipAttributes=[]}=options;const attributesUsed=new Set(Object.keys(geometries[0].attributes));const attributes={};let offset=0;targetGeometry.clearGroups();for(let i=0;i<geometries.length;++i){const geometry=geometries[i];let attributesCount=0;if(isIndexed!==(geometry.index!==null)){throw new Error("StaticGeometryGenerator: All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them.")}for(const name in geometry.attributes){if(!attributesUsed.has(name)){throw new Error("StaticGeometryGenerator: All geometries must have compatible attributes; make sure \""+name+"\" attribute exists among all geometries, or in none of them.")}if(attributes[name]===undefined){attributes[name]=[]}attributes[name].push(geometry.attributes[name]);attributesCount++}if(attributesCount!==attributesUsed.size){throw new Error("StaticGeometryGenerator: Make sure all geometries have the same number of attributes.")}if(useGroups){let count;if(isIndexed){count=geometry.index.count}else if(geometry.attributes.position!==undefined){count=geometry.attributes.position.count}else{throw new Error("StaticGeometryGenerator: The geometry must have either an index or a position attribute")}targetGeometry.addGroup(offset,count,i);offset+=count}}if(isIndexed){let forceUpdateIndex=false;if(!targetGeometry.index){let indexCount=0;for(let i=0;i<geometries.length;++i){indexCount+=geometries[i].index.count}targetGeometry.setIndex(new three.BufferAttribute(new Uint32Array(indexCount),1,false));forceUpdateIndex=true}if(updateIndex||forceUpdateIndex){const targetIndex=targetGeometry.index;let targetOffset=0;let indexOffset=0;for(let i=0;i<geometries.length;++i){const geometry=geometries[i];const index=geometry.index;if(skipAttributes[i]!==true){for(let j=0;j<index.count;++j){targetIndex.setX(targetOffset,index.getX(j)+indexOffset);targetOffset++}}indexOffset+=geometry.attributes.position.count}}}for(const name in attributes){const attrList=attributes[name];if(!(name in targetGeometry.attributes)){let count=0;for(const key in attrList){count+=attrList[key].count}targetGeometry.setAttribute(name,createAttributeClone(attributes[name][0],count))}const targetAttribute=targetGeometry.attributes[name];let offset=0;for(let i=0,l=attrList.length;i<l;i++){const attr=attrList[i];if(skipAttributes[i]!==true){copyAttributeContents(attr,targetAttribute,offset)}offset+=attr.count}}return targetGeometry}function checkTypedArrayEquality(a,b){if(a===null||b===null){return a===b}if(a.length!==b.length){return false}for(let i=0,l=a.length;i<l;i++){if(a[i]!==b[i]){return false}}return true}function invertGeometry(geometry){const{index,attributes}=geometry;if(index){for(let i=0,l=index.count;i<l;i+=3){const v0=index.getX(i);const v2=index.getX(i+2);index.setX(i,v2);index.setX(i+2,v0)}}else{for(const key in attributes){const attr=attributes[key];const itemSize=attr.itemSize;for(let i=0,l=attr.count;i<l;i+=3){for(let j=0;j<itemSize;j++){const v0=attr.getComponent(i,j);const v2=attr.getComponent(i+2,j);attr.setComponent(i,j,v2);attr.setComponent(i+2,j,v0)}}}}return geometry}class GeometryDiff{constructor(mesh){this.matrixWorld=new three.Matrix4;this.geometryHash=null;this.boneMatrices=null;this.primitiveCount=-1;this.mesh=mesh;this.update()}update(){const mesh=this.mesh;const geometry=mesh.geometry;const skeleton=mesh.skeleton;const primitiveCount=(geometry.index?geometry.index.count:geometry.attributes.position.count)/3;this.matrixWorld.copy(mesh.matrixWorld);this.geometryHash=geometry.attributes.position.version;this.primitiveCount=primitiveCount;if(skeleton){if(!skeleton.boneTexture){skeleton.computeBoneTexture()}skeleton.update();const boneMatrices=skeleton.boneMatrices;if(!this.boneMatrices||this.boneMatrices.length!==boneMatrices.length){this.boneMatrices=boneMatrices.slice()}else{this.boneMatrices.set(boneMatrices)}}else{this.boneMatrices=null}}didChange(){const mesh=this.mesh;const geometry=mesh.geometry;const primitiveCount=(geometry.index?geometry.index.count:geometry.attributes.position.count)/3;const identical=this.matrixWorld.equals(mesh.matrixWorld)&&this.geometryHash===geometry.attributes.position.version&&checkTypedArrayEquality(mesh.skeleton&&mesh.skeleton.boneMatrices||null,this.boneMatrices)&&this.primitiveCount===primitiveCount;return!identical}}class StaticGeometryGenerator{constructor(meshes){if(!Array.isArray(meshes)){meshes=[meshes]}const finalMeshes=[];meshes.forEach(object=>{object.traverseVisible(c=>{if(c.isMesh){finalMeshes.push(c)}})});this.meshes=finalMeshes;this.useGroups=true;this.applyWorldTransforms=true;this.attributes=["position","normal","color","tangent","uv","uv2"];this._intermediateGeometry=new Array(finalMeshes.length).fill().map(()=>new three.BufferGeometry);this._diffMap=new WeakMap}getMaterials(){const materials=[];this.meshes.forEach(mesh=>{if(Array.isArray(mesh.material)){materials.push(...mesh.material)}else{materials.push(mesh.material)}});return materials}generate(targetGeometry=new three.BufferGeometry){let skipAttributes=[];const{meshes,useGroups,_intermediateGeometry,_diffMap}=this;for(let i=0,l=meshes.length;i<l;i++){const mesh=meshes[i];const geom=_intermediateGeometry[i];const diff=_diffMap.get(mesh);if(!diff||diff.didChange(mesh)){this._convertToStaticGeometry(mesh,geom);skipAttributes.push(false);if(!diff){_diffMap.set(mesh,new GeometryDiff(mesh))}else{diff.update()}}else{skipAttributes.push(true)}}if(_intermediateGeometry.length===0){targetGeometry.setIndex(null);const attrs=targetGeometry.attributes;for(const key in attrs){targetGeometry.deleteAttribute(key)}for(const key in this.attributes){targetGeometry.setAttribute(this.attributes[key],new three.BufferAttribute(new Float32Array(0),4,false))}}else{mergeBufferGeometries(_intermediateGeometry,{useGroups,skipAttributes},targetGeometry)}for(const key in targetGeometry.attributes){targetGeometry.attributes[key].needsUpdate=true}return targetGeometry}_convertToStaticGeometry(mesh,targetGeometry=new three.BufferGeometry){const geometry=mesh.geometry;const applyWorldTransforms=this.applyWorldTransforms;const includeNormal=this.attributes.includes("normal");const includeTangent=this.attributes.includes("tangent");const attributes=geometry.attributes;const targetAttributes=targetGeometry.attributes;if(!targetGeometry.index&&geometry.index){targetGeometry.index=geometry.index.clone()}if(!targetAttributes.position){targetGeometry.setAttribute("position",createAttributeClone(attributes.position))}if(includeNormal&&!targetAttributes.normal&&attributes.normal){targetGeometry.setAttribute("normal",createAttributeClone(attributes.normal))}if(includeTangent&&!targetAttributes.tangent&&attributes.tangent){targetGeometry.setAttribute("tangent",createAttributeClone(attributes.tangent))}validateAttributes(geometry.index,targetGeometry.index);validateAttributes(attributes.position,targetAttributes.position);if(includeNormal){validateAttributes(attributes.normal,targetAttributes.normal)}if(includeTangent){validateAttributes(attributes.tangent,targetAttributes.tangent)}const position=attributes.position;const normal=includeNormal?attributes.normal:null;const tangent=includeTangent?attributes.tangent:null;const morphPosition=geometry.morphAttributes.position;const morphNormal=geometry.morphAttributes.normal;const morphTangent=geometry.morphAttributes.tangent;const morphTargetsRelative=geometry.morphTargetsRelative;const morphInfluences=mesh.morphTargetInfluences;const normalMatrix=new three.Matrix3;normalMatrix.getNormalMatrix(mesh.matrixWorld);if(geometry.index){targetGeometry.index.array.set(geometry.index.array)}for(let i=0,l=attributes.position.count;i<l;i++){_positionVector.fromBufferAttribute(position,i);if(normal){_normalVector.fromBufferAttribute(normal,i)}if(tangent){_tangentVector4.fromBufferAttribute(tangent,i);_tangentVector.fromBufferAttribute(tangent,i)}if(morphInfluences){if(morphPosition){applyMorphTarget(morphPosition,morphInfluences,morphTargetsRelative,i,_positionVector)}if(morphNormal){applyMorphTarget(morphNormal,morphInfluences,morphTargetsRelative,i,_normalVector)}if(morphTangent){applyMorphTarget(morphTangent,morphInfluences,morphTargetsRelative,i,_tangentVector)}}if(mesh.isSkinnedMesh){mesh.applyBoneTransform(i,_positionVector);if(normal){boneNormalTransform(mesh,i,_normalVector)}if(tangent){boneNormalTransform(mesh,i,_tangentVector)}}if(applyWorldTransforms){_positionVector.applyMatrix4(mesh.matrixWorld)}targetAttributes.position.setXYZ(i,_positionVector.x,_positionVector.y,_positionVector.z);if(normal){if(applyWorldTransforms){_normalVector.applyNormalMatrix(normalMatrix)}targetAttributes.normal.setXYZ(i,_normalVector.x,_normalVector.y,_normalVector.z)}if(tangent){if(applyWorldTransforms){_tangentVector.transformDirection(mesh.matrixWorld)}targetAttributes.tangent.setXYZW(i,_tangentVector.x,_tangentVector.y,_tangentVector.z,_tangentVector4.w)}}for(const i in this.attributes){const key=this.attributes[i];if(key==="position"||key==="tangent"||key==="normal"||!(key in attributes)){continue}if(!targetAttributes[key]){targetGeometry.setAttribute(key,createAttributeClone(attributes[key]))}validateAttributes(attributes[key],targetAttributes[key]);copyAttributeContents(attributes[key],targetAttributes[key])}if(mesh.matrixWorld.determinant()<0){invertGeometry(targetGeometry)}return targetGeometry}}const common_functions=`

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

#ifndef INFINITY
#define INFINITY 1e20
#endif

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

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

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

}

ivec4 iTexelFetch1D( isampler2D tex, uint index ) {

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

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

}

vec4 texelFetch1D( sampler2D tex, uint index ) {

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

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

}

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

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

}

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

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

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

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

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

}
`;const bvh_distance_functions=`

float dot2( vec3 v ) {

	return dot( v, v );

}

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

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

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

    vec3 nor = cross( v10, v02 );

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

	if( u < 0.0 ) {

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

	} else if( v < 0.0 ) {

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

	} else if( w < 0.0 ) {

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

	}

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

}

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

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

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

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

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

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

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

		}

	}

	return closestDistanceSquared;

}

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

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

}

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

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

}

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

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

	// point to check
	vec3 point,

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

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

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

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

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

			continue;

		}

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

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

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

		} else {

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

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

		}

	}

	return sqrt( closestDistanceSquared );

}
`;const bvh_ray_functions=`

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

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

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

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

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

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

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

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

	return t1 >= dist;

}

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

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

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

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

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

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

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

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

}

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

	// ray
	vec3 rayOrigin, vec3 rayDirection,

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

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

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

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

			found = true;
			minDistance = localDist;

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

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

		}

	}

	return found;

}

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

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

}

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

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

	// ray
	vec3 rayOrigin, vec3 rayDirection,

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

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

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

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

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

			continue;

		}

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

		if ( isLeaf ) {

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

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

		} else {

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

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

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

			ptr ++;
			stack[ ptr ] = c1;

		}

	}

	return found;

}
`;const bvh_struct_definitions=`
struct BVH {

	usampler2D index;
	sampler2D position;

	sampler2D bvhBounds;
	usampler2D bvhContents;

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

                precision mediump float;
                precision mediump int;

                varying vec3 vOutputDirection;

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

                #define ENVMAP_TYPE_CUBE_UV
                #include <cube_uv_reflection_fragment>

                vec3 getSample( float theta, vec3 axis ) {

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

                    return bilinearCubeUV( envMap, sampleDirection, mipInt );

                }

                void main() {

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

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

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

                    }

                    axis = normalize( axis );

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

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

                        if ( i >= samples ) {

                            break;

                        }

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

                    }

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

                precision mediump float;
                precision mediump int;

                varying vec3 vOutputDirection;

                uniform sampler2D envMap;

                #include <common>

                void main() {

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

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

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

                precision mediump float;
                precision mediump int;

                uniform float flipEnvMap;

                varying vec3 vOutputDirection;

                uniform samplerCube envMap;

                void main() {

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

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

            precision mediump float;
            precision mediump int;

            attribute float faceIndex;

            varying vec3 vOutputDirection;

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

                uv = 2.0 * uv - 1.0;

                vec3 direction = vec3( uv, 1.0 );

                if ( face == 0.0 ) {

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

                } else if ( face == 1.0 ) {

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

                } else if ( face == 2.0 ) {

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

                } else if ( face == 3.0 ) {

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

                } else if ( face == 4.0 ) {

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

                } else if ( face == 5.0 ) {

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

                }

                return direction;

            }

            void main() {

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

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

		#include <common>

		uniform vec2 size;

		varying vec2 vUv;
		varying vec2 vInvSize;

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

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

		#include <common>
		#include <packing>

		uniform sampler2D tDiffuse;
		uniform sampler2D tDepth;

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

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

		varying vec2 vUv;
		varying vec2 vInvSize;

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

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

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

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

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

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

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

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

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

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

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

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

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

			}

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

		varying vec2 vUv;

		void main() {

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

		}`,fragmentShader:`

		uniform float opacity;
		uniform float mixRatio;

		uniform sampler2D tDiffuse1;
		uniform sampler2D tDiffuse2;

		varying vec2 vUv;

		void main() {

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

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

		varying vec2 vUv;

		void main() {

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

		}`,fragmentShader:`

		uniform float opacity;

		uniform sampler2D tDiffuse;

		varying vec2 vUv;

		void main() {

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


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

		varying vec2 vUv;

		void main() {

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

		}`,fragmentShader:`
	precision highp float;

	uniform sampler2D tDiffuse;

	uniform vec2 resolution;

	varying vec2 vUv;

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

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

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

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

	#define NUM_SAMPLES 5

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

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

									FXAA3 QUALITY - PC

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

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

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

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

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

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

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

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

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

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

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

					relativeVContrast = matchAlongV - matchAlongH;
					relativeVContrast *= fxaaQualityinvEdgeThreshold;

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

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

					horzSpan = relativeVContrast > 0.;
			}

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

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

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

			bool doneN = false;
			bool doneP = false;

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

			vec2 posN = posM;
			vec2 posP = posM;

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

					float increment = float(i + 1);

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

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

					if(doneN || doneP) break;
			}


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

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

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

			dist = 1. - dist;

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

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

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

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

		varying vec2 vUv;

		void main() {

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

		}`,fragmentShader:`

		uniform sampler2D tDiffuse;

		varying vec2 vUv;

		

		void main() {

			vec4 tex = texture2D( tDiffuse, vUv );

			gl_FragColor = sRGBTransferOETF( tex );

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

		varying vec2 vUv;

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

		#include <common>

		varying vec2 vUv;

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

		uniform sampler2D tDepth;

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

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

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

		// RGBA depth

		#include <packing>

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

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

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

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

			return ( cameraInverseProjectionMatrix * clipPosition ).xyz;
		}

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

		float scaleDividedByCameraFar;
		float minResolutionMultipliedByCameraFar;

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

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

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

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

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

			float occlusionSum = 0.0;
			float weightSum = 0.0;

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

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

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

			if( weightSum == 0.0 ) discard;

			return occlusionSum * ( intensity / weightSum );
		}

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

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

			float ambientOcclusion = getAmbientOcclusion( viewPosition );

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

		uniform vec2 resolution;

		varying vec2 vUv;
		varying vec4 vOffset[ 3 ];

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

		void main() {

			vUv = uv;

			SMAAEdgeDetectionVS( vUv );

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

		}`,fragmentShader:`

		uniform sampler2D tDiffuse;

		varying vec2 vUv;
		varying vec4 vOffset[ 3 ];

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

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

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

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

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

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

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

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

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

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

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

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

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

			return vec4( edges, 0.0, 0.0 );
		}

		void main() {

			gl_FragColor = SMAAColorEdgeDetectionPS( vUv, vOffset, tDiffuse );

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

		uniform vec2 resolution;

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

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

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

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

		}

		void main() {

			vUv = uv;

			SMAABlendingWeightCalculationVS( vUv );

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

		}`,fragmentShader:`

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

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

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

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

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

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

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

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

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

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

			return texcoord.x;
		}

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

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

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

			return texcoord.x;
		}

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

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

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

			return texcoord.y;
		}

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

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

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

			return texcoord.y;
		}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

			return weights;
		}

		void main() {

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

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

		uniform vec2 resolution;

		varying vec2 vUv;
		varying vec4 vOffset[ 2 ];

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

		void main() {

			vUv = uv;

			SMAANeighborhoodBlendingVS( vUv );

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

		}`,fragmentShader:`

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

		varying vec2 vUv;
		varying vec4 vOffset[ 2 ];

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

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

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

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

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

				return mixed;
			}
		}

		void main() {

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

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

		varying vec2 vUv;

		void main() {

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

		}`,fragmentShader:`

		uniform float opacity;

		uniform sampler2D tDiffuse;

		varying vec2 vUv;

		#include <packing>

		void main() {

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

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

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