PageSourceSearch

https://fossilsketch.org/_next/static/chunks/8364.4c70f0a89d0a56a6.js

js fossilsketch.org collected 2026-10-09 00:42:29 UTC 432,312 bytes, 407 lines download raw bytes

vendor: 13,592 bytes, line 1
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8364],{5766:function(e,t){"use strict";t.byteLength=function(e){var t=A(e),i=t[0],s=t[1];return 3*(i+s)/4-s},t.toByteArray=function(e){var t,i,r=A(e),a=r[0],o=r[1],c=new n(function(e,t,i){return 3*(t+i)/4-i}(0,a,o)),l=0,h=o>0?a-4:a;for(i=0;i<h;i+=4)t=s[e.charCodeAt(i)]<<18|s[e.charCodeAt(i+1)]<<12|s[e.charCodeAt(i+2)]<<6|s[e.charCodeAt(i+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===o&&(t=s[e.charCodeAt(i)]<<2|s[e.charCodeAt(i+1)]>>4,c[l++]=255&t);1===o&&(t=s[e.charCodeAt(i)]<<10|s[e.charCodeAt(i+1)]<<4|s[e.charCodeAt(i+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,s=e.length,n=s%3,r=[],a=16383,o=0,A=s-n;o<A;o+=a)r.push(c(e,o,o+a>A?A:o+a));1===n?(t=e[s-1],r.push(i[t>>2]+i[t<<4&63]+"==")):2===n&&(t=(e[s-2]<<8)+e[s-1],r.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return r.join("")};for(var i=[],s=[],n="undefined"!==typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,o=r.length;a<o;++a)i[a]=r[a],s[r.charCodeAt(a)]=a;function A(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function c(e,t,s){for(var n,r,a=[],o=t;o<s;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(i[(r=n)>>18&63]+i[r>>12&63]+i[r>>6&63]+i[63&r]);return a.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},8834:function(e,t,i){"use strict";var s=i(5766),n=i(2333),r="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=A,t.h2=50;var a=2147483647;function o(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,i){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return c(e,t,i)}function c(e,t,i){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var i=0|p(e,t),s=o(i),n=s.write(e,t);n!==i&&(s=s.slice(0,n));return s}(e,t);if(ArrayBuffer.isView(e))return function(e){if(N(e,Uint8Array)){var t=new Uint8Array(e);return g(t.buffer,t.byteOffset,t.byteLength)}return u(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(N(e,ArrayBuffer)||e&&N(e.buffer,ArrayBuffer))return g(e,t,i);if("undefined"!==typeof SharedArrayBuffer&&(N(e,SharedArrayBuffer)||e&&N(e.buffer,SharedArrayBuffer)))return g(e,t,i);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var s=e.valueOf&&e.valueOf();if(null!=s&&s!==e)return A.from(s,t,i);var n=function(e){if(A.isBuffer(e)){var t=0|d(e.length),i=o(t);return 0===i.length||e.copy(i,0,0,t),i}if(void 0!==e.length)return"number"!==typeof e.length||H(e.length)?o(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}(e);if(n)return n;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return A.from(e[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return l(e),o(e<0?0:0|d(e))}function u(e){for(var t=e.length<0?0:0|d(e.length),i=o(t),s=0;s<t;s+=1)i[s]=255&e[s];return i}function g(e,t,i){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(i||0))throw new RangeError('"length" is outside of buffer bounds');var s;return s=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i),Object.setPrototypeOf(s,A.prototype),s}function d(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function p(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||N(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var i=e.length,s=arguments.length>2&&!0===arguments[2];if(!s&&0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return P(e).length;default:if(n)return s?-1:G(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,i){var s=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,i);case"utf8":case"utf-8":return Q(this,t,i);case"ascii":return S(this,t,i);case"latin1":case"binary":return M(this,t,i);case"base64":return v(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,i);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}function f(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function b(e,t,i,s,n){if(0===e.length)return-1;if("string"===typeof i?(s=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),H(i=+i)&&(i=n?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(n)return-1;i=e.length-1}else if(i<0){if(!n)return-1;i=0}if("string"===typeof t&&(t=A.from(t,s)),A.isBuffer(t))return 0===t.length?-1:I(e,t,i,s,n);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):I(e,[t],i,s,n);throw new TypeError("val must be string, number or Buffer")}function I(e,t,i,s,n){var r,a=1,o=e.length,A=t.length;if(void 0!==s&&("ucs2"===(s=String(s).toLowerCase())||"ucs-2"===s||"utf16le"===s||"utf-16le"===s)){if(e.length<2||t.length<2)return-1;a=2,o/=2,A/=2,i/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){var l=-1;for(r=i;r<o;r++)if(c(e,r)===c(t,-1===l?0:r-l)){if(-1===l&&(l=r),r-l+1===A)return l*a}else-1!==l&&(r-=r-l),l=-1}else for(i+A>o&&(i=o-A),r=i;r>=0;r--){for(var h=!0,u=0;u<A;u++)if(c(e,r+u)!==c(t,u)){h=!1;break}if(h)return r}return-1}function C(e,t,i,s){i=Number(i)||0;var n=e.length-i;s?(s=Number(s))>n&&(s=n):s=n;var r=t.length;s>r/2&&(s=r/2);for(var a=0;a<s;++a){var o=parseInt(t.substr(2*a,2),16);if(H(o))return a;e[i+a]=o}return a}function E(e,t,i,s){return O(G(t,e.length-i),e,i,s)}function y(e,t,i,s){return O(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,s)}function B(e,t,i,s){return O(P(t),e,i,s)}function w(e,t,i,s){return O(function(e,t){for(var i,s,n,r=[],a=0;a<e.length&&!((t-=2)<0);++a)s=(i=e.charCodeAt(a))>>8,n=i%256,r.push(n),r.push(s);return r}(t,e.length-i),e,i,s)}function v(e,t,i){return 0===t&&i===e.length?s.fromByteArray(e):s.fromByteArray(e.slice(t,i))}function Q(e,t,i){i=Math.min(e.length,i);for(var s=[],n=t;n<i;){var r,a,o,A,c=e[n],l=null,h=c>239?4:c>223?3:c>191?2:1;if(n+h<=i)switch(h){case 1:c<128&&(l=c);break;case 2:128===(192&(r=e[n+1]))&&(A=(31&c)<<6|63&r)>127&&(l=A);break;case 3:r=e[n+1],a=e[n+2],128===(192&r)&&128===(192&a)&&(A=(15&c)<<12|(63&r)<<6|63&a)>2047&&(A<55296||A>57343)&&(l=A);break;case 4:r=e[n+1],a=e[n+2],o=e[n+3],128===(192&r)&&128===(192&a)&&128===(192&o)&&(A=(15&c)<<18|(63&r)<<12|(63&a)<<6|63&o)>65535&&A<1114112&&(l=A)}null===l?(l=65533,h=1):l>65535&&(l-=65536,s.push(l>>>10&1023|55296),l=56320|1023&l),s.push(l),n+=h}return function(e){var t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);var i="",s=0;for(;s<t;)i+=String.fromCharCode.apply(String,e.slice(s,s+=x));return i}(s)}A.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(i){return!1}}(),A.TYPED_ARRAY_SUPPORT||"undefined"===typeof console||"function"!==typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}}),Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}}),A.poolSize=8192,A.from=function(e,t,i){return c(e,t,i)},Object.setPrototypeOf(A.prototype,Uint8Array.prototype),Object.setPrototypeOf(A,Uint8Array),A.alloc=function(e,t,i){return function(e,t,i){return l(e),e<=0?o(e):void 0!==t?"string"===typeof i?o(e).fill(t,i):o(e).fill(t):o(e)}(e,t,i)},A.allocUnsafe=function(e){return h(e)},A.allocUnsafeSlow=function(e){return h(e)},A.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==A.prototype},A.compare=function(e,t){if(N(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),N(t,Uint8Array)&&(t=A.from(t,t.offset,t.byteLength)),!A.isBuffer(e)||!A.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var i=e.length,s=t.length,n=0,r=Math.min(i,s);n<r;++n)if(e[n]!==t[n]){i=e[n],s=t[n];break}return i<s?-1:s<i?1:0},A.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},A.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return A.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var s=A.allocUnsafe(t),n=0;for(i=0;i<e.length;++i){var r=e[i];if(N(r,Uint8Array))n+r.length>s.length?A.from(r).copy(s,n):Uint8Array.prototype.set.call(s,r,n);else{if(!A.isBuffer(r))throw new TypeError('"list" argument must be an Array of Buffers');r.copy(s,n)}n+=r.length}return s},A.byteLength=p,A.prototype._isBuffer=!0,A.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)f(this,t,t+1);return this},A.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)f(this,t,t+3),f(this,t+1,t+2);return this},A.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},A.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?Q(this,0,e):m.apply(this,arguments)},A.prototype.toLocaleString=A.prototype.toString,A.prototype.equals=function(e){if(!A.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===A.compare(this,e)},A.prototype.inspect=function(){var e="",i=t.h2;return e=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(e+=" ... "),"<Buffer "+e+">"},r&&(A.prototype[r]=A.prototype.inspect),A.prototype.compare=function(e,t,i,s,n){if(N(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===s&&(s=0),void 0===n&&(n=this.length),t<0||i>e.length||s<0||n>this.length)throw new RangeError("out of range index");if(s>=n&&t>=i)return 0;if(s>=n)return-1;if(t>=i)return 1;if(this===e)return 0;for(var r=(n>>>=0)-(s>>>=0),a=(i>>>=0)-(t>>>=0),o=Math.min(r,a),c=this.slice(s,n),l=e.slice(t,i),h=0;h<o;++h)if(c[h]!==l[h]){r=c[h],a=l[h];break}return r<a?-1:a<r?1:0},A.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},A.prototype.indexOf=function(e,t,i){return b(this,e,t,i,!0)},A.prototype.lastIndexOf=function(e,t,i){return b(this,e,t,i,!1)},A.prototype.write=function(e,t,i,s){if(void 0===t)s="utf8",i=this.length,t=0;else if(void 0===i&&"string"===typeof t)s=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(i)?(i>>>=0,void 0===s&&(s="utf8")):(s=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");s||(s="utf8");for(var r=!1;;)switch(s){case"hex":return C(this,e,t,i);case"utf8":case"utf-8":return E(this,e,t,i);case"ascii":case"latin1":case"binary":return y(this,e,t,i);case"base64":return B(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,i);default:if(r)throw new TypeError("Unknown encoding: "+s);s=(""+s).toLowerCase(),r=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function S(e,t,i){var s="";i=Math.min(e.length,i);for(var n=t;n<i;++n)s+=String.fromCharCode(127&e[n]);return s}function M(e,t,i){var s="";i=Math.min(e.length,i);for(var n=t;n<i;++n)s+=String.fromCharCode(e[n]);return s}function R(e,t,i){var s=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>s)&&(i=s);for(var n="",r=t;r<i;++r)n+=q[e[r]];return n}function T(e,t,i){for(var s=e.slice(t,i),n="",r=0;r<s.length-1;
vendor: 4,608 bytes, line 1
1r+=2)n+=String.fromCharCode(s[r]+256*s[r+1]);return n}function D(e,t,i){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,i,s,n,r){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<r)throw new RangeError('"value" argument is out of bounds');if(i+s>e.length)throw new RangeError("Index out of range")}function F(e,t,i,s,n,r){if(i+s>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function L(e,t,i,s,r){return t=+t,i>>>=0,r||F(e,0,i,4),n.write(e,t,i,s,23,4),i+4}function U(e,t,i,s,r){return t=+t,i>>>=0,r||F(e,0,i,8),n.write(e,t,i,s,52,8),i+8}A.prototype.slice=function(e,t){var i=this.length;(e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e);var s=this.subarray(e,t);return Object.setPrototypeOf(s,A.prototype),s},A.prototype.readUintLE=A.prototype.readUIntLE=function(e,t,i){e>>>=0,t>>>=0,i||D(e,t,this.length);for(var s=this[e],n=1,r=0;++r<t&&(n*=256);)s+=this[e+r]*n;return s},A.prototype.readUintBE=A.prototype.readUIntBE=function(e,t,i){e>>>=0,t>>>=0,i||D(e,t,this.length);for(var s=this[e+--t],n=1;t>0&&(n*=256);)s+=this[e+--t]*n;return s},A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},A.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||D(e,t,this.length);for(var s=this[e],n=1,r=0;++r<t&&(n*=256);)s+=this[e+r]*n;return s>=(n*=128)&&(s-=Math.pow(2,8*t)),s},A.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||D(e,t,this.length);for(var s=t,n=1,r=this[e+--s];s>0&&(n*=256);)r+=this[e+--s]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*t)),r},A.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},A.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},A.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},A.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},A.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},A.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),n.read(this,e,!0,23,4)},A.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),n.read(this,e,!1,23,4)},A.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),n.read(this,e,!0,52,8)},A.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),n.read(this,e,!1,52,8)},A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,i,s){(e=+e,t>>>=0,i>>>=0,s)||k(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,r=0;for(this[t]=255&e;++r<i&&(n*=256);)this[t+r]=e/n&255;return t+i},A.prototype.writeUintBE=A.prototype.writeUIntBE=function(e,t,i,s){(e=+e,t>>>=0,i>>>=0,s)||k(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,r=1;for(this[t+n]=255&e;--n>=0&&(r*=256);)this[t+n]=e/r&255;return t+i},A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||k(this,e,t,1,255,0),this[t]=255&e,t+1},A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||k(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||k(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||k(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||k(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},A.prototype.writeIntLE=function(e,t,i,s){if(e=+e,t>>>=0,!s){var n=Math.pow(2,8*i-1);k(this,e,t,i,n-1,-n)}
1var r=0,a=1,o=0;for(this[t]=255&e;++r<i&&(a*=256);)e<0&&0===o&&0!==this[t+r-1]&&(o=1),this[t+r]=(e/a>>0)-o&255;return t+i},A.prototype.writeIntBE=function(e,t,i,s){if(e=+e,t>>>=0,!s){var n=Math.pow(2,8*i-1);k(this,e,t,i,n-1,-n)}var r=i-1,a=1,o=0;for(this[t+r]=255&e;--r>=0&&(a*=256);)e<0&&0===o&&0!==this[t+r+1]&&(o=1),this[t+r]=(e/a>>0)-o&255;return t+i},A.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||k(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},A.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||k(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},A.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||k(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},A.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||k(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},A.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},A.prototype.writeFloatLE=function(e,t,i){return L(this,e,t,!0,i)},A.prototype.writeFloatBE=function(e,t,i){return L(this,e,t,!1,i)},A.prototype.writeDoubleLE=function(e,t,i){return U(this,e,t,!0,i)},A.prototype.writeDoubleBE=function(e,t,i){return U(this,e,t,!1,i)},A.prototype.copy=function(e,t,i,s){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),s||0===s||(s=this.length),t>=e.length&&(t=e.length),t||(t=0),s>0&&s<i&&(s=i),s===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),e.length-t<s-i&&(s=e.length-t+i);var n=s-i;return this===e&&"function"===typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,i,s):Uint8Array.prototype.set.call(e,this.subarray(i,s),t),n},A.prototype.fill=function(e,t,i,s){if("string"===typeof e){if("string"===typeof t?(s=t,t=0,i=this.length):"string"===typeof i&&(s=i,i=this.length),void 0!==s&&"string"!==typeof s)throw new TypeError("encoding must be a string");if("string"===typeof s&&!A.isEncoding(s))throw new TypeError("Unknown encoding: "+s);if(1===e.length){var n=e.charCodeAt(0);("utf8"===s&&n<128||"latin1"===s)&&(e=n)}}else"number"===typeof e?e&=255:"boolean"===typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var r;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"===typeof e)for(r=t;r<i;++r)this[r]=e;else{var a=A.isBuffer(e)?e:A.from(e,s),o=a.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(r=0;r<i-t;++r)this[r+t]=a[r%o]}return this};var _=/[^+/0-9A-Za-z-_]/g;function G(e,t){var i;t=t||1/0;for(var s=e.length,n=null,r=[],a=0;a<s;++a){if((i=e.charCodeAt(a))>
155295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(a+1===s){(t-=3)>-1&&r.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&r.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&r.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;r.push(i)}else if(i<2048){if((t-=2)<0)break;r.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;r.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return r}function P(e){return s.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(_,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function O(e,t,i,s){for(var n=0;n<s&&!(n+i>=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function N(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function H(e){return e!==e}var q=function(){for(var e="0123456789abcdef",t=new Array(256),i=0;i<16;++i)for(var s=16*i,n=0;n<16;++n)t[s+n]=e[i]+e[n];return t}()},2333:function(e,t){t.read=function(e,t,i,s,n){var r,a,o=8*n-s-1,A=(1<<o)-1,c=A>>1,l=-7,h=i?n-1:0,u=i?-1:1,g=e[t+h];for(h+=u,r=g&(1<<-l)-1,g>>=-l,l+=o;l>0;r=256*r+e[t+h],h+=u,l-=8);for(a=r&(1<<-l)-1,r>>=-l,l+=s;l>0;a=256*a+e[t+h],h+=u,l-=8);if(0===r)r=1-c;else{if(r===A)return a?NaN:1/0*(g?-1:1);a+=Math.pow(2,s),r-=c}return(g?-1:1)*a*Math.pow(2,r-s)},t.write=function(e,t,i,s,n,r){var a,o,A,c=8*r-n-1,l=(1<<c)-1,h=l>>1,u=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,g=s?0:r-1,d=s?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(A=Math.pow(2,-a))<1&&(a--,A*=2),(t+=a+h>=1?u/A:u*Math.pow(2,1-h))*A>=2&&(a++,A/=2),a+h>=l?(o=0,a=l):a+h>=1?(o=(t*A-1)*Math.pow(2,n),a+=h):(o=t*Math.pow(2,h-1)*Math.pow(2,n),a=0));n>=8;e[i+g]=255&o,g+=d,o/=256,n-=8);for(a=a<<n|o,c+=n;c>0;e[i+g]=255&a,g+=d,a/=256,c-=8);e[i+g-d]|=128*p}},8364:function(e,t,i){"use strict";const s=globalThis,n=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),a=new WeakMap;class o{constructor(e,t,i){if(this._$cssResult$=!0,i!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(n&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=a.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&a.set(t,e))}return e}toString(){return this.cssText}}const A=n?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new o("string"==typeof e?e:e+"",void 0,r))(t)})(e):e,{is:c,defineProperty:l,getOwnPropertyDescriptor:h,getOwnPropertyNames:u,getOwnPropertySymbols:g,getPrototypeOf:d}=Object,p=globalThis,m=p.trustedTypes,f=m?m.emptyScript:"",b=p.reactiveElementPolyfillSupport,I=(e,t)=>e,C={toAttribute(e,t){switch(t){case Boolean:e=e?f:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},E=(e,t)=>!c(e,t),y={attribute:!0,type:String,converter:C,reflect:!1,useDefault:!1,hasChanged:E};Symbol.metadata??=Symbol("metadata"),p.litPropertyMetadata??=new WeakMap;class B extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=y){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,t);void 0!==s&&l(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:n}=h(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:s,set(t){const r=s?.call(this);n?.call(this,t),this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??y}static _$Ei(){if(this.hasOwnProperty(I("elementProperties")))return;const e=d(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(I("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(I("properties"))){const e=this.properties,t=[...u(e),...g(e)];for(const i of t)this.createProperty(i,e[i])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,i]of t)this.elementProperties.set(e,i)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const e=this._$Eu(t,i);void 0!==e&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(A(e))}else void 0!==e&&t.push(A(e));return t}static _$Eu(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}
vendor: 4,796 bytes, line 1
1removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(n)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const i of t){const t=document.createElement("style"),n=s.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=i.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(void 0!==s&&!0===i.reflect){const n=(void 0!==i.converter?.toAttribute?i.converter:C).toAttribute(t,i.type);this._$Em=e,null==n?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){const i=this.constructor,s=i._$Eh.get(e);if(void 0!==s&&this._$Em!==s){const e=i.getPropertyOptions(s),n="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:C;this._$Em=s;const r=n.fromAttribute(t,e.type);this[s]=r??this._$Ej?.get(s)??r,this._$Em=null}}requestUpdate(e,t,i,s=!1,n){if(void 0!==e){const r=this.constructor;if(!1===s&&(n=this[e]),i??=r.getPropertyOptions(e),!((i.hasChanged??E)(n,t)||i.useDefault&&i.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:s,wrapped:n},r){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,r??t??this[e]),!0!==n||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===s&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,i]of e){const{wrapped:e}=i,s=this[t];!0!==e||this._$AL.has(t)||void 0===s||this.C(t,void 0,i,s)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}}B.elementStyles=[],B.shadowRootOptions={mode:"open"},B[I("elementProperties")]=new Map,B[I("finalized")]=new Map,b?.({ReactiveElement:B}),(p.reactiveElementVersions??=[]).push("2.1.2");const w={attribute:!0,type:String,converter:C,reflect:!1,hasChanged:E},v=(e=w,t,i)=>{const{kind:s,metadata:n}=i;let r=globalThis.litPropertyMetadata.get(n);if(void 0===r&&globalThis.litPropertyMetadata.set(n,r=new Map),"setter"===s&&((e=Object.create(e)).wrapped=!0),r.set(i.name,e),"accessor"===s){const{name:s}=i;return{set(i){const n=t.get.call(this);t.set.call(this,i),this.requestUpdate(s,n,e,!0,i)},init(t){return void 0!==t&&this.C(s,void 0,e,t),t}}}if("setter"===s){const{name:s}=i;return function(i){const n=this[s];t.call(this,i),this.requestUpdate(s,n,e,!0,i)}}throw Error("Unsupported decorator location: "+s)};function Q(e){return(t,i)=>"object"==typeof i?v(e,t,i):((e,t,i)=>{const s=t.hasOwnProperty(i);return t.constructor.createProperty(i,e),s?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}var x=i(2175);const S=globalThis,M=S.trustedTypes,R=M?M.createPolicy("lit-html",{createHTML:e=>e}):void 0,T="$lit$",D=`lit$${Math.random().toFixed(9).slice(2)}$`,k="?"+D,F=`<${k}>`,L=document,U=()=>L.createComment(""),_=e=>null===e||"object"!=typeof e&&"function"!=typeof e,G=Array.isArray,P=e=>G(e)||"function"==typeof e?.[Symbol.iterator],O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,H=/>/g,q=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),j=/'/g,z=/"/g,K=/^(?:script|style|textarea|title)$/i,V=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}
vendor: 4,947 bytes, line 1
1),J=V(1),Y=(V(2),V(3),Symbol.for("lit-noChange")),W=Symbol.for("lit-nothing"),$=new WeakMap,X=L.createTreeWalker(L,129);function Z(e,t){if(!G(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==R?R.createHTML(t):t}const ee=(e,t)=>{const i=e.length-1,s=[];let n,r=2===t?"<svg>":3===t?"<math>":"",a=O;for(let o=0;o<i;o++){const t=e[o];let i,A,c=-1,l=0;for(;l<t.length&&(a.lastIndex=l,A=a.exec(t),null!==A);)l=a.lastIndex,a===O?"!--"===A[1]?a=N:void 0!==A[1]?a=H:void 0!==A[2]?(K.test(A[2])&&(n=RegExp("</"+A[2],"g")),a=q):void 0!==A[3]&&(a=q):a===q?">"===A[0]?(a=n??O,c=-1):void 0===A[1]?c=-2:(c=a.lastIndex-A[2].length,i=A[1],a=void 0===A[3]?q:'"'===A[3]?z:j):a===z||a===j?a=q:a===N||a===H?a=O:(a=q,n=void 0);const h=a===q&&e[o+1].startsWith("/>")?" ":"";r+=a===O?t+F:c>=0?(s.push(i),t.slice(0,c)+T+t.slice(c)+D+h):t+D+(-2===c?o:h)}return[Z(e,r+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),s]};class te{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let n=0,r=0;const a=e.length-1,o=this.parts,[A,c]=ee(e,t);if(this.el=te.createElement(A,i),X.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(s=X.nextNode())&&o.length<a;){if(1===s.nodeType){if(s.hasAttributes())for(const e of s.getAttributeNames())if(e.endsWith(T)){const t=c[r++],i=s.getAttribute(e).split(D),a=/([.?@])?(.*)/.exec(t);o.push({type:1,index:n,name:a[2],strings:i,ctor:"."===a[1]?ae:"?"===a[1]?oe:"@"===a[1]?Ae:re}),s.removeAttribute(e)}else e.startsWith(D)&&(o.push({type:6,index:n}),s.removeAttribute(e));if(K.test(s.tagName)){const e=s.textContent.split(D),t=e.length-1;if(t>0){s.textContent=M?M.emptyScript:"";for(let i=0;i<t;i++)s.append(e[i],U()),X.nextNode(),o.push({type:2,index:++n});s.append(e[t],U())}}}else if(8===s.nodeType)if(s.data===k)o.push({type:2,index:n});else{let e=-1;for(;-1!==(e=s.data.indexOf(D,e+1));)o.push({type:7,index:n}),e+=D.length-1}n++}}static createElement(e,t){const i=L.createElement("template");return i.innerHTML=e,i}}function ie(e,t,i=e,s){if(t===Y)return t;let n=void 0!==s?i._$Co?.[s]:i._$Cl;const r=_(t)?void 0:t._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),void 0===r?n=void 0:(n=new r(e),n._$AT(e,i,s)),void 0!==s?(i._$Co??=[])[s]=n:i._$Cl=n),void 0!==n&&(t=ie(e,n._$AS(e,t.values),n,s)),t}class se{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:i}=this._$AD,s=(e?.creationScope??L).importNode(t,!0);X.currentNode=s;let n=X.nextNode(),r=0,a=0,o=i[0];for(;void 0!==o;){if(r===o.index){let t;2===o.type?t=new ne(n,n.nextSibling,this,e):1===o.type?t=new o.ctor(n,o.name,o.strings,this,e):6===o.type&&(t=new ce(n,this,e)),this._$AV.push(t),o=i[++a]}r!==o?.index&&(n=X.nextNode(),r++)}return X.currentNode=L,s}p(e){let t=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class ne{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,s){this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=ie(this,e,t),_(e)?e===W||null==e||""===e?(this._$AH!==W&&this._$AR(),this._$AH=W):e!==this._$AH&&e!==Y&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):P(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==W&&_(this._$AH)?this._$AA.nextSibling.data=e:this.T(L.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:i}=e,s="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=te.createElement(Z(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(t);else{const e=new se(s,this),i=e.u(this.options);e.p(t),this.T(i),this._$AH=e}}_$AC(e){let t=$.get(e.strings);return void 0===t&&$.set(e.strings,t=new te(e)),t}k(e){G(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,s=0;for(const n of e)s===t.length?t.push(i=new ne(this.O(U()),this.O(U()),this,this.options)):i=t[s],i._$AI(n),s++;s<t.length&&(this._$AR(i&&i._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class re{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,s,n){this.type=1,this._$AH=W,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=W}_$AI(e,t=this,i,s){const n=this.strings;let r=!1;
1if(void 0===n)e=ie(this,e,t,0),r=!_(e)||e!==this._$AH&&e!==Y,r&&(this._$AH=e);else{const s=e;let a,o;for(e=n[0],a=0;a<n.length-1;a++)o=ie(this,s[i+a],t,a),o===Y&&(o=this._$AH[a]),r||=!_(o)||o!==this._$AH[a],o===W?e=W:e!==W&&(e+=(o??"")+n[a+1]),this._$AH[a]=o}r&&!s&&this.j(e)}j(e){e===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ae extends re{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===W?void 0:e}}class oe extends re{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==W)}}class Ae extends re{constructor(e,t,i,s,n){super(e,t,i,s,n),this.type=5}_$AI(e,t=this){if((e=ie(this,e,t,0)??W)===Y)return;const i=this._$AH,s=e===W&&i!==W||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,n=e!==W&&(i===W||s);s&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class ce{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){ie(this,e)}}(0,S.litHtmlPolyfillSupport)?.(te,ne),(S.litHtmlVersions??=[]).push("3.3.2");const le=(e,t,i)=>{const s=i?.renderBefore??t;let n=s._$litPart$;if(void 0===n){const e=i?.renderBefore??null;s._$litPart$=n=new ne(t.insertBefore(U(),e),e,void 0,i??{})}return n._$AI(e),n},he=globalThis;class ue extends B{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=le(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Y}}ue._$litElement$=!0,ue.finalized=!0,he.litElementHydrateSupport?.({LitElement:ue});(0,he.litElementPolyfillSupport)?.({LitElement:ue});(he.litElementVersions??=[]).push("4.2.2");const ge=null!=navigator.xr&&null!=self.XRSession&&null!=navigator.xr.isSessionSupported,de=ge&&null!=self.XRSession.prototype.requestHitTestSource,pe=null!=self.ResizeObserver,me=null!=self.IntersectionObserver,fe=de,be=((()=>{const e=navigator.userAgent||navigator.vendor||self.opera;let t=!1;(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
1sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0)})(),/\bCrOS\b/.test(navigator.userAgent),/android/i.test(navigator.userAgent)),Ie=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,Ce=(/Safari\//.test(navigator.userAgent),/firefox/i.test(navigator.userAgent)),Ee=/OculusBrowser/.test(navigator.userAgent),ye=(Ie&&/CriOS\//.test(navigator.userAgent),be&&!Ce&&!Ee),Be=Boolean(window.webkit&&window.webkit.messageHandlers),we=(()=>{if(Ie){if(Be)return Boolean(/CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\//.test(navigator.userAgent));{const e=document.createElement("a");return Boolean(e.relList&&e.relList.supports&&e.relList.supports("ar"))}}return!1})(),ve=e=>e&&"null"!==e?xe(e):null,Qe=()=>{if(fe)return;const e=[];throw ge||e.push("WebXR Device API"),de||e.push("WebXR Hit Test API"),new Error(`The following APIs are required for AR, but are missing in this browser: ${e.join(", ")}`)},xe=e=>new URL(e,window.location.toString()).toString(),Se=(e,t)=>{let i=null;return(...s)=>{null!=i&&self.clearTimeout(i),i=self.setTimeout((()=>{i=null,e(...s)}),t)}},Me=(e,t,i)=>Math.max(t,Math.min(i,e)),Re=(()=>{const e=new RegExp("[?&]model-viewer-debug-mode(&|$)");return()=>self.ModelViewerElement&&self.ModelViewerElement.debugMode||self.location&&self.location.search&&self.location.search.match(e)})();var Te=function(e,t,i,s){var n,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};const De=Symbol("currentEnvironmentMap"),ke=Symbol("currentBackground"),Fe=Symbol("updateEnvironment"),Le=Symbol("cancelEnvironmentUpdate");const U
vendor: 14,101 bytes, lines 1-407
1e=J`
2<style>
3:host {
4  display: block;
5  position: relative;
6  contain: strict;
7  width: 300px;
8  height: 150px;
9}
10
11.container {
12  position: relative;
13  overflow: hidden;
14}
15
16.userInput {
17  width: 100%;
18  height: 100%;
19  display: none;
20  position: relative;
21  outline-offset: -1px;
22  outline-width: 1px;
23}
24
25canvas {
26  position: absolute;
27  display: none;
28  pointer-events: none;
29  /* NOTE(cdata): Chrome 76 and below apparently have a bug
30   * that causes our canvas not to display pixels unless it is
31   * on its own render layer
32   * @see https://github.com/google/model-viewer/pull/755#issuecomment-536597893
33   */
34  transform: translateZ(0);
35}
36
37.show {
38  display: block;
39}
40
41/* Adapted from HTML5 Boilerplate
42 *
43 * @see https://github.com/h5bp/html5-boilerplate/blob/ceb4620c78fc82e13534fc44202a3f168754873f/dist/css/main.css#L122-L133 */
44.screen-reader-only {
45  border: 0;
46  left: 0;
47  top: 0;
48  clip: rect(0, 0, 0, 0);
49  height: 1px;
50  margin: -1px;
51  overflow: hidden;
52  padding: 0;
53  position: absolute;
54  white-space: nowrap;
55  width: 1px;
56  pointer-events: none;
57}
58
59.slot {
60  position: absolute;
61  pointer-events: none;
62  top: 0;
63  left: 0;
64  width: 100%;
65  height: 100%;
66}
67
68.slot > * {
69  pointer-events: initial;
70}
71
72.annotation-wrapper ::slotted(*) {
73  opacity: var(--max-hotspot-opacity, 1);
74  transition: opacity 0.3s;
75}
76
77.pointer-tumbling .annotation-wrapper ::slotted(*) {
78  pointer-events: none;
79}
80
81.annotation-wrapper ::slotted(*) {
82  pointer-events: initial;
83}
84
85.annotation-wrapper.hide ::slotted(*) {
86  opacity: var(--min-hotspot-opacity, 0.25);
87}
88
89.slot.poster {
90  display: none;
91  background-color: inherit;
92}
93
94.slot.poster.show {
95  display: inherit;
96}
97
98.slot.poster > * {
99  pointer-events: initial;
100}
101
102.slot.poster:not(.show) > * {
103  pointer-events: none;
104}
105
106#default-poster {
107  width: 100%;
108  height: 100%;
109  /* The default poster is a <button> so we need to set display
110   * to prevent it from being affected by text-align: */
111  display: block;
112  position: absolute;
113  border: none;
114  padding: 0;
115  background-size: contain;
116  background-repeat: no-repeat;
117  background-position: center;
118  background-color: #fff0;
119}
120
121#default-progress-bar {
122  display: block;
123  position: relative;
124  width: 100%;
125  height: 100%;
126  pointer-events: none;
127  overflow: hidden;
128}
129
130#default-progress-bar > .bar {
131  position: absolute;
132  top: 0;
133  left: 0;
134  width: 100%;
135  height: var(--progress-bar-height, 5px);
136  background-color: var(--progress-bar-color, rgba(0, 0, 0, 0.4));
137  transition: transform 0.09s;
138  transform-origin: top left;
139  transform: scaleX(0);
140  overflow: hidden;
141}
142
143#default-progress-bar > .bar.hide {
144  transition: opacity 0.3s 1s;
145  opacity: 0;
146}
147
148.centered {
149  align-items: center;
150  justify-content: center;
151}
152
153.cover {
154  position: absolute;
155  top: 0;
156  left: 0;
157  width: 100%;
158  height: 100%;
159  pointer-events: none;
160}
161
162.slot.interaction-prompt {
163  display: var(--interaction-prompt-display, flex);
164  overflow: hidden;
165  opacity: 0;
166  will-change: opacity;
167  transition: opacity 0.3s;
168}
169
170.slot.interaction-prompt.visible {
171  opacity: 1;
172}
173
174.animated-container {
175  will-change: transform, opacity;
176  opacity: 0;
177  transition: opacity 0.3s;
178}
179
180.slot.interaction-prompt > * {
181  pointer-events: none;
182}
183
184.slot.ar-button {
185  -moz-user-select: none;
186  -webkit-tap-highlight-color: transparent;
187  user-select: none;
188
189  display: var(--ar-button-display, block);
190}
191
192.slot.ar-button:not(.enabled) {
193  display: none;
194}
195
196.fab {
197  display: flex;
198  align-items: center;
199  justify-content: center;
200  box-sizing: border-box;
201  width: 40px;
202  height: 40px;
203  cursor: pointer;
204  background-color: #fff;
205  box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.15);
206  border-radius: 100px;
207}
208
209.fab > * {
210  opacity: 0.87;
211}
212
213#default-ar-button {
214  position: absolute;
215  bottom: 16px;
216  right: 16px;
217  transform: scale(var(--ar-button-scale, 1));
218  transform-origin: bottom right;
219}
220
221.slot.pan-target {
222  display: block;
223  position: absolute;
224  width: 0;
225  height: 0;
226  left: 50%;
227  top: 50%;
228  transform: translate3d(-50%, -50%, 0);
229  background-color: transparent;
230  opacity: 0;
231  transition: opacity 0.3s;
232}
233
234#default-pan-target {
235  width: 6px;
236  height: 6px;
237  border-radius: 6px;
238  border: 1px solid white;
239  box-shadow: 0px 0px 2px 1px rgba(0, 0, 0, 0.8);
240}
241
242.slot.default {
243  pointer-events: none;
244}
245
246.slot.progress-bar {
247  pointer-events: none;
248}
249
250.slot.exit-webxr-ar-button {
251  pointer-events: none;
252}
253
254.slot.exit-webxr-ar-button:not(.enabled) {
255  display: none;
256}
257
258#default-exit-webxr-ar-button {
259  display: flex;
260  align-items: center;
261  justify-content: center;
262  position: absolute;
263  top: env(safe-area-inset-top, 16px);
264  right: 16px;
265  width: 40px;
266  height: 40px;
267  box-sizing: border-box;
268}
269
270#default-exit-webxr-ar-button > svg {
271  fill: #fff;
272}
273</style>
274<div class="container">
275  <div class="userInput" tabindex="0" role="img"
276      aria-label="3D model">
277      <div class="slot canvas">
278        <slot name="canvas">
279          <canvas></canvas>
280        </slot>
281      </div>
282
283  </div>
284
285  <!-- NOTE(cdata): We need to wrap slots because browsers without ShadowDOM
286        will have their <slot> elements removed by ShadyCSS -->
287  <div class="slot poster">
288    <slot name="poster">
289      <button type="button" id="default-poster" aria-hidden="true" aria-label="Loading 3D model"></button>
290    </slot>
291  </div>
292
293  <div class="slot ar-button">
294    <slot name="ar-button">
295      <a id="default-ar-button" part="default-ar-button" class="fab"
296          tabindex="2"
297          role="button"
298          href="javascript:void(0);"
299          aria-label="View in your space">
300        ${J`
301<svg version="1.1" id="view_x5F_in_x5F_AR_x5F_icon"
302	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px" height="24px"
303	 viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
304<rect id="Bounding_Box" x="0" y="0" fill="none" width="24" height="24"/>
305<g id="Art_layer">
306	<path d="M3,4c0-0.55,0.45-1,1-1h2V1H4C2.35,1,1,2.35,1,4v2h2V4z"/>
307	<path d="M20,3c0.55,0,1,0.45,1,1v2h2V4c0-1.65-1.35-3-3-3h-2v2H20z"/>
308	<path d="M4,21c-0.55,0-1-0.45-1-1v-2H1v2c0,1.65,1.35,3,3,3h2v-2H4z"/>
309	<path d="M20,21c0.55,0,1-0.45,1-1v-2h2v2c0,1.65-1.35,3-3,3h-2v-2H20z"/>
310	<g>
311		<path d="M18.25,7.6l-5.5-3.18c-0.46-0.27-1.04-0.27-1.5,0L5.75,7.6C5.29,7.87,5,8.36,5,8.9v6.35c0,0.54,0.29,1.03,0.75,1.3
312			l5.5,3.18c0.46,0.27,1.04,0.27,1.5,0l5.5-3.18c0.46-0.27,0.75-0.76,0.75-1.3V8.9C19,8.36,18.71,7.87,18.25,7.6z M7,14.96v-4.62
313			l4,2.32v4.61L7,14.96z M12,10.93L8,8.61l4-2.31l4,2.31L12,10.93z M13,17.27v-4.61l4-2.32v4.62L13,17.27z"/>
314	</g>
315</g>
316</svg>`}
317      </a>
318    </slot>
319  </div>
320
321  <div class="slot pan-target">
322    <slot name="pan-target">
323      <div id="default-pan-target">
324      </div>
325    </slot>
326  </div>
327
328  <div class="slot interaction-prompt cover centered">
329    <div id="prompt" class="animated-container">
330      <slot name="interaction-prompt" aria-hidden="true">
331        ${J`
332<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="25" height="36">
333    <defs>
334        <path id="A" d="M.001.232h24.997V36H.001z" />
335    </defs>
336    <g transform="translate(-11 -4)" fill="none" fill-rule="evenodd">
337        <path fill-opacity="0" fill="#fff" d="M0 0h44v44H0z" />
338        <g transform="translate(11 3)">
339            <path d="M8.733 11.165c.04-1.108.766-2.027 1.743-2.307a2.54 2.54 0 0 1 .628-.089c.16 0 .314.017.463.044 1.088.2 1.9 1.092 1.9 2.16v8.88h1.26c2.943-1.39 5-4.45 5-8.025a9.01 9.01 0 0 0-1.9-5.56l-.43-.5c-.765-.838-1.683-1.522-2.712-2-1.057-.49-2.226-.77-3.46-.77s-2.4.278-3.46.77c-1.03.478-1.947 1.162-2.71 2l-.43.5a9.01 9.01 0 0 0-1.9 5.56 9.04 9.04 0 0 0 .094 1.305c.03.21.088.41.13.617l.136.624c.083.286.196.56.305.832l.124.333a8.78 8.78 0 0 0 .509.953l.065.122a8.69 8.69 0 0 0 3.521 3.191l1.11.537v-9.178z" fill-opacity=".5" fill="#e4e4e4" />
340            <path d="M22.94 26.218l-2.76 7.74c-.172.485-.676.8-1.253.8H12.24c-1.606 0-3.092-.68-3.98-1.82-1.592-2.048-3.647-3.822-6.11-5.27-.095-.055-.15-.137-.152-.23-.004-.1.046-.196.193-.297.56-.393 1.234-.6 1.926-.6a3.43 3.43 0 0 1 .691.069l4.922.994V10.972c0-.663.615-1.203 1.37-1.203s1.373.54 1.373 1.203v9.882h2.953c.273 0 .533.073.757.21l6.257 3.874c.027.017.045.042.07.06.41.296.586.77.426 1.22M4.1 16.614c-.024-.04-.042-.083-.065-.122a8.69 8.69 0 0 1-.509-.953c-.048-.107-.08-.223-.124-.333l-.305-.832c-.058-.202-.09-.416-.136-.624l-.13-.617a9.03 9.03 0 0 1-.094-1.305c0-2.107.714-4.04 1.9-5.56l.43-.5c.764-.84 1.682-1.523 2.71-2 1.058-.49 2.226-.77 3.46-.77s2.402.28 3.46.77c1.03.477 1.947 1.16 2.712 2l.428.5a9 9 0 0 1 1.901 5.559c0 3.577-2.056 6.636-5 8.026h-1.26v-8.882c0-1.067-.822-1.96-1.9-2.16-.15-.028-.304-.044-.463-.044-.22 0-.427.037-.628.09-.977.28-1.703 1.198-1.743 2.306v9.178l-1.11-.537C6.18 19.098 4.96 18 4.1 16.614M22.97 24.09l-6.256-3.874c-.102-.063-.218-.098-.33-.144 2.683-1.8 4.354-4.855 4.354-8.243 0-.486-.037-.964-.104-1.43a9.97 9.97 0 0 0-1.57-4.128l-.295-.408-.066-.092a10.05 10.05 0 0 0-.949-1.078c-.342-.334-.708-.643-1.094-.922-1.155-.834-2.492-1.412-3.94-1.65l-.732-.088-.748-.03a9.29 9.29 0 0 0-1.482.119c-1.447.238-2.786.816-3.94 1.65a9.33 9.33 0 0 0-.813.686 9.59 9.59 0 0 0-.845.877l-.385.437-.36.5-.288.468-.418.778-.04.09c-.593 1.28-.93 2.71-.93 4.222 0 3.832 2.182 7.342 5.56 8.938l1.437.68v4.946L5 25.64a4.44 4.44 0 0 0-.888-.086c-.017 0-.034.003-.05.003-.252.004-.503.033-.75.08a5.08 5.08 0 0 0-.237.056c-.193.046-.382.107-.568.18-.075.03-.15.057-.225.1-.25.114-.494.244-.723.405a1.31 1.31 0 0 0-.566 1.122 1.28 1.28 0 0 0 .645 1.051C4 29.925 5.96 31.614 7.473 33.563a5.06 5.06 0 0 0 .434.491c1.086 1.082 2.656 1.713 4.326 1.715h6.697c.748-.001 1.43-.333 1.858-.872.142-.18.256-.38.336-.602l2.757-7.74c.094-.26.13-.53.112-.794s-.088-.52-.203-.76a2.19 2.19 0 0 0-.821-.91" fill-opacity=".6" fill="#000" />
341            <path d="M22.444 24.94l-6.257-3.874a1.45 1.45 0 0 0-.757-.211h-2.953v-9.88c0-.663-.616-1.203-1.373-1.203s-1.37.54-1.37 1.203v16.643l-4.922-.994a3.44 3.44 0 0 0-.692-.069 3.35 3.35 0 0 0-1.925.598c-.147.102-.198.198-.194.298.004.094.058.176.153.23 2.462 1.448 4.517 3.22 6.11 5.27.887 1.14 2.373 1.82 3.98 1.82h6.686c.577 0 1.08-.326 1.253-.8l2.76-7.74c.16-.448-.017-.923-.426-1.22-.025-.02-.043-.043-.07-.06z" fill="#fff" />
342            <g transform="translate(0 .769)">
343                <mask id="B" fill="#fff">
344                    <use xlink:href="#A" />
345                </mask>
346                <path d="M23.993 24.992a1.96 1.96 0 0 1-.111.794l-2.758 7.74c-.08.22-.194.423-.336.602-.427.54-1.11.87-1.857.872h-6.698c-1.67-.002-3.24-.633-4.326-1.715-.154-.154-.3-.318-.434-.49C5.96 30.846 4 29.157 1.646 27.773c-.385-.225-.626-.618-.645-1.05a1.31 1.31 0 0 1 .566-1.122 4.56 4.56 0 0 1 .723-.405l.225-.1a4.3 4.3 0 0 1 .568-.18l.237-.056c.248-.046.5-.075.75-.08.018 0 .034-.003.05-.003.303-.001.597.027.89.086l3.722.752V20.68l-1.436-.68c-3.377-1.596-5.56-5.106-5.56-8.938 0-1.51.336-2.94.93-4.222.015-.03.025-.06.04-.09.127-.267.268-.525.418-.778.093-.16.186-.316.288-.468.063-.095.133-.186.2-.277L3.773 5c.118-.155.26-.29.385-.437.266-.3.544-.604.845-.877a9.33 9.33 0 0 1 .813-.686C6.97 2.167 8.31 1.59 9.757 1.35a9.27 9.27 0 0 1 1.481-.119 8.82 8.82 0 0 1 .748.031c.247.02.49.05.733.088 1.448.238 2.786.816 3.94 1.65.387.28.752.588 1.094.922a9.94 9.94 0 0 1 .949 1.078l.066.092c.102.133.203.268.295.408a9.97 9.97 0 0 1 1.571 4.128c.066.467.103.945.103 1.43 0 3.388-1.67 6.453-4.353 8.243.11.046.227.08.33.144l6.256 3.874c.37.23.645.55.82.9.115.24.185.498.203.76m.697-1.195c-.265-.55-.677-1.007-1.194-1.326l-5.323-3.297c2.255-2.037 3.564-4.97 3.564-8.114 0-2.19-.637-4.304-1.84-6.114-.126-.188-.26-.37-.4-.552-.645-.848-1.402-1.6-2.252-2.204C15.472.91 13.393.232 11.238.232A10.21 10.21 0 0 0 5.23 2.19c-.848.614-1.606 1.356-2.253 2.205-.136.18-.272.363-.398.55C1.374 6.756.737 8.87.737 11.06c0 4.218 2.407 8.08 6.133 9.842l.863.41v3.092l-2.525-.51c-.356-.07-.717-.106-1.076-.106a5.45 5.45 0 0 0-3.14.996c-.653.46-1.022 1.202-.99 1.983a2.28 2.28 0 0 0 1.138 1.872c2.24 1.318 4.106 2.923 5.543 4.772 1.26 1.62 3.333 2.59 5.55 2.592h6.698c1.42-.001 2.68-.86 3.134-2.138l2.76-7.74c.272-.757.224-1.584-.134-2.325" fill-opacity=".05" fill="#000" mask="url(#B)" />
347            </g>
348        </g>
349    </g>
350</svg>`}
351      </slot>
352    </div>
353  </div>
354
355  <div id="finger0" class="animated-container cover">
356    <slot name="finger0" aria-hidden="true">
357    </slot>
358  </div>
359  <div id="finger1" class="animated-container cover">
360    <slot name="finger1" aria-hidden="true">
361    </slot>
362  </div>
363
364  <div class="slot default">
365    <slot></slot>
366
367    <div class="slot progress-bar">
368      <slot name="progress-bar">
369        <div id="default-progress-bar" aria-hidden="true">
370          <div class="bar" part="default-progress-bar"></div>
371        </div>
372      </slot>
373    </div>
374
375    <div class="slot exit-webxr-ar-button">
376      <slot name="exit-webxr-ar-button">
377        <a id="default-exit-webxr-ar-button" part="default-exit-webxr-ar-button"
378            tabindex="3"
379            aria-label="Exit AR"
380            aria-hidden="true">
381          ${J`
382<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" fill="#000000">
383    <!-- NOTE(cdata): This SVG filter is a stop-gap until we can implement
384         support for dynamic re-coloring of UI components -->
385    <defs>
386      <filter id="drop-shadow" x="-100%" y="-100%" width="300%" height="300%">
387        <feGaussianBlur in="SourceAlpha" stdDeviation="1"/>
388        <feOffset dx="0" dy="0" result="offsetblur"/>
389        <feFlood flood-color="#000000"/>
390        <feComposite in2="offsetblur" operator="in"/>
391        <feMerge>
392          <feMergeNode/>
393          <feMergeNode in="SourceGraphic"/>
394        </feMerge>
395      </filter>
396    </defs>
397    <path filter="url(#drop-shadow)" d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
398    <path d="M0 0h24v24H0z" fill="none"/>
399</svg>`}
400        </a>
401      </slot>
402    </div>
403  </div>
404</div>
405<div class="screen-reader-only" role="region" aria-label="Live announcements">
406  <span id="status" role="status"></span>
407</div>`;var 
407_e=function(){var e=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]),t=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("object"!==typeof WebAssembly)return{supported:!1};var i,s
vendor: 19,325 bytes, line 407
407=WebAssembly.validate(e)?"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":"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",
vendor: 3,692 bytes, line 407
407n=WebAssembly.instantiate(r(s),{}).then((function(e){(i=e.instance).exports.__wasm_call_ctors()}));function r(e){for(var i=new Uint8Array(e.length),s=0;s<e.length;++s){var n=e.charCodeAt(s);i[s]=n>96?n-97:n>64?n-39:n+4}var r=0;for(s=0;s<e.length;++s)i[r++]=i[s]<60?t[i[s]]:64*(i[s]-60)+i[++s];return i.buffer.slice(0,r)}function a(e,t,s,n,r,a){var o=i.exports.sbrk,A=s+3&-4,c=o(A*n),l=o(r.length),h=new Uint8Array(i.exports.memory.buffer);h.set(r,l);var u=e(c,s,n,l,r.length);if(0==u&&a&&a(c,A,n),t.set(h.subarray(c,c+s*n)),o(c-o(0)),0!=u)throw new Error("Malformed buffer data: "+u)}var o={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},A={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},c=[],l=0;function h(e){var t={object:new Worker(e),pending:0,requests:{}};return t.object.onmessage=function(e){var i=e.data;t.pending-=i.count,t.requests[i.id][i.action](i.value),delete t.requests[i.id]},t}function u(e){for(var t="var instance; var ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(r(s))+"]), {}).then(function(result) { instance = result.instance; instance.exports.__wasm_call_ctors(); });self.onmessage = workerProcess;"+a.toString()+g.toString(),i=new Blob([t],{type:"text/javascript"}),n=URL.createObjectURL(i),o=0;o<e;++o)c[o]=h(n);URL.revokeObjectURL(n)}function g(e){n.then((function(){var t=e.data;try{var s=new Uint8Array(t.count*t.size);a(i.exports[t.mode],s,t.count,t.size,t.source,i.exports[t.filter]),self.postMessage({id:t.id,count:t.count,action:"resolve",value:s},[s.buffer])}catch(n){self.postMessage({id:t.id,count:t.count,action:"reject",value:n})}}))}return{ready:n,supported:!0,useWorkers:function(e){u(e)},decodeVertexBuffer:function(e,t,s,n,r){a(i.exports.meshopt_decodeVertexBuffer,e,t,s,n,i.exports[o[r]])},decodeIndexBuffer:function(e,t,s,n){a(i.exports.meshopt_decodeIndexBuffer,e,t,s,n)},decodeIndexSequence:function(e,t,s,n){a(i.exports.meshopt_decodeIndexSequence,e,t,s,n)},decodeGltfBuffer:function(e,t,s,n,r,c){a(i.exports[A[r]],e,t,s,n,i.exports[o[c]])},decodeGltfBufferAsync:function(e,t,s,r,h){return c.length>0?function(e,t,i,s,n){for(var r=c[0],a=1;a<c.length;++a)c[a].pending<r.pending&&(r=c[a]);return new Promise((function(a,o){var A=new Uint8Array(i),c=l++;r.pending+=e,r.requests[c]={resolve:a,reject:o},r.object.postMessage({id:c,count:e,size:t,source:A,mode:s,filter:n},[A.buffer])}))}(e,t,s,A[r],o[h]):n.then((function(){var n=new Uint8Array(e*t);return a(i.exports[A[r]],n,e,t,s,i.exports[o[h]]),n}))}}}();const Ge=new WeakMap;class Pe extends x.aNw{constructor(e){super(e),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(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,i,s){const n=new x.hH6(this.manager);n.setPath(this.path),n.setResponseType("arraybuffer"),n.setRequestHeader(this.requestHeader),n.setWithCredentials(this.withCredentials),n.load(e,(e=>{this.parse(e,t,s)}),i,s)}parse(e,t,i=(()=>{})){this.decodeDracoFile(e,t,null,null,x.KI_,i).catch(i)}decodeDracoFile(e,t,i,s,n=x.GUF,r=(()=>{})){const a={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:s||this.defaultAttributeTypes,useUniqueIDs:!!i,vertexColorSpace:n};
vendor: 2,101 bytes, line 407
407return this.decodeGeometry(e,a).then(t).catch(r)}decodeGeometry(e,t){const i=JSON.stringify(t);if(Ge.has(e)){const t=Ge.get(e);if(t.key===i)return t.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let s;const n=this.workerNextTaskID++,r=e.byteLength,a=this._getWorker(n,r).then((i=>(s=i,new Promise(((i,r)=>{s._callbacks[n]={resolve:i,reject:r},s.postMessage({type:"decode",id:n,taskConfig:t,buffer:e},[e])}))))).then((e=>this._createGeometry(e.geometry)));return a.catch((()=>!0)).then((()=>{s&&n&&this._releaseTask(s,n)})),Ge.set(e,{key:i,promise:a}),a}_createGeometry(e){const t=new x.u9r;e.index&&t.setIndex(new x.TlE(e.index.array,1));for(let i=0;i<e.attributes.length;i++){const s=e.attributes[i],n=s.name,r=s.array,a=s.itemSize,o=new x.TlE(r,a);"color"===n&&(this._assignVertexColorSpace(o,s.vertexColorSpace),o.normalized=r instanceof Float32Array===!1),t.setAttribute(n,o)}return t}_assignVertexColorSpace(e,t){if(t!==x.KI_)return;const i=new x.Ilk;for(let s=0,n=e.count;s<n;s++)i.fromBufferAttribute(e,s),x.epp.toWorkingColorSpace(i,x.KI_),e.setXYZ(s,i.r,i.g,i.b)}_loadLibrary(e,t){const i=new x.hH6(this.manager);return i.setPath(this.decoderPath),i.setResponseType(t),i.setWithCredentials(this.withCredentials),new Promise(((t,s)=>{i.load(e,t,void 0,s)}))}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e="object"!==typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then((t=>{const i=t[0];e||(this.decoderConfig.wasmBinary=t[1]);const s=Oe.toString(),n=["/* draco decoder */",i,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([n]))})),this.decoderPending}_getWorker(e,t){return this._initDecoder().then((()=>
vendor: 16,384 bytes, line 407
407{if(this.workerPool.length<this.workerLimit){const e=new Worker(this.workerSourceURL);e._callbacks={},e._taskCosts={},e._taskLoad=0,e.postMessage({type:"init",decoderConfig:this.decoderConfig}),e.onmessage=function(t){const i=t.data;switch(i.type){case"decode":e._callbacks[i.id].resolve(i);break;case"error":e._callbacks[i.id].reject(i);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+i.type+'"')}},this.workerPool.push(e)}else this.workerPool.sort((function(e,t){return e._taskLoad>t._taskLoad?-1:1}));const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[e]=t,i._taskLoad+=t,i}))}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map((e=>e._taskLoad)))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,""!==this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),this}}function Oe(){let e,t;function i(e,t,i,s,n,r){const a=r.num_components(),o=i.num_points()*a,A=o*n.BYTES_PER_ELEMENT,c=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,n),l=e._malloc(A);t.GetAttributeDataArrayForAllPoints(i,r,c,A,l);const h=new n(e.HEAPF32.buffer,l,o).slice();return e._free(l),{name:s,array:h,itemSize:a}}onmessage=function(s){const n=s.data;switch(n.type){case"init":e=n.decoderConfig,t=new Promise((function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)}));break;case"decode":const s=n.buffer,r=n.taskConfig;t.then((e=>{const t=e.draco,a=new t.Decoder;try{const e=function(e,t,s,n){const r=n.attributeIDs,a=n.attributeTypes;let o,A;const c=t.GetEncodedGeometryType(s);if(c===e.TRIANGULAR_MESH)o=new e.Mesh,A=t.DecodeArrayToMesh(s,s.byteLength,o);else{if(c!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");o=new e.PointCloud,A=t.DecodeArrayToPointCloud(s,s.byteLength,o)}if(!A.ok()||0===o.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+A.error_msg());const l={index:null,attributes:[]};for(const h in r){const s=self[a[h]];let A,c;if(n.useUniqueIDs)c=r[h],A=t.GetAttributeByUniqueId(o,c);else{if(c=t.GetAttributeId(o,e[r[h]]),-1===c)continue;A=t.GetAttribute(o,c)}const u=i(e,t,o,h,s,A);"color"===h&&(u.vertexColorSpace=n.vertexColorSpace),l.attributes.push(u)}c===e.TRIANGULAR_MESH&&(l.index=function(e,t,i){const s=3*i.num_faces(),n=4*s,r=e._malloc(n);t.GetTrianglesUInt32Array(i,n,r);const a=new Uint32Array(e.HEAPF32.buffer,r,s).slice();return e._free(r),{array:a,itemSize:1}}(e,t,o));return e.destroy(o),l}(t,a,new Int8Array(s),r),o=e.attributes.map((e=>e.array.buffer));e.index&&o.push(e.index.array.buffer),self.postMessage({type:"decode",id:n.id,geometry:e},o)}catch(o){console.error(o),self.postMessage({type:"error",id:n.id,error:o.message})}finally{t.destroy(a)}}))}}}function Ne(e,t){if(t===x.WwZ)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===x.z$h||t===x.UlW){let i=e.getIndex();if(null===i){const t=[],s=e.getAttribute("position");if(void 0===s)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<s.count;e++)t.push(e);e.setIndex(t),i=e.getIndex()}const s=i.count-2,n=[];if(t===x.z$h)for(let e=1;e<=s;e++)n.push(i.getX(0)),n.push(i.getX(e)),n.push(i.getX(e+1));else for(let e=0;e<s;e++)e%2===0?(n.push(i.getX(e)),n.push(i.getX(e+1)),n.push(i.getX(e+2))):(n.push(i.getX(e+2)),n.push(i.getX(e+1)),n.push(i.getX(e)));n.length/3!==s&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const r=e.clone();return r.setIndex(n),r.clearGroups(),r}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e}class He extends x.aNw{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new Je(e)})),this.register((function(e){return new Ye(e)})),this.register((function(e){return new nt(e)})),this.register((function(e){return new rt(e)})),this.register((function(e){return new at(e)})),this.register((function(e){return new $e(e)})),this.register((function(e){return new Xe(e)})),this.register((function(e){return new Ze(e)})),this.register((function(e){return new et(e)})),this.register((function(e){return new Ve(e)})),this.register((function(e){return new tt(e)})),this.register((function(e){return new We(e)})),this.register((function(e){return new st(e)})),this.register((function(e){return new it(e)})),this.register((function(e){return new ze(e)})),this.register((function(e){return new ot(e)})),this.register((function(e){return new At(e)}))}load(e,t,i,s){const r=this;let a;if(""!==this.resourcePath)a=this.resourcePath;else if(""!==this.path){const t=x.Zp0.extractUrlBase(e);a=x.Zp0.resolveURL(t,this.path)}else a=x.Zp0.extractUrlBase(e);this.manager.itemStart(e);const o=function(t){s?s(t):console.error(t),r.manager.itemError(e),r.manager.itemEnd(e)},A=new x.hH6(this.manager);A.setPath(this.path),A.setResponseType("arraybuffer"),A.setRequestHeader(this.requestHeader),A.setWithCredentials(this.withCredentials),A.load(e,(function(i){try{r.parse(i,a,(function(i){t(i),r.manager.itemEnd(e)}),o)}catch(n){o(n)}}),i,o)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,i,s){let n;const r={},a={},o=new TextDecoder;if("string"===typeof e)n=JSON.parse(e);else if(e instanceof ArrayBuffer){if(o.decode(new Uint8Array(e,0,4))===ct){try{r[je.KHR_BINARY_GLTF]=new ut(e)}catch(c){return void(s&&s(c))}n=JSON.parse(r[je.KHR_BINARY_GLTF].content)}else n=JSON.parse(o.decode(e))}else n=e;if(void 0===n.asset||n.asset.version[0]<2)return void(s&&s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const A=new Gt(n,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});A.fileLoader.setRequestHeader(this.requestHeader);for(let l=0;l<this.pluginCallbacks.length;l++){const e=this.pluginCallbacks[l](A);e.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[e.name]=e,r[e.name]=!0}if(n.extensionsUsed)for(let l=0;l<n.extensionsUsed.length;++l){const e=n.extensionsUsed[l],t=n.extensionsRequired||[];switch(e){case je.KHR_MATERIALS_UNLIT:r[e]=new Ke;break;case je.KHR_DRACO_MESH_COMPRESSION:r[e]=new gt(n,this.dracoLoader);break;case je.KHR_TEXTURE_TRANSFORM:r[e]=new dt;break;case je.KHR_MESH_QUANTIZATION:r[e]=new pt;break;default:t.indexOf(e)>=0&&void 0===a[e]&&console.warn('THREE.GLTFLoader: Unknown extension "'+e+'".')}}A.setExtensions(r),A.setPlugins(a),A.parse(i,s)}parseAsync(e,t){const i=this;return new Promise((function(s,n){i.parse(e,t,s,n)}))}}function qe(){let e={};return{get:function(t){return e[t]},add:function(t,i){e[t]=i},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const je={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 ze{constructor(e){this.parser=e,this.name=je.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,s=t.length;i<s;i++){const s=t[i];s.extensions&&s.extensions[this.name]&&void 0!==s.extensions[this.name].light&&e._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(e){const t=this.parser,i="light:"+e;let s=t.cache.get(i);if(s)return s;const n=t.json,r=((n.extensions&&n.extensions[this.name]||{}).lights||[])[e];let a;const o=new x.Ilk(16777215);void 0!==r.color&&o.setRGB(r.color[0],r.color[1],r.color[2],x.GUF);const A=void 0!==r.range?r.range:0;switch(r.type){case"directional":a=new x.Ox3(o),a.target.position.set(0,0,-1),a.add(a.target);break;case"point":a=new x.cek(o),a.distance=A;break;case"spot":a=new x.PMe(o),a.distance=A,r.spot=r.spot||{},r.spot.innerConeAngle=void 0!==r.spot.innerConeAngle?r.spot.innerConeAngle:0,r.spot.outerConeAngle=void 0!==r.spot.outerConeAngle?r.spot.outerConeAngle:Math.PI/4,a.angle=r.spot.outerConeAngle,a.penumbra=1-r.spot.innerConeAngle/r.spot.outerConeAngle,a.target.position.set(0,0,-1),a.add(a.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+r.type)}return a.position.set(0,0,0),a.decay=2,Dt(a,r),void 0!==r.intensity&&(a.intensity=r.intensity),a.name=t.createUniqueName(r.name||"light_"+e),s=Promise.resolve(a),t.cache.add(i,s),s}getDependency(e,t){if("light"===e)return this._loadLight(t)}createNodeAttachment(e){const t=this,i=this.parser,s=i.json.nodes[e],n=(s.extensions&&s.extensions[this.name]||{}).light;return void 0===n?null:this._loadLight(n).then((function(e){return i._getNodeRef(t.cache,n,e)}))}}class Ke{constructor(){this.name=je.KHR_MATERIALS_UNLIT}getMaterialType(){return x.vBJ}extendParams(e,t,i){const s=[];e.color=new x.Ilk(1,1,1),e.opacity=1;const n=t.pbrMetallicRoughness;if(n){if(Array.isArray(n.baseColorFactor)){const t=n.baseColorFactor;e.color.setRGB(t[0],t[1],t[2],x.GUF),e.opacity=t[3]}void 0!==n.baseColorTexture&&s.push(i.assignTexture(e,"map",n.baseColorTexture,x.KI_))}return Promise.all(s)}}class Ve{constructor(e){this.parser=e,this.name=je.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=i.extensions[this.name].emissiveStrength;return void 0!==s&&(t.emissiveIntensity=s),Promise.resolve()}}class Je{constructor(e){this.parser=e,this.name=je.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?x.EJi:null}extendMaterialParams(e,t){const i=this.parser,s=i.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];if(void 0!==r.clearcoatFactor&&(t.clearcoat=r.clearcoatFactor),void 0!==r.clearcoatTexture&&n.push(i.assignTexture(t,"clearcoatMap",r.clearcoatTexture)),void 0!==r.clearcoatRoughnessFactor&&(t.clearcoatRoughness=r.clearcoatRoughnessFactor),void 0!==r.clearcoatRoughnessTexture&&n.push(i.assignTexture(t,"clearcoatRoughnessMap",r.clearcoatRoughnessTexture)),void 0!==r.clearcoatNormalTexture&&(n.push(i.assignTexture(t,"clearcoatNormalMap",r.clearcoatNormalTexture)),void 0!==r.clearcoatNormalTexture.scale)){const e=r.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new x.FM8(e,e)}return Promise.all(n)}}class Ye{constructor(e){this.parser=e,this.name=je.KHR_MATERIALS_DISPERSION}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?x.EJi:null}extendMaterialParams(e,t){const i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=i.extensions[this.name];return t.dispersion=void 0!==s.dispersion?s.dispersion:0,Promise.resolve()}}class We{constructor(e){this.parser=e,this.name=je.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?x.EJi:null}extendMaterialParams(e,t){const i=this.parser,s=i.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];return void 0!==r.iridescenceFactor&&(t.iridescence=r.iridescenceFactor),void 0!==r.iridescenceTexture&&n.push(i.assignTexture(t,"iridescenceMap",r.iridescenceTexture)),void 0!==r.iridescenceIor&&(t.iridescenceIOR=r.iridescenceIor),void 0===t.iridescenceThicknessRange&&(t.iridescenceThicknessRange=[100,400]),void 0!==r.iridescenceThicknessMinimum&&(t.iridescenceThicknessRange[0]=r.iridescenceThicknessMinimum),void 0!==r.iridescenceThicknessMaximum&&(t.iridescenceThicknessRange[1]=r.iridescenceThicknessMaximum),void 0!==r.iridescenceThicknessTexture&&n.push(i.assignTexture(t,"iridescenceThicknessMap",r.iridescenceThicknessTexture)),Promise.all(n)}}class $e{constructor(e){this.parser=e,this.name=je.KHR_MATERIALS_SHEEN}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?x.EJi:null}extendMaterialParams(e,t){const i=this.parser,s=i.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[];t.sheenColor=new x.Ilk(0,0,0),t.sheenRoughness=0,t.sheen=1;const r=s.extensions[this.name];if(void 0!==r.sheenColorFactor){const e=r.sheenColorFactor;t.sheenColor.setRGB(e[0],e[1],e[2],x.GUF)}return void 0!==r.sheenRoughnessFactor&&(t.sheenRoughness=r.sheenRoughnessFactor),void 0!==r.sheenColorTexture&&n.push(i.assignTexture(t,"sheenColorMap",r.sheenColorTexture,x.KI_)),void 0!==r.sheenRoughnessTexture&&n.push(i.assignTexture(t,"sheenRoughnessMap",r.sheenRoughnessTexture)),Promise.all(n)}}class Xe{constructor(e){this.parser=e,this.name=je.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?x.EJi:null}extendMaterialParams(e,t){const i=this.parser,s=i.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];return void 0!==r.transmissionFactor&&(t.transmission=r.transmissionFactor),void 0!==r.transmissionTexture&&n.push(i.assignTexture(t,"transmissionMap",r.transmissionTexture)),Promise.all(n)}}class Ze{constructor(e){this.parser=e,this.name=je.KHR_MATERIALS_VOLUME}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?x.EJi:null}extendMaterialParams(e,t){const i=this.parser,s=i.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];t.thickness=void 0!==r.thicknessFactor?r.thicknessFactor:0,void 0!==r.thicknessTexture&&n.push(i.assignTexture(t,"thicknessMap",r.thicknessTexture)),t.attenuationDistance=r.attenuationDistance||1/0;const a=r.attenuationColor||[1,1,1];return t.attenuationColor=(new x.Ilk).setRGB(a[0],a[1],a[2],x.GUF),Promise.all(n)}}class et{constructor(e){this.parser=e,this.name=je.KHR_MATERIALS_IOR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?x.EJi:null}extendMaterialParams(e,t){const i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=i.extensions[this.name];return t.ior=void 0!==s.ior?s.ior:1.5,Promise.resolve()}}class tt{constructor(e){this.parser=e,this.name=je.KHR_MATERIALS_SPECULAR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?x.EJi:null}extendMaterialParams(e,t){const i=this.parser,s=i.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];t.specularIntensity=void 0!==r.specularFactor?r.specularFactor:1,void 0!==r.specularTexture&&n.push(i.assignTexture(t,"specularIntensityMa
407p",r.specularTexture));const a=r.specularColorFactor||[1,1,1];return t.specularColor=(new x.Ilk).setRGB(a[0],a[1],a[2],x.GUF),void 0!==r.specularColorTexture&&n.push(i.assignTexture(t,"specularColorMap",r.specularColorTexture,x.KI_)),Promise.all(n)}}class it{constructor(e){this.parser=e,this.name=je.EXT_MATERIALS_BUMP}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?x.EJi:null}extendMaterialParams(e,t){const i=this.parser,s=i.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];return t.bumpScale=void 0!==r.bumpFactor?r.bumpFactor:1,void 0!==r.bumpTexture&&n.push(i.assignTexture(t,"bumpMap",r.bumpTexture)),Promise.all(n)}}class st{constructor(e){this.parser=e,this.name=je.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?x.EJi:null}extendMaterialParams(e,t){const i=this.parser,s=i.json.materials[e];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const n=[],r=s.extensions[this.name];return void 0!==r.anisotropyStrength&&(t.anisotropy=r.anisotropyStrength),void 0!==r.anisotropyRotation&&(t.anisotropyRotation=r.anisotropyRotation),void 0!==r.anisotropyTexture&&n.push(i.assignTexture(t,"anisotropyMap",r.anisotropyTexture)),Promise.all(n)}}class nt{constructor(e){this.parser=e,this.name=je.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,i=t.json,s=i.textures[e];if(!s.extensions||!s.extensions[this.name])return null;const n=s.extensions[this.name],r=t.options.ktx2Loader;if(!r){if(i.extensionsRequired&&i.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,n.source,r)}}class rt{constructor(e){this.parser=e,this.name=je.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,s=i.json,n=s.textures[e];if(!n.extensions||!n.extensions[t])return null;const r=n.extensions[t],a=s.images[r.source];let o=i.textureLoader;if(a.uri){const e=i.options.manager.getHandler(a.uri);null!==e&&(o=e)}return this.detectSupport().then((function(n){if(n)return i.loadTextureImage(e,r.source,o);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class at{constructor(e){this.parser=e,this.name=je.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,s=i.json,n=s.textures[e];if(!n.extensions||!n.extensions[t])return null;const r=n.extensions[t],a=s.images[r.source];let o=i.textureLoader;if(a.uri){const e=i.options.manager.getHandler(a.uri);null!==e&&(o=e)}return this.detectSupport().then((function(n){if(n)return i.loadTextureImage(e,r.source,o);if(s.extensionsRequired&&s.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class ot{constructor(e){this.name=je.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const e=i.extensions[this.name],s=this.parser.getDependency("buffer",e.buffer),n=this.parser.options.meshoptDecoder;if(!n||!n.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then((function(t){const i=e.byteOffset||0,s=e.byteLength||0,r=e.count,a=e.byteStride,o=new Uint8Array(t,i,s);return n.decodeGltfBufferAsync?n.decodeGltfBufferAsync(r,a,o,e.mode,e.filter).then((function(e){return e.buffer})):n.ready.then((function(){const t=new ArrayBuffer(r*a);return n.decodeGltfBuffer(new Uint8Array(t),r,a,o,e.mode,e.filter),t}))}))}return null}}class At{constructor(e){this.name=je.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||void 0===i.mesh)return null;const s=t.meshes[i.mesh];for(const o of s.primitives)if(o.mode!==It.TRIANGLES&&o.mode!==It.TRIANGLE_STRIP&&o.mode!==It.TRIANGLE_FAN&&void 0!==o.mode)return null;const n=i.extensions[this.name].attributes,r=[],a={};for(const o in n)r.push(this.parser.getDependency("accessor",n[o]).then((e=>(a[o]=e,a[o]))));return r.length<1?null:(r.push(this.parser.createNodeMesh(e)),Promise.all(r).then((e=>{const t=e.pop(),i=t.isGroup?t.children:[t],s=e[0].count,n=[];for(const r of i){const e=new x.yGw,t=new x.Pa4,i=new x._fP,o=new x.Pa4(1,1,1),A=new x.SPe(r.geometry,r.material,s);for(let n=0;n<s;n++)a.TRANSLATION&&t.fromBufferAttribute(a.TRANSLATION,n),a.ROTATION&&i.fromBufferAttribute(a.ROTATION,n),a.SCALE&&o.fromBufferAttribute(a.SCALE,n),A.setMatr
vendor: 6,982 bytes, line 407
407ixAt(n,e.compose(t,i,o));for(const s in a)if("_COLOR_0"===s){const e=a[s];A.instanceColor=new x.lb7(e.array,e.itemSize,e.normalized)}else"TRANSLATION"!==s&&"ROTATION"!==s&&"SCALE"!==s&&r.geometry.setAttribute(s,a[s]);x.Tme.prototype.copy.call(A,r),this.parser.assignFinalMaterial(A),n.push(A)}return t.isGroup?(t.clear(),t.add(...n),t):n[0]})))}}const ct="glTF",lt=1313821514,ht=5130562;class ut{constructor(e){this.name=je.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,12),i=new TextDecoder;if(this.header={magic:i.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==ct)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const s=this.header.length-12,n=new DataView(e,12);let r=0;for(;r<s;){const t=n.getUint32(r,!0);r+=4;const s=n.getUint32(r,!0);if(r+=4,s===lt){const s=new Uint8Array(e,12+r,t);this.content=i.decode(s)}else if(s===ht){const i=12+r;this.body=e.slice(i,i+t)}r+=t}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class gt{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=je.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const i=this.json,s=this.dracoLoader,n=e.extensions[this.name].bufferView,r=e.extensions[this.name].attributes,a={},o={},A={};for(const c in r){const e=wt[c]||c.toLowerCase();a[e]=r[c]}for(const c in e.attributes){const t=wt[c]||c.toLowerCase();if(void 0!==r[c]){const s=i.accessors[e.attributes[c]],n=Ct[s.componentType];A[t]=n.name,o[t]=!0===s.normalized}}return t.getDependency("bufferView",n).then((function(e){return new Promise((function(t,i){s.decodeDracoFile(e,(function(e){for(const t in e.attributes){const i=e.attributes[t],s=o[t];void 0!==s&&(i.normalized=s)}t(e)}),a,A,x.GUF,i)}))}))}}class dt{constructor(){this.name=je.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return void 0!==t.texCoord&&t.texCoord!==e.channel||void 0!==t.offset||void 0!==t.rotation||void 0!==t.scale?(e=e.clone(),void 0!==t.texCoord&&(e.channel=t.texCoord),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),e.needsUpdate=!0,e):e}}class pt{constructor(){this.name=je.KHR_MESH_QUANTIZATION}}class mt extends x._C8{constructor(e,t,i,s){super(e,t,i,s)}copySampleValue_(e){const t=this.resultBuffer,i=this.sampleValues,s=this.valueSize,n=e*s*3+s;for(let r=0;r!==s;r++)t[r]=i[n+r];return t}interpolate_(e,t,i,s){const n=this.resultBuffer,r=this.sampleValues,a=this.valueSize,o=2*a,A=3*a,c=s-t,l=(i-t)/c,h=l*l,u=h*l,g=e*A,d=g-A,p=-2*u+3*h,m=u-h,f=1-p,b=m-h+l;for(let I=0;I!==a;I++){const e=r[d+I+a],t=r[d+I+o]*c,i=r[g+I+a],s=r[g+I]*c;n[I]=f*e+b*t+p*i+m*s}return n}}const ft=new x._fP;class bt extends mt{interpolate_(e,t,i,s){const n=super.interpolate_(e,t,i,s);return ft.fromArray(n).normalize().toArray(n),n}}const It={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},Ct={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Et={9728:x.TyD,9729:x.wem,9984:x.YLQ,9985:x.qyh,9986:x.aH4,9987:x.D1R},yt={33071:x.uWy,33648:x.OoA,10497:x.rpg},Bt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},wt={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"},vt={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Qt={CUBICSPLINE:void 0,LINEAR:x.NMF,STEP:x.Syv},xt="OPAQUE",St="MASK",Mt="BLEND";function Rt(e){return void 0===e.DefaultMaterial&&(e.DefaultMaterial=new x.Wid({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:x.Wl3})),e.DefaultMaterial}function Tt(e,t,i){for(const s in i.extensions)void 0===e[s]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[s]=i.extensions[s])}function Dt(e,t){void 0!==t.extras&&("object"===typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function kt(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let i=0,s=t.weights.length;i<s;i++)e.morphTargetInfluences[i]=t.weights[i];if(t.extras&&Array.isArray(t.extras.targetNames)){const i=t.extras.targetNames;if(e.morphTargetInfluences.length===i.length){e.morphTargetDictionary={};for(let t=0,s=i.length;t<s;t++)e.morphTargetDictionary[i[t]]=t}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Ft(e){let t;const i=e.extensions&&e.extensions[je.KHR_DRACO_MESH_COMPRESSION];if(t=i?"draco:"+i.bufferView+":"+i.indices+":"+Lt(i.attributes):e.indices+":"+Lt(e.attributes)+":"+e.mode,void 0!==e.targets)for(let s=0,n=e.targets.length;s<n;s++)t+=":"+Lt(e.targets[s]);return t}function Lt(e){let t="";const i=Object.keys(e).sort();for(let s=0,n=i.length;s<n;s++)t+=i[s]+":"+e[i[s]]+";";return t}function Ut(e){switch(e){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.")}}const _t=new x.yGw;class Gt{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new qe,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 i=!1,s=-1,n=!1,r=-1;if("undefined"!==typeof navigator){const e=navigator.userAgent;i=!0===/^((?!chrome|android).)*safari/i.test(e);const t=e.match(/Version\/(\d+)/);s=i&&t?parseInt(t[1],10):-1,n=e.indexOf("Firefox")>-1,r=n?e.match(/Firefox\/([0-9]+)\./)[1]:-1}"undefined"===typeof createImageBitmap||i&&s<17||n&&r<98?this.textureLoader=new x.dpR(this.options.manager):this.textureLoader=new x.QRU(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new x.hH6(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,s=this.json,n=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}
vendor: 6,610 bytes, line 407
407))).then((function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])})).then((function(t){const r={scene:t[0][s.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:s.asset,parser:i,userData:{}};return Tt(n,r,s),Dt(r,s),Promise.all(i._invokeAll((function(e){return e.afterRoot&&e.afterRoot(r)}))).then((function(){for(const e of r.scenes)e.updateMatrixWorld();e(r)}))})).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let s=0,n=t.length;s<n;s++){const i=t[s].joints;for(let t=0,s=i.length;t<s;t++)e[i[t]].isBone=!0}for(let s=0,n=e.length;s<n;s++){const t=e[s];void 0!==t.mesh&&(this._addNodeRef(this.meshCache,t.mesh),void 0!==t.skin&&(i[t.mesh].isSkinnedMesh=!0)),void 0!==t.camera&&this._addNodeRef(this.cameraCache,t.camera)}}_addNodeRef(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,i){if(e.refs[t]<=1)return i;const s=i.clone(),n=(e,t)=>{const i=this.associations.get(e);null!=i&&this.associations.set(t,i);for(const[s,r]of e.children.entries())n(r,t.children[s])};return n(i,s),s.name+="_instance_"+e.uses[t]++,s}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i<t.length;i++){const s=e(t[i]);if(s)return s}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const i=[];for(let s=0;s<t.length;s++){const n=e(t[s]);n&&i.push(n)}return i}getDependency(e,t){const i=e+":"+t;let s=this.cache.get(i);if(!s){switch(e){case"scene":s=this.loadScene(t);break;case"node":s=this._invokeOne((function(e){return e.loadNode&&e.loadNode(t)}));break;case"mesh":s=this._invokeOne((function(e){return e.loadMesh&&e.loadMesh(t)}));break;case"accessor":s=this.loadAccessor(t);break;case"bufferView":s=this._invokeOne((function(e){return e.loadBufferView&&e.loadBufferView(t)}));break;case"buffer":s=this.loadBuffer(t);break;case"material":s=this._invokeOne((function(e){return e.loadMaterial&&e.loadMaterial(t)}));break;case"texture":s=this._invokeOne((function(e){return e.loadTexture&&e.loadTexture(t)}));break;case"skin":s=this.loadSkin(t);break;case"animation":s=this._invokeOne((function(e){return e.loadAnimation&&e.loadAnimation(t)}));break;case"camera":s=this.loadCamera(t);break;default:if(s=this._invokeOne((function(i){return i!=this&&i.getDependency&&i.getDependency(e,t)})),!s)throw new Error("Unknown type: "+e)}this.cache.add(i,s)}return s}getDependencies(e){let t=this.cache.get(e);if(!t){const i=this,s=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(s.map((function(t,s){return i.getDependency(e,s)}))),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],i=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[je.KHR_BINARY_GLTF].body);const s=this.options;return new Promise((function(e,n){i.load(x.Zp0.resolveURL(t.uri,s.path),e,void 0,(function(){n(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))}))}))}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){const i=t.byteLength||0,s=t.byteOffset||0;return e.slice(s,s+i)}))}loadAccessor(e){const t=this,i=this.json,s=this.json.accessors[e];if(void 0===s.bufferView&&void 0===s.sparse){const e=Bt[s.type],t=Ct[s.componentType],i=!0===s.normalized,n=new t(s.count*e);return Promise.resolve(new x.TlE(n,e,i))}const n=[];return void 0!==s.bufferView?n.push(this.getDependency("bufferView",s.bufferView)):n.push(null),void 0!==s.sparse&&(n.push(this.getDependency("bufferView",s.sparse.indices.bufferView)),n.push(this.getDependency("bufferView",s.sparse.values.bufferView))),Promise.all(n).then((function(e){const n=e[0],r=Bt[s.type],a=Ct[s.componentType],o=a.BYTES_PER_ELEMENT,A=o*r,c=s.byteOffset||0,l=void 0!==s.bufferView?i.bufferViews[s.bufferView].byteStride:void 0,h=!0===s.normalized;let u,g;if(l&&l!==A){const e=Math.floor(c/l),i="InterleavedBuffer:"+s.bufferView+":"+s.componentType+":"+e+":"+s.count;let A=t.cache.get(i);A||(u=new a(n,e*l,s.count*l/o),A=new x.vpT(u,l/o),t.cache.add(i,A)),g=new x.kB5(A,r,c%l/o,h)}else u=null===n?new a(s.count*r):new a(n,c,s.count*r),g=new x.TlE(u,r,h);if(void 0!==s.sparse){const t=Bt.SCALAR,i=Ct[s.sparse.indices.componentType],o=s.sparse.indices.byteOffset||0,A=s.sparse.values.byteOffset||0,c=new i(e[1],o,s.sparse.count*t),l=new a(e[2],A,s.sparse.count*r);null!==n&&(g=new x.TlE(g.array.slice(),g.itemSize,g.normalized)),g.normalized=!1;for(let e=0,s=c.length;e<s;e++){const t=c[e];if(g.setX(t,l[e*r]),r>=2&&g.setY(t,l[e*r+1]),r>=3&&g.setZ(t,l[e*r+2]),r>=4&&g.setW(t,l[e*r+3]),r>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}g.normalized=h}return g}))}loadTexture(e){const t=this.json,i=this.options,s=t.textures[e].source,n=t.images[s];let r=this.textureLoader;if(n.uri){const e=i.manager.getHandler(n.uri);null!==e&&(r=e)}return this.loadTextureImage(e,s,r)}loadTextureImage(e,t,i){const s=this,n=this.json,r=n.textures[e],a=n.images[t],o=(a.uri||a.bufferView)+":"+r.sampler;if(this.textureCache[o])return this.textureCache[o];const A=this.loadImageSource(t,i).then((function(t){t.flipY=!1,t.name=r.name||a.name||"",""===t.name&&"string"===typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(t.name=a.uri);const i=(n.samplers||{})[r.sampler]||{};return t.magFilter=Et[i.magFilter]||x.wem,t.minFilter=Et[i.minFilter]||x.D1R,t.wrapS=yt[i.wrapS]||x.rpg,t.wrapT=yt[i.wrapT]||x.rpg,t.generateMipmaps=!t.isCompressedTexture&&t.minFilter!==x.TyD&&t.minFilter!==x.wem,s.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[o]=A,A}loadImageSource(e,t){const i=this,s=this.json,n=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then((e=>e.clone()));const r=s.images[e],a=self.URL||self.webkitURL;let o=r.uri||"",A=!1;if(void 0!==r.bufferView)o=i.getDependency("bufferView",r.bufferView).then((function(e){A=!0;const t=new Blob([e],{type:r.mimeType});return o=a.createObjectURL(t),o}));else if(void 0===r.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const c=Promise.resolve(o).then((function(e){return new Promise((function(i,s){let r=i;!0===t.isImageBitmapLoader&&(r=function(e){const t=new x.xEZ(e);t.needsUpdate=!0,i(t)}),t.load(x.Zp0.resolveURL(e,n.path),r,void 0,s)}))})).then((function(e){var t;return!0===A&&a.revokeObjectURL(o),Dt(e,r),e.userData.mimeType=r.mimeType||((t=r.uri).search(/\.jpe?g($|\?)/i)>
vendor: 17,114 bytes, line 407
4070||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":t.search(/\.ktx2($|\?)/i)>0||0===t.search(/^data\:image\/ktx2/)?"image/ktx2":"image/png"),e})).catch((function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),e}));return this.sourceCache[e]=c,c}assignTexture(e,t,i,s){const n=this;return this.getDependency("texture",i.index).then((function(r){if(!r)return null;if(void 0!==i.texCoord&&i.texCoord>0&&((r=r.clone()).channel=i.texCoord),n.extensions[je.KHR_TEXTURE_TRANSFORM]){const e=void 0!==i.extensions?i.extensions[je.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=n.associations.get(r);r=n.extensions[je.KHR_TEXTURE_TRANSFORM].extendTexture(r,e),n.associations.set(r,t)}}return void 0!==s&&(r.colorSpace=s),e[t]=r,r}))}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const s=void 0===t.attributes.tangent,n=void 0!==t.attributes.color,r=void 0===t.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+i.uuid;let t=this.cache.get(e);t||(t=new x.UY4,x.F5T.prototype.copy.call(t,i),t.color.copy(i.color),t.map=i.map,t.sizeAttenuation=!1,this.cache.add(e,t)),i=t}else if(e.isLine){const e="LineBasicMaterial:"+i.uuid;let t=this.cache.get(e);t||(t=new x.nls,x.F5T.prototype.copy.call(t,i),t.color.copy(i.color),t.map=i.map,this.cache.add(e,t)),i=t}if(s||n||r){let e="ClonedMaterial:"+i.uuid+":";s&&(e+="derivative-tangents:"),n&&(e+="vertex-colors:"),r&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=i.clone(),n&&(t.vertexColors=!0),r&&(t.flatShading=!0),s&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(i))),i=t}e.material=i}getMaterialType(){return x.Wid}loadMaterial(e){const t=this,i=this.json,s=this.extensions,n=i.materials[e];let r;const a={},o=[];if((n.extensions||{})[je.KHR_MATERIALS_UNLIT]){const e=s[je.KHR_MATERIALS_UNLIT];r=e.getMaterialType(),o.push(e.extendParams(a,n,t))}else{const i=n.pbrMetallicRoughness||{};if(a.color=new x.Ilk(1,1,1),a.opacity=1,Array.isArray(i.baseColorFactor)){const e=i.baseColorFactor;a.color.setRGB(e[0],e[1],e[2],x.GUF),a.opacity=e[3]}void 0!==i.baseColorTexture&&o.push(t.assignTexture(a,"map",i.baseColorTexture,x.KI_)),a.metalness=void 0!==i.metallicFactor?i.metallicFactor:1,a.roughness=void 0!==i.roughnessFactor?i.roughnessFactor:1,void 0!==i.metallicRoughnessTexture&&(o.push(t.assignTexture(a,"metalnessMap",i.metallicRoughnessTexture)),o.push(t.assignTexture(a,"roughnessMap",i.metallicRoughnessTexture))),r=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),o.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,a)}))))}!0===n.doubleSided&&(a.side=x.ehD);const A=n.alphaMode||xt;if(A===Mt?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,A===St&&(a.alphaTest=void 0!==n.alphaCutoff?n.alphaCutoff:.5)),void 0!==n.normalTexture&&r!==x.vBJ&&(o.push(t.assignTexture(a,"normalMap",n.normalTexture)),a.normalScale=new x.FM8(1,1),void 0!==n.normalTexture.scale)){const e=n.normalTexture.scale;a.normalScale.set(e,e)}if(void 0!==n.occlusionTexture&&r!==x.vBJ&&(o.push(t.assignTexture(a,"aoMap",n.occlusionTexture)),void 0!==n.occlusionTexture.strength&&(a.aoMapIntensity=n.occlusionTexture.strength)),void 0!==n.emissiveFactor&&r!==x.vBJ){const e=n.emissiveFactor;a.emissive=(new x.Ilk).setRGB(e[0],e[1],e[2],x.GUF)}return void 0!==n.emissiveTexture&&r!==x.vBJ&&o.push(t.assignTexture(a,"emissiveMap",n.emissiveTexture,x.KI_)),Promise.all(o).then((function(){const i=new r(a);return n.name&&(i.name=n.name),Dt(i,n),t.associations.set(i,{materials:e}),n.extensions&&Tt(s,i,n),i}))}createUniqueName(e){const t=x.iUV.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,s=this.primitiveCache;function n(e){return i[je.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(i){return Pt(i,e,t)}))}const r=[];for(let a=0,o=e.length;a<o;a++){const i=e[a],o=Ft(i),A=s[o];if(A)r.push(A.promise);else{let e;e=i.extensions&&i.extensions[je.KHR_DRACO_MESH_COMPRESSION]?n(i):Pt(new x.u9r,i,t),s[o]={primitive:i,promise:e},r.push(e)}}return Promise.all(r)}loadMesh(e){const t=this,i=this.json,s=this.extensions,n=i.meshes[e],r=n.primitives,a=[];for(let o=0,A=r.length;o<A;o++){const e=void 0===r[o].material?Rt(this.cache):this.getDependency("material",r[o].material);a.push(e)}return a.push(t.loadGeometries(r)),Promise.all(a).then((function(i){const a=i.slice(0,i.length-1),o=i[i.length-1],A=[];for(let l=0,h=o.length;l<h;l++){const i=o[l],c=r[l];let h;const u=a[l];if(c.mode===It.TRIANGLES||c.mode===It.TRIANGLE_STRIP||c.mode===It.TRIANGLE_FAN||void 0===c.mode)h=!0===n.isSkinnedMesh?new x.TUv(i,u):new x.Kj0(i,u),!0===h.isSkinnedMesh&&h.normalizeSkinWeights(),c.mode===It.TRIANGLE_STRIP?h.geometry=Ne(h.geometry,x.UlW):c.mode===It.TRIANGLE_FAN&&(h.geometry=Ne(h.geometry,x.z$h));else if(c.mode===It.LINES)h=new x.ejS(i,u);else if(c.mode===It.LINE_STRIP)h=new x.x12(i,u);else if(c.mode===It.LINE_LOOP)h=new x.blk(i,u);else{if(c.mode!==It.POINTS)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+c.mode);h=new x.woe(i,u)}Object.keys(h.geometry.morphAttributes).length>0&&kt(h,n),h.name=t.createUniqueName(n.name||"mesh_"+e),Dt(h,n),c.extensions&&Tt(s,h,c),t.assignFinalMaterial(h),A.push(h)}for(let s=0,n=A.length;s<n;s++)t.associations.set(A[s],{meshes:e,primitives:s});if(1===A.length)return n.extensions&&Tt(s,A[0],n),A[0];const c=new x.ZAu;n.extensions&&Tt(s,c,n),t.associations.set(c,{meshes:e});for(let e=0,t=A.length;e<t;e++)c.add(A[e]);return c}))}loadCamera(e){let t;const i=this.json.cameras[e],s=i[i.type];if(s)return"perspective"===i.type?t=new x.cPb(x.M8C.radToDeg(s.yfov),s.aspectRatio||1,s.znear||1,s.zfar||2e6):"orthographic"===i.type&&(t=new x.iKG(-s.xmag,s.xmag,s.ymag,-s.ymag,s.znear,s.zfar)),i.name&&(t.name=this.createUniqueName(i.name)),Dt(t,i),Promise.resolve(t);console.warn("THREE.GLTFLoader: Missing camera parameters.")}loadSkin(e){const t=this.json.skins[e],i=[];for(let s=0,n=t.joints.length;s<n;s++)i.push(this._loadNodeShallow(t.joints[s]));return void 0!==t.inverseBindMatrices?i.push(this.getDependency("accessor",t.inverseBindMatrices)):i.push(null),Promise.all(i).then((function(e){const i=e.pop(),s=e,n=[],r=[];for(let a=0,o=s.length;a<o;a++){const e=s[a];if(e){n.push(e);const t=new x.yGw;null!==i&&t.fromArray(i.array,16*a),r.push(t)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[a])}return new x.OdW(n,r)}))}loadAnimation(e){const t=this.json,i=this,s=t.animations[e],n=s.name?s.name:"animation_"+e,r=[],a=[],o=[],A=[],c=[];for(let l=0,h=s.channels.length;l<h;l++){const e=s.channels[l],t=s.samplers[e.sampler],i=e.target,n=i.node,h=void 0!==s.parameters?s.parameters[t.input]:t.input,u=void 0!==s.parameters?s.parameters[t.output]:t.output;void 0!==i.node&&(r.push(this.getDependency("node",n)),a.push(this.getDependency("accessor",h)),o.push(this.getDependency("accessor",u)),A.push(t),c.push(i))}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o),Promise.all(A),Promise.all(c)]).then((function(e){const t=e[0],s=e[1],r=e[2],a=e[3],o=e[4],A=[];for(let n=0,c=t.length;n<c;n++){const e=t[n],c=s[n],l=r[n],h=a[n],u=o[n];if(void 0===e)continue;e.updateMatrix&&e.updateMatrix();const g=i._createAnimationTracks(e,c,l,h,u);if(g)for(let t=0;t<g.length;t++)A.push(g[t])}return new x.m7l(n,void 0,A)}))}createNodeMesh(e){const t=this.json,i=this,s=t.nodes[e];return void 0===s.mesh?null:i.getDependency("mesh",s.mesh).then((function(e){const t=i._getNodeRef(i.meshCache,s.mesh,e);return void 0!==s.weights&&t.traverse((function(e){if(e.isMesh)for(let t=0,i=s.weights.length;t<i;t++)e.morphTargetInfluences[t]=s.weights[t]})),t}))}loadNode(e){const t=this,i=this.json.nodes[e],s=t._loadNodeShallow(e),n=[],r=i.children||[];for(let o=0,A=r.length;o<A;o++)n.push(t.getDependency("node",r[o]));const a=void 0===i.skin?Promise.resolve(null):t.getDependency("skin",i.skin);return Promise.all([s,Promise.all(n),a]).then((function(e){const t=e[0],i=e[1],s=e[2];null!==s&&t.traverse((function(e){e.isSkinnedMesh&&e.bind(s,_t)}));for(let n=0,r=i.length;n<r;n++)t.add(i[n]);return t}))}_loadNodeShallow(e){const t=this.json,i=this.extensions,s=this;if(void 0!==this.nodeCache[e])return this.nodeCache[e];const n=t.nodes[e],r=n.name?s.createUniqueName(n.name):"",a=[],o=s._invokeOne((function(t){return t.createNodeMesh&&t.createNodeMesh(e)}));return o&&a.push(o),void 0!==n.camera&&a.push(s.getDependency("camera",n.camera).then((function(e){return s._getNodeRef(s.cameraCache,n.camera,e)}))),s._invokeAll((function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)})).forEach((function(e){a.push(e)})),this.nodeCache[e]=Promise.all(a).then((function(t){let a;if(a=!0===n.isBone?new x.N$j:t.length>1?new x.ZAu:1===t.length?t[0]:new x.Tme,a!==t[0])for(let e=0,i=t.length;e<i;e++)a.add(t[e]);if(n.name&&(a.userData.name=n.name,a.name=r),Dt(a,n),n.extensions&&Tt(i,a,n),void 0!==n.matrix){const e=new x.yGw;e.fromArray(n.matrix),a.applyMatrix4(e)}else void 0!==n.translation&&a.position.fromArray(n.translation),void 0!==n.rotation&&a.quaternion.fromArray(n.rotation),void 0!==n.scale&&a.scale.fromArray(n.scale);return s.associations.has(a)||s.associations.set(a,{}),s.associations.get(a).nodes=e,a})),this.nodeCache[e]}loadScene(e){const t=this.extensions,i=this.json.scenes[e],s=this,n=new x.ZAu;i.name&&(n.name=s.createUniqueName(i.name)),Dt(n,i),i.extensions&&Tt(t,n,i);const r=i.nodes||[],a=[];for(let o=0,A=r.length;o<A;o++)a.push(s.getDependency("node",r[o]));return Promise.all(a).then((function(e){for(let t=0,i=e.length;t<i;t++)n.add(e[t]);return s.associations=(e=>{const t=new Map;for(const[i,n]of s.associations)(i instanceof x.F5T||i instanceof x.xEZ)&&t.set(i,n);return e.traverse((e=>{const i=s.associations.get(e);null!=i&&t.set(e,i)})),t})(n),n}))}_createAnimationTracks(e,t,i,s,n){const r=[],a=e.name?e.name:e.uuid,o=[];let A;switch(vt[n.path]===vt.weights?e.traverse((function(e){e.morphTargetInfluences&&o.push(e.name?e.name:e.uuid)})):o.push(a),vt[n.path]){case vt.weights:A=x.dUE;break;case vt.rotation:A=x.iLg;break;case vt.position:case vt.scale:A=x.yC1;break;default:if(1===i.itemSize)A=x.dUE;else A=x.yC1}const c=void 0!==s.interpolation?Qt[s.interpolation]:x.NMF,l=this._getArrayFromAccessor(i);for(let h=0,u=o.length;h<u;h++){const e=new A(o[h]+"."+vt[n.path],t.array,l,c);"CUBICSPLINE"===s.interpolation&&this._createCubicSplineTrackInterpolant(e),r.push(e)}return r}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const e=Ut(t.constructor),i=new Float32Array(t.length);for(let s=0,n=t.length;s<n;s++)i[s]=t[s]*e;t=i}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(e){return new(this instanceof x.iLg?bt:mt)(this.times,this.values,this.getValueSize()/3,e)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Pt(e,t,i){const s=t.attributes,n=[];function r(t,s){return i.getDependency("accessor",t).then((function(t){e.setAttribute(s,t)}))}for(const a in s){const t=wt[a]||a.toLowerCase();t in e.attributes||n.push(r(s[a],t))}if(void 0!==t.indices&&!e.index){const s=i.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));n.push(s)}return x.epp.workingColorSpace!==x.GUF&&"COLOR_0"in s&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${x.epp.workingColorSpace}" not supported.`),Dt(e,t),function(e,t,i){const s=t.attributes,n=new x.ZzF;if(void 0===s.POSITION)return;{const e=i.json.accessors[s.POSITION],t=e.min,r=e.max;if(void 0===t||void 0===r)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(n.set(new x.Pa4(t[0],t[1],t[2]),new x.Pa4(r[0],r[1],r[2])),e.normalized){const t=Ut(Ct[e.componentType]);n.min.multiplyScalar(t),n.max.multiplyScalar(t)}}const r=t.targets;if(void 0!==r){const e=new x.Pa4,t=new x.Pa4;for(let s=0,n=r.length;s<n;s++){const n=r[s];if(void 0!==n.POSITION){const s=i.json.accessors[n.POSITION],r=s.min,a=s.max;if(void 0!==r&&void 0!==a){if(t.setX(Math.max(Math.abs(r[0]),Math.abs(a[0]))),t.setY(Math.max(Math.abs(r[1]),Math.abs(a[1]))),t.setZ(Math.max(Math.abs(r[2]),Math.abs(a[2]))),s.normalized){const e=Ut(Ct[s.componentType]);t.multiplyScalar(e)}e.max(t)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}n.expandByVector(e)}e.boundingBox=n;const a=new x.aLr;n.getCenter(a.center),a.radius=n.min.distanceTo(n.max)/2,e.boundingSphere=a}(e,t,i),Promise.all(n).then((function(){return void 0!==t.targets?function(e,t,i){let s=!1,n=!1,r=!1;for(let c=0,l=t.length;c<l;c++){const e=t[c];if(void 0!==e.POSITION&&(s=!0),void 0!==e.NORMAL&&(n=!0),void 0!==e.COLOR_0&&(r=!0),s&&n&&r)break}if(!s&&!n&&!r)return Promise.resolve(e);const a=[],o=[],A=[];for(let c=0,l=t.length;c<l;c++){const l=t[c];if(s){const t=void 0!==l.POSITION?i.getDependency("accessor",l.POSITION):e.attributes.position;a.push(t)}if(n){const t=void 0!==l.NORMAL?i.getDependency("accessor",l.NORMAL):e.attributes.normal;o.push(t)}if(r){const t=void 0!==l.COLOR_0?i.getDependency("accessor",l.COLOR_0):e.attributes.color;A.push(t)}}return Promise.all([Promise.all(a),Promise.all(o),Promise.all(A)]).then((function(t){const i=t[0],a=t[1],o=t[2];return s&&(e.morphAttributes.position=i),n&&(e.morphAttributes.normal=a),r&&(e.morphAttributes.color=o),e.morphTargetsRelative=!0,e}))}(e,t.targets,i):e}))}class Ot{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e<this.pool;e++)if(!(this.workerStatus&1<<e))return e;return-1}_onMessage(e,t){const i=this.workersResolve[e];if(i&&i(t),this.queue.length){const{resolve:t,msg:i,transfer:s}=this.queue.shift();this.workersResolve[e]=t,this.workers[e].postMessage(i,s)}else this.workerStatus^=1<<e}setWorkerCreator(e){this.workerCreator=e}setWorkerLimit(e){this.pool=e}postMessage(e,t){return new Promise((i=>{const s=this._getIdleWorker();-1!==s?(this._initWorker(s),this.workerStatus|=1<<s,this.workersResolve[s]=i,this.workers[s].postMessage(e,t)):this.queue.push({resolve:i,msg:e,transfer:t})}))}dispose(){this.workers.forEach((e=>e.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const Nt=1000066e3;class Ht{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 qt{constructor(e,t,i,s){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(e.buffer,e.byteOffset+t,i),this._littleEndian=s,this._offset=0}_nextUint8(){const e=this._dataView.getUint8(this._offset);return this._offset+=1,e}_nextUint16(){const e=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,e}_nextUint32(){const e=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint64(){const e=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,e}_nextInt32(){const e=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint8Array(e){const t=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._offset,e);return this._offset+=e,t}_skip(e){return this._offset+=e,this}_scan(e,t){void 0===t&&(t=0);const i=this._offset;let s=0;for(;this._dataView.getUint8(this._offset)!==t&&s<e;)s++,this._offset++;return s<e&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+i,s)}}new Uint8Array([0]);const jt=[171,75,84,88,32,50,48,187,13,10,26,10];function zt(e){return(new TextDecoder).decode(e)}var Kt=i(8834).lW;let Vt,Jt,Yt;const Wt={env:{emscripten_notify_memory_growth:function(e){Yt=new Uint8Array(Jt.exports.memory.buffer)}}};class $t{init(){return Vt||(Vt="undefined"!=typeof fetch?fetch("data:application/wasm;base64,"+Xt).then((e=>e.arrayBuffer())).then((e=>WebAssembly.instantiate(e,Wt))).then(this._init):WebAssembly.instantiate(Kt.from(Xt,"base64"),Wt).then(this._init),Vt)}_init(e){Jt=e.instance,Wt.env.emscripten_notify_memory_growth(0)}decode(e,t=0){if(!Jt)throw new Error("ZSTDDecoder: Await .init() before decoding.");const i=e.byteLength,s=Jt.exports.malloc(i);Yt.set(e,s),t=t||Number(Jt.exports.ZSTD_findDecompressedSize(s,i));const n=Jt.exports.malloc(t),r=Jt.exports.ZSTD_decompress(n,t,s,i),a=Yt.slice(n,n+r);return Jt.exports.free(s),Jt.exports.free(n),a}}const Xt="
vendor: 19,971 bytes, line 407
407AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZ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IAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkE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ohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAMLIAEgBGovAACtQoACfAwCCyABIARqKAAArQwBCyABIARqKQAACyEHIAAgBTYCICAAIAI2AhwgACAHNwMAQQAhAyAAQQA2AhQgACAHIAgg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kIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWo
vendor: 19,007 bytes, line 407
407hCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAg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AQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIg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AAoAsTgASABKAIEIAEoAghqRzYCnOIBCyAAECtBABADIAFFckUEQCAAIAEQWwsL0QIBB38jAEEQayIGJAAgBiAENgIIIAYgAzYCDCAFBEAgBSgCBCEKIAUoAgghCQsgASEIAkACQANAIAAoAuzhARAWIQsCQANAIAQgC0kNASADKAAAQXBxQdDUtMIBRgRAIAMgBBAiIgcQAw0EIAQgB2shBCADIAdqIQMMAQsLIAYgAzYCDCAGIAQ2AggCQCAFBEAgACAFEE5BACEHQQAQA0UNAQwFCyAAIAogCRBNIgcQAw0ECyAAIAgQUCAMQQFHQQAgACAIIAIgBkEMaiAGQQhqEEwiByIDa0EAIAMQAxtBCkdyRQRAQbh/IQcMBAsgBxADDQMgAiAHayECIAcgCGohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACED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h4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",
vendor: 8,413 bytes, line 407
407Zt="display-p3",ei=(x.j17,x.l6D,x.l6D,new WeakMap);let ti,ii=0;class si extends x.aNw{constructor(e){super(e),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new Ot,this.workerSourceURL="",this.workerConfig=null,"undefined"!==typeof MSC_TRANSCODER&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(e){return this.transcoderPath=e,this}setWorkerLimit(e){return this.workerPool.setWorkerLimit(e),this}async detectSupportAsync(e){return this.workerConfig={astcSupported:await e.hasFeatureAsync("texture-compression-astc"),astcHDRSupported:!1,etc1Supported:await e.hasFeatureAsync("texture-compression-etc1"),etc2Supported:await e.hasFeatureAsync("texture-compression-etc2"),dxtSupported:await e.hasFeatureAsync("texture-compression-bc"),bptcSupported:await e.hasFeatureAsync("texture-compression-bptc"),pvrtcSupported:await e.hasFeatureAsync("texture-compression-pvrtc")},this}detectSupport(e){return!0===e.isWebGPURenderer?this.workerConfig={astcSupported:e.hasFeature("texture-compression-astc"),astcHDRSupported:!1,etc1Supported:e.hasFeature("texture-compression-etc1"),etc2Supported:e.hasFeature("texture-compression-etc2"),dxtSupported:e.hasFeature("texture-compression-bc"),bptcSupported:e.hasFeature("texture-compression-bptc"),pvrtcSupported:e.hasFeature("texture-compression-pvrtc")}:this.workerConfig={astcSupported:e.extensions.has("WEBGL_compressed_texture_astc"),astcHDRSupported:e.extensions.has("WEBGL_compressed_texture_astc")&&e.extensions.get("WEBGL_compressed_texture_astc").getSupportedProfiles().includes("hdr"),etc1Supported:e.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:e.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:e.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:e.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:e.extensions.has("WEBGL_compressed_texture_pvrtc")||e.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},this}init(){if(!this.transcoderPending){const e=new x.hH6(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),i=new x.hH6(this.manager);i.setPath(this.transcoderPath),i.setResponseType("arraybuffer"),i.setWithCredentials(this.withCredentials);const s=i.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([t,s]).then((([e,t])=>{const i=si.BasisWorker.toString(),s=["/* constants */","let _EngineFormat = "+JSON.stringify(si.EngineFormat),"let _EngineType = "+JSON.stringify(si.EngineType),"let _TranscoderFormat = "+JSON.stringify(si.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(si.BasisFormat),"/* basis_transcoder.js */",e,"/* worker */",i.substring(i.indexOf("{")+1,i.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([s])),this.transcoderBinary=t,this.workerPool.setWorkerCreator((()=>{const e=new Worker(this.workerSourceURL),t=this.transcoderBinary.slice(0);return e.postMessage({type:"init",config:this.workerConfig,transcoderBinary:t},[t]),e}))})),ii>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),ii++}return this.transcoderPending}load(e,t,i,s){if(null===this.workerConfig)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const n=new x.hH6(this.manager);n.setResponseType("arraybuffer"),n.setWithCredentials(this.withCredentials),n.load(e,(e=>{this.parse(e,t,s)}),i,s)}parse(e,t,i){if(null===this.workerConfig)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");if(ei.has(e)){return ei.get(e).promise.then(t).catch(i)}this._createTexture(e).then((e=>t?t(e):null)).catch(i)}_createTextureFrom(e,t){const{type:i,error:s,data:{faces:n,width:r,height:a,format:o,type:A,dfdFlags:c}}=e;if("error"===i)return Promise.reject(s);let l;if(6===t.faceCount)l=new x.qVC(n,o,A);else{const e=n[0].mipmaps;l=t.layerCount>1?new x.Z_g(e,r,a,t.layerCount,o,A):new x.EB7(e,r,a,o,A)}return l.minFilter=1===n[0].mipmaps.length?x.wem:x.D1R,l.magFilter=x.wem,l.generateMipmaps=!1,l.needsUpdate=!0,l.colorSpace=oi(t),l.premultiplyAlpha=!!(1&c),l}async _createTexture(e,t={}){const i=function(e){const t=new Uint8Array(e.buffer,e.byteOffset,jt.length);if(t[0]!==jt[0]||t[1]!==jt[1]||t[2]!==jt[2]||t[3]!==jt[3]||t[4]!==jt[4]||t[5]!==jt[5]||t[6]!==jt[6]||t[7]!==jt[7]||t[8]!==jt[8]||t[9]!==jt[9]||t[10]!==jt[10]||t[11]!==jt[11])throw new Error("Missing KTX 2.0 identifier.");const i=new Ht,s=17*Uint32Array.BYTES_PER_ELEMENT,n=new qt(e,jt.length,s,!0);i.vkFormat=n._nextUint32(),i.typeSize=n._nextUint32(),i.pixelWidth=n._nextUint32(),i.pixelHeight=n._nextUint32(),i.pixelDepth=n._nextUint32(),i.layerCount=n._nextUint32(),i.faceCount=n._nextUint32();const r=n._nextUint32();i.supercompressionScheme=n._nextUint32();const a=n._nextUint32(),o=n._nextUint32(),A=n._nextUint32(),c=n._nextUint32(),l=n._nextUint64(),h=n._nextUint64(),u=new qt(e,jt.length+s,3*r*8,!0);for(let k=0;k<r;k++)i.levels.push({levelData:new Uint8Array(e.buffer,e.byteOffset+u._nextUint64(),u._nextUint64()),uncompressedByteLength:u._nextUint64()});const g=new qt(e,a,o,!0),d={vendorId:g._skip(4)._nextUint16(),descriptorType:g._nextUint16(),versionNumber:g._nextUint16(),descriptorBlockSize:g._nextUint16(),colorModel:g._nextUint8(),colorPrimaries:g._nextUint8(),transferFunction:g._nextUint8(),flags:g._nextUint8(),texelBlockDimension:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],bytesPlane:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],samples:[]},p=(d.descriptorBlockSize/4-6)/4;for(let k=0;k<p;k++){const e={bitOffset:g._nextUint16(),bitLength:g._nextUint8(),channelType:g._nextUint8(),samplePosition:[g._nextUint8(),g._nextUint8(),g._nextUint8(),g._nextUint8()],sampleLower:-1/0,sampleUpper:1/0};64&e.channelType?(e.sampleLower=g._nextInt32(),e.sampleUpper=g._nextInt32()):(e.sampleLower=g._nextUint32(),e.sampleUpper=g._nextUint32()),d.samples[k]=e}i.dataFormatDescriptor.length=0,i.dataFormatDescriptor.push(d);const m=new qt(e,A,c,!0);for(;m._offset<c;){const e=m._nextUint32(),t=m._scan(e),s=zt(t);if(i.keyValue[s]=m._nextUint8Array(e-t.byteLength-1),s.match(/^ktx/i)){const e=zt(i.keyValue[s]);i.keyValue[s]=e.substring(0,e.lastIndexOf("\0"))}m._skip(e%4?4-e%4:0)}if(h<=0)return i;const f=new qt(e,l,h,!0),b=f._nextUint16(),I=f._nextUint16(),C=f._nextUint32(),E=f._nextUint32(),y=f._nextUint32(),B=f._nextUint32(),w=[];for(let k=0;k<r;k++)w.push({imageFlags:f._nextUint32(),rgbSliceByteOffset:f._nextUint32(),rgbSliceByteLength:f._nextUint32(),alphaSliceByteOffset:f._nextUint32(),alphaSliceByteLength:f._nextUint32()});const v=l+f._offset,Q=v+C,x=Q+E,S=x+y,M=new Uint8Array(e.buffer,e.byteOffset+v,C),R=new Uint8Array(e.buffer,e.byteOffset+Q,E),T=new Uint8Array(e.buffer,e.byteOffset+x,y),D=new Uint8Array(e.buffer,e.byteOffset+S,B);return i.globalData={endpointCount:b,selectorCount:I,imageDescs:w,endpointsData:M,selectorsData:R,tablesData:T,extendedData:D},i}(new Uint8Array(e)),s=i.vkFormat===Nt&&167===i.dataFormatDescriptor[0].colorModel;if(!(0===i.vkFormat||s&&!this.workerConfig.astcHDRSupported))return async function(e){const{vkFormat:t}=e;if(void 0===ri[t])throw new Error("THREE.KTX2Loader: Unsupported vkFormat.");let i;2===e.supercompressionScheme&&(ti||(ti=new Promise((async e=>{const t=new $t;await t.init(),e(t)}))),i=await ti);const s=[];for(let r=0;r<e.levels.length;r++){const n=Math.max(1,e.pixelWidth>>r),a=Math.max(1,e.pixelHeight>>r),o=e.pixelDepth?Math.max(1,e.pixelDepth>>r):0,A=e.levels[r];let c,l;if(0===e.supercompressionScheme)c=A.levelData;else{if(2!==e.supercompressionScheme)throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");c=i.decode(A.levelData,A.uncompressedByteLength)}l=ai[t]===x.VzW?new Float32Array(c.buffer,c.byteOffset,c.byteLength/Float32Array.BYTES_PER_ELEMENT):ai[t]===x.cLu?new Uint16Array(c.buffer,c.byteOffset,c.byteLength/Uint16Array.BYTES_PER_ELEMENT):c,s.push({data:l,width:n,height:a,depth:o})}let n;if(ni.has(ri[t]))n=0===e.pixelDepth?new x.IEO(s[0].data,e.pixelWidth,e.pixelHeight):new x.JUT(s[0].data,e.pixelWidth,e.pixelHeight,e.pixelDepth);else{if(e.pixelDepth>
vendor: 6,392 bytes, line 407
4070)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");n=new x.EB7(s,e.pixelWidth,e.pixelHeight),n.minFilter=1===s.length?x.wem:x.D1R,n.magFilter=x.wem}return n.mipmaps=s,n.type=ai[t],n.format=ri[t],n.colorSpace=oi(e),n.needsUpdate=!0,Promise.resolve(n)}(i);const n=t,r=this.init().then((()=>this.workerPool.postMessage({type:"transcode",buffer:e,taskConfig:n},[e]))).then((e=>this._createTextureFrom(e.data,i)));return ei.set(e,{promise:r}),r}dispose(){return this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),ii--,this}}si.BasisFormat={ETC1S:0,UASTC:1,UASTC_HDR:2},si.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,BC6H:22,RGB_HALF:24,RGBA_HALF:25},si.EngineFormat={RGBAFormat:x.wk1,RGBA_ASTC_4x4_Format:x.ptH,RGB_BPTC_UNSIGNED_Format:x.QO2,RGBA_BPTC_Format:x.bsb,RGBA_ETC2_EAC_Format:x.ekQ,RGBA_PVRTC_4BPPV1_Format:x.eaV,RGBA_S3TC_DXT5_Format:x.ILR,RGB_ETC1_Format:x.fto,RGB_ETC2_Format:x.l0P,RGB_PVRTC_4BPPV1_Format:x._AM,RGBA_S3TC_DXT1_Format:x.BFQ},si.EngineType={UnsignedByteType:x.ywz,HalfFloatType:x.cLu,FloatType:x.VzW},si.BasisWorker=function(){let e,t,i;const s=_EngineFormat,n=_EngineType,r=_TranscoderFormat,a=_BasisFormat;self.addEventListener("message",(function(s){const r=s.data;switch(r.type){case"init":e=r.config,o=r.transcoderBinary,t=new Promise((e=>{i={wasmBinary:o,onRuntimeInitialized:e},BASIS(i)})).then((()=>{i.initializeBasis(),void 0===i.KTX2File&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")}));break;case"transcode":t.then((()=>{try{const{faces:t,buffers:s,width:o,height:h,hasAlpha:u,format:g,type:d,dfdFlags:p}=function(t){const s=new i.KTX2File(new Uint8Array(t));function r(){s.close(),s.delete()}if(!s.isValid())throw r(),new Error("THREE.KTX2Loader:\tInvalid or unsupported .ktx2 file");let o;if(s.isUASTC())o=a.UASTC;else if(s.isETC1S())o=a.ETC1S;else{if(!s.isHDR())throw new Error("THREE.KTX2Loader: Unknown Basis encoding");o=a.UASTC_HDR}const h=s.getWidth(),u=s.getHeight(),g=s.getLayers()||1,d=s.getLevels(),p=s.getFaces(),m=s.getHasAlpha(),f=s.getDFDFlags(),{transcoderFormat:b,engineFormat:I,engineType:C}=function(t,i,s,n){const r=A[t];for(let a=0;a<r.length;a++){const o=r[a];if(o.if&&!e[o.if])continue;if(!o.basisFormat.includes(t))continue;if(n&&o.transcoderFormat.length<2)continue;if(o.needsPowerOfTwo&&(!c(i)||!c(s)))continue;return{transcoderFormat:o.transcoderFormat[n?1:0],engineFormat:o.engineFormat[n?1:0],engineType:o.engineType[0]}}throw new Error("THREE.KTX2Loader: Failed to identify transcoding target.")}(o,h,u,m);if(!h||!u||!d)throw r(),new Error("THREE.KTX2Loader:\tInvalid texture");if(!s.startTranscoding())throw r(),new Error("THREE.KTX2Loader: .startTranscoding failed");const E=[],y=[];for(let e=0;e<p;e++){const t=[];for(let i=0;i<d;i++){const a=[];let o,A;for(let t=0;t<g;t++){const c=s.getImageLevelInfo(i,t,e);0!==e||0!==i||0!==t||c.origWidth%4===0&&c.origHeight%4===0||console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."),d>1?(o=c.origWidth,A=c.origHeight):(o=c.width,A=c.height);let l=new Uint8Array(s.getImageTranscodedSizeInBytes(i,t,0,b));const h=s.transcodeImage(l,i,t,e,b,0,-1,-1);if(C===n.HalfFloatType&&(l=new Uint16Array(l.buffer,l.byteOffset,l.byteLength/Uint16Array.BYTES_PER_ELEMENT)),!h)throw r(),new Error("THREE.KTX2Loader: .transcodeImage failed.");a.push(l)}const c=l(a);t.push({data:c,width:o,height:A}),y.push(c.buffer)}E.push({mipmaps:t,width:h,height:u,format:I,type:C})}return r(),{faces:E,buffers:y,width:h,height:u,hasAlpha:m,dfdFlags:f,format:I,type:C}}(r.buffer);self.postMessage({type:"transcode",id:r.id,data:{faces:t,width:o,height:h,hasAlpha:u,format:g,type:d,dfdFlags:p}},s)}catch(t){console.error(t),self.postMessage({type:"error",id:r.id,error:t.message})}}))}var o}));const o=[{if:"astcSupported",basisFormat:[a.UASTC],transcoderFormat:[r.ASTC_4x4,r.ASTC_4x4],engineFormat:[s.RGBA_ASTC_4x4_Format,s.RGBA_ASTC_4x4_Format],engineType:[n.UnsignedByteType],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.BC7_M5,r.BC7_M5],engineFormat:[s.RGBA_BPTC_Format,s.RGBA_BPTC_Format],engineType:[n.UnsignedByteType],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.BC1,r.BC3],engineFormat:[s.RGBA_S3TC_DXT1_Format,s.RGBA_S3TC_DXT5_Format],engineType:[n.UnsignedByteType],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.ETC1,r.ETC2],engineFormat:[s.RGB_ETC2_Format,s.RGBA_ETC2_EAC_Format],engineType:[n.UnsignedByteType],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.ETC1],engineFormat:[s.RGB_ETC1_Format],engineType:[n.UnsignedByteType],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.PVRTC1_4_RGB,r.PVRTC1_4_RGBA],engineFormat:[s.RGB_PVRTC_4BPPV1_Format,s.RGBA_PVRTC_4BPPV1_Format],engineType:[n.UnsignedByteType],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0},{if:"bptcSupported",basisFormat:[a.UASTC_HDR],transcoderFormat:[r.BC6H],engineFormat:[s.RGB_BPTC_UNSIGNED_Format],engineType:[n.HalfFloatType],priorityHDR:1,needsPowerOfTwo:!1},{basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[r.RGBA32,r.RGBA32],engineFormat:[s.RGBAFormat,s.RGBAFormat],engineType:[n.UnsignedByteType,n.UnsignedByteType],priorityETC1S:100,priorityUASTC:100,needsPowerOfTwo:!1},{basisFormat:[a.UASTC_HDR],transcoderFormat:[r.RGBA_HALF],engineFormat:[s.RGBAFormat],engineType:[n.HalfFloatType],priorityHDR:100,needsPowerOfTwo:!1}],A={[a.ETC1S]:o.filter((e=>e.basisFormat.includes(a.ETC1S))).sort(((e,t)=>e.priorityUASTC-t.priorityUASTC)),[a.UASTC]:o.filter((e=>e.basisFormat.includes(a.UASTC))).sort(((e,t)=>e.priorityUASTC-t.priorityUASTC)),[a.UASTC_HDR]:o.filter((e=>e.basisFormat.includes(a.UASTC_HDR))).sort(((e,t)=>e.priorityHDR-t.priorityHDR))};function c(e){return e<=2||0===(e&e-1)&&0!==e}function l(e){if(1===e.length)return e[0];let t=0;for(let n=0;n<e.length;n++){t+=e[n].byteLength}const i=new Uint8Array(t);let s=0;for(let n=0;n<e.length;
vendor: 11,569 bytes, line 407
407n++){const t=e[n];i.set(t,s),s+=t.byteLength}return i}};const ni=new Set([x.wk1,x.av9,x.hEm]),ri={109:x.wk1,97:x.wk1,37:x.wk1,43:x.wk1,103:x.av9,83:x.av9,16:x.av9,22:x.av9,100:x.hEm,76:x.hEm,15:x.hEm,9:x.hEm,[Nt]:x.ptH,166:x.Djp,165:x.Djp},ai={109:x.VzW,97:x.cLu,37:x.ywz,43:x.ywz,103:x.VzW,83:x.cLu,16:x.ywz,22:x.ywz,100:x.VzW,76:x.cLu,15:x.ywz,9:x.ywz,[Nt]:x.cLu,166:x.ywz,165:x.ywz};function oi(e){const t=e.dataFormatDescriptor[0];return 1===t.colorPrimaries?2===t.transferFunction?x.KI_:x.GUF:10===t.colorPrimaries?2===t.transferFunction?Zt:"display-p3-linear":(0===t.colorPrimaries||console.warn(`THREE.KTX2Loader: Unsupported color primaries, "${t.colorPrimaries}"`),x.aCh)}var Ai,ci;const li=Symbol("retainerCount"),hi=Symbol("recentlyUsed"),ui=Symbol("evict"),gi=Symbol("evictionThreshold"),di=Symbol("cache");class pi{constructor(e,t=5){this[Ai]=new Map,this[ci]=[],this[di]=e,this[gi]=t}set evictionThreshold(e){this[gi]=e,this[ui]()}get evictionThreshold(){return this[gi]}get cache(){return this[di]}retainerCount(e){return this[li].get(e)||0}reset(){this[li].clear(),this[hi]=[]}retain(e){this[li].has(e)||this[li].set(e,0),this[li].set(e,this[li].get(e)+1);const t=this[hi].indexOf(e);-1!==t&&this[hi].splice(t,1),this[hi].unshift(e),this[ui]()}release(e){this[li].has(e)&&this[li].set(e,Math.max(this[li].get(e)-1,0)),this[ui]()}[(Ai=li,ci=hi,ui)](){if(!(this[hi].length<this[gi]))for(let e=this[hi].length-1;e>=this[gi];--e){const t=this[hi][e];0===this[li].get(t)&&(this[di].delete(t),this[hi].splice(e,1))}}}const mi=e=>{const t=new Map;for(const i of e.mappings)for(const e of i.variants)t.set(e,{material:null,gltfMaterialIndex:i.material});return t};class fi{constructor(e){this.parser=e,this.name="KHR_materials_variants"}afterRoot(e){const t=this.parser,i=t.json;if(void 0===i.extensions||void 0===i.extensions[this.name])return null;const s=(e=>{const t=[],i=new Set;for(const s of e){let e=s,n=0;for(;i.has(e);)e=s+"."+ ++n;i.add(e),t.push(e)}return t})((i.extensions[this.name].variants||[]).map((e=>e.name)));for(const n of e.scenes)n.traverse((e=>{const s=e;if(!s.material)return;const n=t.associations.get(s);if(null==n||null==n.meshes||null==n.primitives)return;const r=i.meshes[n.meshes].primitives[n.primitives].extensions;r&&r[this.name]&&(s.userData.variantMaterials=mi(r[this.name]))}));return e.userData.variants=s,Promise.resolve()}}var bi,Ii;x.xEZ.DEFAULT_ANISOTROPY=4;const Ci=new Map,Ei=new Map;let yi;const Bi=new Pe;let wi;const vi=new si;let Qi,xi;const Si=Symbol("loader"),Mi=Symbol("evictionPolicy"),Ri=Symbol("GLTFInstance");class Ti extends x.pBf{static setDRACODecoderLocation(e){yi=e,Bi.setDecoderPath(e)}static getDRACODecoderLocation(){return yi}static setKTX2TranscoderLocation(e){wi=e,vi.setTranscoderPath(e)}static getKTX2TranscoderLocation(){return wi}static setMeshoptDecoderLocation(e){var t;Qi!==e&&(Qi=e,xi=(t=e,new Promise(((e,i)=>{const s=document.createElement("script");document.body.appendChild(s),s.onload=e,s.onerror=i,s.async=!0,s.src=t}))).then((()=>_e.ready)).then((()=>_e)))}static getMeshoptDecoderLocation(){return Qi}static initializeKTX2Loader(e){vi.detectSupport(e)}static get cache(){return Ci}static clearCache(){Ci.forEach(((e,t)=>{this.delete(t)})),this[Mi].reset()}static has(e){return Ci.has(e)}static async delete(e){if(!this.has(e))return;const t=Ci.get(e);Ei.delete(e),Ci.delete(e);(await t).dispose()}static hasFinishedLoading(e){return!!Ei.get(e)}constructor(e){super(),this[Ii]=(new He).register((e=>new fi(e))),this[Ri]=e,this[Si].setDRACOLoader(Bi),this[Si].setKTX2Loader(vi)}get[(bi=Mi,Ii=Si,Mi)](){return this.constructor[Mi]}async preload(e,t,i=(()=>{})){if(this[Si].setWithCredentials(t.withCredentials),this.dispatchEvent({type:"preload",element:t,src:e}),!Ci.has(e)){null!=xi&&this[Si].setMeshoptDecoder(await xi);const t=((e,t,i=(()=>{}))=>{const s=e=>{const t=e.loaded/e.total;i(Math.max(0,Math.min(1,isFinite(t)?t:1)))};return new Promise(((i,n)=>{t.load(e,i,s,n)}))})(e,this[Si],(e=>{i(.8*e)})),s=this[Ri],n=t.then((e=>s.prepare(e))).then((e=>(i(.9),new s(e)))).catch((e=>(console.error(e),new s)));Ci.set(e,n)}await Ci.get(e),Ei.set(e,!0),i&&i(1)}async load(e,t,i=(()=>{})){await this.preload(e,t,i);const s=await Ci.get(e),n=await s.clone();return this[Mi].retain(e),n.dispose=()=>{this[Mi].release(e)},n}}Ti[bi]=new pi(Ti);class Di extends x.Tme{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new x.FM8(.5,.5),this.addEventListener("removed",(function(){this.traverse((function(e){e.element instanceof e.element.ownerDocument.defaultView.Element&&null!==e.element.parentNode&&e.element.remove()}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}}const ki=new x.Pa4,Fi=new x.yGw,Li=new x.yGw,Ui=new x.Pa4,_i=new x.Pa4;class Gi{constructor(e={}){const t=this;let i,s,n,r;const a={objects:new WeakMap},o=void 0!==e.element?e.element:document.createElement("div");function A(e){e.isCSS2DObject&&(e.element.style.display="none");for(let t=0,i=e.children.length;t<i;t++)A(e.children[t])}function c(e,i,s){if(!1!==e.visible){if(e.isCSS2DObject){ki.setFromMatrixPosition(e.matrixWorld),ki.applyMatrix4(Li);const A=ki.z>=-1&&ki.z<=1&&!0===e.layers.test(s.layers),c=e.element;c.style.display=!0===A?"":"none",!0===A&&(e.onBeforeRender(t,i,s),c.style.transform="translate("+-100*e.center.x+"%,"+-100*e.center.y+"%)translate("+(ki.x*n+n)+"px,"+(-ki.y*r+r)+"px)",c.parentNode!==o&&o.appendChild(c),e.onAfterRender(t,i,s));const h={distanceToCameraSquared:l(s,e)};a.objects.set(e,h)}for(let t=0,n=e.children.length;t<n;t++)c(e.children[t],i,s)}else A(e)}function l(e,t){return Ui.setFromMatrixPosition(e.matrixWorld),_i.setFromMatrixPosition(t.matrixWorld),Ui.distanceToSquared(_i)}o.style.overflow="hidden",this.domElement=o,this.getSize=function(){return{width:i,height:s}},this.render=function(e,t){!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),Fi.copy(t.matrixWorldInverse),Li.multiplyMatrices(t.projectionMatrix,Fi),c(e,e,t),function(e){const t=function(e){const t=[];return e.traverseVisible((function(e){e.isCSS2DObject&&t.push(e)})),t}(e).sort((function(e,t){if(e.renderOrder!==t.renderOrder)return t.renderOrder-e.renderOrder;return a.objects.get(e).distanceToCameraSquared-a.objects.get(t).distanceToCameraSquared})),i=t.length;for(let s=0,n=t.length;s<n;s++)t[s].element.style.zIndex=i-s}(e)},this.setSize=function(e,t){i=e,s=t,n=i/2,r=s/2,o.style.width=e+"px",o.style.height=t+"px"}}}function Pi(e,t,i){let s=i;const n=new x.Pa4;return e.updateWorldMatrix(!0,!0),e.traverseVisible((e=>{const{geometry:i}=e;if(void 0!==i){const{position:r}=i.attributes;if(void 0!==r)for(let i=0,a=r.count;i<a;i++)e.isMesh?e.getVertexPosition(i,n):n.fromBufferAttribute(r,i),e.isSkinnedMesh||n.applyMatrix4(e.matrixWorld),s=t(s,n)}})),s}const Oi={POSITION:["byte","byte normalized","unsigned byte","unsigned byte normalized","short","short normalized","unsigned short","unsigned short normalized"],NORMAL:["byte normalized","short normalized"],TANGENT:["byte normalized","short normalized"],TEXCOORD:["byte","byte normalized","unsigned byte","short","short normalized","unsigned short"]};class Ni{constructor(){this.textureUtils=null,this.pluginCallbacks=[],this.register((function(e){return new Cs(e)})),this.register((function(e){return new Es(e)})),this.register((function(e){return new vs(e)})),this.register((function(e){return new Qs(e)})),this.register((function(e){return new xs(e)})),this.register((function(e){return new Ss(e)})),this.register((function(e){return new ys(e)})),this.register((function(e){return new Bs(e)})),this.register((function(e){return new ws(e)})),this.register((function(e){return new Ms(e)})),this.register((function(e){return new Rs(e)})),this.register((function(e){return new Ts(e)})),this.register((function(e){return new Ds(e)})),this.register((function(e){return new ks(e)}))}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}setTextureUtils(e){return this.textureUtils=e,this}parse(e,t,i,s){const n=new Is,r=[];for(let a=0,o=this.pluginCallbacks.length;a<o;a++)r.push(this.pluginCallbacks[a](n));n.setPlugins(r),n.setTextureUtils(this.textureUtils),n.writeAsync(e,t,s).catch(i)}parseAsync(e,t){const i=this;return new Promise((function(s,n){i.parse(e,s,n,t)}))}}const Hi=0,qi=1,ji=2,zi=3,Ki=4,Vi=5120,Ji=5121,Yi=5122,Wi=5123,$i=5124,Xi=5125,Zi=5126,es=34962,ts=34963,is=9728,ss=9729,ns=9984,rs=9985,as=9986,os=9987,As=33071,cs=33648,ls=10497,hs={};hs[x.TyD]=is,hs[x.YLQ]=ns,hs[x.aH4]=as,hs[x.wem]=ss,hs[x.qyh]=rs,hs[x.D1R]=os,hs[x.uWy]=As,hs[x.rpg]=ls,hs[x.OoA]=cs;const us={scale:"scale",position:"translation",quaternion:"rotation",morphTargetInfluences:"weights"},gs=new x.Ilk;function ds(e,t){return e.length===t.length&&e.every((function(e,i){return e===t[i]}))}function ps(e){return 4*Math.ceil(e/4)}function ms(e,t=0){const i=ps(e.byteLength);if(i!==e.byteLength){const s=new Uint8Array(i);if(s.set(new Uint8Array(e)),0!==t)for(let n=e.byteLength;n<i;n++)s[n]=t;return s.buffer}return e}function fs(){return"undefined"===typeof document&&"undefined"!==typeof OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas")}function bs(e,t){if(void 0!==e.toBlob)return new Promise((i=>e.toBlob(i,t)));let i;return"image/jpeg"===t?i=.92:"image/webp"===t&&(i=.8),e.convertToBlob({type:t,quality:i})}class Is{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter r"+x.UZH}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map},this.textureUtils=null}setPlugins(e){this.plugins=e}setTextureUtils(e){this.textureUtils=e}async writeAsync(e,t,i={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},i),this.options.animations.length>0&&(this.options.trs=!0),await this.processInputAsync(e),await Promise.all(this.pending);const s=this,n=s.buffers,r=s.json;i=s.options;const a=s.extensionsUsed,o=s.extensionsRequired,A=new Blob(n,{type:"application/octet-stream"}),c=Object.keys(a),l=Object.keys(o);if(c.length>0&&(r.extensionsUsed=c),l.length>0&&(r.extensionsRequired=l),r.buffers&&r.buffers.length>0&&(r.buffers[0].byteLength=A.size),!0===i.binary){const e=new FileReader;e.readAsArrayBuffer(A),e.onloadend=function(){const i=ms(e.result),s=new DataView(new ArrayBuffer(8));s.setUint32(0,i.byteLength,!0),s.setUint32(4,5130562,!0);const n=ms((a=JSON.stringify(r),(new TextEncoder).encode(a).buffer),32);var a;const o=new DataView(new ArrayBuffer(8));o.setUint32(0,n.byteLength,!0),o.setUint32(4,1313821514,!0);const A=new ArrayBuffer(12),c=new DataView(A);c.setUint32(0,1179937895,!0),c.setUint32(4,2,!0);const l=12+o.byteLength+n.byteLength+s.byteLength+i.byteLength;c.setUint32(8,l,!0);const h=new Blob([A,o,n,s,i],{type:"application/octet-stream"}),u=new FileReader;u.readAsArrayBuffer(h),u.onloadend=function(){t(u.result)}}}else if(r.buffers&&r.buffers.length>0){const e=new FileReader;
vendor: 6,338 bytes, line 407
407e.readAsDataURL(A),e.onloadend=function(){const i=e.result;r.buffers[0].uri=i,t(r)}}else t(r)}serializeUserData(e,t){if(0===Object.keys(e.userData).length)return;const i=this.options,s=this.extensionsUsed;try{const n=JSON.parse(JSON.stringify(e.userData));if(i.includeCustomExtensions&&n.gltfExtensions){void 0===t.extensions&&(t.extensions={});for(const e in n.gltfExtensions)t.extensions[e]=n.gltfExtensions[e],s[e]=!0;delete n.gltfExtensions}Object.keys(n).length>0&&(t.extras=n)}catch(n){console.warn("THREE.GLTFExporter: userData of '"+e.name+"' won't be serialized because of JSON.stringify error - "+n.message)}}getUID(e,t=!1){if(!1===this.uids.has(e)){const t=new Map;t.set(!0,this.uid++),t.set(!1,this.uid++),this.uids.set(e,t)}return this.uids.get(e).get(t)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;const t=new x.Pa4;for(let i=0,s=e.count;i<s;i++)if(Math.abs(t.fromBufferAttribute(e,i).length()-1)>5e-4)return!1;return!0}createNormalizedNormalAttribute(e){const t=this.cache;if(t.attributesNormalized.has(e))return t.attributesNormalized.get(e);const i=e.clone(),s=new x.Pa4;for(let n=0,r=i.count;n<r;n++)s.fromBufferAttribute(i,n),0===s.x&&0===s.y&&0===s.z?s.setX(1):s.normalize(),i.setXYZ(n,s.x,s.y,s.z);return t.attributesNormalized.set(e,i),i}applyTextureTransform(e,t){let i=!1;const s={};0===t.offset.x&&0===t.offset.y||(s.offset=t.offset.toArray(),i=!0),0!==t.rotation&&(s.rotation=t.rotation,i=!0),1===t.repeat.x&&1===t.repeat.y||(s.scale=t.repeat.toArray(),i=!0),i&&(e.extensions=e.extensions||{},e.extensions.KHR_texture_transform=s,this.extensionsUsed.KHR_texture_transform=!0)}async buildMetalRoughTextureAsync(e,t){if(e===t)return e;function i(e){return e.colorSpace===x.KI_?function(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}:function(e){return e}}e instanceof x.EB7&&(e=await this.decompressTextureAsync(e)),t instanceof x.EB7&&(t=await this.decompressTextureAsync(t));const s=e?e.image:null,n=t?t.image:null,r=Math.max(s?s.width:0,n?n.width:0),a=Math.max(s?s.height:0,n?n.height:0),o=fs();o.width=r,o.height=a;const A=o.getContext("2d",{willReadFrequently:!0});A.fillStyle="#00ffff",A.fillRect(0,0,r,a);const c=A.getImageData(0,0,r,a);if(s){A.drawImage(s,0,0,r,a);const t=i(e),n=A.getImageData(0,0,r,a).data;for(let e=2;e<n.length;e+=4)c.data[e]=256*t(n[e]/256)}if(n){A.drawImage(n,0,0,r,a);const e=i(t),s=A.getImageData(0,0,r,a).data;for(let t=1;t<s.length;t+=4)c.data[t]=256*e(s[t]/256)}A.putImageData(c,0,0);const l=(e||t).clone();return l.source=new x.Hw6(o),l.colorSpace=x.aCh,l.channel=(e||t).channel,e&&t&&e.channel!==t.channel&&console.warn("THREE.GLTFExporter: UV channels for metalnessMap and roughnessMap textures must match."),console.warn("THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures."),l}async decompressTextureAsync(e,t=1/0){if(null===this.textureUtils)throw new Error("THREE.GLTFExporter: setTextureUtils() must be called to process compressed textures.");return await this.textureUtils.decompress(e,t)}processBuffer(e){const t=this.json,i=this.buffers;return t.buffers||(t.buffers=[{byteLength:0}]),i.push(e),0}processBufferView(e,t,i,s,n){const r=this.json;let a;switch(r.bufferViews||(r.bufferViews=[]),t){case Vi:case Ji:a=1;break;case Yi:case Wi:a=2;break;default:a=4}let o=e.itemSize*a;n===es&&(o=4*Math.ceil(o/4));const A=ps(s*o),c=new DataView(new ArrayBuffer(A));let l=0;for(let u=i;u<i+s;u++){for(let i=0;i<e.itemSize;i++){let s;e.itemSize>4?s=e.array[u*e.itemSize+i]:(0===i?s=e.getX(u):1===i?s=e.getY(u):2===i?s=e.getZ(u):3===i&&(s=e.getW(u)),!0===e.normalized&&(s=x.M8C.normalize(s,e.array))),t===Zi?c.setFloat32(l,s,!0):t===$i?c.setInt32(l,s,!0):t===Xi?c.setUint32(l,s,!0):t===Yi?c.setInt16(l,s,!0):t===Wi?c.setUint16(l,s,!0):t===Vi?c.setInt8(l,s):t===Ji&&c.setUint8(l,s),l+=a}l%o!==0&&(l+=o-l%o)}const h={buffer:this.processBuffer(c.buffer),byteOffset:this.byteOffset,byteLength:A};void 0!==n&&(h.target=n),n===es&&(h.byteStride=o),this.byteOffset+=A,r.bufferViews.push(h);return{id:r.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){const t=this,i=t.json;return i.bufferViews||(i.bufferViews=[]),new Promise((function(s){const n=new FileReader;n.readAsArrayBuffer(e),n.onloadend=function(){const e=ms(n.result),r={buffer:t.processBuffer(e),byteOffset:t.byteOffset,byteLength:e.byteLength};t.byteOffset+=e.byteLength,s(i.bufferViews.push(r)-1)}}))}processAccessor(e,t,i,s){const n=this.json;let r;if(e.array.constructor===Float32Array)r=Zi;else if(e.array.constructor===Int32Array)r=$i;else if(e.array.constructor===Uint32Array)r=Xi;else if(e.array.constructor===Int16Array)r=Yi;else if(e.array.constructor===Uint16Array)r=Wi;else if(e.array.constructor===Int8Array)r=Vi;else{if(e.array.constructor!==Uint8Array)throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type: "+e.array.constructor.name);r=Ji}if(void 0===i&&(i=0),void 0!==s&&s!==1/0||(s=e.count),0===s)return null;const a=function(e,t,i){const s={min:new Array(e.itemSize).fill(Number.POSITIVE_INFINITY),max:new Array(e.itemSize).fill(Number.NEGATIVE_INFINITY)};for(let n=t;n<t+i;n++)for(let t=0;t<e.itemSize;t++){let i;e.itemSize>4?i=e.array[n*e.itemSize+t]:(0===t?i=e.getX(n):1===t?i=e.getY(n):2===t?i=e.getZ(n):3===t&&(i=e.getW(n)),!0===e.normalized&&(i=x.M8C.normalize(i,e.array))),s.min[t]=Math.min(s.min[t],i),s.max[t]=Math.max(s.max[t],i)}return s}(e,i,s);let o;void 0!==t&&(o=e===t.index?ts:es);const A=this.processBufferView(e,r,i,s,o),c={bufferView:A.id,byteOffset:A.byteOffset,componentType:r,count:s,max:a.max,min:a.min,type:{1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"}[e.itemSize]};return!0===e.normalized&&(c.normalized=!0),n.accessors||(n.accessors=[]),n.accessors.push(c)-1}processImage(e,t,i,s="image/png"){if(null!==e){const n=this,r=n.cache,a=n.json,o=n.options,A=n.pending;r.images.has(e)||r.images.set(e,{});const c=r.images.get(e),l=s+":flipY/"+i.toString();if(void 0!==c[l])return c[l];a.images||(a.images=[]);const h={mimeType:s},u=fs();u.width=Math.min(e.width,o.maxTextureSize),u.height=Math.min(e.height,o.maxTextureSize);const g=u.getContext("2d",{willReadFrequently:!0});if(!0===i&&(g.translate(0,u.height),g.scale(1,-1)),void 0!==e.data){t!==x.wk1&&console.error("GLTFExporter: Only RGBAFormat is supported.",t),(e.width>o.maxTextureSize||e.height>
vendor: 4,865 bytes, line 407
407o.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",e);const i=new Uint8ClampedArray(e.height*e.width*4);for(let t=0;t<i.length;t+=4)i[t+0]=e.data[t+0],i[t+1]=e.data[t+1],i[t+2]=e.data[t+2],i[t+3]=e.data[t+3];g.putImageData(new ImageData(i,e.width,e.height),0,0)}else{if(!("undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!==typeof OffscreenCanvas&&e instanceof OffscreenCanvas))throw new Error("THREE.GLTFExporter: Invalid image type. Use HTMLImageElement, HTMLCanvasElement, ImageBitmap or OffscreenCanvas.");g.drawImage(e,0,0,u.width,u.height)}!0===o.binary?A.push(bs(u,s).then((e=>n.processBufferViewImage(e))).then((e=>{h.bufferView=e}))):void 0!==u.toDataURL?h.uri=u.toDataURL(s):A.push(bs(u,s).then((e=>(new FileReader).readAsDataURL(e))).then((e=>{h.uri=e})));const d=a.images.push(h)-1;return c[l]=d,d}throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(e){const t=this.json;t.samplers||(t.samplers=[]);const i={magFilter:hs[e.magFilter],minFilter:hs[e.minFilter],wrapS:hs[e.wrapS],wrapT:hs[e.wrapT]};return t.samplers.push(i)-1}async processTextureAsync(e){const t=this.options,i=this.cache,s=this.json;if(i.textures.has(e))return i.textures.get(e);s.textures||(s.textures=[]),e instanceof x.EB7&&(e=await this.decompressTextureAsync(e,t.maxTextureSize));let n=e.userData.mimeType;"image/webp"===n&&(n="image/png");const r={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,n)};e.name&&(r.name=e.name),await this._invokeAllAsync((async function(t){t.writeTexture&&await t.writeTexture(e,r)}));const a=s.textures.push(r)-1;return i.textures.set(e,a),a}async processMaterialAsync(e){const t=this.cache,i=this.json;if(t.materials.has(e))return t.materials.get(e);if(e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;i.materials||(i.materials=[]);const s={pbrMetallicRoughness:{}};!0!==e.isMeshStandardMaterial&&!0!==e.isMeshBasicMaterial&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");const n=e.color.toArray().concat([e.opacity]);if(ds(n,[1,1,1,1])||(s.pbrMetallicRoughness.baseColorFactor=n),e.isMeshStandardMaterial?(s.pbrMetallicRoughness.metallicFactor=e.metalness,s.pbrMetallicRoughness.roughnessFactor=e.roughness):(s.pbrMetallicRoughness.metallicFactor=0,s.pbrMetallicRoughness.roughnessFactor=1),e.metalnessMap||e.roughnessMap){const t=await this.buildMetalRoughTextureAsync(e.metalnessMap,e.roughnessMap),i={index:await this.processTextureAsync(t),texCoord:t.channel};this.applyTextureTransform(i,t),s.pbrMetallicRoughness.metallicRoughnessTexture=i}if(e.map){const t={index:await this.processTextureAsync(e.map),texCoord:e.map.channel};this.applyTextureTransform(t,e.map),s.pbrMetallicRoughness.baseColorTexture=t}if(e.emissive){const t=e.emissive;if(Math.max(t.r,t.g,t.b)>0&&(s.emissiveFactor=e.emissive.toArray()),e.emissiveMap){const t={index:await this.processTextureAsync(e.emissiveMap),texCoord:e.emissiveMap.channel};this.applyTextureTransform(t,e.emissiveMap),s.emissiveTexture=t}}if(e.normalMap){const t={index:await this.processTextureAsync(e.normalMap),texCoord:e.normalMap.channel};e.normalScale&&1!==e.normalScale.x&&(t.scale=e.normalScale.x),this.applyTextureTransform(t,e.normalMap),s.normalTexture=t}if(e.aoMap){const t={index:await this.processTextureAsync(e.aoMap),texCoord:e.aoMap.channel};1!==e.aoMapIntensity&&(t.strength=e.aoMapIntensity),this.applyTextureTransform(t,e.aoMap),s.occlusionTexture=t}e.transparent?s.alphaMode="BLEND":e.alphaTest>0&&(s.alphaMode="MASK",s.alphaCutoff=e.alphaTest),e.side===x.ehD&&(s.doubleSided=!0),""!==e.name&&(s.name=e.name),this.serializeUserData(e,s),await this._invokeAllAsync((async function(t){t.writeMaterialAsync&&await t.writeMaterialAsync(e,s)}));const r=i.materials.push(s)-1;return t.materials.set(e,r),r}async processMeshAsync(e){const t=this.cache,i=this.json,s=[e.geometry.uuid];if(Array.isArray(e.material))for(let I=0,C=e.material.length;I<C;I++)s.push(e.material[I].uuid);else s.push(e.material.uuid);const n=s.join(":");if(t.meshes.has(n))return t.meshes.get(n);const r=e.geometry;let a;a=e.isLineSegments?qi:e.isLineLoop?ji:e.isLine?zi:e.isPoints?Hi:e.material.wireframe?qi:Ki;const o={},A={},c=[],l=[],h={uv:"TEXCOORD_0",uv1:"TEXCOORD_1",uv2:"TEXCOORD_2",uv3:"TEXCOORD_3",color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},u=r.getAttribute("normal");void 0===u||this.isNormalizedNormalAttribute(u)||(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),r.setAttribute("normal",this.createNormalizedNormalAttribute(u)));let g=null;
vendor: 16,485 bytes, line 407
407for(let I in r.attributes){if("morph"===I.slice(0,5))continue;const e=r.attributes[I];I=h[I]||I.toUpperCase();if(/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(I)||(I="_"+I),t.attributes.has(this.getUID(e))){A[I]=t.attributes.get(this.getUID(e));continue}g=null;const i=e.array;"JOINTS_0"!==I||i instanceof Uint16Array||i instanceof Uint8Array?(i instanceof Uint32Array||i instanceof Int32Array)&&!I.startsWith("_")&&(console.warn(`GLTFExporter: Attribute "${I}" converted to type FLOAT.`),g=Ni.Utils.toFloat32BufferAttribute(e)):(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),g=new x.TlE(new Uint16Array(i),e.itemSize,e.normalized));const s=this.processAccessor(g||e,r);null!==s&&(I.startsWith("_")||this.detectMeshQuantization(I,e),A[I]=s,t.attributes.set(this.getUID(e),s))}if(void 0!==u&&r.setAttribute("normal",u),0===Object.keys(A).length)return null;if(void 0!==e.morphTargetInfluences&&e.morphTargetInfluences.length>0){const i=[],s=[],n={};if(void 0!==e.morphTargetDictionary)for(const t in e.morphTargetDictionary)n[e.morphTargetDictionary[t]]=t;for(let a=0;a<e.morphTargetInfluences.length;++a){const o={};let A=!1;for(const e in r.morphAttributes){if("position"!==e&&"normal"!==e){A||(console.warn("GLTFExporter: Only POSITION and NORMAL morph are supported."),A=!0);continue}const i=r.morphAttributes[e][a],s=e.toUpperCase(),n=r.attributes[e];if(t.attributes.has(this.getUID(i,!0))){o[s]=t.attributes.get(this.getUID(i,!0));continue}const c=i.clone();if(!r.morphTargetsRelative)for(let e=0,t=i.count;e<t;e++)for(let s=0;s<i.itemSize;s++)0===s&&c.setX(e,i.getX(e)-n.getX(e)),1===s&&c.setY(e,i.getY(e)-n.getY(e)),2===s&&c.setZ(e,i.getZ(e)-n.getZ(e)),3===s&&c.setW(e,i.getW(e)-n.getW(e));o[s]=this.processAccessor(c,r),t.attributes.set(this.getUID(n,!0),o[s])}l.push(o),i.push(e.morphTargetInfluences[a]),void 0!==e.morphTargetDictionary&&s.push(n[a])}o.weights=i,s.length>0&&(o.extras={},o.extras.targetNames=s)}const d=Array.isArray(e.material);if(d&&0===r.groups.length)return null;let p=!1;if(d&&null===r.index){const e=[];for(let t=0,i=r.attributes.position.count;t<i;t++)e[t]=t;r.setIndex(e),p=!0}const m=d?e.material:[e.material],f=d?r.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let I=0,C=f.length;I<C;I++){const e={mode:a,attributes:A};if(this.serializeUserData(r,e),l.length>0&&(e.targets=l),null!==r.index){let i=this.getUID(r.index);void 0===f[I].start&&void 0===f[I].count||(i+=":"+f[I].start+":"+f[I].count),t.attributes.has(i)?e.indices=t.attributes.get(i):(e.indices=this.processAccessor(r.index,r,f[I].start,f[I].count),t.attributes.set(i,e.indices)),null===e.indices&&delete e.indices}const i=await this.processMaterialAsync(m[f[I].materialIndex]);null!==i&&(e.material=i),c.push(e)}!0===p&&r.setIndex(null),o.primitives=c,i.meshes||(i.meshes=[]),await this._invokeAllAsync((function(t){t.writeMesh&&t.writeMesh(e,o)}));const b=i.meshes.push(o)-1;return t.meshes.set(n,b),b}detectMeshQuantization(e,t){if(this.extensionsUsed.KHR_mesh_quantization)return;let i;switch(t.array.constructor){case Int8Array:i="byte";break;case Uint8Array:i="unsigned byte";break;case Int16Array:i="short";break;case Uint16Array:i="unsigned short";break;default:return}t.normalized&&(i+=" normalized");const s=e.split("_",1)[0];Oi[s]&&Oi[s].includes(i)&&(this.extensionsUsed.KHR_mesh_quantization=!0,this.extensionsRequired.KHR_mesh_quantization=!0)}processCamera(e){const t=this.json;t.cameras||(t.cameras=[]);const i=e.isOrthographicCamera,s={type:i?"orthographic":"perspective"};return i?s.orthographic={xmag:2*e.right,ymag:2*e.top,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:s.perspective={aspectRatio:e.aspect,yfov:x.M8C.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},""!==e.name&&(s.name=e.type),t.cameras.push(s)-1}processAnimation(e,t){const i=this.json,s=this.nodeMap;i.animations||(i.animations=[]);const n=(e=Ni.Utils.mergeMorphTargetTracks(e.clone(),t)).tracks,r=[],a=[];for(let o=0;o<n.length;++o){const e=n[o],i=x.iUV.parseTrackName(e.name);let A=x.iUV.findNode(t,i.nodeName);const c=us[i.propertyName];if("bones"===i.objectName&&(A=!0===A.isSkinnedMesh?A.skeleton.getBoneByName(i.objectIndex):void 0),!A||!c){console.warn('THREE.GLTFExporter: Could not export animation track "%s".',e.name);continue}const l=1;let h,u=e.values.length/e.times.length;c===us.morphTargetInfluences&&(u/=A.morphTargetInfluences.length),!0===e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline?(h="CUBICSPLINE",u/=3):h=e.getInterpolation()===x.Syv?"STEP":"LINEAR",a.push({input:this.processAccessor(new x.TlE(e.times,l)),output:this.processAccessor(new x.TlE(e.values,u)),interpolation:h}),r.push({sampler:a.length-1,target:{node:s.get(A),path:c}})}return i.animations.push({name:e.name||"clip_"+i.animations.length,samplers:a,channels:r}),i.animations.length-1}processSkin(e){const t=this.json,i=this.nodeMap,s=t.nodes[i.get(e)],n=e.skeleton;if(void 0===n)return null;const r=e.skeleton.bones[0];if(void 0===r)return null;const a=[],o=new Float32Array(16*n.bones.length),A=new x.yGw;for(let c=0;c<n.bones.length;++c)a.push(i.get(n.bones[c])),A.copy(n.boneInverses[c]),A.multiply(e.bindMatrix).toArray(o,16*c);void 0===t.skins&&(t.skins=[]),t.skins.push({inverseBindMatrices:this.processAccessor(new x.TlE(o,16)),joints:a,skeleton:i.get(r)});return s.skin=t.skins.length-1}async processNodeAsync(e){const t=this.json,i=this.options,s=this.nodeMap;t.nodes||(t.nodes=[]);const n={};if(i.trs){const t=e.quaternion.toArray(),i=e.position.toArray(),s=e.scale.toArray();ds(t,[0,0,0,1])||(n.rotation=t),ds(i,[0,0,0])||(n.translation=i),ds(s,[1,1,1])||(n.scale=s)}else e.matrixAutoUpdate&&e.updateMatrix(),!1===ds(e.matrix.elements,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])&&(n.matrix=e.matrix.elements);if(""!==e.name&&(n.name=String(e.name)),this.serializeUserData(e,n),e.isMesh||e.isLine||e.isPoints){const t=await this.processMeshAsync(e);null!==t&&(n.mesh=t)}else e.isCamera&&(n.camera=this.processCamera(e));if(e.isSkinnedMesh&&this.skins.push(e),e.children.length>0){const t=[];for(let s=0,n=e.children.length;s<n;s++){const n=e.children[s];if(n.visible||!1===i.onlyVisible){const e=await this.processNodeAsync(n);null!==e&&t.push(e)}}t.length>0&&(n.children=t)}await this._invokeAllAsync((function(t){t.writeNode&&t.writeNode(e,n)}));const r=t.nodes.push(n)-1;return s.set(e,r),r}async processSceneAsync(e){const t=this.json,i=this.options;t.scenes||(t.scenes=[],t.scene=0);const s={};""!==e.name&&(s.name=e.name),t.scenes.push(s);const n=[];for(let r=0,a=e.children.length;r<a;r++){const t=e.children[r];if(t.visible||!1===i.onlyVisible){const e=await this.processNodeAsync(t);null!==e&&n.push(e)}}n.length>0&&(s.nodes=n),this.serializeUserData(e,s)}async processObjectsAsync(e){const t=new x.xsS;t.name="AuxScene";for(let i=0;i<e.length;i++)t.children.push(e[i]);await this.processSceneAsync(t)}async processInputAsync(e){const t=this.options;e=e instanceof Array?e:[e],await this._invokeAllAsync((function(t){t.beforeParse&&t.beforeParse(e)}));const i=[];for(let s=0;s<e.length;s++)e[s]instanceof x.xsS?await this.processSceneAsync(e[s]):i.push(e[s]);i.length>0&&await this.processObjectsAsync(i);for(let s=0;s<this.skins.length;++s)this.processSkin(this.skins[s]);for(let s=0;s<t.animations.length;++s)this.processAnimation(t.animations[s],e[0]);await this._invokeAllAsync((function(t){t.afterParse&&t.afterParse(e)}))}async _invokeAllAsync(e){for(let t=0,i=this.plugins.length;t<i;t++)await e(this.plugins[t])}}class Cs{constructor(e){this.writer=e,this.name="KHR_lights_punctual"}writeNode(e,t){if(!e.isLight)return;if(!e.isDirectionalLight&&!e.isPointLight&&!e.isSpotLight)return void console.warn("THREE.GLTFExporter: Only directional, point, and spot lights are supported.",e);const i=this.writer,s=i.json,n=i.extensionsUsed,r={};e.name&&(r.name=e.name),r.color=e.color.toArray(),r.intensity=e.intensity,e.isDirectionalLight?r.type="directional":e.isPointLight?(r.type="point",e.distance>0&&(r.range=e.distance)):e.isSpotLight&&(r.type="spot",e.distance>0&&(r.range=e.distance),r.spot={},r.spot.innerConeAngle=(1-e.penumbra)*e.angle,r.spot.outerConeAngle=e.angle),void 0!==e.decay&&2!==e.decay&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),!e.target||e.target.parent===e&&0===e.target.position.x&&0===e.target.position.y&&-1===e.target.position.z||console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),n[this.name]||(s.extensions=s.extensions||{},s.extensions[this.name]={lights:[]},n[this.name]=!0);const a=s.extensions[this.name].lights;a.push(r),t.extensions=t.extensions||{},t.extensions[this.name]={light:a.length-1}}}class Es{constructor(e){this.writer=e,this.name="KHR_materials_unlit"}async writeMaterialAsync(e,t){if(!e.isMeshBasicMaterial)return;const i=this.writer.extensionsUsed;t.extensions=t.extensions||{},t.extensions[this.name]={},i[this.name]=!0,t.pbrMetallicRoughness.metallicFactor=0,t.pbrMetallicRoughness.roughnessFactor=.9}}class ys{constructor(e){this.writer=e,this.name="KHR_materials_clearcoat"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||0===e.clearcoat)return;const i=this.writer,s=i.extensionsUsed,n={};if(n.clearcoatFactor=e.clearcoat,e.clearcoatMap){const t={index:await i.processTextureAsync(e.clearcoatMap),texCoord:e.clearcoatMap.channel};i.applyTextureTransform(t,e.clearcoatMap),n.clearcoatTexture=t}if(n.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){const t={index:await i.processTextureAsync(e.clearcoatRoughnessMap),texCoord:e.clearcoatRoughnessMap.channel};i.applyTextureTransform(t,e.clearcoatRoughnessMap),n.clearcoatRoughnessTexture=t}if(e.clearcoatNormalMap){const t={index:await i.processTextureAsync(e.clearcoatNormalMap),texCoord:e.clearcoatNormalMap.channel};1!==e.clearcoatNormalScale.x&&(t.scale=e.clearcoatNormalScale.x),i.applyTextureTransform(t,e.clearcoatNormalMap),n.clearcoatNormalTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=n,s[this.name]=!0}}class Bs{constructor(e){this.writer=e,this.name="KHR_materials_dispersion"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||0===e.dispersion)return;const i=this.writer.extensionsUsed,s={};s.dispersion=e.dispersion,t.extensions=t.extensions||{},t.extensions[this.name]=s,i[this.name]=!0}}class ws{constructor(e){this.writer=e,this.name="KHR_materials_iridescence"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||0===e.iridescence)return;const i=this.writer,s=i.extensionsUsed,n={};if(n.iridescenceFactor=e.iridescence,e.iridescenceMap){const t={index:await i.processTextureAsync(e.iridescenceMap),texCoord:e.iridescenceMap.channel};i.applyTextureTransform(t,e.iridescenceMap),n.iridescenceTexture=t}if(n.iridescenceIor=e.iridescenceIOR,n.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],n.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){const t={index:await i.processTextureAsync(e.iridescenceThicknessMap),texCoord:e.iridescenceThicknessMap.channel};i.applyTextureTransform(t,e.iridescenceThicknessMap),n.iridescenceThicknessTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=n,s[this.name]=!0}}class vs{constructor(e){this.writer=e,this.name="KHR_materials_transmission"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||0===e.transmission)return;const i=this.writer,s=i.extensionsUsed,n={};if(n.transmissionFactor=e.transmission,e.transmissionMap){const t={index:await i.processTextureAsync(e.transmissionMap),texCoord:e.transmissionMap.channel};i.applyTextureTransform(t,e.transmissionMap),n.transmissionTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=n,s[this.name]=!0}}class Qs{constructor(e){this.writer=e,this.name="KHR_materials_volume"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||0===e.transmission)return;const i=this.writer,s=i.extensionsUsed,n={};if(n.thicknessFactor=e.thickness,e.thicknessMap){const t={index:await i.processTextureAsync(e.thicknessMap),texCoord:e.thicknessMap.channel};i.applyTextureTransform(t,e.thicknessMap),n.thicknessTexture=t}e.attenuationDistance!==1/0&&(n.attenuationDistance=e.attenuationDistance),n.attenuationColor=e.attenuationColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=n,s[this.name]=!0}}class xs{constructor(e){this.writer=e,this.name="KHR_materials_ior"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||1.5===e.ior)return;const i=this.writer.extensionsUsed,s={};s.ior=e.ior,t.extensions=t.extensions||{},t.extensions[this.name]=s,i[this.name]=!0}}class Ss{constructor(e){this.writer=e,this.name="KHR_materials_specular"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||1===e.specularIntensity&&e.specularColor.equals(gs)&&!e.specularIntensityMap&&!e.specularColorMap)return;const i=this.writer,s=i.extensionsUsed,n={};if(e.specularIntensityMap){const t={index:await i.processTextureAsync(e.specularIntensityMap),texCoord:e.specularIntensityMap.channel};i.applyTextureTransform(t,e.specularIntensityMap),n.specularTexture=t}if(e.specularColorMap){const t={index:await i.processTextureAsync(e.specularColorMap),texCoord:e.specularColorMap.channel};i.applyTextureTransform(t,e.specularColorMap),n.specularColorTexture=t}n.specularFactor=e.specularIntensity,n.specularColorFactor=e.specularColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=n,s[this.name]=!0}}class Ms{constructor(e){this.writer=e,this.name="KHR_materials_sheen"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||0==e.sheen)return;const i=this.writer,s=i.extensionsUsed,n={};if(e.sheenRoughnessMap){const t={index:await i.processTextureAsync(e.sheenRoughnessMap),texCoord:e.sheenRoughnessMap.channel};i.applyTextureTransform(t,e.sheenRoughnessMap),n.sheenRoughnessTexture=t}if(e.sheenColorMap){const t={index:await i.processTextureAsync(e.sheenColorMap),texCoord:e.sheenColorMap.channel};i.applyTextureTransform(t,e.sheenColorMap),n.sheenColorTexture=t}n.sheenRoughnessFactor=e.sheenRoughness,n.sheenColorFactor=e.sheenColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=n,s[this.name]=!0}}class Rs{constructor(e){this.writer=e,this.name="KHR_materials_anisotropy"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||0==e.anisotropy)return;const i=this.writer,s=i.extensionsUsed,n={};if(e.anisotropyMap){const t={index:await i.processTextureAsync(e.anisotropyMap)};i.applyTextureTransform(t,e.anisotropyMap),n.anisotropyTexture=t}n.anisotropyStrength=e.anisotropy,n.anisotropyRotation=e.anisotropyRotation,t.extensions=t.extensions||{},t.extensions[this.name]=n,s[this.name]=!0}}class Ts{constructor(e){this.writer=e,this.name="KHR_materials_emissive_strength"}async writeMaterialAsync(e,t){if(!e.isMeshStandardMaterial||1===e.emissiveIntensity)return;const i=this.writer.extensionsUsed,s={};s.emissiveStrength=e.emissiveIntensity,t.extensions=t.extensions||{},t.extensions[this.name]=s,i[this.name]=!0}}class Ds{constructor(e){this.writer=e,this.name="EXT_materials_bump"}async writeMaterialAsync(e,t){if(!e.isMeshStandardMaterial||1===e.bumpScale&&!e.bumpMap)return;const i=this.writer,s=i.extensionsUsed,n={};if(e.bumpMap){const t={index:await i.processTextureAsync(e.bumpMap),texCoord:e.bumpMap.channel};i.applyTextureTransform(t,e.bumpMap),n.bumpTexture=t}n.bumpFactor=e.bumpScale,t.extensions=t.extensions||{},t.extensions[this.name]=n,s[this.name]=!0}}class ks{constructor(e){this.writer=e,this.name="EXT_mesh_gpu_instancing"}writeNode(e,t){if(!e.isInstancedMesh)return;const i=this.writer,s=e,n=new Float32Array(3*s.count),r=new Float32Array(4*s.count),a=new Float32Array(3*s.count),o=new x.yGw,A=new x.Pa4,c=new x._fP,l=new x.Pa4;for(let u=0;u<s.count;u++)s.getMatrixAt(u,o),o.decompose(A,c,l),A.toArray(n,3*u),c.toArray(r,4*u),l.toArray(a,3*u);const h={TRANSLATION:i.processAccessor(new x.TlE(n,3)),ROTATION:i.processAccessor(new x.TlE(r,4)),SCALE:i.processAccessor(new x.TlE(a,3))};s.instanceColor&&(h._COLOR_0=i.processAccessor(s.instanceColor)),t.extensions=t.extensions||{},t.extensions[this.name]={attributes:h},i.extensionsUsed[this.name]=!0,i.extensionsRequired[this.name]=!0}}Ni.Utils={insertKeyframe:function(e,t){const i=.001,s=e.getValueSize(),n=new e.TimeBufferType(e.times.length+1),r=new e.ValueBufferType(e.values.length+s),a=e.createInterpolant(new e.ValueBufferType(s));let o;
vendor: 11,642 bytes, line 407
407if(0===e.times.length){n[0]=t;for(let e=0;e<s;e++)r[e]=0;o=0}else if(t<e.times[0]){if(Math.abs(e.times[0]-t)<i)return 0;n[0]=t,n.set(e.times,1),r.set(a.evaluate(t),0),r.set(e.values,s),o=0}else if(t>e.times[e.times.length-1]){if(Math.abs(e.times[e.times.length-1]-t)<i)return e.times.length-1;n[n.length-1]=t,n.set(e.times,0),r.set(e.values,0),r.set(a.evaluate(t),e.values.length),o=n.length-1}else for(let A=0;A<e.times.length;A++){if(Math.abs(e.times[A]-t)<i)return A;if(e.times[A]<t&&e.times[A+1]>t){n.set(e.times.slice(0,A+1),0),n[A+1]=t,n.set(e.times.slice(A+1),A+2),r.set(e.values.slice(0,(A+1)*s),0),r.set(a.evaluate(t),(A+1)*s),r.set(e.values.slice((A+1)*s),(A+2)*s),o=A+1;break}}return e.times=n,e.values=r,o},mergeMorphTargetTracks:function(e,t){const i=[],s={},n=e.tracks;for(let r=0;r<n.length;++r){let e=n[r];const a=x.iUV.parseTrackName(e.name),o=x.iUV.findNode(t,a.nodeName);if("morphTargetInfluences"!==a.propertyName||void 0===a.propertyIndex){i.push(e);continue}if(e.createInterpolant!==e.InterpolantFactoryMethodDiscrete&&e.createInterpolant!==e.InterpolantFactoryMethodLinear){if(e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline)throw new Error("THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.");console.warn("THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead."),e=e.clone(),e.setInterpolation(x.NMF)}const A=o.morphTargetInfluences.length,c=o.morphTargetDictionary[a.propertyIndex];if(void 0===c)throw new Error("THREE.GLTFExporter: Morph target name not found: "+a.propertyIndex);let l;if(void 0===s[o.uuid]){l=e.clone();const t=new l.ValueBufferType(A*l.times.length);for(let e=0;e<l.times.length;e++)t[e*A+c]=l.values[e];l.name=(a.nodeName||"")+".morphTargetInfluences",l.values=t,s[o.uuid]=l,i.push(l);continue}const h=e.createInterpolant(new e.ValueBufferType(1));l=s[o.uuid];for(let t=0;t<l.times.length;t++)l.values[t*A+c]=h.evaluate(l.times[t]);for(let t=0;t<e.times.length;t++){const i=this.insertKeyframe(l,e.times[t]);l.values[i*A+c]=e.values[t]}}return e.tracks=i,e},toFloat32BufferAttribute:function(e){const t=new x.TlE(new Float32Array(e.count*e.itemSize),e.itemSize,!1);if(!e.normalized&&!e.isInterleavedBufferAttribute)return t.array.set(e.array),t;for(let i=0,s=e.count;i<s;i++)for(let n=0;n<e.itemSize;n++)t.setComponent(i,n,e.getComponent(i,n));return t}};const Fs=e=>void 0!==e.material&&e.userData&&e.userData.variantMaterials&&!!Array.from(e.userData.variantMaterials.values()).filter((e=>Ls(e.material))),Ls=e=>e&&e.isMaterial&&!Array.isArray(e);class Us{constructor(e){this.writer=e,this.name="KHR_materials_variants",this.variantNames=[]}beforeParse(e){const t=new Set,i=e=>{if(!Fs(e))return;const i=e.userData.variantMaterials,s=e.userData.variantData;for(const[n,r]of s){const e=i.get(r.index);e&&Ls(e.material)&&t.add(n)}};if(Array.isArray(e))for(const s of e)s.traverse(i);else e.traverse(i);t.forEach((e=>this.variantNames.push(e)))}async writeMesh(e,t){if(!Fs(e))return;const i=e.userData,s=i.variantMaterials,n=i.variantData,r=new Map,a=new Map,o=Array.from(n.values()).sort(((e,t)=>e.index-t.index));for(const[l,h]of o.entries())a.set(h.index,l);for(const l of n.values()){const e=s.get(l.index);if(!e||!Ls(e.material))continue;const t=await this.writer.processMaterialAsync(e.material);r.has(t)||r.set(t,{material:t,variants:[]}),r.get(t).variants.push(a.get(l.index))}const A=Array.from(r.values()).map((e=>e.variants.sort(((e,t)=>e-t))&&e)).sort(((e,t)=>e.material-t.material));if(0===A.length)return;const c=Ls(i.originalMaterial)?await this.writer.processMaterialAsync(i.originalMaterial):-1;for(const l of t.primitives)c>=0&&(l.material=c),l.extensions=l.extensions||{},l.extensions[this.name]={mappings:A}}afterParse(){if(0===this.variantNames.length)return;const e=this.writer.json;e.extensions=e.extensions||{};const t=this.variantNames.map((e=>({name:e})));e.extensions[this.name]={variants:t},this.writer.extensionsUsed[this.name]=!0}}var _s=i(6995);class Gs{constructor(e,t,i,s,n){this.xrLight=e,this.renderer=t,this.lightProbe=i,this.xrWebGLBinding=null,this.estimationStartCallback=n,this.frameCallback=this.onXRFrame.bind(this);const r=t.xr.getSession();if(s&&"XRWebGLBinding"in window){const i=new x.oAp(16);e.environment=i.texture;const s=t.getContext();switch(r.preferredReflectionFormat){case"srgba8":s.getExtension("EXT_sRGB");break;case"rgba16f":s.getExtension("OES_texture_half_float")}this.xrWebGLBinding=new XRWebGLBinding(r,s),this.lightProbe.addEventListener("reflectionchange",(()=>{this.updateReflection()}))}r.requestAnimationFrame(this.frameCallback)}updateReflection(){const e=this.renderer.properties.get(this.xrLight.environment);if(e){const t=this.xrWebGLBinding.getReflectionCubeMap(this.lightProbe);t&&(e.__webglTexture=t,this.xrLight.environment.needsPMREMUpdate=!0)}}onXRFrame(e,t){if(!this.xrLight)return;t.session.requestAnimationFrame(this.frameCallback);const i=t.getLightEstimate(this.lightProbe);if(i){this.xrLight.lightProbe.sh.fromArray(i.sphericalHarmonicsCoefficients),this.xrLight.lightProbe.intensity=1;const e=Math.max(1,Math.max(i.primaryLightIntensity.x,Math.max(i.primaryLightIntensity.y,i.primaryLightIntensity.z)));this.xrLight.directionalLight.color.setRGB(i.primaryLightIntensity.x/e,i.primaryLightIntensity.y/e,i.primaryLightIntensity.z/e),this.xrLight.directionalLight.intensity=e,this.xrLight.directionalLight.position.copy(i.primaryLightDirection),this.estimationStartCallback&&(this.estimationStartCallback(),this.estimationStartCallback=null)}}dispose(){this.xrLight=null,this.renderer=null,this.lightProbe=null,this.xrWebGLBinding=null}}class Ps extends x.ZAu{constructor(e,t=!0){super(),this.lightProbe=new x.lk7,this.lightProbe.intensity=0,this.add(this.lightProbe),this.directionalLight=new x.Ox3,this.directionalLight.intensity=0,this.add(this.directionalLight),this.environment=null;let i=null,s=!1;e.xr.addEventListener("sessionstart",(()=>{const n=e.xr.getSession();"requestLightProbe"in n&&n.requestLightProbe({reflectionFormat:n.preferredReflectionFormat}).then((n=>{i=new Gs(this,e,n,t,(()=>{s=!0,this.dispatchEvent({type:"estimationstart"})}))}))})),e.xr.addEventListener("sessionend",(()=>{i&&(i.dispose(),i=null),s&&this.dispatchEvent({type:"estimationend"})})),this.dispose=()=>{i&&(i.dispose(),i=null),this.remove(this.lightProbe),this.lightProbe=null,this.remove(this.directionalLight),this.directionalLight=null,this.environment=null}}}class Os{constructor(e=50){this.velocity=0,this.naturalFrequency=0,this.setDecayTime(e)}setDecayTime(e){this.naturalFrequency=1/Math.max(.001,e)}update(e,t,i,s){const n=2e-4*this.naturalFrequency;if(null==e||0===s)return t;if(e===t&&0===this.velocity)return t;if(i<0)return e;const r=e-t,a=this.velocity+this.naturalFrequency*r,o=r+i*a,A=Math.exp(-this.naturalFrequency*i),c=(a-this.naturalFrequency*o)*A,l=-this.naturalFrequency*(c+a*A);return Math.abs(c)<n*Math.abs(s)&&l*r>=0?(this.velocity=0,t):(this.velocity=c,t+o*A)}}const Ns=.2,Hs=Math.PI/24,qs=new x.FM8,js=(e,t,i)=>{let s=t>0?i>0?0:-Math.PI/2:i>0?Math.PI/2:Math.PI;for(let n=0;n<=12;++n)e.push(t+.17*Math.cos(s),i+.17*Math.sin(s),0,t+Ns*Math.cos(s),i+Ns*Math.sin(s),0),s+=Hs};class zs extends x.Kj0{constructor(e,t){const i=new x.u9r,s=[],n=[],{size:r,boundingBox:a}=e,o=r.x/2,A=("back"===t?r.y:r.z)/2;js(n,o,A),js(n,-o,A),js(n,-o,-A),js(n,o,-A);const c=n.length/3;for(let u=0;u<c-2;u+=2)s.push(u,u+1,u+3,u,u+3,u+2);const l=c-2;s.push(l,l+1,1,l,1,0),i.setAttribute("position",new x.a$l(n,3)),i.setIndex(s),super(i),this.side=t;const h=this.material;switch(h.side=x.ehD,h.transparent=!0,h.opacity=0,this.goalOpacity=0,this.opacityDamper=new Os,this.hitPlane=new x.Kj0(new x._12(2*(o+Ns),2*(A+Ns))),this.hitPlane.visible=!1,this.hitPlane.material.side=x.ehD,this.add(this.hitPlane),this.hitBox=new x.Kj0(new x.DvJ(r.x+.4,r.y+Ns,r.z+.4)),this.hitBox.visible=!1,this.hitBox.material.side=x.ehD,this.add(this.hitBox),a.getCenter(this.position),t){case"bottom":this.rotateX(-Math.PI/2),this.shadowHeight=a.min.y,this.position.y=this.shadowHeight;break;case"back":this.shadowHeight=a.min.z,this.position.z=this.shadowHeight}e.target.add(this),this.hitBox.position.y=(r.y+Ns)/2+a.min.y,e.target.add(this.hitBox),this.offsetHeight=0}getHit(e,t,i){qs.set(t,-i),this.hitPlane.visible=!0;const s=e.positionAndNormalFromPoint(qs,this.hitPlane);return this.hitPlane.visible=!1,null==s?null:s.position}getExpandedHit(e,t,i){this.hitPlane.scale.set(1e3,1e3,1e3),this.hitPlane.updateMatrixWorld();const s=this.getHit(e,t,i);return this.hitPlane.scale.set(1,1,1),s}controllerIntersection(e,t){this.hitBox.visible=!0;const i=e.hitFromController(t,this.hitBox);return this.hitBox.visible=!1,i}set offsetHeight(e){e-=.001,"back"===this.side?this.position.z=this.shadowHeight+e:this.position.y=this.shadowHeight+e}get offsetHeight(){return"back"===this.side?this.position.z-this.shadowHeight:this.position.y-this.shadowHeight}set show(e){this.goalOpacity=e?.75:0}updateOpacity(e){const t=this.material;t.opacity=this.opacityDamper.update(t.opacity,this.goalOpacity,e,1),this.visible=t.opacity>0}dispose(){const{geometry:e,material:t}=this.hitPlane;e.dispose(),t.dispose(),this.hitBox.geometry.dispose(),this.hitBox.material.dispose(),this.geometry.dispose(),this.material.dispose(),this.hitBox.removeFromParent(),this.removeFromParent()}}const Ks=(e,t)=>({type:"number",number:e,unit:t}),Vs=(()=>{const e={};return t=>{const i=t;if(i in e)return e[i];const s=[];let n=0;for(;t;){if(++n>1e3){t="";break}const e=Js(t),i=e.nodes[0];if(null==i||0===i.terms.length)break;s.push(i),t=e.remainingInput}return e[i]=s}})(),Js=(()=>{const e=/^(\-\-|[a-z\u0240-\uffff])/i,t=/^([\*\+\/]|[\-]\s)/i,i=/^[\),]/;return s=>{const n=[];for(;s.length&&(s=s.trim(),!i.test(s));)if("("===s[0]){const{nodes:e,remainingInput:t}=Xs(s);s=t,n.push({type:"function",name:{type:"ident",value:"calc"},arguments:e})}else if(e.test(s)){const e=Ys(s),t=e.nodes[0];if("("===(s=e.remainingInput)[0]){const{nodes:e,remainingInput:i}=Xs(s);n.push({type:"function",name:t,arguments:e}),s=i}else n.push(t)}else if(t.test(s))n.push({type:"operator",value:s[0]}),s=s.slice(1);else{const{nodes:e,remainingInput:t}="#"===s[0]?$s(s):Ws(s);if(0===e.length)break;n.push(e[0]),s=t}return{nodes:[{type:"expression",terms:n}],remainingInput:s}}})(),Ys=(()=>{const e=/[^a-z0-9_\-\u0240-\uffff]/i;return t=>{const i=t.match(e);return{nodes:[{type:"ident",value:null==i?t:t.substr(0,i.index)}],remainingInput:null==i?"":t.substr(i.index)}}})(),Ws=(()=>{const e=/[\+\-]?(\d+[\.]\d+|\d+|[\.]\d+)([eE][\+\-]?\d+)?/,t=/^[a-z%]+/i,i=/^(m|mm|cm|rad|deg|[%])$/;return s=>{const n=s.match(e),r=null==n?"0":n[0],a=(s=null==r?s:s.slice(r.length)).match(t);let o=null!=a&&""!==a[0]?a[0]:null;const A=null==a?s:s.slice(o.length);return null==o||i.test(o)||(o=null),{nodes:[{type:"number",number:parseFloat(r)||0,unit:o}],remainingInput:A}}})(),$s=(()=>{const e=/^[a-f0-9]*/i;return t=>{const i=(t=t.slice(1).trim()).match(e);return{nodes:null==i?[]:[{type:"hex",value:i[0]}],remainingInput:null==i?t:t.slice(i[0].length)}}})(),Xs=e=>{const t=[];for(e=e.slice(1).trim();e.length;){const i=Js(e);if(t.push(i.nodes[0]),","===(e=i.remainingInput.trim())[0])e=e.slice(1).trim();else if(")"===e[0]){e=e.slice(1);break}}return{nodes:t,remainingInput:e}},Zs=Symbol("visitedTypes");class en{constructor(e){this[Zs]=e}walk(e,t){const i=e.slice();for(;i.length;){const e=i.shift();switch(this[Zs].indexOf(e.type)>-1&&t(e),e.type){case"expression":i.unshift(...e.terms);break;case"function":i.unshift(e.name,...e.arguments)}}}}const tn=Object.freeze({type:"number",number:0,unit:null}),sn=(e,t=0)=>{let{number:i,unit:s}=e;
vendor: 4,158 bytes, line 407
407if(isFinite(i)){if("rad"===e.unit||null==e.unit)return e}else i=t,s="rad";return{type:"number",number:("deg"===s&&null!=i?i:0)*Math.PI/180,unit:"rad"}},nn=(e,t=0)=>{let i,{number:s,unit:n}=e;if(isFinite(s)){if("m"===e.unit)return e}else s=t,n="m";switch(n){default:i=1;break;case"cm":i=.01;break;case"mm":i=.001}return{type:"number",number:i*s,unit:"m"}},rn=(()=>{const e=e=>e,t={rad:e,deg:sn,m:e,mm:nn,cm:nn};return(e,i=tn)=>{isFinite(e.number)||(e.number=i.number,e.unit=i.unit);const{unit:s}=e;if(null==s)return e;const n=t[s];return null==n?i:n(e)}})();var an,on,An;const cn=Symbol("evaluate"),ln=Symbol("lastValue");class hn{constructor(){this[an]=null}static evaluatableFor(e,t=tn){if(e instanceof hn)return e;if("number"===e.type)return"%"===e.unit?new dn(e,t):e;switch(e.name.value){case"calc":return new In(e,t);case"env":return new mn(e)}return tn}static evaluate(e){return e instanceof hn?e.evaluate():e}static isConstant(e){return!(e instanceof hn)||e.isConstant}static applyIntrinsics(e,t){const{basis:i,keywords:s}=t,{auto:n}=s;return i.map(((t,i)=>{const r=null==n[i]?t:n[i];let a=e[i]?e[i]:r;if("ident"===a.type){const e=a.value;e in s&&(a=s[e][i])}return null!=a&&"ident"!==a.type||(a=r),"%"===a.unit?Ks(a.number/100*t.number,t.unit):(a=rn(a,t),a.unit!==t.unit?t:a)}))}get isConstant(){return!1}evaluate(){return this.isConstant&&null!=this[ln]||(this[ln]=this[cn]()),this[ln]}}an=ln;const un=Symbol("percentage"),gn=Symbol("basis");class dn extends hn{constructor(e,t){super(),this[un]=e,this[gn]=t}get isConstant(){return!0}[cn](){return Ks(this[un].number/100*this[gn].number,this[gn].unit)}}const pn=Symbol("identNode");class mn extends hn{constructor(e){super(),this[on]=null;const t=e.arguments.length?e.arguments[0].terms[0]:null;null!=t&&"ident"===t.type&&(this[pn]=t)}get isConstant(){return!1}[(on=pn,cn)](){if(null!=this[pn]&&"window-scroll-y"===this[pn].value){return{type:"number",number:window.pageYOffset/(Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)-window.innerHeight)||0,unit:null}}return tn}}const fn=/[\*\/]/,bn=Symbol("evaluator");class In extends hn{constructor(e,t=tn){if(super(),this[An]=null,1!==e.arguments.length)return;const i=e.arguments[0].terms.slice(),s=[];for(;i.length;){const e=i.shift();if(s.length>0){const i=s[s.length-1];if("operator"===i.type&&fn.test(i.value)){const i=s.pop(),n=s.pop();if(null==n)return;s.push(new Bn(i,hn.evaluatableFor(n,t),hn.evaluatableFor(e,t)));continue}}s.push("operator"===e.type?e:hn.evaluatableFor(e,t))}for(;s.length>2;){const[e,i,n]=s.splice(0,3);if("operator"!==i.type)return;s.unshift(new Bn(i,hn.evaluatableFor(e,t),hn.evaluatableFor(n,t)))}1===s.length&&(this[bn]=s[0])}get isConstant(){return null==this[bn]||hn.isConstant(this[bn])}[(An=bn,cn)](){return null!=this[bn]?hn.evaluate(this[bn]):tn}}const Cn=Symbol("operator"),En=Symbol("left"),yn=Symbol("right");class Bn extends hn{constructor(e,t,i){super(),this[Cn]=e,this[En]=t,this[yn]=i}get isConstant(){return hn.isConstant(this[En])&&hn.isConstant(this[yn])}[cn](){const e=rn(hn.evaluate(this[En])),t=rn(hn.evaluate(this[yn])),{number:i,unit:s}=e,{number:n,unit:r}=t;if(null!=r&&null!=s&&r!=s)return tn;const a=s||r;let o;switch(this[Cn].value){case"+":o=i+n;break;case"-":o=i-n;break;case"/":o=i/n;break;case"*":o=i*n;break;default:return tn}return{type:"number",number:o,unit:a}}}const wn=Symbol("evaluatables"),vn=Symbol("intrinsics");class Qn extends hn{constructor(e,t){super(),this[vn]=t;const i=e[0],s=null!=i?i.terms:[];this[wn]=t.basis.map(((e,t)=>{const i=s[t];return null==i?{type:"ident",value:"auto"}:"ident"===i.type?i:hn.evaluatableFor(i,e)}))}get isConstant(){for(const e of this[wn])if(!hn.isConstant(e))return!1;return!0}[cn](){const e=this[wn].map((e=>hn.evaluate(e)));return hn.applyIntrinsics(e,this[vn]).map((e=>e.number))}}var xn,Sn,Mn,Rn;const Tn=Symbol("instances"),Dn=Symbol("activateListener"),kn=Symbol("deactivateListener"),Fn=Symbol("notifyInstances"),Ln=Symbol("notify"),Un=Symbol("callback");class _n{static[Fn](){for(const e of _n[Tn])e[Ln]()}
vendor: 4,176 bytes, line 407
407static[(xn=Tn,Dn)](){window.addEventListener("scroll",this[Fn],{passive:!0})}static[kn](){window.removeEventListener("scroll",this[Fn])}constructor(e){this[Un]=e}observe(){0===_n[Tn].size&&_n[Dn](),_n[Tn].add(this)}disconnect(){_n[Tn].delete(this),0===_n[Tn].size&&_n[kn]()}[Ln](){this[Un]()}}_n[xn]=new Set;const Gn=Symbol("computeStyleCallback"),Pn=Symbol("astWalker"),On=Symbol("dependencies"),Nn=Symbol("onScroll");class Hn{constructor(e){this[Sn]={},this[Mn]=new en(["function"]),this[Rn]=()=>{this[Gn]({relatedState:"window-scroll"})},this[Gn]=e}observeEffectsFor(e){const t={},i=this[On];this[Pn].walk(e,(e=>{const{name:s}=e,n=e.arguments[0].terms[0];if("env"===s.value&&null!=n&&"ident"===n.type&&"window-scroll-y"===n.value)if(null==t["window-scroll"]){const e="window-scroll"in i?i["window-scroll"]:new _n(this[Nn]);e.observe(),delete i["window-scroll"],t["window-scroll"]=e}}));for(const s in i){i[s].disconnect()}this[On]=t}dispose(){for(const e in this[On]){this[On][e].disconnect()}}}Sn=On,Mn=Pn,Rn=Nn;const qn=e=>{const t=e.observeEffects||!1,i=e.intrinsics instanceof Function?e.intrinsics:()=>e.intrinsics;return(s,n)=>{const r=s.updated,a=s.connectedCallback,o=s.disconnectedCallback,A=Symbol(`${n}StyleEffector`),c=Symbol(`${n}StyleEvaluator`),l=Symbol(`${n}UpdateEvaluator`),h=Symbol(`${n}EvaluateAndSync`);Object.defineProperties(s,{[A]:{value:null,writable:!0},[c]:{value:null,writable:!0},[l]:{value:function(){const e=Vs(this[n]);this[c]=new Qn(e,i(this)),null==this[A]&&t&&(this[A]=new Hn((()=>this[h]()))),null!=this[A]&&this[A].observeEffectsFor(e)}},[h]:{value:function(){if(null==this[c])return;const t=this[c].evaluate();this[e.updateHandler](t)}},updated:{value:function(e){e.has(n)&&(this[l](),this[h]()),r.call(this,e)}},connectedCallback:{value:function(){a.call(this),this.requestUpdate(n,this[n])}},disconnectedCallback:{value:function(){o.call(this),null!=this[A]&&(this[A].dispose(),this[A]=null)}}})}},jn=e=>e<.5?2*e*e:(4-2*e)*e-1,zn=(e,t,i=jn)=>s=>e+(t-e)*i(s),Kn=e=>{const t=[],i=[];let s=e.initialValue;for(let n=0;n<e.keyframes.length;++n){const r=e.keyframes[n],{value:a,frames:o}=r,A=r.ease||jn,c=zn(s,a,A);t.push(c),i.push(o),s=a}return((e,t)=>{const i=t.map((s=0,e=>s+=e));var s;return t=>{t=Me(t,0,1),t*=i[i.length-1];const s=i.findIndex((e=>e>=t)),n=s<1?0:i[s-1],r=i[s];return e[s]((t-n)/(r-n))}})(t,i)};var Vn=function(e,t,i,s){var n,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};const Jn=Kn({initialValue:0,keyframes:[{frames:5,value:-1},{frames:1,value:-1},{frames:8,value:1},{frames:1,value:1},{frames:5,value:0},{frames:18,value:0}]}),Yn=Kn({initialValue:0,keyframes:[{frames:1,value:1},{frames:5,value:1},{frames:1,value:0},{frames:6,value:0}]}),Wn="0deg 75deg 105%",$n=["front","right","back","left"],Xn=["upper-","","lower-"],Zn="auto",er="basic",tr="wiggle",ir="none",sr=()=>({basis:[sn(Ks(30,"deg"))],keywords:{auto:[null]}}),nr=()=>({basis:[sn(Ks(12,"deg"))],keywords:{auto:[null]}}),rr=(()=>{const e=Vs(Wn)[0].terms,t=rn(e[0]),i=rn(e[1]);return e=>{const s=e[jc].idealCameraDistance();return{basis:[t,i,Ks(s,"m")],keywords:{auto:[null,null,Ks(105,"%")]}}}})(),ar=e=>{const t=2.2*e[jc].boundingSphere.radius;return{basis:[Ks(-1/0,"rad"),Ks(0,"rad"),Ks(t,"m")],keywords:{auto:[null,null,null]}}},or=e=>{const t=rr(e),i=new Qn([],t).evaluate()[2];return{basis:[Ks(1/0,"rad"),Ks(Math.PI,"rad"),Ks(i,"m")],keywords:{auto:[null,null,null]}}},Ar=e=>{const t=e[jc].boundingBox.getCenter(new x.Pa4);return{basis:[Ks(t.x,"m"),Ks(t.y,"m"),Ks(t.z,"m")],keywords:{auto:[null,null,null]}}},cr=Math.PI/2,lr=Math.PI/3,hr=cr/2,ur=2*Math.PI,gr=Symbol("controls"),dr=Symbol("panElement"),pr=Symbol("promptElement"),mr=Symbol("promptAnimatedContainer"),fr=Symbol("fingerAnimatedContainers"),br=Symbol("deferInteractionPrompt"),Ir=Symbol("updateAria"),Cr=Symbol("a11y"),Er=Symbol("updateA11y"),yr=Symbol("updateCameraForRadius"),Br=Symbol("cancelPrompts"),wr=Symbol("onChange"),vr
vendor: 8,627 bytes, line 407
407=Symbol("onPointerChange"),Qr=Symbol("waitingToPromptUser"),xr=Symbol("userHasInteracted"),Sr=Symbol("promptElementVisibleTime"),Mr=Symbol("lastPromptOffset"),Rr=Symbol("cancellationSource"),Tr=Symbol("lastSpherical"),Dr=Symbol("jumpCamera"),kr=Symbol("initialized"),Fr=Symbol("maintainThetaPhi"),Lr=Symbol("syncCameraOrbit"),Ur=Symbol("syncFieldOfView"),_r=Symbol("syncCameraTarget"),Gr=Symbol("syncMinCameraOrbit"),Pr=Symbol("syncMaxCameraOrbit"),Or=Symbol("syncMinFieldOfView"),Nr=Symbol("syncMaxFieldOfView"),Hr=new x.FM8,qr=new x.Pa4,jr=Object.freeze({minimumRadius:0,maximumRadius:1/0,minimumPolarAngle:0,maximumPolarAngle:Math.PI,minimumAzimuthalAngle:-1/0,maximumAzimuthalAngle:1/0,minimumFieldOfView:10,maximumFieldOfView:45,touchAction:"none"}),zr=Math.PI/8,Kr=.04,Vr={USER_INTERACTION:"user-interaction",NONE:"none",AUTOMATIC:"automatic"};class Jr extends x.pBf{constructor(e,t,i){super(),this.camera=e,this.element=t,this.scene=i,this.orbitSensitivity=1,this.zoomSensitivity=1,this.panSensitivity=1,this.inputSensitivity=1,this.changeSource=Vr.NONE,this._interactionEnabled=!1,this._disableZoom=!1,this.isUserPointing=!1,this.enablePan=!0,this.enableTap=!0,this.panProjection=new x.Vkp,this.panPerPixel=0,this.spherical=new x.$V,this.goalSpherical=new x.$V,this.thetaDamper=new Os,this.phiDamper=new Os,this.radiusDamper=new Os,this.logFov=Math.log(jr.maximumFieldOfView),this.goalLogFov=this.logFov,this.fovDamper=new Os,this.touchMode=null,this.pointers=[],this.startTime=0,this.startPointerPosition={clientX:0,clientY:0},this.lastSeparation=0,this.touchDecided=!1,this.onContext=e=>{if(this.enablePan)e.preventDefault();else for(const t of this.pointers)this.onPointerUp(new PointerEvent("pointercancel",Object.assign(Object.assign({},this.startPointerPosition),{pointerId:t.id})))},this.touchModeZoom=(e,t)=>{if(!this._disableZoom){const e=this.twoTouchDistance(this.pointers[0],this.pointers[1]),t=Kr*this.zoomSensitivity*(this.lastSeparation-e)*50/this.scene.height;this.lastSeparation=e,this.userAdjustOrbit(0,0,t)}this.panPerPixel>0&&this.movePan(e,t)},this.disableScroll=e=>{e.preventDefault()},this.touchModeRotate=(e,t)=>{const{touchAction:i}=this._options;if(!this.touchDecided&&"none"!==i){this.touchDecided=!0;const s=Math.abs(e),n=Math.abs(t);if(this.changeSource===Vr.USER_INTERACTION&&("pan-y"===i&&n>s||"pan-x"===i&&s>n))return void(this.touchMode=null);this.element.addEventListener("touchmove",this.disableScroll,{passive:!1})}this.handleSinglePointerMove(e,t)},this.onPointerDown=e=>{if(this.pointers.length>2)return;const{element:t}=this;0===this.pointers.length&&(t.addEventListener("pointermove",this.onPointerMove),t.addEventListener("pointerup",this.onPointerUp),this.touchMode=null,this.touchDecided=!1,this.startPointerPosition.clientX=e.clientX,this.startPointerPosition.clientY=e.clientY,this.startTime=performance.now());try{t.setPointerCapture(e.pointerId)}catch(Ai){}this.pointers.push({clientX:e.clientX,clientY:e.clientY,id:e.pointerId}),this.isUserPointing=!1,"touch"===e.pointerType?(this.changeSource=e.altKey?Vr.AUTOMATIC:Vr.USER_INTERACTION,this.onTouchChange(e)):(this.changeSource=Vr.USER_INTERACTION,this.onMouseDown(e)),this.changeSource===Vr.USER_INTERACTION&&this.dispatchEvent({type:"user-interaction"})},this.onPointerMove=e=>{const t=this.pointers.find((t=>t.id===e.pointerId));if(null==t)return;if("mouse"===e.pointerType&&0===e.buttons)return void this.onPointerUp(e);const i=this.pointers.length,s=(e.clientX-t.clientX)/i,n=(e.clientY-t.clientY)/i;0===s&&0===n||(t.clientX=e.clientX,t.clientY=e.clientY,"touch"===e.pointerType?(this.changeSource=e.altKey?Vr.AUTOMATIC:Vr.USER_INTERACTION,null!==this.touchMode&&this.touchMode(s,n)):(this.changeSource=Vr.USER_INTERACTION,this.panPerPixel>0?this.movePan(s,n):this.handleSinglePointerMove(s,n)))},this.onPointerUp=e=>{const{element:t}=this,i=this.pointers.findIndex((t=>t.id===e.pointerId));-1!==i&&this.pointers.splice(i,1),this.panPerPixel>0&&!e.altKey&&this.resetRadius(),0===this.pointers.length?(t.removeEventListener("pointermove",this.onPointerMove),t.removeEventListener("pointerup",this.onPointerUp),t.removeEventListener("touchmove",this.disableScroll),this.enablePan&&this.enableTap&&this.recenter(e)):null!==this.touchMode&&this.onTouchChange(e),this.scene.element[dr].style.opacity=0,t.style.cursor="grab",this.panPerPixel=0,this.isUserPointing&&this.dispatchEvent({type:"pointer-change-end"})},this.onWheel=e=>{this.changeSource=Vr.USER_INTERACTION;const t=e.deltaY*(1==e.deltaMode?18:1)*Kr*this.zoomSensitivity/30;this.userAdjustOrbit(0,0,t),e.preventDefault(),this.dispatchEvent({type:"user-interaction"})},this.onKeyDown=e=>{const{changeSource:t}=this;this.changeSource=Vr.USER_INTERACTION;(e.shiftKey&&this.enablePan?this.panKeyCodeHandler(e):this.orbitZoomKeyCodeHandler(e))?(e.preventDefault(),this.dispatchEvent({type:"user-interaction"})):this.changeSource=t},this._options=Object.assign({},jr),this.setOrbit(0,Math.PI/2,1),this.setFieldOfView(100),this.jumpToGoal()}get interactionEnabled(){return this._interactionEnabled}enableInteraction(){if(!1===this._interactionEnabled){const{element:e}=this;e.addEventListener("pointerdown",this.onPointerDown),e.addEventListener("pointercancel",this.onPointerUp),this._disableZoom||e.addEventListener("wheel",this.onWheel),e.addEventListener("keydown",this.onKeyDown),e.addEventListener("touchmove",(()=>{}),{passive:!1}),e.addEventListener("contextmenu",this.onContext),this.element.style.cursor="grab",this._interactionEnabled=!0,this.updateTouchActionStyle()}}disableInteraction(){if(!0===this._interactionEnabled){const{element:e}=this;e.removeEventListener("pointerdown",this.onPointerDown),e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("pointercancel",this.onPointerUp),e.removeEventListener("wheel",this.onWheel),e.removeEventListener("keydown",this.onKeyDown),e.removeEventListener("contextmenu",this.onContext),e.style.cursor="",this.touchMode=null,this._interactionEnabled=!1,this.updateTouchActionStyle()}}get options(){return this._options}set disableZoom(e){this._disableZoom!=e&&(this._disableZoom=e,!0===e?this.element.removeEventListener("wheel",this.onWheel):this.element.addEventListener("wheel",this.onWheel),this.updateTouchActionStyle())}getCameraSpherical(e=new x.$V){return e.copy(this.spherical)}getFieldOfView(){return this.camera.fov}applyOptions(e){Object.assign(this._options,e),this.setOrbit(),this.setFieldOfView(Math.exp(this.goalLogFov))}updateNearFar(e,t){this.camera.far=0===t?2:t,this.camera.near=Math.max(e,this.camera.far/1e3),this.camera.updateProjectionMatrix()}updateAspect(e){this.camera.aspect=e,this.camera.updateProjectionMatrix()}setOrbit(e=this.goalSpherical.theta,t=this.goalSpherical.phi,i=this.goalSpherical.radius){const{minimumAzimuthalAngle:s,maximumAzimuthalAngle:n,minimumPolarAngle:r,maximumPolarAngle:a,minimumRadius:o,maximumRadius:A}=this._options,{theta:c,phi:l,radius:h}=this.goalSpherical,u=Me(e,s,n);isFinite(s)||isFinite(n)||(this.spherical.theta=this.wrapAngle(this.spherical.theta-u)+u);const g=Me(t,r,a),d=Me(i,o,A);return(u!==c||g!==l||d!==h)&&(!!(isFinite(u)&&isFinite(g)&&isFinite(d))&&(this.goalSpherical.theta=u,this.goalSpherical.phi=g,this.goalSpherical.radius=d,this.goalSpherical.makeSafe(),!0))}setRadius(e){this.goalSpherical.radius=e,this.setOrbit()}setFieldOfView(e){const{minimumFieldOfView:t,maximumFieldOfView:i}=this._options;e=Me(e,t,i),this.goalLogFov=Math.log(e)}setDamperDecayTime(e){this.thetaDamper.setDecayTime(e),this.phiDamper.setDecayTime(e),this.radiusDamper.setDecayTime(e),this.fovDamper.setDecayTime(e)}adjustOrbit(e,t,i){const{theta:s,phi:n,radius:r}=this.goalSpherical,{minimumRadius:a,maximumRadius:o,minimumFieldOfView:A,maximumFieldOfView:c}=this._options,l=this.spherical.theta-s,h=Math.PI-.001,u=s-Me(e,-h-l,h-l),g=n-t,d=0===i?0:((i>0?o:a)-r)/(Math.log(i>0?c:A)-this.goalLogFov),p=r+i*(isFinite(d)?d:2*(o-a));if(this.setOrbit(u,g,p),0!==i){const e=this.goalLogFov+i;this.setFieldOfView(Math.exp(e))}}jumpToGoal(){this.update(0,1e4)}update(e,t){if(this.isStationary())return!1;const{maximumPolarAngle:i,maximumRadius:s}=this._options,n=this.spherical.theta-this.goalSpherical.theta;return Math.abs(n)>Math.PI&&!isFinite(this._options.minimumAzimuthalAngle)&&!isFinite(this._options.maximumAzimuthalAngle)&&(this.spherical.theta-=2*Math.sign(n)*Math.PI),this.spherical.theta=this.thetaDamper.update(this.spherical.theta,this.goalSpherical.theta,t,Math.PI),this.spherical.phi=this.phiDamper.update(this.spherical.phi,this.goalSpherical.phi,t,i),this.spherical.radiu
vendor: 4,873 bytes, line 407
407s=this.radiusDamper.update(this.spherical.radius,this.goalSpherical.radius,t,s),this.logFov=this.fovDamper.update(this.logFov,this.goalLogFov,t,1),this.moveCamera(),!0}updateTouchActionStyle(){const{style:e}=this.element;if(this._interactionEnabled){const{touchAction:t}=this._options;this._disableZoom&&"none"!==t?e.touchAction="manipulation":e.touchAction=t}else e.touchAction=""}isStationary(){return this.goalSpherical.theta===this.spherical.theta&&this.goalSpherical.phi===this.spherical.phi&&this.goalSpherical.radius===this.spherical.radius&&this.goalLogFov===this.logFov}moveCamera(){this.spherical.makeSafe(),this.camera.position.setFromSpherical(this.spherical),this.camera.setRotationFromEuler(new x.USm(this.spherical.phi-Math.PI/2,this.spherical.theta,0,"YXZ")),this.camera.fov!==Math.exp(this.logFov)&&(this.camera.fov=Math.exp(this.logFov),this.camera.updateProjectionMatrix())}userAdjustOrbit(e,t,i){this.adjustOrbit(e*this.orbitSensitivity*this.inputSensitivity,t*this.orbitSensitivity*this.inputSensitivity,i*this.inputSensitivity)}wrapAngle(e){const t=(e+Math.PI)/(2*Math.PI);return 2*(t-Math.floor(t))*Math.PI-Math.PI}pixelLengthToSphericalAngle(e){return 2*Math.PI*e/this.scene.height}twoTouchDistance(e,t){const{clientX:i,clientY:s}=e,{clientX:n,clientY:r}=t,a=n-i,o=r-s;return Math.sqrt(a*a+o*o)}handleSinglePointerMove(e,t){const i=this.pixelLengthToSphericalAngle(e),s=this.pixelLengthToSphericalAngle(t);!1===this.isUserPointing&&(this.isUserPointing=!0,this.dispatchEvent({type:"pointer-change-start"})),this.userAdjustOrbit(i,s,0)}initializePan(){const{theta:e,phi:t}=this.spherical,i=e-this.scene.yaw;this.panPerPixel=.018*this.panSensitivity/this.scene.height,this.panProjection.set(-Math.cos(i),-Math.cos(t)*Math.sin(i),0,0,Math.sin(t),0,Math.sin(i),-Math.cos(t)*Math.cos(i),0)}movePan(e,t){const{scene:i}=this,s=qr.set(e,t,0).multiplyScalar(this.inputSensitivity),n=this.spherical.radius*Math.exp(this.logFov)*this.panPerPixel;s.multiplyScalar(n);const r=i.getTarget();r.add(s.applyMatrix3(this.panProjection)),i.boundingSphere.clampPoint(r,r),i.setTarget(r.x,r.y,r.z)}recenter(e){if(performance.now()>this.startTime+300||Math.abs(e.clientX-this.startPointerPosition.clientX)>2||Math.abs(e.clientY-this.startPointerPosition.clientY)>2)return;const{scene:t}=this,i=t.positionAndNormalFromPoint(t.getNDC(e.clientX,e.clientY));if(null==i){const{cameraTarget:e}=t.element;t.element.cameraTarget="",t.element.cameraTarget=e,this.userAdjustOrbit(0,0,1)}else t.target.worldToLocal(i.position),t.setTarget(i.position.x,i.position.y,i.position.z)}resetRadius(){const{scene:e}=this,t=e.positionAndNormalFromPoint(Hr.set(0,0));if(null==t)return;e.target.worldToLocal(t.position);const i=e.getTarget(),{theta:s,phi:n}=this.spherical,r=s-e.yaw,a=qr.set(Math.sin(n)*Math.sin(r),Math.cos(n),Math.sin(n)*Math.cos(r)),o=a.dot(t.position.sub(i));i.add(a.multiplyScalar(o)),e.setTarget(i.x,i.y,i.z),this.setOrbit(void 0,void 0,this.goalSpherical.radius-o)}onTouchChange(e){if(1===this.pointers.length)this.touchMode=this.touchModeRotate;else{if(this._disableZoom)return this.touchMode=null,void this.element.removeEventListener("touchmove",this.disableScroll);this.touchMode=this.touchDecided&&null===this.touchMode?null:this.touchModeZoom,this.touchDecided=!0,this.element.addEventListener("touchmove",this.disableScroll,{passive:!1}),this.lastSeparation=this.twoTouchDistance(this.pointers[0],this.pointers[1]),this.enablePan&&null!=this.touchMode&&(this.initializePan(),e.altKey||(this.scene.element[dr].style.opacity=1))}}onMouseDown(e){this.panPerPixel=0,this.enablePan&&(2===e.button||e.ctrlKey||e.metaKey||e.shiftKey)&&(this.initializePan(),this.scene.element[dr].style.opacity=1),this.element.style.cursor="grabbing"}orbitZoomKeyCodeHandler(e){let t=!0;switch(e.key){case"PageUp":this.userAdjustOrbit(0,0,Kr*this.zoomSensitivity);break;case"PageDown":this.userAdjustOrbit(0,0,-.04*this.zoomSensitivity);break;case"ArrowUp":this.userAdjustOrbit(0,-zr,0);break;case"ArrowDown":this.userAdjustOrbit(0,zr,0);break;case"ArrowLeft":this.userAdjustOrbit(-zr,0,0);break;case"ArrowRight":this.userAdjustOrbit(zr,0,0);break;default:t=!1}return t}panKeyCodeHandler(e){this.initializePan();let t=!0;switch(e.key){case"ArrowUp":this.movePan(0,-10);break;case"ArrowDown":this.movePan(0,10);break;case"ArrowLeft":this.movePan(-10,0);break;case"ArrowRight":this.movePan(10,0);break;default:t=!1}return t}}const Yr=150,Wr="not-presenting",$r="session-started",Xr="object-placed",Zr="failed",ea="tracking",ta="not-tracking",ia=new x.Pa4,sa=new x._fP,na=new x.yGw,ra=new x.Pa4,aa=new x.cPb(45,1,.1,100),oa=(new x.u9r).setFromPoints([new x.Pa4(0,0,0),new x.Pa4(0,0,-1)]),Aa=new x.DvJ;class ca extends x.pBf{constructor(e){super(),this.renderer=e,this.currentSession=null,this.placeOnWall=!1,this.placementBox=null,this.lastTick=null,this.turntableRotation=null,this.oldSha
vendor: 18,005 bytes, line 407
407dowIntensity=null,this.frame=null,this.initialHitSource=null,this.transientHitTestSource=null,this.inputSource=null,this._presentedScene=null,this.resolveCleanup=null,this.exitWebXRButtonContainer=null,this.overlay=null,this.xrLight=null,this.xrMode=null,this.controller1=null,this.controller2=null,this.selectedController=null,this.tracking=!0,this.frames=0,this.initialized=!1,this.oldTarget=new x.Pa4,this.placementComplete=!1,this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!1,this.lastDragPosition=new x.Pa4,this.relativeOrientation=new x._fP,this.scaleLine=new x.x12(oa),this.firstRatio=0,this.lastAngle=0,this.goalPosition=new x.Pa4,this.goalYaw=0,this.goalScale=1,this.xDamper=new Os,this.yDamper=new Os,this.zDamper=new Os,this.yawDamper=new Os,this.pitchDamper=new Os,this.rollDamper=new Os,this.scaleDamper=new Os,this.onExitWebXRButtonContainerClick=()=>this.stopPresenting(),this.onControllerSelectStart=e=>{const t=this.presentedScene,i=e.target;if(null!=this.placementBox.controllerIntersection(t,i))null!=this.selectedController&&(this.selectedController.userData.line.visible=!1,t.canScale&&(this.isTwoFingering=!0,this.firstRatio=this.controllerSeparation()/t.pivot.scale.x,this.scaleLine.visible=!0)),i.attach(t.pivot),this.selectedController=i,t.setShadowIntensity(.01);else{const e=i===this.controller1?this.controller2:this.controller1;this.relativeOrientation.copy(i.quaternion).invert().multiply(t.pivot.getWorldQuaternion(sa)),e.userData.turning=!1,i.userData.turning=!0,i.userData.line.visible=!1}},this.onControllerSelectEnd=e=>{const t=e.target;if(t.userData.turning=!1,t.userData.line.visible=!0,this.isTwoFingering=!1,this.scaleLine.visible=!1,null!=this.selectedController&&this.selectedController!=t)return;const i=this.presentedScene;i.attach(i.pivot),this.selectedController=null,this.goalYaw=Math.atan2(i.pivot.matrix.elements[8],i.pivot.matrix.elements[10]),this.goalPosition.x=i.pivot.position.x,this.goalPosition.z=i.pivot.position.z},this.onUpdateScene=()=>{null!=this.placementBox&&this.isPresenting&&(this.placementBox.dispose(),this.placementBox=new zs(this.presentedScene,this.placeOnWall?"back":"bottom"))},this.onSelectStart=e=>{const t=this.transientHitTestSource;if(null==t)return;const i=this.frame.getHitTestResultsForTransientInput(t),s=this.presentedScene,n=this.placementBox;if(1===i.length){this.inputSource=e.inputSource;const{axes:t}=this.inputSource.gamepad,i=n.getHit(this.presentedScene,t[0],t[1]);n.show=!0,null!=i?(this.isTranslating=!0,this.lastDragPosition.copy(i)):!1===this.placeOnWall&&(this.isRotating=!0,this.lastAngle=1.5*t[0])}else if(2===i.length){n.show=!0,this.isTwoFingering=!0;const{separation:e}=this.fingerPolar(i);this.firstRatio=e/s.pivot.scale.x}},this.onSelectEnd=()=>{this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!1,this.inputSource=null,this.goalPosition.y+=this.placementBox.offsetHeight*this.presentedScene.scale.x,this.placementBox.show=!1},this.threeRenderer=e.threeRenderer,this.threeRenderer.xr.enabled=!0}async resolveARSession(){Qe();const e=await navigator.xr.requestSession("immersive-ar",{requiredFeatures:[],optionalFeatures:["hit-test","dom-overlay","light-estimation"],domOverlay:this.overlay?{root:this.overlay}:void 0});return this.threeRenderer.xr.setReferenceSpaceType("local"),await this.threeRenderer.xr.setSession(e),this.threeRenderer.xr.cameraAutoUpdate=!1,e}get presentedScene(){return this._presentedScene}async supportsPresentation(){try{return Qe(),await navigator.xr.isSessionSupported("immersive-ar")}catch(e){return console.warn("Request to present in WebXR denied:"),console.warn(e),console.warn("Falling back to next ar-mode"),!1}}async present(e,t=!1){this.isPresenting&&console.warn("Cannot present while a model is already presenting");let i=new Promise(((e,t)=>{requestAnimationFrame((()=>e()))}));e.setHotspotsVisibility(!1),e.queueRender(),await i,this._presentedScene=e,this.overlay=e.element.shadowRoot.querySelector("div.default"),!0===t&&(this.xrLight=new Ps(this.threeRenderer),this.xrLight.addEventListener("estimationstart",(()=>{if(!this.isPresenting||null==this.xrLight)return;const e=this.presentedScene;e.add(this.xrLight),e.environment=this.xrLight.environment})));const s=await this.resolveARSession();s.addEventListener("end",(()=>{this.postSessionCleanup()}),{once:!0});const n=e.element.shadowRoot.querySelector(".slot.exit-webxr-ar-button");n.classList.add("enabled"),n.addEventListener("click",this.onExitWebXRButtonContainerClick),this.exitWebXRButtonContainer=n;const r=await s.requestReferenceSpace("viewer");this.xrMode=s.interactionMode,this.tracking=!0,this.frames=0,this.initialized=!1,this.turntableRotation=e.yaw,this.goalYaw=e.yaw,this.goalScale=1,e.setBackground(null),this.oldShadowIntensity=e.shadowIntensity,e.setShadowIntensity(.01),this.oldTarget.copy(e.getTarget()),e.element.addEventListener("load",this.onUpdateScene);const a=20*Math.PI/180,o=!0===this.placeOnWall?void 0:new XRRay(new DOMPoint(0,0,0),{x:0,y:-Math.sin(a),z:-Math.cos(a)});s.requestHitTestSource({space:r,offsetRay:o}).then((e=>{this.initialHitSource=e})),"screen-space"!==this.xrMode&&(this.setupControllers(),this.xDamper.setDecayTime(Yr),this.yDamper.setDecayTime(Yr),this.zDamper.setDecayTime(Yr),this.yawDamper.setDecayTime(Yr),this.pitchDamper.setDecayTime(Yr),this.rollDamper.setDecayTime(Yr)),this.currentSession=s,this.placementBox=new zs(e,this.placeOnWall?"back":"bottom"),this.placementComplete=!1,this.lastTick=performance.now(),this.dispatchEvent({type:"status",status:$r})}setupControllers(){this.controller1=this.threeRenderer.xr.getController(0),this.controller1.addEventListener("selectstart",this.onControllerSelectStart),this.controller1.addEventListener("selectend",this.onControllerSelectEnd),this.controller2=this.threeRenderer.xr.getController(1),this.controller2.addEventListener("selectstart",this.onControllerSelectStart),this.controller2.addEventListener("selectend",this.onControllerSelectEnd);const e=this.presentedScene;if(e.add(this.controller1),e.add(this.controller2),!this.controller1.userData.line){const t=new x.x12(oa);t.name="line",t.scale.z=5,this.controller1.userData.turning=!1,this.controller1.userData.line=t,this.controller1.add(t),this.controller2.userData.turning=!1;const i=t.clone();this.controller2.userData.line=i,this.controller2.add(i),this.scaleLine.name="scale line",this.scaleLine.visible=!1,this.controller1.add(this.scaleLine);const{size:s}=e,n=.1/Math.max(s.x,s.y,s.z),r=new x.Kj0(Aa);r.name="box",r.scale.copy(s).multiplyScalar(n),r.visible=!1,this.controller1.userData.box=r,e.add(r);const a=r.clone();this.controller2.userData.box=a,e.add(a)}}hover(e){if("screen-space"===this.xrMode||this.selectedController==e)return!1;const t=this.presentedScene,i=this.placementBox.controllerIntersection(t,e);return e.userData.box.visible=(null==i||e.userData.turning)&&!this.isTwoFingering,e.userData.line.scale.z=null==i?5:i.distance,null!=i}controllerSeparation(){return this.controller1.position.distanceTo(this.controller2.position)}async stopPresenting(){if(!this.isPresenting)return;const e=new Promise((e=>{this.resolveCleanup=e}));try{await this.currentSession.end(),await e}catch(t){console.warn("Error while trying to end WebXR AR session"),console.warn(t),this.postSessionCleanup()}}get isPresenting(){return null!=this.presentedScene}get target(){return this.oldTarget}updateTarget(){const e=this.presentedScene;if(null!=e){const t=e.getTarget();this.oldTarget.copy(t),this.placeOnWall?t.z=e.boundingBox.min.z:t.y=e.boundingBox.min.y,e.setTarget(t.x,t.y,t.z)}}postSessionCleanup(){const e=this.currentSession;null!=e&&(e.removeEventListener("selectstart",this.onSelectStart),e.removeEventListener("selectend",this.onSelectEnd),this.currentSession=null);const t=this.presentedScene;if(this._presentedScene=null,null!=t){const{element:e}=t;null!=this.xrLight&&(t.remove(this.xrLight),this.xrLight.dispose(),this.xrLight=null),t.add(t.pivot),t.pivot.quaternion.set(0,0,0,1),t.pivot.position.set(0,0,0),t.pivot.scale.set(1,1,1),t.setShadowOffset(0);const i=this.turntableRotation;null!=i&&(t.yaw=i);const s=this.oldShadowIntensity;null!=s&&t.setShadowIntensity(s),t.setEnvironmentAndSkybox(e[De],e[ke]);const n=this.oldTarget;t.setTarget(n.x,n.y,n.z),t.xrCamera=null,t.element.removeEventListener("load",this.onUpdateScene),t.orientHotspots(0);const{width:r,height:a}=e.getBoundingClientRect();t.setSize(r,a),requestAnimationFrame((()=>{t.element.dispatchEvent(new CustomEvent("camera-change",{detail:{source:Vr.NONE}}))}))}this.renderer.height=0;const i=this.exitWebXRButtonContainer;null!=i&&(i.classList.remove("enabled"),i.removeEventListener("click",this.onExitWebXRButtonContainerClick),this.exitWebXRButtonContainer=null);const s=this.transientHitTestSource;null!=s&&(s.cancel(),this.transientHitTestSource=null);const n=this.initialHitSource;null!=n&&(n.cancel(),this.initialHitSource=null),null!=this.placementBox&&(this.placementBox.dispose(),this.placementBox=null),"screen-space"!==this.xrMode&&(null!=this.controller1&&(this.controller1.userData.turning=!1,this.controller1.userData.box.visible=!1,this.controller1.userData.line.visible=!0,this.controller1.removeEventListener("selectstart",this.onControllerSelectStart),this.controller1.removeEventListener("selectend",this.onControllerSelectEnd),this.controller1.removeFromParent(),this.controller1=null),null!=this.controller2&&(this.controller2.userData.turning=!1,this.controller2.userData.box.visible=!1,this.controller2.userData.line.visible=!0,this.controller2.removeEventListener("selectstart",this.onControllerSelectStart),this.controller2.removeEventListener("selectend",this.onControllerSelectEnd),this.controller2.removeFromParent(),this.controller2=null),this.selectedController=null,this.scaleLine.visible=!1),this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!1,this.lastTick=null,this.turntableRotation=null,this.oldShadowIntensity=null,this.frame=null,this.inputSource=null,this.overlay=null,null!=this.resolveCleanup&&this.resolveCleanup(),this.dispatchEvent({type:"status",status:Wr})}updateView(e){const t=this.presentedScene,i=this.threeRenderer.xr;i.updateCamera(aa),t.xrCamera=i.getCamera();const{elements:s}=t.getCamera().matrixWorld;if(t.orientHotspots(Math.atan2(s[1],s[5])),this.initialized||(this.placeInitially(),this.initialized=!0),e.requestViewportScale&&e.recommendedViewportScale){const t=e.recommendedViewportScale;e.requestViewportScale(Math.max(t,.25))}const n=i.getBaseLayer();if(null!=n){const t=n instanceof XRWebGLLayer?n.getViewport(e):i.getBinding().getViewSubImage(n,e).viewport;this.threeRenderer.setViewport(t.x,t.y,t.width,t.height)}}placeInitially(){const e=this.presentedScene,{pivot:t,element:i}=e,{position:s}=t,n=e.getCamera(),{width:r,height:a}=this.overlay.getBoundingClientRect();e.setSize(r,a),n.projectionMatrixInverse.copy(n.projectionMatrix).invert();const{theta:o}=i.getCameraOrbit(),A=n.getWorldDirection(ia);e.yaw=Math.atan2(-A.x,-A.z)-o,this.goalYaw=e.yaw;const c=Math.max(1,2*e.boundingSphere.radius);s.copy(n.position).add(A.multiplyScalar(c)),this.updateTarget();const l=e.getTarget();if(s.add(l).sub(this.oldTarget),this.goalPosition.copy(s),e.setHotspotsVisibility(!0),"screen-space"===this.xrMode){const{session:e}=this.frame;e.addEventListener("selectstart",this.onSelectStart),e.addEventListener("selectend",this.onSelectEnd),e.requestHitTestSourceForTransientInput({profile:"generic-touchscreen"}).then((e=>{this.transientHitTestSource=e}))}}getTouchLocation(){const{axes:e}=this.inputSource.gamepad;let t=this.placementBox.getExpandedHit(this.presentedScene,e[0],e[1]);return null!=t&&(ia.copy(t).sub(this.presentedScene.getCamera().position),ia.length()>10)?null:t}getHitPoint(e){const t=this.threeRenderer.xr.getReferenceSpace(),i=e.getPose(t);if(null==i)return null;const s=na.fromArray(i.transform.matrix);return!0===this.placeOnWall&&(this.goalYaw=Math.atan2(s.elements[4],s.elements[6])),s.elements[5]>.75!==this.placeOnWall?ra.setFromMatrixPosition(s):null}moveToFloor(e){const t=this.initialHitSource;if(null==t)return;const i=e.getHitTestResults(t);if(0==i.length)return;const s=i[0],n=this.getHitPoint(s);null!=n&&(this.placementBox.show=!0,this.isTranslating||(this.placeOnWall?this.goalPosition.copy(n):this.goalPosition.y=n.y),t.cancel(),this.initialHitSource=null,this.dispatchEvent({type:"status",status:Xr}))}fingerPolar(e){const t=e[0].inputSource.gamepad.axes,i=e[1].inputSource.gamepad.axes,s=i[0]-t[0],n=i[1]-t[1],r=Math.atan2(n,s);let a=this.lastAngle-r;return a>Math.PI?a-=2*Math.PI:a<-Math.PI&&(a+=2*Math.PI),this.lastAngle=r,{separation:Math.sqrt(s*s+n*n),deltaYaw:a}}setScale(e){const t=e/this.firstRatio;this.goalScale=Math.abs(t-1)<.2?1:t}processInput(e){const t=this.transientHitTestSource;if(null==t)return;if(!this.isTranslating&&!this.isTwoFingering&&!this.isRotating)return;const i=e.getHitTestResultsForTransientInput(t),s=this.presentedScene,n=s.pivot.scale.x;if(this.isTwoFingering)if(i.length<2)this.isTwoFingering=!1;else{const{separation:e,deltaYaw:t}=this.fingerPolar(i);!1===this.placeOnWall&&(this.goalYaw+=t),s.canScale&&this.setScale(e)}else if(2!==i.length)if(this.isRotating){const e=1.5*this.inputSource.gamepad.axes[0];this.goalYaw+=e-this.lastAngle,this.lastAngle=e}else this.isTranslating&&i.forEach((e=>{if(e.inputSource!==this.inputSource)return;let t=null;if(e.results.length>0&&(t=this.getHitPoint(e.results[0])),null==t&&(t=this.getTouchLocation()),null!=t){if(this.goalPosition.sub(this.lastDragPosition),!1===this.placeOnWall){const e=t.y-this.lastDragPosition.y;if(e<0){this.placementBox.offsetHeight=e/n,this.presentedScene.setShadowOffset(e);const i=ia.copy(s.getCamera().position),r=-e/(i.y-t.y);i.multiplyScalar(r),t.multiplyScalar(1-r).add(i)}}this.goalPosition.add(t),this.lastDragPosition.copy(t)}}));else{this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!0;const{separation:e}=this.fingerPolar(i);this.firstRatio=e/n}}moveScene(e){const t=this.presentedScene,{pivot:i}=t,s=this.placementBox;if(s.updateOpacity(e),this.controller1&&(this.controller1.userData.turning&&(i.quaternion.copy(this.controller1.quaternion).multiply(this.relativeOrientation),this.selectedController&&this.selectedController===this.controller2&&i.quaternion.premultiply(sa.copy(this.controller2.quaternion).invert())),this.controller1.userData.box.position.copy(this.controller1.position),i.getWorldQuaternion(this.controller1.userData.box.quaternion)),this.controller2&&(this.controller2.userData.turning&&(i.quaternion.copy(this.controller2.quaternion).multiply(this.relativeOrientation),this.selectedController&&this.selectedController===this.controller1&&i.quaternion.premultiply(sa.copy(this.controller1.quaternion).invert())),this.controller2.userData.box.position.copy(this.controller2.position),i.getWorldQuaternion(this.controller2.userData.box.quaternion)),this.controller1&&this.controller2&&this.isTwoFingering){const e=this.controllerSeparation();this.setScale(e),this.scaleLine.scale.z=-e,this.scaleLine.lookAt(this.controller2.position)}const n=t.pivot.scale.x;if(this.goalScale!==n){const i=this.scaleDamper.update(n,this.goalScale,e,1);t.pivot.scale.set(i,i,i)}if(i.parent!==t)return;const{position:r}=i,a=t.boundingSphere.radius,o=this.goalPosition;let A=Vr.NONE;if(!o.equals(r)){A=Vr.USER_INTERACTION;let{x:i,y:n,z:c}=r;if(i=this.xDamper.update(i,o.x,e,a),n=this.yDamper.update(n,o.y,e,a),c=this.zDamper.update(c,o.z,e,a),r.set(i,n,c),"screen-space"===this.xrMode&&!this.isTranslating){const e=o.y-n;this.placementComplete&&!1===this.placeOnWall?(s.offsetHeight=e/t.pivot.scale.x,t.setShadowOffset(e)):0===e&&(this.placementComplete=!0,s.show=!1,t.setShadowIntensity(.8))}"screen-space"!==this.xrMode&&o.equals(r)&&t.setShadowIntensity(.8)}t.updateTarget(e),sa.setFromAxisAngle(ia.set(0,1,0),this.goalYaw);const c=t.pivot.quaternion.angleTo(sa),l=c-this.yawDamper.update(c,0,e,Math.PI);t.pivot.quaternion.rotateTowards(sa,l),t.element.dispatchEvent(new CustomEvent("camera-change",{detail:{source:A}}))}onWebXRFrame(e,t){if("screen-space"!==this.xrMode){const e=this.hover(this.controller1),t=this.hover(this.controller2);this.placementBox.show=(e||t)&&!this.isTwoFingering}this.frame=t,++this.frames;const i=this.threeRenderer.xr.getReferenceSpace(),s=t.getViewerPose(i);null==s&&!0===this.tracking&&this.frames>30&&(this.tracking=!1,this.dispatchEvent({type:"tracking",status:ta}));const n=this.presentedScene;if(null==s||null==n||!n.element.loaded)return void this.threeRenderer.clear();!1===this.tracking&&(this.tracking=!0,this.dispatchEvent({type:"tracking",status:ea}));let r=!0;for(const a of s.views){if(this.updateView(a),r){this.moveToFloor(t),this.processInput(t);const i=e-this.lastTick;this.moveScene(i),this.renderer.preRender(n,e,i),this.lastTick=e,n.renderShadow(this.threeRenderer)}this.threeRenderer.render(n,n.getCamera()),r=!1}}}function la(e){const t=new Map,i=new Map,s=e.clone();return ha(e,s,(function(e,s){t.set(s,e),i.set(e,s)})),s.traverse((function(e){if(!e.isSkinnedMesh)return;const s=e,n=t.get(e),r=n.skeleton.bones;s.skeleton=n.skeleton.clone(),s.bindMatrix.copy(n.bindMatrix),s.skeleton.bones=r.map((function(e){return i.get(e)})),s.bind(s.skeleton,s.bindMatrix)})),s}function ha(e,t,i){i(e,t);for(let s=0;s<e.children.length;s++)ha(e.children[s],t.children[s],i)}const ua=Symbol("prepared"),ga=Symbol("prepare"),da=Symbol("preparedGLTF"),pa=Symbol("clone");class ma{static prepare(e){if(null==e.scene)throw new Error("Model does not have a scene");if(e[ua])return e;const t=this[ga](e);return t[ua]=!0,t}static[ga](e){const{scene:t}=e,i=[t];return Object.assign(Object.assign({},e),{scene:t,scenes:i})}get parser(){return this[da].parser}get animations(){return this[da].animations}get scene(){return this[da].scene}get scenes(){return this[da].scenes}get cameras(){return this[da].cameras}get asset(){return this[da].asset}get userData(){return this[da].userData}constructor(e){this[da]=e}clone(){return new(0,this.constructor)(this[pa]())}
vendor: 4,357 bytes, line 407
407dispose(){this.scenes.forEach((e=>{e.traverse((e=>{const t=e;if(!t.material)return;(Array.isArray(t.material)?t.material:[t.material]).forEach((e=>{for(const t in e){const i=e[t];if(i instanceof x.xEZ){const e=i.source.data;null!=e.close&&e.close(),i.dispose()}}e.dispose()})),t.geometry.dispose()}))}))}[pa](){const e=this[da],t=la(this.scene);fa(t,this.scene);const i=[t],s=e.userData?Object.assign({},e.userData):{};return Object.assign(Object.assign({},e),{scene:t,scenes:i,userData:s})}}const fa=(e,t)=>{ba(e,t,((e,t)=>{void 0!==t.userData.variantMaterials&&(e.userData.variantMaterials=new Map(t.userData.variantMaterials)),void 0!==t.userData.variantData&&(e.userData.variantData=t.userData.variantData),void 0!==t.userData.originalMaterial&&(e.userData.originalMaterial=t.userData.originalMaterial)}))},ba=(e,t,i)=>{i(e,t);for(let s=0;s<e.children.length;s++)ba(e.children[s],t.children[s],i)},Ia=Symbol("threeGLTF"),Ca=Symbol("gltf"),Ea=Symbol("gltfElementMap"),ya=Symbol("threeObjectMap"),Ba=Symbol("parallelTraverseThreeScene"),wa=Symbol("correlateOriginalThreeGLTF"),va=Symbol("correlateCloneThreeGLTF");class Qa{static from(e,t){return null!=t?this[va](e,t):this[wa](e)}static[wa](e){const t=e.parser.json,i=e.parser.associations,s=new Map,n={name:"Default"},r={type:"materials",index:-1};for(const a of i.keys())a instanceof x.F5T&&null==i.get(a)&&(r.index<0&&(null==t.materials&&(t.materials=[]),r.index=t.materials.length,t.materials.push(n)),a.name=n.name,i.set(a,{materials:r.index}));for(const[a,o]of i){o&&(a.userData=a.userData||{},a.userData.associations=o);for(const e in o)if(null!=e&&"primitives"!==e){const i=e,n=(t[i]||[])[o[i]];if(null==n)continue;let r=s.get(n);null==r&&(r=new Set,s.set(n,r)),r.add(a)}}return new Qa(e,t,i,s)}static[va](e,t){const i=t.threeGLTF,s=t.gltf,n=JSON.parse(JSON.stringify(s)),r=new Map,a=new Map;for(let o=0;o<i.scenes.length;o++)this[Ba](i.scenes[o],e.scenes[o],((e,i)=>{const s=t.threeObjectMap.get(e);if(null!=s)for(const t in s)if(null!=t&&"primitives"!==t){const e=t,o=s[e],A=n[e][o],c=r.get(i)||{};c[e]=o,r.set(i,c);const l=a.get(A)||new Set;l.add(i),a.set(A,l)}}));return new Qa(e,n,r,a)}static[Ba](e,t,i){const s=(e,t)=>{if(i(e,t),e.isObject3D){const n=e,r=t;if(n.material)if(Array.isArray(n.material))for(let e=0;e<n.material.length;++e)i(n.material[e],r.material[e]);else i(n.material,r.material);for(let i=0;i<e.children.length;++i)s(e.children[i],t.children[i])}};s(e,t)}get threeGLTF(){return this[Ia]}get gltf(){return this[Ca]}get gltfElementMap(){return this[Ea]}get threeObjectMap(){return this[ya]}constructor(e,t,i,s){this[Ia]=e,this[Ca]=t,this[Ea]=s,this[ya]=i}}const xa=Symbol("correlatedSceneGraph");class Sa extends ma{static[ga](e){const t=super[ga](e);null==t[xa]&&(t[xa]=Qa.from(t));const{scene:i}=t,s=new x.aLr(void 0,1/0);return i.traverse((e=>{e.renderOrder=1e3,e.frustumCulled=!1,e.name||(e.name=e.uuid);const i=e;if(i.material){const{geometry:e}=i;i.castShadow=!0,i.isSkinnedMesh&&(e.boundingSphere=s,e.boundingBox=null);const n=i.material;if(!0===n.isMeshBasicMaterial&&(n.toneMapped=!1),n.shadowSide=x.Wl3,n.aoMap){const{gltf:i,threeObjectMap:s}=t[xa],r=s.get(n);if(null!=i.materials&&null!=r&&null!=r.materials){const t=i.materials[r.materials];t.occlusionTexture&&0===t.occlusionTexture.texCoord&&null!=e.attributes.uv&&e.setAttribute("uv2",e.attributes.uv)}}}})),t}get correlatedSceneGraph(){return this[da][xa]}[pa](){const e=super[pa](),t=new Map;return e.scene.traverse((e=>{const i=e;if(i.material){const e=i.material;if(null!=e){if(t.has(e.uuid))return void(i.material=t.get(e.uuid));i.material=e.clone(),t.set(e.uuid,i.material)}}const s=e;void 0!==s.target&&s.add(s.target)})),e[xa]=Qa.from(e,this.correlatedSceneGraph),e}}const Ma=(e,t,i)=>{let s;switch(e){case x.ywz:s=new Uint8ClampedArray(t*i*4);break;case x.cLu:s=new Uint16Array(t*i*4);break;case x.JQ4:s=new Uint32Array(t*i*4);break;case x.T95:s=new Int8Array(t*i*4);break;case x.iAb:s=new Int16Array(t*i*4);break;case x.Kz5:s=new Int32Array(t*i*4);break;case x.VzW:s=new Float32Array(t*i*4);break;default:throw new Error("Unsupported data type")}return s};let Ra;class Ta{_renderer;_rendererIsDisposable=!1;_material;_scene;_camera;_quad;_renderTarget;_width;_height;_type;_colorSpace;_supportsReadPixels=!0;constructor(e){this._width=e.width,this._height=e.height,this._type=e.type,this._colorSpace
vendor: 10,255 bytes, line 407
407=e.colorSpace;const t={format:x.wk1,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:void 0!==e.renderTargetOptions?.anisotropy?e.renderTargetOptions?.anisotropy:1,generateMipmaps:void 0!==e.renderTargetOptions?.generateMipmaps&&e.renderTargetOptions?.generateMipmaps,magFilter:void 0!==e.renderTargetOptions?.magFilter?e.renderTargetOptions?.magFilter:x.wem,minFilter:void 0!==e.renderTargetOptions?.minFilter?e.renderTargetOptions?.minFilter:x.wem,samples:void 0!==e.renderTargetOptions?.samples?e.renderTargetOptions?.samples:void 0,wrapS:void 0!==e.renderTargetOptions?.wrapS?e.renderTargetOptions?.wrapS:x.uWy,wrapT:void 0!==e.renderTargetOptions?.wrapT?e.renderTargetOptions?.wrapT:x.uWy};if(this._material=e.material,e.renderer?this._renderer=e.renderer:(this._renderer=Ta.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new x.xsS,this._camera=new x.iKG,this._camera.position.set(0,0,10),this._camera.left=-.5,this._camera.right=.5,this._camera.top=.5,this._camera.bottom=-.5,this._camera.updateProjectionMatrix(),!((e,t,i,s)=>{if(void 0!==Ra)return Ra;const n=new x.dd2(1,1,s);t.setRenderTarget(n);const r=new x.Kj0(new x._12,new x.vBJ({color:16777215}));t.render(r,i),t.setRenderTarget(null);const a=Ma(e,n.width,n.height);return t.readRenderTargetPixels(n,0,0,n.width,n.height,a),n.dispose(),r.geometry.dispose(),r.material.dispose(),Ra=0!==a[0],Ra})(this._type,this._renderer,this._camera,t)){let e;if(this._type===x.cLu)e=this._renderer.extensions.has("EXT_color_buffer_float")?x.VzW:void 0;void 0!==e?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to ${x.VzW}`),this._type=e):(this._supportsReadPixels=!1,console.warn("This browser dos not support toArray or toDataTexture, calls to those methods will result in an error thrown"))}this._quad=new x.Kj0(new x._12,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new x.dd2(this.width,this.height,t),this._renderTarget.texture.mapping=void 0!==e.renderTargetOptions?.mapping?e.renderTargetOptions?.mapping:x.xfE}static instantiateRenderer(){const e=new _s.CP7;return e.setSize(128,128),e}render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(n){throw this._renderer.setRenderTarget(null),n}this._renderer.setRenderTarget(null)};toArray(){if(!this._supportsReadPixels)throw new Error("Can't read pixels in this browser");const e=Ma(this._type,this._width,this._height);return this._renderer.readRenderTargetPixels(this._renderTarget,0,0,this._width,this._height,e),e}toDataTexture(e){const t=new x.IEO(this.toArray(),this.width,this.height,x.wk1,this._type,e?.mapping||x.xfE,e?.wrapS||x.uWy,e?.wrapT||x.uWy,e?.magFilter||x.wem,e?.minFilter||x.wem,e?.anisotropy||1,x.GUF);return t.generateMipmaps=void 0!==e?.generateMipmaps&&e?.generateMipmaps,t}disposeOnDemandRenderer(){this._renderer.setRenderTarget(null),this._rendererIsDisposable&&(this._renderer.dispose(),this._renderer.forceContextLoss())}dispose(e){this.disposeOnDemandRenderer(),e&&this.renderTarget.dispose(),this.material instanceof x.jyz&&Object.values(this.material.uniforms).forEach((e=>{e.value instanceof x.xEZ&&e.value.dispose()})),Object.values(this.material).forEach((e=>{e instanceof x.xEZ&&e.dispose()})),this.material.dispose(),this._quad.geometry.dispose()}get width(){return this._width}set width(e){this._width=e,this._renderTarget.setSize(this._width,this._height)}get height(){return this._height}set height(e){this._height=e,this._renderTarget.setSize(this._width,this._height)}get renderer(){return this._renderer}get renderTarget(){return this._renderTarget}set renderTarget(e){this._renderTarget=e,this._width=e.width,this._height=e.height}get material(){return this._material}get type(){return this._type}get colorSpace(){return this._colorSpace}}class Da extends Error{}class ka extends Error{}const Fa=(e,t,i)=>{const s=new RegExp(`${t}="([^"]*)"`,"i").exec(e);if(s)return s[1];const n=new RegExp(`<${t}[^>]*>([\\s\\S]*?)</${t}>`,"i").exec(e);if(n){const e=n[1].match(/<rdf:li>([^<]*)<\/rdf:li>/g);return e&&3===e.length?e.map((e=>e.replace(/<\/?rdf:li>/g,""))):n[1].trim()}if(void 0!==i)return i;throw new Error(`Can't find ${t} in gainmap metadata`)};class La{options;constructor(e){this.options={debug:!(!e||void 0===e.debug)&&e.debug,extractFII:!e||void 0===e.extractFII||e.extractFII,extractNonFII:!e||void 0===e.extractNonFII||e.extractNonFII}}extract(e){return new Promise(((t,i)=>{const s=this.options.debug,n=new DataView(e.buffer);if(65496!==n.getUint16(0))return void i(new Error("Not a valid jpeg"));const r=n.byteLength;let a,o=2,A=0;for(;o<r;){if(++A>250)return void i(new Error(`Found no marker after ${A} loops \ud83d\ude35`));if(255!==n.getUint8(o))return void i(new Error(`Not a valid marker at offset 0x${o.toString(16)}, found: 0x${n.getUint8(o).toString(16)}`));if(a=n.getUint8(o+1),s&&console.log(`Marker: ${a.toString(16)}`),226===a){s&&console.log("Found APP2 marker (0xffe2)");const e=o+4;if(1297106432===n.getUint32(e)){const s=e+4;let r;if(18761===n.getUint16(s))r=!1;else{if(19789!==n.getUint16(s))return void i(new Error("No valid endianness marker found in TIFF header"));r=!0}if(42!==n.getUint16(s+2,!r))return void i(new Error("Not valid TIFF data! (no 0x002A marker)"));const a=n.getUint32(s+4,!r);if(a<8)return void i(new Error("Not valid TIFF data! (First offset less than 8)"));const o=s+a,A=n.getUint16(o,!r),c=o+2;let l=0;for(let e=c;e<c+12*A;e+=12)45057===n.getUint16(e,!r)&&(l=n.getUint32(e+8,!r));const h=o+2+12*A+4,u=[];for(let e=h;e<h+16*l;e+=16){const t={MPType:n.getUint32(e,!r),size:n.getUint32(e+4,!r),dataOffset:n.getUint32(e+8,!r),dependantImages:n.getUint32(e+12,!r),start:-1,end:-1,isFII:!1};t.dataOffset?(t.start=s+t.dataOffset,t.isFII=!1):(t.start=0,t.isFII=!0),t.end=t.start+t.size,u.push(t)}if(this.options.extractNonFII&&u.length){const e=new Blob([n]),i=[];for(const t of u){if(t.isFII&&!this.options.extractFII)continue;const s=e.slice(t.start,t.end+1,"image/jpeg");i.push(s)}t(i)}}}o+=2+n.getUint16(o+2)}}))}}const Ua=async e=>{const t=(e=>{let t;t="undefined"!==typeof TextDecoder?(new TextDecoder).decode(e):e.toString();let i=t.indexOf("<x:xmpmeta");for(;-1!==i;){const e=t.indexOf("x:xmpmeta>",i),s=t.slice(i,e+10);try{const e=Fa(s,"hdrgm:GainMapMin","0"),t=Fa(s,"hdrgm:GainMapMax"),i=Fa(s,"hdrgm:Gamma","1"),n=Fa(s,"hdrgm:OffsetSDR","0.015625"),r=Fa(s,"hdrgm:OffsetHDR","0.015625"),a=/hdrgm:HDRCapacityMin="([^"]*)"/.exec(s),o=a?a[1]:"0",A=/hdrgm:HDRCapacityMax="([^"]*)"/.exec(s);if(!A)throw new Error("Incomplete gainmap metadata");const c=A[1];return{gainMapMin:Array.isArray(e)?e.map((e=>parseFloat(e))):[parseFloat(e),parseFloat(e),parseFloat(e)],gainMapMax:Array.isArray(t)?t.map((e=>parseFloat(e))):[parseFloat(t),parseFloat(t),parseFloat(t)],gamma:Array.isArray(i)?i.map((e=>parseFloat(e))):[parseFloat(i),parseFloat(i),parseFloat(i)],offsetSdr:Array.isArray(n)?n.map((e=>parseFloat(e))):[parseFloat(n),parseFloat(n),parseFloat(n)],offsetHdr:Array.isArray(r)?r.map((e=>parseFloat(e))):[parseFloat(r),parseFloat(r),parseFloat(r)],hdrCapacityMin:parseFloat(o),hdrCapacityMax:parseFloat(c)}}catch(n){}i=t.indexOf("<x:xmpmeta",e)}})(e);if(!t)throw new ka("Gain map XMP metadata not found");const i=new La({extractFII:!0,extractNonFII:!0}),s=await i.extract(e);if(2!==s.length)throw new Da("Gain map recovery image not found");return{sdr:new Uint8Array(await s[0].arrayBuffer()),gainMap:new Uint8Array(await s[1].arrayBuffer()),metadata:t}},_a=e=>new Promise(((t,i)=>{const s=document.createElement("img");s.onload=()=>{t(s)},s.onerror=e=>{i(e)},s.src=URL.createObjectURL(e)}));class Ga extends x.aNw{_renderer;_renderTargetOptions;_internalLoadingManager;_config;constructor(e,t){super(t),this._config=e,e.renderer&&(this._renderer=e.renderer),this._internalLoadingManager=new x.lLk}setRenderer(e){return this._renderer=e,this}setRenderTargetOptions(e){return this._renderTargetOptions=e,this}prepareQuadRenderer(){this._renderer||console.warn("WARNING: A Renderer was not passed to this Loader constructor or in setRenderer, the result of this Loader will need to be converted to a Data Texture with toDataTexture() before you can use it in your renderer.");const e=this._config.createMaterial({gainMapMax:[1,1,1],gainMapMin:[0,0,0],gamma:[1,1,1],offsetHdr:[1,1,1],offsetSdr:[1,1,1],hdrCapacityMax:1,hdrCapacityMin:0,maxDisplayBoost:1,gainMap:new x.xEZ,sdr:new x.xEZ});return this._config.createQuadRenderer({width:16,height:16,type:x.cLu,colorSpace:x.GUF,material:e,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async processImages(e,t,i){const s=t?new Blob([t],{type:"image/jpeg"}):void 0,n=new Blob([e],{type:"image/jpeg"});let r,a,o=!1;if("undefined"===typeof createImageBitmap){const e=await Promise.all([s?_a(s):Promise.resolve(void 0),_a(n)]);a=e[0],r=e[1],o="flipY"===i}else{const e=await Promise.all([s?createImageBitmap(s,{imageOrientation:i||"flipY"}):Promise.resolve(void 0),createImageBitmap(n,{imageOrientation:i||"flipY"})]);a=e[0],r=e[1]}return{sdrImage:r,gainMapImage:a,needsFlip:o}}createTextures(e,t,i){const s=new x.xEZ(t||new ImageData(2,2),x.xfE,x.uWy,x.uWy,x.wem,x.FDw,x.wk1,x.ywz,1,x.GUF);s.flipY=i,s.needsUpdate=!0;const n=new x.xEZ(e,x.xfE,x.uWy,x.uWy,x.wem,x.FDw,x.wk1,x.ywz,1,x.KI_);return n.flipY=i,n.needsUpdate=!0,{gainMap:s,sdr:n}}updateQuadRenderer(e,t,i,s,n){e.width=t.width,e.height=t.height,e.material.gainMap=i,e.material.sdr=s,e.material.gainMapMin=n.gainMapMin,e.material.gainMapMax=n.gainMapMax,e.material.offsetHdr=n.offsetHdr,e.material.offsetSdr=n.offsetSdr,e.material.gamma=n.gamma,e.material.hdrCapacityMin=n.hdrCapacityMin,e.material.hdrCapacityMax=n.hdrCapacityMax,e.material.maxDisplayBoost=Math.pow(2,n.hdrCapacityMax),e.material.needsUpdate=!0}}class Pa extends x.jyz{_maxDisplayBoost;_hdrCapacityMin;_hdrCapacityMax;constructor({gamma:e,offsetHdr:t,offsetSdr:i,gainMapMin:s,gainMapMax:n,maxDisplayBoost:r,hdrCapacityMin:a,hdrCapacityMax:o,sdr:A,gainMap:c}){super({name:"GainMapDecoderMaterial",vertexShader:"\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0
407);\n}\n",fragmentShader:"\n// min half float value\n#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 )\n// max half float value\n#define HALF_FLOAT_MAX vec3( 65504, 65504, 65504 )\n\nuniform sampler2D sdr;\nuniform sampler2D gainMap;\nuniform vec3 gamma;\nuniform vec3 offsetHdr;\nuniform vec3 offsetSdr;\nuniform vec3 gainMapMin;\nuniform vec3 gainMapMax;\nuniform float weightFactor;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vec3 rgb = texture2D( sdr, vUv ).rgb;\n  vec3 recovery = texture2D( gainMap, vUv ).rgb;\n  vec3 logRecovery = pow( recovery, gamma );\n  vec3 logBoost = gainMapMin * ( 1.0 - logRecovery ) + gainMapMax * logRecovery;\n  vec3 hdrColor = (rgb + offsetSdr) * exp2( logBoost * weightFactor ) - offsetHdr;\n  vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor ));\n  gl_FragColor = vec4( clampedHdrColor , 1.0 );\n}\n",uniforms:{sdr:{value:A},gainMap:{value:c},gamma:{value:new x.Pa4(1/e[0],1/e[1],1/e[2])},offsetHdr:{value:(new x.Pa4).fromArray(t)},offsetSdr:{value:(new x.Pa4).fromArray(i)},gainMapMin:{value:(new x.Pa4).fromArray(s)},gainMapMax:{value:(new x.Pa4).fromArray(n)},weightFactor:{value:(Math.log2(r)-a)/(o-a)}},blending:x.jFi,depthTest:!1,depthWrite:!1}),this._maxDisplayBoost=r,this._hdrCapacityMin=a,this._hdrCapacityMax=o,this.needsUpdate=!0,this.uniformsNeedUpdate=!0}get sdr(){return this.uniforms.sdr.value}set sdr(e){this.uniforms.sdr.value=e}get gainMap(){return this.uniforms.gainMap.value}set gainMap(e){this.uniforms.gainMap.value=e}get offsetHdr(){return this.uniforms.offsetHdr.value.toArray()}set offsetHdr(e){this.uniforms.offsetHdr.value.fromArray(e)}get offsetSdr(){return this.uniforms.offsetSdr.value.toArray()}set offsetSdr(e){this.uniforms.offsetSdr.value.fromArray(e)}get gainMapMin(){return this.uniforms.gainMapMin.value.toArray()}set gainMapMin(e){this.uniforms.gainMapMin.value.fromArray(e)}get gainMapMax(){return this.uniforms.gainMapMax.value.toArray()}set gainMapMax(e){this.uniforms.gainMapMax.value.fromArray(e)}get gamma(){const e=this.uniforms.gamma.value;return[1/e.x,1/e.y,1/e.z]}set gamma(e){const t=this.uniforms.gamma.value;t.x=1/e[0],t.y=1/e[1],t.z=1/e[2]}get hdrCapacityMin(){return this._hdrCapacityMin}set hdrCapacityMin(e){this._hdrCapacityMin=e,this.calculateWeight()}get hdrCapacityMax(){return this._hdrCapacityMax}set hdrCapacityMax(e){this._hdrCapacityMax=e,this.calculateWeight()}get maxDisplayBoost(){return this._maxDisplayBoost}set maxDisplayBoost(e){this._maxDisplayBoost=Math.max(1,Math.min(65504,e)),this.calculateWeight()}calculateWeight(){const e=(Math.log2(this._maxDisplayBoost)-this._hdrCapacityMin)/(this._hdrCapacityMax-this._hdrCapacityMin);this.uniforms.weightFactor.value=Math.max(0,Math.min(1,e))}}Oa={renderer:_s.CP7,createMaterial:e=>new Pa(e),createQuadRenderer:e=>new Ta(e)};var Oa;class Na extends Ga{constructor(e,t){super({renderer:e,createMaterial:e=>new Pa(e),createQuadRenderer:e=>new Ta(e)},t)}async render(e,t,i,s){const{sdrImage:n,gainMapImage:r,needsFlip:a}=await this.processImages(i,s,"flipY"),{gainMap:o,sdr:A}=this.createTextures(n,r,a);this.updateQuadRenderer(e,n,o,A,t),e.render()}}class Ha extends Na{load(e,t,i,s){const r=this.prepareQuadRenderer(),a=new x.hH6(this._internalLoadingManager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(this.withCredentials),this.manager.itemStart(e),a.load(e,(async i=>{if("string"===typeof i)throw new Error("Invalid buffer, received [string], was expecting [ArrayBuffer]");const a=new Uint8Array(i);let o,A,c;try{const e=await Ua(a);o=e.sdr,A=e.gainMap,c=e.metadata}catch(n){if(!(n instanceof ka||n instanceof Da))throw n;console.warn(`Failure to reconstruct an HDR image from ${e}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),c={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},o=a}try{await this.render(r,c,o.buffer,A?.buffer)}catch(l){return this.manager.itemError(e),"function"===typeof s&&s(l),void r.disposeOnDemandRenderer()}"function"===typeof t&&t(r),this.manager.itemEnd(e),r.disposeOnDemandRenderer()}),i,(t=>{this.manager.itemError(e),"function"===typeof s&&s(t)})),r}}class qa extends x.yxD{constructor(e){super(e),this.type=x.cLu}parse(e){const t=function(e,t){switch(e){case 1:throw new Error("THREE.RGBELoader: Read Error: "+(t||""));case 2:throw new Error("THREE.RGBELoader: Write Error: "+(t||""));case 3:throw new Error("THREE.RGBELoader: Bad File Format: "+(t||""));default:throw new Error("THREE.RGBELoader: Memory Error: "+(t||""))}},i=function(e,t,i){t=t||1024;let s=e.pos,n=-1,r=0,a="",o=String.fromCharCode.apply(null,new Uint16Array(e.subarray(s,s+128)));for(;0>(n=o.indexOf("\n"))&&r<t&&s<e.byteLength;)a+=o,r+=o.length,s+=128,o+=String.fromCharCode.apply(null,new Uint16Array(e.subarray(s,s+128)));return-1<n&&(!1!==i&&(e.pos+=r+n+1),a+o.slice(0,n))},s=function(e,t,i,s){const n=e[t+3],r=Math.pow(2,n-128)/255;i[s+0]=e[t+0]*r,i[s+1]=e[t+1]*r,i[s+2]=e[t+2]*r,i[s+3]=1},n=function(e,t,i,s){const n=e[t+3],r=Math.pow(2,n-128)/255;i[s+0]=x.A5E.toHalfFloat(Math.min(e[t+0]*r,65504)),i[s+1]=x.A5E.toHalfFloat(Math.min(e[t+1]*r,65504)),i[s+2]=x.A5E.toHalfFloat(Math.min(e[t+2]*r,65504)),i[s+3]=x.A5E.toHalfFloat(1)}
vendor: 6,523 bytes, line 407
407,r=new Uint8Array(e);r.pos=0;const a=function(e){const s=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,n=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,r=/^\s*FORMAT=(\S+)\s*$/,a=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,o={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let A,c;for((e.pos>=e.byteLength||!(A=i(e)))&&t(1,"no header found"),(c=A.match(/^#\?(\S+)/))||t(3,"bad initial token"),o.valid|=1,o.programtype=c[1],o.string+=A+"\n";A=i(e),!1!==A;)if(o.string+=A+"\n","#"!==A.charAt(0)){if((c=A.match(s))&&(o.gamma=parseFloat(c[1])),(c=A.match(n))&&(o.exposure=parseFloat(c[1])),(c=A.match(r))&&(o.valid|=2,o.format=c[1]),(c=A.match(a))&&(o.valid|=4,o.height=parseInt(c[1],10),o.width=parseInt(c[2],10)),2&o.valid&&4&o.valid)break}else o.comments+=A+"\n";return 2&o.valid||t(3,"missing format specifier"),4&o.valid||t(3,"missing image size specifier"),o}(r),o=a.width,A=a.height,c=function(e,i,s){const n=i;if(n<8||n>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);n!==(e[2]<<8|e[3])&&t(3,"wrong scanline width");const r=new Uint8Array(4*i*s);r.length||t(4,"unable to allocate buffer space");let a=0,o=0;const A=4*n,c=new Uint8Array(4),l=new Uint8Array(A);let h=s;for(;h>0&&o<e.byteLength;){o+4>e.byteLength&&t(1),c[0]=e[o++],c[1]=e[o++],c[2]=e[o++],c[3]=e[o++],2==c[0]&&2==c[1]&&(c[2]<<8|c[3])==n||t(3,"bad rgbe scanline format");let i,s=0;for(;s<A&&o<e.byteLength;){i=e[o++];const n=i>128;if(n&&(i-=128),(0===i||s+i>A)&&t(3,"bad scanline data"),n){const t=e[o++];for(let e=0;e<i;e++)l[s++]=t}else l.set(e.subarray(o,o+i),s),s+=i,o+=i}const u=n;for(let e=0;e<u;e++){let t=0;r[a]=l[e+t],t+=n,r[a+1]=l[e+t],t+=n,r[a+2]=l[e+t],t+=n,r[a+3]=l[e+t],a+=4}h--}return r}(r.subarray(r.pos),o,A);let l,h,u;switch(this.type){case x.VzW:u=c.length/4;const e=new Float32Array(4*u);for(let i=0;i<u;i++)s(c,4*i,e,4*i);l=e,h=x.VzW;break;case x.cLu:u=c.length/4;const t=new Uint16Array(4*u);for(let i=0;i<u;i++)n(c,4*i,t,4*i);l=t,h=x.cLu;break;default:throw new Error("THREE.RGBELoader: Unsupported type: "+this.type)}return{width:o,height:A,data:l,header:a.string,gamma:a.gamma,exposure:a.exposure,type:h}}setDataType(e){return this.type=e,this}load(e,t,i,s){return super.load(e,(function(e,i){switch(e.type){case x.VzW:case x.cLu:e.colorSpace=x.GUF,e.minFilter=x.wem,e.magFilter=x.wem,e.generateMipmaps=!1,e.flipY=!0}t&&t(e,i)}),i,s)}}const ja={topLight:{intensity:500,position:[.418,16.199,.3]},room:{position:[-.757,13.219,.717],scale:[31.713,28.305,28.591]},boxes:[{position:[-10.906,2.009,1.846],rotation:-.195,scale:[2.328,7.905,4.651]},{position:[-5.607,-.754,-.758],rotation:.994,scale:[1.97,1.534,3.955]},{position:[6.167,.857,7.803],rotation:.561,scale:[3.927,6.285,3.687]},{position:[-2.017,.018,6.124],rotation:.333,scale:[2.002,4.566,2.064]},{position:[2.291,-.756,-2.621],rotation:-.286,scale:[1.546,1.552,1.496]},{position:[-2.193,-.369,-5.547],rotation:.516,scale:[3.875,3.487,2.986]}],lights:[{intensity:50,position:[-16.116,14.37,8.208],scale:[.1,2.428,2.739]},{intensity:50,position:[-16.109,18.021,-8.207],scale:[.1,2.425,2.751]},{intensity:17,position:[14.904,12.198,-1.832],scale:[.15,4.265,6.331]},{intensity:43,position:[-.462,8.89,14.52],scale:[4.38,5.441,.088]},{intensity:20,position:[3.235,11.486,-12.541],scale:[2.5,2,.1]},{intensity:100,position:[0,20,0],scale:[1,.1,1]}]},za={topLight:{intensity:400,position:[.5,14,.5]},room:{position:[0,13.2,0],scale:[31.5,28.5,31.5]},boxes:[{position:[-10.906,-1,1.846],rotation:-.195,scale:[2.328,7.905,4.651]},{position:[-5.607,-.754,-.758],rotation:.994,scale:[1.97,1.534,3.955]},{position:[6.167,-.16,7.803],rotation:.561,scale:[3.927,6.285,3.687]},{position:[-2.017,.018,6.124],rotation:.333,scale:[2.002,4.566,2.064]},{position:[2.291,-.756,-2.621],rotation:-.286,scale:[1.546,1.552,1.496]},{position:[-2.193,-.369,-5.547],rotation:.516,scale:[3.875,3.487,2.986]}],lights:[{intensity:80,position:[-14,10,8],scale:[.1,2.5,2.5]},{intensity:80,position:[-14,14,-4],scale:[.1,2.5,2.5]},{intensity:23,position:[14,12,0],scale:[.1,5,5]},{intensity:16,position:[0,9,14],scale:[5,5,.1]},{intensity:80,position:[7,8,-14],scale:[2.5,2.5,.1]},{intensity:80,position:[-7,16,-14],scale:[2.5,2.5,.1]},{intensity:1,position:[0,20,0],scale:[.1,.1,.1]}]};class Ka extends x.xsS{constructor(e){super(),this.position.y=-3.5;const t=new x.DvJ;t.deleteAttribute("uv");const i=new x.Wid({metalness:0,side:x._Li}),s=new x.Wid({metalness:0}),n="legacy"==e?ja:za,r=new x.cek(16777215,n.topLight.intensity,28,2);r.position.set(...n.topLight.position),this.add(r);const a=new x.Kj0(t,i);a.position.set(...n.room.position),a.scale.set(...n.room.scale),this.add(a);for(const o of n.boxes){const e=new x.Kj0(t,s);e.position.set(...o.position),e.rotation.set(0,o.rotation,0),e.scale.set(...o.scale),this.add(e)}for(const o of n.lights){const e=new x.Kj0(t,this.createAreaLightMaterial(o.intensity));e.position.set(...o.position),e.scale.set(...o.scale),this.add(e)}}createAreaLightMaterial(e){const t=new x.vBJ;return t.color.setScalar(e),t}}const Va=20,Ja=/\.hdr(\.js)?$/;class Ya{constructor(e){this.threeRenderer=e,this.lottieLoaderUrl="",this._ldrLoader=null,this._imageLoader=null,this._hdrLoader=null,this._lottieLoader=null,this.generatedEnvironmentMap=null,this.generatedEnvironmentMapAlt=null,this.skyboxCache=new Map,this.blurMaterial=null,this.blurScene=null}ldrLoader(e){return null==this._ldrLoader&&(this._ldrLoader=new x.dpR),this._ldrLoader.setWithCredentials(e),this._ldrLoader}imageLoader(e){return null==this._imageLoader&&(this._imageLoader=new Ha(this.threeRenderer)),this._imageLoader.setWithCredentials(e),this._imageLoader}hdrLoader(e){return null==this._hdrLoader&&(this._hdrLoader=new qa,this._hdrLoader.setDataType(x.cLu)),this._hdrLoader.setWithCredentials(e),this._hdrLoader}async getLottieLoader(e){if(null==this._lottieLoader){const{LottieLoader:e}=await import(this.lottieLoaderUrl);this._lottieLoader=new e}return this._lottieLoader.setWithCredentials(e),this._lottieLoader}async loadImage(e,t){const i=await new Promise(((i,s)=>this.ldrLoader(t).load(e,i,(()=>{}),s)));return i.name=e,i.flipY=!1,i}async loadLottie(e,t,i){const s=await this.getLottieLoader(i);s.setQuality(t);const n=await new Promise(((t,i)=>s.load(e,t,(()=>{}),i)));return n.name=e,n}async loadEquirect(e,t=!1,i=(()=>{})){try{const s=Ja.test(e),n=s?this.hdrLoader(t):this.imageLoader(t),r=await new Promise(((t,s)=>n.load(e,(e=>{const{renderTarget:i}=e;if(null!=i){const{texture:s}=i;e.dispose(!1),t(s)}else t(e)}),(e=>{i(e.loaded/e.total*.9)}),s)));
vendor: 6,411 bytes, line 407
407return i(1),r.name=e,r.mapping=x.dSO,s||(r.colorSpace=x.KI_),r}finally{i&&i(1)}}async generateEnvironmentMapAndSkybox(e=null,t=null,i=(()=>{}),s=!1){const n="legacy"!==t;"legacy"!==t&&"neutral"!==t||(t=null),t=ve(t);let r,a=Promise.resolve(null);e&&(a=this.loadEquirectFromUrl(e,s,i)),r=t?this.loadEquirectFromUrl(t,s,i):e?this.loadEquirectFromUrl(e,s,i):n?this.loadGeneratedEnvironmentMapAlt():this.loadGeneratedEnvironmentMap();const[o,A]=await Promise.all([r,a]);if(null==o)throw new Error("Failed to load environment map.");return{environmentMap:o,skybox:A}}async loadEquirectFromUrl(e,t,i){if(!this.skyboxCache.has(e)){const s=this.loadEquirect(e,t,i);this.skyboxCache.set(e,s)}return this.skyboxCache.get(e)}async GenerateEnvironmentMap(e,t){await((e=0)=>new Promise((t=>setTimeout(t,e))))();const i=this.threeRenderer,s=new x.oAp(256,{generateMipmaps:!1,type:x.cLu,format:x.wk1,colorSpace:x.GUF,depthBuffer:!0}),n=new x._am(.1,100,s),r=n.renderTarget.texture;r.name=t;const a=i.outputColorSpace,o=i.toneMapping;return i.toneMapping=x.uL9,i.outputColorSpace=x.GUF,n.update(i,e),this.blurCubemap(s,.04),i.toneMapping=o,i.outputColorSpace=a,r}async loadGeneratedEnvironmentMap(){return null==this.generatedEnvironmentMap&&(this.generatedEnvironmentMap=this.GenerateEnvironmentMap(new Ka("legacy"),"legacy")),this.generatedEnvironmentMap}async loadGeneratedEnvironmentMapAlt(){return null==this.generatedEnvironmentMapAlt&&(this.generatedEnvironmentMapAlt=this.GenerateEnvironmentMap(new Ka("neutral"),"neutral")),this.generatedEnvironmentMapAlt}blurCubemap(e,t){if(null==this.blurMaterial){this.blurMaterial=this.getBlurShader(Va);const e=new x.DvJ,t=new x.Kj0(e,this.blurMaterial);this.blurScene=new x.xsS,this.blurScene.add(t)}const i=e.clone();this.halfblur(e,i,t,"latitudinal"),this.halfblur(i,e,t,"longitudinal")}halfblur(e,t,i,s){const n=e.width,r=isFinite(i)?Math.PI/(2*n):2*Math.PI/39,a=i/r,o=isFinite(i)?1+Math.floor(3*a):Va;o>Va&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${o} samples when the maximum is set to 20`);const A=[];let c=0;for(let h=0;h<Va;++h){const e=h/a,t=Math.exp(-e*e/2);A.push(t),0==h?c+=t:h<o&&(c+=2*t)}for(let h=0;h<A.length;h++)A[h]=A[h]/c;const l=this.blurMaterial.uniforms;l.envMap.value=e.texture,l.samples.value=o,l.weights.value=A,l.latitudinal.value="latitudinal"===s,l.dTheta.value=r;new x._am(.1,100,t).update(this.threeRenderer,this.blurScene)}getBlurShader(e){const t=new Float32Array(e),i=new x.Pa4(0,1,0);return new x.jyz({name:"SphericalGaussianBlur",defines:{n:e},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},poleAxis:{value:i}},vertexShader:"\n      \n      varying vec3 vOutputDirection;\n  \n      void main() {\n  \n        vOutputDirection = vec3( position );\n        gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n  \n      }\n    ",fragmentShader:"\n        varying vec3 vOutputDirection;\n  \n        uniform samplerCube envMap;\n        uniform int samples;\n        uniform float weights[ n ];\n        uniform bool latitudinal;\n        uniform float dTheta;\n        uniform vec3 poleAxis;\n  \n        vec3 getSample( float theta, vec3 axis ) {\n  \n          float cosTheta = cos( theta );\n          // Rodrigues' axis-angle rotation\n          vec3 sampleDirection = vOutputDirection * cosTheta\n            + cross( axis, vOutputDirection ) * sin( theta )\n            + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n  \n          return vec3( textureCube( envMap, sampleDirection ) );\n  \n        }\n  \n        void main() {\n  \n          vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n  \n          if ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n  \n            axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n  \n          }\n  \n          axis = normalize( axis );\n  \n          gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n          gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n  \n          for ( int i = 1; i < n; i++ ) {\n  \n            if ( i >= samples ) {\n  \n              break;\n  \n            }\n  \n            float theta = dTheta * float( i );\n            gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n            gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n  \n          }\n        }\n      ",blending:x.jFi,depthTest:!1,depthWrite:!1,side:x._Li})}async dispose(){for(const[,e]of this.skyboxCache){(await e).dispose()}null!=this.generatedEnvironmentMap&&((await this.generatedEnvironmentMap).dispose(),this.generatedEnvironmentMap=null),null!=this.generatedEnvironmentMapAlt&&((await this.generatedEnvironmentMapAlt).dispose(),this.generatedEnvironmentMapAlt=null),null!=this.blurMaterial&&this.blurMaterial.dispose()}}const Wa=[1,.79,.62,.5,.4,.31,.25],$a="high-performance";class Xa extends x.pBf{static get singleton(){return this._singleton||(this._singleton=new Xa({powerPreference:(self.ModelViewerElement||{}).powerPreference||$a,debug:Re()})),this._singleton}static resetSingleton(){const e=this._singleton.dispose();for(const t of e)t.disconnectedCallback();this._singleton=new Xa({powerPreference:(self.ModelViewerElement||{}).powerPreference||$a,debug:Re()});for(const t of e)t.connectedCallback()}get canRender(){return null!=this.threeRenderer}get scaleFactor(){return Wa[this.scaleStep]}set minScale(e){let t=1;for(;t<Wa.length&&!(Wa[t]<e);)++t;this.lastStep=t-1}constructor(e){super(),this.loader=new Ti(Sa),this.width=0,this.height=0,this.dpr=1,this.scenes=new Set,this.multipleScenesVisible=!1,this.lastTick=performance.now(),this.renderedLastFrame=!1,this.scaleStep=0,this.lastStep=3,this.avgFrameDuration=50,this.onWebGLContextLost=e=>{this.dispatchEvent({type:"contextlost",sourceEvent:e})},this.onWebGLContextRestored=()=>{var e;null===(e=this.textureUtils)||void 0===e||e.dispose(),this.textureUtils=new Ya(this.threeRenderer);for(const t of this.scenes)t.element[Fe]()},this.dpr=window.devicePixelRatio,this.canvas3D=document.createElement("canvas"),this.canvas3D.id="webgl-canvas",this.canvas3D.classList.add("show");try{this.threeRenderer=new _s.CP7({canvas:this.canvas3D,alpha:!0,antialias:!0,powerPreference:e.powerPreference,preserveDrawingBuffer:!0}),this.threeRenderer.autoClear=!0,this.threeRenderer.setPixelRatio(1),this.threeRenderer.debug={checkSha
vendor: 10,861 bytes, line 407
407derErrors:!!e.debug,onShaderError:null},this.threeRenderer.toneMapping=x.ORg}catch(t){console.warn(t)}this.arRenderer=new ca(this),this.textureUtils=this.canRender?new Ya(this.threeRenderer):null,Ti.initializeKTX2Loader(this.threeRenderer),this.canvas3D.addEventListener("webglcontextlost",this.onWebGLContextLost),this.canvas3D.addEventListener("webglcontextrestored",this.onWebGLContextRestored),this.updateRendererSize()}registerScene(e){this.scenes.add(e),e.forceRescale();const t=new x.FM8;this.threeRenderer.getSize(t),e.canvas.width=t.x,e.canvas.height=t.y,this.canRender&&this.scenes.size>0&&this.threeRenderer.setAnimationLoop(((e,t)=>this.render(e,t)))}unregisterScene(e){this.scenes.delete(e),this.canvas3D.parentElement===e.canvas.parentElement&&e.canvas.parentElement.removeChild(this.canvas3D),this.canRender&&0===this.scenes.size&&this.threeRenderer.setAnimationLoop(null)}displayCanvas(e){return e.element.modelIsVisible&&!this.multipleScenesVisible?this.canvas3D:e.element[qc]}countVisibleScenes(){const{canvas3D:e}=this;let t=0,i=null;for(const n of this.scenes){const{element:s}=n;s.modelIsVisible&&null==n.externalRenderer&&++t,e.parentElement===n.canvas.parentElement&&(i=n)}const s=t>1;if(null!=i){const t=s&&!this.multipleScenesVisible,n=!i.element.modelIsVisible;if(t||n){const{width:t,height:s}=this.sceneSize(i);this.copyPixels(i,t,s),e.parentElement.removeChild(e)}}this.multipleScenesVisible=s}updateRendererSize(){var e;const t=window.devicePixelRatio;if(t!==this.dpr)for(const n of this.scenes){const{element:e}=n;e[Rc](e.getBoundingClientRect())}let i=0,s=0;for(const n of this.scenes)i=Math.max(i,n.width),s=Math.max(s,n.height);if(i!==this.width||s!==this.height||t!==this.dpr){this.width=i,this.height=s,this.dpr=t,i=Math.ceil(i*t),s=Math.ceil(s*t),this.canRender&&this.threeRenderer.setSize(i,s,!1);for(const t of this.scenes){const{canvas:n}=t;n.width=i,n.height=s,t.forceRescale(),null===(e=t.effectRenderer)||void 0===e||e.setSize(i,s)}}}updateRendererScale(e){const t=this.scaleStep;this.avgFrameDuration+=Me(.2*(e-this.avgFrameDuration),-5,5),this.avgFrameDuration>60?++this.scaleStep:this.avgFrameDuration<40&&this.scaleStep>0&&--this.scaleStep,this.scaleStep=Math.min(this.scaleStep,this.lastStep),t!==this.scaleStep&&(this.avgFrameDuration=50)}shouldRender(e){if(e.shouldRender())e.scaleStep!=this.scaleStep&&(e.scaleStep=this.scaleStep,this.rescaleCanvas(e));else{if(0==e.scaleStep)return!1;e.scaleStep=0,this.rescaleCanvas(e)}return!0}rescaleCanvas(e){const t=Wa[e.scaleStep],i=Math.ceil(this.width/t),s=Math.ceil(this.height/t),{style:n}=e.canvas;n.width=`${i}px`,n.height=`${s}px`,this.canvas3D.style.width=`${i}px`,this.canvas3D.style.height=`${s}px`;const r=this.dpr*t,a=t<1?"GPU throttling":this.dpr!==window.devicePixelRatio?"No meta viewport tag":"";e.element.dispatchEvent(new CustomEvent("render-scale",{detail:{reportedDpr:window.devicePixelRatio,renderedDpr:r,minimumDpr:this.dpr*Wa[this.lastStep],pixelWidth:Math.ceil(e.width*r),pixelHeight:Math.ceil(e.height*r),reason:a}}))}sceneSize(e){const{dpr:t}=this,i=Wa[e.scaleStep];return{width:Math.min(Math.ceil(e.width*i*t),this.canvas3D.width),height:Math.min(Math.ceil(e.height*i*t),this.canvas3D.height)}}copyPixels(e,t,i){const s=e.context;null!=s?(s.clearRect(0,0,t,i),s.drawImage(this.canvas3D,0,0,t,i,0,0,t,i),e.canvas.classList.add("show")):console.log("could not acquire 2d context")}orderedScenes(){const e=[];for(const t of[!1,!0])for(const i of this.scenes)i.element.modelIsVisible===t&&e.push(i);return e}get isPresenting(){return this.arRenderer.isPresenting}preRender(e,t,i){const{element:s,exposure:n,toneMapping:r}=e;s[Kc](t,i);const a="number"===typeof n&&!Number.isNaN(n),o=s.environmentImage,A=s.skyboxImage,c=r===x.ORg&&("neutral"===o||"legacy"===o||!o&&!A);this.threeRenderer.toneMappingExposure=(a?n:1)*(c?1.3:1)}render(e,t){if(null!=t)return void this.arRenderer.onWebXRFrame(e,t);const i=e-this.lastTick;if(this.lastTick=e,!this.canRender||this.isPresenting)return;this.countVisibleScenes(),this.updateRendererSize(),this.renderedLastFrame&&(this.updateRendererScale(i),this.renderedLastFrame=!1);const{canvas3D:s}=this;for(const n of this.orderedScenes()){const{element:t}=n;if(!t.loaded||!t.modelIsVisible&&n.renderCount>0)continue;if(this.preRender(n,e,i),!this.shouldRender(n))continue;if(null!=n.externalRenderer){const e=n.getCamera();e.updateMatrix();const{matrix:t,projectionMatrix:i}=e,s=t.elements.slice(),r=n.getTarget();s[12]+=r.x,s[13]+=r.y,s[14]+=r.z,n.externalRenderer.render({viewMatrix:s,projectionMatrix:i.elements});continue}if(!t.modelIsVisible&&!this.multipleScenesVisible)for(const e of this.scenes)e.element.modelIsVisible&&e.queueRender();const{width:r,height:a}=this.sceneSize(n);n.renderShadow(this.threeRenderer),this.threeRenderer.setRenderTarget(null),this.threeRenderer.setViewport(0,Math.ceil(this.height*this.dpr)-a,r,a),null!=n.effectRenderer?n.effectRenderer.render(i):(this.threeRenderer.autoClear=!0,this.threeRenderer.toneMapping=n.toneMapping,this.threeRenderer.render(n,n.camera)),this.multipleScenesVisible||!n.element.modelIsVisible&&0===n.renderCount?this.copyPixels(n,r,a):s.parentElement!==n.canvas.parentElement&&(n.canvas.parentElement.appendChild(s),n.canvas.classList.remove("show")),n.hasRendered(),++n.renderCount,this.renderedLastFrame=!0}}dispose(){null!=this.textureUtils&&this.textureUtils.dispose(),null!=this.threeRenderer&&this.threeRenderer.dispose(),this.textureUtils=null,this.threeRenderer=null;const e=[];for(const t of this.scenes)e.push(t.element);return this.canvas3D.removeEventListener("webglcontextlost",this.onWebGLContextLost),this.canvas3D.removeEventListener("webglcontextrestored",this.onWebGLContextRestored),e}}const Za=Symbol("correlatedObjects"),eo=Symbol("onUpdate");class to{constructor(e,t){this[eo]=e,this[Za]=t}}const io=new x.vBJ,so=new x._12(2,2);let no=0;const ro=Symbol("threeTexture"),ao=Symbol("threeTextures");Symbol("applyTexture");class oo extends to{get[ro](){var e;return null===(e=this[Za])||void 0===e?void 0:e.values().next().value}get[ao](){return this[Za]}constructor(e,t){super(e,new Set(t?[t]:[])),this[ro].image.src||(this[ro].image.src=t.name?t.name:"adhoc_image"+no++),this[ro].image.name||(this[ro].image.name=t&&t.image&&t.image.src?t.image.src.split("/").pop():"adhoc_image")}get name(){return this[ro].image.name||""}get uri(){return this[ro].image.src}get bufferView(){return this[ro].image.bufferView}get element(){const e=this[ro];if(e&&(e.isCanvasTexture||e.isVideoTexture))return e.image}get animation(){const e=this[ro];if(e&&e.isCanvasTexture&&e.animation)return e.animation}get type(){return null!=this.uri?"external":"embedded"}set name(e){for(const t of this[ao])t.image.name=e}update(){const e=this[ro];e&&e.isCanvasTexture&&!e.animation&&(this[ro].needsUpdate=!0,this[eo]())}async createThumbnail(e,t){const i=new x.xsS;io.map=this[ro];const s=new x.Kj0(so,io);i.add(s);const n=new x.iKG(-1,1,1,-1,0,1),{threeRenderer:r}=Xa.singleton,a=new x.dd2(e,t);r.setRenderTarget(a),r.render(i,n),r.setRenderTarget(null);const o=new Uint8Array(e*t*4);r.readRenderTargetPixels(a,0,0,e,t,o),Cc.width=e,Cc.height=t;const A=Cc.getContext("2d"),c=A.createImageData(e,t);return c.data.set(o),A.putImageData(c,0,0),new Promise((async(e,t)=>{Cc.toBlob((i=>{if(!i)return t("Failed to capture thumbnail.");e(URL.createObjectURL(i))}),"image/png")}))}}var Ao,co;!function(e){e[e.Nearest=9728]="Nearest",e[e.Linear=9729]="Linear",e[e.NearestMipmapNearest=9984]="NearestMipmapNearest",e[e.LinearMipmapNearest=9985]="LinearMipmapNearest",e[e.NearestMipmapLinear=9986]="NearestMipmapLinear",e[e.LinearMipmapLinear=9987]="LinearMipmapLinear"}(Ao||(Ao={})),function(e){e[e.ClampToEdge=33071]="ClampToEdge",e[e.MirroredRepeat=33648]="MirroredRepeat",e[e.Repeat=10497]="Repeat"}(co||(co={}));const lo=new Map([[co.Repeat,x.rpg],[co.ClampToEdge,x.uWy],[co.MirroredRepeat,x.OoA]]),ho=new Map([[x.rpg,co.Repeat],[x.uWy,co.ClampToEdge],[x.OoA,co.MirroredRepeat]]),uo=new Map([[Ao.Nearest,x.TyD],[Ao.Linear,x.wem],[Ao.NearestMipmapNearest,x.YLQ],[Ao.LinearMipmapNearest,x.qyh],[Ao.NearestMipmapLinear,x.aH4],[Ao.LinearMipmapLinear,x.D1R]]),go=new Map([[x.TyD,Ao.Nearest],[x.wem,Ao.Linear],[x.YLQ,Ao.NearestMipmapNearest],[x.qyh,Ao.LinearMipmapNearest],[x.aH4,Ao.NearestMipmapLinear],[x.D1R,Ao.LinearMipmapLinear]]),po=new Map([[Ao.Nearest,x.TyD],[Ao.Linear,x.wem]]),mo=new Map([[x.TyD,Ao.Nearest],[x.wem,Ao.Linear]]),fo=e=>go.has(e),bo=e=>mo.has(e),Io=e=>ho.has(e),Co=Symbol("threeTexture"),Eo=Symbol("threeTextures"),yo=Symbol("setProperty");class Bo extends to{get[Co](){var e;return null===(e=this[Za])||void 0===e?void 0:e.values().next().value}get[Eo](){return this[Za]}constructor(e,t){super(e,new Set(t?[t]:[]))}get name(){return this[Co].name||""}get minFilter(){return go.get(this[Co].minFilter)}get magFilter(){return mo.get(this[Co].magFilter)}get wrapS(){return ho.get(this[Co].wrapS)}get wrapT(){return ho.get(this[Co].wrapT)}get rotation(){return this[Co].rotation}get scale(){return tl(this[Co].repeat)}get offset(){return tl(this[Co].offset)}setMinFilter(e){this[yo]("minFilter",uo.get(e))}setMagFilter(e){this[yo]("magFilter",po.get(e))}setWrapS(e){this[yo]("wrapS",lo.get(e))}setWrapT(e){this[yo]("wrapT",lo.get(e))}setRotation(e){null==e&&(e=0),this[yo]("rotation",e)}setScale(e){null==e&&(e={u:1,v:1}),this[yo]("repeat",new x.FM8(e.u,e.v))}setOffset(e){null==e&&(e={u:0,v:0}),this[yo]("offset",new x.FM8(e.u,e.v))}[yo](e,t){if(((e,t)=>{switch(e){case"minFilter":return fo(t);case"magFilter":return bo(t);case"wrapS":case"wrapT":return Io(t);case"rotation":case"repeat":case"offset":return!0;default:throw new Error(`Cannot configure property "${e}" on Sampler`)}})(e,t))for(const i of this[Eo])i[e]=t,i.needsUpdate=!0;this[eo]()}}const wo=Symbol("image"),vo=Symbol("sampler"),Qo=Symbol("threeTexture");class xo extends to{get[Qo](){var e;return null===(e=this[Za])||void 0===e?void 0:e.values().next().value}constructor(e,t){super(e,new Set(t?[t]:[])),this[vo]=new Bo(e,t),this[wo]=new oo(e,t)}get name(){return this[Qo].name||""}set name(e){for(const t of this[Za])t.name=e}get sampler(){return this[vo]}get source(){return this[wo]}}var So,Mo,Ro;const To=Symbol("texture"),Do=Symbol("transform"),ko=Symbol("materials"),Fo=Symbol("usage"),Lo=Symbol("onUpdate"),Uo=Symbol("activeVideo");var _o;!function(e){e[e.Base=0]="Base",e[e.MetallicRoughness=1]="MetallicRoughness",e[e.Normal=2]="Normal",e[e.Occlusion=3]="Occlusion",e[e.Emissive=4]="Emissive",e[e.Clearcoat=5]="Clearcoat",e[e.ClearcoatRoughness=6]="ClearcoatRoughness",e[e.ClearcoatNormal=7]="ClearcoatNormal",e[e.SheenColor=8]="SheenColor",e[e.SheenRoughness=9]="SheenRoughness",e[e.Transmission=10]="Transmission",e[e.Thickness=11]="Thickness",e[e.Specular=12]="Specular",e[e.SpecularColor=13]="SpecularColor",e[e.Iridescence=14]="Iridescence",e[e.IridescenceThickness=1
vendor: 12,513 bytes, line 407
4075]="IridescenceThickness",e[e.Anisotropy=16]="Anisotropy"}(_o||(_o={}));class Go{constructor(e,t,i,s){this[So]=null,this[Mo]={rotation:0,scale:new x.FM8(1,1),offset:new x.FM8(0,0)},this[Ro]=!1,i&&(this[Do].rotation=i.rotation,this[Do].scale.copy(i.repeat),this[Do].offset.copy(i.offset),this[To]=new xo(e,i)),this[Lo]=e,this[ko]=s,this[Fo]=t}get texture(){return this[To]}setTexture(e){var t,i;const s=null!=e?e.source[ro]:null,n=null===(t=this[To])||void 0===t?void 0:t.source[ro];if(null!=n&&n.isVideoTexture?this[Uo]=!1:(null===(i=this[To])||void 0===i?void 0:i.source.animation)&&this[To].source.animation.removeEventListener("enterFrame",this[Lo]),this[To]=e,null!=s&&s.isVideoTexture){const e=s.image;if(this[Uo]=!0,null!=e.requestVideoFrameCallback){const t=()=>{this[Uo]&&(this[Lo](),e.requestVideoFrameCallback(t))};e.requestVideoFrameCallback(t)}else{const e=()=>{this[Uo]&&(this[Lo](),requestAnimationFrame(e))};requestAnimationFrame(e)}}else null!=(null===e||void 0===e?void 0:e.source.animation)&&e.source.animation.addEventListener("enterFrame",this[Lo]);let r=x.KI_;if(this[ko])for(const a of this[ko]){switch(this[Fo]){case _o.Base:a.map=s;break;case _o.MetallicRoughness:r=x.GUF,a.metalnessMap=s,a.roughnessMap=s;break;case _o.Normal:r=x.GUF,a.normalMap=s;break;case _o.Occlusion:r=x.GUF,a.aoMap=s;break;case _o.Emissive:a.emissiveMap=s;break;case _o.Clearcoat:a.clearcoatMap=s;break;case _o.ClearcoatRoughness:a.clearcoatRoughnessMap=s;break;case _o.ClearcoatNormal:a.clearcoatNormalMap=s;break;case _o.SheenColor:a.sheenColorMap=s;break;case _o.SheenRoughness:a.sheenRoughnessMap=s;break;case _o.Transmission:a.transmissionMap=s;break;case _o.Thickness:a.thicknessMap=s;break;case _o.Specular:a.specularIntensityMap=s;break;case _o.SpecularColor:a.specularColorMap=s;break;case _o.Iridescence:a.iridescenceMap=s;break;case _o.IridescenceThickness:a.iridescenceThicknessMap=s;break;case _o.Anisotropy:a.anisotropyMap=s}a.needsUpdate=!0}s&&(s.colorSpace=r,s.rotation=this[Do].rotation,s.repeat=this[Do].scale,s.offset=this[Do].offset),this[Lo]()}}So=To,Mo=Do,Ro=Uo;const Po=Symbol("threeMaterial"),Oo=Symbol("threeMaterials"),No=Symbol("baseColorTexture"),Ho=Symbol("metallicRoughnessTexture");class qo extends to{get[Oo](){return this[Za]}get[Po](){var e;return null===(e=this[Za])||void 0===e?void 0:e.values().next().value}constructor(e,t){super(e,t);const{map:i,metalnessMap:s}=t.values().next().value;this[No]=new Go(e,_o.Base,i,t),this[Ho]=new Go(e,_o.MetallicRoughness,s,t)}get baseColorFactor(){const e=[0,0,0,this[Po].opacity];return this[Po].color.toArray(e),e}get metallicFactor(){return this[Po].metalness}get roughnessFactor(){return this[Po].roughness}get baseColorTexture(){return this[No]}get metallicRoughnessTexture(){return this[Ho]}setBaseColorFactor(e){const t=new x.Ilk;e instanceof Array?t.fromArray(e):t.set(e);for(const i of this[Oo])i.color.set(t),e instanceof Array&&e.length>3?i.opacity=e[3]:(e=[0,0,0,i.opacity],t.toArray(e));this[eo]()}setMetallicFactor(e){for(const t of this[Oo])t.metalness=e;this[eo]()}setRoughnessFactor(e){for(const t of this[Oo])t.roughness=e;this[eo]()}}var jo,zo;const Ko=Symbol("pbrMetallicRoughness"),Vo=Symbol("normalTexture"),Jo=Symbol("occlusionTexture"),Yo=Symbol("emissiveTexture"),Wo=Symbol("backingThreeMaterial"),$o=Symbol("applyAlphaCutoff"),Xo=Symbol("getAlphaMode"),Zo=Symbol("lazyLoadGLTFInfo"),eA=Symbol("initialize"),tA=Symbol("getLoadedMaterial"),iA=Symbol("ensureMaterialIsLoaded"),sA=Symbol("gltfIndex"),nA=Symbol("setActive"),rA=Symbol("variantIndices"),aA=Symbol("isActive"),oA=Symbol("modelVariants"),AA=Symbol("name"),cA=Symbol("pbrTextures");class lA extends to{get[(jo=rA,zo=cA,Wo)](){return this[Za].values().next().value}constructor(e,t,i,s,n,r,a){super(e,n),this[jo]=new Set,this[zo]=new Map,this[sA]=t,this[aA]=i,this[oA]=s,this[AA]=r,null==a?this[eA]():this[Zo]=a}[eA](){const e=this[eo],t=this[Za];this[Ko]=new qo(e,t);const{normalMap:i,aoMap:s,emissiveMap:n}=t.values().next().value;this[Vo]=new Go(e,_o.Normal,i,t),this[Jo]=new Go(e,_o.Occlusion,s,t),this[Yo]=new Go(e,_o.Emissive,n,t);const r=i=>{this[cA].set(i,new Go(e,i,null,t))};r(_o.Clearcoat),r(_o.ClearcoatRoughness),r(_o.ClearcoatNormal),r(_o.SheenColor),r(_o.SheenRoughness),r(_o.Transmission),r(_o.Thickness),r(_o.Specular),r(_o.SpecularColor),r(_o.Iridescence),r(_o.IridescenceThickness),r(_o.Anisotropy)}async[tA](){if(null!=this[Zo]){const e=await this[Zo].doLazyLoad();return this[eA](),this[Zo]=void 0,this.ensureLoaded=async()=>{},e}return null}colorFromRgb(e){const t=new x.Ilk;return e instanceof Array?t.fromArray(e):t.set(e),t}[iA](){if(null!=this[Zo])throw new Error(`Material "${this.name}" has not been loaded, call 'await\n    myMaterial.ensureLoaded()' before using an unloaded material.`)}async ensureLoaded(){await this[tA]()}get isLoaded(){return null==this[Zo]}get isActive(){return this[aA]}[nA](e){this[aA]=e}get name(){return this[AA]||""}set name(e){if(this[AA]=e,null!=this[Za])for(const t of this[Za])t.name=e}get pbrMetallicRoughness(){return this[iA](),this[Ko]}get normalTexture(){return this[iA](),this[Vo]}get occlusionTexture(){return this[iA](),this[Jo]}get emissiveTexture(){return this[iA](),this[Yo]}get emissiveFactor(){return this[iA](),this[Wo].emissive.toArray()}get index(){return this[sA]}hasVariant(e){const t=this[oA].get(e);return null!=t&&this[rA].has(t.index)}setEmissiveFactor(e){this[iA]();const t=this.colorFromRgb(e);for(const i of this[Za])i.emissive.set(t);this[eo]()}[Xo](){return this[Wo].transparent?"BLEND":this[Wo].alphaTest>0?"MASK":"OPAQUE"}[$o](){this[iA]();for(const e of this[Za])"MASK"===this[Xo]()?void 0==e.alphaTest&&(e.alphaTest=.5):e.alphaTest=void 0,e.needsUpdate=!0}setAlphaCutoff(e){this[iA]();for(const t of this[Za])t.alphaTest=e,t.needsUpdate=!0;this[$o](),this[eo]()}getAlphaCutoff(){return this[iA](),this[Wo].alphaTest}setDoubleSided(e){this[iA]();for(const t of this[Za])t.side=e?x.ehD:x.Wl3,t.needsUpdate=!0;this[eo]()}getDoubleSided(){return this[iA](),this[Wo].side==x.ehD}setAlphaMode(e){this[iA]();const t=(e,t)=>{e.transparent=t,e.depthWrite=!t};for(const i of this[Za])t(i,"BLEND"===e),i.alphaTest="MASK"===e?.5:void 0,i.needsUpdate=!0;this[eo]()}getAlphaMode(){return this[iA](),this[Xo]()}get emissiveStrength(){return this[iA](),this[Wo].emissiveIntensity}setEmissiveStrength(e){this[iA]();for(const t of this[Za])t.emissiveIntensity=e;this[eo]()}get clearcoatFactor(){return this[iA](),this[Wo].clearcoat}get clearcoatRoughnessFactor(){return this[iA](),this[Wo].clearcoatRoughness}get clearcoatTexture(){return this[iA](),this[cA].get(_o.Clearcoat)}get clearcoatRoughnessTexture(){return this[iA](),this[cA].get(_o.ClearcoatRoughness)}get clearcoatNormalTexture(){return this[iA](),this[cA].get(_o.ClearcoatNormal)}get clearcoatNormalScale(){return this[iA](),this[Wo].clearcoatNormalScale.x}setClearcoatFactor(e){this[iA]();for(const t of this[Za])t.clearcoat=e;this[eo]()}setClearcoatRoughnessFactor(e){this[iA]();for(const t of this[Za])t.clearcoatRoughness=e;this[eo]()}setClearcoatNormalScale(e){this[iA]();for(const t of this[Za])t.clearcoatNormalScale=new x.FM8(e,e);this[eo]()}get ior(){return this[iA](),this[Wo].ior}setIor(e){this[iA]();for(const t of this[Za])t.ior=e;this[eo]()}get sheenColorFactor(){return this[iA](),this[Wo].sheenColor.toArray()}get sheenColorTexture(){return this[iA](),this[cA].get(_o.SheenColor)}get sheenRoughnessFactor(){return this[iA](),this[Wo].sheenRoughness}get sheenRoughnessTexture(){return this[iA](),this[cA].get(_o.SheenRoughness)}setSheenColorFactor(e){this[iA]();const t=this.colorFromRgb(e);for(const i of this[Za])i.sheenColor.set(t),i.sheen=1;this[eo]()}setSheenRoughnessFactor(e){this[iA]();for(const t of this[Za])t.sheenRoughness=e,t.sheen=1;this[eo]()}get transmissionFactor(){return this[iA](),this[Wo].transmission}get transmissionTexture(){return this[iA](),this[cA].get(_o.Transmission)}setTransmissionFactor(e){this[iA]();for(const t of this[Za])t.transmission=e;this[eo]()}get thicknessFactor(){return this[iA](),this[Wo].thickness}get thicknessTexture(){return this[iA](),this[cA].get(_o.Thickness)}get attenuationDistance(){return this[iA](),this[Wo].attenuationDistance}get attenuationColor(){return this[iA](),this[Wo].attenuationColor.toArray()}setThicknessFactor(e){this[iA]();for(const t of this[Za])t.thickness=e;this[eo]()}setAttenuationDistance(e){this[iA]();for(const t of this[Za])t.attenuationDistance=e;this[eo]()}setAttenuationColor(e){this[iA]();const t=this.colorFromRgb(e);for(const i of this[Za])i.attenuationColor.set(t);this[eo]()}get specularFactor(){return this[iA](),this[Wo].specularIntensity}get specularTexture(){return this[iA](),this[cA].get(_o.Specular)}get specularColorFactor(){return this[iA](),this[Wo].specularColor.toArray()}get specularColorTexture(){return this[iA](),this[cA].get(_o.SheenColor)}setSpecularFactor(e){this[iA]();for(const t of this[Za])t.specularIntensity=e;this[eo]()}setSpecularColorFactor(e){this[iA]();const t=this.colorFromRgb(e);for(const i of this[Za])i.specularColor.set(t);this[eo]()}get iridescenceFactor(){return this[iA](),this[Wo].iridescence}get iridescenceTexture(){return this[iA](),this[cA].get(_o.Iridescence)}get iridescenceIor(){return this[iA](),this[Wo].iridescenceIOR}get iridescenceThicknessMinimum(){return this[iA](),this[Wo].iridescenceThicknessRange[0]}get iridescenceThicknessMaximum(){return this[iA](),this[Wo].iridescenceThicknessRange[1]}get iridescenceThicknessTexture(){return this[iA](),this[cA].get(_o.IridescenceThickness)}setIridescenceFactor(e){this[iA]();for(const t of this[Za])t.iridescence=e;this[eo]()}setIridescenceIor(e){this[iA]();for(const t of this[Za])t.iridescenceIOR=e;this[eo]()}setIridescenceThicknessMinimum(e){this[iA]();for(const t of this[Za])t.iridescenceThicknessRange[0]=e;this[eo]()}setIridescenceThicknessMaximum(e){this[iA]();for(const t of this[Za])t.iridescenceThicknessRange[1]=e;this[eo]()}get anisotropyStrength(){return this[iA](),this[Wo].anisotropy}get anisotropyRotation(){return this[iA](),this[Wo].anisotropyRotation}get anisotropyTexture(){return this[iA](),this[cA].get(_o.Anisotropy)}setAnisotropyStrength(e){this[iA]();for(const t of this[Za])t.anisotropy=e;this[eo]()}setAnisotropyRotation(e){this[iA]();for(const t of this[Za])t.anisotropyRotation=e;this[eo]()}}class hA{constructor(e){this.name="",this.children=new Array,this.name=e}}class uA extends hA{constructor(e,t,i,s){super(e.name),this.materials=new Map,this.variantToMaterialMap=new Map,this.initialMaterialIdx=0,this.activeMaterialIdx=0,this.mesh=e;const{gltf:n,threeGLTF:r,threeObjectMap:a}=s;this.parser=r.parser,this.modelVariants=i,this.mesh.userData.variantData=i;const o=a.get(e.material);null!=o.materials?this.initialMaterialIdx=this.activeMaterialIdx=o.materials:console.error(`Primitive (${e.name}) missing initial material reference.`);const A=e.userData.associations||{};if(null==A.meshes)return void console.error("Mesh is missing primitive index association");const c=((n.meshes||[])[A.meshes].primitives||[])[A.primitives];if(null!=c){if(null!=c.material)this.materials.set(c.material,t[c.material]);else{const e=t.findIndex((e=>"Default"===e.name));e>=0?this.materials.set(e,t[e]):console.warn("gltfPrimitive has no material!")}if(c.extensions&&c.extensions.KHR_materials_variants){const e=c.extensions.KHR_materials_variants,s=r.parser.json.extensions.KHR_materials_variants.variants;for(const n of e.mappings){const e=t[n.material];this.materials.set(n.material,e);for(const t of n.variants){const{name:n}=s[t];this.variantToMaterialMap.set(t,e),e[rA].add(t),i.has(n)||i.set(n,{name:n,index:t})}}}}else console.error("Mesh primitive definition is missing.")}async setActiveMaterial(e){const t=this.materials.get(e);if(e!==this.activeMaterialIdx){const i=t[Za],s=await t[tA]();this.mesh.material=null!=s?s:i.values().next().value,this.parser.assignFinalMaterial(this.mesh),i.add(this.mesh.material),this.activeMaterialIdx=e}return this.mesh.material}getActiveMaterial(){return this.materials.get(this.activeMaterialIdx)}getMaterial(e){return this.materials.get(e)}async enableVariant(e){if(null==e)return this.setActiveMaterial(this.initialMaterialIdx);if(null!=this.variantToMaterialMap&&this.modelVariants.has(e)){const t=this.modelVariants.get(e);return this.enableVariantHelper(t.index)}return null}async enableVariantHelper(e){if(null!=this.variantToMaterialMap&&null!=e){const t=this.variantToMaterialMap.get(e);if(null!=t)return this.setActiveMaterial(t.index)}return null}
vendor: 22,048 bytes, line 407
407async instantiateVariants(){if(null!=this.variantToMaterialMap)for(const e of this.variantToMaterialMap.keys()){const t=this.mesh.userData.variantMaterials.get(e);if(null!=t.material)continue;const i=await this.enableVariantHelper(e);null!=i&&(t.material=i)}}get variantInfo(){return this.variantToMaterialMap}addVariant(e,t){if(!this.ensureVariantIsUnused(t))return!1;this.modelVariants.has(t)||this.modelVariants.set(t,{name:t,index:this.modelVariants.size});const i=this.modelVariants.get(t).index;return e[rA].add(i),this.variantToMaterialMap.set(i,e),this.materials.set(e.index,e),this.updateVariantUserData(i,e),!0}deleteVariant(e){if(this.variantInfo.has(e)){this.variantInfo.delete(e);const t=this.mesh.userData.variantMaterials;null!=t&&t.delete(e)}}updateVariantUserData(e,t){t[rA].add(e),this.mesh.userData.variantData=this.modelVariants,this.mesh.userData.variantMaterials=this.mesh.userData.variantMaterials||new Map;this.mesh.userData.variantMaterials.set(e,{material:t[Za].values().next().value,gltfMaterialIndex:t.index})}ensureVariantIsUnused(e){const t=this.modelVariants.get(e);return null==t||!this.variantInfo.has(t.index)||(console.warn(`Primitive cannot add variant '${e}' for this material, it already exists.`),!1)}}var gA,dA,pA,mA,fA,bA;const IA=Symbol("materials"),CA=Symbol("hierarchy"),EA=Symbol("roots"),yA=Symbol("primitives"),BA=(Symbol("loadVariant"),Symbol("prepareVariantsForExport")),wA=Symbol("switchVariant"),vA=Symbol("materialFromPoint"),QA=Symbol("nodeFromPoint"),xA=Symbol("nodeFromIndex"),SA=Symbol("variantData"),MA=Symbol("availableVariants"),RA=Symbol("modelOnUpdate"),TA=Symbol("cloneMaterial");class DA{constructor(e,t,i,s){this.gltf=e,this.gltfElementMap=t,this.mapKey=i,this.doLazyLoad=s}}class kA{constructor(e,t=(()=>{})){this[gA]=new Array,this[dA]=new Array,this[pA]=new Array,this[mA]=new Array,this[fA]=()=>{},this[bA]=new Map,this[RA]=t;const{gltf:i,threeGLTF:s,gltfElementMap:n}=e;for(const[o,A]of i.materials.entries()){const e=n.get(A);if(null!=e)this[IA].push(new lA(t,o,!0,this[SA],e,A.name));else{const e=(i.materials||[])[o],r=new Set;n.set(e,r);const a=async()=>{const e=await s.parser.getDependency("material",o);return r.add(e),e};this[IA].push(new lA(t,o,!1,this[SA],r,A.name,new DA(i,n,e,a)))}}const r=new Map,a=new Array;for(const o of s.scene.children)a.push(o);for(;a.length>0;){const t=a.pop();let i=null;t instanceof x.Kj0?(i=new uA(t,this.materials,this[SA],e),this[yA].push(i)):i=new hA(t.name);const s=r.get(t);null!=s?s.children.push(i):this[EA].push(i),this[CA].push(i);for(const e of t.children)a.push(e),r.set(t,i)}}get materials(){return this[IA]}[(gA=IA,dA=CA,pA=EA,mA=yA,fA=RA,bA=SA,MA)](){const e=Array.from(this[SA].values());return e.sort(((e,t)=>e.index-t.index)),e.map((e=>e.name))}getMaterialByName(e){const t=this[IA].filter((t=>t.name===e));return t.length>0?t[0]:null}[xA](e,t){const i=this[CA].find((i=>{if(i instanceof uA){const{meshes:s,primitives:n}=i.mesh.userData.associations;if(s==e&&n==t)return!0}return!1}));return null==i?null:i}[QA](e){return this[CA].find((t=>{if(t instanceof uA){if(t.mesh===e.object)return!0}return!1}))}[vA](e){return this[QA](e).getActiveMaterial()}async[wA](e){for(const t of this[yA])await t.enableVariant(e);for(const t of this.materials)t[nA](!1);for(const t of this[yA])this.materials[t.getActiveMaterial().index][nA](!0)}async[BA](){const e=new Array;for(const t of this[yA])e.push(t.instantiateVariants());await Promise.all(e)}[TA](e,t){const i=this.materials[e];i.isLoaded||console.error("Cloning an unloaded material,\n           call 'material.ensureLoaded() before cloning the material.");const s=i[Za],n=new Set;for(const[a,o]of s.entries()){const e=o.clone();e.name=t+(s.size>1?"_inst"+a:""),n.add(e)}const r=new lA(this[RA],this[IA].length,!1,this[SA],n,t);return this[IA].push(r),r}createMaterialInstanceForVariant(e,t,i,s=!0){let n=null;for(const r of this[yA]){const s=this[SA].get(i);null!=s&&r.variantInfo.has(s.index)||null!=r.getMaterial(e)&&(this.hasVariant(i)||this.createVariant(i),null==n&&(n=this[TA](e,t)),r.addVariant(n,i))}if(s&&null!=n){n[nA](!0),this.materials[e][nA](!1);for(const e of this[yA])e.enableVariant(i)}return n}createVariant(e){this[SA].has(e)?console.warn(`Variant '${e}'' already exists`):this[SA].set(e,{name:e,index:this[SA].size})}hasVariant(e){return this[SA].has(e)}setMaterialToVariant(e,t){if(null!=this[MA]().find((e=>e===t)))if(e<0||e>=this.materials.length)console.error("setMaterialToVariant(): materialIndex is out of bounds.");else for(const i of this[yA]){const s=i.getMaterial(e);null!=s&&i.addVariant(s,t)}else console.warn(`Can't add material to '${t}', the variant does not exist.'`)}updateVariantName(e,t){const i=this[SA].get(e);null!=i&&(i.name=t,this[SA].set(t,i),this[SA].delete(e))}deleteVariant(e){const t=this[SA].get(e);if(null!=t){for(const i of this.materials)i.hasVariant(e)&&i[rA].delete(t.index);for(const e of this[yA])e.deleteVariant(t.index);this[SA].delete(e)}}}var FA=function(e,t,i,s){var n,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};const LA=Symbol("currentGLTF"),UA=Symbol("originalGltfJson"),_A=Symbol("model"),GA=Symbol("getOnUpdateMethod"),PA=Symbol("buildTexture");class OA extends x.Kj0{constructor(){super(void 0,new x.vBJ({depthWrite:!1})),this.height=0,this.radius=0,this.resolution=0,this.userData.noHit=!0}get map(){return this.material.map}set map(e){this.material.map=e}isUsable(){return this.height>0&&this.radius>0&&null!=this.geometry&&null!=this.map}updateGeometry(e=this.height,t=this.radius,i=128){e==this.height&&t==this.radius&&i==this.resolution||(this.height=e,this.radius=t,this.resolution=i,e>0&&t>0&&(this.geometry.dispose(),this.geometry=function(e,t,i){const s=new x.xo$(t,2*i,i);s.scale(1,1,-1);const n=s.getAttribute("position"),r=new x.Pa4;for(let a=0;a<n.count;++a)if(r.fromBufferAttribute(n,a),r.y<0){const t=3*-e/2,i=r.y<t?-e/r.y:1-r.y*r.y/(3*t*t);r.multiplyScalar(i),r.toArray(n.array,3*a)}return n.needsUpdate=!0,s}(e,t,i)))}}const NA=new x.Pa4,HA=new x.Pa4,qA=new x.Pa4,jA=new x.Vkp,zA=new x.CJI,KA=new x._fP;class VA extends Di{constructor(e){super(document.createElement("div")),this.normal=new x.Pa4(0,1,0),this.initialized=!1,this.referenceCount=1,this.pivot=document.createElement("div"),this.slot=document.createElement("slot"),this.element.classList.add("annotation-wrapper"),this.slot.name=e.name,this.element.appendChild(this.pivot),this.pivot.appendChild(this.slot),this.updatePosition(e.position),this.updateNormal(e.normal),this.surface=e.surface}get facingCamera(){return!this.element.classList.contains("hide")}show(){this.facingCamera&&this.initialized||this.updateVisibility(!0)}hide(){!this.facingCamera&&this.initialized||this.updateVisibility(!1)}increment(){this.referenceCount++}decrement(){return this.referenceCount>0&&--this.referenceCount,0===this.referenceCount}updatePosition(e){if(null==e)return;const t=Vs(e)[0].terms;for(let i=0;i<3;++i)this.position.setComponent(i,rn(t[i]).number);this.updateMatrixWorld()}updateNormal(e){if(null==e)return;const t=Vs(e)[0].terms;for(let i=0;i<3;++i)this.normal.setComponent(i,t[i].number)}updateSurface(){const{mesh:e,tri:t,bary:i}=this;if(null==e||null==t||null==i)return;e.getVertexPosition(t.x,NA),e.getVertexPosition(t.y,HA),e.getVertexPosition(t.z,qA),NA.toArray(jA.elements,0),HA.toArray(jA.elements,3),qA.toArray(jA.elements,6),this.position.copy(i).applyMatrix3(jA);const s=this.parent;s.worldToLocal(e.localToWorld(this.position)),zA.set(NA,HA,qA),zA.getNormal(this.normal).transformDirection(e.matrixWorld);const n=s.parent;KA.setFromAxisAngle(NA.set(0,1,0),-n.rotation.y),this.normal.applyQuaternion(KA)}orient(e){this.pivot.style.transform=`rotate(${e}rad)`}updateVisibility(e){this.element.classList.toggle("hide",!e),this.slot.assignedNodes().forEach((t=>{if(t.nodeType!==Node.ELEMENT_NODE)return;const i=t,s=i.dataset.visibilityAttribute;if(null!=s){const t=`data-${s}`;i.toggleAttribute(t,e)}i.dispatchEvent(new CustomEvent("hotspot-visibility",{detail:{visible:e}}))})),this.initialized=!0}}const JA={name:"HorizontalBlurShader",uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform float h;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 sum = vec4( 0.0 );\n\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;\n\n\t\t\tgl_FragColor = sum;\n\n\t\t}"},YA={name:"VerticalBlurShader",uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform float v;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 sum = vec4( 0.0 );\n\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;\n\n\t\t\tgl_FragColor = sum;\n\n\t\t}"};Math.PI,Math.PI;function WA(e,t,i){return(1-i)*e+i*t}class $A extends x.Tme{constructor(e,t,i){super(),this.camera=new x.iKG,this.renderTarget=null,this.renderTargetBlur=null,this.depthMaterial=new x.lRF,this.horizontalBlurMaterial=new x.jyz(JA),this.verticalBlurMaterial=new x.jyz(YA),this.intensity=0,this.softness=1,this.boundingBox=new x.ZzF,this.size=new x.Pa4,this.maxDimension=0,this.isAnimated=!1,this.needsUpdate=!1;const{camera:s}=this;s.rotation.x=Math.PI/2,s.left=-.5,s.right=.5,s.bottom=-.5,s.top=.5,this.add(s);const n=new x._12,r=new x.vBJ({opacity:1,transparent:!0,side:x._Li});this.floor=new x.Kj0(n,r),this.floor.userData.noHit=!0,s.add(this.floor),this.blurPlane=new x.Kj0(n),this.blurPlane.visible=!1,s.add(this.blurPlane),e.target.add(this),this.depthMaterial.onBeforeCompile=function(e){e.fragmentShader=e.fragmentShader.replace("gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );","gl_FragColor = vec4( vec3( 0.0 ), ( 1.0 - fragCoordZ ) * opacity );")},this.depthMaterial.side=x.ehD,this.horizontalBlurMaterial.depthTest=!1,this.verticalBlurMaterial.depthTest=!1,this.setScene(e,t,i)}setScene(e,t,i){const{boundingBox:s,size:n,rotation:r,position:a}=this;if(this.isAnimated=e.animationNames.length>0,this.boundingBox.copy(e.boundingBox),this.size.copy(e.size),this.maxDimension=Math.max(n.x,n.y,n.z)*(this.isAnimated?2:1),this.boundingBox.getCenter(a),"back"===i){const{min:e,max:t}=s;[e.y,e.z]=[e.z,e.y],[t.y,t.z]=[t.z,t.y],[n.y,n.z]=[n.z,n.y],r.x=Math.PI/2,r.y=Math.PI}else r.x=0,r.y=0;if(this.isAnimated){const e=s.min.y,t=s.max.y;n.y=this.maxDimension,s.expandByVector(n.subScalar(this.maxDimension).multiplyScalar(-.5)),s.min.y=e,s.max.y=t,n.set(this.maxDimension,t-e,this.maxDimension)}"bottom"===i?a.y=s.min.y:a.z=s.min.y,this.setSoftness(t)}setSoftness(e){this.softness=e;const{size:t,camera:i}=this,s=this.isAnimated?2:1,n=s*Math.pow(2,9-3*e);this.setMapSize(n);const r=t.y/2,a=t.y*s;i.near=0,i.far=WA(a,r,e),this.depthMaterial.opacity=1/e,i.updateProjectionMatrix(),this.setIntensity(this.intensity),this.setOffset(0)}setMapSize(e){const{size:t}=this;this.isAnimated&&(e*=2);const i=Math.floor(t.x>t.z?e:e*t.x/t.z),s=Math.floor(t.x>t.z?e*t.z/t.x:e),n=10+i,r=10+s;if(null==this.renderTarget||this.renderTarget.width===n&&this.renderTarget.height===r||(this.renderTarget.dispose(),this.renderTarget=null,this.renderTargetBlur.dispose(),this.renderTargetBlur=null),null==this.renderTarget){const e={format:x.wk1};this.renderTarget=new x.dd2(n,r,e),this.renderTargetBlur=new x.dd2(n,r,e),this.floor.material.map=this.renderTarget.texture}this.camera.scale.set(t.x*(1+10/i),t.z*(1+10/s),1),this.needsUpdate=!0}setIntensity(e){this.intensity=e,e>0?(this.visible=!0,this.floor.visible=!0,this.floor.material.opacity=e*WA(.3,1,this.softness*this.softness)):(this.visible=!1,this.floor.visible=!1)}getIntensity(){return this.intensity}setOffset(e){this.floor.position.z=-e+this.gap()}gap(){return.001*this.maxDimension}render(e,t){t.overrideMaterial=this.depthMaterial;const i=e.getClearAlpha();e.setClearAlpha(0),this.floor.visible=!1;const s=e.xr.enabled;e.xr.enabled=!1;const n=e.getRenderTarget();e.setRenderTarget(this.renderTarget),e.render(t,this.camera),t.overrideMaterial=null,this.floor.visible=!0,this.blurShadow(e),e.xr.enabled=s,e.setRenderTarget(n),e.setClearAlpha(i)}blurShadow(e){const{camera:t,horizontalBlurMaterial:i,verticalBlurMaterial:s,renderTarget:n,renderTargetBlur:r,blurPlane:a}=this;a.visible=!0,a.material=i,i.uniforms.h.value=1/this.renderTarget.width,i.uniforms.tDiffuse.value=this.renderTarget.texture,e.setRenderTarget(r),e.render(a,t),a.material=s,s.uniforms.v.value=1/this.renderTarget.height,s.uniforms.tDiffuse.value=this.renderTargetBlur.texture,e.setRenderTarget(n),e.render(a,t),a.visible=!1}dispose(){null!=this.renderTarget&&this.renderTarget.dispose(),null!=this.renderTargetBlur&&this.renderTargetBlur.dispose(),this.depthMaterial.dispose(),this.horizontalBlurMaterial.dispose(),this.verticalBlurMaterial.dispose(),this.floor.material.dispose(),this.floor.geometry.dispose(),this.blurPlane.geometry.dispose(),this.removeFromParent()}}const XA=new x.Pa4,ZA=new x.Pa4,ec=new x.Pa4,tc=new x.iMs,ic=new x.Pa4,sc=new x.FM8;class nc extends x.xsS{constructor({canvas:e,element:t,width:i,height:s}){super(),this.annotationRenderer=new Gi,this.effectRenderer=null,this.schemaElement=document.createElement("script"),this.width=1,this.height=1,this.aspect=1,this.scaleStep=0,this.renderCount=0,this.externalRenderer=null,this.appendedAnimations=[],this.markedAnimations=[],this.camera=new x.cPb(45,1,.1,100),this.xrCamera=null,this.url=null,this.pivot=new x.Tme,this.target=new x.Tme,this.animationNames=[],this.boundingBox=new x.ZzF,this.boundingSphere=new x.aLr,this.size=new x.Pa4,this.idealAspect=0,this.framedFoVDeg=0,this.shadow=null,this.shadowIntensity=0,this.shadowSoftness=1,this.bakedShadows=new Set,this.exposure=1,this.toneMapping=x.ORg,this.canScale=!0,this.isDirty=!1,this.goalTarget=new x.Pa4,this.targetDamperX=new Os,this.targetDamperY=new Os,this.targetDamperZ=new Os,this._currentGLTF=null,this._model=null,this.cancelPendingSourceChange=null,this.animationsByName=new Map,this.currentAnimationAction=null,this.groundedSkybox=new OA,this.name="ModelScene",this.element=t,this.canvas=e,this.camera=new x.cPb(45,1,.1,100),this.camera.name="MainCamera",this.add(this.pivot),this.pivot.name="Pivot",this.pivot.add(this.target),this.setSize(i,s),this.target.name="Target",this.mixer=new x.Xcj(this.target);const{domElement:n}=this.annotationRenderer,{style:r}=n;r.display="none",r.pointerEvents="none",r.position="absolute",r.top="0",this.element.shadowRoot.querySelector(".default").appendChild(n),this.schemaElement.setAttribute("type","application/ld+json")}get context(){return this.canvas.getContext("2d")}getCamera(){return null!=this.xrCamera?this.xrCamera:this.camera}queueRender(){this.isDirty=!0}shouldRender(){return this.isDirty}hasRendered(){this.isDirty=!1}forceRescale(){this.scaleStep=-1,this.queueRender()}async setObject(e){this.reset(),this._model=e,this.target.add(e),await this.setupScene()}async setSource(e,t=(()=>{})){if(!e||e===this.url)return void t(1);if(this.reset(),this.url=e,null!=this.externalRenderer){const e=await this.externalRenderer.load(t);return this.boundingSphere.radius=e.framedRadius,void(this.idealAspect=e.fieldOfViewAspect)}let i;null!=this.cancelPendingSourceChange&&(this.cancelPendingSourceChange(),this.cancelPendingSourceChange=null);try{i=await new Promise((async(i,s)=>{this.cancelPendingSourceChange=()=>s();try{i(await this.element[Yc].loader.load(e,this.element,t))}catch(n){s(n)}}))}catch(a){if(null==a)return;throw a}this.cancelPendingSourceChange=null,this.reset(),this.url=e,this._currentGLTF=i,null!=i&&(this._model=i.scene,this.target.add(i.scene));const{animations:s}=i,n=new Map,r=[];for(const o of s)n.set(o.name,o),r.push(o.name);this.animations=s,this.animationsByName=n,this.animationNames=r,await this.setupScene()}async setupScene(){this.applyTransform(),this.updateBoundingBox(),await this.updateFraming(),this.updateShadow(),this.setShadowIntensity(this.shadowIntensity),this.setGroundedSkybox()}reset(){this.url=null,this.renderCount=0,this.queueRender(),null!=this.shadow&&this.shadow.setIntensity(0),this.bakedShadows.clear();const{_model:e}=this;null!=e&&(e.removeFromParent(),this._model=null);const t=this._currentGLTF;null!=t&&(t.dispose(),this._currentGLTF=null),null!=this.currentAnimationAction&&(this.currentAnimationAction.stop(),this.currentAnimationAction=null),this.mixer.stopAllAction(),this.mixer.uncacheRoot(this)}dispose(){this.reset(),null!=this.shadow&&(this.shadow.dispose(),this.shadow=null),this.element[LA]=null,this.element[UA]=null,this.element[_A]=null}get currentGLTF(){return this._currentGLTF}setSize(e,t){if(this.width!==e||this.height!==t){if(this.width=Math.max(e,1),this.height=Math.max(t,1),this.annotationRenderer.setSize(e,t),this.aspect=this.width/this.height,null!=this.externalRenderer){const i=window.devicePixelRatio;this.externalRenderer.resize(e*i,t*i)}this.queueRender()}}markBakedShadow(e){e.userData.noHit=!0,this.bakedShadows.add(e)}unmarkBakedShadow(e){e.userData.noHit=!1,e.visible=!0,this.bakedShadows.delete(e),this.boundingBox.expandByObject(e)}findBakedShadows(e){const t=new x.ZzF;e.traverse((e=>{const i=e;if(!i.material)return;if(!i.material.transparent)return;t.setFromObject(i);const s=t.getSize(ic),n=Math.min(s.x,s.y,s.z);Math.max(s.x,s.y,s.z)<100*n||this.markBakedShadow(i)}))}checkBakedShadows(){const{min:e,max:t}=this.boundingBox,i=new x.ZzF;this.boundingBox.getSize(this.size);for(const s of this.bakedShadows)i.setFromObject(s),i.min.y<e.y+this.size.y/100&&i.min.x<=e.x&&i.max.x>=t.x&&i.min.z<=e.z&&i.max.z>=t.z||i.min.z<e.z+this.size.z/100&&i.min.x<=e.x&&i.max.x>=t.x&&i.min.y<=e.y&&i.max.y>=t.y||this.unmarkBakedShadow(s)}applyTransform(){const{model:e}=this;if(null==e)return;const t=Vs(this.element.orientation)[0].terms,i=rn(t[0]).number,s=rn(t[1]).number,n=rn(t[2]).number;e.quaternion.setFromEuler(new x.USm(s,n,i,"YXZ"));const r=Vs(this.element.scale)[0].terms;e.scale.set(r[0].number,r[1].number,r[2].number)}updateBoundingBox(){const{model:e}=this;if(null==e)return;this.target.remove(e),this.findBakedShadows(e);const t=(e,t)=>e.expandByPoint(t);this.setBakedShadowVisibility(!1),this.boundingBox=Pi(e,t,new x.ZzF),this.boundingBox.isEmpty()&&(this.setBakedShadowVisibility(!0),this.bakedShadows.forEach((e=>this.unmarkBakedShadow(e))),this.boundingBox=Pi(e,t,new x.ZzF)),this.checkBakedShadows(),this.setBakedShadowVisibility(),this.boundingBox.getSize(this.size),this.target.add(e)}async updateFraming(){const{model:e}=this;if(null==e)return;this.target.remove(e),this.setBakedShadowVisibility(!1);const{center:t}=this.boundingSphere;this.element.requestUpdate("cameraTarget"),await this.element.updateComplete,t.copy(this.getTarget());this.boundingSphere.radius=Math.sqrt(Pi(e,((e,i)=>Math.max(e,t.distanceToSquared(i))),0));this.idealAspect=Pi(e,((e,i)=>{i.sub(t);const s=Math.sqrt(i.x*i.x+i.z*i.z);return Math.max(e,s/(this.idealCameraDistance()-Math.abs(i.y)))}),0)/Math.tan(this.framedFoVDeg/2*Math.PI/180),this.setBakedShadowVisibility(),this.target.add(e)}setBakedShadowVisibility(e=this.shadowIntensity<=0){for(const t of this.bakedShadows)t.visible=e}idealCameraDistance(){const e=this.framedFoVDeg/2*Math.PI/180;return this.boundingSphere.radius/Math.sin(e)}adjustedFoV(e){const t=Math.tan(e/2*Math.PI/180)*Math.max(1,this.idealAspect/this.aspect);return 2*Math.atan(t)*180/Math.PI}getNDC(e,t){if(null!=this.xrCamera)sc.set(e/window.screen.width,t/window.screen.height);else{const i=this.element.getBoundingClientRect();sc.set((e-i.x)/this.width,(t-i.y)/this.height)}return sc.multiplyScalar(2).subScalar(1),sc.y*=-1,sc}getSize(){return{width:this.width,height:this.height}}setEnvironmentAndSkybox(e,t){this.element[Yc].arRenderer.presentedScene!==this&&(this.environment=e,this.setBackground(t),this.queueRender())}setBackground(e){this.groundedSkybox.map=e,this.groundedSkybox.isUsable()?(this.target.add(this.groundedSkybox),this.background=null):(this.target.remove(this.groundedSkybox),this.background=e)}farRadius(){return this.boundingSphere.radius*(null!=this.groundedSkybox.parent?10:1)}setGroundedSkybox(){const e=Vs(this.element.skyboxHeight)[0].terms[0],t=rn(e).number,i=10*this.boundingSphere.radius;this.groundedSkybox.updateGeometry(t,i),this.groundedSkybox.position.y=t-(this.shadow?2*this.shadow.gap():0),this.setBackgroun
407d(this.groundedSkybox.map)}setTarget(e,t,i){this.goalTarget.set(-e,-t,-i)}setTargetDamperDecayTime(e){this.targetDamperX.setDecayTime(e),this.targetDamperY.setDecayTime(e),this.targetDamperZ.setDecayTime(e)}getTarget(){return this.goalTarget.clone().multiplyScalar(-1)}getDynamicTarget(){return this.target.position.clone().multiplyScalar(-1)}jumpToGoal(){this.updateTarget(1e4)}updateTarget(e){const t=this.goalTarget,i=this.target.position;if(t.equals(i))return!1;{const s=this.boundingSphere.radius/10;let{x:n,y:r,z:a}=i;return n=this.targetDamperX.update(n,t.x,e,s),r=this.targetDamperY.update(r,t.y,e,s),a=this.targetDamperZ.update(a,t.z,e,s),this.groundedSkybox.position.x=-n,this.groundedSkybox.position.z=-a,this.target.position.set(n,r,a),this.target.updateMatrixWorld(),this.queueRender(),!0}}pointTowards(e,t){const{x:i,z:s}=this.position;this.yaw=Math.atan2(e-i,t-s)}get model(){return this._model}set yaw(e){this.pivot.rotation.y=e,this.groundedSkybox.rotation.y=-e,this.queueRender()}get yaw(){return this.pivot.rotation.y}set animationTime(e){this.mixer.setTime(e),this.queueShadowRender()}get animationTime(){if(null!=this.currentAnimationAction){const e=Math.max(this.currentAnimationAction._loopCount,0);return this.currentAnimationAction.loop===x.uEv&&1===(1&e)?this.duration-this.currentAnimationAction.time:this.currentAnimationAction.time}return 0}set animationTimeScale(e){this.mixer.timeScale=e}get animationTimeScale(){return this.mixer.timeScale}get duration(){return null!=this.currentAnimationAction&&this.currentAnimationAction.getClip()?this.currentAnimationAction.getClip().duration:0}get hasActiveAnimation(){return null!=this.currentAnimationAction}playAnimation(e=null,t=0,i=x.YKA,s=1/0){if(null==this._currentGLTF)return;const{animations:n}=this;if(null==n||0===n.length)return;let r=null;if(null!=e&&(r=this.animationsByName.get(e),null==r)){const t=parseInt(e);!isNaN(t)&&t>=0&&t<n.length&&(r=n[t])}null==r&&(r=n[0]);try{const{currentAnimationAction:e}=this,n=this.mixer.clipAction(r,this);n.timeScale!=this.element.timeScale&&(n.timeScale=this.element.timeScale),this.currentAnimationAction=n,this.element.paused?this.mixer.stopAllAction():(n.paused=!1,null!=e&&n!==e?n.crossFadeFrom(e,t,!1):this.animationTimeScale>0&&this.animationTime==this.duration&&(this.animationTime=0)),n.setLoop(i,s),n.enabled=!0,n.clampWhenFinished=!0,n.play()}catch(a){console.error(a)}}appendAnimation(e="",t=x.YKA,i=1/0,s=1,n=1,r=!1,a=!1,o=!0,A=null,c=!1){if(null==this._currentGLTF||e===this.element.animationName)return;const{animations:l}=this;if(null==l||0===l.length)return;let h=null;if(e&&(h=this.animationsByName.get(e)),null!=h){"string"===typeof i?isNaN(i)?(i=1/0,console.warn("Invalid repetitionCount value, repetitionCount is set to Infinity")):i=Math.max(parseInt(i),1):"number"===typeof i&&i<1&&(i=1),1===i&&t!==x.jAl&&(t=x.jAl),"string"===typeof s&&(isNaN(s)?(s=1,
407console.warn("Invalid weight value, weight is set to 1")):s=parseFloat(s)),"string"===typeof n&&(isNaN(n)?(n=1,console.warn("Invalid timeScale value, timeScale is set to 1")):n=parseFloat(n)),"string"===typeof r&&("true"===r.toLowerCase().trim()?r=!0:"false"===r.toLowerCase().trim()?r=!1:isNaN(r)?(r=!1,console.warn("Invalid fade value, fade is set to false")):r=parseFloat(r)),"string"===typeof a&&("true"===a.toLowerCase().trim()?a=!0:"false"===a.toLowerCase().trim()?a=!1:isNaN(a)?(a=!1,console.warn("Invalid warp value, warp is set to false")):a=parseFloat(a)),"string"===typeof A&&(isNaN(A)||(A=parseFloat(A)));try{const l=this.mixer.existingAction(h)||this.mixer.clipAction(h,this),u=l.timeScale;c&&this.appendedAnimations.includes(e)&&(this.markedAnimations.map((e=>e.name)).includes(e)||this.markedAnimations.push({name:e,loopMode:t,repetitionCount:i})),"number"===typeof A&&(l.time=Math.min(Math.max(A,0),h.duration)),"boolean"===typeof r&&r?l.fadeIn(1.25):"number"===typeof r?l.fadeIn(Math.max(r,0)):s>=0&&(l.weight=Math.min(Math.max(s,0),1)),"boolean"===typeof a&&a?l.warp(o?u:0,n,1.25):"number"===typeof a?l.warp(o?u:0,n,Math.max(a,0)):l.timeScale=n,l.isRunning()||(l.time==h.duration&&l.stop(),l.setLoop(t,i),l.paused=!1,l.enabled=!0,l.clampWhenFinished=!0,l.play()),this.appendedAnimations.includes(e)||this.element[jc].appendedAnimations.push(e)}catch(u){console.error(u)}}}detachAnimation(e="",t=!0){if(null==this._currentGLTF||e===this.element.animationName)return;const{animations:i}=this;if(null==i||0===i.length)return;let s=null;if(e&&(s=this.animationsByName.get(e)),null!=s){"string"===typeof t&&("true"===t.toLowerCase().trim()?t=!0:"false"===t.toLowerCase().trim()?t=!1:isNaN(t)?(t=!0,console.warn("Invalid fade value, fade is set to true")):t=parseFloat(t));try{const i=this.mixer.existingAction(s)||this.mixer.clipAction(s,this);"boolean"===typeof t&&t?i.fadeOut(1.5):"number"===typeof t?i.fadeOut(Math.max(t,0)):i.stop();const n=this.element[jc].appendedAnimations.filter((t=>t!==e));this.element[jc].appendedAnimations=n}catch(n){console.error(n)}}}updateAnimationLoop(e="",t=x.YKA,i=1/0){if(null==this._currentGLTF||e===this.element.animationName)return;const{animations:s}=this;if(null==s||0===s.length)return;let n=null;if(e&&(n=this.animationsByName.get(e)),null!=n)try{const e=this.mixer.existingAction(n)||this.mixer.clipAction(n,this);e.stop(),e.setLoop(t,i),e.play()}catch(r){console.error(r)}}stopAnimation(){this.currentAnimationAction=null,this.mixer.stopAllAction()}updateAnimation(e){this.mixer.update(e),this.queueShadowRender()}subscribeMixerEvent(e,t){this.mixer.addEventListener(e,t)}updateShadow(){const e=this.shadow;if(null!=e){const t="wall"===this.element.arPlacement?"back":"bottom";e.setScene(this,this.shadowSoftness,t),e.needsUpdate=!0}}renderShadow(e){const t=this.shadow;null!=t&&1==t.needsUpdate&&(t.render(e,this),t.needsUpdate=!1)}queueShadowRender(){null!=this.shadow&&(this.shadow.needsUpdate=!0)}setShadowIntensity(e){if(this.shadowIntensity=e,null!=this._currentGLTF&&(this.setBakedShadowVisibility(),!(e<=0&&null==this.shadow))){if(null==this.shadow){const e="wall"===this.element.arPlacement?"back":"bottom";this.shadow=new $A(this,this.shadowSoftness,e)}this.shadow.setIntensity(e)}}setShadowSoftness(e){this.shadowSoftness=e;const t=this.shadow;null!=t&&t.setSoftness(e)}setShadowOffset(e){const t=this.shadow;null!=t&&t.setOffset(e)}getHit(e=this){return tc.intersectObject(e,!0).find((e=>e.object.visible&&!e.object.userData.noHit))}hitFromController(e,t=this){return tc.setFromXRController(e),this.getHit(t)}hitFromPoint(e,t=this){return tc.setFromCamera(e,this.getCamera()),this.getHit(t)}positionAndNormalFromPoint(e,t=this){var i;const s=this.hitFromPoint(e,t);if(null==s)return null;return{position:s.point,normal:null!=s.face?s.face.normal.clone().applyNormalMatrix((new x.Vkp).getNormalMatrix(s.object.matrixWorld)):tc.ray.direction.clone().multiplyScalar(-1),uv:null!==(i=s.uv)&&void 0!==i?i:null}}surfaceFromPoint(e,t=this){const i=this.element.model;if(null==i)return null;const s=this.hitFromPoint(e,t);if(null==s||null==s.face)return null;const n=i[QA](s),{meshes:r,primitives:a}=n.mesh.userData.associations,o=new x.Pa4,A=new x.Pa4,c=new x.Pa4,{a:l,b:h,c:u}=s.face,g=s.object;g.getVertexPosition(l,o),g.getVertexPosition(h,A),g.getVertexPosition(u,c);const d=new x.CJI(o,A,c),p=new x.Pa4;return d.getBarycoord(g.worldToLocal(s.point),p),`${r} ${a} ${l} ${h} ${u} ${p.x.toFixed(3)} ${p.y.toFixed(3)} ${p.z.toFixed(3)}`}addHotspot(e){this.target.add(e),this.annotationRenderer.domElement.appendChild(e.element),this.updateSurfaceHotspot(e)}removeHotspot(e){this.target.remove(e)}forHotspots(e){const{children:t}=this.target;for(let i=0,s=t.length;i<s;i++){const s=t[i];s instanceof VA&&e(s)}}updateSurfaceHotspot(e){if(null==e.surface||null==this.element.model)return;const t=Vs(e.surface)[0].terms;if(8!=t.length)return void console.warn(e.surface+" does not have exactly 8 numbers.");const i=this.element.model[xA](t[0].number,t[1].number);if(null==i)return void console.warn(e.surface+" does not match a no
407de/primitive in this glTF! Skipping this hotspot.");const s=i.mesh.geometry.attributes.position.count,n=new x.Pa4(t[2].number,t[3].number,t[4].number);if(n.x>=s||n.y>=s||n.z>=s)return void console.warn(e.surface+" vertex indices out of range in this glTF! Skipping this hotspot.");const r=new x.Pa4(t[5].number,t[6].number,t[7].number);e.mesh=i.mesh,e.tri=n,e.bary=r,e.updateSurface()}animateSurfaceHotspots(){this.element.paused||this.forHotspots((e=>{e.updateSurface()}))}updateHotspotsVisibility(e){this.forHotspots((t=>{XA.copy(e),ZA.setFromMatrixPosition(t.matrixWorld),XA.sub(ZA),ec.copy(t.normal).transformDirection(this.target.matrixWorld),XA.dot(ec)<0?t.hide():t.show()}))}orientHotspots(e){this.forHotspots((t=>{t.orient(e)}))}setHotspotsVisibility(e){this.forHotspots((t=>{t.visible=e}))}updateSchema(e){var t;const{schemaElement:i,element:s}=this,{alt:n,poster:r,iosSrc:a}=s;if(null!=e){const s=[{"@type":"MediaObject",contentUrl:e,encodingFormat:"gltf"===(null===(t=e.split(".").pop())||void 0===t?void 0:t.toLowerCase())?"model/gltf+json":"model/gltf-binary"}];a&&s.push({"@type":"MediaObject",contentUrl:a,encodingFormat:"model/vnd.usdz+zip"});const o={"@context":"http://schema.org/","@type":"3DModel",image:null!==r&&void 0!==r?r:void 0,name:null!==n&&void 0!==n?n:void 0,encoding:s};i.textContent=JSON.stringify(o),document.head.appendChild(i)}else null!=i.parentElement&&i.parentElement.removeChild(i)}}class rc extends EventTarget{constructor(){super(...arguments),this.ongoingActivities=new Set,this.totalProgress=0}get ongoingActivityCount(){return this.ongoingActivities.size}beginActivity(e){const t={progress:0,completed:!1};return this.ongoingActivities.add(t),1===this.ongoingActivityCount&&this.announceTotalProgress(t,0,e),i=>{let s;return s=Math.max(Me(i,0,1),t.progress),s!==t.progress&&this.announceTotalProgress(t,s,e),t.progress}}announceTotalProgress(e,t,i){let s=0,n=0;1==t&&(e.completed=!0);for(const o of this.ongoingActivities){const{progress:e}=o;s+=1-e,o.completed&&n++}const r=e.progress;e.progress=t,this.totalProgress+=(t-r)*(1-this.totalProgress)/s;const a=n===this.ongoingActivityCount?1:this.totalProgress;this.dispatchEvent(new CustomEvent("progress",{detail:{totalProgress:a,reason:i}})),n===this.ongoingActivityCount&&(this.totalProgress=0,this.ongoingActivities.clear())}}var ac,oc,Ac,cc,lc,hc,uc,gc,dc,pc,mc,fc,bc,Ic=function(e,t,i,s){var n,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};const Cc=document.createElement("canvas"),Ec=Symbol("fallbackResizeHandler"),yc=Symbol("defaultAriaLabel"),Bc=Symbol("resizeObserver"),wc=Symbol("clearModelTimeout"),vc=Symbol("onContextLost"),Qc=Symbol("loaded"),xc=Symbol("status"),Sc=Symbol("onFocus"),Mc=Symbol("onBlur"),Rc=Symbol("updateSize"),Tc=Symbol("intersectionObserver"),Dc=Symbol("isElementInViewport"),kc=Symbol("announceModelVisibility"),Fc=Symbol("ariaLabel"),Lc=Symbol("altDefaulted"),Uc=Symbol("statusElement"),_c=Symbol("updateStatus"),Gc=Symbol("loadedTime"),Pc=Symbol("updateSource"),Oc=Symbol("markLoaded"),Nc=Symbol("container"),Hc=Symbol("input"),qc=Symbol("canvas"),jc=Symbol("scene"),zc=Symbol("needsRender"),Kc=Symbol("tick"),Vc=Symbol("onModelLoad"),Jc=Symbol("onResize"),Yc=Symbol("renderer"),Wc=Symbol("progressTracker"),$c=Symbol("getLoaded"),Xc=Symbol("getModelIsVisible"),Zc=Symbol("shouldAttemptPreload"),el=e=>({x:e.x,y:e.y,z:e.z,toString(){return`${this.x}m ${this.y}m ${this.z}m`}}),tl=e=>({u:e.x,v:e.y,toString(){return`${this.u} ${this.v}`}});class il extends B{static get is(){return"model-viewer"}static set modelCacheSize(e){Ti[Mi].evictionThreshold=e}static get modelCacheSize(){return Ti[Mi].evictionThreshold}static set minimumRenderScale(e){e>1&&console.warn("<model-viewer> minimumRenderScale has been clamped to a maximum value of 1."),e<=0&&console.warn("<model-viewer> minimumRenderScale has been clamped to a minimum value of 0.25."),Xa.singleton.minScale=e}static get minimumRenderScale(){return Xa.singleton.minScale}get loaded(){return this[$c]()}get[(ac=Dc,oc=Qc,Ac=Gc,cc=xc,lc=wc,hc=Ec,uc=kc,gc=Bc,dc=Tc,pc=Wc,Yc)](){return Xa.singleton}get modelIsVisible(){return this[Xc]()}constructor(){super(),this.alt=null,this.src=null,this.withCredentials=!1,this.generateSchema=!1,this[ac]=!1,this[oc]=!1,this[Ac]=0,this[cc]="",this[lc]=null,this[hc]=Se((()=>{const e=this.getBoundingClientRect();this[Rc](e)}),50),this[uc]=Se((e=>{const t=this.modelIsVisible;t!==e&&this.dispatchEvent(new CustomEvent("model-visibility",{detail:{visible:t}}))}),0),this[gc]=null,this[dc]=null,this[pc]=new rc,this[mc]=()=>{this[Uc].textContent=this[xc]},this[fc]=()=>{this[Uc].textContent=""},this[bc]=e=>{this.dispatchEvent(new CustomEvent("error",{detail:{type:"webglcontextlost",sourceError:e.sourceEvent}}))},this.attachShadow({mode:"open"});const e=this.shadowRoot;let t,i;if((e=>{le(Ue,e)}
vendor: 5,163 bytes, line 407
407)(e),this[Nc]=e.querySelector(".container"),this[Hc]=e.querySelector(".userInput"),this[qc]=e.querySelector("canvas"),this[Uc]=e.querySelector("#status"),this[yc]=this[Hc].getAttribute("aria-label"),this.isConnected){const e=this.getBoundingClientRect();t=e.width,i=e.height}else t=300,i=150;this[jc]=new nc({canvas:this[qc],element:this,width:t,height:i}),Promise.resolve().then((()=>{this[Rc](this.getBoundingClientRect())})),pe&&(this[Bc]=new ResizeObserver((e=>{if(!this[Yc].isPresenting)for(let t of e)t.target===this&&this[Rc](t.contentRect)}))),me?this[Tc]=new IntersectionObserver((e=>{for(let t of e)if(t.target===this){const e=this.modelIsVisible;this[Dc]=t.isIntersecting,this[kc](e),this[Dc]&&!this.loaded&&this[Pc]()}}),{root:null,rootMargin:"0px",threshold:1e-5}):this[Dc]=!0}connectedCallback(){super.connectedCallback&&super.connectedCallback(),pe?this[Bc].observe(this):self.addEventListener("resize",this[Ec]),me&&this[Tc].observe(this),this.addEventListener("focus",this[Sc]),this.addEventListener("blur",this[Mc]);const e=this[Yc];e.addEventListener("contextlost",this[vc]),e.registerScene(this[jc]),null!=this[wc]&&(self.clearTimeout(this[wc]),this[wc]=null,this.requestUpdate("src",null))}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),pe?this[Bc].unobserve(this):self.removeEventListener("resize",this[Ec]),me&&this[Tc].unobserve(this),this.removeEventListener("focus",this[Sc]),this.removeEventListener("blur",this[Mc]);const e=this[Yc];e.removeEventListener("contextlost",this[vc]),e.unregisterScene(this[jc]),this[wc]=self.setTimeout((()=>{this[jc].dispose(),this[wc]=null}),10)}updated(e){super.updated(e),e.has("src")&&(null==this.src?(this[Qc]=!1,this[Gc]=0,this[jc].reset()):this.src!==this[jc].url&&(this[Qc]=!1,this[Gc]=0,this[Pc]())),e.has("alt")&&this[Hc].setAttribute("aria-label",this[Fc]),e.has("generateSchema")&&(this.generateSchema?this[jc].updateSchema(this.src):this[jc].updateSchema(null))}toDataURL(e,t){return this[Yc].displayCanvas(this[jc]).toDataURL(e,t)}async toBlob(e){const t=e?e.mimeType:void 0,i=e?e.qualityArgument:void 0,s=e?e.idealAspect:void 0,{width:n,height:r,idealAspect:a,aspect:o}=this[jc],{dpr:A,scaleFactor:c}=this[Yc];let l=n*c*A,h=r*c*A,u=0,g=0;if(!0===s)if(a>o){const e=h;h=Math.round(l/a),g=(e-h)/2}else{const e=l;l=Math.round(h*a),u=(e-l)/2}Cc.width=l,Cc.height=h;try{return new Promise((async(e,s)=>{Cc.getContext("2d").drawImage(this[Yc].displayCanvas(this[jc]),u,g,l,h,0,0,l,h),Cc.toBlob((t=>{if(!t)return s(new Error("Unable to retrieve canvas blob"));e(t)}),t,i)}))}finally{this[Rc]({width:n,height:r})}}registerEffectComposer(e){e.setRenderer(this[Yc].threeRenderer),e.setMainCamera(this[jc].getCamera()),e.setMainScene(this[jc]),this[jc].effectRenderer=e}unregisterEffectComposer(){this[jc].effectRenderer=null}registerRenderer(e){this[jc].externalRenderer=e}unregisterRenderer(){this[jc].externalRenderer=null}get[Fc](){return this[Lc]}get[Lc](){return null==this.alt||"null"===this.alt?this[yc]:this.alt}[$c](){return this[Qc]}[Xc](){return this.loaded&&this[Dc]}[Zc](){return!!this.src&&this[Dc]}[Rc]({width:e,height:t}){0!==e&&0!==t&&(this[Nc].style.width=`${e}px`,this[Nc].style.height=`${t}px`,this[Jc]({width:e,height:t}))}[Kc](e,t){var i;null===(i=this[jc].effectRenderer)||void 0===i||i.beforeRender(e,t)}[Oc](){this[Qc]||(this[Qc]=!0,this[Gc]=performance.now())}[zc](){this[jc].queueRender()}[Vc](){}[_c](e){this[xc]=e;const t=this.getRootNode();null!=t&&t.activeElement===this&&this[Uc].textContent!=e&&(this[Uc].textContent=e)}[(mc=Sc,fc=Mc,Jc)](e){this[jc].setSize(e.width,e.height)}async[(bc=vc,Pc)](){const e=this[jc];if(this.loaded||!this[Zc]()||this.src===e.url)return;this.generateSchema&&e.updateSchema(this.src),this[_c]("Loading"),e.stopAnimation();const t=this[Wc].beginActivity("model-load"),i=this.src;try{const s=e.setSource(i,(e=>t(.95*Me(e,0,1)))),n=this[Fe]();await Promise.all([s,n]),this[Oc](),this[Vc](),this.updateComplete.then((()=>{this.dispatchEvent(new CustomEvent("before-render"))})),await new Promise((e=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("load",{detail:{url:i}})),e()}))}))}))}catch(s){this.dispatchEvent(new CustomEvent("error",{detail:{type:"loadfailure",sourceError:s}}))}finally{t(1)}}}Ic([Q({type:String})],il.prototype,"alt",void 0),Ic([Q({type:String})],il.prototype,"src",void 0),Ic([Q({type:Boolean,attribute:"with-credentials"})],il.prototype,"withCredentials",void 0),Ic([Q({type:Boolean,attribute:"generate-schema"})],il.prototype,"generateSchema",void 0);var sl=function(e,t,i,s){var n,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};const nl=Symbol("changeAnimation"),rl=Symbol("appendAnimation"),al=Symbol("detachAnimation"),ol=Symbol("paused"),Al={repetitions:1/0,pingpong:!1},cl={pingpong:!1,repetitions:null,weight:1,timeScale:1,fade:!1,warp:!1,relativeWarp:!0,time:null},ll={fade:!0}
vendor: 1,551 bytes, line 407
407,hl=Symbol("hotspotMap"),ul=Symbol("mutationCallback"),gl=Symbol("observer"),dl=Symbol("addHotspot"),pl=Symbol("removeHotspot"),ml=new x.yGw;var fl=Uint8Array,bl=Uint16Array,Il=Int32Array,Cl=new fl([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),El=new fl([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),yl=new fl([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Bl=function(e,t){for(var i=new bl(31),s=0;s<31;++s)i[s]=t+=1<<e[s-1];var n=new Il(i[30]);for(s=1;s<30;++s)for(var r=i[s];r<i[s+1];++r)n[r]=r-i[s]<<5|s;return{b:i,r:n}},wl=Bl(Cl,2),vl=wl.b,Ql=wl.r;vl[28]=258,Ql[258]=28;for(var xl=Bl(El,0),Sl=(xl.b,xl.r),Ml=new bl(32768),Rl=0;Rl<32768;++Rl){var Tl=(43690&Rl)>>1|(21845&Rl)<<1;Tl=(61680&(Tl=(52428&Tl)>>2|(13107&Tl)<<2))>>4|(3855&Tl)<<4,Ml[Rl]=((65280&Tl)>>8|(255&Tl)<<8)>>1}var Dl=function(e,t,i){for(var s=e.length,n=0,r=new bl(t);n<s;++n)e[n]&&++r[e[n]-1];var a,o=new bl(t);for(n=1;n<t;++n)o[n]=o[n-1]+r[n-1]<<1;if(i){a=new bl(1<<t);var A=15-t;for(n=0;n<s;++n)if(e[n])for(var c=n<<4|e[n],l=t-e[n],h=o[e[n]-1]++<<l,u=h|(1<<l)-1;h<=u;++h)a[Ml[h]>>A]=c}else for(a=new bl(s),n=0;n<s;++n)e[n]&&(a[n]=Ml[o[e[n]-1]++]>>15-e[n]);return a},kl=new fl(288);for(Rl=0;Rl<144;++Rl)kl[Rl]=8;for(Rl=144;Rl<256;++Rl)kl[Rl]=9;for(Rl=256;Rl<280;++Rl)kl[Rl]=7;for(Rl=280;Rl<288;++Rl)kl[Rl]=8;var Fl=new fl(32);for(Rl=0;Rl<32;++Rl)Fl[Rl]=5;var Ll=Dl(kl,9,0),Ul=Dl(Fl,5,0),_l=function(e){return(e+7)/8|0},Gl=function(e,t,i){return(null==t||t<0)&&(t=0),(null==i||i>e.length)&&(i=e.length),new fl(e.subarray(t,i))}
vendor: 4,349 bytes, line 407
407,Pl=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Ol=function(e,t,i){var s=new Error(t||Pl[e]);if(s.code=e,Error.captureStackTrace&&Error.captureStackTrace(s,Ol),!i)throw s;return s},Nl=function(e,t,i){i<<=7&t;var s=t/8|0;e[s]|=i,e[s+1]|=i>>8},Hl=function(e,t,i){i<<=7&t;var s=t/8|0;e[s]|=i,e[s+1]|=i>>8,e[s+2]|=i>>16},ql=function(e,t){for(var i=[],s=0;s<e.length;++s)e[s]&&i.push({s:s,f:e[s]});var n=i.length,r=i.slice();if(!n)return{t:Wl,l:0};if(1==n){var a=new fl(i[0].s+1);return a[i[0].s]=1,{t:a,l:1}}i.sort((function(e,t){return e.f-t.f})),i.push({s:-1,f:25001});var o=i[0],A=i[1],c=0,l=1,h=2;for(i[0]={s:-1,f:o.f+A.f,l:o,r:A};l!=n-1;)o=i[i[c].f<i[h].f?c++:h++],A=i[c!=l&&i[c].f<i[h].f?c++:h++],i[l++]={s:-1,f:o.f+A.f,l:o,r:A};var u=r[0].s;for(s=1;s<n;++s)r[s].s>u&&(u=r[s].s);var g=new bl(u+1),d=jl(i[l-1],g,0);if(d>t){s=0;var p=0,m=d-t,f=1<<m;for(r.sort((function(e,t){return g[t.s]-g[e.s]||e.f-t.f}));s<n;++s){var b=r[s].s;if(!(g[b]>t))break;p+=f-(1<<d-g[b]),g[b]=t}for(p>>=m;p>0;){var I=r[s].s;g[I]<t?p-=1<<t-g[I]++-1:++s}for(;s>=0&&p;--s){var C=r[s].s;g[C]==t&&(--g[C],++p)}d=t}return{t:new fl(g),l:d}},jl=function(e,t,i){return-1==e.s?Math.max(jl(e.l,t,i+1),jl(e.r,t,i+1)):t[e.s]=i},zl=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new bl(++t),s=0,n=e[0],r=1,a=function(e){i[s++]=e},o=1;o<=t;++o)if(e[o]==n&&o!=t)++r;else{if(!n&&r>2){for(;r>138;r-=138)a(32754);r>2&&(a(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(a(n),--r;r>6;r-=6)a(8304);r>2&&(a(r-3<<5|8208),r=0)}for(;r--;)a(n);r=1,n=e[o]}return{c:i.subarray(0,s),n:t}},Kl=function(e,t){for(var i=0,s=0;s<t.length;++s)i+=e[s]*t[s];return i},Vl=function(e,t,i){var s=i.length,n=_l(t+2);e[n]=255&s,e[n+1]=s>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var r=0;r<s;++r)e[n+r+4]=i[r];return 8*(n+4+s)},Jl=function(e,t,i,s,n,r,a,o,A,c,l){Nl(t,l++,i),++n[256];for(var h=ql(n,15),u=h.t,g=h.l,d=ql(r,15),p=d.t,m=d.l,f=zl(u),b=f.c,I=f.n,C=zl(p),E=C.c,y=C.n,B=new bl(19),w=0;w<b.length;++w)++B[31&b[w]];for(w=0;w<E.length;++w)++B[31&E[w]];for(var v=ql(B,7),Q=v.t,x=v.l,S=19;S>4&&!Q[yl[S-1]];--S);var M,R,T,D,k=c+5<<3,F=Kl(n,kl)+Kl(r,Fl)+a,L=Kl(n,u)+Kl(r,p)+a+14+3*S+Kl(B,Q)+2*B[16]+3*B[17]+7*B[18];if(A>=0&&k<=F&&k<=L)return Vl(t,l,e.subarray(A,A+c));if(Nl(t,l,1+(L<F)),l+=2,L<F){M=Dl(u,g,0),R=u,T=Dl(p,m,0),D=p;var U=Dl(Q,x,0);Nl(t,l,I-257),Nl(t,l+5,y-1),Nl(t,l+10,S-4),l+=14;for(w=0;w<S;++w)Nl(t,l+3*w,Q[yl[w]]);l+=3*S;for(var _=[b,E],G=0;G<2;++G){var P=_[G];for(w=0;w<P.length;++w){var O=31&P[w];Nl(t,l,U[O]),l+=Q[O],O>15&&(Nl(t,l,P[w]>>5&127),l+=P[w]>>12)}}}else M=Ll,R=kl,T=Ul,D=Fl;for(w=0;w<o;++w){var N=s[w];if(N>255){Hl(t,l,M[(O=N>>18&31)+257]),l+=R[O+257],O>7&&(Nl(t,l,N>>23&31),l+=Cl[O]);var H=31&N;Hl(t,l,T[H]),l+=D[H],H>3&&(Hl(t,l,N>>5&8191),l+=El[H])}else Hl(t,l,M[N]),l+=R[N]}return Hl(t,l,M[256]),l+R[256]},Yl=new Il([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Wl=new fl(0),$l=function(e,t,i,s,n,r){var a=r.z||e.length,o=new fl(s+a+5*(1+Math.ceil(a/7e3))+n),A=o.subarray(s,o.length-n),c=r.l,l=7&(r.r||0);if(t){l&&(A[0]=r.r>>3);for(var h=Yl[t-1],u=h>>13,g=8191&h,d=(1<<i)-1,p=r.p||new bl(32768),m=r.h||new bl(d+1),f=Math.ceil(i/3),b=2*f,I=function(t){return(e[t]^e[t+1]<<f^e[t+2]<<b)&d},C=new Il(25e3),E=new bl(288),y=new bl(32),B=0,w=0,v=r.i||0,Q=0,x=r.w||0,S=0;v+2<a;++v){var M=I(v),R=32767&v,T=m[M];if(p[R]=T,m[M]=R,x<=v){var D=a-v;if((B>7e3||Q>24576)&&(D>423||!c)){l=Jl(e,A,0,C,E,y,w,Q,S,v-S,l),Q=B=w=0,S=v;for(var k=0;k<286;++k)E[k]=0;for(k=0;k<30;++k)y[k]=0}var F=2,L=0,U=g,_=R-T&32767;if(D>2&&M==I(v-_))for(var G=Math.min(u,D)-1,P=Math.min(32767,v),O=Math.min(258,D);_<=P&&--U&&R!=T;){if(e[v+F]==e[v+F-_]){for(var N=0;N<O&&e[v+N]==e[v+N-_];++N);if(N>F){if(F=N,L=_,N>G)break;var H=Math.min(_,N-2),q=0;for(k=0;k<H;++k){var j=v-_+k&32767,z=j-p[j]&32767;z>q&&(q=z,T=j)}}}_+=(R=T)-(T=p[R])&32767}if(L){C[Q++]=268435456|Ql[F]<<18|Sl[L];var K=31&Ql[F],V=31&Sl[L];w+=Cl[K]+El[V],++E[257+K],++y[V],x=v+F,++B}else C[Q++]=e[v],++E[e[v]]}}for(v=Math.max(v,x);v<a;++v)C[Q++]=e[v],++E[e[v]];l=Jl(e,A,c,C,E,y,w,Q,S,v-S,l),c||(r.r=7&l|A[l/8|0]<<3,l-=7,r.h=m,r.p=p,r.i=v,r.w=x)}else{for(v=r.w||0;v<a+c;v+=65535){var J=v+65535;J>
vendor: 4,607 bytes, line 407
407=a&&(A[l/8|0]=c,J=a),l=Vl(A,l+1,e.subarray(v,J))}r.i=a}return Gl(o,0,s+_l(l)+n)},Xl=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var i=t,s=9;--s;)i=(1&i&&-306674912)^i>>>1;e[t]=i}return e}(),Zl=function(){var e=-1;return{p:function(t){for(var i=e,s=0;s<t.length;++s)i=Xl[255&i^t[s]]^i>>>8;e=i},d:function(){return~e}}},eh=function(e,t,i,s,n){if(!n&&(n={l:1},t.dictionary)){var r=t.dictionary.subarray(-32768),a=new fl(r.length+e.length);a.set(r),a.set(e,r.length),e=a,n.w=r.length}return $l(e,null==t.level?6:t.level,null==t.mem?n.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,i,s,n)},th=function(e,t){var i={};for(var s in e)i[s]=e[s];for(var s in t)i[s]=t[s];return i},ih=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8};function sh(e,t){return eh(e,t||{},0,0)}var nh=function(e,t,i,s){for(var n in e){var r=e[n],a=t+n,o=s;Array.isArray(r)&&(o=th(s,r[1]),r=r[0]),r instanceof fl?i[a]=[r,o]:(i[a+="/"]=[new fl(0),o],nh(r,a,i,s))}},rh="undefined"!=typeof TextEncoder&&new TextEncoder,ah="undefined"!=typeof TextDecoder&&new TextDecoder;try{ah.decode(Wl,{stream:!0}),1}catch(n){}function oh(e,t){if(t){for(var i=new fl(e.length),s=0;s<e.length;++s)i[s]=e.charCodeAt(s);return i}if(rh)return rh.encode(e);var n=e.length,r=new fl(e.length+(e.length>>1)),a=0,o=function(e){r[a++]=e};for(s=0;s<n;++s){if(a+5>r.length){var A=new fl(a+8+(n-s<<1));A.set(r),r=A}var c=e.charCodeAt(s);c<128||t?o(c):c<2048?(o(192|c>>6),o(128|63&c)):c>55295&&c<57344?(o(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++s))>>18),o(128|c>>12&63),o(128|c>>6&63),o(128|63&c)):(o(224|c>>12),o(128|c>>6&63),o(128|63&c))}return Gl(r,0,a)}var Ah=function(e){var t=0;if(e)for(var i in e){var s=e[i].length;s>65535&&Ol(9),t+=s+4}return t},ch=function(e,t,i,s,n,r,a,o){var A=s.length,c=i.extra,l=o&&o.length,h=Ah(c);ih(e,t,null!=a?33639248:67324752),t+=4,null!=a&&(e[t++]=20,e[t++]=i.os),e[t]=20,t+=2,e[t++]=i.flag<<1|(r<0&&8),e[t++]=n&&8,e[t++]=255&i.compression,e[t++]=i.compression>>8;var u=new Date(null==i.mtime?Date.now():i.mtime),g=u.getFullYear()-1980;if((g<0||g>119)&&Ol(10),ih(e,t,g<<25|u.getMonth()+1<<21|u.getDate()<<16|u.getHours()<<11|u.getMinutes()<<5|u.getSeconds()>>1),t+=4,-1!=r&&(ih(e,t,i.crc),ih(e,t+4,r<0?-r-2:r),ih(e,t+8,i.size)),ih(e,t+12,A),ih(e,t+14,h),t+=16,null!=a&&(ih(e,t,l),ih(e,t+6,i.attrs),ih(e,t+10,a),t+=14),e.set(s,t),t+=A,h)for(var d in c){var p=c[d],m=p.length;ih(e,t,+d),ih(e,t+2,m),e.set(p,t+4),t+=4+m}return l&&(e.set(o,t),t+=l),t},lh=function(e,t,i,s,n){ih(e,t,101010256),ih(e,t+8,i),ih(e,t+10,i),ih(e,t+12,s),ih(e,t+16,n)};"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;class hh{constructor(){this.textureUtils=null}setTextureUtils(e){this.textureUtils=e}parse(e,t,i,s){this.parseAsync(e,s).then(t).catch(i)}async parseAsync(e,t={}){t=Object.assign({ar:{anchoring:{type:"plane"},planeAnchoring:{alignment:"horizontal"}},includeAnchoringProperties:!0,quickLookCompatible:!1,maxTextureSize:1024},t);const i={};i["model.usda"]=null;let s=gh();s+=function(e){return`def Xform "Root"\n{\n\tdef Scope "Scenes" (\n\t\tkind = "sceneLibrary"\n\t)\n\t{\n\t\tdef Xform "Scene" (\n\t\t\tcustomData = {\n\t\t\t\tbool preliminary_collidesWithEnvironment = 0\n\t\t\t\tstring sceneName = "Scene"\n\t\t\t}\n\t\t\tsceneName = "Scene"\n\t\t)\n\t\t{${!0===e.includeAnchoringProperties?`\n\t\ttoken preliminary:anchoring:type = "${e.ar.anchoring.type}"\n\t\ttoken preliminary:planeAnchoring:alignment = "${e.ar.planeAnchoring.alignment}"\n\t`:""}\n`}(t);const n={},r={};e.traverseVisible((e=>{if(e.isMesh){const t=e.geometry,r=e.material;if(r.isMeshStandardMaterial){const a="geometries/Geometry_"+t.id+".usda";if(!(a in i)){const e=function(e){return`\ndef "Geometry"\n{\n${function(e){const t="Geometry",i=e.attributes,s=i.position.count;return`\n\tdef Mesh "${t}"\n\t{\n\t\tint[] faceVertexCounts = [${function(e){const t=null!==e.index?e.index.count:e.attributes.position.count;return Array(t/3).fill(3).join(", ")}(e)}]\n\t\tint[] faceVertexIndices = [${function(e){const t=e.index,i=[];if(null!==t)for(let s=0;s<t.count;s++)i.push(t.getX(s));else{const t=e.attributes.position.count;for(let e=0;e<t;e++)i.push(e)}return i.join(", ")}(e)}]\n\t\tnormal3f[] normals = [${mh(i.normal,s)}] (\n\t\t\tinterpolation = "vertex"\n\t\t)\n\t\tpoint3f[] points = [${mh(i.position,s)}]\n${function(e){let t="";for(let s=0;s<4;s++){const i=s>0?s:"",n=e["uv"+i];void 0!==n&&(t+=`\n\t\ttexCoord2f[] primvars:st${i} = [${fh(n)}] (\n\t\t\tinterpolation = "vertex"\n\t\t)`)}const i=e.color;if(void 0!==i){t+=`\n\tcolor3f[] primvars:displayColor = [${mh(i,i.count)}
407] (\n\t\tinterpolation = "vertex"\n\t\t)`}return t}(i)}\n\t\tuniform token subdivisionScheme = "none"\n\t}\n`}(e)}\n}\n`}(t);i[a]=function(e){let t=gh();return t+=e,oh(t)}(e)}r.uuid in n||(n[r.uuid]=r),s+=function(e,t,i){const s="Object_"+e.id,n=dh(e.matrixWorld);e.matrixWorld.determinant()<0&&console.warn("THREE.USDZExporter: USDZ does not support negative scales",e);return`def Xform "${s}" (\n\tprepend references = @./geometries/Geometry_${t.id}.usda@</Geometry>\n\tprepend apiSchemas = ["MaterialBindingAPI"]\n)\n{\n\tmatrix4d xformOp:transform = ${n}\n\tuniform token[] xformOpOrder = ["xformOp:transform"]\n\n\trel material:binding = </Materials/Material_${i.id}>\n}\n\n`}(e,t,r)}else console.warn("THREE.USDZExporter: Unsupported material type (USDZ only supports MeshStandardMaterial)",e)}else e.isCamera&&(s+=function(e){const t=e.name?e.name:"Camera_"+e.id,i=dh(e.matrixWorld);e.matrixWorld.determinant()<0&&console.warn("THREE.USDZExporter: USDZ does not support negative scales",e);return e.isOrthographicCamera?`def Camera "${t}"\n\t\t{\n\t\t\tmatrix4d xformOp:transform = ${i}\n\t\t\tuniform token[] xformOpOrder = ["xformOp:transform"]\n\n\t\t\tfloat2 clippingRange = (${e.near.toPrecision(7)}, ${e.far.toPrecision(7)})\n\t\t\tfloat horizontalAperture = ${(10*(Math.abs(e.left)+Math.abs(e.right))).toPrecision(7)}\n\t\t\tfloat verticalAperture = ${(10*(Math.abs(e.top)+Math.abs(e.bottom))).toPrecision(7)}\n\t\t\ttoken projection = "orthographic"\n\t\t}\n\t\n\t`:`def Camera "${t}"\n\t\t{\n\t\t\tmatrix4d xformOp:transform = ${i}\n\t\t\tuniform token[] xformOpOrder = ["xformOp:transform"]\n\n\t\t\tfloat2 clippingRange = (${e.near.toPrecision(7)}, ${e.far.toPrecision(7)})\n\t\t\tfloat focalLength = ${e.getFocalLength().toPrecision(7)}\n\t\t\tfloat focusDistance = ${e.focus.toPrecision(7)}\n\t\t\tfloat horizontalAperture = ${e.getFilmWidth().toPrecision(7)}\n\t\t\ttoken projection = "perspective"\n\t\t\tfloat verticalAperture = ${e.getFilmHeight().toPrecision(7)}\n\t\t}\n\t\n\t`}(e))})),s+="\n\t\t}\n\t}\n}\n\n",s+=function(e,t,i=!1){const s=[];for(const n in e){const r=e[n];s.push(bh(r,t,i))}return`def "Materials"\n{\n${s.join("")}\n}\n\n`}(n,r,t.quickLookCompatible),i["model.usda"]=oh(s),s=null;for(const o in r){let e=r[o];if(!0===e.isCompressedTexture){if(null===this.textureUtils)throw new Error("THREE.USDZExporter: setTextureUtils() must be called to process compressed textures.");e=await this.textureUtils.decompress(e)}const s=uh(e.image,e.flipY,t.maxTextureSize),n=await new Promise((e=>
vendor: 3,611 bytes, line 407
407s.toBlob(e,"image/png",1)));i[`textures/Texture_${o}.png`]=new Uint8Array(await n.arrayBuffer())}let a=0;for(const o in i){const e=i[o];a+=34+o.length;const t=63&a;if(4!==t){const s=new Uint8Array(64-t);i[o]=[e,{extra:{12345:s}}]}a=e.length}return function(e,t){t||(t={});var i={},s=[];nh(e,"",i,t);var n=0,r=0;for(var a in i){var o=i[a],A=o[0],c=o[1],l=0==c.level?0:8,h=(B=oh(a)).length,u=c.comment,g=u&&oh(u),d=g&&g.length,p=Ah(c.extra);h>65535&&Ol(11);var m=l?sh(A,c):A,f=m.length,b=Zl();b.p(A),s.push(th(c,{size:A.length,crc:b.d(),c:m,f:B,m:g,u:h!=a.length||g&&u.length!=d,o:n,compression:l})),n+=30+h+p+f,r+=76+2*(h+p)+(d||0)+f}for(var I=new fl(r+22),C=n,E=r-n,y=0;y<s.length;++y){var B=s[y];ch(I,B.o,B,B.f,B.u,B.c.length);var w=30+B.f.length+Ah(B.extra);I.set(B.c,B.o+w),ch(I,n,B,B.f,B.u,B.c.length,B.o,B.m),n+=16+w+(B.m?B.m.length:0)}return lh(I,n,s.length,E,C),I}(i,{level:0})}}function uh(e,t,i){if("undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof OffscreenCanvas&&e instanceof OffscreenCanvas||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap){const s=i/Math.max(e.width,e.height),n=document.createElement("canvas");n.width=e.width*Math.min(1,s),n.height=e.height*Math.min(1,s);const r=n.getContext("2d");return!0===t&&(r.translate(0,n.height),r.scale(1,-1)),r.drawImage(e,0,0,n.width,n.height),n}throw new Error("THREE.USDZExporter: No valid image data found. Unable to process texture.")}function gh(){return'#usda 1.0\n(\n\tcustomLayerData = {\n\t\tstring creator = "Three.js USDZExporter"\n\t}\n\tdefaultPrim = "Root"\n\tmetersPerUnit = 1\n\tupAxis = "Y"\n)\n\n'}function dh(e){const t=e.elements;return`( ${ph(t,0)}, ${ph(t,4)}, ${ph(t,8)}, ${ph(t,12)} )`}function ph(e,t){return`(${e[t+0]}, ${e[t+1]}, ${e[t+2]}, ${e[t+3]})`}function mh(e,t){if(void 0===e)return console.warn("USDZExporter: Normals missing."),Array(t).fill("(0, 0, 0)").join(", ");const i=[];for(let s=0;s<e.count;s++){const t=e.getX(s),n=e.getY(s),r=e.getZ(s);i.push(`(${t.toPrecision(7)}, ${n.toPrecision(7)}, ${r.toPrecision(7)})`)}return i.join(", ")}function fh(e){const t=[];for(let i=0;i<e.count;i++){const s=e.getX(i),n=e.getY(i);t.push(`(${s.toPrecision(7)}, ${1-n.toPrecision(7)})`)}return t.join(", ")}function bh(e,t,i=!1){const s=[],n=[];function r(s,n,r){const a=s.source.id+"_"+s.flipY;t[a]=s;const o=s.channel>0?"st"+s.channel:"st",A={1e3:"repeat",1001:"clamp",1002:"mirror"},c=s.repeat.clone(),l=s.offset.clone(),h=s.rotation,u=Math.sin(h),g=Math.cos(h);return l.y=1-l.y-c.y,i?(l.x=l.x/c.x,l.y=l.y/c.y,l.x+=u/c.x,l.y+=g-1):(l.x+=u*c.x,l.y+=(1-g)*c.y),`\n\t\tdef Shader "PrimvarReader_${n}"\n\t\t{\n\t\t\tuniform token info:id = "UsdPrimvarReader_float2"\n\t\t\tfloat2 inputs:fallback = (0.0, 0.0)\n\t\t\ttoken inputs:varname = "${o}"\n\t\t\tfloat2 outputs:result\n\t\t}\n\n\t\tdef Shader "Transform2d_${n}"\n\t\t{\n\t\t\tuniform token info:id = "UsdTransform2d"\n\t\t\ttoken inputs:in.connect = </Materials/Material_${e.id}/PrimvarReader_${n}.outputs:result>\n\t\t\tfloat inputs:rotation = ${(h*(180/Math.PI)).toFixed(7)}\n\t\t\tfloat2 inputs:scale = ${Ch(c)}\n\t\t\tfloat2 inputs:translation = ${Ch(l)}\n\t\t\tfloat2 outputs:result\n\t\t}\n\n\t\tdef Shader "Texture_${s.id}_${n}"\n\t\t{\n\t\t\tuniform token info:id = "UsdUVTexture"\n\t\t\tasset inputs:file = @textures/Texture_${a}.png@\n\t\t\tfloat2 inputs:st.connect = </Materials/Material_${e.id}/Transform2d_${n}.outputs:result>\n\t\t\t${void 0!==r?"float4 inputs:scale = "+function(e){return`(${e.r}, ${e.g}, ${e.b}, 1.0)`}(r):""}
407\n\t\t\ttoken inputs:sourceColorSpace = "${s.colorSpace===x.aCh?"raw":"sRGB"}"\n\t\t\ttoken inputs:wrapS = "${A[s.wrapS]}"\n\t\t\ttoken inputs:wrapT = "${A[s.wrapT]}"\n\t\t\tfloat outputs:r\n\t\t\tfloat outputs:g\n\t\t\tfloat outputs:b\n\t\t\tfloat3 outputs:rgb\n\t\t\t${e.transparent||e.alphaTest>0?"float outputs:a":""}\n\t\t}`}return e.side===x.ehD&&console.warn("THREE.USDZExporter: USDZ does not support double sided materials",e),null!==e.map?(s.push(`\t\t\tcolor3f inputs:diffuseColor.connect = </Materials/Material_${e.id}/Texture_${e.map.id}_diffuse.outputs:rgb>`),e.transparent?s.push(`\t\t\tfloat inputs:opacity.connect = </Materials/Material_${e.id}/Texture_${e.map.id}_diffuse.outputs:a>`):e.alphaTest>0&&(s.push(`\t\t\tfloat inputs:opacity.connect = </Materials/Material_${e.id}/Texture_${e.map.id}_diffuse.outputs:a>`),s.push(`\t\t\tfloat inputs:opacityThreshold = ${e.alphaTest}`)),n.push(r(e.map,"diffuse",e.color))):s.push(`\t\t\tcolor3f inputs:diffuseColor = ${Ih(e.color)}`),null!==e.emissiveMap?(s.push(`\t\t\tcolor3f inputs:emissiveColor.connect = </Materials/Material_${e.id}/Texture_${e.emissiveMap.id}_emissive.outputs:rgb>`),n.push(r(e.emissiveMap,"emissive",new x.Ilk(e.emissive.r*e.emissiveIntensity,e.emissive.g*e.emissiveIntensity,e.emissive.b*e.emissiveIntensity)))):e.emissive.getHex()>0&&s.push(`\t\t\tcolor3f inputs:emissiveColor = ${Ih(e.emissive)}`),null!==e.normalMap&&(s.push(`\t\t\tnormal3f inputs:normal.connect = </Materials/Material_${e.id}/Texture_${e.normalMap.id}_normal.outputs:rgb>`),n.push(r(e.normalMap,"normal"))),null!==e.aoMap&&(s.push(`\t\t\tfloat inputs:occlusion.connect = </Materials/Material_${e.id}/Texture_${e.aoMap.id}_occlusion.outputs:r>`),n.push(r(e.aoMap,"occlusion",new x.Ilk(e.aoMapIntensity,e.aoMapIntensity,e.aoMapIntensity)))),null!==e.roughnessMap?(s.push(`\t\t\tfloat inputs:roughness.connect = </Materials/Material_${e.id}/Texture_${e.roughnessMap.id}_roughness.outputs:g>`),n.push(r(e.roughnessMap,"roughness",new x.Ilk(e.roughness,e.roughness,e.roughness)))):s.push(`\t\t\tfloat inputs:roughness = ${e.roughness}`),null!==e.metalnessMap?(s.push(`\t\t\tfloat inputs:metallic.connect = </Materials/Material_${e.id}/Texture_${e.metalnessMap.id}_metallic.outputs:b>`),n.push(r(e.metalnessMap,"metallic",new x.Ilk(e.metalness,e.metalness,e.metalness)))):s.push(`\t\t\tfloat inputs:metallic = ${e.metalness}`),null!==e.alphaMap?(s.push(`\t\t\tfloat inputs:opacity.connect = </Materials/Material_${e.id}/Texture_${e.alphaMap.id}_opacity.outputs:r>`),s.push("\t\t\tfloat inputs:opacityThreshold = 0.0001"),n.push(r(e.alphaMap,"opacity"))):s.push(`\t\t\tfloat inputs:opacity = ${e.opacity}`),e.isMeshPhysicalMaterial&&(null!==e.clearcoatMap?(s.push(`\t\t\tfloat inputs:clearcoat.connect = </Materials/Material_${e.id}/Texture_${e.clearcoatMap.id}_clearcoat.outputs:r>`),n.push(r(e.clearcoatMap,"clearcoat",new x.Ilk(e.clearcoat,e.clearcoat,e.clearcoat)))):s.push(`\t\t\tfloat inputs:clearcoat = ${e.clearcoat}`),null!==e.clearcoatRoughnessMap?(s.push(`\t\t\tfloat inputs:clearcoatRoughness.connect = </Materials/Material_${e.id}/Texture_${e.clearcoatRoughnessMap.id}_clearcoatRoughness.outputs:g>`),n.push(r(e.clearcoatRoughnessMap,"clearcoatRoughness",new x.Ilk(e.clearcoatRoughness,e.clearcoatRoughness,e.clearcoatRoughness)))):s.push(`\t\t\tfloat inputs:clearcoatRoughness = ${e.clearcoatRoughness}`),s.push(`\t\t\tfloat inputs:ior = ${e.ior}`)),`\n\tdef Material "Material_${e.id}"\n\t{\n\t\tdef Shader "PreviewSurface"\n\t\t{\n\t\t\tuniform token info:id = "UsdPreviewSurface"\n${s.join("\n")}\n\t\t\tint inputs:useSpecularWorkflow = 0\n\t\t\ttoken outputs:surface\n\t\t}\n\n\t\ttoken outputs:surface.connect = </Materials/Material_${e.id}/PreviewSurface.outputs:surface>\n\n${n.join("\n")}\n\n\t}\n`}function Ih(e){return`(${e.r}, ${e.g}, ${e.b})`}function Ch(e){return`(${e.x}, ${e.y})`}var Eh=function(e,t,i,s){var n,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};let yh=!1,Bh=!1;const wh="#model-viewer-no-ar-fallback",vh=(Qh=["quick-look","scene-viewer","webxr","none"],e=>{try{const t=Vs(e),i=(t.length?t[0].terms:[]).filter((e=>e&&"ident"===e.type)).map((e=>e.value)).filter((e=>Qh.indexOf(e)>-1));return new Set(i)}catch(t){}return new Set});var Qh;const xh="quick-look",Sh="scene-viewer",Mh="webxr",Rh="none",Th=Symbol("arButtonContainer"),Dh=Symbol("enterARWithWebXR"),kh=Symbol("openSceneViewer"),Fh=Symbol("openIOSARQuickLook"),Lh=Symbol("canActivateAR"),Uh=Symbol("arMode"),_h=Symbol("arModes"),Gh=Symbol("arAnchor"),Ph=Symbol("preload"),Oh=Symbol("onARButtonContainerClick"),Nh=Symbol("onARStatus"),Hh=Symbol("onARTracking"),qh=Symbol("onARTap"),jh=Symbol("selectARMode"),zh=Symbol("triggerLoad");var Kh=function(e,t,i,s){var n,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};const Vh="auto",Jh="auto",Yh="eager",Wh=Symbol("defaultProgressBarElement"),$h=Symbol("posterContainerElement"),Xh=Symbol("defaultPosterElement"),Zh=Symbol("shouldDismissPoster"),eu=Symbol("hidePoster"),tu=Symbol("modelIsRevealed"),iu=Symbol("updateProgressBar"),su=Symbol("ariaLabelCallToAction"),nu=Symbol("onProgress");var ru=function(e,t,i,s){var n,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};const au=Math.PI/32,ou={basis:[sn(Ks(au,"rad"))],keywords:{auto:[null]}},Au=Symbol("autoRotateStartTime"),cu=Symbol("radiansPerSecond"),lu=Symbol("syncRotationRate"),hu=Symbol("onCameraChange"),uu=(e=>{var t,i,s;
vendor: 5,101 bytes, line 407
407class n extends e{constructor(){super(...arguments),this[t]=new Map,this[i]=e=>{e.forEach((e=>{e instanceof MutationRecord&&"childList"!==e.type||(e.addedNodes.forEach((e=>{this[dl](e)})),e.removedNodes.forEach((e=>{this[pl](e)})),this[zc]())}))},this[s]=new MutationObserver(this[ul])}connectedCallback(){super.connectedCallback();for(let t=0;t<this.children.length;++t)this[dl](this.children[t]);const{ShadyDOM:e}=self;null==e?this[gl].observe(this,{childList:!0}):this[gl]=e.observeChildren(this,this[ul])}disconnectedCallback(){super.disconnectedCallback();const{ShadyDOM:e}=self;null==e?this[gl].disconnect():e.unobserveChildren(this[gl])}[(t=hl,i=ul,s=gl,Vc)](){super[Vc]();const e=this[jc];e.forHotspots((t=>{e.updateSurfaceHotspot(t)}))}[Kc](e,t){super[Kc](e,t);const i=this[jc],{annotationRenderer:s}=i,n=i.getCamera();i.shouldRender()&&(i.animateSurfaceHotspots(),i.updateHotspotsVisibility(n.position),s.domElement.style.display="",s.render(i,n))}updateHotspot(e){const t=this[hl].get(e.name);null!=t&&(t.updatePosition(e.position),t.updateNormal(e.normal),t.surface=e.surface,this[jc].updateSurfaceHotspot(t),this[zc]())}queryHotspot(e){const t=this[hl].get(e);if(null==t)return null;const i=el(t.position),s=el(t.normal),n=t.facingCamera,r=this[jc],a=r.getCamera(),o=new x.Pa4;o.setFromMatrixPosition(t.matrixWorld),o.project(a);const A=r.width/2,c=r.height/2;o.x=o.x*A+A,o.y=-o.y*c+c;const l=el(new x.Pa4(o.x,o.y,o.z));return Number.isFinite(l.x)&&Number.isFinite(l.y)?{position:i,normal:s,canvasPosition:l,facingCamera:n}:null}positionAndNormalFromPoint(e,t){const i=this[jc],s=i.getNDC(e,t),n=i.positionAndNormalFromPoint(s);if(null==n)return null;ml.copy(i.target.matrixWorld).invert();const r=el(n.position.applyMatrix4(ml)),a=el(n.normal.transformDirection(ml));let o=null;return null!=n.uv&&(o=tl(n.uv)),{position:r,normal:a,uv:o}}surfaceFromPoint(e,t){const i=this[jc],s=i.getNDC(e,t);return i.surfaceFromPoint(s)}[dl](e){if(!(e instanceof HTMLElement&&0===e.slot.indexOf("hotspot")))return;let t=this[hl].get(e.slot);null!=t?t.increment():(t=new VA({name:e.slot,position:e.dataset.position,normal:e.dataset.normal,surface:e.dataset.surface}),this[hl].set(e.slot,t),this[jc].addHotspot(t)),this[jc].queueRender()}[pl](e){if(!(e instanceof HTMLElement))return;const t=this[hl].get(e.slot);t&&(t.decrement()&&(this[jc].removeHotspot(t),this[hl].delete(e.slot)),this[jc].queueRender())}}return n})((e=>{var t,i,s;class n extends e{constructor(){super(...arguments),this[t]=void 0,this[i]=null,this[s]=null,this.variantName=null,this.orientation="0 0 0",this.scale="1 1 1"}get model(){return this[_A]}get availableVariants(){return this.model?this.model[MA]():[]}get originalGltfJson(){return this[UA]}[(t=_A,i=LA,s=UA,GA)](){return()=>{this[zc]()}}[PA](e){return e.colorSpace=x.KI_,e.wrapS=x.rpg,e.wrapT=x.rpg,new xo(this[GA](),e)}async createTexture(e,t="image/png"){const{textureUtils:i}=this[Yc],s=await i.loadImage(e,this.withCredentials);return s.userData.mimeType=t,this[PA](s)}async createLottieTexture(e,t=1){const{textureUtils:i}=this[Yc],s=await i.loadLottie(e,t,this.withCredentials);return this[PA](s)}createVideoTexture(e){const t=document.createElement("video");t.crossOrigin=this.withCredentials?"use-credentials":"anonymous",t.src=e,t.muted=!0,t.playsInline=!0,t.loop=!0,t.play();const i=new x.fO1(t);return this[PA](i)}createCanvasTexture(){const e=document.createElement("canvas"),t=new x.ROQ(e);return this[PA](t)}async updated(e){if(super.updated(e),e.has("variantName")){const e=this[Wc].beginActivity("variant-update");e(.1);const t=this[_A],{variantName:i}=this;null!=t&&(await t[wA](i),this[zc](),this.dispatchEvent(new CustomEvent("variant-applied"))),e(1)}if(e.has("orientation")||e.has("scale")){if(!this.loaded)return;const e=this[jc];e.applyTransform(),e.updateBoundingBox(),e.updateShadow(),this[Yc].arRenderer.onUpdateScene(),this[zc]()}}[Vc](){super[Vc]();const{currentGLTF:e}=this[jc];if(null!=e){const{correlatedSceneGraph:t}=e;null!=t&&e!==this[LA]&&(this[_A]=new kA(t,this[GA]()),this[UA]=JSON.parse(JSON.stringify(t.gltf))),"variants"in e.userData&&this.requestUpdate("variantName")}this[LA]=e}async exportScene(e){const t=this[jc];return new Promise((async(i,s)=>{const n={binary:!0,onlyVisible:!0,maxTextureSize:1/0,includeCustomExtensions:!1,forceIndices:!1};Object.assign(n,e),n.animations=t.animations,n.truncateDrawRange=!0;const r=t.shadow;let a=!1;null!=r&&(a=r.visible,r.visible=!1),await this[_A][BA]();(new Ni).register((e=>new Us(e))).parse(t.model,(e=>i(new Blob([n.binary?e:JSON.stringify(e)],{type:n.binary?"application/octet-stream":"application/json"}))),(()=>s("glTF export failed")),n),null!=r&&(r.visible=a)}))}materialFromPoint(e,t){const i=this[_A];if(null==i)return null;const s=this[jc],n=s.getNDC(e,t),r=s.hitFromPoint(n);return null==r||null==r.face?null:i[vA](r)}}return FA([Q({type:String,attribute:"variant-name"})],n.prototype,"variantName",void 0),FA([Q({type:String,attribute:"orientation"})],n.prototype,"orientation",void 0),FA([Q({type:String,attribute:"scale"})],n.prototype,"scale",void 0),n})((e=>{var t,i,s;
vendor: 10,731 bytes, line 407
407class n extends e{constructor(){super(...arguments),this.autoRotate=!1,this.autoRotateDelay=3e3,this.rotationPerSecond="auto",this[t]=performance.now(),this[i]=0,this[s]=e=>{this.autoRotate&&"user-interaction"===e.detail.source&&(this[Au]=performance.now())}}connectedCallback(){super.connectedCallback(),this.addEventListener("camera-change",this[hu]),this[Au]=performance.now()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("camera-change",this[hu]),this[Au]=performance.now()}updated(e){super.updated(e),e.has("autoRotate")&&(this[Au]=performance.now())}[(t=Au,i=cu,lu)](e){this[cu]=e[0]}[Kc](e,t){if(super[Kc](e,t),!this.autoRotate||!this[Xc]()||this[Yc].isPresenting)return;const i=Math.min(t,e-this[Au]-this.autoRotateDelay);i>0&&(this[jc].yaw=this.turntableRotation+this[cu]*i*.001)}get turntableRotation(){return this[jc].yaw}resetTurntableRotation(e=0){this[jc].yaw=e}}return s=hu,ru([Q({type:Boolean,attribute:"auto-rotate"})],n.prototype,"autoRotate",void 0),ru([Q({type:Number,attribute:"auto-rotate-delay"})],n.prototype,"autoRotateDelay",void 0),ru([qn({intrinsics:ou,updateHandler:lu}),Q({type:String,attribute:"rotation-per-second"})],n.prototype,"rotationPerSecond",void 0),n})((e=>{var t,i,s;class n extends e{constructor(){super(...arguments),this.environmentImage=null,this.skyboxImage=null,this.shadowIntensity=0,this.shadowSoftness=1,this.exposure=1,this.toneMapping="auto",this.skyboxHeight="0",this[t]=null,this[i]=null,this[s]=null}updated(e){super.updated(e),e.has("shadowIntensity")&&(this[jc].setShadowIntensity(.5*this.shadowIntensity),this[zc]()),e.has("shadowSoftness")&&(this[jc].setShadowSoftness(this.shadowSoftness),this[zc]()),e.has("exposure")&&(this[jc].exposure=this.exposure,this[zc]()),e.has("toneMapping")&&(this[jc].toneMapping="aces"===this.toneMapping?x.LY2:"agx"===this.toneMapping?x.Bgp:"reinhard"===this.toneMapping?x.CdI:"cineon"===this.toneMapping?x.YGz:"linear"===this.toneMapping?x.EoG:"none"===this.toneMapping?x.uL9:x.ORg,this[zc]()),(e.has("environmentImage")||e.has("skyboxImage"))&&this[Zc]()&&this[Fe](),e.has("skyboxHeight")&&(this[jc].setGroundedSkybox(),this[zc]())}hasBakedShadow(){return this[jc].bakedShadows.size>0}async[(t=De,i=ke,s=Le,Fe)](){const{skyboxImage:e,environmentImage:t}=this;null!=this[Le]&&(this[Le](),this[Le]=null);const{textureUtils:i}=this[Yc];if(null==i)return;const s=this[Wc].beginActivity("environment-update");try{const{environmentMap:n,skybox:r}=await i.generateEnvironmentMapAndSkybox(ve(e),t,(e=>s(Me(e,0,1))),this.withCredentials);this[De]!==n&&(this[De]=n,this.dispatchEvent(new CustomEvent("environment-change"))),this[ke]=null!=r?r.name===n.name?n:r:null,this[jc].setEnvironmentAndSkybox(this[De],this[ke])}catch(n){if(n instanceof Error)throw this[jc].setEnvironmentAndSkybox(null,null),n}finally{s(1)}}}return Te([Q({type:String,attribute:"environment-image"})],n.prototype,"environmentImage",void 0),Te([Q({type:String,attribute:"skybox-image"})],n.prototype,"skyboxImage",void 0),Te([Q({type:Number,attribute:"shadow-intensity"})],n.prototype,"shadowIntensity",void 0),Te([Q({type:Number,attribute:"shadow-softness"})],n.prototype,"shadowSoftness",void 0),Te([Q({type:Number})],n.prototype,"exposure",void 0),Te([Q({type:String,attribute:"tone-mapping"})],n.prototype,"toneMapping",void 0),Te([Q({type:String,attribute:"skybox-height"})],n.prototype,"skyboxHeight",void 0),n})((e=>{var t,i,s,n,r,a,o,A,c,l,h,u,g,d,p,m,f,b;class I extends e{constructor(){super(...arguments),this.cameraControls=!1,this.cameraOrbit=Wn,this.cameraTarget="auto auto auto",this.fieldOfView="auto",this.minCameraOrbit="auto",this.maxCameraOrbit="auto",this.minFieldOfView="auto",this.maxFieldOfView="auto",this.interactionPromptThreshold=3e3,this.interactionPrompt=Zn,this.interactionPromptStyle=tr,this.orbitSensitivity=1,this.zoomSensitivity=1,this.panSensitivity=1,this.touchAction=ir,this.disableZoom=!1,this.disablePan=!1,this.disableTap=!1,this.interpolationDecay=50,this.a11y=null,this[t]=this.shadowRoot.querySelector(".interaction-prompt"),this[i]=this.shadowRoot.querySelector("#prompt"),this[s]=[this.shadowRoot.querySelector("#finger0"),this.shadowRoot.querySelector("#finger1")],this[n]=this.shadowRoot.querySelector(".pan-target"),this[r]=0,this[a]=1/0,this[o]=!1,this[A]=!1,this[c]=Vr.AUTOMATIC,this[l]=new Jr(this[jc].camera,this[Hc],this[jc]),this[h]=new x.$V,this[u]=!1,this[g]=!1,this[d]=!1,this[p]={},this[m]=()=>{const e=this[gr].changeSource;this[Rr]=e,e===Vr.USER_INTERACTION&&(this[xr]=!0,this[br]())},this[f]=()=>{this[Ir](),this[zc]();const e=this[gr].changeSource;this.dispatchEvent(new CustomEvent("camera-change",{detail:{source:e}}))},this[b]=e=>{this[Nc].classList.toggle("pointer-tumbling","pointer-change-start"===e.type)}}get inputSensitivity(){return this[gr].inputSensitivity}set inputSensitivity(e){this[gr].inputSensitivity=e}getCameraOrbit(){const{theta:e,phi:t,radius:i}=this[Tr];return{theta:e,phi:t,radius:i,toString(){return`${this.theta}rad ${this.phi}rad ${this.radius}m`}}}getCameraTarget(){return el(this[Yc].isPresenting?this[Yc].arRenderer.target:this[jc].getDynamicTarget())}getFieldOfView(){return this[gr].getFieldOfView()}getMinimumFieldOfView(){return this[gr].options.minimumFieldOfView}getMaximumFieldOfView(){return this[gr].options.maximumFieldOfView}getIdealAspect(){return this[jc].idealAspect}jumpCameraToGoal(){this[Dr]=!0,this.requestUpdate(Dr,!1)}resetInteractionPrompt(){this[Mr]=0,this[Sr]=1/0,this[xr]=!1,this[Qr]=this.interactionPrompt===Zn&&this.cameraControls}zoom(e){const t=new WheelEvent("wheel",{deltaY:-30*e});this[Hc].dispatchEvent(t)}connectedCallback(){super.connectedCallback(),this[gr].addEventListener("user-interaction",this[Br]),this[gr].addEventListener("pointer-change-start",this[vr]),this[gr].addEventListener("pointer-change-end",this[vr])}disconnectedCallback(){super.disconnectedCallback(),this[gr].removeEventListener("user-interaction",this[Br]),this[gr].removeEventListener("pointer-change-start",this[vr]),this[gr].removeEventListener("pointer-change-end",this[vr])}updated(e){super.updated(e);const t=this[gr],i=this[jc];if(e.has("cameraControls")&&(this.cameraControls?(t.enableInteraction(),this.interactionPrompt===Zn&&(this[Qr]=!0)):(t.disableInteraction(),this[br]()),this[Hc].setAttribute("aria-label",this[Fc])),e.has("disableZoom")&&(t.disableZoom=this.disableZoom),e.has("disablePan")&&(t.enablePan=!this.disablePan),e.has("disableTap")&&(t.enableTap=!this.disableTap),(e.has("interactionPrompt")||e.has("cameraControls")||e.has("src"))&&(this.interactionPrompt===Zn&&this.cameraControls&&!this[xr]?this[Qr]=!0:this[br]()),e.has("interactionPromptStyle")&&(this[mr].style.opacity=this.interactionPromptStyle==er?"1":"0"),e.has("touchAction")){const e=this.touchAction;t.applyOptions({touchAction:e}),t.updateTouchActionStyle()}e.has("orbitSensitivity")&&(t.orbitSensitivity=this.orbitSensitivity),e.has("zoomSensitivity")&&(t.zoomSensitivity=this.zoomSensitivity),e.has("panSensitivity")&&(t.panSensitivity=this.panSensitivity),e.has("interpolationDecay")&&(t.setDamperDecayTime(this.interpolationDecay),i.setTargetDamperDecayTime(this.interpolationDecay)),e.has("a11y")&&this[Er](),!0===this[Dr]&&Promise.resolve().then((()=>{t.jumpToGoal(),i.jumpToGoal(),this[wr](),this[Dr]=!1}))}async updateFraming(){const e=this[jc],t=e.adjustedFoV(e.framedFoVDeg);await e.updateFraming();const i=e.adjustedFoV(e.framedFoVDeg),s=this[gr].getFieldOfView()/t;this[gr].setFieldOfView(i*s),this[Fr]=!0,this.requestUpdate("maxFieldOfView"),this.requestUpdate("fieldOfView"),this.requestUpdate("minCameraOrbit"),this.requestUpdate("maxCameraOrbit"),this.requestUpdate("cameraOrbit"),await this.updateComplete}interact(e,t,i){const s=this[Hc],n=this[fr];if("1"===n[0].style.opacity)return void console.warn("interact() failed because an existing interaction is running.");const r=new Array;r.push({x:Kn(t.x),y:Kn(t.y)});const a=[{x:r[0].x(0),y:r[0].y(0)}];null!=i&&(r.push({x:Kn(i.x),y:Kn(i.y)}),a.push({x:r[1].x(0),y:r[1].y(0)}));let o=performance.now();const{width:A,height:c}=this[jc],l=this.getBoundingClientRect(),h=e=>{for(const[t,i]of a.entries()){const{style:r}=n[t];r.transform=`translateX(${A*i.x}px) translateY(${c*i.y}px)`,"pointerdown"===e?r.opacity="1":"pointerup"===e&&(r.opacity="0");const a={pointerId:t-5678,pointerType:"touch",target:s,clientX:A*i.x+l.x,clientY:c*i.y+l.y,altKey:!0};s.dispatchEvent(new PointerEvent(e,a))}},u=()=>{const t=this[Rr];if(t!==Vr.AUTOMATIC||!s.isConnected){for(const e of this[fr])e.style.opacity="0";return h("pointercancel"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:t}})),void document.removeEventListener("visibilitychange",g)}const i=Math.min(1,(performance.now()-o)/e);for(const[e,s]of a.entries())s.x=r[e].x(i),s.y=r[e].y(i);h("pointermove"),i<1?requestAnimationFrame(u):(h("pointerup"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:Vr.AUTOMATIC}})),document.removeEventListener("visibilitychange",g))},g=()=>{let e=0;"hidden"===document.visibilityState?e=performance.now()-o:o=performance.now()-e};document.addEventListener("visibilitychange",g),h("pointerdown"),this[Rr]=Vr.AUTOMATIC,requestAnimationFrame(u)}[(t=pr,i=mr,s=fr,n=dr,r=Mr,a=Sr,o=xr,A=Qr,c=Rr,l=gr,h=Tr,u=Dr,g=kr,d=Fr,p=Cr,Ur)](e){const t=this[gr],i=this[jc];i.framedFoVDeg=180*e[0]/Math.PI,t.changeSource=Vr.NONE,t.setFieldOfView(i.adjustedFoV(i.framedFoVDeg)),this[Br]()}[Lr](e){const t=this[gr];if(this[Fr]){const{theta:t,phi:i}=this.getCameraOrbit();e[0]=t,e[1]=i,this[Fr]=!1}t.changeSource=Vr.NONE,t.setOrbit(e[0],e[1],e[2]),this[Br]()}[Gr](e){this[gr].applyOptions({minimumAzimuthalAngle:e[0],minimumPolarAngle:e[1],minimumRadius:e[2]}),this.jumpCameraToGoal()}[Pr](e){this[gr].applyOptions({maximumAzimuthalAngle:e[0],maximumPolarAngle:e[1],maximumRadius:e[2]}),this[yr](e[2]),this.jumpCameraToGoal()}[Or](e){this[gr].applyOptions({minimumFieldOfView:180*e[0]/Math.PI}),this.jumpCameraToGoal()}[Nr](e){const t=this[jc].adjustedFoV(180*e[0]/Math.PI);this[gr].applyOptions({maximumFieldOfView:t}),this.jumpCameraToGoal()}[_r](e){const[t,i,s]=e;this[Yc].arRenderer.isPresenting||this[jc].setTarget(t,i,s),this[gr].changeSource=Vr.NONE,this[Yc].arRenderer.updateTarget(),this[Br]()}[Kc](e,t){if(super[Kc](e,t),this[Yc].isPresenting||!this[Xc]())return;const i=this[gr],s=this[jc],n=performance.now();if(this[Qr]&&this.loaded&&n>this[Gc]+this.interactionPromptThreshold&&(this[Qr]=!1,this[Sr]=n,this[pr].classList.add("visible")),isFinite(this[Sr])&&this.interactionPromptStyle===tr){const e=(n-this[Sr])/5e3%1,t=Jn(e),r=Yn(e);if(this[mr].style.opacity=`${r}`,t!==this[Mr]){const e=t*s.width*.05,n=(t-this[Mr])*Math.PI/16;this[mr].style.transform=`translateX(${e}
407px)`,i.changeSource=Vr.AUTOMATIC,i.adjustOrbit(n,0,0),this[Mr]=t}}const r=i.update(e,t),a=s.updateTarget(t);(r||a)&&this[wr]()}[br](){this[Qr]=!1,this[pr].classList.remove("visible"),this[Sr]=1/0}[yr](e){const t=Math.max(this[jc].farRadius(),e),i=Math.abs(2*t);this[gr].updateNearFar(0,i)}[Ir](){const{theta:e,phi:t}=this[gr].getCameraSpherical(this[Tr]),i=(4+Math.floor((e%ur+hr)/cr))%4,s=Math.floor(t/lr),n=`${Xn[s]}${$n[i]}`,r=n;r in this[Cr]?this[_c](this[Cr][r]):this[_c](`View from stage ${n}`)}get[Fc](){let e=". Use mouse, touch or arrow keys to move.";return"interaction-prompt"in this[Cr]&&(e=`. ${this[Cr]["interaction-prompt"]}`),super[Fc].replace(/\.$/,"")+(this.cameraControls?e:"")}async[Jc](e){const t=this[gr],i=this[jc],s=i.adjustedFoV(i.framedFoVDeg);super[Jc](e);const n=i.adjustedFoV(i.framedFoVDeg)/s,r=t.getFieldOfView()*(isFinite(n)?n:1);t.updateAspect(this[jc].aspect),this.requestUpdate("maxFieldOfView",this.maxFieldOfView),await this.updateComplete,this[gr].setFieldOfView(r),this.jumpCameraToGoal()}[Vc](){super[Vc](),this[kr]?this[Fr]=!0:this[kr]=!0,this.requestUpdate("maxFieldOfView",this.maxFieldOfView),this.requestUpdate("fieldOfView",this.fieldOfView),this.requestUpdate("minCameraOrbit",this.minCameraOrbit),this.requestUpdate("maxCameraOrbit",this.maxCameraOrbit),this.requestUpdate("cameraOrbit",this.cameraOrbit),this.requestUpdate("cameraTarget",this.cameraTarget),this.jumpCameraToGoal()}[(m=Br,f=wr,b=vr,Er)](){if("string"===typeof this.a11y)if(this.a11y.startsWith("{"))try{this[Cr]=JSON.parse(this.a11y)}catch(e){console.warn("Error parsing a11y JSON:",e)}else this.a11y.length>0?console.warn("Error not supported format, should be a JSON string:",this.a11y):this[Cr]={};else"object"===typeof this.a11y&&null!=this.a11y?this[Cr]=Object.assign({},this.a11y):this[Cr]={};this[Hc].setAttribute("aria-label",this[Fc])}}return Vn([Q({type:Boolean,attribute:"camera-controls"})],I.prototype,"cameraControls",void 0),Vn([qn({intrinsics:rr,observeEffects:!0,updateHandler:Lr}),Q({type:String,attribute:"camera-orbit",hasChanged:()=>!0})],I.prototype,"cameraOrbit",void 0),Vn([qn({intrinsics:Ar,observeEffects:!0,updateHandler:_r}),Q({type:String,attribute:"camera-target",hasChanged:()=>!0})],I.prototype,"cameraTarget",void 0),Vn([qn({intrinsics:sr,observeEffects:!0,updateHandler:Ur}),Q({type:String,attribute:"field-of-view",hasChanged:()=>!0})],I.prototype,"fieldOfView",void 0),Vn([qn({intrinsics:ar,updateHandler:Gr}),Q({type:String,attribute:"min-camera-orbit",hasChanged:()=>!0})],I.prototype,"minCameraOrbit",void 0),Vn([qn({intrinsics:or,updateHandler:Pr}),Q({type:String,attribute:"max-camera-orbit",hasChanged:()=>!0})],I.prototype,"maxCameraOrbit",void 0),Vn([qn({intrinsics:nr,updateHandler:Or}),Q({type:String,attribute:"min-field-of-view",hasChanged:()=>!0})],I.prototype,"minFieldOfView",void 0),Vn([qn({intrinsics:sr,updateHandler:Nr}),Q({type:String,attribute:"max-field-of-view",hasChanged:()=>!0})],I.prototype,"maxFieldOfView",void 0),Vn([Q({type:Number,attribute:"interaction-prompt-threshold"})],I.prototype,"interactionPromptThreshold",void 0),Vn([Q({type:String,attribute:"interaction-prompt"})],I.prototype,"interactionPrompt",void 0),Vn([Q({type:String,attribute:"interaction-prompt-style"})],I.prototype,"interactionPromptStyle",void 0),Vn([Q({type:Number,attribute:"orbit-sensitivity"})],I.prototype,"orbitSensitivity",void 0),Vn([Q({type:Number,attribute:"zoom-sensitivity"})],I.prototype,"zoomSensitivity",void 0),Vn([Q({type:Number,attribute:"pan-sensitivity"})],I.prototype,"panSensitivity",void 0),Vn([Q({type:String,attribute:"touch-action"})],I.prototype,"touchAction",void 0),Vn([Q({type:Boolean,attribute:"disable-zoom"})],I.prototype,"disableZoom",void 0),Vn([Q({type:Boolean,attribute:"disable-pan"})],I.prototype,"disablePan",void 0),Vn([Q({type:Boolean,attribute:"disable-tap"})],I.prototype,"disableTap",void 0),Vn([Q({type:Number,attribute:"interpolation-decay"})],I.prototype,"interpolationDecay",void 0),Vn([Q()],I.prototype,"a11y",void 0),I})((e=>{var t,i,s,n,r,a,o,A,c,l;class h extends e{constructor(){super(...arguments),this.ar=!1,this.arScale="auto",this.arUsdzMaxTextureSize="auto",this.arPlacement="floor",this.arModes="webxr scene-viewer quick-look",this.iosSrc=null,this.xrEnvironment=!1,this[t]=!1,this[i]=this.shadowRoot.querySelector(".ar-button"),this[s]=document.createElement("a"),this[n]=new Set,this[r]=Rh,this[a]=!1,this[o]=e=>{e.preventDefault(),this.activateAR()},this[A]=({status:e})=>{e!==Wr&&this[Yc].arRenderer.presentedScene!==this[jc]||(this.setAttribute("ar-status",e),this.dispatchEvent(new CustomEvent("ar-status",{detail:{status:e}})),e===Wr?this.removeAttribute("ar-tracking"):e===$r&&this.setAttribute("ar-tracking",ea))},this[c]=({status:e})=>{this.setAttribute("ar-tracking",e),this.dispatchEvent(new CustomEvent("ar-tracking",{detail:{status:e}}))},this[l]=e=>{"_apple_ar_quicklook_button_tapped"==e.data&&this.dispatchEvent(new CustomEvent("quick-look-button-tapped"))}}get canActivateAR(){return this[Uh]!==Rh}connectedCallback(){super.connectedCallback(),this[Yc].arRenderer.addEventListener("status",this[Nh]),this.setAttribute("ar-status",Wr),this[Yc].arRenderer.addEventListener("tracking",this[Hh]),this[Gh].addEventListener("message",this[qh])}disconnectedCallback(){super.disconnectedCallback(),this[Yc].arRenderer.removeEventListener("status",this[Nh]),this[Yc].arRenderer.removeEventListener("tracking",this[Hh]),this[Gh].removeEventListener("message",this[qh])}update(e){super.update(e),e.has("arScale")&&(this[jc].canScale="fixed"!==this.arScale),e.has("arPlacement")&&(this[jc].updateShadow(),this[zc]()),e.has("arModes")&&(this[_h]=vh(this.arModes)),(e.has("ar")||e.has("arModes")||e.has("src")||e.has("iosSrc")||e.has("arUsdzMaxTextureSize"))&&this[jh]()}async activateAR(){switch(this[Uh]){case xh:await this[Fh]();break;case Mh:await this[Dh]();break;case Sh:this[kh]();break;default:console.warn("No AR Mode can be activated. This is probably due to missing configuration or device capabilities")}}async[(t=Lh,i=Th,s=Gh,n=_h,r=Uh,a=Ph,o=Oh,A=Nh,c=Hh,l=qh,jh)](){var e;let t=Rh;if(this.ar){if(null!=this.src)for(const i of this[_h]){if("webxr"===i&&fe&&!yh&&await this[Yc].arRenderer.supportsPresentation()){t=Mh;break}if("scene-viewer"===i&&!Bh&&(ye||navigator.userAgentData&&navigator.userAgentData.getHighEntropyValues&&(null===(e=(await navigator.userAgentData.getHighEntropyValues(["formFactor"])).formFactor)||void 0===e?void 0:e.includes("XR")))){t=Sh;break}if("quick-look"===i&&we){t=xh;break}}t===Rh&&null!=this.iosSrc&&we&&(t=xh)}if(t!==Rh)this[Th].classList.add("enabled"),this[Th].addEventListener("click",this[Oh]);else if(this[Th].classList.contains("enabled")){this[Th].removeEventListener("click",this[Oh]),this[Th].classList.remove("enabled");const e=Zr;this.setAttribute("ar-status",e),this.dispatchEvent(new CustomEvent("ar-status",{detail:{status:e}}))}this[Uh]=t}async[Dh](){console.log("Attempting to present in AR with WebXR..."),await this[zh]();try{this[Th].removeEventListener("click",this[Oh]);const{arRenderer:e}=this[Yc];e.placeOnWall="wall"===this.arPlacement,await e.present(this[jc],this.xrEnvironment)}catch(e){console.warn("Error while trying to present in AR with WebXR"),console.error(e),await this[Yc].arRenderer.stopPresenting(),yh=!0,console.warn("Falling back to next ar-mode"),await this[jh](),this.activateAR()}finally{this[jh]()}}async[zh](){this.loaded||(this[Ph]=!0,this[Pc](),await((e,t,i=null)=>new Promise((s=>{e.addEventListener(t,(function n(r){i&&!i(r)||(s(r),e.removeEventListener(t,n))}))})))(this,"load"),this[Ph]=!1)}[Zc](){return super[Zc]()||this[Ph]}[kh](){const e=self.location.toString(),t=new URL(e),i=new URL(this.src,e);i.hash&&(i.hash="");const s=new URLSearchParams(i.search);if(t.hash=wh,s.set("mode","ar_preferred"),s.has("disable_occlusion")||s.set("disable_occlusion","true"),"fixed"===this.arScale&&s.set("resizable","false"),"wall"===this.arPlacement&&s.set("enable_vertical_placement","true"),s.has("sound")){const t=new URL(s.get("sound"),e);s.set("sound",t.toString())}if(s.has("link")){const t=new URL(s.get("link"),e);s.set("link",t.toString())}const n=`intent://arvr.google.com/scene-viewer/1.2?${s.toString()+"&file="+encodeURIComponent(i.toString())}#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=${encodeURIComponent(t.toString())};end;`;self.addEventListener("hashchange",(()=>{self.location.hash===wh&&(Bh=!0,self.history.back(),console.warn("Error while trying to present in AR with Scene Viewer"),console.warn("Falling back to next ar-mode"),this[jh]())}),{once:!0}),this[Gh].setAttribute("href",n),console.log("Attempting to present in AR with Scene Viewer..."),this[Gh].click()}async[Fh](){const e=!this.iosSrc;this[Th].classList.remove("enabled");const t=e?await this.prepareUSDZ():this.iosSrc,i=new URL(t,self.location.toString());if(e){const e=self.location.toString(),t=new URL(e),s=new URL(this.src,t);s.hash&&(i.hash=s.hash)}"fixed"===this.arScale&&(i.hash&&(i.hash+="&"),i.hash+="allowsContentScaling=0");const s=this[Gh];s.setAttribute("rel","ar");const n=document.createElement("img");s.appendChild(n),s.setAttribute("href",i.toString()),e&&s.setAttribute("download","model.usdz"),s.style.display="none",s.isConnected||this.shadowRoot.appendChild(s),console.log("Attempting to present in AR with Quick Look..."),s.click(),s.removeChild(n),e&&URL.revokeObjectURL(t),this[Th].classList.add("enabled")}async prepareUSDZ(){const e=this[Wc].beginActivity("usdz-conversion");await this[zh]();const{model:t,shadow:i,target:s}=this[jc];if(null==t)return"";let n=!1;null!=i&&(n=i.visible,i.visible=!1),e(.2);const r=new hh;s.remove(t),t.position.copy(s.position),t.updateWorldMatrix(!1,!0);const a=await r.parseAsync(t,{maxTextureSize:isNaN(this.arUsdzMaxTextureSize)?1/0:Math.max(parseInt(this.arUsdzMaxTextureSize),
vendor: 7,482 bytes, line 407
40716)});t.position.set(0,0,0),s.add(t);const o=new Blob([a],{type:"model/vnd.usdz+zip"}),A=URL.createObjectURL(o);return e(1),null!=i&&(i.visible=n),A}}return Eh([Q({type:Boolean,attribute:"ar"})],h.prototype,"ar",void 0),Eh([Q({type:String,attribute:"ar-scale"})],h.prototype,"arScale",void 0),Eh([Q({type:String,attribute:"ar-usdz-max-texture-size"})],h.prototype,"arUsdzMaxTextureSize",void 0),Eh([Q({type:String,attribute:"ar-placement"})],h.prototype,"arPlacement",void 0),Eh([Q({type:String,attribute:"ar-modes"})],h.prototype,"arModes",void 0),Eh([Q({type:String,attribute:"ios-src"})],h.prototype,"iosSrc",void 0),Eh([Q({type:Boolean,attribute:"xr-environment"})],h.prototype,"xrEnvironment",void 0),h})((e=>{var t,i,s,n,r,a,o,A;class c extends e{static set dracoDecoderLocation(e){Ti.setDRACODecoderLocation(e)}static get dracoDecoderLocation(){return Ti.getDRACODecoderLocation()}static set ktx2TranscoderLocation(e){Ti.setKTX2TranscoderLocation(e)}static get ktx2TranscoderLocation(){return Ti.getKTX2TranscoderLocation()}static set meshoptDecoderLocation(e){Ti.setMeshoptDecoderLocation(e)}static get meshoptDecoderLocation(){return Ti.getMeshoptDecoderLocation()}static set lottieLoaderLocation(e){Xa.singleton.textureUtils.lottieLoaderUrl=e}static get lottieLoaderLocation(){return Xa.singleton.textureUtils.lottieLoaderUrl}static mapURLs(e){Xa.singleton.loader[Si].manager.setURLModifier(e)}dismissPoster(){this.loaded?this[eu]():(this[Zh]=!0,this[Pc]())}showPoster(){const e=this[$h];if(e.classList.contains("show"))return;e.classList.add("show"),this[Hc].classList.remove("show");const t=this[Xh];t.removeAttribute("tabindex"),t.removeAttribute("aria-hidden");const i=this.modelIsVisible;this[tu]=!1,this[kc](i)}getDimensions(){return el(this[jc].size)}getBoundingBoxCenter(){return el(this[jc].boundingBox.getCenter(new x.Pa4))}constructor(...e){super(...e),this.poster=null,this.reveal=Vh,this.loading=Jh,this[t]=!1,this[i]=!1,this[s]=this.shadowRoot.querySelector(".slot.poster"),this[n]=this.shadowRoot.querySelector("#default-poster"),this[r]=this.shadowRoot.querySelector("#default-progress-bar > .bar"),this[a]=this[Xh].getAttribute("aria-label"),this[o]=((e,t)=>{let i=null;const s=(...s)=>{null==i&&(e(...s),i=self.setTimeout((()=>i=null),t))};return s.flush=()=>{null!=i&&(self.clearTimeout(i),i=null)},s})((e=>{const t=this[Wh].parentNode;requestAnimationFrame((()=>{this[Wh].style.transform=`scaleX(${e})`,0===e&&(t.removeChild(this[Wh]),t.appendChild(this[Wh])),this[Wh].classList.toggle("hide",1===e)}))}),100),this[A]=e=>{const t=e.detail.totalProgress,i=e.detail.reason;1===t&&(this[iu].flush(),this.loaded&&(this[Zh]||this.reveal===Vh)&&this[eu]()),this[iu](t),this.dispatchEvent(new CustomEvent("progress",{detail:{totalProgress:t,reason:i}}))};const c=self.ModelViewerElement||{},l=c.dracoDecoderLocation||"https://www.gstatic.com/draco/versioned/decoders/1.5.6/";Ti.setDRACODecoderLocation(l);const h=c.ktx2TranscoderLocation||"https://www.gstatic.com/basis-universal/versioned/2021-04-15-ba1c3e4/";Ti.setKTX2TranscoderLocation(h),c.meshoptDecoderLocation&&Ti.setMeshoptDecoderLocation(c.meshoptDecoderLocation);const u=c.lottieLoaderLocation||"https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/loaders/LottieLoader.js";Xa.singleton.textureUtils.lottieLoaderUrl=u}connectedCallback(){super.connectedCallback(),this.loaded||this.showPoster(),this[Wc].addEventListener("progress",this[nu])}disconnectedCallback(){super.disconnectedCallback(),this[Wc].removeEventListener("progress",this[nu])}async updated(e){super.updated(e),e.has("poster")&&null!=this.poster&&(this[Xh].style.backgroundImage=`url(${this.poster})`),e.has("alt")&&this[Xh].setAttribute("aria-label",this[Lc]),(e.has("reveal")||e.has("loading"))&&this[Pc]()}[(t=tu,i=Zh,s=$h,n=Xh,r=Wh,a=su,o=iu,A=nu,Zc)](){return!!this.src&&(this[Zh]||this.loading===Yh||this.reveal===Vh&&this[Dc])}[eu](){this[Zh]=!1;const e=this[$h];if(!e.classList.contains("show"))return;e.classList.remove("show"),this[Hc].classList.add("show");const t=this.modelIsVisible;this[tu]=!0,this[kc](t);const i=this.getRootNode();i&&i.activeElement===this&&this[Hc].focus();const s=this[Xh];s.setAttribute("aria-hidden","true"),s.tabIndex=-1,this.dispatchEvent(new CustomEvent("poster-dismissed"))}[Xc](){return super[Xc]()&&this[tu]}}return Kh([Q({type:String})],c.prototype,"poster",void 0),Kh([Q({type:String})],c.prototype,"reveal",void 0),Kh([Q({type:String})],c.prototype,"loading",void 0),c})((e=>{var t;class i extends e{constructor(...e){super(e),this.autoplay=!1,this.animationName=void 0,this.animationCrossfadeDuration=300,this[t]=!0,this[jc].subscribeMixerEvent("loop",(e=>{const t=e.action._loopCount,i=e.action._clip.name,s=e.action._clip.uuid,n=this[jc].markedAnimations.find((e=>e.name===i));if(n){this[jc].updateAnimationLoop(n.name,n.loopMode,n.repetitionCount);const e=this[jc].markedAnimations.filter((e=>e.name!==i));this[jc].markedAnimations=e}this.dispatchEvent(new CustomEvent("loop",{detail:{count:t,name:i,uuid:s}}))})),this[jc].subscribeMixerEvent("finished",(e=>{if(this[jc].appendedAnimations.includes(e.action._clip.name)){const t=this[jc].appendedAnimations.filter((t=>t!==e.action._clip.name));this[jc].appendedAnimations=t}else this[ol]=!0;this.dispatchEvent(new CustomEvent("finished"))}))}get availableAnimations(){return this.loaded?this[jc].animationNames:[]}get duration(){return this[jc].duration}get paused(){return this[ol]}get currentTime(){return this[jc].animationTime}get appendedAnimations(){return this[jc].appendedAnimations}set currentTime(e){this[jc].animationTime=e,this[zc]()}get timeScale(){return this[jc].animationTimeScale}set timeScale(e){this[jc].animationTimeScale=e}pause(){this[ol]||(this[ol]=!0,this.dispatchEvent(new CustomEvent("pause")))}play(e){this.availableAnimations.length>0&&(this[ol]=!1,this[nl](e),this.dispatchEvent(new CustomEvent("play")))}appendAnimation(e,t){this.availableAnimations.length>0&&(this[ol]=!1,this[rl](e,t),this.dispatchEvent(new CustomEvent("append-animation")))}detachAnimation(e,t){this.availableAnimations.length>0&&(this[ol]=!1,this[al](e,t),this.dispatchEvent(new CustomEvent("detach-animation")))}[(t=ol,Vc)](){super[Vc](),this[ol]=!0,null!=this.animationName&&this[nl](),this.autoplay&&this.play()}[Kc](e,t){super[Kc](e,t),this[ol]||!this[Xc]()&&!this[Yc].isPresenting||(this[jc].updateAnimation(t/1e3),this[zc]())}updated(e){super.updated(e),e.has("autoplay")&&this.autoplay&&this.play(),e.has("animationName")&&this[nl]()}[nl](e=Al){var t;const i=null!==(t=e.repetitions)&&void 0!==t?t:1/0,s=e.pingpong?x.uEv:1===i?x.jAl:x.YKA;this[jc].playAnimation(this.animationName,this.animationCrossfadeDuration/1e3,s,i),this[ol]&&(this[jc].updateAnimation(0),this[zc]())}[rl](e="",t=cl){var i;const s=null!==(i=t.repetitions)&&void 0!==i?i:1/0,n=t.pingpong?x.uEv:1===s?x.jAl:x.YKA,r=!!t.repetitions||"pingpong"in t;this[jc].appendAnimation(e||this.animationName,n,s,t.weight,t.timeScale,t.fade,t.warp,t.relativeWarp,t.time,r),this[ol]&&(this[jc].updateAnimation(0),this[zc]())}[al](e="",t=ll){this[jc].detachAnimation(e||this.animationName,t.fade),this[ol]&&(this[jc].updateAnimation(0),this[zc]())}}return sl([Q({type:Boolean})],i.prototype,"autoplay",void 0),sl([Q({type:String,attribute:"animation-name"})],i.prototype,"animationName",void 0),sl([Q({type:Number,attribute:"animation-crossfade-duration"})],i.prototype,"animationCrossfadeDuration",void 0),i})(il))))))));customElements.define("model-viewer",uu)}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.