@neurodyn/ar 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ar.chunk.0c14f05b.min.js +2 -0
- package/dist/ar.chunk.849c4685.min.js +983 -0
- package/dist/{ar.chunk.c648f878.min.js.LICENSE.txt → ar.chunk.849c4685.min.js.LICENSE.txt} +6 -0
- package/dist/{ar.chunk.81e6bca7.min.js → ar.chunk.86f5a723.min.js} +1 -1
- package/dist/{ar.chunk.bf754a7e.min.js → ar.chunk.c6ed8faf.min.js} +3 -3
- package/dist/{ar.chunk.a9783e67.min.js → ar.chunk.f21653ac.min.js} +3 -3
- package/dist/ar.embed.min.js +1 -1
- package/dist/ar.global.min.js +1 -1
- package/package.json +3 -3
- package/dist/ar.chunk.c648f878.min.js +0 -606
- package/dist/ar.chunk.d610f329.min.js +0 -2
- package/dist/static/assets/basis_transcoder.23b549c9.js +0 -9
- package/dist/static/assets/draco_decoder.08679b61.js +0 -1
- package/dist/static/assets/draco_wasm_wrapper.da788994.js +0 -1
- package/dist/static/assets/draco_wasm_wrapper.efc72384.js +0 -1
- package/dist/static/wasm/1170806b.module.wasm +0 -0
- package/dist/static/wasm/a2169f50.module.wasm +0 -0
- package/dist/static/wasm/a53898c5.module.wasm +0 -0
- /package/dist/{ar.chunk.d610f329.min.js.LICENSE.txt → ar.chunk.0c14f05b.min.js.LICENSE.txt} +0 -0
- /package/dist/{ar.chunk.bf754a7e.min.js.LICENSE.txt → ar.chunk.c6ed8faf.min.js.LICENSE.txt} +0 -0
|
@@ -1,606 +0,0 @@
|
|
|
1
|
-
/*! For license information please see ar.chunk.c648f878.min.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_neurodyn_ar=self.webpackChunk_neurodyn_ar||[]).push([["338"],{4904(e){"use strict";var t={single_source_shortest_paths:function(e,i,a){var r,s,n,o,l,A,h,c={},d={};d[i]=0;var u=t.PriorityQueue.make();for(u.push(i,0);!u.empty();)for(n in s=(r=u.pop()).value,o=r.cost,l=e[s]||{})l.hasOwnProperty(n)&&(A=o+l[n],h=d[n],(void 0===d[n]||h>A)&&(d[n]=A,u.push(n,A),c[n]=s));if(void 0!==a&&void 0===d[a])throw Error("Could not find a path from "+i+" to "+a+".");return c},extract_shortest_path_from_predecessor_list:function(e,t){for(var i=[],a=t;a;)i.push(a),e[a],a=e[a];return i.reverse(),i},find_path:function(e,i,a){var r=t.single_source_shortest_paths(e,i,a);return t.extract_shortest_path_from_predecessor_list(r,a)},PriorityQueue:{make:function(e){var i,a=t.PriorityQueue,r={};for(i in e=e||{},a)a.hasOwnProperty(i)&&(r[i]=a[i]);return r.queue=[],r.sorter=e.sorter||a.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){this.queue.push({value:e,cost:t}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},8428(e,t,i){"use strict";i.d(t,{A:()=>a});let a=(0,i(8112).A)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},3946(e,t,i){let a=i(9972),r=i(9908),s=i(7782),n=i(4783);function o(e,t,i,s,n){let o=[].slice.call(arguments,1),l=o.length,A="function"==typeof o[l-1];if(!A&&!a())throw Error("Callback required as last argument");if(A){if(l<2)throw Error("Too few arguments provided");2===l?(n=i,i=t,t=s=void 0):3===l&&(t.getContext&&void 0===n?(n=s,s=void 0):(n=s,s=i,i=t,t=void 0))}else{if(l<1)throw Error("Too few arguments provided");return 1===l?(i=t,t=s=void 0):2!==l||t.getContext||(s=i,i=t,t=void 0),new Promise(function(a,n){try{let n=r.create(i,s);a(e(n,t,s))}catch(e){n(e)}})}try{let a=r.create(i,s);n(null,e(a,t,s))}catch(e){n(e)}}t.create=r.create,t.toCanvas=o.bind(null,s.render),t.toDataURL=o.bind(null,s.renderToDataURL),t.toString=o.bind(null,function(e,t,i){return n.render(e,i)})},9972(e){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},5734(e,t,i){let a=i(4913).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,i=a(e),r=145===i?26:2*Math.ceil((i-13)/(2*t-2)),s=[i-7];for(let e=1;e<t-1;e++)s[e]=s[e-1]-r;return s.push(6),s.reverse()},t.getPositions=function(e){let i=[],a=t.getRowColCoords(e),r=a.length;for(let e=0;e<r;e++)for(let t=0;t<r;t++)(0!==e||0!==t)&&(0!==e||t!==r-1)&&(e!==r-1||0!==t)&&i.push([a[e],a[t]]);return i}},8682(e,t,i){let a=i(989),r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function s(e){this.mode=a.ALPHANUMERIC,this.data=e}s.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let i=45*r.indexOf(this.data[t]);i+=r.indexOf(this.data[t+1]),e.put(i,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},e.exports=s},3702(e){function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let i=0;i<t;i++)this.putBit((e>>>t-i-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},2165(e){function t(e){if(!e||e<1)throw Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,i,a){let r=e*this.size+t;this.data[r]=i,a&&(this.reservedBit[r]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},9481(e,t,i){let a=i(989);function r(e){this.mode=a.BYTE,"string"==typeof e?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}r.getBitsLength=function(e){return 8*e},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,i=this.data.length;t<i;t++)e.put(this.data[t],8)},e.exports=r},6781(e,t,i){let a=i(4752),r=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],s=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case a.L:return r[(e-1)*4+0];case a.M:return r[(e-1)*4+1];case a.Q:return r[(e-1)*4+2];case a.H:return r[(e-1)*4+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case a.L:return s[(e-1)*4+0];case a.M:return s[(e-1)*4+1];case a.Q:return s[(e-1)*4+2];case a.H:return s[(e-1)*4+3];default:return}}},4752(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,i){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw Error("Unknown EC Level: "+e)}}catch(e){return i}}},9261(e,t,i){let a=i(4913).getSymbolSize;t.getPositions=function(e){let t=a(e);return[[0,0],[t-7,0],[0,t-7]]}},6174(e,t,i){let a=i(4913),r=a.getBCHDigit(1335);t.getEncodedBits=function(e,t){let i=e.bit<<3|t,s=i<<10;for(;a.getBCHDigit(s)-r>=0;)s^=1335<<a.getBCHDigit(s)-r;return(i<<10|s)^21522}},8366(e,t){let i=new Uint8Array(512),a=new Uint8Array(256),r=1;for(let e=0;e<255;e++)i[e]=r,a[r]=e,256&(r<<=1)&&(r^=285);for(let e=255;e<512;e++)i[e]=i[e-255];t.log=function(e){if(e<1)throw Error("log("+e+")");return a[e]},t.exp=function(e){return i[e]},t.mul=function(e,t){return 0===e||0===t?0:i[a[e]+a[t]]}},9712(e,t,i){let a=i(989),r=i(4913);function s(e){this.mode=a.KANJI,this.data=e}s.getBitsLength=function(e){return 13*e},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let i=r.toSJIS(this.data[t]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");i=(i>>>8&255)*192+(255&i),e.put(i,13)}},e.exports=s},7281(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){let t=e.size,i=0,a=0,r=0,s=null,n=null;for(let o=0;o<t;o++){a=r=0,s=n=null;for(let l=0;l<t;l++){let t=e.get(o,l);t===s?a++:(a>=5&&(i+=3+(a-5)),s=t,a=1),(t=e.get(l,o))===n?r++:(r>=5&&(i+=3+(r-5)),n=t,r=1)}a>=5&&(i+=3+(a-5)),r>=5&&(i+=3+(r-5))}return i},t.getPenaltyN2=function(e){let t=e.size,i=0;for(let a=0;a<t-1;a++)for(let r=0;r<t-1;r++){let t=e.get(a,r)+e.get(a,r+1)+e.get(a+1,r)+e.get(a+1,r+1);(4===t||0===t)&&i++}return 3*i},t.getPenaltyN3=function(e){let t=e.size,i=0,a=0,r=0;for(let s=0;s<t;s++){a=r=0;for(let n=0;n<t;n++)a=a<<1&2047|e.get(s,n),n>=10&&(1488===a||93===a)&&i++,r=r<<1&2047|e.get(n,s),n>=10&&(1488===r||93===r)&&i++}return 40*i},t.getPenaltyN4=function(e){let t=0,i=e.data.length;for(let a=0;a<i;a++)t+=e.data[a];return 10*Math.abs(Math.ceil(100*t/i/5)-10)},t.applyMask=function(e,i){let a=i.size;for(let r=0;r<a;r++)for(let s=0;s<a;s++)i.isReserved(s,r)||i.xor(s,r,function(e,i,a){switch(e){case t.Patterns.PATTERN000:return(i+a)%2==0;case t.Patterns.PATTERN001:return i%2==0;case t.Patterns.PATTERN010:return a%3==0;case t.Patterns.PATTERN011:return(i+a)%3==0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(a/3))%2==0;case t.Patterns.PATTERN101:return i*a%2+i*a%3==0;case t.Patterns.PATTERN110:return(i*a%2+i*a%3)%2==0;case t.Patterns.PATTERN111:return(i*a%3+(i+a)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}(e,s,r))},t.getBestMask=function(e,i){let a=Object.keys(t.Patterns).length,r=0,s=1/0;for(let n=0;n<a;n++){i(n),t.applyMask(n,e);let a=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(n,e),a<s&&(s=a,r=n)}return r}},989(e,t,i){let a=i(3673),r=i(863);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw Error("Invalid mode: "+e);if(!a.isValid(t))throw Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return r.testNumeric(e)?t.NUMERIC:r.testAlphanumeric(e)?t.ALPHANUMERIC:r.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,i){if(t.isValid(e))return e;try{if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw Error("Unknown mode: "+e)}}catch(e){return i}}},1412(e,t,i){let a=i(989);function r(e){this.mode=a.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,i;for(t=0;t+3<=this.data.length;t+=3)i=parseInt(this.data.substr(t,3),10),e.put(i,10);let a=this.data.length-t;a>0&&(i=parseInt(this.data.substr(t),10),e.put(i,3*a+1))},e.exports=r},2576(e,t,i){let a=i(8366);t.mul=function(e,t){let i=new Uint8Array(e.length+t.length-1);for(let r=0;r<e.length;r++)for(let s=0;s<t.length;s++)i[r+s]^=a.mul(e[r],t[s]);return i},t.mod=function(e,t){let i=new Uint8Array(e);for(;i.length-t.length>=0;){let e=i[0];for(let r=0;r<t.length;r++)i[r]^=a.mul(t[r],e);let r=0;for(;r<i.length&&0===i[r];)r++;i=i.slice(r)}return i},t.generateECPolynomial=function(e){let i=new Uint8Array([1]);for(let r=0;r<e;r++)i=t.mul(i,new Uint8Array([1,a.exp(r)]));return i}},9908(e,t,i){let a=i(4913),r=i(4752),s=i(3702),n=i(2165),o=i(5734),l=i(9261),A=i(7281),h=i(6781),c=i(3025),d=i(3492),u=i(6174),g=i(989),p=i(8356);function m(e,t,i){let a,r,s=e.size,n=u.getEncodedBits(t,i);for(a=0;a<15;a++)r=(n>>a&1)==1,a<6?e.set(a,8,r,!0):a<8?e.set(a+1,8,r,!0):e.set(s-15+a,8,r,!0),a<8?e.set(8,s-a-1,r,!0):a<9?e.set(8,15-a-1+1,r,!0):e.set(8,15-a-1,r,!0);e.set(s-8,8,1,!0)}t.create=function(e,t){let i,u;if(void 0===e||""===e)throw Error("No input text");let f=r.M;return void 0!==t&&(f=r.from(t.errorCorrectionLevel,r.M),i=d.from(t.version),u=A.from(t.maskPattern),t.toSJISFunc&&a.setToSJISFunction(t.toSJISFunc)),function(e,t,i,r){let u;if(Array.isArray(e))u=p.fromArray(e);else if("string"==typeof e){let a=t;if(!a){let t=p.rawSplit(e);a=d.getBestVersionForData(t,i)}u=p.fromString(e,a||40)}else throw Error("Invalid data");let f=d.getBestVersionForData(u,i);if(!f)throw Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<f)throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+f+".\n")}else t=f;let b=function(e,t,i){let r=new s;i.forEach(function(t){r.put(t.mode.bit,4),r.put(t.getLength(),g.getCharCountIndicator(t.mode,e)),t.write(r)});let n=(a.getSymbolTotalCodewords(e)-h.getTotalCodewordsCount(e,t))*8;for(r.getLengthInBits()+4<=n&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);let o=(n-r.getLengthInBits())/8;for(let e=0;e<o;e++)r.put(e%2?17:236,8);return function(e,t,i){let r,s,n=a.getSymbolTotalCodewords(t),o=n-h.getTotalCodewordsCount(t,i),l=h.getBlocksCount(t,i),A=n%l,d=l-A,u=Math.floor(n/l),g=Math.floor(o/l),p=g+1,m=u-g,f=new c(m),b=0,I=Array(l),C=Array(l),E=0,y=new Uint8Array(e.buffer);for(let e=0;e<l;e++){let t=e<d?g:p;I[e]=y.slice(b,b+t),C[e]=f.encode(I[e]),b+=t,E=Math.max(E,t)}let w=new Uint8Array(n),B=0;for(r=0;r<E;r++)for(s=0;s<l;s++)r<I[s].length&&(w[B++]=I[s][r]);for(r=0;r<m;r++)for(s=0;s<l;s++)w[B++]=C[s][r];return w}(r,e,t)}(t,i,u),I=new n(a.getSymbolSize(t));!function(e,t){let i=e.size,a=l.getPositions(t);for(let t=0;t<a.length;t++){let r=a[t][0],s=a[t][1];for(let t=-1;t<=7;t++)if(!(r+t<=-1)&&!(i<=r+t))for(let a=-1;a<=7;a++)s+a<=-1||i<=s+a||(t>=0&&t<=6&&(0===a||6===a)||a>=0&&a<=6&&(0===t||6===t)||t>=2&&t<=4&&a>=2&&a<=4?e.set(r+t,s+a,!0,!0):e.set(r+t,s+a,!1,!0))}}(I,t);let C=I.size;for(let e=8;e<C-8;e++){let t=e%2==0;I.set(e,6,t,!0),I.set(6,e,t,!0)}return!function(e,t){let i=o.getPositions(t);for(let t=0;t<i.length;t++){let a=i[t][0],r=i[t][1];for(let t=-2;t<=2;t++)for(let i=-2;i<=2;i++)-2===t||2===t||-2===i||2===i||0===t&&0===i?e.set(a+t,r+i,!0,!0):e.set(a+t,r+i,!1,!0)}}(I,t),m(I,i,0),t>=7&&function(e,t){let i,a,r,s=e.size,n=d.getEncodedBits(t);for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+s-8-3,r=(n>>t&1)==1,e.set(i,a,r,!0),e.set(a,i,r,!0)}(I,t),!function(e,t){let i=e.size,a=-1,r=i-1,s=7,n=0;for(let o=i-1;o>0;o-=2)for(6===o&&o--;;){for(let i=0;i<2;i++)if(!e.isReserved(r,o-i)){let a=!1;n<t.length&&(a=(t[n]>>>s&1)==1),e.set(r,o-i,a),-1==--s&&(n++,s=7)}if((r+=a)<0||i<=r){r-=a,a=-a;break}}}(I,b),isNaN(r)&&(r=A.getBestMask(I,m.bind(null,I,i))),A.applyMask(r,I),m(I,i,r),{modules:I,version:t,errorCorrectionLevel:i,maskPattern:r,segments:u}}(e,i,f,u)}},3025(e,t,i){let a=i(2576);function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=a.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let i=a.mod(t,this.genPoly),r=this.degree-i.length;if(r>0){let e=new Uint8Array(this.degree);return e.set(i,r),e}return i},e.exports=r},863(e,t){let i="[0-9]+",a="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",r="(?:(?![A-Z0-9 $%*+\\-./:]|"+(a=a.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=RegExp(a,"g"),t.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=RegExp(r,"g"),t.NUMERIC=RegExp(i,"g"),t.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let s=RegExp("^"+a+"$"),n=RegExp("^"+i+"$"),o=RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return s.test(e)},t.testNumeric=function(e){return n.test(e)},t.testAlphanumeric=function(e){return o.test(e)}},8356(e,t,i){let a=i(989),r=i(1412),s=i(8682),n=i(9481),o=i(9712),l=i(863),A=i(4913),h=i(4904);function c(e){return unescape(encodeURIComponent(e)).length}function d(e,t,i){let a,r=[];for(;null!==(a=e.exec(i));)r.push({data:a[0],index:a.index,mode:t,length:a[0].length});return r}function u(e){let t,i,r=d(l.NUMERIC,a.NUMERIC,e),s=d(l.ALPHANUMERIC,a.ALPHANUMERIC,e);return A.isKanjiModeEnabled()?(t=d(l.BYTE,a.BYTE,e),i=d(l.KANJI,a.KANJI,e)):(t=d(l.BYTE_KANJI,a.BYTE,e),i=[]),r.concat(s,t,i).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function g(e,t){switch(t){case a.NUMERIC:return r.getBitsLength(e);case a.ALPHANUMERIC:return s.getBitsLength(e);case a.KANJI:return o.getBitsLength(e);case a.BYTE:return n.getBitsLength(e)}}function p(e,t){let i,l=a.getBestModeForData(e);if((i=a.from(t,l))!==a.BYTE&&i.bit<l.bit)throw Error('"'+e+'" cannot be encoded with mode '+a.toString(i)+".\n Suggested mode is: "+a.toString(l));switch(i===a.KANJI&&!A.isKanjiModeEnabled()&&(i=a.BYTE),i){case a.NUMERIC:return new r(e);case a.ALPHANUMERIC:return new s(e);case a.KANJI:return new o(e);case a.BYTE:return new n(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(p(t,null)):t.data&&e.push(p(t.data,t.mode)),e},[])},t.fromString=function(e,i){let r=function(e,t){let i={},r={start:{}},s=["start"];for(let n=0;n<e.length;n++){let o=e[n],l=[];for(let e=0;e<o.length;e++){let A=o[e],h=""+n+e;l.push(h),i[h]={node:A,lastCount:0},r[h]={};for(let e=0;e<s.length;e++){let n=s[e];i[n]&&i[n].node.mode===A.mode?(r[n][h]=g(i[n].lastCount+A.length,A.mode)-g(i[n].lastCount,A.mode),i[n].lastCount+=A.length):(i[n]&&(i[n].lastCount=A.length),r[n][h]=g(A.length,A.mode)+4+a.getCharCountIndicator(A.mode,t))}}s=l}for(let e=0;e<s.length;e++)r[s[e]].end=0;return{map:r,table:i}}(function(e){let t=[];for(let i=0;i<e.length;i++){let r=e[i];switch(r.mode){case a.NUMERIC:t.push([r,{data:r.data,mode:a.ALPHANUMERIC,length:r.length},{data:r.data,mode:a.BYTE,length:r.length}]);break;case a.ALPHANUMERIC:t.push([r,{data:r.data,mode:a.BYTE,length:r.length}]);break;case a.KANJI:t.push([r,{data:r.data,mode:a.BYTE,length:c(r.data)}]);break;case a.BYTE:t.push([{data:r.data,mode:a.BYTE,length:c(r.data)}])}}return t}(u(e,A.isKanjiModeEnabled())),i),s=h.find_path(r.map,"start","end"),n=[];for(let e=1;e<s.length-1;e++)n.push(r.table[s[e]].node);return t.fromArray(n.reduce(function(e,t){let i=e.length-1>=0?e[e.length-1]:null;return i&&i.mode===t.mode?e[e.length-1].data+=t.data:e.push(t),e},[]))},t.rawSplit=function(e){return t.fromArray(u(e,A.isKanjiModeEnabled()))}},4913(e,t){let i,a=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw Error('"version" cannot be null or undefined');if(e<1||e>40)throw Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return a[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw Error('"toSJISFunc" is not a valid function.');i=e},t.isKanjiModeEnabled=function(){return void 0!==i},t.toSJIS=function(e){return i(e)}},3673(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},3492(e,t,i){let a=i(4913),r=i(6781),s=i(4752),n=i(989),o=i(3673),l=a.getBCHDigit(7973);function A(e,t){return n.getCharCountIndicator(e,t)+4}t.from=function(e,t){return o.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,i){if(!o.isValid(e))throw Error("Invalid QR Code version");void 0===i&&(i=n.BYTE);let s=(a.getSymbolTotalCodewords(e)-r.getTotalCodewordsCount(e,t))*8;if(i===n.MIXED)return s;let l=s-A(i,e);switch(i){case n.NUMERIC:return Math.floor(l/10*3);case n.ALPHANUMERIC:return Math.floor(l/11*2);case n.KANJI:return Math.floor(l/13);case n.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,i){let a,r=s.from(i,s.M);if(Array.isArray(e)){if(e.length>1){for(let i=1;i<=40;i++)if(function(e,t){let i=0;return e.forEach(function(e){let a=A(e.mode,t);i+=a+e.getBitsLength()}),i}(e,i)<=t.getCapacity(i,r,n.MIXED))return i;return}if(0===e.length)return 1;a=e[0]}else a=e;return function(e,i,a){for(let r=1;r<=40;r++)if(i<=t.getCapacity(r,a,e))return r}(a.mode,a.getLength(),r)},t.getEncodedBits=function(e){if(!o.isValid(e)||e<7)throw Error("Invalid QR Code version");let t=e<<12;for(;a.getBCHDigit(t)-l>=0;)t^=7973<<a.getBCHDigit(t)-l;return e<<12|t}},7782(e,t,i){let a=i(8658);t.render=function(e,t,i){var r;let s=i,n=t;void 0!==s||t&&t.getContext||(s=t,t=void 0),t||(n=function(){try{return document.createElement("canvas")}catch(e){throw Error("You need to specify a canvas element")}}()),s=a.getOptions(s);let o=a.getImageWidth(e.modules.size,s),l=n.getContext("2d"),A=l.createImageData(o,o);return a.qrToImageData(A.data,e,s),r=n,l.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=o,r.width=o,r.style.height=o+"px",r.style.width=o+"px",l.putImageData(A,0,0),n},t.renderToDataURL=function(e,i,a){let r=a;void 0!==r||i&&i.getContext||(r=i,i=void 0),r||(r={});let s=t.render(e,i,r),n=r.type||"image/png",o=r.rendererOpts||{};return s.toDataURL(n,o.quality)}},4783(e,t,i){let a=i(8658);function r(e,t){let i=e.a/255,a=t+'="'+e.hex+'"';return i<1?a+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':a}function s(e,t,i){let a=e+t;return void 0!==i&&(a+=" "+i),a}t.render=function(e,t,i){let n=a.getOptions(t),o=e.modules.size,l=e.modules.data,A=o+2*n.margin,h=n.color.light.a?"<path "+r(n.color.light,"fill")+' d="M0 0h'+A+"v"+A+'H0z"/>':"",c="<path "+r(n.color.dark,"stroke")+' d="'+function(e,t,i){let a="",r=0,n=!1,o=0;for(let l=0;l<e.length;l++){let A=Math.floor(l%t),h=Math.floor(l/t);A||n||(n=!0),e[l]?(o++,l>0&&A>0&&e[l-1]||(a+=n?s("M",A+i,.5+h+i):s("m",r,0),r=0,n=!1),A+1<t&&e[l+1]||(a+=s("h",o),o=0)):r++}return a}(l,o,n.margin)+'"/>',d='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+('viewBox="0 0 '+A+" ")+A+'" shape-rendering="crispEdges">'+h+c+"</svg>\n";return"function"==typeof i&&i(null,d),d}},8658(e,t){function i(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw Error("Invalid hex color: "+e);(3===t.length||4===t.length)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");let i=parseInt(t.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:255&i,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});let t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,a=e.width&&e.width>=21?e.width:void 0,r=e.scale||4;return{width:a,scale:a?4:r,margin:t,color:{dark:i(e.color.dark||"#000000ff"),light:i(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,i){let a=t.getScale(e,i);return Math.floor((e+2*i.margin)*a)},t.qrToImageData=function(e,i,a){let r=i.modules.size,s=i.modules.data,n=t.getScale(r,a),o=Math.floor((r+2*a.margin)*n),l=a.margin*n,A=[a.color.light,a.color.dark];for(let t=0;t<o;t++)for(let i=0;i<o;i++){let h=(t*o+i)*4,c=a.color.light;t>=l&&i>=l&&t<o-l&&i<o-l&&(c=A[+!!s[Math.floor((t-l)/n)*r+Math.floor((i-l)/n)]]),e[h++]=c.r,e[h++]=c.g,e[h++]=c.b,e[h]=c.a}}},2677(e,t,i){"use strict";e.exports=i.p+"static/assets/basis_transcoder.23b549c9.js"},6160(e,t,i){"use strict";e.exports=i.p+"static/wasm/1170806b.module.wasm"},8572(e,t,i){"use strict";e.exports=i.p+"static/assets/draco_decoder.08679b61.js"},8605(e,t,i){"use strict";e.exports=i.p+"static/wasm/a53898c5.module.wasm"},1530(e,t,i){"use strict";e.exports=i.p+"static/assets/draco_wasm_wrapper.da788994.js"},3821(e,t,i){"use strict";e.exports=i.p+"static/wasm/a2169f50.module.wasm"},4602(e,t,i){"use strict";e.exports=i.p+"static/assets/draco_wasm_wrapper.efc72384.js"},4863(e,t,i){"use strict";let a,r,s,n,o,l,A,h,c,d,u,g,p,m,f,b,I,C,E,y,w,B,v,x,Q,S,M=globalThis,R=M.ShadowRoot&&(void 0===M.ShadyCSS||M.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,D=Symbol(),T=new WeakMap;class k{constructor(e,t,i){if(this._$cssResult$=!0,i!==D)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(R&&void 0===e){let i=void 0!==t&&1===t.length;i&&(e=T.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&T.set(t,e))}return e}toString(){return this.cssText}}let F=R?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t,i="";for(let t of e.cssRules)i+=t.cssText;return new k("string"==typeof(t=i)?t:t+"",void 0,D)})(e):e,{is:L,defineProperty:P,getOwnPropertyDescriptor:_,getOwnPropertyNames:U,getOwnPropertySymbols:G,getPrototypeOf:N}=Object,O=globalThis,q=O.trustedTypes,H=q?q.emptyScript:"",j=O.reactiveElementPolyfillSupport,z={toAttribute(e,t){switch(t){case Boolean:e=e?H: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}},K=(e,t)=>!L(e,t),J={attribute:!0,type:String,converter:z,reflect:!1,useDefault:!1,hasChanged:K};Symbol.metadata??=Symbol("metadata"),O.litPropertyMetadata??=new WeakMap;class V 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=J){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){let i=Symbol(),a=this.getPropertyDescriptor(e,i,t);void 0!==a&&P(this.prototype,e,a)}}static getPropertyDescriptor(e,t,i){let{get:a,set:r}=_(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:a,set(t){let s=a?.call(this);r?.call(this,t),this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??J}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;let e=N(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){let e=this.properties;for(let t of[...U(e),...G(e)])this.createProperty(t,e[t])}let e=this[Symbol.metadata];if(null!==e){let t=litPropertyMetadata.get(e);if(void 0!==t)for(let[e,i]of t)this.elementProperties.set(e,i)}for(let[e,t]of(this._$Eh=new Map,this.elementProperties)){let i=this._$Eu(e,t);void 0!==i&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e))for(let i of new Set(e.flat(1/0).reverse()))t.unshift(F(i));else void 0!==e&&t.push(F(e));return t}static _$Eu(e,t){let 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?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map;for(let t of this.constructor.elementProperties.keys())this.hasOwnProperty(t)&&(e.set(t,this[t]),delete this[t]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(R)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let i of t){let t=document.createElement("style"),a=M.litNonce;void 0!==a&&t.setAttribute("nonce",a),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){let i=this.constructor.elementProperties.get(e),a=this.constructor._$Eu(e,i);if(void 0!==a&&!0===i.reflect){let r=(void 0!==i.converter?.toAttribute?i.converter:z).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(a):this.setAttribute(a,r),this._$Em=null}}_$AK(e,t){let i=this.constructor,a=i._$Eh.get(e);if(void 0!==a&&this._$Em!==a){let e=i.getPropertyOptions(a),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:z;this._$Em=a;let s=r.fromAttribute(t,e.type);this[a]=s??this._$Ej?.get(a)??s,this._$Em=null}}requestUpdate(e,t,i,a=!1,r){if(void 0!==e){let s=this.constructor;if(!1===a&&(r=this[e]),!(((i??=s.getPropertyOptions(e)).hasChanged??K)(r,t)||i.useDefault&&i.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:a,wrapped:r},s){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),!0!==r||void 0!==s)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===a&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let 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(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,i]of e){let{wrapped:e}=i,a=this[t];!0!==e||this._$AL.has(t)||void 0===a||this.C(t,void 0,i,a)}}let e=!1,t=this._$AL;try{(e=this.shouldUpdate(t))?(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){}}V.elementStyles=[],V.shadowRootOptions={mode:"open"},V.elementProperties=new Map,V.finalized=new Map,j?.({ReactiveElement:V}),(O.reactiveElementVersions??=[]).push("2.1.2");let Y={attribute:!0,type:String,converter:z,reflect:!1,hasChanged:K};function $(e){return(t,i)=>{let a;return"object"==typeof i?((e=Y,t,i)=>{let{kind:a,metadata:r}=i,s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),"setter"===a&&((e=Object.create(e)).wrapped=!0),s.set(i.name,e),"accessor"===a){let{name:a}=i;return{set(i){let r=t.get.call(this);t.set.call(this,i),this.requestUpdate(a,r,e,!0,i)},init(t){return void 0!==t&&this.C(a,void 0,e,t),t}}}if("setter"===a){let{name:a}=i;return function(i){let r=this[a];t.call(this,i),this.requestUpdate(a,r,e,!0,i)}}throw Error("Unsupported decorator location: "+a)})(e,t,i):(a=t.hasOwnProperty(i),t.constructor.createProperty(i,e),a?Object.getOwnPropertyDescriptor(t,i):void 0)}}let W=globalThis,X=e=>e,Z=W.trustedTypes,ee=Z?Z.createPolicy("lit-html",{createHTML:e=>e}):void 0,et="$lit$",ei=`lit$${Math.random().toFixed(9).slice(2)}$`,ea="?"+ei,er=`<${ea}>`,es=document,en=()=>es.createComment(""),eo=e=>null===e||"object"!=typeof e&&"function"!=typeof e,el=Array.isArray,eA="[ \n\f\r]",eh=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ec=/-->/g,ed=/>/g,eu=RegExp(`>|${eA}(?:([^\\s"'>=/]+)(${eA}*=${eA}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),eg=/'/g,ep=/"/g,em=/^(?:script|style|textarea|title)$/i,ef=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),eb=ef(1),eI=(ef(2),ef(3),Symbol.for("lit-noChange")),eC=Symbol.for("lit-nothing"),eE=new WeakMap,ey=es.createTreeWalker(es,129);function ew(e,t){if(!el(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==ee?ee.createHTML(t):t}class eB{constructor({strings:e,_$litType$:t},i){let a;this.parts=[];let r=0,s=0;const n=e.length-1,o=this.parts,[l,A]=((e,t)=>{let i=e.length-1,a=[],r,s=2===t?"<svg>":3===t?"<math>":"",n=eh;for(let t=0;t<i;t++){let i=e[t],o,l,A=-1,h=0;for(;h<i.length&&(n.lastIndex=h,null!==(l=n.exec(i)));)h=n.lastIndex,n===eh?"!--"===l[1]?n=ec:void 0!==l[1]?n=ed:void 0!==l[2]?(em.test(l[2])&&(r=RegExp("</"+l[2],"g")),n=eu):void 0!==l[3]&&(n=eu):n===eu?">"===l[0]?(n=r??eh,A=-1):void 0===l[1]?A=-2:(A=n.lastIndex-l[2].length,o=l[1],n=void 0===l[3]?eu:'"'===l[3]?ep:eg):n===ep||n===eg?n=eu:n===ec||n===ed?n=eh:(n=eu,r=void 0);let c=n===eu&&e[t+1].startsWith("/>")?" ":"";s+=n===eh?i+er:A>=0?(a.push(o),i.slice(0,A)+et+i.slice(A)+ei+c):i+ei+(-2===A?t:c)}return[ew(e,s+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),a]})(e,t);if(this.el=eB.createElement(l,i),ey.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(a=ey.nextNode())&&o.length<n;){if(1===a.nodeType){if(a.hasAttributes())for(const e of a.getAttributeNames())if(e.endsWith(et)){const t=A[s++],i=a.getAttribute(e).split(ei),n=/([.?@])?(.*)/.exec(t);o.push({type:1,index:r,name:n[2],strings:i,ctor:"."===n[1]?eM:"?"===n[1]?eR:"@"===n[1]?eD:eS}),a.removeAttribute(e)}else e.startsWith(ei)&&(o.push({type:6,index:r}),a.removeAttribute(e));if(em.test(a.tagName)){const e=a.textContent.split(ei),t=e.length-1;if(t>0){a.textContent=Z?Z.emptyScript:"";for(let i=0;i<t;i++)a.append(e[i],en()),ey.nextNode(),o.push({type:2,index:++r});a.append(e[t],en())}}}else if(8===a.nodeType)if(a.data===ea)o.push({type:2,index:r});else{let e=-1;for(;-1!==(e=a.data.indexOf(ei,e+1));)o.push({type:7,index:r}),e+=ei.length-1}r++}}static createElement(e,t){let i=es.createElement("template");return i.innerHTML=e,i}}function ev(e,t,i=e,a){if(t===eI)return t;let r=void 0!==a?i._$Co?.[a]:i._$Cl,s=eo(t)?void 0:t._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),void 0===s?r=void 0:(r=new s(e))._$AT(e,i,a),void 0!==a?(i._$Co??=[])[a]=r:i._$Cl=r),void 0!==r&&(t=ev(e,r._$AS(e,t.values),r,a)),t}class ex{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){let{el:{content:t},parts:i}=this._$AD,a=(e?.creationScope??es).importNode(t,!0);ey.currentNode=a;let r=ey.nextNode(),s=0,n=0,o=i[0];for(;void 0!==o;){if(s===o.index){let t;2===o.type?t=new eQ(r,r.nextSibling,this,e):1===o.type?t=new o.ctor(r,o.name,o.strings,this,e):6===o.type&&(t=new eT(r,this,e)),this._$AV.push(t),o=i[++n]}s!==o?.index&&(r=ey.nextNode(),s++)}return ey.currentNode=es,a}p(e){let t=0;for(let 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 eQ{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,a){this.type=2,this._$AH=eC,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=a,this._$Cv=a?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,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){let i;eo(e=ev(this,e,t))?e===eC||null==e||""===e?(this._$AH!==eC&&this._$AR(),this._$AH=eC):e!==this._$AH&&e!==eI&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):el(i=e)||"function"==typeof i?.[Symbol.iterator]?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!==eC&&eo(this._$AH)?this._$AA.nextSibling.data=e:this.T(es.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:i}=e,a="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=eB.createElement(ew(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===a)this._$AH.p(t);else{let e=new ex(a,this),i=e.u(this.options);e.p(t),this.T(i),this._$AH=e}}_$AC(e){let t=eE.get(e.strings);return void 0===t&&eE.set(e.strings,t=new eB(e)),t}k(e){el(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,i,a=0;for(let r of e)a===t.length?t.push(i=new eQ(this.O(en()),this.O(en()),this,this.options)):i=t[a],i._$AI(r),a++;a<t.length&&(this._$AR(i&&i._$AB.nextSibling,a),t.length=a)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=X(e).nextSibling;X(e).remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class eS{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,a,r){this.type=1,this._$AH=eC,this._$AN=void 0,this.element=e,this.name=t,this._$AM=a,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=eC}_$AI(e,t=this,i,a){let r=this.strings,s=!1;if(void 0===r)(s=!eo(e=ev(this,e,t,0))||e!==this._$AH&&e!==eI)&&(this._$AH=e);else{let a,n,o=e;for(e=r[0],a=0;a<r.length-1;a++)(n=ev(this,o[i+a],t,a))===eI&&(n=this._$AH[a]),s||=!eo(n)||n!==this._$AH[a],n===eC?e=eC:e!==eC&&(e+=(n??"")+r[a+1]),this._$AH[a]=n}s&&!a&&this.j(e)}j(e){e===eC?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class eM extends eS{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===eC?void 0:e}}class eR extends eS{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==eC)}}class eD extends eS{constructor(e,t,i,a,r){super(e,t,i,a,r),this.type=5}_$AI(e,t=this){if((e=ev(this,e,t,0)??eC)===eI)return;let i=this._$AH,a=e===eC&&i!==eC||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==eC&&(i===eC||a);a&&this.element.removeEventListener(this.name,this,i),r&&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 eT{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){ev(this,e)}}let ek=W.litHtmlPolyfillSupport;ek?.(eB,eQ),(W.litHtmlVersions??=[]).push("3.3.2");let eF=(e,t,i)=>{let a=i?.renderBefore??t,r=a._$litPart$;if(void 0===r){let e=i?.renderBefore??null;a._$litPart$=r=new eQ(t.insertBefore(en(),e),e,void 0,i??{})}return r._$AI(e),r},eL=globalThis;class eP extends V{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=eF(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return eI}}eP._$litElement$=!0,eP.finalized=!0,eL.litElementHydrateSupport?.({LitElement:eP});let e_=eL.litElementPolyfillSupport;e_?.({LitElement:eP}),(eL.litElementVersions??=[]).push("4.2.2");let eU=null!=navigator.xr&&null!=self.XRSession&&null!=navigator.xr.isSessionSupported,eG=eU&&null!=self.XRSession.prototype.requestHitTestSource,eN=null!=self.ResizeObserver,eO=null!=self.IntersectionObserver;d=navigator.userAgent||navigator.vendor||self.opera,/(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(d)||/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 )|sy(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(d.substr(0,4)),/\bCrOS\b/.test(navigator.userAgent);let eq=/android/i.test(navigator.userAgent),eH=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;/Safari\//.test(navigator.userAgent);let ej=/firefox/i.test(navigator.userAgent),ez=/OculusBrowser/.test(navigator.userAgent);eH&&/CriOS\//.test(navigator.userAgent);let eK=eq&&!ej&&!ez,eJ=!!(window.webkit&&window.webkit.messageHandlers),eV=(()=>{if(!eH)return!1;if(eJ)return!!/CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\//.test(navigator.userAgent);{let e=document.createElement("a");return!!(e.relList&&e.relList.supports&&e.relList.supports("ar"))}})(),eY=e=>e&&"null"!==e?eW(e):null,e$=()=>{if(eG)return;let e=[];throw eU||e.push("WebXR Device API"),eG||e.push("WebXR Hit Test API"),Error(`The following APIs are required for AR, but are missing in this browser: ${e.join(", ")}`)},eW=e=>new URL(e,window.location.toString()).toString(),eX=(e,t)=>{let i=null;return(...a)=>{null!=i&&self.clearTimeout(i),i=self.setTimeout(()=>{i=null,e(...a)},t)}},eZ=(e,t,i)=>Math.max(t,Math.min(i,e)),e0=(u=RegExp("[?&]model-viewer-debug-mode(&|$)"),()=>self.ModelViewerElement&&self.ModelViewerElement.debugMode||self.location&&self.location.search&&self.location.search.match(u));var e1,e2,e8,e9,e3,e5,e4,e6,e7,te,tt,ti,ta,tr,ts,tn,to,tl,tA,th,tc,td,tu,tg,tp,tm,tf,tb,tI,tC,tE,ty,tw,tB,tv,tx,tQ,tS,tM,tR,tD,tT=function(e,t,i,a){var r,s=arguments.length,n=s<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};let tk=Symbol("currentEnvironmentMap"),tF=Symbol("currentBackground"),tL=Symbol("updateEnvironment"),tP=Symbol("cancelEnvironmentUpdate"),t_=eb`
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" fill="#000000">
|
|
5
|
-
<!-- NOTE(cdata): This SVG filter is a stop-gap until we can implement
|
|
6
|
-
support for dynamic re-coloring of UI components -->
|
|
7
|
-
<defs>
|
|
8
|
-
<filter id="drop-shadow" x="-100%" y="-100%" width="300%" height="300%">
|
|
9
|
-
<feGaussianBlur in="SourceAlpha" stdDeviation="1"/>
|
|
10
|
-
<feOffset dx="0" dy="0" result="offsetblur"/>
|
|
11
|
-
<feFlood flood-color="#000000"/>
|
|
12
|
-
<feComposite in2="offsetblur" operator="in"/>
|
|
13
|
-
<feMerge>
|
|
14
|
-
<feMergeNode/>
|
|
15
|
-
<feMergeNode in="SourceGraphic"/>
|
|
16
|
-
</feMerge>
|
|
17
|
-
</filter>
|
|
18
|
-
</defs>
|
|
19
|
-
<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"/>
|
|
20
|
-
<path d="M0 0h24v24H0z" fill="none"/>
|
|
21
|
-
</svg>`,tU=eb`
|
|
22
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="25" height="36">
|
|
23
|
-
<defs>
|
|
24
|
-
<path id="A" d="M.001.232h24.997V36H.001z" />
|
|
25
|
-
</defs>
|
|
26
|
-
<g transform="translate(-11 -4)" fill="none" fill-rule="evenodd">
|
|
27
|
-
<path fill-opacity="0" fill="#fff" d="M0 0h44v44H0z" />
|
|
28
|
-
<g transform="translate(11 3)">
|
|
29
|
-
<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" />
|
|
30
|
-
<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" />
|
|
31
|
-
<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" />
|
|
32
|
-
<g transform="translate(0 .769)">
|
|
33
|
-
<mask id="B" fill="#fff">
|
|
34
|
-
<use xlink:href="#A" />
|
|
35
|
-
</mask>
|
|
36
|
-
<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)" />
|
|
37
|
-
</g>
|
|
38
|
-
</g>
|
|
39
|
-
</g>
|
|
40
|
-
</svg>`,tG=eb`
|
|
41
|
-
<svg version="1.1" id="view_x5F_in_x5F_AR_x5F_icon"
|
|
42
|
-
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px" height="24px"
|
|
43
|
-
viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
|
44
|
-
<rect id="Bounding_Box" x="0" y="0" fill="none" width="24" height="24"/>
|
|
45
|
-
<g id="Art_layer">
|
|
46
|
-
<path d="M3,4c0-0.55,0.45-1,1-1h2V1H4C2.35,1,1,2.35,1,4v2h2V4z"/>
|
|
47
|
-
<path d="M20,3c0.55,0,1,0.45,1,1v2h2V4c0-1.65-1.35-3-3-3h-2v2H20z"/>
|
|
48
|
-
<path d="M4,21c-0.55,0-1-0.45-1-1v-2H1v2c0,1.65,1.35,3,3,3h2v-2H4z"/>
|
|
49
|
-
<path d="M20,21c0.55,0,1-0.45,1-1v-2h2v2c0,1.65-1.35,3-3,3h-2v-2H20z"/>
|
|
50
|
-
<g>
|
|
51
|
-
<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
|
|
52
|
-
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
|
|
53
|
-
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"/>
|
|
54
|
-
</g>
|
|
55
|
-
</g>
|
|
56
|
-
</svg>`,tN=eb`
|
|
57
|
-
<style>
|
|
58
|
-
:host {
|
|
59
|
-
display: block;
|
|
60
|
-
position: relative;
|
|
61
|
-
contain: strict;
|
|
62
|
-
width: 300px;
|
|
63
|
-
height: 150px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.container {
|
|
67
|
-
position: relative;
|
|
68
|
-
overflow: hidden;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.userInput {
|
|
72
|
-
width: 100%;
|
|
73
|
-
height: 100%;
|
|
74
|
-
display: none;
|
|
75
|
-
position: relative;
|
|
76
|
-
outline-offset: -1px;
|
|
77
|
-
outline-width: 1px;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
canvas {
|
|
81
|
-
position: absolute;
|
|
82
|
-
display: none;
|
|
83
|
-
pointer-events: none;
|
|
84
|
-
/* NOTE(cdata): Chrome 76 and below apparently have a bug
|
|
85
|
-
* that causes our canvas not to display pixels unless it is
|
|
86
|
-
* on its own render layer
|
|
87
|
-
* @see https://github.com/google/model-viewer/pull/755#issuecomment-536597893
|
|
88
|
-
*/
|
|
89
|
-
transform: translateZ(0);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.show {
|
|
93
|
-
display: block;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/* Adapted from HTML5 Boilerplate
|
|
97
|
-
*
|
|
98
|
-
* @see https://github.com/h5bp/html5-boilerplate/blob/ceb4620c78fc82e13534fc44202a3f168754873f/dist/css/main.css#L122-L133 */
|
|
99
|
-
.screen-reader-only {
|
|
100
|
-
border: 0;
|
|
101
|
-
left: 0;
|
|
102
|
-
top: 0;
|
|
103
|
-
clip: rect(0, 0, 0, 0);
|
|
104
|
-
height: 1px;
|
|
105
|
-
margin: -1px;
|
|
106
|
-
overflow: hidden;
|
|
107
|
-
padding: 0;
|
|
108
|
-
position: absolute;
|
|
109
|
-
white-space: nowrap;
|
|
110
|
-
width: 1px;
|
|
111
|
-
pointer-events: none;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.slot {
|
|
115
|
-
position: absolute;
|
|
116
|
-
pointer-events: none;
|
|
117
|
-
top: 0;
|
|
118
|
-
left: 0;
|
|
119
|
-
width: 100%;
|
|
120
|
-
height: 100%;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.slot > * {
|
|
124
|
-
pointer-events: initial;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.annotation-wrapper ::slotted(*) {
|
|
128
|
-
opacity: var(--max-hotspot-opacity, 1);
|
|
129
|
-
transition: opacity 0.3s;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.pointer-tumbling .annotation-wrapper ::slotted(*) {
|
|
133
|
-
pointer-events: none;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.annotation-wrapper ::slotted(*) {
|
|
137
|
-
pointer-events: initial;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.annotation-wrapper.hide ::slotted(*) {
|
|
141
|
-
opacity: var(--min-hotspot-opacity, 0.25);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.slot.poster {
|
|
145
|
-
display: none;
|
|
146
|
-
background-color: inherit;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.slot.poster.show {
|
|
150
|
-
display: inherit;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.slot.poster > * {
|
|
154
|
-
pointer-events: initial;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.slot.poster:not(.show) > * {
|
|
158
|
-
pointer-events: none;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
#default-poster {
|
|
162
|
-
width: 100%;
|
|
163
|
-
height: 100%;
|
|
164
|
-
/* The default poster is a <button> so we need to set display
|
|
165
|
-
* to prevent it from being affected by text-align: */
|
|
166
|
-
display: block;
|
|
167
|
-
position: absolute;
|
|
168
|
-
border: none;
|
|
169
|
-
padding: 0;
|
|
170
|
-
background-size: contain;
|
|
171
|
-
background-repeat: no-repeat;
|
|
172
|
-
background-position: center;
|
|
173
|
-
background-color: #fff0;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
#default-progress-bar {
|
|
177
|
-
display: block;
|
|
178
|
-
position: relative;
|
|
179
|
-
width: 100%;
|
|
180
|
-
height: 100%;
|
|
181
|
-
pointer-events: none;
|
|
182
|
-
overflow: hidden;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
#default-progress-bar > .bar {
|
|
186
|
-
position: absolute;
|
|
187
|
-
top: 0;
|
|
188
|
-
left: 0;
|
|
189
|
-
width: 100%;
|
|
190
|
-
height: var(--progress-bar-height, 5px);
|
|
191
|
-
background-color: var(--progress-bar-color, rgba(0, 0, 0, 0.4));
|
|
192
|
-
transition: transform 0.09s;
|
|
193
|
-
transform-origin: top left;
|
|
194
|
-
transform: scaleX(0);
|
|
195
|
-
overflow: hidden;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
#default-progress-bar > .bar.hide {
|
|
199
|
-
transition: opacity 0.3s 1s;
|
|
200
|
-
opacity: 0;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.centered {
|
|
204
|
-
align-items: center;
|
|
205
|
-
justify-content: center;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.cover {
|
|
209
|
-
position: absolute;
|
|
210
|
-
top: 0;
|
|
211
|
-
left: 0;
|
|
212
|
-
width: 100%;
|
|
213
|
-
height: 100%;
|
|
214
|
-
pointer-events: none;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.slot.interaction-prompt {
|
|
218
|
-
display: var(--interaction-prompt-display, flex);
|
|
219
|
-
overflow: hidden;
|
|
220
|
-
opacity: 0;
|
|
221
|
-
will-change: opacity;
|
|
222
|
-
transition: opacity 0.3s;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.slot.interaction-prompt.visible {
|
|
226
|
-
opacity: 1;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.animated-container {
|
|
230
|
-
will-change: transform, opacity;
|
|
231
|
-
opacity: 0;
|
|
232
|
-
transition: opacity 0.3s;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.slot.interaction-prompt > * {
|
|
236
|
-
pointer-events: none;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.slot.ar-button {
|
|
240
|
-
-moz-user-select: none;
|
|
241
|
-
-webkit-tap-highlight-color: transparent;
|
|
242
|
-
user-select: none;
|
|
243
|
-
|
|
244
|
-
display: var(--ar-button-display, block);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.slot.ar-button:not(.enabled) {
|
|
248
|
-
display: none;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.fab {
|
|
252
|
-
display: flex;
|
|
253
|
-
align-items: center;
|
|
254
|
-
justify-content: center;
|
|
255
|
-
box-sizing: border-box;
|
|
256
|
-
width: 40px;
|
|
257
|
-
height: 40px;
|
|
258
|
-
cursor: pointer;
|
|
259
|
-
background-color: #fff;
|
|
260
|
-
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.15);
|
|
261
|
-
border-radius: 100px;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.fab > * {
|
|
265
|
-
opacity: 0.87;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
#default-ar-button {
|
|
269
|
-
position: absolute;
|
|
270
|
-
bottom: 16px;
|
|
271
|
-
right: 16px;
|
|
272
|
-
transform: scale(var(--ar-button-scale, 1));
|
|
273
|
-
transform-origin: bottom right;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.slot.pan-target {
|
|
277
|
-
display: block;
|
|
278
|
-
position: absolute;
|
|
279
|
-
width: 0;
|
|
280
|
-
height: 0;
|
|
281
|
-
left: 50%;
|
|
282
|
-
top: 50%;
|
|
283
|
-
transform: translate3d(-50%, -50%, 0);
|
|
284
|
-
background-color: transparent;
|
|
285
|
-
opacity: 0;
|
|
286
|
-
transition: opacity 0.3s;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
#default-pan-target {
|
|
290
|
-
width: 6px;
|
|
291
|
-
height: 6px;
|
|
292
|
-
border-radius: 6px;
|
|
293
|
-
border: 1px solid white;
|
|
294
|
-
box-shadow: 0px 0px 2px 1px rgba(0, 0, 0, 0.8);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.slot.default {
|
|
298
|
-
pointer-events: none;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.slot.progress-bar {
|
|
302
|
-
pointer-events: none;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.slot.exit-webxr-ar-button {
|
|
306
|
-
pointer-events: none;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.slot.exit-webxr-ar-button:not(.enabled) {
|
|
310
|
-
display: none;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
#default-exit-webxr-ar-button {
|
|
314
|
-
display: flex;
|
|
315
|
-
align-items: center;
|
|
316
|
-
justify-content: center;
|
|
317
|
-
position: absolute;
|
|
318
|
-
top: env(safe-area-inset-top, 16px);
|
|
319
|
-
right: 16px;
|
|
320
|
-
width: 40px;
|
|
321
|
-
height: 40px;
|
|
322
|
-
box-sizing: border-box;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
#default-exit-webxr-ar-button > svg {
|
|
326
|
-
fill: #fff;
|
|
327
|
-
}
|
|
328
|
-
</style>
|
|
329
|
-
<div class="container">
|
|
330
|
-
<div class="userInput" tabindex="0" role="img"
|
|
331
|
-
aria-label="3D model">
|
|
332
|
-
<div class="slot canvas">
|
|
333
|
-
<slot name="canvas">
|
|
334
|
-
<canvas></canvas>
|
|
335
|
-
</slot>
|
|
336
|
-
</div>
|
|
337
|
-
|
|
338
|
-
</div>
|
|
339
|
-
|
|
340
|
-
<!-- NOTE(cdata): We need to wrap slots because browsers without ShadowDOM
|
|
341
|
-
will have their <slot> elements removed by ShadyCSS -->
|
|
342
|
-
<div class="slot poster">
|
|
343
|
-
<slot name="poster">
|
|
344
|
-
<button type="button" id="default-poster" aria-hidden="true" aria-label="Loading 3D model"></button>
|
|
345
|
-
</slot>
|
|
346
|
-
</div>
|
|
347
|
-
|
|
348
|
-
<div class="slot ar-button">
|
|
349
|
-
<slot name="ar-button">
|
|
350
|
-
<a id="default-ar-button" part="default-ar-button" class="fab"
|
|
351
|
-
tabindex="2"
|
|
352
|
-
role="button"
|
|
353
|
-
href="javascript:void(0);"
|
|
354
|
-
aria-label="View in your space">
|
|
355
|
-
${tG}
|
|
356
|
-
</a>
|
|
357
|
-
</slot>
|
|
358
|
-
</div>
|
|
359
|
-
|
|
360
|
-
<div class="slot pan-target">
|
|
361
|
-
<slot name="pan-target">
|
|
362
|
-
<div id="default-pan-target">
|
|
363
|
-
</div>
|
|
364
|
-
</slot>
|
|
365
|
-
</div>
|
|
366
|
-
|
|
367
|
-
<div class="slot interaction-prompt cover centered">
|
|
368
|
-
<div id="prompt" class="animated-container">
|
|
369
|
-
<slot name="interaction-prompt" aria-hidden="true">
|
|
370
|
-
${tU}
|
|
371
|
-
</slot>
|
|
372
|
-
</div>
|
|
373
|
-
</div>
|
|
374
|
-
|
|
375
|
-
<div id="finger0" class="animated-container cover">
|
|
376
|
-
<slot name="finger0" aria-hidden="true">
|
|
377
|
-
</slot>
|
|
378
|
-
</div>
|
|
379
|
-
<div id="finger1" class="animated-container cover">
|
|
380
|
-
<slot name="finger1" aria-hidden="true">
|
|
381
|
-
</slot>
|
|
382
|
-
</div>
|
|
383
|
-
|
|
384
|
-
<div class="slot default">
|
|
385
|
-
<slot></slot>
|
|
386
|
-
|
|
387
|
-
<div class="slot progress-bar">
|
|
388
|
-
<slot name="progress-bar">
|
|
389
|
-
<div id="default-progress-bar" aria-hidden="true">
|
|
390
|
-
<div class="bar" part="default-progress-bar"></div>
|
|
391
|
-
</div>
|
|
392
|
-
</slot>
|
|
393
|
-
</div>
|
|
394
|
-
|
|
395
|
-
<div class="slot exit-webxr-ar-button">
|
|
396
|
-
<slot name="exit-webxr-ar-button">
|
|
397
|
-
<a id="default-exit-webxr-ar-button" part="default-exit-webxr-ar-button"
|
|
398
|
-
tabindex="3"
|
|
399
|
-
aria-label="Exit AR"
|
|
400
|
-
aria-hidden="true">
|
|
401
|
-
${t_}
|
|
402
|
-
</a>
|
|
403
|
-
</slot>
|
|
404
|
-
</div>
|
|
405
|
-
</div>
|
|
406
|
-
</div>
|
|
407
|
-
<div class="screen-reader-only" role="region" aria-label="Live announcements">
|
|
408
|
-
<span id="status" role="status"></span>
|
|
409
|
-
</div>`;var tO=i(308),tq=function(){var e,t=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]),i=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 a=WebAssembly.validate(t)?s("b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuixkbbebeeddddilve9Weeeviebeoweuecj:Gdkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WbwY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbDl79IV9Rbqq:W9Dklbzik94evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaeai86b:q:W:cjbaecitab8Piw83i:q:G:cjbaecefgecjd9hmbkk:JBl8Aud97dur978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaialfgxar9RhodnadTgmmbavaoad;8qbbkaicefhPcj;abad9Uc;WFbGcjdadca0EhsdndndnadTmbaoadfhzcbhHinaeaH9nmdaxaP9RaD6miabaHad2fhOaPaDfhAasaeaH9RaHasfae6EgCcsfgocl4cifcd4hXavcj;cbfaoc9WGgQcetfhLavcj;cbfaQci2fhKavcj;cbfaQfhYcbh8Aaoc;ab6hEincbh3dnawTmbaPa8Acd4fRbbh3kcbh5avcj;cbfh8Eindndndndna3a5cet4ciGgoc9:fPdebdkaxaA9RaQ6mwdnaQTmbavcj;cbfa5aQ2faAaQ;8qbbkaAaCfhAxdkaQTmeavcj;cbfa5aQ2fcbaQ;8kbxekaxaA9RaX6moaoclVcbawEhraAaXfhocbhidnaEmbaxao9Rc;Gb6mbcbhlina8EalfhidndndndndndnaAalco4fRbbgqciGarfPDbedibledibkaipxbbbbbbbbbbbbbbbbpklbxlkaiaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaiaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaiaopbbbpklbaoczfhoxekaiaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqcd4ciGarfPDbedibledibkaiczfpxbbbbbbbbbbbbbbbbpklbxlkaiczfaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaiczfaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaiczfaopbbbpklbaoczfhoxekaiczfaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqcl4ciGarfPDbedibledibkaicafpxbbbbbbbbbbbbbbbbpklbxlkaicafaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaoclffagRb:q:W:cjbfhoxikaicafaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbahaocwffagRb:q:W:cjbfhoxdkaicafaopbbbpklbaoczfhoxekaicafaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbahaocdffagRb:q:W:cjbfhokdndndndndndnaqco4arfPDbedibledibkaic8Wfpxbbbbbbbbbbbbbbbbpklbxlkaic8Wfaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Ngicitpbi:q:G:cjbaiRb:q:W:cjbgipsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbaiaoclffaqRb:q:W:cjbfhoxikaic8Wfaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Ngicitpbi:q:G:cjbaiRb:q:W:cjbgipsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spklbaiaocwffaqRb:q:W:cjbfhoxdkaic8Wfaopbbbpklbaoczfhoxekaic8WfaopbbdaoRbbgicitpbi:q:G:cjbaiRb:q:W:cjbgipsaoRbegqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbaiaocdffaqRb:q:W:cjbfhokalc;abfhialcjefaQ0meaihlaxao9Rc;Fb0mbkkdnaiaQ9pmbaici4hlinaxao9RcK6mwa8EaifhqdndndndndndnaAaico4fRbbalcoG4ciGarfPDbedibledibkaqpxbbbbbbbbbbbbbbbbpkbbxlkaqaopbblaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLg8Fcdp:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spkbbahaoclffagRb:q:W:cjbfhoxikaqaopbbwaopbbbg8Fclp:mea8FpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogapxssssssssssssssssp8Jg8Fp5b9cjF;8;4;W;G;ab9:9cU1:Nghcitpbi:q:G:cjbahRb:q:W:cjbghpsa8Fp5e9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPaaa8Fp9spkbbahaocwffagRb:q:W:cjbfhoxdkaqaopbbbpkbbaoczfhoxekaqaopbbdaoRbbghcitpbi:q:G:cjbahRb:q:W:cjbghpsaoRbeggcitpbi:q:G:cjbp9UpmbedilvorzHOAC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raoczfgoaQ6mbkka8Aclfg8Aad6mbkdnaCad2goTmbaOavcjdfao;8qbbkdnammbavavcjdfaCcufad2fad;8qbbkaCaHfhHc9:hoaAhPaAmbxlkkaeTmbaDalfhrcbhocuhlinaralaD9RglfaD6mdasaeao9Raoasfae6Eaofgoae6mbkaial9RhPkcbc99axaP9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaokwbz:bjjjbkNsezu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnalaeci9UgrcHf6mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbav9cu83iUav9cu83i8Wav9cu83iyav9cu83iaav9cu83iKav9cu83izav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbavaiaqaDcsGfRbbgscl4gP9RcsGcdtfydbaxcefgOaPEhDavaias9RcsGcdtfydbaOaPTgzfgOascsGgPEhsaPThPdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiazfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaPfhiaOaPfhxxekaxcbalRbbgsEgHaDc;:eSgDfhOascsGhAdndnascl4gCmbaOcefhzxekaOhzavaiaC9RcsGcdtfydbhOkdndnaAmbazcefhxxekazhxavaias9RcsGcdtfydbhzkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhHascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaHhDxekaDcefhDkasce4cbasceG9R7amfgmhHkdndnaCcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhOaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkaOhsxekascefhskaPce4cbaPceG9R7amfgmhOkdndnaAcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhzaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkazhlxekalcefhlkaPce4cbaPceG9R7amfgmhzkdndnadcd9hmbabarcetfgDaH87ebaDclfaz87ebaDcdfaO87ebxekabarcdtfgDaHBdbaDcwfazBdbaDclfaOBdbkavc;abfaocitfgDaOBdbaDaHBdlavaicdtfaHBdbavc;abfaocefcsGcitfgDazBdbaDaOBdlavaicefgicsGcdtfaOBdbavc;abfaocdfcsGcitfgDaHBdbaDazBdlavaiaCTaCcsSVfgicsGcdtfazBdbaiaATaAcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnalaecvf9pmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk;Toio97eue97aec98Ghedndnadcl9hmbaeTmecbhdinababpbbbgicKp:RecKp:Sep;6eglaicwp:RecKp:Sep;6ealp;Geaiczp:RecKp:Sep;6egvp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egralpxbbbjbbbjbbbjbbbjgwp9op9rp;Keglpxbb;:9cbb;:9cbb;:9cbb;:9calalp;Meaoaop;Meavaravawp9op9rp;Keglalp;Mep;Kep;Kep;Jep;Negvp;Mepxbbn0bbn0bbn0bbn0grp;KepxFbbbFbbbFbbbFbbbp9oaipxbbbFbbbFbbbFbbbFp9op9qalavp;Mearp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaoavp;Mearp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbabczfhbadclfgdae6mbxdkkaeTmbcbhdinabczfgDaDpbbbgipxbbbbbbFFbbbbbbFFgwp9oabpbbbgoaipmbediwDqkzHOAKY8AEgvczp:Reczp:Sep;6eglaoaipmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eavczp:Sep;6egvp;Gealp;Gep;Kep;Legipxbbbbbbbbbbbbbbbbp:2egralpxbbbjbbbjbbbjbbbjgqp9op9rp;Keglpxb;:FSb;:FSb;:FSb;:FSalalp;Meaiaip;Meavaravaqp9op9rp;Keglalp;Mep;Kep;Kep;Jep;Negvp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbp9oaiavp;Mearp;Keczp:Rep9qgialavp;Mearp;KepxFFbbFFbbFFbbFFbbp9oglpmwDKYqk8AExm35Ps8E8Fp9qpkbbabaoawp9oaialpmbezHdiOAlvCXorQLp9qpkbbabcafhbadclfgdae6mbkkk;2ileue97euo97dnaec98GgiTmbcbheinabcKfpx:ji:1S:ji:1S:ji:1S:ji:1SabpbbbglabczfgvpbbbgopmlvorxmPsCXQL358E8Fgrczp:Segwpxibbbibbbibbbibbbp9qp;6egDp;NegqaDaDp;MegDaDp;KealaopmbediwDqkzHOAKY8AEgDczp:Reczp:Sep;6eglalp;MeaDczp:Sep;6egoaop;Mearczp:Reczp:Sep;6egrarp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jep;Mepxbbn0bbn0bbn0bbn0gDp;KepxFFbbFFbbFFbbFFbbgkp9oaqaop;MeaDp;Keczp:Rep9qgoaqalp;MeaDp;Keakp9oaqarp;MeaDp;Keczp:Rep9qgDpmwDKYqk8AExm35Ps8E8Fglp5eawclp:RegqpEi:T:j83ibavalp5baqpEd:T:j83ibabcwfaoaDpmbezHdiOAlvCXorQLgDp5eaqpEe:T:j83ibabaDp5baqpEb:T:j83ibabcafhbaeclfgeai6mbkkkuee97dnadcd4ae2c98GgeTmbcbhdinababpbbbgicwp:Recwp:Sep;6eaicep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbabczfhbadclfgdae6mbkkk:Sodw97euaec98Ghedndnadcl9hmbaeTmecbhdinabpxbbuJbbuJbbuJbbuJabpbbbgicKp:TeglaicYp:Tep9qgvcdp:Teavp9qgvclp:Teavp9qgop;6ep;Negvaicwp:RecKp:SegraipxFbbbFbbbFbbbFbbbgwp9ogDp:Uep;6ep;Mepxbbn0bbn0bbn0bbn0gqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9oavaDarp:Xeaiczp:RecKp:Segip:Uep;6ep;Meaqp;Keawp9op9qavaDaraip:Uep:Xep;6ep;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qavaoalcep:Rep9oalpxebbbebbbebbbebbbp9op9qp;6ep;Meaqp;KecKp:Rep9qpkbbabczfhbadclfgdae6mbxdkkaeTmbcbhdinabczfgkpxbFu9hbFu9hbFu9hbFu9habpbbbglakpbbbgrpmlvorxmPsCXQL358E8Fgvczp:TegqavcHp:Tep9qgicdp:Teaip9qgiclp:Teaip9qgicwp:Teaip9qgop;6ep;NegialarpmbediwDqkzHOAKY8AEgDpxFFbbFFbbFFbbFFbbglp9ograDczp:Segwp:Ueavczp:Reczp:SegDp:Xep;6ep;Mepxbbn0bbn0bbn0bbn0gvp;Kealp9oaiarawaDp:Uep:Xep;6ep;Meavp;Keczp:Rep9qgwaiaoaqcep:Rep9oaqpxebbbebbbebbbebbbp9op9qp;6ep;Meavp;Keczp:ReaiaDarp:Uep;6ep;Meavp;Kealp9op9qgipmwDKYqk8AExm35Ps8E8FpkbbabawaipmbezHdiOAlvCXorQLpkbbabcafhbadclfgdae6mbkkk9teiucbcbydj:G:cjbgeabcifc98GfgbBdj:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkxebcj:Gdklz:zbb"):s("b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuixkbeeeddddillviebeoweuecj:Gdkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WboY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbrl79IV9Rbwq:VZkdbk:XYi5ud9:du8Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaicefhxcj;abad9Uc;WFbGcjdadca0EhmaialfgPar9Rgoadfhsavaoadz:jjjjbgzceVhHcbhOdndninaeaO9nmeaPax9RaD6mdamaeaO9RaOamfgoae6EgAcsfglc9WGhCabaOad2fhXaAcethQaxaDfhiaOaeaoaeao6E9RhLalcl4cifcd4hKazcj;cbfaAfhYcbh8AazcjdfhEaHh3incbh5dnawTmbaxa8Acd4fRbbh5kcbh8Eazcj;cbfhqinaih8Fdndndndna5a8Ecet4ciGgoc9:fPdebdkaPa8F9RaA6mrazcj;cbfa8EaA2fa8FaAz:jjjjb8Aa8FaAfhixdkazcj;cbfa8EaA2fcbaAz:kjjjb8Aa8FhixekaPa8F9RaK6mva8FaKfhidnaCTmbaPai9RcK6mbaocdtc:q:G:cjbfcj:G:cjbawEhaczhrcbhlinargoc9Wfghaqfhrdndndndndndnaaa8Fahco4fRbbalcoG4ciGcdtfydbPDbedvivvvlvkar9cb83bwar9cb83bbxlkarcbaiRbdai8Xbb9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbaqaofgrcGfcbaicdfa8J9c8N1:NfghRbbag9cjjjjjw:dg8J9qE86bbarcVfcbaha8J9c8M1:NfghRbbag9cjjjjjl:dg8J9qE86bbarc7fcbaha8J9c8L1:NfghRbbag9cjjjjjd:dg8J9qE86bbarctfcbaha8J9c8K1:NfghRbbag9cjjjjje:dg8J9qE86bbarc91fcbaha8J9c8J1:NfghRbbag9cjjjj;ab:dg8J9qE86bbarc4fcbaha8J9cg1:NfghRbbag9cjjjja:dg8J9qE86bbarc93fcbaha8J9ch1:NfghRbbag9cjjjjz:dgg9qE86bbarc94fcbahag9ca1:NfghRbbai8Xbe9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbarc95fcbaha8J9c8N1:NfgiRbbag9cjjjjjw:dg8J9qE86bbarc96fcbaia8J9c8M1:NfgiRbbag9cjjjjjl:dg8J9qE86bbarc97fcbaia8J9c8L1:NfgiRbbag9cjjjjjd:dg8J9qE86bbarc98fcbaia8J9c8K1:NfgiRbbag9cjjjjje:dg8J9qE86bbarc99fcbaia8J9c8J1:NfgiRbbag9cjjjj;ab:dg8J9qE86bbarc9:fcbaia8J9cg1:NfgiRbbag9cjjjja:dg8J9qE86bbarcufcbaia8J9ch1:NfgiRbbag9cjjjjz:dgg9qE86bbaiag9ca1:NfhixikaraiRblaiRbbghco4g8Ka8KciSg8KE86bbaqaofgrcGfaiclfa8Kfg8KRbbahcl4ciGg8La8LciSg8LE86bbarcVfa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc7fa8Ka8Lfg8KRbbahciGghahciSghE86bbarctfa8Kahfg8KRbbaiRbeghco4g8La8LciSg8LE86bbarc91fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc4fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc93fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc94fa8Kahfg8KRbbaiRbdghco4g8La8LciSg8LE86bbarc95fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc96fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc97fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc98fa8KahfghRbbaiRbigico4g8Ka8KciSg8KE86bbarc99faha8KfghRbbaicl4ciGg8Ka8KciSg8KE86bbarc9:faha8KfghRbbaicd4ciGg8Ka8KciSg8KE86bbarcufaha8KfgrRbbaiciGgiaiciSgiE86bbaraifhixdkaraiRbwaiRbbghcl4g8Ka8KcsSg8KE86bbaqaofgrcGfaicwfa8Kfg8KRbbahcsGghahcsSghE86bbarcVfa8KahfghRbbaiRbeg8Kcl4g8La8LcsSg8LE86bbarc7faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarctfaha8KfghRbbaiRbdg8Kcl4g8La8LcsSg8LE86bbarc91faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc4faha8KfghRbbaiRbig8Kcl4g8La8LcsSg8LE86bbarc93faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc94faha8KfghRbbaiRblg8Kcl4g8La8LcsSg8LE86bbarc95faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc96faha8KfghRbbaiRbvg8Kcl4g8La8LcsSg8LE86bbarc97faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc98faha8KfghRbbaiRbog8Kcl4g8La8LcsSg8LE86bbarc99faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc9:faha8KfghRbbaiRbrgicl4g8Ka8KcsSg8KE86bbarcufaha8KfgrRbbaicsGgiaicsSgiE86bbaraifhixekarai8Pbw83bwarai8Pbb83bbaiczfhikdnaoaC9pmbalcdfhlaoczfhraPai9RcL0mekkaoaC6moaimexokaCmva8FTmvkaqaAfhqa8Ecefg8Ecl9hmbkdndndndnawTmbasa8Acd4fRbbgociGPlbedrbkaATmdaza8Afh8Fazcj;cbfhhcbh8EaEhaina8FRbbhraahocbhlinaoahalfRbbgqce4cbaqceG9R7arfgr86bbaoadfhoaAalcefgl9hmbkaacefhaa8Fcefh8FahaAfhha8Ecefg8Ecl9hmbxikkaATmeaza8Afhaazcj;cbfhhcbhoceh8EaYh8FinaEaofhlaa8Vbbhrcbhoinala8FaofRbbcwtahaofRbbgqVc;:FiGce4cbaqceG9R7arfgr87bbaladfhlaLaocefgofmbka8FaQfh8FcdhoaacdfhaahaQfhha8EceGhlcbh8EalmbxdkkaATmbaocl4h8Eaza8AfRbbhqcwhoa3hlinalRbbaotaqVhqalcefhlaocwfgoca9hmbkcbhhaEh8FaYhainazcj;cbfahfRbbhrcwhoaahlinalRbbaotarVhralaAfhlaocwfgoca9hmbkara8E94aq7hqcbhoa8Fhlinalaqao486bbalcefhlaocwfgoca9hmbka8Fadfh8FaacefhaahcefghaA9hmbkkaEclfhEa3clfh3a8Aclfg8Aad6mbkaXazcjdfaAad2z:jjjjb8AazazcjdfaAcufad2fadz:jjjjb8AaAaOfhOaihxaimbkc9:hoxdkcbc99aPax9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaok:ysezu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnalaeci9UgrcHf6mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:kjjjb8Aav9cu83iUav9cu83i8Wav9cu83iyav9cu83iaav9cu83iKav9cu83izav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbavaiaqaDcsGfRbbgscl4gP9RcsGcdtfydbaxcefgOaPEhDavaias9RcsGcdtfydbaOaPTgzfgOascsGgPEhsaPThPdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiazfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaPfhiaOaPfhxxekaxcbalRbbgsEgHaDc;:eSgDfhOascsGhAdndnascl4gCmbaOcefhzxekaOhzavaiaC9RcsGcdtfydbhOkdndnaAmbazcefhxxekazhxavaias9RcsGcdtfydbhzkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhHascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaHhDxekaDcefhDkasce4cbasceG9R7amfgmhHkdndnaCcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhOaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkaOhsxekascefhskaPce4cbaPceG9R7amfgmhOkdndnaAcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhzaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkazhlxekalcefhlkaPce4cbaPceG9R7amfgmhzkdndnadcd9hmbabarcetfgDaH87ebaDclfaz87ebaDcdfaO87ebxekabarcdtfgDaHBdbaDcwfazBdbaDclfaOBdbkavc;abfaocitfgDaOBdbaDaHBdlavaicdtfaHBdbavc;abfaocefcsGcitfgDazBdbaDaOBdlavaicefgicsGcdtfaOBdbavc;abfaocdfcsGcitfgDaHBdbaDazBdlavaiaCTaCcsSVfgicsGcdtfazBdbaiaATaAcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnalaecvf9pmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk: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:4ioiue99dud99dud99dnaeTmbcbhiabhlindndnal8Uebgv:YgoJ:ji:1Salcof8UebgrciVgw:Y:vgDNJbbbZJbbb:;avcu9kEMgq:lJbbb9p9DTmbaq:Ohkxekcjjjj94hkkalclf8Uebhvalcdf8UebhxalarcefciGcetfak87ebdndnax:YgqaDNJbbbZJbbb:;axcu9kEMgm:lJbbb9p9DTmbam:Ohxxekcjjjj94hxkabaiarciGgkfcd7cetfax87ebdndnav:YgmaDNJbbbZJbbb:;avcu9kEMgP:lJbbb9p9DTmbaP:Ohvxekcjjjj94hvkalarcufciGcetfav87ebdndnawaw2:ZgPaPMaoaoN:taqaqN:tamamN:tgoJbbbbaoJbbbb9GE:raDNJbbbZMgD:lJbbb9p9DTmbaD:Ohrxekcjjjj94hrkalakcetfar87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk:Tvirud99eudndnadcl9hmbaeTmeindndnabRbbgiabcefgl8Sbbgvabcdfgo8Sbbgrf9R:YJbbuJabcifgwRbbgdce4adVgDcd4aDVgDcl4aDVgD:Z:vgqNJbbbZMgk:lJbbb9p9DTmbak:Ohxxekcjjjj94hxkaoax86bbdndnaraif:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohoxekcjjjj94hokalao86bbdndnavaifar9R:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabai86bbdndnaDadcetGadceGV:ZaqNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkawad86bbabclfhbaecufgembxdkkaeTmbindndnab8Vebgiabcdfgl8Uebgvabclfgo8Uebgrf9R:YJbFu9habcofgw8Vebgdce4adVgDcd4aDVgDcl4aDVgDcw4aDVgD:Z:vgqNJbbbZMgk:lJbbb9p9DTmbak:Ohxxekcjjjj94hxkaoax87ebdndnaraif:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohoxekcjjjj94hokalao87ebdndnavaifar9R:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabai87ebdndnaDadcetGadceGV:ZaqNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkawad87ebabcwfhbaecufgembkkk9teiucbcbyd:K:G:cjbgeabcifc98GfgbBd:K:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkk83dbcj:Gdk8Kbbbbdbbblbbbwbbbbbbbebbbdbbblbbbwbbbbc:K:Gdkl8W:qbb"),r=WebAssembly.instantiate(a,{}).then(function(t){(e=t.instance).exports.__wasm_call_ctors()});function s(e){for(var t=new Uint8Array(e.length),a=0;a<e.length;++a){var r=e.charCodeAt(a);t[a]=r>96?r-97:r>64?r-39:r+4}for(var s=0,a=0;a<e.length;++a)t[s++]=t[a]<60?i[t[a]]:(t[a]-60)*64+t[++a];return t.buffer.slice(0,s)}function n(e,t,i,a,r,s,n){var o=e.exports.sbrk,l=a+3&-4,A=o(l*r),h=o(s.length),c=new Uint8Array(e.exports.memory.buffer);c.set(s,h);var d=t(A,a,r,h,s.length);if(0==d&&n&&n(A,l,r),i.set(c.subarray(A,A+a*r)),o(A-o(0)),0!=d)throw Error("Malformed buffer data: "+d)}var o={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp",COLOR:"meshopt_decodeFilterColor"},l={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},A=[],h=0;function c(e){var t=e.data;self.ready.then(function(e){if(!t.id)return self.close();try{var i=new Uint8Array(t.count*t.size);n(e,e.exports[t.mode],i,t.count,t.size,t.source,e.exports[t.filter]),self.postMessage({id:t.id,count:t.count,action:"resolve",value:i},[i.buffer])}catch(e){self.postMessage({id:t.id,count:t.count,action:"reject",value:e})}})}return{ready:r,supported:!0,useWorkers:function(e){for(var t=new Blob(["self.ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(a)+"]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = "+c.name+";"+n.toString()+c.toString()],{type:"text/javascript"}),i=URL.createObjectURL(t),r=A.length;r<e;++r)A[r]=function(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}(i);for(var r=e;r<A.length;++r)A[r].object.postMessage({});A.length=e,URL.revokeObjectURL(i)},decodeVertexBuffer:function(t,i,a,r,s){n(e,e.exports.meshopt_decodeVertexBuffer,t,i,a,r,e.exports[o[s]])},decodeIndexBuffer:function(t,i,a,r){n(e,e.exports.meshopt_decodeIndexBuffer,t,i,a,r)},decodeIndexSequence:function(t,i,a,r){n(e,e.exports.meshopt_decodeIndexSequence,t,i,a,r)},decodeGltfBuffer:function(t,i,a,r,s,A){n(e,e.exports[l[s]],t,i,a,r,e.exports[o[A]])},decodeGltfBufferAsync:function(t,i,a,s,c){return A.length>0?function(e,t,i,a,r){for(var s=A[0],n=1;n<A.length;++n)A[n].pending<s.pending&&(s=A[n]);return new Promise(function(n,o){var l=new Uint8Array(i),A=++h;s.pending+=e,s.requests[A]={resolve:n,reject:o},s.object.postMessage({id:A,count:e,size:t,source:l,mode:a,filter:r},[l.buffer])})}(t,i,a,l[s],o[c]):r.then(function(){var r=new Uint8Array(t*i);return n(e,e.exports[l[s]],r,t,i,a,e.exports[o[c]]),r})}}}();let tH=new WeakMap,tj=new URL(i(8605),i.b).toString(),tz=new URL(i(1530),i.b).toString(),tK=new URL(i(8572),i.b).toString();new URL(i(4602),i.b).toString(),new URL(i(3821),i.b).toString();class tJ extends tO.aHM{constructor(e){super(e),this.decoderPaths={js:tz,wasm:tj,dep_js:tK},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){let{decoderPaths:t}=this;return"object"==typeof e?(t.js=e.js,t.wasm=e.wasm,t.dep_js=null):(t.js=tO.r6x.resolveURL("draco_wasm_wrapper.js",e),t.wasm=tO.r6x.resolveURL("draco_decoder.wasm",e),t.dep_js=tO.r6x.resolveURL("draco_decoder.js",e)),this}setDecoderConfig(e){return console.warn("THREE.DRACOLoader: setDecoderConfig to has been deprecated and will be removed in r194."),this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,i,a){let r=new tO.Y9S(this.manager);r.setPath(this.path),r.setResponseType("arraybuffer"),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(e,e=>{this.parse(e,t,a)},i,a)}parse(e,t,i=()=>{}){this.decodeDracoFile(e,t,null,null,"srgb",i).catch(i)}decodeDracoFile(e,t,i,a,r=tO.Zr2,s=()=>{}){let n={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:a||this.defaultAttributeTypes,useUniqueIDs:!!i,vertexColorSpace:r};return this.decodeGeometry(e,n).then(t).catch(s)}decodeGeometry(e,t){let i,a=JSON.stringify(t);if(tH.has(e)){let t=tH.get(e);if(t.key===a)return t.promise;if(0===e.byteLength)throw Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r=this.workerNextTaskID++,s=e.byteLength,n=this._getWorker(r,s).then(a=>(i=a,new Promise((a,s)=>{i._callbacks[r]={resolve:a,reject:s},i.postMessage({type:"decode",id:r,taskConfig:t,buffer:e},[e])}))).then(e=>this._createGeometry(e.geometry));return n.catch(()=>!0).then(()=>{i&&r&&this._releaseTask(i,r)}),tH.set(e,{key:a,promise:n}),n}_createGeometry(e){let t=new tO.LoY;e.index&&t.setIndex(new tO.THS(e.index.array,1));for(let i=0;i<e.attributes.length;i++){let a,{name:r,array:s,itemSize:n,stride:o,vertexColorSpace:l}=e.attributes[i];if(n===o)a=new tO.THS(s,n);else{let e=new tO.eB$(s,o);a=new tO.eHs(e,n,0)}"color"===r&&(this._assignVertexColorSpace(a,l),a.normalized=s instanceof Float32Array==!1),t.setAttribute(r,a)}return t}_assignVertexColorSpace(e,t){if("srgb"!==t)return;let i=new tO.Q1f;for(let t=0,a=e.count;t<a;t++)i.fromBufferAttribute(e,t),tO.ppV.colorSpaceToWorking(i,"srgb"),e.setXYZ(t,i.r,i.g,i.b)}_loadLibrary(e,t){let i=new tO.Y9S(this.manager);return i.setResponseType(t),i.setWithCredentials(this.withCredentials),new Promise((t,a)=>{i.load(e,t,void 0,a)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;let e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[],{decoderPaths:i}=this;if(e){if(null===i.dep_js)throw Error("THREE.DRACOLoader: WebAssembly is required when using a custom decoder paths.");t.push(this._loadLibrary(i.dep_js,"text"))}else t.push(this._loadLibrary(i.js,"text")),t.push(this._loadLibrary(i.wasm,"arraybuffer"));return this.decoderPending=Promise.all(t).then(t=>{let i=t[0];e||(this.decoderConfig.wasmBinary=t[1]);let a=tV.toString(),r=["/* draco decoder */",i,"\n/* worker */",a.substring(a.indexOf("{")+1,a.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([r]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){let e=new Worker(this.workerSourceURL);e._callbacks={},e._taskCosts={},e._taskLoad=0,e.postMessage({type:"init",decoderConfig:this.decoderConfig}),e.onmessage=function(t){let 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});let 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 tV(){let e,t;onmessage=function(i){let a=i.data;switch(a.type){case"init":e=a.decoderConfig,t=new Promise(function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)});break;case"decode":let r=a.buffer,s=a.taskConfig;t.then(e=>{let t=e.draco,i=new t.Decoder;try{let e=function(e,t,i,a){var r,s,n;let o,l,A,h,c,d,u=a.attributeIDs,g=a.attributeTypes,p=t.GetEncodedGeometryType(i);if(p===e.TRIANGULAR_MESH)c=new e.Mesh,d=t.DecodeArrayToMesh(i,i.byteLength,c);else if(p===e.POINT_CLOUD)c=new e.PointCloud,d=t.DecodeArrayToPointCloud(i,i.byteLength,c);else throw Error("THREE.DRACOLoader: Unexpected geometry type.");if(!d.ok()||0===c.ptr)throw Error("THREE.DRACOLoader: Decoding failed: "+d.error_msg());let m={index:null,attributes:[]};for(let i in u){let r,s,n=self[g[i]];if(a.useUniqueIDs)s=u[i],r=t.GetAttributeByUniqueId(c,s);else{if(-1===(s=t.GetAttributeId(c,e[u[i]])))continue;r=t.GetAttribute(c,s)}let o=function(e,t,i,a,r,s){let n,o=i.num_points(),l=s.num_components(),A=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,r),h=l*r.BYTES_PER_ELEMENT,c=4*Math.ceil(h/4),d=c/r.BYTES_PER_ELEMENT,u=o*h,g=e._malloc(u);t.GetAttributeDataArrayForAllPoints(i,s,A,u,g);let p=new r(e.HEAPF32.buffer,g,u/r.BYTES_PER_ELEMENT);if(h===c)n=p.slice();else{n=new r(o*c/r.BYTES_PER_ELEMENT);let e=0;for(let t=0,i=p.length;t<i;t++){for(let i=0;i<l;i++)n[e+i]=p[t*l+i];e+=d}}return e._free(g),{name:a,count:o,itemSize:l,array:n,stride:d}}(e,t,c,i,n,r);"color"===i&&(o.vertexColorSpace=a.vertexColorSpace),m.attributes.push(o)}return p===e.TRIANGULAR_MESH&&(r=e,s=t,n=c,o=3*n.num_faces(),l=4*o,A=r._malloc(l),s.GetTrianglesUInt32Array(n,l,A),h=new Uint32Array(r.HEAPF32.buffer,A,o).slice(),r._free(A),m.index={array:h,itemSize:1}),e.destroy(c),m}(t,i,new Int8Array(r),s),n=e.attributes.map(e=>e.array.buffer);e.index&&n.push(e.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:e},n)}catch(e){console.error(e),self.postMessage({type:"error",id:a.id,error:e.message})}finally{t.destroy(i)}})}}}function tY(e,t){if(0===t)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(2!==t&&1!==t)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e;{let i=e.getIndex();if(null===i){let t=[],a=e.getAttribute("position");if(void 0===a)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<a.count;e++)t.push(e);e.setIndex(t),i=e.getIndex()}let a=i.count-2,r=[];if(2===t)for(let e=1;e<=a;e++)r.push(i.getX(0)),r.push(i.getX(e)),r.push(i.getX(e+1));else for(let e=0;e<a;e++)e%2==0?(r.push(i.getX(e)),r.push(i.getX(e+1)),r.push(i.getX(e+2))):(r.push(i.getX(e+2)),r.push(i.getX(e+1)),r.push(i.getX(e)));r.length/3!==a&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let s=e.clone();return s.setIndex(r),s.clearGroups(),s}}function t$(e){let t=new Map,i=new Map,a=e.clone();return function e(t,i,a){a(t,i);for(let r=0;r<t.children.length;r++)e(t.children[r],i.children[r],a)}(e,a,function(e,a){t.set(a,e),i.set(e,a)}),a.traverse(function(e){if(!e.isSkinnedMesh)return;let a=t.get(e),r=a.skeleton.bones;e.skeleton=a.skeleton.clone(),e.bindMatrix.copy(a.bindMatrix),e.skeleton.bones=r.map(function(e){return i.get(e)}),e.bind(e.skeleton,e.bindMatrix)}),a}class tW extends tO.aHM{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new t9(e)}),this.register(function(e){return new t3(e)}),this.register(function(e){return new ir(e)}),this.register(function(e){return new is(e)}),this.register(function(e){return new io(e)}),this.register(function(e){return new t4(e)}),this.register(function(e){return new t6(e)}),this.register(function(e){return new t7(e)}),this.register(function(e){return new ie(e)}),this.register(function(e){return new t8(e)}),this.register(function(e){return new it(e)}),this.register(function(e){return new t5(e)}),this.register(function(e){return new ia(e)}),this.register(function(e){return new ii(e)}),this.register(function(e){return new t1(e)}),this.register(function(e){return new il(e,t0.EXT_MESHOPT_COMPRESSION)}),this.register(function(e){return new il(e,t0.KHR_MESHOPT_COMPRESSION)}),this.register(function(e){return new iA(e)})}load(e,t,i,a){let r,s=this;if(""!==this.resourcePath)r=this.resourcePath;else if(""!==this.path){let t=tO.r6x.extractUrlBase(e);r=tO.r6x.resolveURL(t,this.path)}else r=tO.r6x.extractUrlBase(e);this.manager.itemStart(e);let n=function(t){a?a(t):console.error(t),s.manager.itemError(e),s.manager.itemEnd(e)},o=new tO.Y9S(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(i){try{s.parse(i,r,function(i){t(i),s.manager.itemEnd(e)},n)}catch(e){n(e)}},i,n)}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,a){let r,s={},n={},o=new TextDecoder;if("string"==typeof e)r=JSON.parse(e);else if(e instanceof ArrayBuffer)if(o.decode(new Uint8Array(e,0,4))===ih){try{s[t0.KHR_BINARY_GLTF]=new ic(e)}catch(e){a&&a(e);return}r=JSON.parse(s[t0.KHR_BINARY_GLTF].content)}else r=JSON.parse(o.decode(e));else r=e;if(void 0===r.asset||r.asset.version[0]<2){a&&a(Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}let l=new iT(r,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e<this.pluginCallbacks.length;e++){let t=this.pluginCallbacks[e](l);t.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),n[t.name]=t,s[t.name]=!0}if(r.extensionsUsed)for(let e=0;e<r.extensionsUsed.length;++e){let t=r.extensionsUsed[e],i=r.extensionsRequired||[];switch(t){case t0.KHR_MATERIALS_UNLIT:s[t]=new t2;break;case t0.KHR_DRACO_MESH_COMPRESSION:s[t]=new id(r,this.dracoLoader);break;case t0.KHR_TEXTURE_TRANSFORM:s[t]=new iu;break;case t0.KHR_MESH_QUANTIZATION:s[t]=new ig;break;default:i.indexOf(t)>=0&&void 0===n[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}l.setExtensions(s),l.setPlugins(n),l.parse(i,a)}parseAsync(e,t){let i=this;return new Promise(function(a,r){i.parse(e,t,a,r)})}}function tX(){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={}}}}function tZ(e,t,i){let a=e.json.materials[t];return a.extensions&&a.extensions[i]?a.extensions[i]:null}let t0={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",KHR_MESHOPT_COMPRESSION:"KHR_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class t1{constructor(e){this.parser=e,this.name=t0.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){let e=this.parser,t=this.parser.json.nodes||[];for(let i=0,a=t.length;i<a;i++){let a=t[i];a.extensions&&a.extensions[this.name]&&void 0!==a.extensions[this.name].light&&e._addNodeRef(this.cache,a.extensions[this.name].light)}}_loadLight(e){let t,i=this.parser,a="light:"+e,r=i.cache.get(a);if(r)return r;let s=i.json,n=((s.extensions&&s.extensions[this.name]||{}).lights||[])[e],o=new tO.Q1f(0xffffff);void 0!==n.color&&o.setRGB(n.color[0],n.color[1],n.color[2],tO.Zr2);let l=void 0!==n.range?n.range:0;switch(n.type){case"directional":(t=new tO.ZyN(o)).target.position.set(0,0,-1),t.add(t.target);break;case"point":(t=new tO.HiM(o)).distance=l;break;case"spot":(t=new tO.nCl(o)).distance=l,n.spot=n.spot||{},n.spot.innerConeAngle=void 0!==n.spot.innerConeAngle?n.spot.innerConeAngle:0,n.spot.outerConeAngle=void 0!==n.spot.outerConeAngle?n.spot.outerConeAngle:Math.PI/4,t.angle=n.spot.outerConeAngle,t.penumbra=1-n.spot.innerConeAngle/n.spot.outerConeAngle,t.target.position.set(0,0,-1),t.add(t.target);break;default:throw Error("THREE.GLTFLoader: Unexpected light type: "+n.type)}return t.position.set(0,0,0),iS(t,n),void 0!==n.intensity&&(t.intensity=n.intensity),t.name=i.createUniqueName(n.name||"light_"+e),r=Promise.resolve(t),i.cache.add(a,r),r}getDependency(e,t){if("light"===e)return this._loadLight(t)}createNodeAttachment(e){let t=this,i=this.parser,a=i.json.nodes[e],r=(a.extensions&&a.extensions[this.name]||{}).light;return void 0===r?null:this._loadLight(r).then(function(e){return i._getNodeRef(t.cache,r,e)})}}class t2{constructor(){this.name=t0.KHR_MATERIALS_UNLIT}getMaterialType(){return tO.V9B}extendParams(e,t,i){let a=[];e.color=new tO.Q1f(1,1,1),e.opacity=1;let r=t.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){let t=r.baseColorFactor;e.color.setRGB(t[0],t[1],t[2],tO.Zr2),e.opacity=t[3]}void 0!==r.baseColorTexture&&a.push(i.assignTexture(e,"map",r.baseColorTexture,"srgb"))}return Promise.all(a)}}class t8{constructor(e){this.parser=e,this.name=t0.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){let i=tZ(this.parser,e,this.name);return null===i||void 0!==i.emissiveStrength&&(t.emissiveIntensity=i.emissiveStrength),Promise.resolve()}}class t9{constructor(e){this.parser=e,this.name=t0.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){return null!==tZ(this.parser,e,this.name)?tO.uSd:null}extendMaterialParams(e,t){let i=tZ(this.parser,e,this.name);if(null===i)return Promise.resolve();let a=[];if(void 0!==i.clearcoatFactor&&(t.clearcoat=i.clearcoatFactor),void 0!==i.clearcoatTexture&&a.push(this.parser.assignTexture(t,"clearcoatMap",i.clearcoatTexture)),void 0!==i.clearcoatRoughnessFactor&&(t.clearcoatRoughness=i.clearcoatRoughnessFactor),void 0!==i.clearcoatRoughnessTexture&&a.push(this.parser.assignTexture(t,"clearcoatRoughnessMap",i.clearcoatRoughnessTexture)),void 0!==i.clearcoatNormalTexture&&(a.push(this.parser.assignTexture(t,"clearcoatNormalMap",i.clearcoatNormalTexture)),void 0!==i.clearcoatNormalTexture.scale)){let e=i.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new tO.I9Y(e,e)}return Promise.all(a)}}class t3{constructor(e){this.parser=e,this.name=t0.KHR_MATERIALS_DISPERSION}getMaterialType(e){return null!==tZ(this.parser,e,this.name)?tO.uSd:null}extendMaterialParams(e,t){let i=tZ(this.parser,e,this.name);return null===i||(t.dispersion=void 0!==i.dispersion?i.dispersion:0),Promise.resolve()}}class t5{constructor(e){this.parser=e,this.name=t0.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){return null!==tZ(this.parser,e,this.name)?tO.uSd:null}extendMaterialParams(e,t){let i=tZ(this.parser,e,this.name);if(null===i)return Promise.resolve();let a=[];return void 0!==i.iridescenceFactor&&(t.iridescence=i.iridescenceFactor),void 0!==i.iridescenceTexture&&a.push(this.parser.assignTexture(t,"iridescenceMap",i.iridescenceTexture)),void 0!==i.iridescenceIor&&(t.iridescenceIOR=i.iridescenceIor),void 0===t.iridescenceThicknessRange&&(t.iridescenceThicknessRange=[100,400]),void 0!==i.iridescenceThicknessMinimum&&(t.iridescenceThicknessRange[0]=i.iridescenceThicknessMinimum),void 0!==i.iridescenceThicknessMaximum&&(t.iridescenceThicknessRange[1]=i.iridescenceThicknessMaximum),void 0!==i.iridescenceThicknessTexture&&a.push(this.parser.assignTexture(t,"iridescenceThicknessMap",i.iridescenceThicknessTexture)),Promise.all(a)}}class t4{constructor(e){this.parser=e,this.name=t0.KHR_MATERIALS_SHEEN}getMaterialType(e){return null!==tZ(this.parser,e,this.name)?tO.uSd:null}extendMaterialParams(e,t){let i=tZ(this.parser,e,this.name);if(null===i)return Promise.resolve();let a=[];if(t.sheenColor=new tO.Q1f(0,0,0),t.sheenRoughness=0,t.sheen=1,void 0!==i.sheenColorFactor){let e=i.sheenColorFactor;t.sheenColor.setRGB(e[0],e[1],e[2],tO.Zr2)}return void 0!==i.sheenRoughnessFactor&&(t.sheenRoughness=i.sheenRoughnessFactor),void 0!==i.sheenColorTexture&&a.push(this.parser.assignTexture(t,"sheenColorMap",i.sheenColorTexture,"srgb")),void 0!==i.sheenRoughnessTexture&&a.push(this.parser.assignTexture(t,"sheenRoughnessMap",i.sheenRoughnessTexture)),Promise.all(a)}}class t6{constructor(e){this.parser=e,this.name=t0.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){return null!==tZ(this.parser,e,this.name)?tO.uSd:null}extendMaterialParams(e,t){let i=tZ(this.parser,e,this.name);if(null===i)return Promise.resolve();let a=[];return void 0!==i.transmissionFactor&&(t.transmission=i.transmissionFactor),void 0!==i.transmissionTexture&&a.push(this.parser.assignTexture(t,"transmissionMap",i.transmissionTexture)),Promise.all(a)}}class t7{constructor(e){this.parser=e,this.name=t0.KHR_MATERIALS_VOLUME}getMaterialType(e){return null!==tZ(this.parser,e,this.name)?tO.uSd:null}extendMaterialParams(e,t){let i=tZ(this.parser,e,this.name);if(null===i)return Promise.resolve();let a=[];t.thickness=void 0!==i.thicknessFactor?i.thicknessFactor:0,void 0!==i.thicknessTexture&&a.push(this.parser.assignTexture(t,"thicknessMap",i.thicknessTexture)),t.attenuationDistance=i.attenuationDistance||1/0;let r=i.attenuationColor||[1,1,1];return t.attenuationColor=new tO.Q1f().setRGB(r[0],r[1],r[2],tO.Zr2),Promise.all(a)}}class ie{constructor(e){this.parser=e,this.name=t0.KHR_MATERIALS_IOR}getMaterialType(e){return null!==tZ(this.parser,e,this.name)?tO.uSd:null}extendMaterialParams(e,t){let i=tZ(this.parser,e,this.name);return null===i||(t.ior=void 0!==i.ior?i.ior:1.5,0===t.ior&&(t.ior=1e3)),Promise.resolve()}}class it{constructor(e){this.parser=e,this.name=t0.KHR_MATERIALS_SPECULAR}getMaterialType(e){return null!==tZ(this.parser,e,this.name)?tO.uSd:null}extendMaterialParams(e,t){let i=tZ(this.parser,e,this.name);if(null===i)return Promise.resolve();let a=[];t.specularIntensity=void 0!==i.specularFactor?i.specularFactor:1,void 0!==i.specularTexture&&a.push(this.parser.assignTexture(t,"specularIntensityMap",i.specularTexture));let r=i.specularColorFactor||[1,1,1];return t.specularColor=new tO.Q1f().setRGB(r[0],r[1],r[2],tO.Zr2),void 0!==i.specularColorTexture&&a.push(this.parser.assignTexture(t,"specularColorMap",i.specularColorTexture,"srgb")),Promise.all(a)}}class ii{constructor(e){this.parser=e,this.name=t0.EXT_MATERIALS_BUMP}getMaterialType(e){return null!==tZ(this.parser,e,this.name)?tO.uSd:null}extendMaterialParams(e,t){let i=tZ(this.parser,e,this.name);if(null===i)return Promise.resolve();let a=[];return t.bumpScale=void 0!==i.bumpFactor?i.bumpFactor:1,void 0!==i.bumpTexture&&a.push(this.parser.assignTexture(t,"bumpMap",i.bumpTexture)),Promise.all(a)}}class ia{constructor(e){this.parser=e,this.name=t0.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){return null!==tZ(this.parser,e,this.name)?tO.uSd:null}extendMaterialParams(e,t){let i=tZ(this.parser,e,this.name);if(null===i)return Promise.resolve();let a=[];return void 0!==i.anisotropyStrength&&(t.anisotropy=i.anisotropyStrength),void 0!==i.anisotropyRotation&&(t.anisotropyRotation=i.anisotropyRotation),void 0!==i.anisotropyTexture&&a.push(this.parser.assignTexture(t,"anisotropyMap",i.anisotropyTexture)),Promise.all(a)}}class ir{constructor(e){this.parser=e,this.name=t0.KHR_TEXTURE_BASISU}loadTexture(e){let t=this.parser,i=t.json,a=i.textures[e];if(!a.extensions||!a.extensions[this.name])return null;let r=a.extensions[this.name],s=t.options.ktx2Loader;if(!s)if(!(i.extensionsRequired&&i.extensionsRequired.indexOf(this.name)>=0))return null;else throw Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return t.loadTextureImage(e,r.source,s)}}class is{constructor(e){this.parser=e,this.name=t0.EXT_TEXTURE_WEBP}loadTexture(e){let t=this.name,i=this.parser,a=i.json,r=a.textures[e];if(!r.extensions||!r.extensions[t])return null;let s=r.extensions[t],n=a.images[s.source],o=i.textureLoader;if(n.uri){let e=i.options.manager.getHandler(n.uri);null!==e&&(o=e)}return i.loadTextureImage(e,s.source,o)}}class io{constructor(e){this.parser=e,this.name=t0.EXT_TEXTURE_AVIF}loadTexture(e){let t=this.name,i=this.parser,a=i.json,r=a.textures[e];if(!r.extensions||!r.extensions[t])return null;let s=r.extensions[t],n=a.images[s.source],o=i.textureLoader;if(n.uri){let e=i.options.manager.getHandler(n.uri);null!==e&&(o=e)}return i.loadTextureImage(e,s.source,o)}}class il{constructor(e,t){this.name=t,this.parser=e}loadBufferView(e){let t=this.parser.json,i=t.bufferViews[e];if(!i.extensions||!i.extensions[this.name])return null;{let e=i.extensions[this.name],a=this.parser.getDependency("buffer",e.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported)if(!(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0))return null;else throw Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return a.then(function(t){let i=e.byteOffset||0,a=e.byteLength||0,s=e.count,n=e.byteStride,o=new Uint8Array(t,i,a);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(s,n,o,e.mode,e.filter).then(function(e){return e.buffer}):r.ready.then(function(){let t=new ArrayBuffer(s*n);return r.decodeGltfBuffer(new Uint8Array(t),s,n,o,e.mode,e.filter),t})})}}}class iA{constructor(e){this.name=t0.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){let t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||void 0===i.mesh)return null;for(let e of t.meshes[i.mesh].primitives)if(e.mode!==iI.TRIANGLES&&e.mode!==iI.TRIANGLE_STRIP&&e.mode!==iI.TRIANGLE_FAN&&void 0!==e.mode)return null;let a=i.extensions[this.name].attributes,r=[],s={};for(let e in a)r.push(this.parser.getDependency("accessor",a[e]).then(t=>(s[e]=t,s[e])));return r.length<1?null:(r.push(this.parser.createNodeMesh(e)),Promise.all(r).then(e=>{let t=e.pop(),i=t.isGroup?t.children:[t],a=e[0].count,r=[];for(let e of i){let t=new tO.kn4,i=new tO.Pq0,n=new tO.PTz,o=new tO.Pq0(1,1,1),l=new tO.ZLX(e.geometry,e.material,a);for(let e=0;e<a;e++)s.TRANSLATION&&i.fromBufferAttribute(s.TRANSLATION,e),s.ROTATION&&n.fromBufferAttribute(s.ROTATION,e),s.SCALE&&o.fromBufferAttribute(s.SCALE,e),l.setMatrixAt(e,t.compose(i,n,o));for(let t in s)if("_COLOR_0"===t){let e=s[t];l.instanceColor=new tO.uWO(e.array,e.itemSize,e.normalized)}else"TRANSLATION"!==t&&"ROTATION"!==t&&"SCALE"!==t&&e.geometry.setAttribute(t,s[t]);tO.B69.prototype.copy.call(l,e),this.parser.assignFinalMaterial(l),r.push(l)}return t.isGroup?(t.clear(),t.add(...r),t):r[0]}))}}let ih="glTF";class ic{constructor(e){this.name=t0.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!==ih)throw Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw Error("THREE.GLTFLoader: Legacy binary file detected.");const a=this.header.length-12,r=new DataView(e,12);let s=0;for(;s<a;){const t=r.getUint32(s,!0);s+=4;const a=r.getUint32(s,!0);if(s+=4,0x4e4f534a===a){const a=new Uint8Array(e,12+s,t);this.content=i.decode(a)}else if(5130562===a){const i=12+s;this.body=e.slice(i,i+t)}s+=t}if(null===this.content)throw Error("THREE.GLTFLoader: JSON content not found.")}}class id{constructor(e,t){if(!t)throw Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=t0.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){let i=this.json,a=this.dracoLoader,r=e.extensions[this.name].bufferView,s=e.extensions[this.name].attributes,n={},o={},l={};for(let e in s)n[iB[e]||e.toLowerCase()]=s[e];for(let t in e.attributes){let a=iB[t]||t.toLowerCase();if(void 0!==s[t]){let r=i.accessors[e.attributes[t]],s=iC[r.componentType];l[a]=s.name,o[a]=!0===r.normalized}}return t.getDependency("bufferView",r).then(function(e){return new Promise(function(t,i){a.decodeDracoFile(e,function(e){for(let t in e.attributes){let i=e.attributes[t],a=o[t];void 0!==a&&(i.normalized=a)}t(e)},n,l,tO.Zr2,i)})})}}class iu{constructor(){this.name=t0.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}}class ig{constructor(){this.name=t0.KHR_MESH_QUANTIZATION}}class ip extends tO.lGw{constructor(e,t,i,a){super(e,t,i,a)}copySampleValue_(e){let t=this.resultBuffer,i=this.sampleValues,a=this.valueSize,r=e*a*3+a;for(let e=0;e!==a;e++)t[e]=i[r+e];return t}interpolate_(e,t,i,a){let r=this.resultBuffer,s=this.sampleValues,n=this.valueSize,o=2*n,l=3*n,A=a-t,h=(i-t)/A,c=h*h,d=c*h,u=e*l,g=u-l,p=-2*d+3*c,m=d-c,f=1-p,b=m-c+h;for(let e=0;e!==n;e++){let t=s[g+e+n],i=s[g+e+o]*A,a=s[u+e+n],l=s[u+e]*A;r[e]=f*t+b*i+p*a+m*l}return r}}let im=new tO.PTz;class ib extends ip{interpolate_(e,t,i,a){let r=super.interpolate_(e,t,i,a);return im.fromArray(r).normalize().toArray(r),r}}let iI={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},iC={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},iE={9728:1003,9729:1006,9984:1004,9985:1007,9986:1005,9987:1008},iy={33071:1001,33648:1002,10497:1e3},iw={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},iB={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"},iv={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},ix={CUBICSPLINE:void 0,LINEAR:2301,STEP:2300};function iQ(e,t,i){for(let a in i.extensions)void 0===e[a]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[a]=i.extensions[a])}function iS(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 iM(e){let t="",i=Object.keys(e).sort();for(let a=0,r=i.length;a<r;a++)t+=i[a]+":"+e[i[a]]+";";return t}function iR(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 Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}let iD=new tO.kn4;class iT{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new tX,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,a=-1,r=!1,s=-1;if("u">typeof navigator&&void 0!==navigator.userAgent){const e=navigator.userAgent;i=!0===/^((?!chrome|android).)*safari/i.test(e);const t=e.match(/Version\/(\d+)/);a=i&&t?parseInt(t[1],10):-1,s=(r=e.indexOf("Firefox")>-1)?e.match(/Firefox\/([0-9]+)\./)[1]:-1}"u"<typeof createImageBitmap||i&&a<17||r&&s<98?this.textureLoader=new tO.Tap(this.options.manager):this.textureLoader=new tO.Kzg(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new tO.Y9S(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){let i=this,a=this.json,r=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()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(t){let s={scene:t[0][a.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:a.asset,parser:i,userData:{}};return iQ(r,s,a),iS(s,a),Promise.all(i._invokeAll(function(e){return e.afterRoot&&e.afterRoot(s)})).then(function(){for(let e of s.scenes)e.updateMatrixWorld();e(s)})}).catch(t)}_markDefs(){let e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let i=0,a=t.length;i<a;i++){let a=t[i].joints;for(let t=0,i=a.length;t<i;t++)e[a[t]].isBone=!0}for(let t=0,a=e.length;t<a;t++){let a=e[t];void 0!==a.mesh&&(this._addNodeRef(this.meshCache,a.mesh),void 0!==a.skin&&(i[a.mesh].isSkinnedMesh=!0)),void 0!==a.camera&&this._addNodeRef(this.cameraCache,a.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;let a=i.clone(),r=(e,t)=>{let i=this.associations.get(e);for(let[a,s]of(null!=i&&this.associations.set(t,i),e.children.entries()))r(s,t.children[a])};return r(i,a),a.name+="_instance_"+e.uses[t]++,a}_invokeOne(e){let t=Object.values(this.plugins);t.push(this);for(let i=0;i<t.length;i++){let a=e(t[i]);if(a)return a}return null}_invokeAll(e){let t=Object.values(this.plugins);t.unshift(this);let i=[];for(let a=0;a<t.length;a++){let r=e(t[a]);r&&i.push(r)}return i}getDependency(e,t){let i=e+":"+t,a=this.cache.get(i);if(!a){switch(e){case"scene":a=this.loadScene(t);break;case"node":a=this._invokeOne(function(e){return e.loadNode&&e.loadNode(t)});break;case"mesh":a=this._invokeOne(function(e){return e.loadMesh&&e.loadMesh(t)});break;case"accessor":a=this.loadAccessor(t);break;case"bufferView":a=this._invokeOne(function(e){return e.loadBufferView&&e.loadBufferView(t)});break;case"buffer":a=this.loadBuffer(t);break;case"material":a=this._invokeOne(function(e){return e.loadMaterial&&e.loadMaterial(t)});break;case"texture":a=this._invokeOne(function(e){return e.loadTexture&&e.loadTexture(t)});break;case"skin":a=this.loadSkin(t);break;case"animation":a=this._invokeOne(function(e){return e.loadAnimation&&e.loadAnimation(t)});break;case"camera":a=this.loadCamera(t);break;default:if(!(a=this._invokeOne(function(i){return i!=this&&i.getDependency&&i.getDependency(e,t)})))throw Error("Unknown type: "+e)}this.cache.add(i,a)}return a}getDependencies(e){let t=this.cache.get(e);if(!t){let i=this;t=Promise.all((this.json[e+("mesh"===e?"es":"s")]||[]).map(function(t,a){return i.getDependency(e,a)})),this.cache.add(e,t)}return t}loadBuffer(e){let t=this.json.buffers[e],i=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[t0.KHR_BINARY_GLTF].body);let a=this.options;return new Promise(function(e,r){i.load(tO.r6x.resolveURL(t.uri,a.path),e,void 0,function(){r(Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){let t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(e){let i=t.byteLength||0,a=t.byteOffset||0;return e.slice(a,a+i)})}loadAccessor(e){let t=this,i=this.json,a=this.json.accessors[e];if(void 0===a.bufferView&&void 0===a.sparse){let e=iw[a.type],t=iC[a.componentType],i=!0===a.normalized,r=new t(a.count*e);return Promise.resolve(new tO.THS(r,e,i))}let r=[];return void 0!==a.bufferView?r.push(this.getDependency("bufferView",a.bufferView)):r.push(null),void 0!==a.sparse&&(r.push(this.getDependency("bufferView",a.sparse.indices.bufferView)),r.push(this.getDependency("bufferView",a.sparse.values.bufferView))),Promise.all(r).then(function(e){let r,s,n=e[0],o=iw[a.type],l=iC[a.componentType],A=l.BYTES_PER_ELEMENT,h=A*o,c=a.byteOffset||0,d=void 0!==a.bufferView?i.bufferViews[a.bufferView].byteStride:void 0,u=!0===a.normalized;if(d&&d!==h){let e=Math.floor(c/d),i="InterleavedBuffer:"+a.bufferView+":"+a.componentType+":"+e+":"+a.count,h=t.cache.get(i);h||(r=new l(n,e*d,a.count*d/A),h=new tO.eB$(r,d/A),t.cache.add(i,h)),s=new tO.eHs(h,o,c%d/A,u)}else r=null===n?new l(a.count*o):new l(n,c,a.count*o),s=new tO.THS(r,o,u);if(void 0!==a.sparse){let t=iw.SCALAR,i=iC[a.sparse.indices.componentType],r=a.sparse.indices.byteOffset||0,A=a.sparse.values.byteOffset||0,h=new i(e[1],r,a.sparse.count*t),c=new l(e[2],A,a.sparse.count*o);null!==n&&(s=new tO.THS(s.array.slice(),s.itemSize,s.normalized)),s.normalized=!1;for(let e=0,t=h.length;e<t;e++){let t=h[e];if(s.setX(t,c[e*o]),o>=2&&s.setY(t,c[e*o+1]),o>=3&&s.setZ(t,c[e*o+2]),o>=4&&s.setW(t,c[e*o+3]),o>=5)throw Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}s.normalized=u}return s})}loadTexture(e){let t=this.json,i=this.options,a=t.textures[e].source,r=t.images[a],s=this.textureLoader;if(r.uri){let e=i.manager.getHandler(r.uri);null!==e&&(s=e)}return this.loadTextureImage(e,a,s)}loadTextureImage(e,t,i){let a=this,r=this.json,s=r.textures[e],n=r.images[t],o=(n.uri||n.bufferView)+":"+s.sampler;if(this.textureCache[o])return this.textureCache[o];let l=this.loadImageSource(t,i).then(function(t){t.flipY=!1,t.name=s.name||n.name||"",""===t.name&&"string"==typeof n.uri&&!1===n.uri.startsWith("data:image/")&&(t.name=n.uri);let i=(r.samplers||{})[s.sampler]||{};return t.magFilter=iE[i.magFilter]||1006,t.minFilter=iE[i.minFilter]||1008,t.wrapS=iy[i.wrapS]||1e3,t.wrapT=iy[i.wrapT]||1e3,t.generateMipmaps=!t.isCompressedTexture&&1003!==t.minFilter&&1006!==t.minFilter,a.associations.set(t,{textures:e}),t}).catch(function(){return null});return this.textureCache[o]=l,l}loadImageSource(e,t){let i=this.json,a=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then(e=>e.clone());let r=i.images[e],s=self.URL||self.webkitURL,n=r.uri||"",o=!1;if(void 0!==r.bufferView)n=this.getDependency("bufferView",r.bufferView).then(function(e){o=!0;let t=new Blob([e],{type:r.mimeType});return n=s.createObjectURL(t)});else if(void 0===r.uri)throw Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");let l=Promise.resolve(n).then(function(e){return new Promise(function(i,r){let s=i;!0===t.isImageBitmapLoader&&(s=function(e){let t=new tO.gPd(e);t.needsUpdate=!0,i(t)}),t.load(tO.r6x.resolveURL(e,a.path),s,void 0,r)})}).then(function(e){var t;return!0===o&&s.revokeObjectURL(n),iS(e,r),e.userData.mimeType=r.mimeType||((t=r.uri).search(/\.jpe?g($|\?)/i)>0||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",n),e});return this.sourceCache[e]=l,l}assignTexture(e,t,i,a){let r=this;return this.getDependency("texture",i.index).then(function(s){if(!s)return null;if(void 0!==i.texCoord&&i.texCoord>0&&((s=s.clone()).channel=i.texCoord),r.extensions[t0.KHR_TEXTURE_TRANSFORM]){let e=void 0!==i.extensions?i.extensions[t0.KHR_TEXTURE_TRANSFORM]:void 0;if(e){let t=r.associations.get(s);s=r.extensions[t0.KHR_TEXTURE_TRANSFORM].extendTexture(s,e),r.associations.set(s,t)}}return void 0!==a&&(s.colorSpace=a),e[t]=s,s})}assignFinalMaterial(e){let t=e.geometry,i=e.material,a=void 0===t.attributes.tangent,r=void 0!==t.attributes.color,s=void 0===t.attributes.normal;if(e.isPoints){let e="PointsMaterial:"+i.uuid,t=this.cache.get(e);t||(t=new tO.BH$,tO.imn.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){let e="LineBasicMaterial:"+i.uuid,t=this.cache.get(e);t||(t=new tO.mrM,tO.imn.prototype.copy.call(t,i),t.color.copy(i.color),t.map=i.map,this.cache.add(e,t)),i=t}if(a||r||s){let e="ClonedMaterial:"+i.uuid+":";a&&(e+="derivative-tangents:"),r&&(e+="vertex-colors:"),s&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=i.clone(),r&&(t.vertexColors=!0),s&&(t.flatShading=!0),a&&(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 tO._4j}loadMaterial(e){let t,i=this,a=this.json,r=this.extensions,s=a.materials[e],n={},o=s.extensions||{},l=[];if(o[t0.KHR_MATERIALS_UNLIT]){let e=r[t0.KHR_MATERIALS_UNLIT];t=e.getMaterialType(),l.push(e.extendParams(n,s,i))}else{let a=s.pbrMetallicRoughness||{};if(n.color=new tO.Q1f(1,1,1),n.opacity=1,Array.isArray(a.baseColorFactor)){let e=a.baseColorFactor;n.color.setRGB(e[0],e[1],e[2],tO.Zr2),n.opacity=e[3]}void 0!==a.baseColorTexture&&l.push(i.assignTexture(n,"map",a.baseColorTexture,"srgb")),n.metalness=void 0!==a.metallicFactor?a.metallicFactor:1,n.roughness=void 0!==a.roughnessFactor?a.roughnessFactor:1,void 0!==a.metallicRoughnessTexture&&(l.push(i.assignTexture(n,"metalnessMap",a.metallicRoughnessTexture)),l.push(i.assignTexture(n,"roughnessMap",a.metallicRoughnessTexture))),t=this._invokeOne(function(t){return t.getMaterialType&&t.getMaterialType(e)}),l.push(Promise.all(this._invokeAll(function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,n)})))}!0===s.doubleSided&&(n.side=2);let A=s.alphaMode||"OPAQUE";if("BLEND"===A?(n.transparent=!0,n.depthWrite=!1):(n.transparent=!1,"MASK"===A&&(n.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&t!==tO.V9B&&(l.push(i.assignTexture(n,"normalMap",s.normalTexture)),n.normalScale=new tO.I9Y(1,1),void 0!==s.normalTexture.scale)){let e=s.normalTexture.scale;n.normalScale.set(e,e)}if(void 0!==s.occlusionTexture&&t!==tO.V9B&&(l.push(i.assignTexture(n,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(n.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&t!==tO.V9B){let e=s.emissiveFactor;n.emissive=new tO.Q1f().setRGB(e[0],e[1],e[2],tO.Zr2)}return void 0!==s.emissiveTexture&&t!==tO.V9B&&l.push(i.assignTexture(n,"emissiveMap",s.emissiveTexture,"srgb")),Promise.all(l).then(function(){let a=new t(n);return s.name&&(a.name=s.name),iS(a,s),i.associations.set(a,{materials:e}),s.extensions&&iQ(r,a,s),a})}createUniqueName(e){let t=tO.Nwf.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){let t=this,i=this.extensions,a=this.primitiveCache,r=[];for(let s=0,n=e.length;s<n;s++){let n=e[s],o=function(e){let t,i=e.extensions&&e.extensions[t0.KHR_DRACO_MESH_COMPRESSION];if(t=i?"draco:"+i.bufferView+":"+i.indices+":"+iM(i.attributes):e.indices+":"+iM(e.attributes)+":"+e.mode,void 0!==e.targets)for(let i=0,a=e.targets.length;i<a;i++)t+=":"+iM(e.targets[i]);return t}(n),l=a[o];if(l)r.push(l.promise);else{let e;e=n.extensions&&n.extensions[t0.KHR_DRACO_MESH_COMPRESSION]?function(e){return i[t0.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then(function(i){return ik(i,e,t)})}(n):ik(new tO.LoY,n,t),a[o]={primitive:n,promise:e},r.push(e)}}return Promise.all(r)}loadMesh(e){let t=this,i=this.json,a=this.extensions,r=i.meshes[e],s=r.primitives,n=[];for(let e=0,t=s.length;e<t;e++){var o;let t=void 0===s[e].material?(void 0===(o=this.cache).DefaultMaterial&&(o.DefaultMaterial=new tO._4j({color:0xffffff,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:0})),o.DefaultMaterial):this.getDependency("material",s[e].material);n.push(t)}return n.push(t.loadGeometries(s)),Promise.all(n).then(function(i){let n=i.slice(0,i.length-1),o=i[i.length-1],l=[];for(let i=0,A=o.length;i<A;i++){let A,h=o[i],c=s[i],d=n[i];if(c.mode===iI.TRIANGLES||c.mode===iI.TRIANGLE_STRIP||c.mode===iI.TRIANGLE_FAN||void 0===c.mode)!0===(A=!0===r.isSkinnedMesh?new tO.I46(h,d):new tO.eaF(h,d)).isSkinnedMesh&&A.normalizeSkinWeights(),c.mode===iI.TRIANGLE_STRIP?A.geometry=tY(A.geometry,1):c.mode===iI.TRIANGLE_FAN&&(A.geometry=tY(A.geometry,2));else if(c.mode===iI.LINES)A=new tO.DXC(h,d);else if(c.mode===iI.LINE_STRIP)A=new tO.N1A(h,d);else if(c.mode===iI.LINE_LOOP)A=new tO.FCc(h,d);else if(c.mode===iI.POINTS)A=new tO.ONl(h,d);else throw Error("THREE.GLTFLoader: Primitive mode unsupported: "+c.mode);Object.keys(A.geometry.morphAttributes).length>0&&function(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let i=0,a=t.weights.length;i<a;i++)e.morphTargetInfluences[i]=t.weights[i];if(t.extras&&Array.isArray(t.extras.targetNames)){let i=t.extras.targetNames;if(e.morphTargetInfluences.length===i.length){e.morphTargetDictionary={};for(let t=0,a=i.length;t<a;t++)e.morphTargetDictionary[i[t]]=t}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}(A,r),A.name=t.createUniqueName(r.name||"mesh_"+e),iS(A,r),c.extensions&&iQ(a,A,c),t.assignFinalMaterial(A),l.push(A)}for(let i=0,a=l.length;i<a;i++)t.associations.set(l[i],{meshes:e,primitives:i});if(1===l.length)return r.extensions&&iQ(a,l[0],r),l[0];let A=new tO.YJl;r.extensions&&iQ(a,A,r),t.associations.set(A,{meshes:e});for(let e=0,t=l.length;e<t;e++)A.add(l[e]);return A})}loadCamera(e){let t,i=this.json.cameras[e],a=i[i.type];return a?("perspective"===i.type?t=new tO.ubm(tO.cj9.radToDeg(a.yfov),a.aspectRatio||1,a.znear||1,a.zfar||2e6):"orthographic"===i.type&&(t=new tO.qUd(-a.xmag,a.xmag,a.ymag,-a.ymag,a.znear,a.zfar)),i.name&&(t.name=this.createUniqueName(i.name)),iS(t,i),Promise.resolve(t)):void console.warn("THREE.GLTFLoader: Missing camera parameters.")}loadSkin(e){let t=this.json.skins[e],i=[];for(let e=0,a=t.joints.length;e<a;e++)i.push(this._loadNodeShallow(t.joints[e]));return void 0!==t.inverseBindMatrices?i.push(this.getDependency("accessor",t.inverseBindMatrices)):i.push(null),Promise.all(i).then(function(e){let i=e.pop(),a=[],r=[];for(let s=0,n=e.length;s<n;s++){let n=e[s];if(n){a.push(n);let e=new tO.kn4;null!==i&&e.fromArray(i.array,16*s),r.push(e)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[s])}return new tO.EAD(a,r)})}loadAnimation(e){let t=this.json,i=this,a=t.animations[e],r=a.name?a.name:"animation_"+e,s=[],n=[],o=[],l=[],A=[];for(let e=0,t=a.channels.length;e<t;e++){let t=a.channels[e],i=a.samplers[t.sampler],r=t.target,h=r.node,c=void 0!==a.parameters?a.parameters[i.input]:i.input,d=void 0!==a.parameters?a.parameters[i.output]:i.output;void 0!==r.node&&(s.push(this.getDependency("node",h)),n.push(this.getDependency("accessor",c)),o.push(this.getDependency("accessor",d)),l.push(i),A.push(r))}return Promise.all([Promise.all(s),Promise.all(n),Promise.all(o),Promise.all(l),Promise.all(A)]).then(function(e){let t=e[0],s=e[1],n=e[2],o=e[3],l=e[4],A=[];for(let e=0,a=t.length;e<a;e++){let a=t[e],r=s[e],h=n[e],c=o[e],d=l[e];if(void 0===a)continue;a.updateMatrix&&a.updateMatrix();let u=i._createAnimationTracks(a,r,h,c,d);if(u)for(let e=0;e<u.length;e++)A.push(u[e])}let h=new tO.tz3(r,void 0,A);return iS(h,a),h})}createNodeMesh(e){let t=this.json,i=this,a=t.nodes[e];return void 0===a.mesh?null:i.getDependency("mesh",a.mesh).then(function(e){let t=i._getNodeRef(i.meshCache,a.mesh,e);return void 0!==a.weights&&t.traverse(function(e){if(e.isMesh)for(let t=0,i=a.weights.length;t<i;t++)e.morphTargetInfluences[t]=a.weights[t]}),t})}loadNode(e){let t=this.json.nodes[e],i=this._loadNodeShallow(e),a=[],r=t.children||[];for(let e=0,t=r.length;e<t;e++)a.push(this.getDependency("node",r[e]));let s=void 0===t.skin?Promise.resolve(null):this.getDependency("skin",t.skin);return Promise.all([i,Promise.all(a),s]).then(function(e){let t=e[0],i=e[1],a=e[2];null!==a&&t.traverse(function(e){e.isSkinnedMesh&&e.bind(a,iD)});for(let e=0,a=i.length;e<a;e++)t.add(i[e]);if(void 0!==t.userData.pivot&&i.length>0){let e=t.userData.pivot,a=i[0];t.pivot=new tO.Pq0().fromArray(e),t.position.x-=e[0],t.position.y-=e[1],t.position.z-=e[2],a.position.set(0,0,0),delete t.userData.pivot}return t})}_loadNodeShallow(e){let t=this.json,i=this.extensions,a=this;if(void 0!==this.nodeCache[e])return this.nodeCache[e];let r=t.nodes[e],s=r.name?a.createUniqueName(r.name):"",n=[],o=a._invokeOne(function(t){return t.createNodeMesh&&t.createNodeMesh(e)});return o&&n.push(o),void 0!==r.camera&&n.push(a.getDependency("camera",r.camera).then(function(e){return a._getNodeRef(a.cameraCache,r.camera,e)})),a._invokeAll(function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)}).forEach(function(e){n.push(e)}),this.nodeCache[e]=Promise.all(n).then(function(t){let n;if((n=!0===r.isBone?new tO.$Kf:t.length>1?new tO.YJl:1===t.length?t[0]:new tO.B69)!==t[0])for(let e=0,i=t.length;e<i;e++)n.add(t[e]);if(r.name&&(n.userData.name=r.name,n.name=s),iS(n,r),r.extensions&&iQ(i,n,r),void 0!==r.matrix){let e=new tO.kn4;e.fromArray(r.matrix),n.applyMatrix4(e)}else void 0!==r.translation&&n.position.fromArray(r.translation),void 0!==r.rotation&&n.quaternion.fromArray(r.rotation),void 0!==r.scale&&n.scale.fromArray(r.scale);if(a.associations.has(n)){if(void 0!==r.mesh&&a.meshCache.refs[r.mesh]>1){let e=a.associations.get(n);a.associations.set(n,{...e})}}else a.associations.set(n,{});return a.associations.get(n).nodes=e,n}),this.nodeCache[e]}loadScene(e){let t=this.extensions,i=this.json.scenes[e],a=this,r=new tO.YJl;i.name&&(r.name=a.createUniqueName(i.name)),iS(r,i),i.extensions&&iQ(t,r,i);let s=i.nodes||[],n=[];for(let e=0,t=s.length;e<t;e++)n.push(a.getDependency("node",s[e]));return Promise.all(n).then(function(e){for(let t=0,i=e.length;t<i;t++){let i=e[t];null!==i.parent?r.add(t$(i)):r.add(i)}return a.associations=(e=>{let t=new Map;for(let[e,i]of a.associations)(e instanceof tO.imn||e instanceof tO.gPd)&&t.set(e,i);return e.traverse(e=>{let i=a.associations.get(e);null!=i&&t.set(e,i)}),t})(r),r})}_createAnimationTracks(e,t,i,a,r){let s,n=[],o=e.name?e.name:e.uuid,l=[];function A(e){e.morphTargetInfluences&&l.push(e.name?e.name:e.uuid)}switch(iv[r.path]===iv.weights?(A(e),e.isGroup&&e.children.forEach(A)):l.push(o),iv[r.path]){case iv.weights:s=tO.Hit;break;case iv.rotation:s=tO.MBL;break;case iv.translation:case iv.scale:s=tO.RiT;break;default:s=1===i.itemSize?tO.Hit:tO.RiT}let h=void 0!==a.interpolation?ix[a.interpolation]:2301,c=this._getArrayFromAccessor(i);for(let e=0,i=l.length;e<i;e++){let i=new s(l[e]+"."+iv[r.path],t.array,c,h);"CUBICSPLINE"===a.interpolation&&this._createCubicSplineTrackInterpolant(i),n.push(i)}return n}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){let e=iR(t.constructor),i=new Float32Array(t.length);for(let a=0,r=t.length;a<r;a++)i[a]=t[a]*e;t=i}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(e){return new(this instanceof tO.MBL?ib:ip)(this.times,this.values,this.getValueSize()/3,e)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function ik(e,t,i){let a=t.attributes,r=[];for(let t in a){let s=iB[t]||t.toLowerCase();s in e.attributes||r.push(function(t,a){return i.getDependency("accessor",t).then(function(t){e.setAttribute(a,t)})}(a[t],s))}if(void 0!==t.indices&&!e.index){let a=i.getDependency("accessor",t.indices).then(function(t){e.setIndex(t)});r.push(a)}return tO.ppV.workingColorSpace!==tO.Zr2&&"COLOR_0"in a&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${tO.ppV.workingColorSpace}" not supported.`),iS(e,t),!function(e,t,i){let a=t.attributes,r=new tO.NRn;if(void 0===a.POSITION)return;{let e=i.json.accessors[a.POSITION],t=e.min,s=e.max;if(void 0===t||void 0===s)return console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(r.set(new tO.Pq0(t[0],t[1],t[2]),new tO.Pq0(s[0],s[1],s[2])),e.normalized){let t=iR(iC[e.componentType]);r.min.multiplyScalar(t),r.max.multiplyScalar(t)}}let s=t.targets;if(void 0!==s){let e=new tO.Pq0,t=new tO.Pq0;for(let a=0,r=s.length;a<r;a++){let r=s[a];if(void 0!==r.POSITION){let a=i.json.accessors[r.POSITION],s=a.min,n=a.max;if(void 0!==s&&void 0!==n){if(t.setX(Math.max(Math.abs(s[0]),Math.abs(n[0]))),t.setY(Math.max(Math.abs(s[1]),Math.abs(n[1]))),t.setZ(Math.max(Math.abs(s[2]),Math.abs(n[2]))),a.normalized){let e=iR(iC[a.componentType]);t.multiplyScalar(e)}e.max(t)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}r.expandByVector(e)}e.boundingBox=r;let n=new tO.iyt;r.getCenter(n.center),n.radius=r.min.distanceTo(r.max)/2,e.boundingSphere=n}(e,t,i),Promise.all(r).then(function(){return void 0!==t.targets?function(e,t,i){let a=!1,r=!1,s=!1;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(void 0!==i.POSITION&&(a=!0),void 0!==i.NORMAL&&(r=!0),void 0!==i.COLOR_0&&(s=!0),a&&r&&s)break}if(!a&&!r&&!s)return Promise.resolve(e);let n=[],o=[],l=[];for(let A=0,h=t.length;A<h;A++){let h=t[A];if(a){let t=void 0!==h.POSITION?i.getDependency("accessor",h.POSITION):e.attributes.position;n.push(t)}if(r){let t=void 0!==h.NORMAL?i.getDependency("accessor",h.NORMAL):e.attributes.normal;o.push(t)}if(s){let t=void 0!==h.COLOR_0?i.getDependency("accessor",h.COLOR_0):e.attributes.color;l.push(t)}}return Promise.all([Promise.all(n),Promise.all(o),Promise.all(l)]).then(function(t){let i=t[0],n=t[1],o=t[2];return a&&(e.morphAttributes.position=i),r&&(e.morphAttributes.normal=n),s&&(e.morphAttributes.color=o),e.morphTargetsRelative=!0,e})}(e,t.targets,i):e})}class iF{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0,this.workerCreator=null}_initWorker(e){if(!this.workers[e]){let 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){let i=this.workersResolve[e];if(i&&i(t),this.queue.length){let{resolve:t,msg:i,transfer:a}=this.queue.shift();this.workersResolve[e]=t,this.workers[e].postMessage(i,a)}else this.workerStatus^=1<<e}setWorkerCreator(e){this.workerCreator=e}setWorkerLimit(e){this.pool=e}postMessage(e,t){return new Promise(i=>{let a=this._getIdleWorker();-1!==a?(this._initWorker(a),this.workerStatus|=1<<a,this.workersResolve[a]=i,this.workers[a].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}}class iL{constructor(e,t,i,a){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(e.buffer,e.byteOffset+t,i),this._littleEndian=a,this._offset=0}_nextUint8(){let e=this._dataView.getUint8(this._offset);return this._offset+=1,e}_nextUint16(){let e=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,e}_nextUint32(){let e=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint64(){let e=this._dataView.getUint32(this._offset,this._littleEndian)+0x100000000*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,e}_nextInt32(){let e=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint8Array(e){let 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=0){let i=this._offset,a=0;for(;this._dataView.getUint8(this._offset)!==t&&a<e;)a++,this._offset++;return a<e&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+i,a)}}new Uint8Array([0]);let iP=[171,75,84,88,32,50,48,187,13,10,26,10];function i_(e){return(new TextDecoder).decode(e)}let iU={env:{emscripten_notify_memory_growth:function(e){s=new Uint8Array(r.exports.memory.buffer)}}};class iG{init(){return a||(a="u">typeof fetch?fetch("data:application/wasm;base64,"+iN).then(e=>e.arrayBuffer()).then(e=>WebAssembly.instantiate(e,iU)).then(this._init):WebAssembly.instantiate(Buffer.from(iN,"base64"),iU).then(this._init))}_init(e){r=e.instance,iU.env.emscripten_notify_memory_growth(0)}decode(e,t=0){if(!r)throw Error("ZSTDDecoder: Await .init() before decoding.");let i=e.byteLength,a=r.exports.malloc(i);s.set(e,a),t=t||Number(r.exports.ZSTD_findDecompressedSize(a,i));let n=r.exports.malloc(t),o=r.exports.ZSTD_decompress(n,t,a,i),l=s.slice(n,n+o);return r.exports.free(a),r.exports.free(n),l}}let iN="AGFzbQEAAAABpQEVYAF/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/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQ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CyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2Q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ayECIAcgCGohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQ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PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ";({...tO.ppV.spaces.srgb,outputColorSpaceConfig:{drawingBufferColorSpace:"srgb",toneMappingMode:"extended"}});let iO=new URL(i(6160),i.b).toString(),iq=new URL(i(2677),i.b).toString(),iH=new WeakMap,ij=0;class iz extends tO.aHM{constructor(e){super(e),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new iF,this.workerSourceURL="",this.workerConfig=null,"u">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 console.warn('KTX2Loader: "detectSupportAsync()" has been deprecated. Use "detectSupport()" and "await renderer.init();" when creating the renderer.'),await e.init(),this.detectSupport(e)}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-s3tc"),bptcSupported:e.hasFeature("texture-compression-bc"),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")},"u">typeof navigator&&void 0!==navigator.platform&&void 0!==navigator.userAgent&&navigator.platform.indexOf("Linux")>=0&&0>navigator.userAgent.indexOf("Android")&&this.workerConfig.astcSupported&&this.workerConfig.etc2Supported&&this.workerConfig.bptcSupported&&this.workerConfig.dxtSupported&&(this.workerConfig.astcSupported=!1,this.workerConfig.etc1Supported=!1,this.workerConfig.etc2Supported=!1)),this}init(){if(!this.transcoderPending){let e,t,i=new tO.Y9S(this.manager);i.setWithCredentials(this.withCredentials);let a=new tO.Y9S(this.manager);a.setWithCredentials(this.withCredentials),a.setResponseType("arraybuffer"),""===this.transcoderPath?(e=i.loadAsync(iq),t=a.loadAsync(iO)):(i.setPath(this.transcoderPath),e=i.loadAsync("basis_transcoder.js"),a.setPath(this.transcoderPath),t=a.loadAsync("basis_transcoder.wasm")),this.transcoderPending=Promise.all([e,t]).then(([e,t])=>{let i=iz.BasisWorker.toString(),a=["/* constants */","let _EngineFormat = "+JSON.stringify(iz.EngineFormat),"let _EngineType = "+JSON.stringify(iz.EngineType),"let _TranscoderFormat = "+JSON.stringify(iz.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(iz.BasisFormat),"/* basis_transcoder.js */",e,"/* worker */",i.substring(i.indexOf("{")+1,i.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([a])),this.transcoderBinary=t,this.workerPool.setWorkerCreator(()=>{let e=new Worker(this.workerSourceURL),t=this.transcoderBinary.slice(0);return e.postMessage({type:"init",config:this.workerConfig,transcoderBinary:t},[t]),e})}),ij>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),ij++}return this.transcoderPending}load(e,t,i,a){if(null===this.workerConfig)throw Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");let r=new tO.Y9S(this.manager);r.setPath(this.path),r.setCrossOrigin(this.crossOrigin),r.setWithCredentials(this.withCredentials),r.setRequestHeader(this.requestHeader),r.setResponseType("arraybuffer"),r.load(e,e=>{this.parse(e,t,a)},i,a)}parse(e,t,i){if(null===this.workerConfig)throw Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");if(iH.has(e))return iH.get(e).promise.then(t).catch(i);this._createTexture(e).then(e=>t?t(e):null).catch(i)}_createTextureFrom(e,t){let i,{type:a,error:r,data:{faces:s,width:n,height:o,format:l,type:A,dfdFlags:h}}=e;if("error"===a)return Promise.reject(r);if(6===t.faceCount)i=new tO.c5h(s,l,A);else{let e=s[0].mipmaps;i=t.layerCount>1?new tO.iOZ(e,n,o,t.layerCount,l,A):new tO.FvD(e,n,o,l,A)}return i.minFilter=1===s[0].mipmaps.length?1006:1008,i.magFilter=1006,i.generateMipmaps=!1,i.needsUpdate=!0,i.colorSpace=iW(t),i.premultiplyAlpha=!!(1&h),i}async _createTexture(e,t={}){let i=function(e){let t=new Uint8Array(e.buffer,e.byteOffset,iP.length);if(t[0]!==iP[0]||t[1]!==iP[1]||t[2]!==iP[2]||t[3]!==iP[3]||t[4]!==iP[4]||t[5]!==iP[5]||t[6]!==iP[6]||t[7]!==iP[7]||t[8]!==iP[8]||t[9]!==iP[9]||t[10]!==iP[10]||t[11]!==iP[11])throw Error("Missing KTX 2.0 identifier.");let i={vkFormat:0,typeSize:1,pixelWidth:0,pixelHeight:0,pixelDepth:0,layerCount:0,faceCount:1,levelCount:0,supercompressionScheme:0,levels:[],dataFormatDescriptor:[{vendorId:0,descriptorType: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:[]}],keyValue:{},globalData:null},a=17*Uint32Array.BYTES_PER_ELEMENT,r=new iL(e,iP.length,a,!0);i.vkFormat=r._nextUint32(),i.typeSize=r._nextUint32(),i.pixelWidth=r._nextUint32(),i.pixelHeight=r._nextUint32(),i.pixelDepth=r._nextUint32(),i.layerCount=r._nextUint32(),i.faceCount=r._nextUint32(),i.levelCount=r._nextUint32(),i.supercompressionScheme=r._nextUint32();let s=r._nextUint32(),n=r._nextUint32(),o=r._nextUint32(),l=r._nextUint32(),A=r._nextUint64(),h=r._nextUint64(),c=3*Math.max(i.levelCount,1)*8,d=new iL(e,iP.length+a,c,!0);for(let t=0,a=Math.max(i.levelCount,1);t<a;t++)i.levels.push({levelData:new Uint8Array(e.buffer,e.byteOffset+d._nextUint64(),d._nextUint64()),uncompressedByteLength:d._nextUint64()});let u=new iL(e,s,n,!0);u._skip(4);let g=u._nextUint16(),p=u._nextUint16(),m=u._nextUint16(),f=u._nextUint16(),b={vendorId:g,descriptorType:p,versionNumber:m,colorModel:u._nextUint8(),colorPrimaries:u._nextUint8(),transferFunction:u._nextUint8(),flags:u._nextUint8(),texelBlockDimension:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],bytesPlane:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],samples:[]},I=(f/4-6)/4;for(let e=0;e<I;e++){let t={bitOffset:u._nextUint16(),bitLength:u._nextUint8(),channelType:u._nextUint8(),samplePosition:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],sampleLower:-1/0,sampleUpper:1/0};64&t.channelType?(t.sampleLower=u._nextInt32(),t.sampleUpper=u._nextInt32()):(t.sampleLower=u._nextUint32(),t.sampleUpper=u._nextUint32()),b.samples[e]=t}i.dataFormatDescriptor.length=0,i.dataFormatDescriptor.push(b);let C=new iL(e,o,l,!0);for(;C._offset<l;){let e=C._nextUint32(),t=C._scan(e),a=i_(t);if(i.keyValue[a]=C._nextUint8Array(e-t.byteLength-1),a.match(/^ktx/i)){let e=i_(i.keyValue[a]);i.keyValue[a]=e.substring(0,e.lastIndexOf("\0"))}C._skip(e%4?4-e%4:0)}if(h<=0)return i;let E=new iL(e,A,h,!0),y=E._nextUint16(),w=E._nextUint16(),B=E._nextUint32(),v=E._nextUint32(),x=E._nextUint32(),Q=E._nextUint32(),S=[];for(let e=0,t=Math.max(i.levelCount,1);e<t;e++)S.push({imageFlags:E._nextUint32(),rgbSliceByteOffset:E._nextUint32(),rgbSliceByteLength:E._nextUint32(),alphaSliceByteOffset:E._nextUint32(),alphaSliceByteLength:E._nextUint32()});let M=A+E._offset,R=M+B,D=R+v,T=D+x;return i.globalData={endpointCount:y,selectorCount:w,imageDescs:S,endpointsData:new Uint8Array(e.buffer,e.byteOffset+M,B),selectorsData:new Uint8Array(e.buffer,e.byteOffset+R,v),tablesData:new Uint8Array(e.buffer,e.byteOffset+D,x),extendedData:new Uint8Array(e.buffer,e.byteOffset+T,Q)},i}(new Uint8Array(e)),a=1000066e3===i.vkFormat&&167===i.dataFormatDescriptor[0].colorModel;if(!(0===i.vkFormat||a&&!this.workerConfig.astcHDRSupported))return i$(i);let r=this.init().then(()=>this.workerPool.postMessage({type:"transcode",buffer:e,taskConfig:t},[e])).then(e=>this._createTextureFrom(e.data,i));return iH.set(e,{promise:r}),r}dispose(){this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),ij--}}iz.BasisFormat={ETC1S:0,UASTC:1,UASTC_HDR:2},iz.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},iz.EngineFormat={RGBAFormat:1023,RGBA_ASTC_4x4_Format:37808,RGB_BPTC_UNSIGNED_Format:36495,RGBA_BPTC_Format:36492,RGBA_ETC2_EAC_Format:37496,RGBA_PVRTC_4BPPV1_Format:35842,RGBA_S3TC_DXT5_Format:33779,RGB_ETC1_Format:36196,RGB_ETC2_Format:37492,RGB_PVRTC_4BPPV1_Format:35840,RGBA_S3TC_DXT1_Format:33777},iz.EngineType={UnsignedByteType:1009,HalfFloatType:1016,FloatType:1015},iz.BasisWorker=function(){let e,t,i,a=_EngineFormat,r=_EngineType,s=_TranscoderFormat,n=_BasisFormat;self.addEventListener("message",function(a){let s=a.data;switch(s.type){case"init":var o;e=s.config,o=s.transcoderBinary,t=new Promise(e=>{BASIS(i={wasmBinary:o,onRuntimeInitialized:e})}).then(()=>{i.initializeBasis(),void 0===i.KTX2File&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")});break;case"transcode":t.then(()=>{try{let{faces:t,buffers:a,width:o,height:h,hasAlpha:c,format:d,type:u,dfdFlags:g}=function(t){let a,s=new i.KTX2File(new Uint8Array(t));function o(){s.close(),s.delete()}if(!s.isValid())throw o(),Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");if(s.isUASTC())a=n.UASTC;else if(s.isETC1S())a=n.ETC1S;else if(s.isHDR())a=n.UASTC_HDR;else throw Error("THREE.KTX2Loader: Unknown Basis encoding");let h=s.getWidth(),c=s.getHeight(),d=s.getLayers()||1,u=s.getLevels(),g=s.getFaces(),p=s.getHasAlpha(),m=s.getDFDFlags(),{transcoderFormat:f,engineFormat:b,engineType:I}=function(t,i,a,r){let s=l[t];for(let n=0;n<s.length;n++){let o=s[n];if(o.if&&!e[o.if]||!o.basisFormat.includes(t)||r&&o.transcoderFormat.length<2||o.needsPowerOfTwo&&!(A(i)&&A(a)))continue;let l=o.transcoderFormat[+!!r],h=o.engineFormat[+!!r];return{transcoderFormat:l,engineFormat:h,engineType:o.engineType[0]}}throw Error("THREE.KTX2Loader: Failed to identify transcoding target.")}(a,h,c,p);if(!h||!c||!u)throw o(),Error("THREE.KTX2Loader: Invalid texture");if(!s.startTranscoding())throw o(),Error("THREE.KTX2Loader: .startTranscoding failed");let C=[],E=[];for(let e=0;e<g;e++){let t=[];for(let i=0;i<u;i++){let a,n,l=[];for(let t=0;t<d;t++){let A=s.getImageLevelInfo(i,t,e);0===e&&0===i&&0===t&&(A.origWidth%4!=0||A.origHeight%4!=0)&&console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."),u>1?(a=A.origWidth,n=A.origHeight):(a=A.width,n=A.height);let h=new Uint8Array(s.getImageTranscodedSizeInBytes(i,t,0,f)),c=s.transcodeImage(h,i,t,e,f,0,-1,-1);if(I===r.HalfFloatType&&(h=new Uint16Array(h.buffer,h.byteOffset,h.byteLength/Uint16Array.BYTES_PER_ELEMENT)),!c)throw o(),Error("THREE.KTX2Loader: .transcodeImage failed.");l.push(h)}let A=function(e){if(1===e.length)return e[0];let t=0;for(let i=0;i<e.length;i++)t+=e[i].byteLength;let i=new Uint8Array(t),a=0;for(let t=0;t<e.length;t++){let r=e[t];i.set(r,a),a+=r.byteLength}return i}(l);t.push({data:A,width:a,height:n}),E.push(A.buffer)}C.push({mipmaps:t,width:h,height:c,format:b,type:I})}return o(),{faces:C,buffers:E,width:h,height:c,hasAlpha:p,dfdFlags:m,format:b,type:I}}(s.buffer);self.postMessage({type:"transcode",id:s.id,data:{faces:t,width:o,height:h,hasAlpha:c,format:d,type:u,dfdFlags:g}},a)}catch(e){console.error(e),self.postMessage({type:"error",id:s.id,error:e.message})}})}});let o=[{if:"astcSupported",basisFormat:[n.UASTC],transcoderFormat:[s.ASTC_4x4,s.ASTC_4x4],engineFormat:[a.RGBA_ASTC_4x4_Format,a.RGBA_ASTC_4x4_Format],engineType:[r.UnsignedByteType],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[n.ETC1S,n.UASTC],transcoderFormat:[s.BC7_M5,s.BC7_M5],engineFormat:[a.RGBA_BPTC_Format,a.RGBA_BPTC_Format],engineType:[r.UnsignedByteType],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[n.ETC1S,n.UASTC],transcoderFormat:[s.BC1,s.BC3],engineFormat:[a.RGBA_S3TC_DXT1_Format,a.RGBA_S3TC_DXT5_Format],engineType:[r.UnsignedByteType],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[n.ETC1S,n.UASTC],transcoderFormat:[s.ETC1,s.ETC2],engineFormat:[a.RGB_ETC2_Format,a.RGBA_ETC2_EAC_Format],engineType:[r.UnsignedByteType],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[n.ETC1S,n.UASTC],transcoderFormat:[s.ETC1],engineFormat:[a.RGB_ETC1_Format],engineType:[r.UnsignedByteType],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[n.ETC1S,n.UASTC],transcoderFormat:[s.PVRTC1_4_RGB,s.PVRTC1_4_RGBA],engineFormat:[a.RGB_PVRTC_4BPPV1_Format,a.RGBA_PVRTC_4BPPV1_Format],engineType:[r.UnsignedByteType],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0},{if:"bptcSupported",basisFormat:[n.UASTC_HDR],transcoderFormat:[s.BC6H],engineFormat:[a.RGB_BPTC_UNSIGNED_Format],engineType:[r.HalfFloatType],priorityHDR:1,needsPowerOfTwo:!1},{basisFormat:[n.ETC1S,n.UASTC],transcoderFormat:[s.RGBA32,s.RGBA32],engineFormat:[a.RGBAFormat,a.RGBAFormat],engineType:[r.UnsignedByteType,r.UnsignedByteType],priorityETC1S:100,priorityUASTC:100,needsPowerOfTwo:!1},{basisFormat:[n.UASTC_HDR],transcoderFormat:[s.RGBA_HALF],engineFormat:[a.RGBAFormat],engineType:[r.HalfFloatType],priorityHDR:100,needsPowerOfTwo:!1}],l={[n.ETC1S]:o.filter(e=>e.basisFormat.includes(n.ETC1S)).sort((e,t)=>e.priorityETC1S-t.priorityETC1S),[n.UASTC]:o.filter(e=>e.basisFormat.includes(n.UASTC)).sort((e,t)=>e.priorityUASTC-t.priorityUASTC),[n.UASTC_HDR]:o.filter(e=>e.basisFormat.includes(n.UASTC_HDR)).sort((e,t)=>e.priorityHDR-t.priorityHDR)};function A(e){return e<=2||(e&e-1)==0&&0!==e}};let iK=new Set([1023,1022,1030,1028]),iJ=new Set([91]),iV={109:1023,103:1030,100:1028,97:1023,83:1030,76:1028,91:1023,43:1023,37:1023,22:1030,16:1030,15:1028,9:1028,123:1022,122:1022,152:37496,148:37492,153:37488,154:37489,155:37490,156:37491,1000066e3:37808,158:37808,157:37808,0x3b9bcbd4:37812,166:37812,165:37812,134:33777,133:33777,132:33776,131:33776,138:33779,137:33779,140:36284,139:36283,142:36286,141:36285,146:36492,145:36492,0x3b9b9cf5:35842,0x3b9b9cf1:35842,0x3b9b9cf4:35843,1000054e3:35843},iY={109:1015,103:1015,100:1015,97:1016,83:1016,76:1016,91:1012,43:1009,37:1009,22:1009,16:1009,15:1009,9:1009,123:35902,122:35899,152:1009,148:1009,153:1009,154:1009,155:1009,156:1009,1000066e3:1016,158:1009,157:1009,0x3b9bcbd4:1016,166:1009,165:1009,134:1009,133:1009,132:1009,131:1009,138:1009,137:1009,140:1009,139:1009,142:1009,141:1009,146:1009,145:1009,0x3b9b9cf5:1009,0x3b9b9cf1:1009,0x3b9b9cf4:1009,1000054e3:1009};async function i$(e){let t,i,{vkFormat:a}=e;if(void 0===iV[a])throw Error("THREE.KTX2Loader: Unsupported vkFormat: "+a);void 0===iY[a]&&console.warn('THREE.KTX2Loader: Missing ".type" for vkFormat: '+a),2===e.supercompressionScheme&&(n||(n=new Promise(async e=>{let t=new iG;await t.init(),e(t)})),t=await n);let r=[];for(let i=0;i<e.levels.length;i++){let s,n,o=Math.max(1,e.pixelWidth>>i),l=Math.max(1,e.pixelHeight>>i),A=e.pixelDepth?Math.max(1,e.pixelDepth>>i):0,h=e.levels[i];if(0===e.supercompressionScheme)s=h.levelData;else if(2===e.supercompressionScheme)s=t.decode(h.levelData,h.uncompressedByteLength);else throw Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");n=1015===iY[a]?new Float32Array(s.buffer,s.byteOffset,s.byteLength/Float32Array.BYTES_PER_ELEMENT):1016===iY[a]||1012===iY[a]?new Uint16Array(s.buffer,s.byteOffset,s.byteLength/Uint16Array.BYTES_PER_ELEMENT):35902===iY[a]||35899===iY[a]?new Uint32Array(s.buffer,s.byteOffset,s.byteLength/Uint32Array.BYTES_PER_ELEMENT):s,r.push({data:n,width:o,height:l,depth:A})}let s=0===e.levelCount||r.length>1;if(iK.has(iV[a]))(i=0===e.pixelDepth?new tO.GYF(r[0].data,e.pixelWidth,e.pixelHeight):new tO.dYF(r[0].data,e.pixelWidth,e.pixelHeight,e.pixelDepth)).minFilter=s?1004:1003,i.magFilter=1003,i.generateMipmaps=0===e.levelCount,i.normalized=iJ.has(a);else{if(e.pixelDepth>0)throw Error("THREE.KTX2Loader: Unsupported pixelDepth.");(i=new tO.FvD(r,e.pixelWidth,e.pixelHeight)).minFilter=s?1008:1006,i.magFilter=1006}return i.mipmaps=r,i.type=iY[a],i.format=iV[a],i.colorSpace=iW(e),i.needsUpdate=!0,Promise.resolve(i)}function iW(e){let t=e.dataFormatDescriptor[0];return 1===t.colorPrimaries?2===t.transferFunction?"srgb":tO.Zr2:10===t.colorPrimaries?2===t.transferFunction?"display-p3":"display-p3-linear":(0===t.colorPrimaries||console.warn(`THREE.KTX2Loader: Unsupported color primaries, "${t.colorPrimaries}"`),"")}let iX=Symbol("retainerCount"),iZ=Symbol("recentlyUsed"),i0=Symbol("evict"),i1=Symbol("evictionThreshold"),i2=Symbol("cache");class i8{constructor(e,t=5){this[e9]=new Map,this[e3]=[],this[i2]=e,this[i1]=t}set evictionThreshold(e){this[i1]=e,this[i0]()}get evictionThreshold(){return this[i1]}get cache(){return this[i2]}retainerCount(e){return this[iX].get(e)||0}reset(){this[iX].clear(),this[iZ]=[]}retain(e){this[iX].has(e)||this[iX].set(e,0),this[iX].set(e,this[iX].get(e)+1);let t=this[iZ].indexOf(e);-1!==t&&this[iZ].splice(t,1),this[iZ].unshift(e),this[i0]()}release(e){this[iX].has(e)&&this[iX].set(e,Math.max(this[iX].get(e)-1,0)),this[i0]()}[(e9=iX,e3=iZ,i0)](){if(!(this[iZ].length<this[i1]))for(let e=this[iZ].length-1;e>=this[i1];--e){let t=this[iZ][e];0===this[iX].get(t)&&(this[i2].delete(t),this[iZ].splice(e,1))}}}let i9=e=>{let t=new Map;for(let i of e.mappings)for(let e of i.variants)t.set(e,{material:null,gltfMaterialIndex:i.material});return t};class i3{constructor(e){this.parser=e,this.name="KHR_materials_variants"}afterRoot(e){let t=this.parser,i=t.json;if(void 0===i.extensions||void 0===i.extensions[this.name])return null;let a=(e=>{let t=[],i=new Set;for(let a of e){let e=a,r=0;for(;i.has(e);)e=a+"."+ ++r;i.add(e),t.push(e)}return t})((i.extensions[this.name].variants||[]).map(e=>e.name));for(let a of e.scenes)a.traverse(e=>{if(!e.material)return;let a=t.associations.get(e);if(null==a||null==a.meshes||null==a.primitives)return;let r=i.meshes[a.meshes].primitives[a.primitives].extensions;r&&r[this.name]&&(e.userData.variantMaterials=i9(r[this.name]))});return e.userData.variants=a,Promise.resolve()}}tO.gPd.DEFAULT_ANISOTROPY=4;let i5=new Map,i4=new Map,i6=new tJ,i7=new iz,ae=Symbol("loader"),at=Symbol("evictionPolicy"),ai=Symbol("GLTFInstance");class aa extends tO.Qev{static setDRACODecoderLocation(e){o=e,i6.setDecoderPath(e)}static getDRACODecoderLocation(){return o}static setKTX2TranscoderLocation(e){l=e,i7.setTranscoderPath(e)}static getKTX2TranscoderLocation(){return l}static setMeshoptDecoderLocation(e){A!==e&&(A=e,h=new Promise((t,i)=>{let a=document.createElement("script");document.body.appendChild(a),a.onload=t,a.onerror=i,a.async=!0,a.src=e}).then(()=>tq.ready).then(()=>tq))}static getMeshoptDecoderLocation(){return A}static initializeKTX2Loader(e){i7.detectSupport(e)}static get cache(){return i5}static clearCache(){i5.forEach((e,t)=>{this.delete(t)}),this[at].reset()}static has(e){return i5.has(e)}static async delete(e){if(!this.has(e))return;let t=i5.get(e);i4.delete(e),i5.delete(e),(await t).dispose()}static hasFinishedLoading(e){return!!i4.get(e)}constructor(e){super(),this[e4]=new tW().register(e=>new i3(e)),this[ai]=e,this[ae].setDRACOLoader(i6),this[ae].setKTX2Loader(i7)}get[(e5=at,e4=ae,at)](){return this.constructor[at]}async preload(e,t,i=()=>{}){if(this[ae].setWithCredentials(t.withCredentials),this.dispatchEvent({type:"preload",element:t,src:e}),!i5.has(e)){null!=h&&this[ae].setMeshoptDecoder(await h);let t=((e,t,i=()=>{})=>{let a=e=>{let t=e.loaded/e.total;i(Math.max(0,Math.min(1,isFinite(t)?t:1)))};return new Promise((i,r)=>{t.load(e,i,a,r)})})(e,this[ae],e=>{i(.8*e)}),a=this[ai],r=t.then(e=>a.prepare(e)).then(e=>(i(.9),new a(e))).catch(e=>(console.error(e),new a));i5.set(e,r)}await i5.get(e),i4.set(e,!0),i&&i(1)}async load(e,t,i=()=>{}){await this.preload(e,t,i);let a=await i5.get(e),r=await a.clone();return this[at].retain(e),r.dispose=()=>{this[at].release(e)},r}}aa[e5]=new i8(aa);class ar extends tO.B69{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 tO.I9Y(.5,.5),this.addEventListener("removed",function(){this.traverse(function(e){e.element&&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}}let as=new tO.Pq0,an=new tO.kn4,ao=new tO.kn4,al=new tO.Pq0,aA=new tO.Pq0;class ah{constructor(e={}){let t,i,a,r;const s=this,n={objects:new WeakMap},o=void 0!==e.element?e.element:document.createElement("div");o.style.overflow="hidden",this.domElement=o,this.sortObjects=!0,this.getSize=function(){return{width:t,height:i}},this.render=function(e,t){!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),an.copy(t.matrixWorldInverse),ao.multiplyMatrices(t.projectionMatrix,an),function e(t,i,l){if(!1===t.visible)return void function e(t){t.isCSS2DObject&&(t.element.style.display="none");for(let i=0,a=t.children.length;i<a;i++)e(t.children[i])}(t);if(t.isCSS2DObject){var A,h;as.setFromMatrixPosition(t.matrixWorld),as.applyMatrix4(ao);let e=as.z>=-1&&as.z<=1&&!0===t.layers.test(l.layers),c=t.element;c.style.display=!0===e?"":"none",!0===e&&(t.onBeforeRender(s,i,l),c.style.transform="translate("+-100*t.center.x+"%,"+-100*t.center.y+"%)translate("+(as.x*a+a)+"px,"+(-as.y*r+r)+"px)",c.parentNode!==o&&o.appendChild(c),t.onAfterRender(s,i,l));let d={distanceToCameraSquared:(A=l,h=t,al.setFromMatrixPosition(A.matrixWorld),aA.setFromMatrixPosition(h.matrixWorld),al.distanceToSquared(aA))};n.objects.set(t,d)}for(let a=0,r=t.children.length;a<r;a++)e(t.children[a],i,l)}(e,e,t),this.sortObjects&&function(e){let t,i=(t=[],e.traverseVisible(function(e){e.isCSS2DObject&&t.push(e)}),t).sort(function(e,t){return e.renderOrder!==t.renderOrder?t.renderOrder-e.renderOrder:n.objects.get(e).distanceToCameraSquared-n.objects.get(t).distanceToCameraSquared}),a=i.length;for(let e=0,t=i.length;e<t;e++)i[e].element.style.zIndex=a-e}(e)},this.setSize=function(e,s){t=e,i=s,a=t/2,r=i/2,o.style.width=e+"px",o.style.height=s+"px"}}}function ac(e,t,i){let a=i,r=new tO.Pq0;return e.updateWorldMatrix(!0,!0),e.traverseVisible(e=>{let{geometry:i}=e;if(void 0!==i){let{position:s}=i.attributes;if(void 0!==s)for(let i=0,n=s.count;i<n;i++)e.isMesh?e.getVertexPosition(i,r):r.fromBufferAttribute(s,i),e.isSkinnedMesh||r.applyMatrix4(e.matrixWorld),a=t(a,r)}}),a}let ad={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 au{constructor(){this.textureUtils=null,this.pluginCallbacks=[],this.register(function(e){return new aw(e)}),this.register(function(e){return new aB(e)}),this.register(function(e){return new aS(e)}),this.register(function(e){return new aM(e)}),this.register(function(e){return new aR(e)}),this.register(function(e){return new aD(e)}),this.register(function(e){return new av(e)}),this.register(function(e){return new ax(e)}),this.register(function(e){return new aQ(e)}),this.register(function(e){return new aT(e)}),this.register(function(e){return new ak(e)}),this.register(function(e){return new aF(e)}),this.register(function(e){return new aL(e)}),this.register(function(e){return new aP(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,a){let r=new ay,s=[];for(let e=0,t=this.pluginCallbacks.length;e<t;e++)s.push(this.pluginCallbacks[e](r));r.setPlugins(s),r.setTextureUtils(this.textureUtils),r.writeAsync(e,t,a).catch(i)}parseAsync(e,t){let i=this;return new Promise(function(a,r){i.parse(e,a,r,t)})}}let ag="KHR_mesh_quantization",ap={};ap[1003]=9728,ap[1004]=9984,ap[1005]=9986,ap[1006]=9729,ap[1007]=9985,ap[1008]=9987,ap[1001]=33071,ap[1e3]=10497,ap[1002]=33648;let am={scale:"scale",position:"translation",quaternion:"rotation",morphTargetInfluences:"weights"},af=new tO.Q1f;function ab(e,t){return e.length===t.length&&e.every(function(e,i){return e===t[i]})}function aI(e){return 4*Math.ceil(e/4)}function aC(e,t=0){let i=aI(e.byteLength);if(i!==e.byteLength){let a=new Uint8Array(i);if(a.set(new Uint8Array(e)),0!==t)for(let r=e.byteLength;r<i;r++)a[r]=t;return a.buffer}return e}function aE(){return"u"<typeof document&&"u">typeof OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas")}class ay{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 r185"}},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);let a=this.buffers,r=this.json;i=this.options;let s=this.extensionsUsed,n=this.extensionsRequired,o=new Blob(a,{type:"application/octet-stream"}),l=Object.keys(s),A=Object.keys(n);if(l.length>0&&(r.extensionsUsed=l),A.length>0&&(r.extensionsRequired=A),r.buffers&&r.buffers.length>0&&(r.buffers[0].byteLength=o.size),!0===i.binary){let e=new FileReader;e.readAsArrayBuffer(o),e.onloadend=function(){var i;let a=aC(e.result),s=new DataView(new ArrayBuffer(8));s.setUint32(0,a.byteLength,!0),s.setUint32(4,5130562,!0);let n=aC((i=JSON.stringify(r),new TextEncoder().encode(i).buffer),32),o=new DataView(new ArrayBuffer(8));o.setUint32(0,n.byteLength,!0),o.setUint32(4,0x4e4f534a,!0);let l=new ArrayBuffer(12),A=new DataView(l);A.setUint32(0,0x46546c67,!0),A.setUint32(4,2,!0);let h=12+o.byteLength+n.byteLength+s.byteLength+a.byteLength;A.setUint32(8,h,!0);let c=new Blob([l,o,n,s,a],{type:"application/octet-stream"}),d=new FileReader;d.readAsArrayBuffer(c),d.onloadend=function(){t(d.result)}}}else if(r.buffers&&r.buffers.length>0){let e=new FileReader;e.readAsDataURL(o),e.onloadend=function(){let i=e.result;r.buffers[0].uri=i,t(r)}}else t(r)}serializeUserData(e,t){if(0===Object.keys(e.userData).length)return;let i=this.options,a=this.extensionsUsed;try{let r=JSON.parse(JSON.stringify(e.userData));if(i.includeCustomExtensions&&r.gltfExtensions){for(let e in void 0===t.extensions&&(t.extensions={}),r.gltfExtensions)t.extensions[e]=r.gltfExtensions[e],a[e]=!0;delete r.gltfExtensions}Object.keys(r).length>0&&(t.extras=r)}catch(t){console.warn("THREE.GLTFExporter: userData of '"+e.name+"' won't be serialized because of JSON.stringify error - "+t.message)}}getUID(e,t=!1){if(!1===this.uids.has(e)){let 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;let t=new tO.Pq0;for(let i=0,a=e.count;i<a;i++)if(Math.abs(t.fromBufferAttribute(e,i).length()-1)>5e-4)return!1;return!0}createNormalizedNormalAttribute(e){let t=this.cache;if(t.attributesNormalized.has(e))return t.attributesNormalized.get(e);let i=e.clone(),a=new tO.Pq0;for(let e=0,t=i.count;e<t;e++)a.fromBufferAttribute(i,e),0===a.x&&0===a.y&&0===a.z?a.setX(1):a.normalize(),i.setXYZ(e,a.x,a.y,a.z);return t.attributesNormalized.set(e,i),i}applyTextureTransform(e,t){let i=!1,a={};(0!==t.offset.x||0!==t.offset.y)&&(a.offset=t.offset.toArray(),i=!0),0!==t.rotation&&(a.rotation=t.rotation,i=!0),(1!==t.repeat.x||1!==t.repeat.y)&&(a.scale=t.repeat.toArray(),i=!0),i&&(e.extensions=e.extensions||{},e.extensions.KHR_texture_transform=a,this.extensionsUsed.KHR_texture_transform=!0)}async buildMetalRoughTextureAsync(e,t){if(e===t)return e;function i(e){return"srgb"===e.colorSpace?function(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}:function(e){return e}}e instanceof tO.FvD&&(e=await this.decompressTextureAsync(e)),t instanceof tO.FvD&&(t=await this.decompressTextureAsync(t));let a=e?e.image:null,r=t?t.image:null,s=Math.max(a?a.width:0,r?r.width:0),n=Math.max(a?a.height:0,r?r.height:0),o=aE();o.width=s,o.height=n;let l=o.getContext("2d",{willReadFrequently:!0});l.fillStyle="#00ffff",l.fillRect(0,0,s,n);let A=l.getImageData(0,0,s,n);if(a){l.drawImage(a,0,0,s,n);let t=i(e),r=l.getImageData(0,0,s,n).data;for(let e=2;e<r.length;e+=4)A.data[e]=256*t(r[e]/256)}if(r){l.drawImage(r,0,0,s,n);let e=i(t),a=l.getImageData(0,0,s,n).data;for(let t=1;t<a.length;t+=4)A.data[t]=256*e(a[t]/256)}l.putImageData(A,0,0);let h=(e||t).clone();return h.source=new tO.kLi(o),h.colorSpace="",h.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."),h}async buildNormalMapTextureAsync(e,t,i){e instanceof tO.FvD&&(e=await this.decompressTextureAsync(e));let a=e.image,r=aE();r.width=a.width,r.height=a.height;let s=r.getContext("2d",{willReadFrequently:!0});s.drawImage(a,0,0,r.width,r.height);let n=s.getImageData(0,0,r.width,r.height),o=n.data;for(let e=0;e<o.length;e+=4)t&&(o[e+0]=255-o[e+0]),i&&(o[e+1]=255-o[e+1]);s.putImageData(n,0,0);let l=e.clone();return l.source=new tO.kLi(r),l}async decompressTextureAsync(e,t=1/0){if(null===this.textureUtils)throw Error("THREE.GLTFExporter: setTextureUtils() must be called to process compressed textures.");return await this.textureUtils.decompress(e,t)}processBuffer(e){let t=this.json,i=this.buffers;return t.buffers||(t.buffers=[{byteLength:0}]),i.push(e),0}processBufferView(e,t,i,a,r){let s,n=this.json;switch(!n.bufferViews&&(n.bufferViews=[]),t){case 5120:case 5121:s=1;break;case 5122:case 5123:s=2;break;default:s=4}let o=e.itemSize*s;34962===r&&(o=4*Math.ceil(o/4));let l=aI(a*o),A=new DataView(new ArrayBuffer(l)),h=0;for(let r=i;r<i+a;r++){for(let i=0;i<e.itemSize;i++){let a;e.itemSize>4?a=e.array[r*e.itemSize+i]:(0===i?a=e.getX(r):1===i?a=e.getY(r):2===i?a=e.getZ(r):3===i&&(a=e.getW(r)),!0===e.normalized&&(a=tO.cj9.normalize(a,e.array))),5126===t?A.setFloat32(h,a,!0):5124===t?A.setInt32(h,a,!0):5125===t?A.setUint32(h,a,!0):5122===t?A.setInt16(h,a,!0):5123===t?A.setUint16(h,a,!0):5120===t?A.setInt8(h,a):5121===t&&A.setUint8(h,a),h+=s}h%o!=0&&(h+=o-h%o)}let c={buffer:this.processBuffer(A.buffer),byteOffset:this.byteOffset,byteLength:l};return void 0!==r&&(c.target=r),34962===r&&(c.byteStride=o),this.byteOffset+=l,n.bufferViews.push(c),{id:n.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){let t=this,i=t.json;return i.bufferViews||(i.bufferViews=[]),new Promise(function(a){let r=new FileReader;r.readAsArrayBuffer(e),r.onloadend=function(){let e=aC(r.result),s={buffer:t.processBuffer(e),byteOffset:t.byteOffset,byteLength:e.byteLength};t.byteOffset+=e.byteLength,a(i.bufferViews.push(s)-1)}})}processAccessor(e,t,i,a){let r,s,n=this.json;if(e.array.constructor===Float32Array)r=5126;else if(e.array.constructor===Int32Array)r=5124;else if(e.array.constructor===Uint32Array)r=5125;else if(e.array.constructor===Int16Array)r=5122;else if(e.array.constructor===Uint16Array)r=5123;else if(e.array.constructor===Int8Array)r=5120;else if(e.array.constructor===Uint8Array)r=5121;else throw Error("THREE.GLTFExporter: Unsupported bufferAttribute component type: "+e.array.constructor.name);if(void 0===i&&(i=0),(void 0===a||a===1/0)&&(a=e.count),0===a)return null;let o=function(e,t,i){let a={min:Array(e.itemSize).fill(1/0),max:Array(e.itemSize).fill(-1/0)};for(let r=t;r<t+i;r++)for(let t=0;t<e.itemSize;t++){let i;e.itemSize>4?i=e.array[r*e.itemSize+t]:(0===t?i=e.getX(r):1===t?i=e.getY(r):2===t?i=e.getZ(r):3===t&&(i=e.getW(r)),!0===e.normalized&&(i=tO.cj9.normalize(i,e.array))),a.min[t]=Math.min(a.min[t],i),a.max[t]=Math.max(a.max[t],i)}return a}(e,i,a);void 0!==t&&(s=e===t.index?34963:34962);let l=this.processBufferView(e,r,i,a,s),A={bufferView:l.id,byteOffset:l.byteOffset,componentType:r,count:a,max:o.max,min:o.min,type:{1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"}[e.itemSize]};return!0===e.normalized&&(A.normalized=!0),n.accessors||(n.accessors=[]),n.accessors.push(A)-1}processImage(e,t,i,a="image/png"){if(null!==e){let r=this,s=r.cache,n=r.json,o=r.options,l=r.pending;s.images.has(e)||s.images.set(e,{});let A=s.images.get(e),h=a+":flipY/"+i.toString();if(void 0!==A[h])return A[h];n.images||(n.images=[]);let c={mimeType:a},d=aE();d.width=Math.min(e.width,o.maxTextureSize),d.height=Math.min(e.height,o.maxTextureSize);let u=d.getContext("2d",{willReadFrequently:!0});if(!0===i&&(u.translate(0,d.height),u.scale(1,-1)),void 0!==e.data){1023!==t&&console.error("GLTFExporter: Only RGBAFormat is supported.",t),(e.width>o.maxTextureSize||e.height>o.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",e);let 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];u.putImageData(new ImageData(i,e.width,e.height),0,0)}else if("u">typeof HTMLImageElement&&e instanceof HTMLImageElement||"u">typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"u">typeof ImageBitmap&&e instanceof ImageBitmap||"u">typeof OffscreenCanvas&&e instanceof OffscreenCanvas)u.drawImage(e,0,0,d.width,d.height);else throw Error("THREE.GLTFExporter: Invalid image type. Use HTMLImageElement, HTMLCanvasElement, ImageBitmap or OffscreenCanvas.");!0===o.binary?l.push((function(e,t){if(!("u">typeof OffscreenCanvas&&e instanceof OffscreenCanvas))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})}})(d,a).then(e=>r.processBufferViewImage(e)).then(e=>{c.bufferView=e})):c.uri=tO.HgN.getDataURL(d,a);let g=n.images.push(c)-1;return A[h]=g,g}throw Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(e){let t=this.json;t.samplers||(t.samplers=[]);let i={magFilter:ap[e.magFilter],minFilter:ap[e.minFilter],wrapS:ap[e.wrapS],wrapT:ap[e.wrapT]};return t.samplers.push(i)-1}async processTextureAsync(e){let t=this.options,i=this.cache,a=this.json;if(i.textures.has(e))return i.textures.get(e);a.textures||(a.textures=[]),e instanceof tO.FvD&&(e=await this.decompressTextureAsync(e,t.maxTextureSize));let r=e.userData.mimeType,s=this.processImage(e.image,e.format,e.flipY,r),n={sampler:this.processSampler(e)};"image/webp"===r?(n.extensions=n.extensions||{},n.extensions.EXT_texture_webp={source:s},this.extensionsUsed.EXT_texture_webp=!0,this.extensionsRequired.EXT_texture_webp=!0):n.source=s,e.name&&(n.name=e.name),await this._invokeAllAsync(async function(t){t.writeTexture&&await t.writeTexture(e,n)});let o=a.textures.push(n)-1;return i.textures.set(e,o),o}async processMaterialAsync(e,t){let i=this.cache,a=this.json,r=void 0!==t&&t.hasAttribute("tangent"),s=e.normalMap?e.uuid+":"+r:e.uuid;if(i.materials.has(s))return i.materials.get(s);if(e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;a.materials||(a.materials=[]);let n={pbrMetallicRoughness:{}};!0!==e.isMeshStandardMaterial&&!0!==e.isMeshBasicMaterial&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");let o=e.color.toArray().concat([e.opacity]);if(ab(o,[1,1,1,1])||(n.pbrMetallicRoughness.baseColorFactor=o),e.isMeshStandardMaterial?(n.pbrMetallicRoughness.metallicFactor=e.metalness,n.pbrMetallicRoughness.roughnessFactor=e.roughness):(n.pbrMetallicRoughness.metallicFactor=0,n.pbrMetallicRoughness.roughnessFactor=1),e.metalnessMap||e.roughnessMap){let t=await this.buildMetalRoughTextureAsync(e.metalnessMap,e.roughnessMap),i={index:await this.processTextureAsync(t),texCoord:t.channel};this.applyTextureTransform(i,t),n.pbrMetallicRoughness.metallicRoughnessTexture=i}if(e.map){let t={index:await this.processTextureAsync(e.map),texCoord:e.map.channel};this.applyTextureTransform(t,e.map),n.pbrMetallicRoughness.baseColorTexture=t}if(e.emissive){let t=e.emissive;if(Math.max(t.r,t.g,t.b)>0&&(n.emissiveFactor=e.emissive.toArray()),e.emissiveMap){let t={index:await this.processTextureAsync(e.emissiveMap),texCoord:e.emissiveMap.channel};this.applyTextureTransform(t,e.emissiveMap),n.emissiveTexture=t}}if(e.normalMap){let t=e.normalScale,i=t.x<0,a=r?t.y<0:t.y>0,s=e.normalMap;(i||a)&&(s=await this.buildNormalMapTextureAsync(e.normalMap,i,a));let o={index:await this.processTextureAsync(s),texCoord:e.normalMap.channel};1!==Math.abs(t.x)&&(o.scale=Math.abs(t.x)),this.applyTextureTransform(o,e.normalMap),n.normalTexture=o}if(e.aoMap){let t={index:await this.processTextureAsync(e.aoMap),texCoord:e.aoMap.channel};1!==e.aoMapIntensity&&(t.strength=e.aoMapIntensity),this.applyTextureTransform(t,e.aoMap),n.occlusionTexture=t}e.transparent?n.alphaMode="BLEND":e.alphaTest>0&&(n.alphaMode="MASK",n.alphaCutoff=e.alphaTest),2===e.side&&(n.doubleSided=!0),""!==e.name&&(n.name=e.name),this.serializeUserData(e,n),await this._invokeAllAsync(async function(t){t.writeMaterialAsync&&await t.writeMaterialAsync(e,n)});let l=a.materials.push(n)-1;return i.materials.set(s,l),l}async processMeshAsync(e){let t,i=this.cache,a=this.json,r=[e.geometry.uuid];if(Array.isArray(e.material))for(let t=0,i=e.material.length;t<i;t++)r.push(e.material[t].uuid);else r.push(e.material.uuid);let s=r.join(":");if(i.meshes.has(s))return i.meshes.get(s);let n=e.geometry;t=e.isLineSegments?1:e.isLineLoop?2:e.isLine?3:e.isPoints?0:e.material.wireframe?1:4;let o={},l={},A=[],h=[],c={uv:"TEXCOORD_0",uv1:"TEXCOORD_1",uv2:"TEXCOORD_2",uv3:"TEXCOORD_3",color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},d=n.getAttribute("normal");void 0===d||this.isNormalizedNormalAttribute(d)||(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),n.setAttribute("normal",this.createNormalizedNormalAttribute(d)));let u=null;for(let e in n.attributes){if("morph"===e.slice(0,5))continue;let t=n.attributes[e];if(e=c[e]||e.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(e)||e.startsWith("_")||(e="_"+e),i.attributes.has(this.getUID(t))){l[e]=i.attributes.get(this.getUID(t));continue}u=null;let a=t.array;"JOINTS_0"!==e||a instanceof Uint16Array||a instanceof Uint8Array?(a instanceof Uint32Array||a instanceof Int32Array)&&!e.startsWith("_")&&(console.warn(`GLTFExporter: Attribute "${e}" converted to type FLOAT.`),u=au.Utils.toTypedBufferAttribute(t,Float32Array)):(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),u=au.Utils.toTypedBufferAttribute(t,Uint16Array));let r=this.processAccessor(u||t,n);null!==r&&(e.startsWith("_")||this.detectMeshQuantization(e,t),l[e]=r,i.attributes.set(this.getUID(t),r))}if(void 0!==d&&n.setAttribute("normal",d),0===Object.keys(l).length)return null;if(void 0!==e.morphTargetInfluences&&e.morphTargetInfluences.length>0){let t=[],a=[],r={};if(void 0!==e.morphTargetDictionary)for(let t in e.morphTargetDictionary)r[e.morphTargetDictionary[t]]=t;for(let s=0;s<e.morphTargetInfluences.length;++s){let o={},l=!1;for(let e in n.morphAttributes){if("position"!==e&&"normal"!==e){l||(console.warn("GLTFExporter: Only POSITION and NORMAL morph are supported."),l=!0);continue}let t=n.morphAttributes[e][s],a=e.toUpperCase(),r=n.attributes[e];if(i.attributes.has(this.getUID(t,!0))){o[a]=i.attributes.get(this.getUID(t,!0));continue}let A=t.clone();if(!n.morphTargetsRelative)for(let e=0,i=t.count;e<i;e++)for(let i=0;i<t.itemSize;i++)0===i&&A.setX(e,t.getX(e)-r.getX(e)),1===i&&A.setY(e,t.getY(e)-r.getY(e)),2===i&&A.setZ(e,t.getZ(e)-r.getZ(e)),3===i&&A.setW(e,t.getW(e)-r.getW(e));o[a]=this.processAccessor(A,n),i.attributes.set(this.getUID(r,!0),o[a])}h.push(o),t.push(e.morphTargetInfluences[s]),void 0!==e.morphTargetDictionary&&a.push(r[s])}o.weights=t,a.length>0&&(o.extras={},o.extras.targetNames=a)}let g=Array.isArray(e.material);if(g&&0===n.groups.length)return null;let p=!1;if(g&&null===n.index){let e=[];for(let t=0,i=n.attributes.position.count;t<i;t++)e[t]=t;n.setIndex(e),p=!0}let m=g?e.material:[e.material],f=g?n.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let e=0,a=f.length;e<a;e++){let a={mode:t,attributes:l};if(this.serializeUserData(n,a),h.length>0&&(a.targets=h),null!==n.index){let t=this.getUID(n.index);(void 0!==f[e].start||void 0!==f[e].count)&&(t+=":"+f[e].start+":"+f[e].count),i.attributes.has(t)?a.indices=i.attributes.get(t):(a.indices=this.processAccessor(n.index,n,f[e].start,f[e].count),i.attributes.set(t,a.indices)),null===a.indices&&delete a.indices}let r=await this.processMaterialAsync(m[f[e].materialIndex],n);null!==r&&(a.material=r),A.push(a)}!0===p&&n.setIndex(null),o.primitives=A,a.meshes||(a.meshes=[]),await this._invokeAllAsync(function(t){t.writeMesh&&t.writeMesh(e,o)});let b=a.meshes.push(o)-1;return i.meshes.set(s,b),b}detectMeshQuantization(e,t){let i;if(this.extensionsUsed[ag])return;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");let a=e.split("_",1)[0];ad[a]&&ad[a].includes(i)&&(this.extensionsUsed[ag]=!0,this.extensionsRequired[ag]=!0)}processCamera(e){let t=this.json;t.cameras||(t.cameras=[]);let i=e.isOrthographicCamera,a={type:i?"orthographic":"perspective"};return i?a.orthographic={xmag:2*e.right,ymag:2*e.top,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:a.perspective={aspectRatio:e.aspect,yfov:tO.cj9.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},""!==e.name&&(a.name=e.type),t.cameras.push(a)-1}processAnimation(e,t){let i=this.json,a=this.nodeMap;i.animations||(i.animations=[]);let r=(e=au.Utils.mergeMorphTargetTracks(e.clone(),t)).tracks,s=[],n=[];for(let e=0;e<r.length;++e){let i,o=r[e],l=tO.Nwf.parseTrackName(o.name),A=tO.Nwf.findNode(t,l.nodeName),h=am[l.propertyName];if("bones"===l.objectName&&(A=!0===A.isSkinnedMesh?A.skeleton.getBoneByName(l.objectIndex):void 0),!A||!h){console.warn('THREE.GLTFExporter: Could not export animation track "%s".',o.name);continue}let c=o.values.length/o.times.length;h===am.morphTargetInfluences&&(c/=A.morphTargetInfluences.length),!0===o.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline?(i="CUBICSPLINE",c/=3):i=2300===o.getInterpolation()?"STEP":"LINEAR",n.push({input:this.processAccessor(new tO.THS(o.times,1)),output:this.processAccessor(new tO.THS(o.values,c)),interpolation:i}),s.push({sampler:n.length-1,target:{node:a.get(A),path:h}})}let o={name:e.name||"clip_"+i.animations.length,samplers:n,channels:s};return this.serializeUserData(e,o),i.animations.push(o),i.animations.length-1}processSkin(e){let t=this.json,i=this.nodeMap,a=t.nodes[i.get(e)],r=e.skeleton;if(void 0===r)return null;let s=e.skeleton.bones[0];if(void 0===s)return null;let n=[],o=new Float32Array(16*r.bones.length),l=new tO.kn4;for(let t=0;t<r.bones.length;++t)n.push(i.get(r.bones[t])),l.copy(r.boneInverses[t]),l.multiply(e.bindMatrix).toArray(o,16*t);return void 0===t.skins&&(t.skins=[]),t.skins.push({inverseBindMatrices:this.processAccessor(new tO.THS(o,16)),joints:n,skeleton:i.get(s)}),a.skin=t.skins.length-1}async processNodeAsync(e){let t=this.json,i=this.options,a=this.nodeMap;if(t.nodes||(t.nodes=[]),null!==e.pivot)return await this._processNodeWithPivotAsync(e);let r={};if(i.trs){let t=e.quaternion.toArray(),i=e.position.toArray(),a=e.scale.toArray();ab(t,[0,0,0,1])||(r.rotation=t),ab(i,[0,0,0])||(r.translation=i),ab(a,[1,1,1])||(r.scale=a)}else e.matrixAutoUpdate&&e.updateMatrix(),!1===ab(e.matrix.elements,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])&&(r.matrix=e.matrix.elements);if(""!==e.name&&(r.name=String(e.name)),this.serializeUserData(e,r),e.isMesh||e.isLine||e.isPoints){let t=await this.processMeshAsync(e);null!==t&&(r.mesh=t)}else e.isCamera&&(r.camera=this.processCamera(e));e.isSkinnedMesh&&this.skins.push(e);let s=t.nodes.push(r)-1;if(a.set(e,s),e.children.length>0){let t=[];for(let a=0,r=e.children.length;a<r;a++){let r=e.children[a];if(r.visible||!1===i.onlyVisible){let e=await this.processNodeAsync(r);null!==e&&t.push(e)}}t.length>0&&(r.children=t)}return await this._invokeAllAsync(function(t){t.writeNode&&t.writeNode(e,r)}),s}async _processNodeWithPivotAsync(e){let t=this.json,i=this.options,a=this.nodeMap,r=e.pivot,s={},n=e.quaternion.toArray(),o=[e.position.x+r.x,e.position.y+r.y,e.position.z+r.z],l=e.scale.toArray();ab(n,[0,0,0,1])||(s.rotation=n),ab(o,[0,0,0])||(s.translation=o),ab(l,[1,1,1])||(s.scale=l),s.extras={pivot:r.toArray()},""!==e.name&&(s.name=String(e.name)),this.serializeUserData(e,s);let A=t.nodes.push(s)-1;a.set(e,A);let h={},c=[-r.x,-r.y,-r.z];if(ab(c,[0,0,0])||(h.translation=c),e.isMesh||e.isLine||e.isPoints){let t=await this.processMeshAsync(e);null!==t&&(h.mesh=t)}else e.isCamera&&(h.camera=this.processCamera(e));e.isSkinnedMesh&&this.skins.push(e);let d=t.nodes.push(h)-1;if(e.children.length>0){let t=[];for(let a=0,r=e.children.length;a<r;a++){let r=e.children[a];if(r.visible||!1===i.onlyVisible){let e=await this.processNodeAsync(r);null!==e&&t.push(e)}}t.length>0&&(h.children=t)}return s.children=[d],await this._invokeAllAsync(function(t){t.writeNode&&t.writeNode(e,s)}),A}async processSceneAsync(e){let t=this.json,i=this.options;t.scenes||(t.scenes=[],t.scene=0);let a={};""!==e.name&&(a.name=e.name),t.scenes.push(a);let r=[];for(let t=0,a=e.children.length;t<a;t++){let a=e.children[t];if(a.visible||!1===i.onlyVisible){let e=await this.processNodeAsync(a);null!==e&&r.push(e)}}r.length>0&&(a.nodes=r),this.serializeUserData(e,a)}async processObjectsAsync(e){let t=new tO.Z58;t.name="AuxScene";for(let i=0;i<e.length;i++)t.children.push(e[i]);await this.processSceneAsync(t)}async processInputAsync(e){let t=this.options;e=e instanceof Array?e:[e],await this._invokeAllAsync(function(t){t.beforeParse&&t.beforeParse(e)});let i=[];for(let t=0;t<e.length;t++)e[t]instanceof tO.Z58?await this.processSceneAsync(e[t]):i.push(e[t]);i.length>0&&await this.processObjectsAsync(i);for(let e=0;e<this.skins.length;++e)this.processSkin(this.skins[e]);if(1===e.length)for(let i=0;i<t.animations.length;++i)this.processAnimation(t.animations[i],e[0]);else for(let i=0;i<e.length;i++){let a=t.animations[i]||[];for(let t=0;t<a.length;++t)this.processAnimation(a[t],e[i])}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 aw{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);let i=this.writer,a=i.json,r=i.extensionsUsed,s={};e.name&&(s.name=e.name),s.color=e.color.toArray(),s.intensity=e.intensity,e.isDirectionalLight?s.type="directional":e.isPointLight?(s.type="point",e.distance>0&&(s.range=e.distance)):e.isSpotLight&&(s.type="spot",e.distance>0&&(s.range=e.distance),s.spot={},s.spot.innerConeAngle=(1-e.penumbra)*e.angle,s.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."),r[this.name]||(a.extensions=a.extensions||{},a.extensions[this.name]={lights:[]},r[this.name]=!0);let n=a.extensions[this.name].lights;n.push(s),t.extensions=t.extensions||{},t.extensions[this.name]={light:n.length-1}}}class aB{constructor(e){this.writer=e,this.name="KHR_materials_unlit"}async writeMaterialAsync(e,t){if(!e.isMeshBasicMaterial)return;let 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 av{constructor(e){this.writer=e,this.name="KHR_materials_clearcoat"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||0===e.clearcoat)return;let i=this.writer,a=i.extensionsUsed,r={};if(r.clearcoatFactor=e.clearcoat,e.clearcoatMap){let t={index:await i.processTextureAsync(e.clearcoatMap),texCoord:e.clearcoatMap.channel};i.applyTextureTransform(t,e.clearcoatMap),r.clearcoatTexture=t}if(r.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){let t={index:await i.processTextureAsync(e.clearcoatRoughnessMap),texCoord:e.clearcoatRoughnessMap.channel};i.applyTextureTransform(t,e.clearcoatRoughnessMap),r.clearcoatRoughnessTexture=t}if(e.clearcoatNormalMap){let 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),r.clearcoatNormalTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=r,a[this.name]=!0}}class ax{constructor(e){this.writer=e,this.name="KHR_materials_dispersion"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||0===e.dispersion)return;let i=this.writer.extensionsUsed,a={};a.dispersion=e.dispersion,t.extensions=t.extensions||{},t.extensions[this.name]=a,i[this.name]=!0}}class aQ{constructor(e){this.writer=e,this.name="KHR_materials_iridescence"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||0===e.iridescence)return;let i=this.writer,a=i.extensionsUsed,r={};if(r.iridescenceFactor=e.iridescence,e.iridescenceMap){let t={index:await i.processTextureAsync(e.iridescenceMap),texCoord:e.iridescenceMap.channel};i.applyTextureTransform(t,e.iridescenceMap),r.iridescenceTexture=t}if(r.iridescenceIor=e.iridescenceIOR,r.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],r.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){let t={index:await i.processTextureAsync(e.iridescenceThicknessMap),texCoord:e.iridescenceThicknessMap.channel};i.applyTextureTransform(t,e.iridescenceThicknessMap),r.iridescenceThicknessTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=r,a[this.name]=!0}}class aS{constructor(e){this.writer=e,this.name="KHR_materials_transmission"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||0===e.transmission)return;let i=this.writer,a=i.extensionsUsed,r={};if(r.transmissionFactor=e.transmission,e.transmissionMap){let t={index:await i.processTextureAsync(e.transmissionMap),texCoord:e.transmissionMap.channel};i.applyTextureTransform(t,e.transmissionMap),r.transmissionTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=r,a[this.name]=!0}}class aM{constructor(e){this.writer=e,this.name="KHR_materials_volume"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||0===e.transmission)return;let i=this.writer,a=i.extensionsUsed,r={};if(r.thicknessFactor=e.thickness,e.thicknessMap){let t={index:await i.processTextureAsync(e.thicknessMap),texCoord:e.thicknessMap.channel};i.applyTextureTransform(t,e.thicknessMap),r.thicknessTexture=t}e.attenuationDistance!==1/0&&(r.attenuationDistance=e.attenuationDistance),r.attenuationColor=e.attenuationColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=r,a[this.name]=!0}}class aR{constructor(e){this.writer=e,this.name="KHR_materials_ior"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||1.5===e.ior)return;let i=this.writer.extensionsUsed,a={};a.ior=e.ior,t.extensions=t.extensions||{},t.extensions[this.name]=a,i[this.name]=!0}}class aD{constructor(e){this.writer=e,this.name="KHR_materials_specular"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||1===e.specularIntensity&&e.specularColor.equals(af)&&!e.specularIntensityMap&&!e.specularColorMap)return;let i=this.writer,a=i.extensionsUsed,r={};if(e.specularIntensityMap){let t={index:await i.processTextureAsync(e.specularIntensityMap),texCoord:e.specularIntensityMap.channel};i.applyTextureTransform(t,e.specularIntensityMap),r.specularTexture=t}if(e.specularColorMap){let t={index:await i.processTextureAsync(e.specularColorMap),texCoord:e.specularColorMap.channel};i.applyTextureTransform(t,e.specularColorMap),r.specularColorTexture=t}r.specularFactor=e.specularIntensity,r.specularColorFactor=e.specularColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=r,a[this.name]=!0}}class aT{constructor(e){this.writer=e,this.name="KHR_materials_sheen"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||0==e.sheen)return;let i=this.writer,a=i.extensionsUsed,r={};if(e.sheenRoughnessMap){let t={index:await i.processTextureAsync(e.sheenRoughnessMap),texCoord:e.sheenRoughnessMap.channel};i.applyTextureTransform(t,e.sheenRoughnessMap),r.sheenRoughnessTexture=t}if(e.sheenColorMap){let t={index:await i.processTextureAsync(e.sheenColorMap),texCoord:e.sheenColorMap.channel};i.applyTextureTransform(t,e.sheenColorMap),r.sheenColorTexture=t}r.sheenRoughnessFactor=e.sheenRoughness,r.sheenColorFactor=e.sheenColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=r,a[this.name]=!0}}class ak{constructor(e){this.writer=e,this.name="KHR_materials_anisotropy"}async writeMaterialAsync(e,t){if(!e.isMeshPhysicalMaterial||0==e.anisotropy)return;let i=this.writer,a=i.extensionsUsed,r={};if(e.anisotropyMap){let t={index:await i.processTextureAsync(e.anisotropyMap)};i.applyTextureTransform(t,e.anisotropyMap),r.anisotropyTexture=t}r.anisotropyStrength=e.anisotropy,r.anisotropyRotation=e.anisotropyRotation,t.extensions=t.extensions||{},t.extensions[this.name]=r,a[this.name]=!0}}class aF{constructor(e){this.writer=e,this.name="KHR_materials_emissive_strength"}async writeMaterialAsync(e,t){if(!e.isMeshStandardMaterial||1===e.emissiveIntensity)return;let i=this.writer.extensionsUsed,a={};a.emissiveStrength=e.emissiveIntensity,t.extensions=t.extensions||{},t.extensions[this.name]=a,i[this.name]=!0}}class aL{constructor(e){this.writer=e,this.name="EXT_materials_bump"}async writeMaterialAsync(e,t){if(!e.isMeshStandardMaterial||1===e.bumpScale&&!e.bumpMap)return;let i=this.writer,a=i.extensionsUsed,r={};if(e.bumpMap){let t={index:await i.processTextureAsync(e.bumpMap),texCoord:e.bumpMap.channel};i.applyTextureTransform(t,e.bumpMap),r.bumpTexture=t}r.bumpFactor=e.bumpScale,t.extensions=t.extensions||{},t.extensions[this.name]=r,a[this.name]=!0}}class aP{constructor(e){this.writer=e,this.name="EXT_mesh_gpu_instancing"}writeNode(e,t){if(!e.isInstancedMesh)return;let i=this.writer,a=new Float32Array(3*e.count),r=new Float32Array(4*e.count),s=new Float32Array(3*e.count),n=new tO.kn4,o=new tO.Pq0,l=new tO.PTz,A=new tO.Pq0;for(let t=0;t<e.count;t++)e.getMatrixAt(t,n),n.decompose(o,l,A),o.toArray(a,3*t),l.toArray(r,4*t),A.toArray(s,3*t);let h={TRANSLATION:i.processAccessor(new tO.THS(a,3)),ROTATION:i.processAccessor(new tO.THS(r,4)),SCALE:i.processAccessor(new tO.THS(s,3))};e.instanceColor&&(h._COLOR_0=i.processAccessor(e.instanceColor)),t.extensions=t.extensions||{},t.extensions[this.name]={attributes:h},i.extensionsUsed[this.name]=!0,i.extensionsRequired[this.name]=!0}}au.Utils={insertKeyframe:function(e,t){let i,a=e.getValueSize(),r=new e.TimeBufferType(e.times.length+1),s=new e.ValueBufferType(e.values.length+a),n=e.createInterpolant(new e.ValueBufferType(a));if(0===e.times.length){r[0]=t;for(let e=0;e<a;e++)s[e]=0;i=0}else if(t<e.times[0]){if(.001>Math.abs(e.times[0]-t))return 0;r[0]=t,r.set(e.times,1),s.set(n.evaluate(t),0),s.set(e.values,a),i=0}else if(t>e.times[e.times.length-1]){if(.001>Math.abs(e.times[e.times.length-1]-t))return e.times.length-1;r[r.length-1]=t,r.set(e.times,0),s.set(e.values,0),s.set(n.evaluate(t),e.values.length),i=r.length-1}else for(let o=0;o<e.times.length;o++){if(.001>Math.abs(e.times[o]-t))return o;if(e.times[o]<t&&e.times[o+1]>t){r.set(e.times.slice(0,o+1),0),r[o+1]=t,r.set(e.times.slice(o+1),o+2),s.set(e.values.slice(0,(o+1)*a),0),s.set(n.evaluate(t),(o+1)*a),s.set(e.values.slice((o+1)*a),(o+2)*a),i=o+1;break}}return e.times=r,e.values=s,i},mergeMorphTargetTracks:function(e,t){let i=[],a={},r=e.tracks;for(let e=0;e<r.length;++e){let s,n=r[e],o=tO.Nwf.parseTrackName(n.name),l=tO.Nwf.findNode(t,o.nodeName);if("morphTargetInfluences"!==o.propertyName||void 0===o.propertyIndex){i.push(n);continue}if(n.createInterpolant!==n.InterpolantFactoryMethodDiscrete&&n.createInterpolant!==n.InterpolantFactoryMethodLinear){if(n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline)throw Error("THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.");console.warn("THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead."),(n=n.clone()).setInterpolation(2301)}let A=l.morphTargetInfluences.length,h=l.morphTargetDictionary[o.propertyIndex];if(void 0===h)throw Error("THREE.GLTFExporter: Morph target name not found: "+o.propertyIndex);if(void 0===a[l.uuid]){let e=new(s=n.clone()).ValueBufferType(A*s.times.length);for(let t=0;t<s.times.length;t++)e[t*A+h]=s.values[t];s.name=(o.nodeName||"")+".morphTargetInfluences",s.values=e,a[l.uuid]=s,i.push(s);continue}let c=n.createInterpolant(new n.ValueBufferType(1));s=a[l.uuid];for(let e=0;e<s.times.length;e++)s.values[e*A+h]=c.evaluate(s.times[e]);for(let e=0;e<n.times.length;e++){let t=this.insertKeyframe(s,n.times[e]);s.values[t*A+h]=n.values[e]}}return e.tracks=i,e},toTypedBufferAttribute:function(e,t){let i=new tO.THS(new t(e.count*e.itemSize),e.itemSize,!1);if(!e.normalized&&!e.isInterleavedBufferAttribute)return i.array.set(e.array),i;for(let t=0,a=e.count;t<a;t++)for(let a=0;a<e.itemSize;a++)i.setComponent(t,a,e.getComponent(t,a));return i}};let a_=e=>void 0!==e.material&&e.userData&&e.userData.variantMaterials&&!!Array.from(e.userData.variantMaterials.values()).filter(e=>aU(e.material)),aU=e=>e&&e.isMaterial&&!Array.isArray(e);class aG{constructor(e){this.writer=e,this.name="KHR_materials_variants",this.variantNames=[]}beforeParse(e){let t=new Set,i=e=>{if(!a_(e))return;let i=e.userData.variantMaterials;for(let[a,r]of e.userData.variantData){let e=i.get(r.index);e&&aU(e.material)&&t.add(a)}};if(Array.isArray(e))for(let t of e)t.traverse(i);else e.traverse(i);t.forEach(e=>this.variantNames.push(e))}async writeMesh(e,t){if(!a_(e))return;let i=e.userData,a=i.variantMaterials,r=i.variantData,s=new Map,n=new Map;for(let[e,t]of Array.from(r.values()).sort((e,t)=>e.index-t.index).entries())n.set(t.index,e);for(let e of r.values()){let t=a.get(e.index);if(!t||!aU(t.material))continue;let i=await this.writer.processMaterialAsync(t.material);s.has(i)||s.set(i,{material:i,variants:[]}),s.get(i).variants.push(n.get(e.index))}let o=Array.from(s.values()).map(e=>e.variants.sort((e,t)=>e-t)&&e).sort((e,t)=>e.material-t.material);if(0===o.length)return;let l=aU(i.originalMaterial)?await this.writer.processMaterialAsync(i.originalMaterial):-1;for(let e of t.primitives)l>=0&&(e.material=l),e.extensions=e.extensions||{},e.extensions[this.name]={mappings:o}}afterParse(){if(0===this.variantNames.length)return;let e=this.writer.json;e.extensions=e.extensions||{};let t=this.variantNames.map(e=>({name:e}));e.extensions[this.name]={variants:t},this.writer.extensionsUsed[this.name]=!0}}var aN=i(1519);class aO{constructor(e,t,i,a,r){this.xrLight=e,this.renderer=t,this.lightProbe=i,this.xrWebGLBinding=null,this.estimationStartCallback=r,this.frameCallback=this.onXRFrame.bind(this);const s=t.xr.getSession();if(a&&"XRWebGLBinding"in window){e.environment=new aN.WebGLCubeRenderTarget(16).texture;const i=t.getContext();switch(s.preferredReflectionFormat){case"srgba8":i.getExtension("EXT_sRGB");break;case"rgba16f":i.getExtension("OES_texture_half_float")}this.xrWebGLBinding=new XRWebGLBinding(s,i),this.lightProbe.addEventListener("reflectionchange",()=>{this.updateReflection()})}s.requestAnimationFrame(this.frameCallback)}updateReflection(){let e=this.renderer.properties.get(this.xrLight.environment);if(e){let 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);let i=t.getLightEstimate(this.lightProbe);if(i){this.xrLight.lightProbe.sh.fromArray(i.sphericalHarmonicsCoefficients),this.xrLight.lightProbe.intensity=1;let 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 aq extends tO.YJl{constructor(e,t=!0){super(),this.lightProbe=new tO.FZo,this.lightProbe.intensity=0,this.add(this.lightProbe),this.directionalLight=new tO.ZyN,this.directionalLight.intensity=0,this.add(this.directionalLight),this.environment=null;let i=null,a=!1;e.xr.addEventListener("sessionstart",()=>{let r=e.xr.getSession();"requestLightProbe"in r&&r.requestLightProbe({reflectionFormat:r.preferredReflectionFormat}).then(r=>{i=new aO(this,e,r,t,()=>{a=!0,this.dispatchEvent({type:"estimationstart"})})})}),e.xr.addEventListener("sessionend",()=>{i&&(i.dispose(),i=null),a&&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 aH{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,a){let r=2e-4*this.naturalFrequency;if(null==e||0===a||e===t&&0===this.velocity)return t;if(i<0)return e;let s=e-t,n=this.velocity+this.naturalFrequency*s,o=s+i*n,l=Math.exp(-this.naturalFrequency*i),A=(n-this.naturalFrequency*o)*l,h=-this.naturalFrequency*(A+n*l);return Math.abs(A)<r*Math.abs(a)&&h*s>=0?(this.velocity=0,t):(this.velocity=A,t+o*l)}}let aj={MIN_TOUCH_AREA:.05,BASE_RADIUS:.15,LINE_WIDTH:.02,SEGMENTS:16,DELTA_PHI:Math.PI/32,COLORS:{EDGE_FALLOFF:new tO.Q1f(.98,.98,.98),EDGE_CUTOFF:new tO.Q1f(.8,.8,.8),FILL_FALLOFF:new tO.Q1f(.4,.4,.4),FILL_CUTOFF:new tO.Q1f(.4,.4,.4),ACTIVE_EDGE:new tO.Q1f(1,1,1),ACTIVE_FILL:new tO.Q1f(.6,.6,.6)},MAX_OPACITY:.75,ACTIVE_OPACITY:.9,FILL_OPACITY_MULTIPLIER:.5,INTERACTIVE_OPACITY_MULTIPLIER:1.2,MIN_DISTANCE:.5,MAX_DISTANCE:10,BASE_SCALE:1,DISTANCE_SCALE_FACTOR:.3,FADE_IN_DURATION:.12,FADE_OUT_DURATION:.12,SIZE_UPDATE_DURATION:.05,COLOR_LERP_FACTOR:.15,SCREEN_SPACE_SCALE:1.2,SIZE_UPDATE_THRESHOLD:.001,GEOMETRY_UPDATE_DEBOUNCE:100},az=new tO.I9Y,aK=(e,t,i,a,r)=>{let s=t>0?i>0?0:-Math.PI/2:i>0?Math.PI/2:Math.PI;for(let n=0;n<=aj.SEGMENTS;++n)e.push(t+(a-r)*Math.cos(s),i+(a-r)*Math.sin(s),0,t+a*Math.cos(s),i+a*Math.sin(s),0),s+=aj.DELTA_PHI};class aJ extends tO.eaF{constructor(e,t){super(new tO.LoY),this.shadowHeight=0,this.isActive=!1,this.isHovered=!1,this.lastGeometryUpdateTime=0,this.needsGeometryUpdate=!1,this.scene=e,this.side=t,this.currentSize=new tO.Pq0,this.goalSize=new tO.Pq0,this.sizeDamper=new aH,this.updateSizeFromScene(),this.edgeMaterial=new tO.V9B({color:aj.COLORS.EDGE_FALLOFF,transparent:!0,opacity:0,side:2,depthWrite:!1,blending:2}),this.fillMaterial=new tO.V9B({color:aj.COLORS.FILL_FALLOFF,transparent:!0,opacity:0,side:2,depthWrite:!1,blending:1}),this.material=this.edgeMaterial,this.goalOpacity=0,this.opacityDamper=new aH,this.createHitMeshes(),this.updatePositionFromScene(),e.target.add(this),e.target.add(this.hitBox),this.offsetHeight=0}updateSizeFromScene(){let{size:e}=this.scene;this.goalSize.copy(e);let t=Math.sqrt(e.x*e.x+e.z*e.z),i=Math.max(aj.MIN_TOUCH_AREA,.4*t);this.goalSize.x<i&&(this.goalSize.x=i),this.goalSize.z<i&&(this.goalSize.z=i),this.updateGeometry()}updateGeometry(){let e=this.geometry,t=[],i=[],a=this.goalSize.x/2,r=("back"===this.side?this.goalSize.y:this.goalSize.z)/2,s=Math.min(a,r),n=Math.max(.7*aj.BASE_RADIUS,.2*s),o=Math.max(.7*aj.LINE_WIDTH,.025*s);aK(i,a,r,n,o),aK(i,-a,r,n,o),aK(i,-a,-r,n,o),aK(i,a,-r,n,o);let l=i.length/3;for(let e=0;e<l-2;e+=2)t.push(e,e+1,e+3,e,e+3,e+2);let A=l-2;t.push(A,A+1,1,A,1,0),e.setAttribute("position",new tO.qtW(i,3)),e.setIndex(t),e.computeBoundingSphere()}createHitMeshes(){let e=this.goalSize.x/2,t=("back"===this.side?this.goalSize.y:this.goalSize.z)/2,i=Math.min(e,t),a=Math.max(.7*aj.BASE_RADIUS,.2*i);this.hitPlane=new tO.eaF(new tO.bdM(2*(e+a),2*(t+a))),this.hitPlane.visible=!1,this.hitPlane.material.side=2,this.add(this.hitPlane),this.hitBox=new tO.eaF(new tO.iNn(this.goalSize.x+2*a,this.goalSize.y+a,this.goalSize.z+2*a)),this.hitBox.visible=!1,this.hitBox.material.side=2,this.add(this.hitBox)}updatePositionFromScene(){let{boundingBox:e}=this.scene;switch(e.getCenter(this.position),this.rotation.set(0,0,0),this.side){case"bottom":this.rotateX(-Math.PI/2),this.shadowHeight=e.min.y,this.position.y=this.shadowHeight;break;case"back":this.shadowHeight=e.min.z,this.position.z=this.shadowHeight}if(this.hitBox){let t=(this.side,(this.goalSize.y+aj.BASE_RADIUS)/2);this.hitBox.position.y=t+e.min.y}}updateFromModelChanges(){this.updateSizeFromScene(),this.updatePositionFromScene(),this.updateGeometry(),this.updateHitMeshes(),this.ensureProperOrientation(),this.needsGeometryUpdate=!1,this.lastGeometryUpdateTime=performance.now()}ensureProperOrientation(){"bottom"===this.side?(this.rotation.x=-Math.PI/2,this.rotation.y=0,this.rotation.z=0):"back"===this.side&&(this.rotation.x=0,this.rotation.y=0,this.rotation.z=0)}setScreenSpaceMode(e){e?this.scale.set(aj.SCREEN_SPACE_SCALE,aj.SCREEN_SPACE_SCALE,aj.SCREEN_SPACE_SCALE):this.scale.set(1,1,1)}updateHitMeshes(){if(this.hitPlane&&this.hitBox){let e=this.goalSize.x/2,t=("back"===this.side?this.goalSize.y:this.goalSize.z)/2,i=Math.min(e,t),a=Math.max(.7*aj.BASE_RADIUS,.2*i),r=new tO.bdM(2*(e+a),2*(t+a));this.hitPlane.geometry.dispose(),this.hitPlane.geometry=r;let s=new tO.iNn(this.goalSize.x+2*a,this.goalSize.y+a,this.goalSize.z+2*a);this.hitBox.geometry.dispose(),this.hitBox.geometry=s}}setInteractionState(e,t=!1){this.isActive=e,this.isHovered=t,this.updateVisualState()}updateVisualState(){let e,t;this.isActive?(e=aj.COLORS.ACTIVE_EDGE,t=aj.COLORS.ACTIVE_FILL):this.isHovered?(e=aj.COLORS.EDGE_FALLOFF,t=aj.COLORS.FILL_FALLOFF):(e=aj.COLORS.EDGE_CUTOFF,t=aj.COLORS.FILL_CUTOFF),this.edgeMaterial.color.lerp(e,aj.COLOR_LERP_FACTOR),this.fillMaterial.color.lerp(t,aj.COLOR_LERP_FACTOR)}applyDistanceScaling(e){let t=e.distanceTo(this.position),i=Math.max(aj.MIN_DISTANCE,Math.min(aj.MAX_DISTANCE,t)),a=aj.BASE_SCALE+(i-aj.MIN_DISTANCE)*aj.DISTANCE_SCALE_FACTOR;this.scale.set(a,a,a)}getHit(e,t,i){az.set(t,-i),this.hitPlane.visible=!0;let a=e.positionAndNormalFromPoint(az,this.hitPlane);return this.hitPlane.visible=!1,null==a?null:a.position}getExpandedHit(e,t,i){this.hitPlane.scale.set(1e3,1e3,1e3),this.hitPlane.updateMatrixWorld();let a=this.getHit(e,t,i);return this.hitPlane.scale.set(1,1,1),a}controllerIntersection(e,t){this.hitBox.visible=!0;let 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?aj.MAX_OPACITY:0}updateOpacity(e){let t=this.material,i=this.opacityDamper.update(t.opacity,this.goalOpacity,e,1);this.edgeMaterial.opacity=i,this.fillMaterial.opacity=i*aj.FILL_OPACITY_MULTIPLIER,(this.isActive||this.isHovered)&&(this.edgeMaterial.opacity=i*aj.INTERACTIVE_OPACITY_MULTIPLIER),this.visible=i>0}update(e,t){if(this.updateOpacity(e),!this.currentSize.equals(this.goalSize)){let t=new tO.Pq0;t.x=this.sizeDamper.update(this.currentSize.x,this.goalSize.x,e,1),t.y=this.sizeDamper.update(this.currentSize.y,this.goalSize.y,e,1),t.z=this.sizeDamper.update(this.currentSize.z,this.goalSize.z,e,1),t.distanceTo(this.currentSize)>aj.SIZE_UPDATE_THRESHOLD&&(this.currentSize.copy(t),this.needsGeometryUpdate=!0)}let i=performance.now();this.needsGeometryUpdate&&i-this.lastGeometryUpdateTime>aj.GEOMETRY_UPDATE_DEBOUNCE&&(this.updateGeometry(),this.updateHitMeshes(),this.needsGeometryUpdate=!1,this.lastGeometryUpdateTime=i),t&&this.applyDistanceScaling(t),this.updateVisualState()}getSize(){return this.goalSize.clone()}dispose(){let{geometry:e,material:t}=this.hitPlane;e.dispose(),t.dispose(),this.hitBox.geometry.dispose(),this.hitBox.material.dispose(),this.geometry.dispose(),this.edgeMaterial.dispose(),this.fillMaterial.dispose(),this.hitBox.removeFromParent(),this.removeFromParent()}}let aV=(e,t)=>({type:"number",number:e,unit:t}),aY=(g={},e=>{let t=e;if(t in g)return g[t];let i=[],a=0;for(;e;){if(++a>1e3){e="";break}let t=a$(e),r=t.nodes[0];if(null==r||0===r.terms.length)break;i.push(r),e=t.remainingInput}return g[t]=i}),a$=(p=/^(\-\-|[a-z\u0240-\uffff])/i,m=/^([\*\+\/]|[\-]\s)/i,f=/^[\),]/,e=>{let t=[];for(;e.length&&(e=e.trim(),!f.test(e));)if("("===e[0]){let{nodes:i,remainingInput:a}=a0(e);e=a,t.push({type:"function",name:{type:"ident",value:"calc"},arguments:i})}else if(p.test(e)){let i=aW(e),a=i.nodes[0];if("("===(e=i.remainingInput)[0]){let{nodes:i,remainingInput:r}=a0(e);t.push({type:"function",name:a,arguments:i}),e=r}else t.push(a)}else if(m.test(e))t.push({type:"operator",value:e[0]}),e=e.slice(1);else{let{nodes:i,remainingInput:a}="#"===e[0]?aZ(e):aX(e);if(0===i.length)break;t.push(i[0]),e=a}return{nodes:[{type:"expression",terms:t}],remainingInput:e}}),aW=(b=/[^a-z0-9_\-\u0240-\uffff]/i,e=>{let t=e.match(b);return{nodes:[{type:"ident",value:null==t?e:e.substr(0,t.index)}],remainingInput:null==t?"":e.substr(t.index)}}),aX=(I=/[\+\-]?(\d+[\.]\d+|\d+|[\.]\d+)([eE][\+\-]?\d+)?/,C=/^[a-z%]+/i,E=/^(m|mm|cm|rad|deg|[%])$/,e=>{let t=e.match(I),i=null==t?"0":t[0],a=(e=null==i?e:e.slice(i.length)).match(C),r=null!=a&&""!==a[0]?a[0]:null,s=null==a?e:e.slice(r.length);return null==r||E.test(r)||(r=null),{nodes:[{type:"number",number:parseFloat(i)||0,unit:r}],remainingInput:s}}),aZ=(y=/^[a-f0-9]*/i,e=>{let t=(e=e.slice(1).trim()).match(y);return{nodes:null==t?[]:[{type:"hex",value:t[0]}],remainingInput:null==t?e:e.slice(t[0].length)}}),a0=e=>{let t=[];for(e=e.slice(1).trim();e.length;){let i=a$(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}},a1=Symbol("visitedTypes");class a2{constructor(e){this[a1]=e}walk(e,t){let i=e.slice();for(;i.length;){let e=i.shift();switch(this[a1].indexOf(e.type)>-1&&t(e),e.type){case"expression":i.unshift(...e.terms);break;case"function":i.unshift(e.name,...e.arguments)}}}}let a8=Object.freeze({type:"number",number:0,unit:null}),a9=(e,t=0)=>{let{number:i,unit:a}=e;if(isFinite(i)){if("rad"===e.unit||null==e.unit)return e}else i=t,a="rad";return{type:"number",number:("deg"===a&&null!=i?i:0)*Math.PI/180,unit:"rad"}},a3=(e,t=0)=>{let i,{number:a,unit:r}=e;if(isFinite(a)){if("m"===e.unit)return e}else a=t,r="m";switch(r){default:i=1;break;case"cm":i=.01;break;case"mm":i=.001}return{type:"number",number:i*a,unit:"m"}},a5=(B={rad:w=e=>e,deg:a9,m:w,mm:a3,cm:a3},(e,t=a8)=>{isFinite(e.number)||(e.number=t.number,e.unit=t.unit);let{unit:i}=e;if(null==i)return e;let a=B[i];return null==a?t:a(e)}),a4=Symbol("evaluate"),a6=Symbol("lastValue");class a7{constructor(){this[e6]=null}static evaluatableFor(e,t=a8){if(e instanceof a7)return e;if("number"===e.type)return"%"===e.unit?new ri(e,t):e;switch(e.name.value){case"calc":return new ro(e,t);case"env":return new rr(e)}return a8}static evaluate(e){return e instanceof a7?e.evaluate():e}static isConstant(e){return!(e instanceof a7)||e.isConstant}static applyIntrinsics(e,t){let{basis:i,keywords:a}=t,{auto:r}=a;return i.map((t,i)=>{let s=null==r[i]?t:r[i],n=e[i]?e[i]:s;if("ident"===n.type){let e=n.value;e in a&&(n=a[e][i])}return((null==n||"ident"===n.type)&&(n=s),"%"===n.unit)?aV(n.number/100*t.number,t.unit):(n=a5(n,t)).unit!==t.unit?t:n})}get isConstant(){return!1}evaluate(){return this.isConstant&&null!=this[a6]||(this[a6]=this[a4]()),this[a6]}}e6=a6;let re=Symbol("percentage"),rt=Symbol("basis");class ri extends a7{constructor(e,t){super(),this[re]=e,this[rt]=t}get isConstant(){return!0}[a4](){return aV(this[re].number/100*this[rt].number,this[rt].unit)}}let ra=Symbol("identNode");class rr extends a7{constructor(e){super(),this[e7]=null;const t=e.arguments.length?e.arguments[0].terms[0]:null;null!=t&&"ident"===t.type&&(this[ra]=t)}get isConstant(){return!1}[(e7=ra,a4)](){return null!=this[ra]&&"window-scroll-y"===this[ra].value?{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}:a8}}let rs=/[\*\/]/,rn=Symbol("evaluator");class ro extends a7{constructor(e,t=a8){if(super(),this[te]=null,1!==e.arguments.length)return;const i=e.arguments[0].terms.slice(),a=[];for(;i.length;){const e=i.shift();if(a.length>0){const i=a[a.length-1];if("operator"===i.type&&rs.test(i.value)){const i=a.pop(),r=a.pop();if(null==r)return;a.push(new rc(i,a7.evaluatableFor(r,t),a7.evaluatableFor(e,t)));continue}}a.push("operator"===e.type?e:a7.evaluatableFor(e,t))}for(;a.length>2;){const[e,i,r]=a.splice(0,3);if("operator"!==i.type)return;a.unshift(new rc(i,a7.evaluatableFor(e,t),a7.evaluatableFor(r,t)))}1===a.length&&(this[rn]=a[0])}get isConstant(){return null==this[rn]||a7.isConstant(this[rn])}[(te=rn,a4)](){return null!=this[rn]?a7.evaluate(this[rn]):a8}}let rl=Symbol("operator"),rA=Symbol("left"),rh=Symbol("right");class rc extends a7{constructor(e,t,i){super(),this[rl]=e,this[rA]=t,this[rh]=i}get isConstant(){return a7.isConstant(this[rA])&&a7.isConstant(this[rh])}[a4](){let e,t=a5(a7.evaluate(this[rA])),i=a5(a7.evaluate(this[rh])),{number:a,unit:r}=t,{number:s,unit:n}=i;if(null!=n&&null!=r&&n!=r)return a8;switch(this[rl].value){case"+":e=a+s;break;case"-":e=a-s;break;case"/":e=a/s;break;case"*":e=a*s;break;default:return a8}return{type:"number",number:e,unit:r||n}}}let rd=Symbol("evaluatables"),ru=Symbol("intrinsics");class rg extends a7{constructor(e,t){super(),this[ru]=t;const i=e[0],a=null!=i?i.terms:[];this[rd]=t.basis.map((e,t)=>{let i=a[t];return null==i?{type:"ident",value:"auto"}:"ident"===i.type?i:a7.evaluatableFor(i,e)})}get isConstant(){for(let e of this[rd])if(!a7.isConstant(e))return!1;return!0}[a4](){let e=this[rd].map(e=>a7.evaluate(e));return a7.applyIntrinsics(e,this[ru]).map(e=>e.number)}}let rp=Symbol("instances"),rm=Symbol("activateListener"),rf=Symbol("deactivateListener"),rb=Symbol("notifyInstances"),rI=Symbol("notify"),rC=Symbol("callback");class rE{static[rb](){for(let e of rE[rp])e[rI]()}static[(tt=rp,rm)](){window.addEventListener("scroll",this[rb],{passive:!0})}static[rf](){window.removeEventListener("scroll",this[rb])}constructor(e){this[rC]=e}observe(){0===rE[rp].size&&rE[rm](),rE[rp].add(this)}disconnect(){rE[rp].delete(this),0===rE[rp].size&&rE[rf]()}[rI](){this[rC]()}}rE[tt]=new Set;let ry=Symbol("computeStyleCallback"),rw=Symbol("astWalker"),rB=Symbol("dependencies"),rv=Symbol("onScroll");class rx{constructor(e){this[ti]={},this[ta]=new a2(["function"]),this[tr]=()=>{this[ry]({relatedState:"window-scroll"})},this[ry]=e}observeEffectsFor(e){let t={},i=this[rB];for(let a in this[rw].walk(e,e=>{let{name:a}=e,r=e.arguments[0].terms[0];if("env"===a.value&&null!=r&&"ident"===r.type&&"window-scroll-y"===r.value&&null==t["window-scroll"]){let e="window-scroll"in i?i["window-scroll"]:new rE(this[rv]);e.observe(),delete i["window-scroll"],t["window-scroll"]=e}}),i)i[a].disconnect();this[rB]=t}dispose(){for(let e in this[rB])this[rB][e].disconnect()}}ti=rB,ta=rw,tr=rv;let rQ=e=>{let t=e.observeEffects||!1,i=e.intrinsics instanceof Function?e.intrinsics:()=>e.intrinsics;return(a,r)=>{let s=a.updated,n=a.connectedCallback,o=a.disconnectedCallback,l=Symbol(`${r}StyleEffector`),A=Symbol(`${r}StyleEvaluator`),h=Symbol(`${r}UpdateEvaluator`),c=Symbol(`${r}EvaluateAndSync`);Object.defineProperties(a,{[l]:{value:null,writable:!0},[A]:{value:null,writable:!0},[h]:{value:function(){let e=aY(this[r]);this[A]=new rg(e,i(this)),null==this[l]&&t&&(this[l]=new rx(()=>this[c]())),null!=this[l]&&this[l].observeEffectsFor(e)}},[c]:{value:function(){if(null==this[A])return;let t=this[A].evaluate();this[e.updateHandler](t)}},updated:{value:function(e){e.has(r)&&(this[h](),this[c]()),s.call(this,e)}},connectedCallback:{value:function(){n.call(this),this.requestUpdate(r,this[r])}},disconnectedCallback:{value:function(){o.call(this),null!=this[l]&&(this[l].dispose(),this[l]=null)}}})}},rS=e=>e<.5?2*e*e:-1+(4-2*e)*e,rM=(e,t,i=rS)=>a=>e+(t-e)*i(a),rR=e=>{let t,i,a=[],r=[],s=e.initialValue;for(let t=0;t<e.keyframes.length;++t){let i=e.keyframes[t],{value:n,frames:o}=i,l=rM(s,n,i.ease||rS);a.push(l),r.push(o),s=n}return i=r.map((t=0,e=>t+=e)),e=>{e=eZ(e,0,1)*i[i.length-1];let t=i.findIndex(t=>t>=e),r=t<1?0:i[t-1],s=i[t];return a[t]((e-r)/(s-r))}};var rD=function(e,t,i,a){var r,s=arguments.length,n=s<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};let rT=rR({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}]}),rk=rR({initialValue:0,keyframes:[{frames:1,value:1},{frames:5,value:1},{frames:1,value:0},{frames:6,value:0}]}),rF="0deg 75deg 105%",rL=["front","right","back","left"],rP=["upper-","","lower-"],r_="auto",rU="wiggle",rG=()=>({basis:[a9(aV(30,"deg"))],keywords:{auto:[null]}}),rN=()=>({basis:[a9(aV(12,"deg"))],keywords:{auto:[null]}}),rO=(x=a5((v=aY(rF)[0].terms)[0]),Q=a5(v[1]),e=>({basis:[x,Q,aV(e[lc].idealCameraDistance(),"m")],keywords:{auto:[null,null,aV(105,"%")]}})),rq=e=>{let t=2.2*e[lc].boundingSphere.radius;return{basis:[aV(-1/0,"rad"),aV(0,"rad"),aV(t,"m")],keywords:{auto:[null,null,null]}}},rH=e=>{let t=new rg([],rO(e)).evaluate()[2];return{basis:[aV(1/0,"rad"),aV(Math.PI,"rad"),aV(t,"m")],keywords:{auto:[null,null,null]}}},rj=e=>{let t=e[lc].boundingBox.getCenter(new tO.Pq0);return{basis:[aV(t.x,"m"),aV(t.y,"m"),aV(t.z,"m")],keywords:{auto:[null,null,null]}}},rz=Math.PI/2,rK=Math.PI/3,rJ=rz/2,rV=2*Math.PI,rY=Symbol("controls"),r$=Symbol("panElement"),rW=Symbol("promptElement"),rX=Symbol("promptAnimatedContainer"),rZ=Symbol("fingerAnimatedContainers"),r0=Symbol("deferInteractionPrompt"),r1=Symbol("updateAria"),r2=Symbol("a11y"),r8=Symbol("updateA11y"),r9=Symbol("updateCameraForRadius"),r3=Symbol("cancelPrompts"),r5=Symbol("onChange"),r4=Symbol("onPointerChange"),r6=Symbol("waitingToPromptUser"),r7=Symbol("userHasInteracted"),se=Symbol("promptElementVisibleTime"),st=Symbol("lastPromptOffset"),si=Symbol("cancellationSource"),sa=Symbol("lastSpherical"),sr=Symbol("jumpCamera"),ss=Symbol("initialized"),sn=Symbol("maintainThetaPhi"),so=Symbol("syncCameraOrbit"),sl=Symbol("syncFieldOfView"),sA=Symbol("syncCameraTarget"),sh=Symbol("syncMinCameraOrbit"),sc=Symbol("syncMaxCameraOrbit"),sd=Symbol("syncMinFieldOfView"),su=Symbol("syncMaxFieldOfView"),sg=new tO.I9Y,sp=new tO.Pq0,sm=Object.freeze({minimumRadius:0,maximumRadius:1/0,minimumPolarAngle:0,maximumPolarAngle:Math.PI,minimumAzimuthalAngle:-1/0,maximumAzimuthalAngle:1/0,minimumFieldOfView:10,maximumFieldOfView:45,touchAction:"none"}),sf=Math.PI/8,sb="user-interaction",sI="none",sC="automatic";class sE extends tO.Qev{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=sI,this._interactionEnabled=!1,this._disableZoom=!1,this.isUserPointing=!1,this.enablePan=!0,this.enableTap=!0,this.panProjection=new tO.dwI,this.panPerPixel=0,this.spherical=new tO.YHV,this.goalSpherical=new tO.YHV,this.thetaDamper=new aH,this.phiDamper=new aH,this.radiusDamper=new aH,this.logFov=Math.log(sm.maximumFieldOfView),this.goalLogFov=this.logFov,this.fovDamper=new aH,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(let e of this.pointers)this.onPointerUp(new PointerEvent("pointercancel",Object.assign(Object.assign({},this.startPointerPosition),{pointerId:e.id})))},this.touchModeZoom=(e,t)=>{if(!this._disableZoom){let e=this.twoTouchDistance(this.pointers[0],this.pointers[1]),t=.04*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)=>{let{touchAction:i}=this._options;if(!this.touchDecided&&"none"!==i){this.touchDecided=!0;let a=Math.abs(e),r=Math.abs(t);if(this.changeSource===sb&&("pan-y"===i&&r>a||"pan-x"===i&&a>r)){this.touchMode=null;return}this.element.addEventListener("touchmove",this.disableScroll,{passive:!1})}this.handleSinglePointerMove(e,t)},this.onPointerDown=e=>{if(this.pointers.length>2)return;let{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(e){}this.pointers.push({clientX:e.clientX,clientY:e.clientY,id:e.pointerId}),this.isUserPointing=!1,"touch"===e.pointerType?(this.changeSource=e.altKey?sC:sb,this.onTouchChange(e)):(this.changeSource=sb,this.onMouseDown(e)),this.changeSource===sb&&this.dispatchEvent({type:"user-interaction"})},this.onPointerMove=e=>{let 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);let i=this.pointers.length,a=(e.clientX-t.clientX)/i,r=(e.clientY-t.clientY)/i;(0!==a||0!==r)&&(t.clientX=e.clientX,t.clientY=e.clientY,"touch"===e.pointerType?(this.changeSource=e.altKey?sC:sb,null!==this.touchMode&&this.touchMode(a,r)):(this.changeSource=sb,this.panPerPixel>0?this.movePan(a,r):this.handleSinglePointerMove(a,r)))},this.onPointerUp=e=>{let{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[r$].style.opacity=0,t.style.cursor="grab",this.panPerPixel=0,this.isUserPointing&&this.dispatchEvent({type:"pointer-change-end"})},this.onWheel=e=>{this.changeSource=sb;let t=e.deltaY*(1==e.deltaMode?18:1)*.04*this.zoomSensitivity/30;this.userAdjustOrbit(0,0,t),e.preventDefault(),this.dispatchEvent({type:"user-interaction"})},this.onKeyDown=e=>{let{changeSource:t}=this;this.changeSource=sb,(e.shiftKey&&this.enablePan?this.panKeyCodeHandler(e):this.orbitZoomKeyCodeHandler(e))?(e.preventDefault(),this.dispatchEvent({type:"user-interaction"})):this.changeSource=t},this._options=Object.assign({},sm),this.setOrbit(0,Math.PI/2,1),this.setFieldOfView(100),this.jumpToGoal()}get interactionEnabled(){return this._interactionEnabled}enableInteraction(){if(!1===this._interactionEnabled){let{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){let{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 tO.YHV){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){let{minimumAzimuthalAngle:a,maximumAzimuthalAngle:r,minimumPolarAngle:s,maximumPolarAngle:n,minimumRadius:o,maximumRadius:l}=this._options,{theta:A,phi:h,radius:c}=this.goalSpherical,d=eZ(e,a,r);isFinite(a)||isFinite(r)||(this.spherical.theta=this.wrapAngle(this.spherical.theta-d)+d);let u=eZ(t,s,n),g=eZ(i,o,l);return(d!==A||u!==h||g!==c)&&!!isFinite(d)&&!!isFinite(u)&&!!isFinite(g)&&(this.goalSpherical.theta=d,this.goalSpherical.phi=u,this.goalSpherical.radius=g,this.goalSpherical.makeSafe(),!0)}setRadius(e){this.goalSpherical.radius=e,this.setOrbit()}setFieldOfView(e){let{minimumFieldOfView:t,maximumFieldOfView:i}=this._options;e=eZ(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){let{theta:a,phi:r,radius:s}=this.goalSpherical,{minimumRadius:n,maximumRadius:o,minimumFieldOfView:l,maximumFieldOfView:A}=this._options,h=this.spherical.theta-a,c=Math.PI-.001,d=a-eZ(e,-c-h,c-h),u=0===i?0:((i>0?o:n)-s)/(Math.log(i>0?A:l)-this.goalLogFov),g=s+i*(isFinite(u)?u:(o-n)*2);if(this.setOrbit(d,r-t,g),0!==i){let e=this.goalLogFov+i;this.setFieldOfView(Math.exp(e))}}jumpToGoal(){this.update(0,1e4)}update(e,t){if(this.isStationary())return!1;let{maximumPolarAngle:i,maximumRadius:a}=this._options,r=this.spherical.theta-this.goalSpherical.theta;return!(Math.abs(r)>Math.PI)||isFinite(this._options.minimumAzimuthalAngle)||isFinite(this._options.maximumAzimuthalAngle)||(this.spherical.theta-=2*Math.sign(r)*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.radius=this.radiusDamper.update(this.spherical.radius,this.goalSpherical.radius,t,a),this.logFov=this.fovDamper.update(this.logFov,this.goalLogFov,t,1),this.moveCamera(),!0}updateTouchActionStyle(){let{style:e}=this.element;if(this._interactionEnabled){let{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 tO.O9p(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){let 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){let{clientX:i,clientY:a}=e,{clientX:r,clientY:s}=t,n=r-i,o=s-a;return Math.sqrt(n*n+o*o)}handleSinglePointerMove(e,t){let i=this.pixelLengthToSphericalAngle(e),a=this.pixelLengthToSphericalAngle(t);!1===this.isUserPointing&&(this.isUserPointing=!0,this.dispatchEvent({type:"pointer-change-start"})),this.userAdjustOrbit(i,a,0)}initializePan(){let{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){let{scene:i}=this,a=sp.set(e,t,0).multiplyScalar(this.inputSensitivity),r=this.spherical.radius*Math.exp(this.logFov)*this.panPerPixel;a.multiplyScalar(r);let s=i.getTarget();s.add(a.applyMatrix3(this.panProjection)),i.boundingSphere.clampPoint(s,s),i.setTarget(s.x,s.y,s.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;let{scene:t}=this,i=t.positionAndNormalFromPoint(t.getNDC(e.clientX,e.clientY));if(null==i){let{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(){let{scene:e}=this,t=e.positionAndNormalFromPoint(sg.set(0,0));if(null==t)return;e.target.worldToLocal(t.position);let i=e.getTarget(),{theta:a,phi:r}=this.spherical,s=a-e.yaw,n=sp.set(Math.sin(r)*Math.sin(s),Math.cos(r),Math.sin(r)*Math.cos(s)),o=n.dot(t.position.sub(i));i.add(n.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){this.touchMode=null,this.element.removeEventListener("touchmove",this.disableScroll);return}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[r$].style.opacity=1))}}onMouseDown(e){this.panPerPixel=0,this.enablePan&&(2===e.button||e.ctrlKey||e.metaKey||e.shiftKey)&&(this.initializePan(),this.scene.element[r$].style.opacity=1),this.element.style.cursor="grabbing"}orbitZoomKeyCodeHandler(e){let t=!0;switch(e.key){case"PageUp":this.userAdjustOrbit(0,0,.04*this.zoomSensitivity);break;case"PageDown":this.userAdjustOrbit(0,0,-.04*this.zoomSensitivity);break;case"ArrowUp":this.userAdjustOrbit(0,-sf,0);break;case"ArrowDown":this.userAdjustOrbit(0,sf,0);break;case"ArrowLeft":this.userAdjustOrbit(-sf,0,0);break;case"ArrowRight":this.userAdjustOrbit(sf,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}}let sy=`<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" fill="#e8eaed">
|
|
410
|
-
<path d="M6.4,19L5,17.6L10.6,12L5,6.4L6.4,5L12,10.6L17.6,5L19,6.4L13.4,12L19,17.6L17.6,19L12,13.4L6.4,19Z"/>
|
|
411
|
-
</svg>`,sw=`<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" fill="#e8eaed">
|
|
412
|
-
<path d="M7,17V9H5V7H9V17H7ZM11,17V15H13V17H11ZM16,17V9H14V7H18V17H16ZM11,13V11H13V13H11Z"/>
|
|
413
|
-
</svg>`,sB=`<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" fill="#E1E2E8">
|
|
414
|
-
<defs>
|
|
415
|
-
<clipPath id="clip0">
|
|
416
|
-
<path d="M0,0h24v24h-24z"/>
|
|
417
|
-
</clipPath>
|
|
418
|
-
</defs>
|
|
419
|
-
<g clip-path="url(#clip0)">
|
|
420
|
-
<path d="M12,22C10.75,22 9.575,21.767 8.475,21.3C7.392,20.817 6.442,20.175 5.625,19.375C4.825,18.558 4.183,17.608 3.7,16.525C3.233,15.425 3,14.25 3,13H5C5,14.95 5.675,16.608 7.025,17.975C8.392,19.325 10.05,20 12,20C13.95,20 15.6,19.325 16.95,17.975C18.317,16.608 19,14.95 19,13C19,11.05 18.317,9.4 16.95,8.05C15.6,6.683 13.95,6 12,6H11.85L13.4,7.55L12,9L8,5L12,1L13.4,2.45L11.85,4H12C13.25,4 14.417,4.242 15.5,4.725C16.6,5.192 17.55,5.833 18.35,6.65C19.167,7.45 19.808,8.4 20.275,9.5C20.758,10.583 21,11.75 21,13C21,14.25 20.758,15.425 20.275,16.525C19.808,17.608 19.167,18.558 18.35,19.375C17.55,20.175 16.6,20.817 15.5,21.3C14.417,21.767 13.25,22 12,22Z"/>
|
|
421
|
-
</g>
|
|
422
|
-
</svg>`,sv={width:.16,height:.07,cornerRadius:.03,opacity:1,color:0,minDistance:.5,maxDistance:10,baseScale:1,distanceScaleFactor:.3};class sx extends tO.B69{constructor(){super(),this.isActualSize=!1,this.preRenderIcons(),this.createPanel(),this.createButtons(),this.opacityDamper=new aH,this.goalOpacity=sv.opacity}createPanel(){let e=this.createPanelShape(),t=new tO.MSw(e),i=new tO.V9B({color:sv.color,opacity:sv.opacity,transparent:!0});this.panelMesh=new tO.eaF(t,i),this.panelMesh.name="MenuPanel",this.add(this.panelMesh)}createButtons(){this.exitButton=this.createButton("close"),this.exitButton.name="ExitButton",this.exitButton.position.set(.035,0,.01),this.add(this.exitButton),this.toggleButton=this.createButton("view-real-size"),this.toggleButton.name="ToggleButton",this.toggleButton.position.set(-.035,0,.01),this.add(this.toggleButton)}createPanelShape(){let e=new tO.ypk,{width:t,height:i,cornerRadius:a}=sv;return e.moveTo(-t/2+a,-i/2),e.lineTo(t/2-a,-i/2),e.quadraticCurveTo(t/2,-i/2,t/2,-i/2+a),e.lineTo(t/2,i/2-a),e.quadraticCurveTo(t/2,i/2,t/2-a,i/2),e.lineTo(-t/2+a,i/2),e.quadraticCurveTo(-t/2,i/2,-t/2,i/2-a),e.lineTo(-t/2,-i/2+a),e.quadraticCurveTo(-t/2,-i/2,-t/2+a,-i/2),e}preRenderIcons(){[{key:"close",svg:sy},{key:"view-real-size",svg:sw},{key:"replay",svg:sB}].forEach(({key:e,svg:t})=>{sx.iconTextures.has(e)||this.createTextureFromSvg(t,e)})}createTextureFromSvg(e,t){let i=document.createElement("canvas");i.width=128,i.height=128;let a=i.getContext("2d"),r=new Image,s=new Blob([e],{type:"image/svg+xml"}),n=URL.createObjectURL(s);r.onload=()=>{a.drawImage(r,0,0,128,128);let e=new tO.GOR(i);e.needsUpdate=!0,e.minFilter=1006,sx.iconTextures.set(t,e),URL.revokeObjectURL(n)},r.src=n}createButton(e){let t=new tO.V9B({transparent:!0}),i=new tO.bdM(.05,.05),a=new tO.eaF(i,t),r=sx.iconTextures.get(e);if(r)a.material.map=r,a.material.needsUpdate=!0;else{this.createTextureFromSvg("close"===e?sy:"view-real-size"===e?sw:sB,e);let t=()=>{let i=sx.iconTextures.get(e);i?(a.material.map=i,a.material.needsUpdate=!0):setTimeout(t,10)};t()}return a}exitButtonControllerIntersection(e,t){return e.hitFromController(t,this.exitButton)}scaleModeButtonControllerIntersection(e,t){return e.hitFromController(t,this.toggleButton)}handleScaleToggle(e,t,i,a){if(!e)return null;this.isActualSize=!this.isActualSize;let r=this.isActualSize?"replay":"view-real-size";return this.updateScaleModeButtonLabel(r),Math.max(i,Math.min(a,this.isActualSize?1:t))}updateScaleModeButtonLabel(e){let t=sx.iconTextures.get(e);t&&(this.toggleButton.material.map=t,this.toggleButton.material.needsUpdate=!0)}updatePosition(e,t){if(!t)return;let i=new tO.Pq0;t.getWorldPosition(i);let a=t.getSize(),r=Math.max(.5,Math.min(2,Math.min(a.x,a.z)/1)),s=new tO.Pq0().copy(e.position).sub(i);s.y=0,s.normalize();let n=new tO.Pq0().copy(i).add(new tO.Pq0(0,-.2*r,0)).add(s.multiplyScalar(.9*r));this.position.copy(n);let o=e.position.distanceTo(n),l=Math.max(sv.minDistance,Math.min(sv.maxDistance,o)),A=sv.baseScale+(l-sv.minDistance)*sv.distanceScaleFactor;this.scale.set(A,A,A),this.lookAt(e.position)}set show(e){this.goalOpacity=e?sv.opacity:0}updateOpacity(e){let t=this.panelMesh.material.opacity,i=this.opacityDamper.update(t,this.goalOpacity,e,1);this.traverse(e=>{if(e instanceof tO.eaF){let t=e.material;t.transparent&&(t.opacity=i)}}),this.visible=i>0}dispose(){var e;this.children.forEach(e=>{e instanceof tO.eaF&&(e.geometry&&e.geometry.dispose(),(Array.isArray(e.material)?e.material:[e.material]).forEach(e=>{e&&("map"in e&&e.map instanceof tO.GOR&&e.map.dispose(),e.dispose())}))}),null==(e=this.parent)||e.remove(this)}}sx.iconTextures=new Map;let sQ=new tO.Pq0(0,1,0),sS="not-presenting",sM="session-started",sR="object-placed",sD="tracking",sT=new tO.Pq0,sk=new tO.PTz,sF=new tO.kn4,sL=new tO.Pq0,sP=new tO.ubm(45,1,.1,100),s_=new tO.LoY().setFromPoints([new tO.Pq0(0,0,0),new tO.Pq0(0,0,-1)]),sU="screen-space",sG="world-space";class sN extends tO.Qev{isWorldSpaceReady(){return this.xrMode===sG&&this.worldSpaceInitialPlacementDone}constructor(e){super(),this.renderer=e,this.currentSession=null,this.placeOnWall=!1,this.placementBox=null,this.menuPanel=null,this.lastTick=null,this.turntableRotation=null,this.oldShadowIntensity=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.xrController1=null,this.xrController2=null,this.selectedXRController=null,this.tracking=!0,this.frames=0,this.initialized=!1,this.oldTarget=new tO.Pq0,this.placementComplete=!1,this.isTranslating=!1,this.isRotating=!1,this.isTwoHandInteraction=!1,this.lastDragPosition=new tO.Pq0,this.deltaRotation=new tO.PTz,this.scaleLine=new tO.N1A(s_),this.firstRatio=0,this.lastAngle=0,this.goalPosition=new tO.Pq0,this.goalYaw=0,this.goalScale=1,this.xDamper=new aH,this.yDamper=new aH,this.zDamper=new aH,this.yawDamper=new aH,this.pitchDamper=new aH,this.rollDamper=new aH,this.scaleDamper=new aH,this.wasTwoFingering=!1,this.worldSpaceInitialPlacementDone=!1,this.initialModelScale=1,this.minScale=1,this.maxScale=1,this.onExitWebXRButtonContainerClick=()=>this.stopPresenting(),this.onControllerSelectStart=e=>{var t,i,a;let r=this.presentedScene,s=e.target,n=this.menuPanel;if(null!=this.menuPanel.exitButtonControllerIntersection(r,s)){null==(t=this.menuPanel)||t.dispose(),this.stopPresenting();return}if(null!=this.menuPanel.scaleModeButtonControllerIntersection(r,s)){let e=this.menuPanel.handleScaleToggle(this.worldSpaceInitialPlacementDone,this.initialModelScale,this.minScale,this.maxScale);null!==e&&(this.goalScale=e);return}n&&(n.show=!1);let o=this.placementBox.controllerIntersection(r,s);if(null!=o){let e=new tO.NRn().setFromObject(r.pivot).min.y+.2;if(o.point.y<=e)null!=this.selectedXRController?(this.selectedXRController.userData.line.visible=!1,r.canScale&&this.isWorldSpaceReady()&&(this.isTwoHandInteraction=!0,this.firstRatio=this.controllerSeparation()/r.pivot.scale.x,this.scaleLine.visible=!0)):s.attach(r.pivot),this.selectedXRController=s,r.setShadowIntensity(.01);else if(s==this.xrController1?this.xrController1.userData.isSelected=!0:s==this.xrController2&&(this.xrController2.userData.isSelected=!0),(null==(i=this.xrController1)?void 0:i.userData.isSelected)&&(null==(a=this.xrController2)?void 0:a.userData.isSelected))r.canScale&&this.isWorldSpaceReady()&&(this.isTwoHandInteraction=!0,this.firstRatio=this.controllerSeparation()/r.pivot.scale.x,this.scaleLine.visible=!0);else{let e=s===this.xrController1?this.xrController2:this.xrController1;s.userData.initialX=s.position.x,e.userData.turning=!1,s.userData.turning=!0,s.userData.line.visible=!1}}},this.onControllerSelectEnd=e=>{let t=e.target;if(t.userData.turning=!1,t.userData.line.visible=!0,this.isTwoHandInteraction=!1,this.scaleLine.visible=!1,t==this.xrController1?this.xrController1.userData.isSelected=!1:t==this.xrController2&&(this.xrController2.userData.isSelected=!1),null!=this.selectedXRController&&this.selectedXRController!=t)return;let i=this.presentedScene;i.attach(i.pivot),this.selectedXRController=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.isWorldSpaceReady()&&(this.goalPosition.y=i.pivot.position.y),this.menuPanel.show=!0},this.onUpdateScene=()=>{null!=this.placementBox&&this.isPresenting&&(this.placementBox.updateFromModelChanges(),this.placementBox.setScreenSpaceMode(this.xrMode===sU)),this.xrMode!==sU&&(this.menuPanel&&(this.menuPanel.dispose(),this.menuPanel=null),this.menuPanel=new sx,this.presentedScene.add(this.menuPanel),this.menuPanel.updatePosition(this.presentedScene.getCamera(),this.placementBox))},this.onSelectStart=e=>{let t=this.transientHitTestSource;if(null==t)return;let i=this.frame.getHitTestResultsForTransientInput(t),a=this.presentedScene,r=this.placementBox;if(1===i.length){this.inputSource=e.inputSource;let{axes:t}=this.inputSource.gamepad,i=r.getHit(this.presentedScene,t[0],t[1]);r.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){r.show=!0,this.isTwoHandInteraction=!0;let{separation:e,angle:t}=this.fingerPolar(i);this.lastAngle=t,0===this.firstRatio&&(this.firstRatio=e/a.pivot.scale.x),a.canScale&&this.setScale(e);return}},this.onSelectEnd=()=>{this.isTranslating=!1,this.isRotating=!1,this.isTwoHandInteraction=!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(){e$();let 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 e$(),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 aq(this.threeRenderer),this.xrLight.addEventListener("estimationstart",()=>{if(!this.isPresenting||null==this.xrLight)return;let e=this.presentedScene;e.add(this.xrLight),e.environment=this.xrLight.environment}));let a=await this.resolveARSession();a.addEventListener("end",()=>{this.postSessionCleanup()},{once:!0});let r=e.element.shadowRoot.querySelector(".slot.exit-webxr-ar-button");r.classList.add("enabled"),r.addEventListener("click",this.onExitWebXRButtonContainerClick),this.exitWebXRButtonContainer=r;let s=await a.requestReferenceSpace("viewer");this.xrMode=a.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);let n=20*Math.PI/180,o=!0===this.placeOnWall?void 0:new XRRay(new DOMPoint(0,0,0),{x:0,y:-Math.sin(n),z:-Math.cos(n)});a.requestHitTestSource({space:s,offsetRay:o}).then(e=>{this.initialHitSource=e}),this.xrMode!==sU&&(this.setupXRControllers(),this.xDamper.setDecayTime(150),this.yDamper.setDecayTime(150),this.zDamper.setDecayTime(150),this.yawDamper.setDecayTime(150),this.pitchDamper.setDecayTime(150),this.rollDamper.setDecayTime(150),this.scaleDamper.setDecayTime(150)),this.currentSession=a,this.placementBox=new aJ(e,this.placeOnWall?"back":"bottom"),this.placementBox&&this.placementBox.setScreenSpaceMode(this.xrMode===sU),this.placementComplete=!1,this.xrMode!==sU&&(this.menuPanel=new sx,e.add(this.menuPanel),this.menuPanel.updatePosition(e.getCamera(),this.placementBox)),this.lastTick=performance.now(),this.dispatchEvent({type:"status",status:sM})}setupXRControllerLine(e){if(!e.userData.line){let t=new tO.N1A(s_);t.name="line",t.scale.z=5,e.userData.turning=!1,e.userData.line=t,e.add(t)}}setupController(e){this.setupXRControllerLine(e),e.addEventListener("selectstart",this.onControllerSelectStart),e.addEventListener("selectend",this.onControllerSelectEnd)}setupXRControllers(){this.xrController1=this.threeRenderer.xr.getController(0),this.xrController2=this.threeRenderer.xr.getController(1),this.setupController(this.xrController1),this.setupController(this.xrController2),this.scaleLine.name="scale line",this.scaleLine.visible=!1,this.xrController1.add(this.scaleLine);let e=this.presentedScene;e.add(this.xrController1),e.add(this.xrController2)}hover(e){if(this.xrMode===sU||this.selectedXRController==e)return!1;let t=this.presentedScene,i=this.placementBox.controllerIntersection(t,e);return e.userData.line.scale.z=null==i?5:i.distance,null!=i}controllerSeparation(){return this.xrController1.position.distanceTo(this.xrController2.position)}async stopPresenting(){if(!this.isPresenting)return;let e=new Promise(e=>{this.resolveCleanup=e});try{await this.currentSession.end(),await e}catch(e){console.warn("Error while trying to end WebXR AR session"),console.warn(e),this.postSessionCleanup()}}get isPresenting(){return null!=this.presentedScene}get target(){return this.oldTarget}updateTarget(){let e=this.presentedScene;if(null!=e){let 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)}}cleanupXRController(e){e.userData.turning=!1,e.userData.line.visible=!0,e.removeEventListener("selectstart",this.onControllerSelectStart),e.removeEventListener("selectend",this.onControllerSelectEnd),e.removeFromParent()}postSessionCleanup(){let e=this.currentSession;null!=e&&(e.removeEventListener("selectstart",this.onSelectStart),e.removeEventListener("selectend",this.onSelectEnd),this.currentSession=null);let t=this.presentedScene;if(this._presentedScene=null,null!=t){let{element:e}=t;null!=this.xrLight&&(t.remove(this.xrLight),this.xrLight.dispose(),this.xrLight=null),null!=this.menuPanel&&(this.menuPanel.dispose(),this.menuPanel=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);let i=this.turntableRotation;null!=i&&(t.yaw=i);let a=this.oldShadowIntensity;null!=a&&t.setShadowIntensity(a),t.setEnvironmentAndSkybox(e[tk],e[tF]);let r=this.oldTarget;t.setTarget(r.x,r.y,r.z),t.xrCamera=null,t.element.removeEventListener("load",this.onUpdateScene),t.orientHotspots(0);let{width:s,height:n}=e.getBoundingClientRect();t.setSize(s,n),requestAnimationFrame(()=>{t.element.dispatchEvent(new CustomEvent("camera-change",{detail:{source:sI}}))})}this.renderer.height=0;let i=this.exitWebXRButtonContainer;null!=i&&(i.classList.remove("enabled"),i.removeEventListener("click",this.onExitWebXRButtonContainerClick),this.exitWebXRButtonContainer=null);let a=this.transientHitTestSource;null!=a&&(a.cancel(),this.transientHitTestSource=null);let r=this.initialHitSource;null!=r&&(r.cancel(),this.initialHitSource=null),null!=this.placementBox&&(this.placementBox.dispose(),this.placementBox=null),this.xrMode!==sU&&(null!=this.xrController1&&(this.cleanupXRController(this.xrController1),this.xrController1=null),null!=this.xrController2&&(this.cleanupXRController(this.xrController2),this.xrController2=null),this.selectedXRController=null,this.scaleLine.visible=!1),this.isTranslating=!1,this.isRotating=!1,this.isTwoHandInteraction=!1,this.lastTick=null,this.turntableRotation=null,this.oldShadowIntensity=null,this.frame=null,this.inputSource=null,this.overlay=null,this.worldSpaceInitialPlacementDone=!1,null!=this.resolveCleanup&&this.resolveCleanup(),this.dispatchEvent({type:"status",status:sS})}updateView(e){let t=this.presentedScene,i=this.threeRenderer.xr;i.updateCamera(sP),t.xrCamera=i.getCamera();let{elements:a}=t.getCamera().matrixWorld;if(t.orientHotspots(Math.atan2(a[1],a[5])),this.initialized||(this.placeInitially(),this.initialized=!0),e.requestViewportScale&&e.recommendedViewportScale){let t=e.recommendedViewportScale;e.requestViewportScale(Math.max(t,.25))}let r=i.getBaseLayer();if(null!=r){let t=r instanceof XRWebGLLayer?r.getViewport(e):i.getBinding().getViewSubImage(r,e).viewport;this.threeRenderer.setViewport(t.x,t.y,t.width,t.height)}}placeInitially(){let e=this.presentedScene,{pivot:t,element:i}=e,{position:a}=t,r=e.getCamera(),{width:s,height:n}=this.overlay.getBoundingClientRect();e.setSize(s,n),r.projectionMatrixInverse.copy(r.projectionMatrix).invert();let{theta:o}=i.getCameraOrbit(),l=r.getWorldDirection(sT);if(e.yaw=Math.atan2(-l.x,-l.z)-o,this.goalYaw=e.yaw,this.xrMode!==sG||this.worldSpaceInitialPlacementDone){if(this.xrMode===sU){let t=Math.max(1,2*e.boundingSphere.radius);a.copy(r.position).add(l.multiplyScalar(t)),this.updateTarget();let i=e.getTarget();a.add(i).sub(this.oldTarget),this.goalPosition.copy(a)}}else{let{position:i,scale:s}=this.calculateWorldSpaceOptimalPlacement(e,r);this.goalPosition.copy(i),this.goalScale=s,this.initialModelScale=s,a.copy(i),t.scale.set(s,s,s),this.worldSpaceInitialPlacementDone=!0,this.calculateWorldSpaceScaleLimits(e),this.enableWorldSpaceUserInteraction()}if(e.setHotspotsVisibility(!0),this.xrMode===sU){let{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(){let{axes:e}=this.inputSource.gamepad,t=this.placementBox.getExpandedHit(this.presentedScene,e[0],e[1]);return null!=t&&(sT.copy(t).sub(this.presentedScene.getCamera().position),sT.length()>10)?null:t}getHitPoint(e){let t=this.threeRenderer.xr.getReferenceSpace(),i=e.getPose(t);if(null==i)return null;let a=sF.fromArray(i.transform.matrix);return!0===this.placeOnWall&&(this.goalYaw=Math.atan2(a.elements[4],a.elements[6])),a.elements[5]>.75!==this.placeOnWall?sL.setFromMatrixPosition(a):null}moveToFloor(e){if(this.xrMode===sG&&!this.worldSpaceInitialPlacementDone){this.placementBox.show=!1,this.dispatchEvent({type:"status",status:sR});return}let t=this.initialHitSource;if(null==t)return;let i=e.getHitTestResults(t);if(0==i.length)return;let a=i[0],r=this.getHitPoint(a);null!=r&&(this.placementBox.show=!0,this.isTranslating||(this.placeOnWall?this.goalPosition.copy(r):this.goalPosition.y=r.y),t.cancel(),this.initialHitSource=null,this.dispatchEvent({type:"status",status:sR}))}fingerPolar(e){let t=e[0].inputSource.gamepad.axes,i=e[1].inputSource.gamepad.axes,a=i[0]-t[0],r=i[1]-t[1],s=Math.atan2(r,a),n=this.lastAngle-s;return n>Math.PI?n-=2*Math.PI:n<-Math.PI&&(n+=2*Math.PI),{separation:Math.sqrt(a*a+r*r),deltaYaw:n,angle:s}}setScale(e){let t=e/this.firstRatio;t=.2>Math.abs(t-1)?1:t,this.isWorldSpaceReady()&&(t=Math.max(this.minScale,Math.min(this.maxScale,t))),this.goalScale=t}processInput(e){let t=this.transientHitTestSource;if(null==t)return;let i=e.getHitTestResultsForTransientInput(t),a=this.presentedScene,r=a.pivot.scale.x;if(2===i.length){if(!this.wasTwoFingering){let{separation:e,angle:t}=this.fingerPolar(i);this.firstRatio=e/r,this.lastAngle=t,this.wasTwoFingering=!0,this.isTwoHandInteraction=!0;return}let{separation:e,deltaYaw:t,angle:s}=this.fingerPolar(i);this.goalYaw+=t,this.lastAngle=s,a.canScale&&this.setScale(e),this.isTwoHandInteraction=!0;return}if(this.wasTwoFingering&&(this.wasTwoFingering=!1,this.isTwoHandInteraction=!1,this.firstRatio=0),this.isTranslating||this.isTwoHandInteraction||this.isRotating)if(this.isRotating){let 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),this.isWorldSpaceReady())console.log("[processInput] Setting goalPosition.y to hit.y:",t.y),this.goalPosition.add(t);else if(!1===this.placeOnWall){let e=t.y-this.lastDragPosition.y;if(e<0){this.placementBox.offsetHeight=e/r,this.presentedScene.setShadowOffset(e);let i=sT.copy(a.getCamera().position),s=-e/(i.y-t.y);i.multiplyScalar(s),t.multiplyScalar(1-s).add(i)}this.goalPosition.add(t)}else this.goalPosition.add(t);this.lastDragPosition.copy(t)}})}applyXRControllerRotation(e,t){if(!e.userData.turning)return;let i=(e.position.x-e.userData.initialX)*.3;this.deltaRotation.setFromAxisAngle(sQ,i),t.quaternion.multiplyQuaternions(this.deltaRotation,t.quaternion)}handleScalingInXR(e,t){if(this.xrMode===sG&&!this.worldSpaceInitialPlacementDone)return;if(this.xrController1&&this.xrController2&&this.isTwoHandInteraction){let e=this.controllerSeparation();this.setScale(e),this.scaleLine.scale.z=-e,this.scaleLine.lookAt(this.xrController2.position)}let i=e.pivot.scale.x;if(this.goalScale!==i){let a=this.scaleDamper.update(i,this.goalScale,t,1);e.pivot.scale.set(a,a,a)}}updatePivotPosition(e,t){let{pivot:i}=e,a=this.placementBox,r=e.boundingSphere.radius,s=this.goalPosition,n=i.position,o=sI;if(!s.equals(n)){o=sb;let{x:i,y:l,z:A}=n;if(i=this.xDamper.update(i,s.x,t,r),l=this.yDamper.update(l,s.y,t,r),A=this.zDamper.update(A,s.z,t,r),n.set(i,l,A),this.xrMode===sU&&!this.isTranslating){let t=s.y-l;this.placementComplete&&!1===this.placeOnWall?(a.offsetHeight=t/e.pivot.scale.x,e.setShadowOffset(t)):0===t&&(this.placementComplete=!0,a.show=!1,e.setShadowIntensity(.8))}this.xrMode!==sU&&s.equals(n)&&e.setShadowIntensity(.8),this.isWorldSpaceReady()&&e.setShadowIntensity(.8)}if(this.xrMode===sG&&!this.worldSpaceInitialPlacementDone&&this.goalScale!==i.scale.x){let e=this.scaleDamper.update(i.scale.x,this.goalScale,t,1);i.scale.set(e,e,e)}return e.updateTarget(t),o}updateYaw(e,t){sk.setFromAxisAngle(sT.set(0,1,0),this.goalYaw);let i=e.pivot.quaternion.angleTo(sk),a=i-this.yawDamper.update(i,0,t,Math.PI);e.pivot.quaternion.rotateTowards(sk,a)}updateMenuPanel(e,t,i){this.menuPanel&&(this.menuPanel.updateOpacity(i),this.menuPanel.updatePosition(e.getCamera(),t))}applyXRInputToScene(e){let t=this.presentedScene,i=t.pivot,a=this.placementBox;if(this.updatePlacementBoxOpacity(a,e),this.updateTwoHandInteractionState(),this.applyXRControllerRotations(i),this.handleScalingInXR(t,e),i.parent!==t)return void this.updateMenuPanel(t,a,e);let r=this.updatePivotPosition(t,e);this.updateYaw(t,e),this.dispatchCameraChangeEvent(t,r),this.updateMenuPanel(t,a,e)}updatePlacementBoxOpacity(e,t){let i=this.presentedScene.getCamera();e.update(t,i.position);let a=this.hover(this.xrController1),r=this.hover(this.xrController2),s=(a||r)&&!this.isTwoHandInteraction;e.setInteractionState(this.isTranslating||this.isRotating,s)}updateTwoHandInteractionState(){var e,t;let i=(null==(e=this.xrController1)?void 0:e.userData.isSelected)&&(null==(t=this.xrController2)?void 0:t.userData.isSelected);this.isTwoHandInteraction=!!i}applyXRControllerRotations(e){!this.isTwoHandInteraction&&(this.xrController1&&this.applyXRControllerRotation(this.xrController1,e),this.xrController2&&this.applyXRControllerRotation(this.xrController2,e))}dispatchCameraChangeEvent(e,t){e.element.dispatchEvent(new CustomEvent("camera-change",{detail:{source:t}}))}updateXRControllerHover(){let e=this.hover(this.xrController1),t=this.hover(this.xrController2),i=(e||t)&&!this.isTwoHandInteraction;this.placementBox&&(this.placementBox.setInteractionState(this.isTranslating||this.isRotating,i),this.placementBox.show=i)}enableWorldSpaceUserInteraction(){this.placementBox&&(this.placementBox.show=!0),this.presentedScene&&this.presentedScene.setShadowIntensity(.8)}handleFirstView(e,t){this.xrMode===sG&&this.worldSpaceInitialPlacementDone||this.moveToFloor(e),this.processInput(e);let i=t-this.lastTick;this.applyXRInputToScene(i),this.renderer.preRender(this.presentedScene,t,i),this.lastTick=t,this.presentedScene.renderShadow(this.threeRenderer)}onWebXRFrame(e,t){this.xrMode!==sU&&this.updateXRControllerHover(),this.frame=t,++this.frames;let i=this.threeRenderer.xr.getReferenceSpace(),a=t.getViewerPose(i);null==a&&!0===this.tracking&&this.frames>30&&(this.tracking=!1,this.dispatchEvent({type:"tracking",status:"not-tracking"}));let r=this.presentedScene;if(null==a||null==r||!r.element.loaded)return void this.threeRenderer.clear();!1===this.tracking&&(this.tracking=!0,this.dispatchEvent({type:"tracking",status:sD}));let s=!0;for(let i of a.views)this.updateView(i),s&&(this.handleFirstView(t,e),s=!1),this.threeRenderer.render(r,r.getCamera())}calculateWorldSpaceOptimalPlacement(e,t){let i=e.boundingBox,a={x:(i.max.x-i.min.x)/2,y:(i.max.y-i.min.y)/2,z:(i.max.z-i.min.z)/2},r=Math.max(1.65,2*Math.max(a.x,a.z)+.15),s=15*Math.PI/180,n=new tO.Pq0(0,-r*Math.sin(s),-r*Math.cos(s)),o=t.matrixWorld,l=n.clone().applyMatrix4(o),A=Math.max(a.x,a.z)+.15,h=Math.min(.3*r/Math.max(a.y,.01),.3*r/Math.max(A,.01));return{position:l.clone().sub(new tO.Pq0(0,h*a.y,0)),scale:h}}calculateWorldSpaceScaleLimits(e){let t=e.size,i=Math.max(t.x,t.y,t.z),a=Math.max(Math.min(t.x,t.y,t.z),.001),r=.01/Math.max(i,.001),s=70/Math.max(a,.001);this.minScale=Math.min(r,s,this.goalScale),this.maxScale=Math.max(r,s,this.goalScale)}}let sO=Symbol("prepared"),sq=Symbol("prepare"),sH=Symbol("preparedGLTF"),sj=Symbol("clone");class sz{static prepare(e){if(null==e.scene)throw Error("Model does not have a scene");if(e[sO])return e;let t=this[sq](e);return t[sO]=!0,t}static[sq](e){let{scene:t}=e,i=[t];return Object.assign(Object.assign({},e),{scene:t,scenes:i})}get parser(){return this[sH].parser}get animations(){return this[sH].animations}get scene(){return this[sH].scene}get scenes(){return this[sH].scenes}get cameras(){return this[sH].cameras}get asset(){return this[sH].asset}get userData(){return this[sH].userData}constructor(e){this[sH]=e}clone(){return new this.constructor(this[sj]())}dispose(){this.scenes.forEach(e=>{e.traverse(e=>{e.material&&((Array.isArray(e.material)?e.material:[e.material]).forEach(e=>{for(let t in e){let i=e[t];if(i instanceof tO.gPd){let e=i.source.data;null!=e.close&&e.close(),i.dispose()}}e.dispose()}),e.geometry.dispose())})})}[sj](){let e=this[sH],t=t$(this.scene);sK(t,this.scene);let i=[t],a=e.userData?Object.assign({},e.userData):{};return Object.assign(Object.assign({},e),{scene:t,scenes:i,userData:a})}}let sK=(e,t)=>{sJ(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)})},sJ=(e,t,i)=>{i(e,t);for(let a=0;a<e.children.length;a++)sJ(e.children[a],t.children[a],i)},sV=Symbol("threeGLTF"),sY=Symbol("gltf"),s$=Symbol("gltfElementMap"),sW=Symbol("threeObjectMap"),sX=Symbol("parallelTraverseThreeScene"),sZ=Symbol("correlateOriginalThreeGLTF"),s0=Symbol("correlateCloneThreeGLTF");class s1{static from(e,t){return null!=t?this[s0](e,t):this[sZ](e)}static[sZ](e){let t=e.parser.json,i=e.parser.associations,a=new Map,r={name:"Default"},s={index:-1};for(let e of i.keys())e instanceof tO.imn&&null==i.get(e)&&(s.index<0&&(null==t.materials&&(t.materials=[]),s.index=t.materials.length,t.materials.push(r)),e.name=r.name,i.set(e,{materials:s.index}));for(let[e,r]of i)for(let i in r&&(e.userData=e.userData||{},e.userData.associations=r),r)if(null!=i&&"primitives"!==i){let s=(t[i]||[])[r[i]];if(null==s)continue;let n=a.get(s);null==n&&(n=new Set,a.set(s,n)),n.add(e)}return new s1(e,t,i,a)}static[s0](e,t){let i=t.threeGLTF,a=JSON.parse(JSON.stringify(t.gltf)),r=new Map,s=new Map;for(let n=0;n<i.scenes.length;n++)this[sX](i.scenes[n],e.scenes[n],(e,i)=>{let n=t.threeObjectMap.get(e);if(null!=n){for(let e in n)if(null!=e&&"primitives"!==e){let t=n[e],o=a[e][t],l=r.get(i)||{};l[e]=t,r.set(i,l);let A=s.get(o)||new Set;A.add(i),s.set(o,A)}}});return new s1(e,a,r,s)}static[sX](e,t,i){let a=(e,t)=>{if(i(e,t),e.isObject3D){if(e.material)if(Array.isArray(e.material))for(let a=0;a<e.material.length;++a)i(e.material[a],t.material[a]);else i(e.material,t.material);for(let i=0;i<e.children.length;++i)a(e.children[i],t.children[i])}};a(e,t)}get threeGLTF(){return this[sV]}get gltf(){return this[sY]}get gltfElementMap(){return this[s$]}get threeObjectMap(){return this[sW]}constructor(e,t,i,a){this[sV]=e,this[sY]=t,this[s$]=a,this[sW]=i}}let s2=Symbol("correlatedSceneGraph");class s8 extends sz{static[sq](e){let t=super[sq](e);null==t[s2]&&(t[s2]=s1.from(t));let{scene:i}=t,a=new tO.iyt(void 0,1/0);return i.traverse(e=>{if(e.renderOrder=1e3,e.frustumCulled=!1,e.name||(e.name=e.uuid),e.material){let{geometry:i}=e;e.castShadow=!0,e.isSkinnedMesh&&(i.boundingSphere=a,i.boundingBox=null);let r=e.material;if(!0===r.isMeshBasicMaterial&&(r.toneMapped=!1),r.shadowSide=0,r.aoMap){let{gltf:e,threeObjectMap:a}=t[s2],s=a.get(r);if(null!=e.materials&&null!=s&&null!=s.materials){let t=e.materials[s.materials];t.occlusionTexture&&0===t.occlusionTexture.texCoord&&null!=i.attributes.uv&&i.setAttribute("uv2",i.attributes.uv)}}}}),t}get correlatedSceneGraph(){return this[sH][s2]}[sj](){let e=super[sj](),t=new Map;return e.scene.traverse(e=>{if(e.material){let i=e.material;if(null!=i){if(t.has(i.uuid)){e.material=t.get(i.uuid);return}e.material=i.clone(),t.set(i.uuid,e.material)}}void 0!==e.target&&e.add(e.target)}),e[s2]=s1.from(e,this.correlatedSceneGraph),e}}let s9=(e,t,i)=>{let a;switch(e){case 1009:a=new Uint8ClampedArray(t*i*4);break;case 1016:a=new Uint16Array(t*i*4);break;case 1014:a=new Uint32Array(t*i*4);break;case 1010:a=new Int8Array(t*i*4);break;case 1011:a=new Int16Array(t*i*4);break;case 1013:a=new Int32Array(t*i*4);break;case 1015:a=new Float32Array(t*i*4);break;default:throw Error("Unsupported data type")}return a};class s3{_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=e.colorSpace;const t={format:1023,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:e.renderTargetOptions?.anisotropy!==void 0?e.renderTargetOptions?.anisotropy:1,generateMipmaps:e.renderTargetOptions?.generateMipmaps!==void 0&&e.renderTargetOptions?.generateMipmaps,magFilter:e.renderTargetOptions?.magFilter!==void 0?e.renderTargetOptions?.magFilter:1006,minFilter:e.renderTargetOptions?.minFilter!==void 0?e.renderTargetOptions?.minFilter:1006,samples:e.renderTargetOptions?.samples!==void 0?e.renderTargetOptions?.samples:void 0,wrapS:e.renderTargetOptions?.wrapS!==void 0?e.renderTargetOptions?.wrapS:1001,wrapT:e.renderTargetOptions?.wrapT!==void 0?e.renderTargetOptions?.wrapT:1001};if(this._material=e.material,e.renderer?this._renderer=e.renderer:(this._renderer=s3.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new tO.Z58,this._camera=new tO.qUd,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,a)=>{if(void 0!==c)return c;let r=new tO.nWS(1,1,a);t.setRenderTarget(r);let s=new tO.eaF(new tO.bdM,new tO.V9B({color:0xffffff}));t.render(s,i),t.setRenderTarget(null);let n=s9(e,r.width,r.height);return t.readRenderTargetPixels(r,0,0,r.width,r.height,n),r.dispose(),s.geometry.dispose(),s.material.dispose(),c=0!==n[0]})(this._type,this._renderer,this._camera,t)){let e;1016===this._type&&(e=this._renderer.extensions.has("EXT_color_buffer_float")?1015:void 0),void 0!==e?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to 1015`),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 tO.eaF(new tO.bdM,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new tO.nWS(this.width,this.height,t),this._renderTarget.texture.mapping=e.renderTargetOptions?.mapping!==void 0?e.renderTargetOptions?.mapping:300}static instantiateRenderer(){let e=new aN.WebGLRenderer;return e.setSize(128,128),e}render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(e){throw this._renderer.setRenderTarget(null),e}this._renderer.setRenderTarget(null)};toArray(){if(!this._supportsReadPixels)throw Error("Can't read pixels in this browser");let e=s9(this._type,this._width,this._height);return this._renderer.readRenderTargetPixels(this._renderTarget,0,0,this._width,this._height,e),e}toDataTexture(e){let t=new tO.GYF(this.toArray(),this.width,this.height,1023,this._type,e?.mapping||300,e?.wrapS||1001,e?.wrapT||1001,e?.magFilter||1006,e?.minFilter||1006,e?.anisotropy||1,tO.Zr2);return t.generateMipmaps=e?.generateMipmaps!==void 0&&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 tO.BKk&&Object.values(this.material.uniforms).forEach(e=>{e.value instanceof tO.gPd&&e.value.dispose()}),Object.values(this.material).forEach(e=>{e instanceof tO.gPd&&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 s5 extends Error{}class s4 extends Error{}let s6=(e,t,i)=>{let a=RegExp(`${t}="([^"]*)"`,"i").exec(e);if(a)return a[1];let r=RegExp(`<${t}[^>]*>([\\s\\S]*?)</${t}>`,"i").exec(e);if(r){let e=r[1].match(/<rdf:li>([^<]*)<\/rdf:li>/g);return e&&3===e.length?e.map(e=>e.replace(/<\/?rdf:li>/g,"")):r[1].trim()}if(void 0!==i)return i;throw Error(`Can't find ${t} in gainmap metadata`)};class s7{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)=>{let a,r=this.options.debug,s=new DataView(e.buffer);if(65496!==s.getUint16(0))return void i(Error("Not a valid jpeg"));let n=s.byteLength,o=2,l=0;for(;o<n;){if(++l>250)return void i(Error(`Found no marker after ${l} loops 😵`));if(255!==s.getUint8(o))return void i(Error(`Not a valid marker at offset 0x${o.toString(16)}, found: 0x${s.getUint8(o).toString(16)}`));if(a=s.getUint8(o+1),r&&console.log(`Marker: ${a.toString(16)}`),226===a){r&&console.log("Found APP2 marker (0xffe2)");let e=o+4;if(0x4d504600===s.getUint32(e)){let a,r=e+4;if(18761===s.getUint16(r))a=!1;else{if(19789!==s.getUint16(r))return void i(Error("No valid endianness marker found in TIFF header"));a=!0}if(42!==s.getUint16(r+2,!a))return void i(Error("Not valid TIFF data! (no 0x002A marker)"));let n=s.getUint32(r+4,!a);if(n<8)return void i(Error("Not valid TIFF data! (First offset less than 8)"));let o=r+n,l=s.getUint16(o,!a),A=o+2,h=0;for(let e=A;e<A+12*l;e+=12)45057===s.getUint16(e,!a)&&(h=s.getUint32(e+8,!a));let c=o+2+12*l+4,d=[];for(let e=c;e<c+16*h;e+=16){let t={MPType:s.getUint32(e,!a),size:s.getUint32(e+4,!a),dataOffset:s.getUint32(e+8,!a),dependantImages:s.getUint32(e+12,!a),start:-1,end:-1,isFII:!1};t.dataOffset?(t.start=r+t.dataOffset,t.isFII=!1):(t.start=0,t.isFII=!0),t.end=t.start+t.size,d.push(t)}if(this.options.extractNonFII&&d.length){let e=new Blob([s]),i=[];for(let t of d){if(t.isFII&&!this.options.extractFII)continue;let a=e.slice(t.start,t.end+1,"image/jpeg");i.push(a)}t(i)}}}o+=2+s.getUint16(o+2)}})}}let ne=async e=>{let t=(e=>{let t,i=(t="u">typeof TextDecoder?new TextDecoder().decode(e):e.toString()).indexOf("<x:xmpmeta");for(;-1!==i;){let e=t.indexOf("x:xmpmeta>",i),a=t.slice(i,e+10);try{let e=s6(a,"hdrgm:GainMapMin","0"),t=s6(a,"hdrgm:GainMapMax"),i=s6(a,"hdrgm:Gamma","1"),r=s6(a,"hdrgm:OffsetSDR","0.015625"),s=s6(a,"hdrgm:OffsetHDR","0.015625"),n=/hdrgm:HDRCapacityMin="([^"]*)"/.exec(a),o=n?n[1]:"0",l=/hdrgm:HDRCapacityMax="([^"]*)"/.exec(a);if(!l)throw Error("Incomplete gainmap metadata");let A=l[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(r)?r.map(e=>parseFloat(e)):[parseFloat(r),parseFloat(r),parseFloat(r)],offsetHdr:Array.isArray(s)?s.map(e=>parseFloat(e)):[parseFloat(s),parseFloat(s),parseFloat(s)],hdrCapacityMin:parseFloat(o),hdrCapacityMax:parseFloat(A)}}catch(e){}i=t.indexOf("<x:xmpmeta",e)}})(e);if(!t)throw new s4("Gain map XMP metadata not found");let i=new s7({extractFII:!0,extractNonFII:!0}),a=await i.extract(e);if(2!==a.length)throw new s5("Gain map recovery image not found");return{sdr:new Uint8Array(await a[0].arrayBuffer()),gainMap:new Uint8Array(await a[1].arrayBuffer()),metadata:t}},nt=e=>new Promise((t,i)=>{let a=document.createElement("img");a.onload=()=>{t(a)},a.onerror=e=>{i(e)},a.src=URL.createObjectURL(e)});class ni extends tO.aHM{_renderer;_renderTargetOptions;_internalLoadingManager;_config;constructor(e,t){super(t),this._config=e,e.renderer&&(this._renderer=e.renderer),this._internalLoadingManager=new tO.KPJ}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.");let 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 tO.gPd,sdr:new tO.gPd});return this._config.createQuadRenderer({width:16,height:16,type:1016,colorSpace:tO.Zr2,material:e,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async processImages(e,t,i){let a,r,s=t?new Blob([t],{type:"image/jpeg"}):void 0,n=new Blob([e],{type:"image/jpeg"}),o=!1;if("u"<typeof createImageBitmap){let e=await Promise.all([s?nt(s):Promise.resolve(void 0),nt(n)]);r=e[0],a=e[1],o="flipY"===i}else{let e=await Promise.all([s?createImageBitmap(s,{imageOrientation:i||"flipY"}):Promise.resolve(void 0),createImageBitmap(n,{imageOrientation:i||"flipY"})]);r=e[0],a=e[1]}return{sdrImage:a,gainMapImage:r,needsFlip:o}}createTextures(e,t,i){let a=new tO.gPd(t||new ImageData(2,2),300,1001,1001,1006,1008,1023,1009,1,tO.Zr2);a.flipY=i,a.needsUpdate=!0;let r=new tO.gPd(e,300,1001,1001,1006,1008,1023,1009,1,"srgb");return r.flipY=i,r.needsUpdate=!0,{gainMap:a,sdr:r}}updateQuadRenderer(e,t,i,a,r){e.width=t.width,e.height=t.height,e.material.gainMap=i,e.material.sdr=a,e.material.gainMapMin=r.gainMapMin,e.material.gainMapMax=r.gainMapMax,e.material.offsetHdr=r.offsetHdr,e.material.offsetSdr=r.offsetSdr,e.material.gamma=r.gamma,e.material.hdrCapacityMin=r.hdrCapacityMin,e.material.hdrCapacityMax=r.hdrCapacityMax,e.material.maxDisplayBoost=Math.pow(2,r.hdrCapacityMax),e.material.needsUpdate=!0}}let na=`
|
|
423
|
-
varying vec2 vUv;
|
|
424
|
-
|
|
425
|
-
void main() {
|
|
426
|
-
vUv = uv;
|
|
427
|
-
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
428
|
-
}
|
|
429
|
-
`,nr=`
|
|
430
|
-
// min half float value
|
|
431
|
-
#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 )
|
|
432
|
-
// max half float value
|
|
433
|
-
#define HALF_FLOAT_MAX vec3( 65504, 65504, 65504 )
|
|
434
|
-
|
|
435
|
-
uniform sampler2D sdr;
|
|
436
|
-
uniform sampler2D gainMap;
|
|
437
|
-
uniform vec3 gamma;
|
|
438
|
-
uniform vec3 offsetHdr;
|
|
439
|
-
uniform vec3 offsetSdr;
|
|
440
|
-
uniform vec3 gainMapMin;
|
|
441
|
-
uniform vec3 gainMapMax;
|
|
442
|
-
uniform float weightFactor;
|
|
443
|
-
|
|
444
|
-
varying vec2 vUv;
|
|
445
|
-
|
|
446
|
-
void main() {
|
|
447
|
-
vec3 rgb = texture2D( sdr, vUv ).rgb;
|
|
448
|
-
vec3 recovery = texture2D( gainMap, vUv ).rgb;
|
|
449
|
-
vec3 logRecovery = pow( recovery, gamma );
|
|
450
|
-
vec3 logBoost = gainMapMin * ( 1.0 - logRecovery ) + gainMapMax * logRecovery;
|
|
451
|
-
vec3 hdrColor = (rgb + offsetSdr) * exp2( logBoost * weightFactor ) - offsetHdr;
|
|
452
|
-
vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor ));
|
|
453
|
-
gl_FragColor = vec4( clampedHdrColor , 1.0 );
|
|
454
|
-
}
|
|
455
|
-
`;class ns extends tO.BKk{_maxDisplayBoost;_hdrCapacityMin;_hdrCapacityMax;constructor({gamma:e,offsetHdr:t,offsetSdr:i,gainMapMin:a,gainMapMax:r,maxDisplayBoost:s,hdrCapacityMin:n,hdrCapacityMax:o,sdr:l,gainMap:A}){super({name:"GainMapDecoderMaterial",vertexShader:na,fragmentShader:nr,uniforms:{sdr:{value:l},gainMap:{value:A},gamma:{value:new tO.Pq0(1/e[0],1/e[1],1/e[2])},offsetHdr:{value:new tO.Pq0().fromArray(t)},offsetSdr:{value:new tO.Pq0().fromArray(i)},gainMapMin:{value:new tO.Pq0().fromArray(a)},gainMapMax:{value:new tO.Pq0().fromArray(r)},weightFactor:{value:(Math.log2(s)-n)/(o-n)}},blending:0,depthTest:!1,depthWrite:!1}),this._maxDisplayBoost=s,this._hdrCapacityMin=n,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(){let e=this.uniforms.gamma.value;return[1/e.x,1/e.y,1/e.z]}set gamma(e){let 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(){let e=(Math.log2(this._maxDisplayBoost)-this._hdrCapacityMin)/(this._hdrCapacityMax-this._hdrCapacityMin);this.uniforms.weightFactor.value=Math.max(0,Math.min(1,e))}}aN.WebGLRenderer;class nn extends ni{constructor(e,t){super({renderer:e,createMaterial:e=>new ns(e),createQuadRenderer:e=>new s3(e)},t)}async render(e,t,i,a){let{sdrImage:r,gainMapImage:s,needsFlip:n}=await this.processImages(i,a,"flipY"),{gainMap:o,sdr:l}=this.createTextures(r,s,n);this.updateQuadRenderer(e,r,o,l,t),e.render()}}class no extends nn{load(e,t,i,a){let r=this.prepareQuadRenderer(),s=new tO.Y9S(this._internalLoadingManager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(this.withCredentials),this.manager.itemStart(e),s.load(e,async i=>{let s,n,o;if("string"==typeof i)throw Error("Invalid buffer, received [string], was expecting [ArrayBuffer]");let l=new Uint8Array(i);try{let e=await ne(l);s=e.sdr,n=e.gainMap,o=e.metadata}catch(t){if(t instanceof s4||t instanceof s5)console.warn(`Failure to reconstruct an HDR image from ${e}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),o={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},s=l;else throw t}try{await this.render(r,o,s.buffer,n?.buffer)}catch(t){this.manager.itemError(e),"function"==typeof a&&a(t),r.disposeOnDemandRenderer();return}"function"==typeof t&&t(r),this.manager.itemEnd(e),r.disposeOnDemandRenderer()},i,t=>{this.manager.itemError(e),"function"==typeof a&&a(t)}),r}}var nl=i(7807);class nA extends nl.Y{constructor(e){console.warn("RGBELoader has been deprecated. Please use HDRLoader instead."),super(e)}}let nh={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]}]},nc={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 nd extends tO.Z58{constructor(e){super(),this.position.y=-3.5;const t=new tO.iNn;t.deleteAttribute("uv");const i=new tO._4j({metalness:0,side:1}),a=new tO._4j({metalness:0}),r="legacy"==e?nh:nc,s=new tO.HiM(0xffffff,r.topLight.intensity,28,2);s.position.set(...r.topLight.position),this.add(s);const n=new tO.eaF(t,i);for(const e of(n.position.set(...r.room.position),n.scale.set(...r.room.scale),this.add(n),r.boxes)){const i=new tO.eaF(t,a);i.position.set(...e.position),i.rotation.set(0,e.rotation,0),i.scale.set(...e.scale),this.add(i)}for(const e of r.lights){const i=new tO.eaF(t,this.createAreaLightMaterial(e.intensity));i.position.set(...e.position),i.scale.set(...e.scale),this.add(i)}}createAreaLightMaterial(e){let t=new tO.V9B;return t.color.setScalar(e),t}}let nu=/\.hdr(\.js)?$/;class ng{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 tO.Tap),this._ldrLoader.setWithCredentials(e),this._ldrLoader}imageLoader(e){return null==this._imageLoader&&(this._imageLoader=new no(this.threeRenderer)),this._imageLoader.setWithCredentials(e),this._imageLoader}hdrLoader(e){return null==this._hdrLoader&&(this._hdrLoader=new nA,this._hdrLoader.setDataType(1016)),this._hdrLoader.setWithCredentials(e),this._hdrLoader}async getLottieLoader(e){if(null==this._lottieLoader){let{LottieLoader:e}=await import(this.lottieLoaderUrl);this._lottieLoader=new e}return this._lottieLoader.setWithCredentials(e),this._lottieLoader}async loadImage(e,t){let i=await new Promise((i,a)=>this.ldrLoader(t).load(e,i,()=>{},a));return i.name=e,i.flipY=!1,i}async loadLottie(e,t,i){let a=await this.getLottieLoader(i);a.setQuality(t);let r=await new Promise((t,i)=>a.load(e,t,()=>{},i));return r.name=e,r}async loadEquirect(e,t=!1,i=()=>{}){try{let a=nu.test(e),r=a?this.hdrLoader(t):this.imageLoader(t),s=await new Promise((t,a)=>r.load(e,e=>{let{renderTarget:i}=e;if(null!=i){let{texture:a}=i;e.dispose(!1),t(a)}else t(e)},e=>{i(e.loaded/e.total*.9)},a));return i(1),s.name=e,s.mapping=303,a||(s.colorSpace="srgb"),s}finally{i&&i(1)}}async generateEnvironmentMapAndSkybox(e=null,t=null,i=()=>{},a=!1){let r,s="legacy"!==t;("legacy"===t||"neutral"===t)&&(t=null),t=eY(t);let n=Promise.resolve(null);e&&(n=this.loadEquirectFromUrl(e,a,i)),r=t?this.loadEquirectFromUrl(t,a,i):e?this.loadEquirectFromUrl(e,a,i):s?this.loadGeneratedEnvironmentMapAlt():this.loadGeneratedEnvironmentMap();let[o,l]=await Promise.all([r,n]);if(null==o)throw Error("Failed to load environment map.");return{environmentMap:o,skybox:l}}async loadEquirectFromUrl(e,t,i){if(!this.skyboxCache.has(e)){let a=this.loadEquirect(e,t,i);this.skyboxCache.set(e,a)}return this.skyboxCache.get(e)}async GenerateEnvironmentMap(e,t){await ((e=0)=>new Promise(t=>setTimeout(t,e)))();let i=this.threeRenderer,a=new aN.WebGLCubeRenderTarget(256,{generateMipmaps:!1,type:1016,format:1023,colorSpace:tO.Zr2,depthBuffer:!0}),r=new tO.F1T(.1,100,a),s=r.renderTarget.texture;s.name=t;let n=i.outputColorSpace,o=i.toneMapping;return i.toneMapping=0,i.outputColorSpace=tO.Zr2,r.update(i,e),this.blurCubemap(a,.04),i.toneMapping=o,i.outputColorSpace=n,s}async loadGeneratedEnvironmentMap(){return null==this.generatedEnvironmentMap&&(this.generatedEnvironmentMap=this.GenerateEnvironmentMap(new nd("legacy"),"legacy")),this.generatedEnvironmentMap}async loadGeneratedEnvironmentMapAlt(){return null==this.generatedEnvironmentMapAlt&&(this.generatedEnvironmentMapAlt=this.GenerateEnvironmentMap(new nd("neutral"),"neutral")),this.generatedEnvironmentMapAlt}blurCubemap(e,t){if(null==this.blurMaterial){this.blurMaterial=this.getBlurShader(20);let e=new tO.iNn,t=new tO.eaF(e,this.blurMaterial);this.blurScene=new tO.Z58,this.blurScene.add(t)}let i=e.clone();this.halfblur(e,i,t,"latitudinal"),this.halfblur(i,e,t,"longitudinal")}halfblur(e,t,i,a){let r=e.width,s=isFinite(i)?Math.PI/(2*r):2*Math.PI/39,n=i/s,o=isFinite(i)?1+Math.floor(3*n):20;o>20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${o} samples when the maximum is set to 20`);let l=[],A=0;for(let e=0;e<20;++e){let t=e/n,i=Math.exp(-t*t/2);l.push(i),0==e?A+=i:e<o&&(A+=2*i)}for(let e=0;e<l.length;e++)l[e]=l[e]/A;let h=this.blurMaterial.uniforms;h.envMap.value=e.texture,h.samples.value=o,h.weights.value=l,h.latitudinal.value="latitudinal"===a,h.dTheta.value=s,new tO.F1T(.1,100,t).update(this.threeRenderer,this.blurScene)}getBlurShader(e){let t=new Float32Array(e),i=new tO.Pq0(0,1,0);return new tO.BKk({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:`
|
|
456
|
-
|
|
457
|
-
varying vec3 vOutputDirection;
|
|
458
|
-
|
|
459
|
-
void main() {
|
|
460
|
-
|
|
461
|
-
vOutputDirection = vec3( position );
|
|
462
|
-
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
463
|
-
|
|
464
|
-
}
|
|
465
|
-
`,fragmentShader:`
|
|
466
|
-
varying vec3 vOutputDirection;
|
|
467
|
-
|
|
468
|
-
uniform samplerCube envMap;
|
|
469
|
-
uniform int samples;
|
|
470
|
-
uniform float weights[ n ];
|
|
471
|
-
uniform bool latitudinal;
|
|
472
|
-
uniform float dTheta;
|
|
473
|
-
uniform vec3 poleAxis;
|
|
474
|
-
|
|
475
|
-
vec3 getSample( float theta, vec3 axis ) {
|
|
476
|
-
|
|
477
|
-
float cosTheta = cos( theta );
|
|
478
|
-
// Rodrigues' axis-angle rotation
|
|
479
|
-
vec3 sampleDirection = vOutputDirection * cosTheta
|
|
480
|
-
+ cross( axis, vOutputDirection ) * sin( theta )
|
|
481
|
-
+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
|
|
482
|
-
|
|
483
|
-
return vec3( textureCube( envMap, sampleDirection ) );
|
|
484
|
-
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
void main() {
|
|
488
|
-
|
|
489
|
-
vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
|
|
490
|
-
|
|
491
|
-
if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
|
|
492
|
-
|
|
493
|
-
axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
|
|
494
|
-
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
axis = normalize( axis );
|
|
498
|
-
|
|
499
|
-
gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
|
|
500
|
-
gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
|
|
501
|
-
|
|
502
|
-
for ( int i = 1; i < n; i++ ) {
|
|
503
|
-
|
|
504
|
-
if ( i >= samples ) {
|
|
505
|
-
|
|
506
|
-
break;
|
|
507
|
-
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
float theta = dTheta * float( i );
|
|
511
|
-
gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
|
|
512
|
-
gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
`,blending:0,depthTest:!1,depthWrite:!1,side:1})}async dispose(){for(let[,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()}}let np=[1,.79,.62,.5,.4,.31,.25],nm="high-performance";class nf extends tO.Qev{static get singleton(){return this._singleton||(this._singleton=new nf({powerPreference:(self.ModelViewerElement||{}).powerPreference||nm,debug:e0()})),this._singleton}static resetSingleton(){let e=this._singleton.dispose();for(let t of e)t.disconnectedCallback();for(let t of(this._singleton=new nf({powerPreference:(self.ModelViewerElement||{}).powerPreference||nm,debug:e0()}),e))t.connectedCallback()}get canRender(){return null!=this.threeRenderer}get scaleFactor(){return np[this.scaleStep]}set minScale(e){let t=1;for(;t<np.length&&!(np[t]<e);)++t;this.lastStep=t-1}constructor(e){super(),this.loader=new aa(s8),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;for(let t of(null==(e=this.textureUtils)||e.dispose(),this.textureUtils=this.canRender?new ng(this.threeRenderer):null,this.scenes))t.element[tL]()},this.dpr=window.devicePixelRatio,this.canvas3D=document.createElement("canvas"),this.canvas3D.id="webgl-canvas",this.canvas3D.classList.add("show");try{this.threeRenderer=new aN.WebGLRenderer({canvas:this.canvas3D,alpha:!0,antialias:!0,powerPreference:e.powerPreference,preserveDrawingBuffer:!0}),this.threeRenderer.autoClear=!0,this.threeRenderer.setPixelRatio(1),this.threeRenderer.debug={checkShaderErrors:!!e.debug,onShaderError:null},this.threeRenderer.toneMapping=7}catch(e){console.warn(e)}this.arRenderer=this.canRender?new sN(this):null,this.textureUtils=this.canRender?new ng(this.threeRenderer):null,this.canRender&&aa.initializeKTX2Loader(this.threeRenderer),this.canvas3D.addEventListener("webglcontextlost",this.onWebGLContextLost),this.canvas3D.addEventListener("webglcontextrestored",this.onWebGLContextRestored),this.updateRendererSize()}registerScene(e){if(this.scenes.add(e),e.forceRescale(),this.canRender){let t=new tO.I9Y;this.threeRenderer.getSize(t),e.canvas.width=t.x,e.canvas.height=t.y,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[lh]}countVisibleScenes(){let{canvas3D:e}=this,t=0,i=null;for(let a of this.scenes){let{element:r}=a;r.modelIsVisible&&null==a.externalRenderer&&++t,e.parentElement===a.canvas.parentElement&&(i=a)}let a=t>1;if(null!=i){let t=a&&!this.multipleScenesVisible,r=!i.element.modelIsVisible;if(t||r){let{width:t,height:a}=this.sceneSize(i);this.copyPixels(i,t,a),e.parentElement.removeChild(e)}}this.multipleScenesVisible=a}updateRendererSize(){var e;let t=window.devicePixelRatio;if(t!==this.dpr)for(let e of this.scenes){let{element:t}=e;t[o4](t.getBoundingClientRect())}let i=0,a=0;for(let e of this.scenes)i=Math.max(i,e.width),a=Math.max(a,e.height);if(i!==this.width||a!==this.height||t!==this.dpr)for(let r of(this.width=i,this.height=a,this.dpr=t,i=Math.ceil(i*t),a=Math.ceil(a*t),this.canRender&&this.threeRenderer.setSize(i,a,!1),this.scenes)){let{canvas:t}=r;t.width=i,t.height=a,r.forceRescale(),null==(e=r.effectRenderer)||e.setSize(i,a)}}updateRendererScale(e){let t=this.scaleStep;this.avgFrameDuration+=eZ(.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){let t=np[e.scaleStep],i=Math.ceil(this.width/t),a=Math.ceil(this.height/t),{style:r}=e.canvas;r.width=`${i}px`,r.height=`${a}px`,this.canvas3D.style.width=`${i}px`,this.canvas3D.style.height=`${a}px`;let s=this.dpr*t,n=t<1?"GPU throttling":this.dpr!==window.devicePixelRatio?"No meta viewport tag":"";e.element.dispatchEvent(new CustomEvent("render-scale",{detail:{reportedDpr:window.devicePixelRatio,renderedDpr:s,minimumDpr:this.dpr*np[this.lastStep],pixelWidth:Math.ceil(e.width*s),pixelHeight:Math.ceil(e.height*s),reason:n}}))}sceneSize(e){let{dpr:t}=this,i=np[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){let a=e.context;null==a?console.log("could not acquire 2d context"):(a.clearRect(0,0,t,i),a.drawImage(this.canvas3D,0,0,t,i,0,0,t,i),e.canvas.classList.add("show"))}orderedScenes(){let e=[];for(let t of[!1,!0])for(let i of this.scenes)i.element.modelIsVisible===t&&e.push(i);return e}get isPresenting(){var e;return(null==(e=this.arRenderer)?void 0:e.isPresenting)===!0}preRender(e,t,i){let{element:a,exposure:r,toneMapping:s}=e;a[lu](t,i);let n="number"==typeof r&&!Number.isNaN(r),o=a.environmentImage,l=a.skyboxImage;this.threeRenderer.toneMappingExposure=(n?r:1)*(7!==s||"neutral"!==o&&"legacy"!==o&&(o||l)?1:1.3)}render(e,t){if(null!=t){null!=this.arRenderer&&this.arRenderer.onWebXRFrame(e,t);return}let 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);let{canvas3D:a}=this;for(let t of this.orderedScenes()){let{element:r}=t;if(!r.loaded||!r.modelIsVisible&&t.renderCount>0||(this.preRender(t,e,i),!this.shouldRender(t)))continue;if(null!=t.externalRenderer){let e=t.getCamera();e.updateMatrix();let{matrix:i,projectionMatrix:a}=e,r=i.elements.slice(),s=t.getTarget();r[12]+=s.x,r[13]+=s.y,r[14]+=s.z,t.externalRenderer.render({viewMatrix:r,projectionMatrix:a.elements});continue}if(!r.modelIsVisible&&!this.multipleScenesVisible)for(let e of this.scenes)e.element.modelIsVisible&&e.queueRender();let{width:s,height:n}=this.sceneSize(t);t.renderShadow(this.threeRenderer),this.threeRenderer.setRenderTarget(null),this.threeRenderer.setViewport(0,Math.ceil(this.height*this.dpr)-n,s,n),null!=t.effectRenderer?t.effectRenderer.render(i):(this.threeRenderer.autoClear=!0,this.threeRenderer.toneMapping=t.toneMapping,this.threeRenderer.render(t,t.camera)),this.multipleScenesVisible||!t.element.modelIsVisible&&0===t.renderCount?this.copyPixels(t,s,n):a.parentElement!==t.canvas.parentElement&&(t.canvas.parentElement.appendChild(a),t.canvas.classList.remove("show")),t.hasRendered(),++t.renderCount,this.renderedLastFrame=!0}}dispose(){null!=this.textureUtils&&this.textureUtils.dispose(),null!=this.threeRenderer&&this.threeRenderer.dispose(),this.textureUtils=null,this.threeRenderer=null;let e=[];for(let t of this.scenes)e.push(t.element);return this.canvas3D.removeEventListener("webglcontextlost",this.onWebGLContextLost),this.canvas3D.removeEventListener("webglcontextrestored",this.onWebGLContextRestored),e}}let nb=Symbol("correlatedObjects"),nI=Symbol("onUpdate");class nC{constructor(e,t){this[nI]=e,this[nb]=t}}let nE=new tO.V9B,ny=new tO.bdM(2,2),nw=0,nB=Symbol("threeTexture"),nv=Symbol("threeTextures");Symbol("applyTexture");class nx extends nC{get[nB](){var e;return null==(e=this[nb])?void 0:e.values().next().value}get[nv](){return this[nb]}constructor(e,t){super(e,new Set(t?[t]:[]));const i=this[nB].image;i.src||(i.src=t.name?t.name:"adhoc_image"+nw++),i.name||(i.name=t&&i&&i.src?i.src.split("/").pop():"adhoc_image")}get name(){return this[nB].image.name||""}get uri(){return this[nB].image.src}get bufferView(){return this[nB].image.bufferView}get element(){let e=this[nB];if(e&&(e.isCanvasTexture||e.isVideoTexture))return e.image}get animation(){let e=this[nB];if(e&&e.isCanvasTexture&&e.animation)return e.animation}get type(){return null!=this.uri?"external":"embedded"}set name(e){for(let t of this[nv])t.image.name=e}update(){let e=this[nB];e&&e.isCanvasTexture&&!e.animation&&(this[nB].needsUpdate=!0,this[nI]())}async createThumbnail(e,t){let i=new tO.Z58;nE.map=this[nB];let a=new tO.eaF(ny,nE);i.add(a);let r=new tO.qUd(-1,1,1,-1,0,1),{threeRenderer:s}=nf.singleton,n=new tO.nWS(e,t);s.setRenderTarget(n),s.render(i,r),s.setRenderTarget(null);let o=new Uint8Array(e*t*4);s.readRenderTargetPixels(n,0,0,e,t,o),oW.width=e,oW.height=t;let l=oW.getContext("2d"),A=l.createImageData(e,t);return A.data.set(o),l.putImageData(A,0,0),new Promise(async(e,t)=>{oW.toBlob(i=>{if(!i)return t("Failed to capture thumbnail.");e(URL.createObjectURL(i))},"image/png")})}}(e1=ts||(ts={}))[e1.Nearest=9728]="Nearest",e1[e1.Linear=9729]="Linear",e1[e1.NearestMipmapNearest=9984]="NearestMipmapNearest",e1[e1.LinearMipmapNearest=9985]="LinearMipmapNearest",e1[e1.NearestMipmapLinear=9986]="NearestMipmapLinear",e1[e1.LinearMipmapLinear=9987]="LinearMipmapLinear",(e2=tn||(tn={}))[e2.ClampToEdge=33071]="ClampToEdge",e2[e2.MirroredRepeat=33648]="MirroredRepeat",e2[e2.Repeat=10497]="Repeat";let nQ=new Map([[tn.Repeat,1e3],[tn.ClampToEdge,1001],[tn.MirroredRepeat,1002]]),nS=new Map([[1e3,tn.Repeat],[1001,tn.ClampToEdge],[1002,tn.MirroredRepeat]]),nM=new Map([[ts.Nearest,1003],[ts.Linear,1006],[ts.NearestMipmapNearest,1004],[ts.LinearMipmapNearest,1007],[ts.NearestMipmapLinear,1005],[ts.LinearMipmapLinear,1008]]),nR=new Map([[1003,ts.Nearest],[1006,ts.Linear],[1004,ts.NearestMipmapNearest],[1007,ts.LinearMipmapNearest],[1005,ts.NearestMipmapLinear],[1008,ts.LinearMipmapLinear]]),nD=new Map([[ts.Nearest,1003],[ts.Linear,1006]]),nT=new Map([[1003,ts.Nearest],[1006,ts.Linear]]),nk=Symbol("threeTexture"),nF=Symbol("threeTextures"),nL=Symbol("setProperty");class nP extends nC{get[nk](){var e;return null==(e=this[nb])?void 0:e.values().next().value}get[nF](){return this[nb]}constructor(e,t){super(e,new Set(t?[t]:[]))}get name(){return this[nk].name||""}get minFilter(){return nR.get(this[nk].minFilter)}get magFilter(){return nT.get(this[nk].magFilter)}get wrapS(){return nS.get(this[nk].wrapS)}get wrapT(){return nS.get(this[nk].wrapT)}get rotation(){return this[nk].rotation}get scale(){return ly(this[nk].repeat)}get offset(){return ly(this[nk].offset)}setMinFilter(e){this[nL]("minFilter",nM.get(e))}setMagFilter(e){this[nL]("magFilter",nD.get(e))}setWrapS(e){this[nL]("wrapS",nQ.get(e))}setWrapT(e){this[nL]("wrapT",nQ.get(e))}setRotation(e){null==e&&(e=0),this[nL]("rotation",e)}setScale(e){null==e&&(e={u:1,v:1}),this[nL]("repeat",new tO.I9Y(e.u,e.v))}setOffset(e){null==e&&(e={u:0,v:0}),this[nL]("offset",new tO.I9Y(e.u,e.v))}[nL](e,t){if(((e,t)=>{switch(e){case"minFilter":let i;return i=t,nR.has(i);case"magFilter":let a;return a=t,nT.has(a);case"wrapS":case"wrapT":let r;return r=t,nS.has(r);case"rotation":case"repeat":case"offset":return!0;default:throw Error(`Cannot configure property "${e}" on Sampler`)}})(e,t))for(let i of this[nF])i[e]=t,i.needsUpdate=!0;this[nI]()}}let n_=Symbol("image"),nU=Symbol("sampler"),nG=Symbol("threeTexture");class nN extends nC{get[nG](){var e;return null==(e=this[nb])?void 0:e.values().next().value}constructor(e,t){super(e,new Set(t?[t]:[])),this[nU]=new nP(e,t),this[n_]=new nx(e,t)}get name(){return this[nG].name||""}set name(e){for(let t of this[nb])t.name=e}get sampler(){return this[nU]}get source(){return this[n_]}}let nO=Symbol("texture"),nq=Symbol("transform"),nH=Symbol("materials"),nj=Symbol("usage"),nz=Symbol("onUpdate"),nK=Symbol("activeVideo");(e8=th||(th={}))[e8.Base=0]="Base",e8[e8.MetallicRoughness=1]="MetallicRoughness",e8[e8.Normal=2]="Normal",e8[e8.Occlusion=3]="Occlusion",e8[e8.Emissive=4]="Emissive",e8[e8.Clearcoat=5]="Clearcoat",e8[e8.ClearcoatRoughness=6]="ClearcoatRoughness",e8[e8.ClearcoatNormal=7]="ClearcoatNormal",e8[e8.SheenColor=8]="SheenColor",e8[e8.SheenRoughness=9]="SheenRoughness",e8[e8.Transmission=10]="Transmission",e8[e8.Thickness=11]="Thickness",e8[e8.Specular=12]="Specular",e8[e8.SpecularColor=13]="SpecularColor",e8[e8.Iridescence=14]="Iridescence",e8[e8.IridescenceThickness=15]="IridescenceThickness",e8[e8.Anisotropy=16]="Anisotropy";class nJ{constructor(e,t,i,a){this[to]=null,this[tl]={rotation:0,scale:new tO.I9Y(1,1),offset:new tO.I9Y(0,0)},this[tA]=!1,i&&(this[nq].rotation=i.rotation,this[nq].scale.copy(i.repeat),this[nq].offset.copy(i.offset),this[nO]=new nN(e,i)),this[nz]=e,this[nH]=a,this[nj]=t}get texture(){return this[nO]}setTexture(e){var t,i;let a=null!=e?e.source[nB]:null,r=null==(t=this[nO])?void 0:t.source[nB];if(null!=r&&r.isVideoTexture?this[nK]=!1:(null==(i=this[nO])?void 0:i.source.animation)&&this[nO].source.animation.removeEventListener("enterFrame",this[nz]),this[nO]=e,null!=a&&a.isVideoTexture){let e=a.image;if(this[nK]=!0,null!=e.requestVideoFrameCallback){let t=()=>{this[nK]&&(this[nz](),e.requestVideoFrameCallback(t))};e.requestVideoFrameCallback(t)}else{let e=()=>{this[nK]&&(this[nz](),requestAnimationFrame(e))};requestAnimationFrame(e)}}else(null==e?void 0:e.source.animation)!=null&&e.source.animation.addEventListener("enterFrame",this[nz]);let s="srgb";if(this[nH])for(let e of this[nH]){switch(this[nj]){case th.Base:e.map=a;break;case th.MetallicRoughness:s=tO.Zr2,e.metalnessMap=a,e.roughnessMap=a;break;case th.Normal:s=tO.Zr2,e.normalMap=a;break;case th.Occlusion:s=tO.Zr2,e.aoMap=a;break;case th.Emissive:e.emissiveMap=a;break;case th.Clearcoat:e.clearcoatMap=a;break;case th.ClearcoatRoughness:e.clearcoatRoughnessMap=a;break;case th.ClearcoatNormal:e.clearcoatNormalMap=a;break;case th.SheenColor:e.sheenColorMap=a;break;case th.SheenRoughness:e.sheenRoughnessMap=a;break;case th.Transmission:e.transmissionMap=a;break;case th.Thickness:e.thicknessMap=a;break;case th.Specular:e.specularIntensityMap=a;break;case th.SpecularColor:e.specularColorMap=a;break;case th.Iridescence:e.iridescenceMap=a;break;case th.IridescenceThickness:e.iridescenceThicknessMap=a;break;case th.Anisotropy:e.anisotropyMap=a}e.needsUpdate=!0}a&&(a.colorSpace=s,a.rotation=this[nq].rotation,a.repeat=this[nq].scale,a.offset=this[nq].offset),this[nz]()}}to=nO,tl=nq,tA=nK;let nV=Symbol("threeMaterial"),nY=Symbol("threeMaterials"),n$=Symbol("baseColorTexture"),nW=Symbol("metallicRoughnessTexture");class nX extends nC{get[nY](){return this[nb]}get[nV](){var e;return null==(e=this[nb])?void 0:e.values().next().value}constructor(e,t){super(e,t);const{map:i,metalnessMap:a}=t.values().next().value;this[n$]=new nJ(e,th.Base,i,t),this[nW]=new nJ(e,th.MetallicRoughness,a,t)}get baseColorFactor(){let e=[0,0,0,this[nV].opacity];return this[nV].color.toArray(e),e}get metallicFactor(){return this[nV].metalness}get roughnessFactor(){return this[nV].roughness}get baseColorTexture(){return this[n$]}get metallicRoughnessTexture(){return this[nW]}setBaseColorFactor(e){let t=new tO.Q1f;for(let i of(e instanceof Array?t.fromArray(e):t.set(e),this[nY]))i.color.set(t),e instanceof Array&&e.length>3?i.opacity=e[3]:(e=[0,0,0,i.opacity],t.toArray(e));this[nI]()}setMetallicFactor(e){for(let t of this[nY])t.metalness=e;this[nI]()}setRoughnessFactor(e){for(let t of this[nY])t.roughness=e;this[nI]()}}let nZ=Symbol("pbrMetallicRoughness"),n0=Symbol("normalTexture"),n1=Symbol("occlusionTexture"),n2=Symbol("emissiveTexture"),n8=Symbol("backingThreeMaterial"),n9=Symbol("applyAlphaCutoff"),n3=Symbol("getAlphaMode"),n5=Symbol("lazyLoadGLTFInfo"),n4=Symbol("initialize"),n6=Symbol("getLoadedMaterial"),n7=Symbol("ensureMaterialIsLoaded"),oe=Symbol("gltfIndex"),ot=Symbol("setActive"),oi=Symbol("variantIndices"),oa=Symbol("isActive"),or=Symbol("modelVariants"),os=Symbol("name"),on=Symbol("pbrTextures");class oo extends nC{get[(tc=oi,td=on,n8)](){return this[nb].values().next().value}constructor(e,t,i,a,r,s,n){super(e,r),this[tc]=new Set,this[td]=new Map,this[oe]=t,this[oa]=i,this[or]=a,this[os]=s,null==n?this[n4]():this[n5]=n}[n4](){let e=this[nI],t=this[nb];this[nZ]=new nX(e,t);let{normalMap:i,aoMap:a,emissiveMap:r}=t.values().next().value;this[n0]=new nJ(e,th.Normal,i,t),this[n1]=new nJ(e,th.Occlusion,a,t),this[n2]=new nJ(e,th.Emissive,r,t);let s=i=>{this[on].set(i,new nJ(e,i,null,t))};s(th.Clearcoat),s(th.ClearcoatRoughness),s(th.ClearcoatNormal),s(th.SheenColor),s(th.SheenRoughness),s(th.Transmission),s(th.Thickness),s(th.Specular),s(th.SpecularColor),s(th.Iridescence),s(th.IridescenceThickness),s(th.Anisotropy)}async [n6](){if(null!=this[n5]){let e=await this[n5].doLazyLoad();return this[n4](),this[n5]=void 0,this.ensureLoaded=async()=>{},e}return null}colorFromRgb(e){let t=new tO.Q1f;return e instanceof Array?t.fromArray(e):t.set(e),t}[n7](){if(null!=this[n5])throw Error(`Material "${this.name}" has not been loaded, call 'await
|
|
517
|
-
myMaterial.ensureLoaded()' before using an unloaded material.`)}async ensureLoaded(){await this[n6]()}get isLoaded(){return null==this[n5]}get isActive(){return this[oa]}[ot](e){this[oa]=e}get name(){return this[os]||""}set name(e){if(this[os]=e,null!=this[nb])for(let t of this[nb])t.name=e}get pbrMetallicRoughness(){return this[n7](),this[nZ]}get normalTexture(){return this[n7](),this[n0]}get occlusionTexture(){return this[n7](),this[n1]}get emissiveTexture(){return this[n7](),this[n2]}get emissiveFactor(){return this[n7](),this[n8].emissive.toArray()}get index(){return this[oe]}hasVariant(e){let t=this[or].get(e);return null!=t&&this[oi].has(t.index)}setEmissiveFactor(e){this[n7]();let t=this.colorFromRgb(e);for(let e of this[nb])e.emissive.set(t);this[nI]()}[n3](){return this[n8].transparent?"BLEND":this[n8].alphaTest>0?"MASK":"OPAQUE"}[n9](){for(let e of(this[n7](),this[nb]))"MASK"===this[n3]()?void 0==e.alphaTest&&(e.alphaTest=.5):e.alphaTest=void 0,e.needsUpdate=!0}setAlphaCutoff(e){for(let t of(this[n7](),this[nb]))t.alphaTest=e,t.needsUpdate=!0;this[n9](),this[nI]()}getAlphaCutoff(){return this[n7](),this[n8].alphaTest}setDoubleSided(e){for(let t of(this[n7](),this[nb]))t.side=2*!!e,t.needsUpdate=!0;this[nI]()}getDoubleSided(){return this[n7](),2==this[n8].side}setAlphaMode(e){this[n7]();let t=(e,t)=>{e.transparent=t,e.depthWrite=!t};for(let i of this[nb])t(i,"BLEND"===e),"MASK"===e?i.alphaTest=.5:i.alphaTest=void 0,i.needsUpdate=!0;this[nI]()}getAlphaMode(){return this[n7](),this[n3]()}get emissiveStrength(){return this[n7](),this[n8].emissiveIntensity}setEmissiveStrength(e){for(let t of(this[n7](),this[nb]))t.emissiveIntensity=e;this[nI]()}get clearcoatFactor(){return this[n7](),this[n8].clearcoat}get clearcoatRoughnessFactor(){return this[n7](),this[n8].clearcoatRoughness}get clearcoatTexture(){return this[n7](),this[on].get(th.Clearcoat)}get clearcoatRoughnessTexture(){return this[n7](),this[on].get(th.ClearcoatRoughness)}get clearcoatNormalTexture(){return this[n7](),this[on].get(th.ClearcoatNormal)}get clearcoatNormalScale(){return this[n7](),this[n8].clearcoatNormalScale.x}setClearcoatFactor(e){for(let t of(this[n7](),this[nb]))t.clearcoat=e;this[nI]()}setClearcoatRoughnessFactor(e){for(let t of(this[n7](),this[nb]))t.clearcoatRoughness=e;this[nI]()}setClearcoatNormalScale(e){for(let t of(this[n7](),this[nb]))t.clearcoatNormalScale=new tO.I9Y(e,e);this[nI]()}get ior(){return this[n7](),this[n8].ior}setIor(e){for(let t of(this[n7](),this[nb]))t.ior=e;this[nI]()}get sheenColorFactor(){return this[n7](),this[n8].sheenColor.toArray()}get sheenColorTexture(){return this[n7](),this[on].get(th.SheenColor)}get sheenRoughnessFactor(){return this[n7](),this[n8].sheenRoughness}get sheenRoughnessTexture(){return this[n7](),this[on].get(th.SheenRoughness)}setSheenColorFactor(e){this[n7]();let t=this.colorFromRgb(e);for(let e of this[nb])e.sheenColor.set(t),e.sheen=1;this[nI]()}setSheenRoughnessFactor(e){for(let t of(this[n7](),this[nb]))t.sheenRoughness=e,t.sheen=1;this[nI]()}get transmissionFactor(){return this[n7](),this[n8].transmission}get transmissionTexture(){return this[n7](),this[on].get(th.Transmission)}setTransmissionFactor(e){for(let t of(this[n7](),this[nb]))t.transmission=e;this[nI]()}get thicknessFactor(){return this[n7](),this[n8].thickness}get thicknessTexture(){return this[n7](),this[on].get(th.Thickness)}get attenuationDistance(){return this[n7](),this[n8].attenuationDistance}get attenuationColor(){return this[n7](),this[n8].attenuationColor.toArray()}setThicknessFactor(e){for(let t of(this[n7](),this[nb]))t.thickness=e;this[nI]()}setAttenuationDistance(e){for(let t of(this[n7](),this[nb]))t.attenuationDistance=e;this[nI]()}setAttenuationColor(e){this[n7]();let t=this.colorFromRgb(e);for(let e of this[nb])e.attenuationColor.set(t);this[nI]()}get specularFactor(){return this[n7](),this[n8].specularIntensity}get specularTexture(){return this[n7](),this[on].get(th.Specular)}get specularColorFactor(){return this[n7](),this[n8].specularColor.toArray()}get specularColorTexture(){return this[n7](),this[on].get(th.SheenColor)}setSpecularFactor(e){for(let t of(this[n7](),this[nb]))t.specularIntensity=e;this[nI]()}setSpecularColorFactor(e){this[n7]();let t=this.colorFromRgb(e);for(let e of this[nb])e.specularColor.set(t);this[nI]()}get iridescenceFactor(){return this[n7](),this[n8].iridescence}get iridescenceTexture(){return this[n7](),this[on].get(th.Iridescence)}get iridescenceIor(){return this[n7](),this[n8].iridescenceIOR}get iridescenceThicknessMinimum(){return this[n7](),this[n8].iridescenceThicknessRange[0]}get iridescenceThicknessMaximum(){return this[n7](),this[n8].iridescenceThicknessRange[1]}get iridescenceThicknessTexture(){return this[n7](),this[on].get(th.IridescenceThickness)}setIridescenceFactor(e){for(let t of(this[n7](),this[nb]))t.iridescence=e;this[nI]()}setIridescenceIor(e){for(let t of(this[n7](),this[nb]))t.iridescenceIOR=e;this[nI]()}setIridescenceThicknessMinimum(e){for(let t of(this[n7](),this[nb]))t.iridescenceThicknessRange[0]=e;this[nI]()}setIridescenceThicknessMaximum(e){for(let t of(this[n7](),this[nb]))t.iridescenceThicknessRange[1]=e;this[nI]()}get anisotropyStrength(){return this[n7](),this[n8].anisotropy}get anisotropyRotation(){return this[n7](),this[n8].anisotropyRotation}get anisotropyTexture(){return this[n7](),this[on].get(th.Anisotropy)}setAnisotropyStrength(e){for(let t of(this[n7](),this[nb]))t.anisotropy=e;this[nI]()}setAnisotropyRotation(e){for(let t of(this[n7](),this[nb]))t.anisotropyRotation=e;this[nI]()}}class ol{constructor(e){this.name="",this.children=[],this.name=e}}class oA extends ol{constructor(e,t,i,a){super(e.name),this.materials=new Map,this.variantToMaterialMap=new Map,this.initialMaterialIdx=0,this.activeMaterialIdx=0,this.mesh=e;const{gltf:r,threeGLTF:s,threeObjectMap:n}=a;this.parser=s.parser,this.modelVariants=i,this.mesh.userData.variantData=i;const o=n.get(e.material);null!=o.materials?this.initialMaterialIdx=this.activeMaterialIdx=o.materials:console.error(`Primitive (${e.name}) missing initial material reference.`);const l=e.userData.associations||{};if(null==l.meshes)return void console.error("Mesh is missing primitive index association");const A=((r.meshes||[])[l.meshes].primitives||[])[l.primitives];if(null==A)return void console.error("Mesh primitive definition is missing.");if(null!=A.material)this.materials.set(A.material,t[A.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(A.extensions&&A.extensions.KHR_materials_variants){const e=A.extensions.KHR_materials_variants,a=s.parser.json.extensions.KHR_materials_variants.variants;for(const r of e.mappings){const e=t[r.material];for(const t of(this.materials.set(r.material,e),r.variants)){const{name:r}=a[t];this.variantToMaterialMap.set(t,e),e[oi].add(t),i.has(r)||i.set(r,{name:r,index:t})}}}}async setActiveMaterial(e){let t=this.materials.get(e);if(e!==this.activeMaterialIdx){let i=t[nb],a=await t[n6]();null!=a?this.mesh.material=a:this.mesh.material=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)){let t=this.modelVariants.get(e);return this.enableVariantHelper(t.index)}return null}async enableVariantHelper(e){if(null!=this.variantToMaterialMap&&null!=e){let t=this.variantToMaterialMap.get(e);if(null!=t)return this.setActiveMaterial(t.index)}return null}async instantiateVariants(){if(null!=this.variantToMaterialMap)for(let e of this.variantToMaterialMap.keys()){let t=this.mesh.userData.variantMaterials.get(e);if(null!=t.material)continue;let 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});let i=this.modelVariants.get(t).index;return e[oi].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);let t=this.mesh.userData.variantMaterials;null!=t&&t.delete(e)}}updateVariantUserData(e,t){t[oi].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[nb].values().next().value,gltfMaterialIndex:t.index})}ensureVariantIsUnused(e){let 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)}}let oh=Symbol("materials"),oc=Symbol("hierarchy"),od=Symbol("roots"),ou=Symbol("primitives");Symbol("loadVariant");let og=Symbol("prepareVariantsForExport"),op=Symbol("switchVariant"),om=Symbol("materialFromPoint"),of=Symbol("nodeFromPoint"),ob=Symbol("nodeFromIndex"),oI=Symbol("variantData"),oC=Symbol("availableVariants"),oE=Symbol("modelOnUpdate"),oy=Symbol("cloneMaterial");class ow{constructor(e,t,i,a){this.gltf=e,this.gltfElementMap=t,this.mapKey=i,this.doLazyLoad=a}}class oB{constructor(e,t=()=>{}){this[tu]=[],this[tg]=[],this[tp]=[],this[tm]=[],this[tf]=()=>{},this[tb]=new Map,this[oE]=t;const{gltf:i,threeGLTF:a,gltfElementMap:r}=e;for(const[e,s]of i.materials.entries()){const n=r.get(s);if(null!=n)this[oh].push(new oo(t,e,!0,this[oI],n,s.name));else{const n=(i.materials||[])[e],o=new Set;r.set(n,o);const l=async()=>{let t=await a.parser.getDependency("material",e);return o.add(t),t};this[oh].push(new oo(t,e,!1,this[oI],o,s.name,new ow(i,r,n,l)))}}const s=new Map,n=[];for(const e of a.scene.children)n.push(e);for(;n.length>0;){const t=n.pop();let i=null;t instanceof tO.eaF?(i=new oA(t,this.materials,this[oI],e),this[ou].push(i)):i=new ol(t.name);const a=s.get(t);for(const e of(null!=a?a.children.push(i):this[od].push(i),this[oc].push(i),t.children))n.push(e),s.set(t,i)}}get materials(){return this[oh]}[(tu=oh,tg=oc,tp=od,tm=ou,tf=oE,tb=oI,oC)](){let e=Array.from(this[oI].values());return e.sort((e,t)=>e.index-t.index),e.map(e=>e.name)}getMaterialByName(e){let t=this[oh].filter(t=>t.name===e);return t.length>0?t[0]:null}[ob](e,t){let i=this[oc].find(i=>{if(i instanceof oA){let{meshes:a,primitives:r}=i.mesh.userData.associations;if(a==e&&r==t)return!0}return!1});return null==i?null:i}[of](e){return this[oc].find(t=>t instanceof oA&&t.mesh===e.object||!1)}[om](e){return this[of](e).getActiveMaterial()}async [op](e){for(let t of this[ou])await t.enableVariant(e);for(let e of this.materials)e[ot](!1);for(let e of this[ou])this.materials[e.getActiveMaterial().index][ot](!0)}async [og](){let e=[];for(let t of this[ou])e.push(t.instantiateVariants());await Promise.all(e)}[oy](e,t){let i=this.materials[e];i.isLoaded||console.error(`Cloning an unloaded material,
|
|
518
|
-
call 'material.ensureLoaded() before cloning the material.`);let a=i[nb],r=new Set;for(let[e,i]of a.entries()){let s=i.clone();s.name=t+(a.size>1?"_inst"+e:""),r.add(s)}let s=new oo(this[oE],this[oh].length,!1,this[oI],r,t);return this[oh].push(s),s}createMaterialInstanceForVariant(e,t,i,a=!0){let r=null;for(let a of this[ou]){let s=this[oI].get(i);null!=s&&a.variantInfo.has(s.index)||null!=a.getMaterial(e)&&(this.hasVariant(i)||this.createVariant(i),null==r&&(r=this[oy](e,t)),a.addVariant(r,i))}if(a&&null!=r)for(let t of(r[ot](!0),this.materials[e][ot](!1),this[ou]))t.enableVariant(i);return r}createVariant(e){this[oI].has(e)?console.warn(`Variant '${e}'' already exists`):this[oI].set(e,{name:e,index:this[oI].size})}hasVariant(e){return this[oI].has(e)}setMaterialToVariant(e,t){if(null==this[oC]().find(e=>e===t))return void console.warn(`Can't add material to '${t}', the variant does not exist.'`);if(e<0||e>=this.materials.length)return void console.error("setMaterialToVariant(): materialIndex is out of bounds.");for(let i of this[ou]){let a=i.getMaterial(e);null!=a&&i.addVariant(a,t)}}updateVariantName(e,t){let i=this[oI].get(e);null!=i&&(i.name=t,this[oI].set(t,i),this[oI].delete(e))}deleteVariant(e){let t=this[oI].get(e);if(null!=t){for(let i of this.materials)i.hasVariant(e)&&i[oi].delete(t.index);for(let e of this[ou])e.deleteVariant(t.index);this[oI].delete(e)}}}var ov=function(e,t,i,a){var r,s=arguments.length,n=s<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};let ox=Symbol("currentGLTF"),oQ=Symbol("originalGltfJson"),oS=Symbol("model"),oM=Symbol("getOnUpdateMethod"),oR=Symbol("buildTexture");class oD extends tO.eaF{constructor(){super(void 0,new tO.V9B({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){let a=new tO.Gu$(t,2*i,i);a.scale(1,1,-1);let r=a.getAttribute("position"),s=new tO.Pq0;for(let t=0;t<r.count;++t)if(s.fromBufferAttribute(r,t),s.y<0){let i=-(3*e)/2,a=s.y<i?-e/s.y:1-s.y*s.y/(3*i*i);s.multiplyScalar(a),s.toArray(r.array,3*t)}return r.needsUpdate=!0,a}(e,t,i)))}}let oT=new tO.Pq0,ok=new tO.Pq0,oF=new tO.Pq0,oL=new tO.dwI,oP=new tO.lMl,o_=new tO.PTz;class oU extends ar{constructor(e){super(document.createElement("div")),this.normal=new tO.Pq0(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;let t=aY(e)[0].terms;for(let e=0;e<3;++e)this.position.setComponent(e,a5(t[e]).number);this.updateMatrixWorld()}updateNormal(e){if(null==e)return;let t=aY(e)[0].terms;for(let e=0;e<3;++e)this.normal.setComponent(e,t[e].number)}updateSurface(){let{mesh:e,tri:t,bary:i}=this;if(null==e||null==t||null==i)return;e.getVertexPosition(t.x,oT),e.getVertexPosition(t.y,ok),e.getVertexPosition(t.z,oF),oT.toArray(oL.elements,0),ok.toArray(oL.elements,3),oF.toArray(oL.elements,6),this.position.copy(i).applyMatrix3(oL);let a=this.parent;a.worldToLocal(e.localToWorld(this.position)),oP.set(oT,ok,oF),oP.getNormal(this.normal).transformDirection(e.matrixWorld);let r=a.parent;o_.setFromAxisAngle(oT.set(0,1,0),-r.rotation.y),this.normal.applyQuaternion(o_)}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;let i=t.dataset.visibilityAttribute;if(null!=i){let a=`data-${i}`;t.toggleAttribute(a,e)}t.dispatchEvent(new CustomEvent("hotspot-visibility",{detail:{visible:e}}))}),this.initialized=!0}}let oG={name:"HorizontalBlurShader",uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:`
|
|
519
|
-
|
|
520
|
-
varying vec2 vUv;
|
|
521
|
-
|
|
522
|
-
void main() {
|
|
523
|
-
|
|
524
|
-
vUv = uv;
|
|
525
|
-
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
526
|
-
|
|
527
|
-
}`,fragmentShader:`
|
|
528
|
-
|
|
529
|
-
uniform sampler2D tDiffuse;
|
|
530
|
-
uniform float h;
|
|
531
|
-
|
|
532
|
-
varying vec2 vUv;
|
|
533
|
-
|
|
534
|
-
void main() {
|
|
535
|
-
|
|
536
|
-
vec4 sum = vec4( 0.0 );
|
|
537
|
-
|
|
538
|
-
sum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;
|
|
539
|
-
sum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;
|
|
540
|
-
sum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;
|
|
541
|
-
sum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;
|
|
542
|
-
sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;
|
|
543
|
-
sum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;
|
|
544
|
-
sum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;
|
|
545
|
-
sum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;
|
|
546
|
-
sum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;
|
|
547
|
-
|
|
548
|
-
gl_FragColor = sum;
|
|
549
|
-
|
|
550
|
-
}`},oN={name:"VerticalBlurShader",uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:`
|
|
551
|
-
|
|
552
|
-
varying vec2 vUv;
|
|
553
|
-
|
|
554
|
-
void main() {
|
|
555
|
-
|
|
556
|
-
vUv = uv;
|
|
557
|
-
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
558
|
-
|
|
559
|
-
}`,fragmentShader:`
|
|
560
|
-
|
|
561
|
-
uniform sampler2D tDiffuse;
|
|
562
|
-
uniform float v;
|
|
563
|
-
|
|
564
|
-
varying vec2 vUv;
|
|
565
|
-
|
|
566
|
-
void main() {
|
|
567
|
-
|
|
568
|
-
vec4 sum = vec4( 0.0 );
|
|
569
|
-
|
|
570
|
-
sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;
|
|
571
|
-
sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;
|
|
572
|
-
sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;
|
|
573
|
-
sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;
|
|
574
|
-
sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;
|
|
575
|
-
sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;
|
|
576
|
-
sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;
|
|
577
|
-
sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;
|
|
578
|
-
sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;
|
|
579
|
-
|
|
580
|
-
gl_FragColor = sum;
|
|
581
|
-
|
|
582
|
-
}`};class oO extends tO.B69{constructor(e,t,i){super(),this.camera=new tO.qUd,this.renderTarget=null,this.renderTargetBlur=null,this.depthMaterial=new tO.CSG,this.horizontalBlurMaterial=new tO.BKk(oG),this.verticalBlurMaterial=new tO.BKk(oN),this.intensity=0,this.softness=1,this.boundingBox=new tO.NRn,this.size=new tO.Pq0,this.maxDimension=0,this.isAnimated=!1,this.needsUpdate=!1;const{camera:a}=this;a.rotation.x=Math.PI/2,a.left=-.5,a.right=.5,a.bottom=-.5,a.top=.5,this.add(a);const r=new tO.bdM,s=new tO.V9B({opacity:1,transparent:!0,side:1});this.floor=new tO.eaF(r,s),this.floor.userData.noHit=!0,a.add(this.floor),this.blurPlane=new tO.eaF(r),this.blurPlane.visible=!1,a.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=2,this.horizontalBlurMaterial.depthTest=!1,this.verticalBlurMaterial.depthTest=!1,this.setScene(e,t,i)}setScene(e,t,i){let{boundingBox:a,size:r,rotation:s,position:n}=this;if(this.isAnimated=e.animationNames.length>0,this.boundingBox.copy(e.boundingBox),this.size.copy(e.size),this.maxDimension=Math.max(r.x,r.y,r.z)*(this.isAnimated?2:1),this.boundingBox.getCenter(n),"back"===i){let{min:e,max:t}=a;[e.y,e.z]=[e.z,e.y],[t.y,t.z]=[t.z,t.y],[r.y,r.z]=[r.z,r.y],s.x=Math.PI/2,s.y=Math.PI}else s.x=0,s.y=0;if(this.isAnimated){let e=a.min.y,t=a.max.y;r.y=this.maxDimension,a.expandByVector(r.subScalar(this.maxDimension).multiplyScalar(-.5)),a.min.y=e,a.max.y=t,r.set(this.maxDimension,t-e,this.maxDimension)}"bottom"===i?n.y=a.min.y:n.z=a.min.y,this.setSoftness(t)}setSoftness(e){this.softness=e;let{size:t,camera:i}=this,a=this.isAnimated?2:1,r=a*Math.pow(2,9-3*e);this.setMapSize(r);let s=t.y/2,n=t.y*a;i.near=0,i.far=(1-e)*n+e*s,this.depthMaterial.opacity=1/e,i.updateProjectionMatrix(),this.setIntensity(this.intensity),this.setOffset(0)}setMapSize(e){let{size:t}=this;this.isAnimated&&(e*=2);let i=Math.floor(t.x>t.z?e:e*t.x/t.z),a=Math.floor(t.x>t.z?e*t.z/t.x:e),r=10+i,s=10+a;if(null!=this.renderTarget&&(this.renderTarget.width!==r||this.renderTarget.height!==s)&&(this.renderTarget.dispose(),this.renderTarget=null,this.renderTargetBlur.dispose(),this.renderTargetBlur=null),null==this.renderTarget){let e={format:1023};this.renderTarget=new tO.nWS(r,s,e),this.renderTargetBlur=new tO.nWS(r,s,e),this.floor.material.map=this.renderTarget.texture}this.camera.scale.set(t.x*(1+10/i),t.z*(1+10/a),1),this.needsUpdate=!0}setIntensity(e){if(this.intensity=e,e>0){var t;this.visible=!0,this.floor.visible=!0,this.floor.material.opacity=e*((1-(t=this.softness*this.softness))*.3+ +t)}else 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;let i=e.getClearAlpha();e.setClearAlpha(0),this.floor.visible=!1;let a=e.xr.enabled;e.xr.enabled=!1;let r=e.getRenderTarget();e.setRenderTarget(this.renderTarget),e.render(t,this.camera),t.overrideMaterial=null,this.floor.visible=!0,this.blurShadow(e),e.xr.enabled=a,e.setRenderTarget(r),e.setClearAlpha(i)}blurShadow(e){let{camera:t,horizontalBlurMaterial:i,verticalBlurMaterial:a,renderTarget:r,renderTargetBlur:s,blurPlane:n}=this;n.visible=!0,n.material=i,i.uniforms.h.value=1/this.renderTarget.width,i.uniforms.tDiffuse.value=this.renderTarget.texture,e.setRenderTarget(s),e.render(n,t),n.material=a,a.uniforms.v.value=1/this.renderTarget.height,a.uniforms.tDiffuse.value=this.renderTargetBlur.texture,e.setRenderTarget(r),e.render(n,t),n.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()}}let oq=new tO.Pq0,oH=new tO.Pq0,oj=new tO.Pq0,oz=new tO.tBo,oK=new tO.Pq0,oJ=new tO.I9Y;class oV extends tO.Z58{constructor({canvas:e,element:t,width:i,height:a}){super(),this.annotationRenderer=new ah,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 tO.ubm(45,1,.1,100),this.xrCamera=null,this.url=null,this.pivot=new tO.B69,this.target=new tO.B69,this.animationNames=[],this.boundingBox=new tO.NRn,this.boundingSphere=new tO.iyt,this.size=new tO.Pq0,this.idealAspect=0,this.framedFoVDeg=0,this.shadow=null,this.shadowIntensity=0,this.shadowSoftness=1,this.bakedShadows=new Set,this.exposure=1,this.toneMapping=7,this.canScale=!0,this.isDirty=!1,this.goalTarget=new tO.Pq0,this.targetDamperX=new aH,this.targetDamperY=new aH,this.targetDamperZ=new aH,this._currentGLTF=null,this._model=null,this.cancelPendingSourceChange=null,this.animationsByName=new Map,this.currentAnimationAction=null,this.groundedSkybox=new oD,this.name="ModelScene",this.element=t,this.canvas=e,this.camera=new tO.ubm(45,1,.1,100),this.camera.name="MainCamera",this.add(this.pivot),this.pivot.name="Pivot",this.pivot.add(this.target),this.setSize(i,a),this.target.name="Target",this.mixer=new tO.Iw4(this.target);const{domElement:r}=this.annotationRenderer,{style:s}=r;s.display="none",s.pointerEvents="none",s.position="absolute",s.top="0",this.element.shadowRoot.querySelector(".default").appendChild(r),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=()=>{}){let i;if(!e||e===this.url)return void t(1);if(this.reset(),this.url=e,null!=this.externalRenderer){let e=await this.externalRenderer.load(t);this.boundingSphere.radius=e.framedRadius,this.idealAspect=e.fieldOfViewAspect;return}null!=this.cancelPendingSourceChange&&(this.cancelPendingSourceChange(),this.cancelPendingSourceChange=null);try{i=await new Promise((i,a)=>{this.cancelPendingSourceChange=()=>a(),(async()=>{try{let a=await this.element[lm].loader.load(e,this.element,t);i(a)}catch(e){a(e)}})()})}catch(e){if(null==e)return;throw e}this.cancelPendingSourceChange=null,this.reset(),this.url=e,this._currentGLTF=i,null!=i&&(this._model=i.scene,this.target.add(i.scene));let{animations:a}=i,r=new Map,s=[];for(let e of a)r.set(e.name,e),s.push(e.name);this.animations=a,this.animationsByName=r,this.animationNames=s,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();let{_model:e}=this;null!=e&&(e.removeFromParent(),this._model=null);let 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[ox]=null,this.element[oQ]=null,this.element[oS]=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){let 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){let t=new tO.NRn;e.traverse(e=>{if(!e.material||!e.material.transparent)return;t.setFromObject(e);let i=t.getSize(oK),a=Math.min(i.x,i.y,i.z);Math.max(i.x,i.y,i.z)<100*a||this.markBakedShadow(e)})}checkBakedShadows(){let{min:e,max:t}=this.boundingBox,i=new tO.NRn;for(let a of(this.boundingBox.getSize(this.size),this.bakedShadows))i.setFromObject(a),(!(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(a))}applyTransform(){let{model:e}=this;if(null==e)return;let t=aY(this.element.orientation)[0].terms,i=a5(t[0]).number,a=a5(t[1]).number,r=a5(t[2]).number;e.quaternion.setFromEuler(new tO.O9p(a,r,i,"YXZ"));let s=aY(this.element.scale)[0].terms;e.scale.set(s[0].number,s[1].number,s[2].number)}updateBoundingBox(){let{model:e}=this;if(null==e)return;this.target.remove(e),this.findBakedShadows(e);let t=(e,t)=>e.expandByPoint(t);this.setBakedShadowVisibility(!1),this.boundingBox=ac(e,t,new tO.NRn),this.boundingBox.isEmpty()&&(this.setBakedShadowVisibility(!0),this.bakedShadows.forEach(e=>this.unmarkBakedShadow(e)),this.boundingBox=ac(e,t,new tO.NRn)),this.checkBakedShadows(),this.setBakedShadowVisibility(),this.boundingBox.getSize(this.size),this.target.add(e)}async updateFraming(){let{model:e}=this;if(null==e)return;this.target.remove(e),this.setBakedShadowVisibility(!1);let{center:t}=this.boundingSphere;this.element.requestUpdate("cameraTarget"),await this.element.updateComplete,t.copy(this.getTarget()),this.boundingSphere.radius=Math.sqrt(ac(e,(e,i)=>Math.max(e,t.distanceToSquared(i)),0));let i=(e,i)=>(i.sub(t),Math.max(e,Math.sqrt(i.x*i.x+i.z*i.z)/(this.idealCameraDistance()-Math.abs(i.y))));this.idealAspect=ac(e,i,0)/Math.tan(this.framedFoVDeg/2*Math.PI/180),this.setBakedShadowVisibility(),this.target.add(e)}setBakedShadowVisibility(e=this.shadowIntensity<=0){for(let t of this.bakedShadows)t.visible=e}idealCameraDistance(){let e=this.framedFoVDeg/2*Math.PI/180;return this.boundingSphere.radius/Math.sin(e)}adjustedFoV(e){return 2*Math.atan(Math.tan(e/2*Math.PI/180)*Math.max(1,this.idealAspect/this.aspect))*180/Math.PI}getNDC(e,t){if(null!=this.xrCamera)oJ.set(e/window.screen.width,t/window.screen.height);else{let i=this.element.getBoundingClientRect();oJ.set((e-i.x)/this.width,(t-i.y)/this.height)}return oJ.multiplyScalar(2).subScalar(1),oJ.y*=-1,oJ}getSize(){return{width:this.width,height:this.height}}setEnvironmentAndSkybox(e,t){this.element[lm].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(){let e=a5(aY(this.element.skyboxHeight)[0].terms[0]).number,t=10*this.boundingSphere.radius;this.groundedSkybox.updateGeometry(e,t),this.groundedSkybox.position.y=e-(this.shadow?2*this.shadow.gap():0),this.setBackground(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){let t=this.goalTarget,i=this.target.position;if(t.equals(i))return!1;{let a=this.boundingSphere.radius/10,{x:r,y:s,z:n}=i;return r=this.targetDamperX.update(r,t.x,e,a),s=this.targetDamperY.update(s,t.y,e,a),n=this.targetDamperZ.update(n,t.z,e,a),this.groundedSkybox.position.x=-r,this.groundedSkybox.position.z=-n,this.target.position.set(r,s,n),this.target.updateMatrixWorld(),this.queueRender(),!0}}pointTowards(e,t){let{x:i,z:a}=this.position;this.yaw=Math.atan2(e-i,t-a)}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){let e=Math.max(this.currentAnimationAction._loopCount,0);return 2202===this.currentAnimationAction.loop&&(1&e)==1?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=2201,a=1/0){if(null==this._currentGLTF)return;let{animations:r}=this;if(null==r||0===r.length)return;let s=null;if(null!=e&&null==(s=this.animationsByName.get(e))){let t=parseInt(e);!isNaN(t)&&t>=0&&t<r.length&&(s=r[t])}null==s&&(s=r[0]);try{let{currentAnimationAction:e}=this,r=this.mixer.clipAction(s,this);this.currentAnimationAction=r,this.element.paused?this.mixer.stopAllAction():(r.paused=!1,null!=e&&r!==e?r.crossFadeFrom(e,t,!1):this.animationTimeScale>0&&this.animationTime==this.duration&&(this.animationTime=0)),r.setLoop(i,a),r.enabled=!0,r.clampWhenFinished=!0,r.play()}catch(e){console.error(e)}}appendAnimation(e="",t=2201,i=1/0,a=1,r=1,s=!1,n=!1,o=!0,l=null,A=!1){if(null==this._currentGLTF||e===this.element.animationName)return;let{animations:h}=this;if(null==h||0===h.length)return;let c=e?this.animationsByName.get(e):null;if(null==c)return;if("string"==typeof i?isNaN(parseFloat(i))?(i=1/0,console.warn(`Invalid repetitionCount value: ${i}. Using default: Infinity`)):(1>parseInt(i)&&console.warn(`Invalid repetitionCount value: ${i}. Using 1 as minimum.`),i=Math.max(parseInt(i),1)):"number"==typeof i&&i<1?(i=1,console.warn(`Invalid repetitionCount value: ${i}. Using 1 value as minimum.`)):console.warn(`Invalid repetitionCount value: ${i}. Using default: Infinity`),1===i&&2200!==t&&(t=2200),"string"==typeof a){let e=parseFloat(a);isNaN(e)||e<0||e>1?(a=1,console.warn(`Invalid weight value: ${a}. Using default: 1`)):a=e}if("string"==typeof r){let e=parseFloat(r);isNaN(e)||e<0?(r=1,console.warn(`Invalid timeScale value: ${r}. Using default: 1`)):r=e}if("string"==typeof l){let e=parseFloat(l);isNaN(e)?(l=null,console.warn(`Invalid time value: ${l}. Using default: 0 or previous time`)):l=e}let{shouldFade:d,duration:u}=this.parseFadeValue(s,!1,1.25),g=!1,p=0;"boolean"==typeof n?(g=n,p=1.25*!!n):"number"==typeof n?(g=n>0,p=Math.max(n,0),n<0&&console.warn(`Invalid warp value: ${n}. Using default: false`)):"string"==typeof n&&("true"===n.toLowerCase().trim()?(g=!0,p=1.25):"false"===n.toLowerCase().trim()?g=!1:isNaN(parseFloat(n))?console.warn(`Invalid warp value: ${n}. Using default: false`):(g=(p=Math.max(parseFloat(n),0))>0,p<=0&&console.warn(`Invalid warp value: ${n}. Using default: false`)));try{let s=this.mixer.existingAction(c)||this.mixer.clipAction(c,this),n=s.timeScale;A&&this.appendedAnimations.includes(e)&&!this.markedAnimations.map(e=>e.name).includes(e)&&this.markedAnimations.push({name:e,loopMode:t,repetitionCount:i}),"number"==typeof l&&(s.time=Math.min(Math.max(l,0),c.duration)),d?s.fadeIn(u):a>=0&&(s.weight=Math.min(Math.max(a,0),1)),g?s.warp(o?n:0,r,p):s.timeScale=r,s.isRunning()||(s.time==c.duration&&s.stop(),s.setLoop(t,i),s.paused=!1,s.enabled=!0,s.clampWhenFinished=!0,s.play()),this.appendedAnimations.includes(e)||this.element[lc].appendedAnimations.push(e)}catch(e){console.error(e)}}parseFadeValue(e,t=!0,i=1.5){if("boolean"==typeof e)return{shouldFade:e,duration:e?i:0};if("number"==typeof e){let t=Math.max(e,0);return{shouldFade:t>0,duration:t}}if("string"==typeof e){let t=e.toLowerCase().trim();if("true"===t)return{shouldFade:!0,duration:i};if("false"===t)return{shouldFade:!1,duration:0};let a=parseFloat(t);if(!isNaN(a)){let e=Math.max(a,0);return{shouldFade:e>0,duration:e}}}return console.warn(`Invalid fade value: ${e}. Using default: ${t}`),{shouldFade:t,duration:t?i:0}}detachAnimation(e="",t=!0){if(null==this._currentGLTF||e===this.element.animationName)return;let{animations:i}=this;if(null==i||0===i.length)return;let a=e?this.animationsByName.get(e):null;if(null==a)return;let{shouldFade:r,duration:s}=this.parseFadeValue(t,!0,1.5);try{let t=this.mixer.existingAction(a)||this.mixer.clipAction(a,this);r?t.fadeOut(s):t.stop(),this.element[lc].appendedAnimations=this.element[lc].appendedAnimations.filter(t=>t!==e)}catch(e){console.error(e)}}updateAnimationLoop(e="",t=2201,i=1/0){if(null==this._currentGLTF||e===this.element.animationName)return;let{animations:a}=this;if(null==a||0===a.length)return;let r=null;if(e&&(r=this.animationsByName.get(e)),null!=r)try{let e=this.mixer.existingAction(r)||this.mixer.clipAction(r,this);e.stop(),e.setLoop(t,i),e.play()}catch(e){console.error(e)}}stopAnimation(){this.currentAnimationAction=null,this.mixer.stopAllAction()}updateAnimation(e){this.mixer.update(e),this.queueShadowRender()}subscribeMixerEvent(e,t){this.mixer.addEventListener(e,t)}updateShadow(){let e=this.shadow;if(null!=e){let t="wall"===this.element.arPlacement?"back":"bottom";e.setScene(this,this.shadowSoftness,t),e.needsUpdate=!0}}renderShadow(e){let t=this.shadow;null!=t&&!0==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){let e="wall"===this.element.arPlacement?"back":"bottom";this.shadow=new oO(this,this.shadowSoftness,e)}this.shadow.setIntensity(e)}}setShadowSoftness(e){this.shadowSoftness=e;let t=this.shadow;null!=t&&t.setSoftness(e)}setShadowOffset(e){let t=this.shadow;null!=t&&t.setOffset(e)}getHit(e=this){return oz.intersectObject(e,!0).find(e=>e.object.visible&&!e.object.userData.noHit)}hitFromController(e,t=this){return oz.setFromXRController(e),this.getHit(t)}hitFromPoint(e,t=this){return oz.setFromCamera(e,this.getCamera()),this.getHit(t)}positionAndNormalFromPoint(e,t=this){var i;let a=this.hitFromPoint(e,t);if(null==a)return null;let r=a.point;return{position:r,normal:null!=a.face?a.face.normal.clone().applyNormalMatrix(new tO.dwI().getNormalMatrix(a.object.matrixWorld)):oz.ray.direction.clone().multiplyScalar(-1),uv:null!=(i=a.uv)?i:null}}surfaceFromPoint(e,t=this){let i=this.element.model;if(null==i)return null;let a=this.hitFromPoint(e,t);if(null==a||null==a.face)return null;let{meshes:r,primitives:s}=i[of](a).mesh.userData.associations,n=new tO.Pq0,o=new tO.Pq0,l=new tO.Pq0,{a:A,b:h,c}=a.face,d=a.object;d.getVertexPosition(A,n),d.getVertexPosition(h,o),d.getVertexPosition(c,l);let u=new tO.lMl(n,o,l),g=new tO.Pq0;return u.getBarycoord(d.worldToLocal(a.point),g),`${r} ${s} ${A} ${h} ${c} ${g.x.toFixed(3)} ${g.y.toFixed(3)} ${g.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){let{children:t}=this.target;for(let i=0,a=t.length;i<a;i++){let a=t[i];a instanceof oU&&e(a)}}updateSurfaceHotspot(e){if(null==e.surface||null==this.element.model)return;let t=aY(e.surface)[0].terms;if(8!=t.length)return void console.warn(e.surface+" does not have exactly 8 numbers.");let i=this.element.model[ob](t[0].number,t[1].number);if(null==i)return void console.warn(e.surface+" does not match a node/primitive in this glTF! Skipping this hotspot.");let a=i.mesh.geometry.attributes.position.count,r=new tO.Pq0(t[2].number,t[3].number,t[4].number);if(r.x>=a||r.y>=a||r.z>=a)return void console.warn(e.surface+" vertex indices out of range in this glTF! Skipping this hotspot.");let s=new tO.Pq0(t[5].number,t[6].number,t[7].number);e.mesh=i.mesh,e.tri=r,e.bary=s,e.updateSurface()}animateSurfaceHotspots(){this.element.paused||this.forHotspots(e=>{e.updateSurface()})}updateHotspotsVisibility(e){this.forHotspots(t=>{oq.copy(e),oH.setFromMatrixPosition(t.matrixWorld),oq.sub(oH),oj.copy(t.normal).transformDirection(this.target.matrixWorld),0>oq.dot(oj)?t.hide():t.show()})}orientHotspots(e){this.forHotspots(t=>{t.orient(e)})}setHotspotsVisibility(e){this.forHotspots(t=>{t.visible=e})}updateSchema(e){var t;let{schemaElement:i,element:a}=this,{alt:r,poster:s,iosSrc:n}=a;if(null!=e){let a=[{"@type":"MediaObject",contentUrl:e,encodingFormat:(null==(t=e.split(".").pop())?void 0:t.toLowerCase())==="gltf"?"model/gltf+json":"model/gltf-binary"}];n&&a.push({"@type":"MediaObject",contentUrl:n,encodingFormat:"model/vnd.usdz+zip"}),i.textContent=JSON.stringify({"@context":"http://schema.org/","@type":"3DModel",image:null!=s?s:void 0,name:null!=r?r:void 0,encoding:a}),document.head.appendChild(i)}else null!=i.parentElement&&i.parentElement.removeChild(i)}}class oY extends EventTarget{constructor(){super(...arguments),this.ongoingActivities=new Set,this.totalProgress=0}get ongoingActivityCount(){return this.ongoingActivities.size}beginActivity(e){let t={progress:0,completed:!1};return this.ongoingActivities.add(t),1===this.ongoingActivityCount&&this.announceTotalProgress(t,0,e),i=>{let a;return(a=Math.max(eZ(i,0,1),t.progress))!==t.progress&&this.announceTotalProgress(t,a,e),t.progress}}announceTotalProgress(e,t,i){let a=0,r=0;for(let i of(1==t&&(e.completed=!0),this.ongoingActivities)){let{progress:e}=i;a+=1-e,i.completed&&r++}let s=e.progress;e.progress=t,this.totalProgress+=(t-s)*(1-this.totalProgress)/a;let n=r===this.ongoingActivityCount?1:this.totalProgress;this.dispatchEvent(new CustomEvent("progress",{detail:{totalProgress:n,reason:i}})),r===this.ongoingActivityCount&&(this.totalProgress=0,this.ongoingActivities.clear())}}var o$=function(e,t,i,a){var r,s=arguments.length,n=s<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};let oW=document.createElement("canvas"),oX=Symbol("fallbackResizeHandler"),oZ=Symbol("defaultAriaLabel"),o0=Symbol("resizeObserver"),o1=Symbol("clearModelTimeout"),o2=Symbol("onContextLost"),o8=Symbol("loaded"),o9=Symbol("status"),o3=Symbol("onFocus"),o5=Symbol("onBlur"),o4=Symbol("updateSize"),o6=Symbol("intersectionObserver"),o7=Symbol("isElementInViewport"),le=Symbol("announceModelVisibility"),lt=Symbol("ariaLabel"),li=Symbol("altDefaulted"),la=Symbol("statusElement"),lr=Symbol("updateStatus"),ls=Symbol("loadedTime"),ln=Symbol("updateSource"),lo=Symbol("markLoaded"),ll=Symbol("container"),lA=Symbol("input"),lh=Symbol("canvas"),lc=Symbol("scene"),ld=Symbol("needsRender"),lu=Symbol("tick"),lg=Symbol("onModelLoad"),lp=Symbol("onResize"),lm=Symbol("renderer"),lf=Symbol("progressTracker"),lb=Symbol("getLoaded"),lI=Symbol("getModelIsVisible"),lC=Symbol("shouldAttemptPreload"),lE=e=>({x:e.x,y:e.y,z:e.z,toString(){return`${this.x}m ${this.y}m ${this.z}m`}}),ly=e=>({u:e.x,v:e.y,toString(){return`${this.u} ${this.v}`}});class lw extends V{static get is(){return"model-viewer"}static set modelCacheSize(e){aa[at].evictionThreshold=e}static get modelCacheSize(){return aa[at].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."),nf.singleton.minScale=e}static get minimumRenderScale(){return nf.singleton.minScale}get loaded(){return this[lb]()}get[(tI=o7,tC=o8,tE=ls,ty=o9,tw=o1,tB=oX,tv=le,tx=o0,tQ=o6,tS=lf,lm)](){return nf.singleton}get modelIsVisible(){return this[lI]()}constructor(){let e,t;super(),this.alt=null,this.src=null,this.withCredentials=!1,this.generateSchema=!1,this[tI]=!1,this[tC]=!1,this[tE]=0,this[ty]="",this[tw]=null,this[tB]=eX(()=>{let e=this.getBoundingClientRect();this[o4](e)},50),this[tv]=eX(e=>{let t=this.modelIsVisible;t!==e&&this.dispatchEvent(new CustomEvent("model-visibility",{detail:{visible:t}}))},0),this[tx]=null,this[tQ]=null,this[tS]=new oY,this[tM]=()=>{this[la].textContent=this[o9]},this[tR]=()=>{this[la].textContent=""},this[tD]=e=>{this.dispatchEvent(new CustomEvent("error",{detail:{type:"webglcontextlost",sourceError:e.sourceEvent}}))},this.attachShadow({mode:"open"});const i=this.shadowRoot;if((e=>{eF(tN,e)})(i),this[ll]=i.querySelector(".container"),this[lA]=i.querySelector(".userInput"),this[lh]=i.querySelector("canvas"),this[la]=i.querySelector("#status"),this[oZ]=this[lA].getAttribute("aria-label"),this.isConnected){const i=this.getBoundingClientRect();e=i.width,t=i.height}else e=300,t=150;this[lc]=new oV({canvas:this[lh],element:this,width:e,height:t}),Promise.resolve().then(()=>{this[o4](this.getBoundingClientRect())}),eN&&(this[o0]=new ResizeObserver(e=>{if(!this[lm].isPresenting)for(let t of e)t.target===this&&this[o4](t.contentRect)})),eO?this[o6]=new IntersectionObserver(e=>{for(let t of e)if(t.target===this){let e=this.modelIsVisible;this[o7]=t.isIntersecting,this[le](e),this[o7]&&!this.loaded&&this[ln]()}},{root:null,rootMargin:"0px",threshold:1e-5}):this[o7]=!0}connectedCallback(){super.connectedCallback&&super.connectedCallback(),eN?this[o0].observe(this):self.addEventListener("resize",this[oX]),eO&&this[o6].observe(this),this.addEventListener("focus",this[o3]),this.addEventListener("blur",this[o5]);let e=this[lm];e.addEventListener("contextlost",this[o2]),e.registerScene(this[lc]),null!=this[o1]&&(self.clearTimeout(this[o1]),this[o1]=null,this.requestUpdate("src",null))}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),eN?this[o0].unobserve(this):self.removeEventListener("resize",this[oX]),eO&&this[o6].unobserve(this),this.removeEventListener("focus",this[o3]),this.removeEventListener("blur",this[o5]);let e=this[lm];e.removeEventListener("contextlost",this[o2]),e.unregisterScene(this[lc]),this[o1]=self.setTimeout(()=>{this[lc].dispose(),this[o1]=null},10)}updated(e){super.updated(e),e.has("src")&&(null==this.src?(this[o8]=!1,this[ls]=0,this[lc].reset()):this.src!==this[lc].url&&(this[o8]=!1,this[ls]=0,this[ln]())),e.has("alt")&&this[lA].setAttribute("aria-label",this[lt]),e.has("generateSchema")&&(this.generateSchema?this[lc].updateSchema(this.src):this[lc].updateSchema(null))}toDataURL(e,t){return this[lm].displayCanvas(this[lc]).toDataURL(e,t)}async toBlob(e){let t=e?e.mimeType:void 0,i=e?e.qualityArgument:void 0,a=e?e.idealAspect:void 0,{width:r,height:s,idealAspect:n,aspect:o}=this[lc],{dpr:l,scaleFactor:A}=this[lm],h=r*A*l,c=s*A*l,d=0,u=0;!0===a&&(n>o?u=(c-(c=Math.round(h/n)))/2:d=(h-(h=Math.round(c*n)))/2),oW.width=h,oW.height=c;try{return new Promise(async(e,a)=>{oW.getContext("2d").drawImage(this[lm].displayCanvas(this[lc]),d,u,h,c,0,0,h,c),oW.toBlob(t=>{if(!t)return a(Error("Unable to retrieve canvas blob"));e(t)},t,i)})}finally{this[o4]({width:r,height:s})}}registerEffectComposer(e){e.setRenderer(this[lm].threeRenderer),e.setMainCamera(this[lc].getCamera()),e.setMainScene(this[lc]),this[lc].effectRenderer=e}unregisterEffectComposer(){this[lc].effectRenderer=null}registerRenderer(e){this[lc].externalRenderer=e}unregisterRenderer(){this[lc].externalRenderer=null}get[lt](){return this[li]}get[li](){return null==this.alt||"null"===this.alt?this[oZ]:this.alt}[lb](){return this[o8]}[lI](){return this.loaded&&this[o7]}[lC](){return!!this.src&&this[o7]}[o4]({width:e,height:t}){0!==e&&0!==t&&(this[ll].style.width=`${e}px`,this[ll].style.height=`${t}px`,this[lp]({width:e,height:t}))}[lu](e,t){var i;null==(i=this[lc].effectRenderer)||i.beforeRender(e,t)}[lo](){this[o8]||(this[o8]=!0,this[ls]=performance.now())}[ld](){this[lc].queueRender()}[lg](){}[lr](e){this[o9]=e;let t=this.getRootNode();null!=t&&t.activeElement===this&&this[la].textContent!=e&&(this[la].textContent=e)}[(tM=o3,tR=o5,lp)](e){this[lc].setSize(e.width,e.height)}async [(tD=o2,ln)](){let e=this[lc];if(this.loaded||!this[lC]()||this.src===e.url)return;this.generateSchema&&e.updateSchema(this.src),this[lr]("Loading"),e.stopAnimation();let t=this[lf].beginActivity("model-load"),i=this.src;try{let a=e.setSource(i,e=>t(.95*eZ(e,0,1))),r=this[tL]();await Promise.all([a,r]),this[lo](),this[lg](),this.updateComplete.then(()=>{this.dispatchEvent(new CustomEvent("before-render"))}),await new Promise(e=>{let t=setTimeout(()=>{console.warn("rAF timed out in updateSource"),e()},500);requestAnimationFrame(()=>{requestAnimationFrame(()=>{clearTimeout(t),e()})})}),this.dispatchEvent(new CustomEvent("load",{detail:{url:i}}))}catch(e){this.dispatchEvent(new CustomEvent("error",{detail:{type:"loadfailure",sourceError:e}}))}finally{t(1)}}}o$([$({type:String})],lw.prototype,"alt",void 0),o$([$({type:String})],lw.prototype,"src",void 0),o$([$({type:Boolean,attribute:"with-credentials"})],lw.prototype,"withCredentials",void 0),o$([$({type:Boolean,attribute:"generate-schema"})],lw.prototype,"generateSchema",void 0);var lB=function(e,t,i,a){var r,s=arguments.length,n=s<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};let lv=Symbol("changeAnimation"),lx=Symbol("appendAnimation"),lQ=Symbol("detachAnimation"),lS=Symbol("paused"),lM={repetitions:1/0,pingpong:!1},lR={pingpong:!1,repetitions:null,weight:1,timeScale:1,fade:!1,warp:!1,relativeWarp:!0,time:null},lD={fade:!0},lT=Symbol("hotspotMap"),lk=Symbol("mutationCallback"),lF=Symbol("observer"),lL=Symbol("addHotspot"),lP=Symbol("removeHotspot"),l_=new tO.kn4;var lU=Uint8Array,lG=Uint16Array,lN=Int32Array,lO=new lU([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]),lq=new lU([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]),lH=new lU([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),lj=function(e,t){for(var i=new lG(31),a=0;a<31;++a)i[a]=t+=1<<e[a-1];for(var r=new lN(i[30]),a=1;a<30;++a)for(var s=i[a];s<i[a+1];++s)r[s]=s-i[a]<<5|a;return{b:i,r:r}},lz=lj(lO,2),lK=lz.b,lJ=lz.r;lK[28]=258,lJ[258]=28;for(var lV=lj(lq,0),lY=(lV.b,lV.r),l$=new lG(32768),lW=0;lW<32768;++lW){var lX=(43690&lW)>>1|(21845&lW)<<1;lX=(61680&(lX=(52428&lX)>>2|(13107&lX)<<2))>>4|(3855&lX)<<4,l$[lW]=((65280&lX)>>8|(255&lX)<<8)>>1}for(var lZ=function(e,t,i){for(var a,r=e.length,s=0,n=new lG(t);s<r;++s)e[s]&&++n[e[s]-1];var o=new lG(t);for(s=1;s<t;++s)o[s]=o[s-1]+n[s-1]<<1;if(i){a=new lG(1<<t);var l=15-t;for(s=0;s<r;++s)if(e[s])for(var A=s<<4|e[s],h=t-e[s],c=o[e[s]-1]++<<h,d=c|(1<<h)-1;c<=d;++c)a[l$[c]>>l]=A}else for(s=0,a=new lG(r);s<r;++s)e[s]&&(a[s]=l$[o[e[s]-1]++]>>15-e[s]);return a},l0=new lU(288),lW=0;lW<144;++lW)l0[lW]=8;for(var lW=144;lW<256;++lW)l0[lW]=9;for(var lW=256;lW<280;++lW)l0[lW]=7;for(var lW=280;lW<288;++lW)l0[lW]=8;for(var l1=new lU(32),lW=0;lW<32;++lW)l1[lW]=5;var l2=lZ(l0,9,0),l8=lZ(l1,5,0),l9=function(e){return(e+7)/8|0},l3=function(e,t,i){return(null==t||t<0)&&(t=0),(null==i||i>e.length)&&(i=e.length),new lU(e.subarray(t,i))},l5=["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"],l4=function(e,t,i){var a=Error(t||l5[e]);if(a.code=e,Error.captureStackTrace&&Error.captureStackTrace(a,l4),!i)throw a;return a},l6=function(e,t,i){i<<=7&t;var a=t/8|0;e[a]|=i,e[a+1]|=i>>8},l7=function(e,t,i){i<<=7&t;var a=t/8|0;e[a]|=i,e[a+1]|=i>>8,e[a+2]|=i>>16},Ae=function(e,t){for(var i=[],a=0;a<e.length;++a)e[a]&&i.push({s:a,f:e[a]});var r=i.length,s=i.slice();if(!r)return{t:Ao,l:0};if(1==r){var n=new lU(i[0].s+1);return n[i[0].s]=1,{t:n,l:1}}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var o=i[0],l=i[1],A=0,h=1,c=2;for(i[0]={s:-1,f:o.f+l.f,l:o,r:l};h!=r-1;)o=i[i[A].f<i[c].f?A++:c++],l=i[A!=h&&i[A].f<i[c].f?A++:c++],i[h++]={s:-1,f:o.f+l.f,l:o,r:l};for(var d=s[0].s,a=1;a<r;++a)s[a].s>d&&(d=s[a].s);var u=new lG(d+1),g=At(i[h-1],u,0);if(g>t){var a=0,p=0,m=g-t,f=1<<m;for(s.sort(function(e,t){return u[t.s]-u[e.s]||e.f-t.f});a<r;++a){var b=s[a].s;if(u[b]>t)p+=f-(1<<g-u[b]),u[b]=t;else break}for(p>>=m;p>0;){var I=s[a].s;u[I]<t?p-=1<<t-u[I]++-1:++a}for(;a>=0&&p;--a){var C=s[a].s;u[C]==t&&(--u[C],++p)}g=t}return{t:new lU(u),l:g}},At=function(e,t,i){return -1==e.s?Math.max(At(e.l,t,i+1),At(e.r,t,i+1)):t[e.s]=i},Ai=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new lG(++t),a=0,r=e[0],s=1,n=function(e){i[a++]=e},o=1;o<=t;++o)if(e[o]==r&&o!=t)++s;else{if(!r&&s>2){for(;s>138;s-=138)n(32754);s>2&&(n(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(n(r),--s;s>6;s-=6)n(8304);s>2&&(n(s-3<<5|8208),s=0)}for(;s--;)n(r);s=1,r=e[o]}return{c:i.subarray(0,a),n:t}},Aa=function(e,t){for(var i=0,a=0;a<t.length;++a)i+=e[a]*t[a];return i},Ar=function(e,t,i){var a=i.length,r=l9(t+2);e[r]=255&a,e[r+1]=a>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var s=0;s<a;++s)e[r+s+4]=i[s];return(r+4+a)*8},As=function(e,t,i,a,r,s,n,o,l,A,h){l6(t,h++,i),++r[256];for(var c,d,u,g,p=Ae(r,15),m=p.t,f=p.l,b=Ae(s,15),I=b.t,C=b.l,E=Ai(m),y=E.c,w=E.n,B=Ai(I),v=B.c,x=B.n,Q=new lG(19),S=0;S<y.length;++S)++Q[31&y[S]];for(var S=0;S<v.length;++S)++Q[31&v[S]];for(var M=Ae(Q,7),R=M.t,D=M.l,T=19;T>4&&!R[lH[T-1]];--T);var k=A+5<<3,F=Aa(r,l0)+Aa(s,l1)+n,L=Aa(r,m)+Aa(s,I)+n+14+3*T+Aa(Q,R)+2*Q[16]+3*Q[17]+7*Q[18];if(l>=0&&k<=F&&k<=L)return Ar(t,h,e.subarray(l,l+A));if(l6(t,h,1+(L<F)),h+=2,L<F){c=lZ(m,f,0),d=m,u=lZ(I,C,0),g=I;var P=lZ(R,D,0);l6(t,h,w-257),l6(t,h+5,x-1),l6(t,h+10,T-4),h+=14;for(var S=0;S<T;++S)l6(t,h+3*S,R[lH[S]]);h+=3*T;for(var _=[y,v],U=0;U<2;++U)for(var G=_[U],S=0;S<G.length;++S){var N=31&G[S];l6(t,h,P[N]),h+=R[N],N>15&&(l6(t,h,G[S]>>5&127),h+=G[S]>>12)}}else c=l2,d=l0,u=l8,g=l1;for(var S=0;S<o;++S){var O=a[S];if(O>255){var N=O>>18&31;l7(t,h,c[N+257]),h+=d[N+257],N>7&&(l6(t,h,O>>23&31),h+=lO[N]);var q=31&O;l7(t,h,u[q]),h+=g[q],q>3&&(l7(t,h,O>>5&8191),h+=lq[q])}else l7(t,h,c[O]),h+=d[O]}return l7(t,h,c[256]),h+d[256]},An=new lN([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ao=new lU(0),Al=function(e,t,i,a,r,s){var n=s.z||e.length,o=new lU(a+n+5*(1+Math.ceil(n/7e3))+r),l=o.subarray(a,o.length-r),A=s.l,h=7&(s.r||0);if(t){h&&(l[0]=s.r>>3);for(var c=An[t-1],d=c>>13,u=8191&c,g=(1<<i)-1,p=s.p||new lG(32768),m=s.h||new lG(g+1),f=Math.ceil(i/3),b=2*f,I=function(t){return(e[t]^e[t+1]<<f^e[t+2]<<b)&g},C=new lN(25e3),E=new lG(288),y=new lG(32),w=0,B=0,v=s.i||0,x=0,Q=s.w||0,S=0;v+2<n;++v){var M=I(v),R=32767&v,D=m[M];if(p[R]=D,m[M]=R,Q<=v){var T=n-v;if((w>7e3||x>24576)&&(T>423||!A)){h=As(e,l,0,C,E,y,B,x,S,v-S,h),x=w=B=0,S=v;for(var k=0;k<286;++k)E[k]=0;for(var k=0;k<30;++k)y[k]=0}var F=2,L=0,P=u,_=R-D&32767;if(T>2&&M==I(v-_))for(var U=Math.min(d,T)-1,G=Math.min(32767,v),N=Math.min(258,T);_<=G&&--P&&R!=D;){if(e[v+F]==e[v+F-_]){for(var O=0;O<N&&e[v+O]==e[v+O-_];++O);if(O>F){if(F=O,L=_,O>U)break;for(var q=Math.min(_,O-2),H=0,k=0;k<q;++k){var j=v-_+k&32767,z=p[j],K=j-z&32767;K>H&&(H=K,D=j)}}}D=p[R=D],_+=R-D&32767}if(L){C[x++]=0x10000000|lJ[F]<<18|lY[L];var J=31&lJ[F],V=31&lY[L];B+=lO[J]+lq[V],++E[257+J],++y[V],Q=v+F,++w}else C[x++]=e[v],++E[e[v]]}}for(v=Math.max(v,Q);v<n;++v)C[x++]=e[v],++E[e[v]];h=As(e,l,A,C,E,y,B,x,S,v-S,h),A||(s.r=7&h|l[h/8|0]<<3,h-=7,s.h=m,s.p=p,s.i=v,s.w=Q)}else{for(var v=s.w||0;v<n+A;v+=65535){var Y=v+65535;Y>=n&&(l[h/8|0]=A,Y=n),h=Ar(l,h+1,e.subarray(v,Y))}s.i=n}return l3(o,0,a+l9(h)+r)},AA=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var i=t,a=9;--a;)i=(1&i&&-0x12477ce0)^i>>>1;e[t]=i}return e}(),Ah=function(){var e=-1;return{p:function(t){for(var i=e,a=0;a<t.length;++a)i=AA[255&i^t[a]]^i>>>8;e=i},d:function(){return~e}}},Ac=function(e,t,i,a,r){if(!r&&(r={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),n=new lU(s.length+e.length);n.set(s),n.set(e,s.length),e=n,r.w=s.length}return Al(e,null==t.level?6:t.level,null==t.mem?r.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,i,a,r)},Ad=function(e,t){var i={};for(var a in e)i[a]=e[a];for(var a in t)i[a]=t[a];return i},Au=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},Ag=function(e,t,i,a){for(var r in e){var s=e[r],n=t+r,o=a;Array.isArray(s)&&(o=Ad(a,s[1]),s=s[0]),s instanceof lU?i[n]=[s,o]:(i[n+="/"]=[new lU(0),o],Ag(s,n,i,a))}},Ap="u">typeof TextEncoder&&new TextEncoder,Am="u">typeof TextDecoder&&new TextDecoder;try{Am.decode(Ao,{stream:!0})}catch(e){}function Af(e,t){if(t){for(var i=new lU(e.length),a=0;a<e.length;++a)i[a]=e.charCodeAt(a);return i}if(Ap)return Ap.encode(e);for(var r=e.length,s=new lU(e.length+(e.length>>1)),n=0,o=function(e){s[n++]=e},a=0;a<r;++a){if(n+5>s.length){var l=new lU(n+8+(r-a<<1));l.set(s),s=l}var A=e.charCodeAt(a);A<128||t?o(A):(A<2048?o(192|A>>6):(A>55295&&A<57344?(o(240|(A=65536+(1047552&A)|1023&e.charCodeAt(++a))>>18),o(128|A>>12&63)):o(224|A>>12),o(128|A>>6&63)),o(128|63&A))}return l3(s,0,n)}var Ab=function(e){var t=0;if(e)for(var i in e){var a=e[i].length;a>65535&&l4(9),t+=a+4}return t},AI=function(e,t,i,a,r,s,n,o){var l=a.length,A=i.extra,h=o&&o.length,c=Ab(A);Au(e,t,null!=n?0x2014b50:0x4034b50),t+=4,null!=n&&(e[t++]=20,e[t++]=i.os),e[t]=20,t+=2,e[t++]=i.flag<<1|(s<0&&8),e[t++]=r&&8,e[t++]=255&i.compression,e[t++]=i.compression>>8;var d=new Date(null==i.mtime?Date.now():i.mtime),u=d.getFullYear()-1980;if((u<0||u>119)&&l4(10),Au(e,t,u<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>1),t+=4,-1!=s&&(Au(e,t,i.crc),Au(e,t+4,s<0?-s-2:s),Au(e,t+8,i.size)),Au(e,t+12,l),Au(e,t+14,c),t+=16,null!=n&&(Au(e,t,h),Au(e,t+6,i.attrs),Au(e,t+10,n),t+=14),e.set(a,t),t+=l,c)for(var g in A){var p=A[g],m=p.length;Au(e,t,+g),Au(e,t+2,m),e.set(p,t+4),t+=4+m}return h&&(e.set(o,t),t+=h),t},AC=function(e,t,i,a,r){Au(e,t,0x6054b50),Au(e,t+8,i),Au(e,t+10,i),Au(e,t+12,a),Au(e,t+16,r)};"function"==typeof queueMicrotask&&queueMicrotask;class AE{constructor(e,t="",i=[],a=[]){this.name=e,this.type=t,this.metadata=i,this.properties=a,this.children=[]}addMetadata(e,t){this.metadata.push({key:e,value:t})}addProperty(e,t=[]){this.properties.push({property:e,metadata:t})}addChild(e){this.children.push(e)}toString(e=0){let t=" ".repeat(e),i=this.metadata.map(e=>{let i=e.key,a=e.value;if(!Array.isArray(a))return`${i} = ${a}`;{let e=[];return e.push(`${i} = {`),a.forEach(i=>{e.push(`${t} ${i}`)}),e.push(`${t} }`),e.join("\n")}}),a=i.length?` (
|
|
583
|
-
${i.map(e=>`${t} ${e}`).join("\n")}
|
|
584
|
-
${t})`:"",r=this.properties.map(e=>{let i=e.property.replace(/\n/g,"\n"+t+" "),a=e.metadata.length?` (
|
|
585
|
-
${e.metadata.map(e=>`${t} ${e}`).join("\n")}
|
|
586
|
-
${t} )`:"";return`${t} ${i}${a}`}),s=this.children.map(t=>t.toString(e+1)),n=[];if(r.length>0&&n.push(...r),s.length>0){r.length>0&&n.push("");for(let e=0;e<s.length;e++)n.push(s[e]),e<s.length-1&&n.push("")}let o=n.join("\n"),l=this.type?this.type+" ":"";return`${t}def ${l}"${this.name}"${a}
|
|
587
|
-
${t}{
|
|
588
|
-
${o}
|
|
589
|
-
${t}}`}}class Ay{constructor(){this.textureUtils=null}setTextureUtils(e){this.textureUtils=e}parse(e,t,i,a){this.parseAsync(e,a).then(t).catch(i)}async parseAsync(e,t={}){let i;t=Object.assign({ar:{anchoring:{type:"plane"},planeAnchoring:{alignment:"horizontal"}},includeAnchoringProperties:!0,onlyVisible:!0,quickLookCompatible:!1,maxTextureSize:1024,animations:[],animationFrameRate:60},t);let a=new Set,r={},s="model.usda";r[s]=null;let n=function(e,t){let i=new Map;for(let a=0;a<t.length;a++){let r=t[a];for(let t=0;t<r.tracks.length;t++){let a=r.tracks[t],s=tO.Nwf.parseTrackName(a.name),n=tO.Nwf.findNode(e,s.nodeName);if(null==n)continue;let o=s.propertyName;if("position"!==o&&"quaternion"!==o&&"scale"!==o)continue;let l=i.get(n);void 0===l&&(l={},i.set(n,l)),l[o]=a}}return i}(e,t.animations);t.animationTracks=n;let o=new AE("Root","Xform"),l=new AE("Scenes","Scope");l.addMetadata("kind",'"sceneLibrary"'),o.addChild(l);let A="Scene",h=new AE(A,"Xform");h.addMetadata("customData",["bool preliminary_collidesWithEnvironment = 0",`string sceneName = "${A}"`]),h.addMetadata("sceneName",`"${A}"`),t.includeAnchoringProperties&&(h.addProperty(`token preliminary:anchoring:type = "${t.ar.anchoring.type}"`),h.addProperty(`token preliminary:planeAnchoring:alignment = "${t.ar.planeAnchoring.alignment}"`)),l.addChild(h);let c={},d={};e.isScene?AQ(e,h,c,a,r,t):AS(e,h,c,a,r,t);let u=function(e,t,i=!1){let a=new AE("Materials");for(let r in e){let s=e[r];a.addChild(function(e,t,i=!1){let a=new AE(`Material_${e.id}`,"Material");function r(a,r,s){let n=a.source.id+"_"+a.flipY;t[n]=a;let o=a.channel>0?"st"+a.channel:"st",l={1e3:"repeat",1001:"clamp",1002:"mirror"},A=a.repeat.clone(),h=a.offset.clone(),c=a.rotation,d=Math.sin(c),u=Math.cos(c);h.y=1-h.y-A.y,i?(h.x=h.x/A.x,h.y=h.y/A.y,h.x+=d/A.x,h.y+=u-1):(h.x+=d*A.x,h.y+=(1-u)*A.y);let g=new AE(`PrimvarReader_${r}`,"Shader");g.addProperty('uniform token info:id = "UsdPrimvarReader_float2"'),g.addProperty("float2 inputs:fallback = (0.0, 0.0)"),g.addProperty(`string inputs:varname = "${o}"`),g.addProperty("float2 outputs:result");let p=new AE(`Transform2d_${r}`,"Shader");p.addProperty('uniform token info:id = "UsdTransform2d"'),p.addProperty(`float2 inputs:in.connect = </Materials/Material_${e.id}/PrimvarReader_${r}.outputs:result>`),p.addProperty(`float inputs:rotation = ${(180/Math.PI*c).toFixed(7)}`),p.addProperty(`float2 inputs:scale = ${AL(A)}`),p.addProperty(`float2 inputs:translation = ${AL(h)}`),p.addProperty("float2 outputs:result");let m=new AE(`Texture_${a.id}_${r}`,"Shader");if(m.addProperty('uniform token info:id = "UsdUVTexture"'),m.addProperty(`asset inputs:file = @textures/Texture_${n}.${AB(a)}@`),m.addProperty(`float2 inputs:st.connect = </Materials/Material_${e.id}/Transform2d_${r}.outputs:result>`),void 0!==s){let t="diffuse"===r?e.opacity:1;m.addProperty(`float4 inputs:scale = ${function(e,t=1){return`(${e.r}, ${e.g}, ${e.b}, ${t})`}(s,t)}`)}if("normal"===r){let t=e.normalScale.x;m.addProperty(`float4 inputs:scale = (${2*t}, ${2*t}, 2, 1)`),m.addProperty(`float4 inputs:bias = (${-t}, ${-t}, -1, 0)`)}return m.addProperty(`token inputs:sourceColorSpace = "${""===a.colorSpace?"raw":"sRGB"}"`),m.addProperty(`token inputs:wrapS = "${l[a.wrapS]}"`),m.addProperty(`token inputs:wrapT = "${l[a.wrapT]}"`),m.addProperty("float outputs:r"),m.addProperty("float outputs:g"),m.addProperty("float outputs:b"),m.addProperty("float3 outputs:rgb"),(e.transparent||e.alphaTest>0)&&m.addProperty("float outputs:a"),[g,p,m]}2===e.side&&console.warn("THREE.USDZExporter: USDZ does not support double sided materials",e);let s=new AE("PreviewSurface","Shader");if(s.addProperty('uniform token info:id = "UsdPreviewSurface"'),null!==e.map?(s.addProperty(`color3f inputs:diffuseColor.connect = </Materials/Material_${e.id}/Texture_${e.map.id}_diffuse.outputs:rgb>`),e.transparent?s.addProperty(`float inputs:opacity.connect = </Materials/Material_${e.id}/Texture_${e.map.id}_diffuse.outputs:a>`):e.alphaTest>0&&(s.addProperty(`float inputs:opacity.connect = </Materials/Material_${e.id}/Texture_${e.map.id}_diffuse.outputs:a>`),s.addProperty(`float inputs:opacityThreshold = ${e.alphaTest}`)),r(e.map,"diffuse",e.color).forEach(e=>a.addChild(e))):s.addProperty(`color3f inputs:diffuseColor = ${AF(e.color)}`),e.emissive){let t=e.emissiveIntensity??1;if(e.emissiveMap){s.addProperty(`color3f inputs:emissiveColor.connect = </Materials/Material_${e.id}/Texture_${e.emissiveMap.id}_emissive.outputs:rgb>`);let i=new tO.Q1f(e.emissive.r*t,e.emissive.g*t,e.emissive.b*t);r(e.emissiveMap,"emissive",i).forEach(e=>a.addChild(e))}else e.emissive.getHex()>0&&s.addProperty(`color3f inputs:emissiveColor = ${AF(e.emissive)}`)}if(e.normalMap&&(s.addProperty(`normal3f inputs:normal.connect = </Materials/Material_${e.id}/Texture_${e.normalMap.id}_normal.outputs:rgb>`),r(e.normalMap,"normal").forEach(e=>a.addChild(e))),e.aoMap){s.addProperty(`float inputs:occlusion.connect = </Materials/Material_${e.id}/Texture_${e.aoMap.id}_occlusion.outputs:r>`);let t=e.aoMapIntensity??1,i=new tO.Q1f(t,t,t);r(e.aoMap,"occlusion",i).forEach(e=>a.addChild(e))}if(e.roughnessMap){s.addProperty(`float inputs:roughness.connect = </Materials/Material_${e.id}/Texture_${e.roughnessMap.id}_roughness.outputs:g>`);let t=new tO.Q1f(e.roughness,e.roughness,e.roughness);r(e.roughnessMap,"roughness",t).forEach(e=>a.addChild(e))}else s.addProperty(`float inputs:roughness = ${e.roughness??1}`);if(e.metalnessMap){s.addProperty(`float inputs:metallic.connect = </Materials/Material_${e.id}/Texture_${e.metalnessMap.id}_metallic.outputs:b>`);let t=new tO.Q1f(e.metalness,e.metalness,e.metalness);r(e.metalnessMap,"metallic",t).forEach(e=>a.addChild(e))}else s.addProperty(`float inputs:metallic = ${e.metalness??0}`);if(e.alphaMap?(s.addProperty(`float inputs:opacity.connect = </Materials/Material_${e.id}/Texture_${e.alphaMap.id}_opacity.outputs:r>`),s.addProperty("float inputs:opacityThreshold = 0.0001"),r(e.alphaMap,"opacity").forEach(e=>a.addChild(e))):s.addProperty(`float inputs:opacity = ${e.opacity}`),e.isMeshPhysicalMaterial){if(null!==e.clearcoatMap){s.addProperty(`float inputs:clearcoat.connect = </Materials/Material_${e.id}/Texture_${e.clearcoatMap.id}_clearcoat.outputs:r>`);let t=new tO.Q1f(e.clearcoat,e.clearcoat,e.clearcoat);r(e.clearcoatMap,"clearcoat",t).forEach(e=>a.addChild(e))}else s.addProperty(`float inputs:clearcoat = ${e.clearcoat}`);if(null!==e.clearcoatRoughnessMap){s.addProperty(`float inputs:clearcoatRoughness.connect = </Materials/Material_${e.id}/Texture_${e.clearcoatRoughnessMap.id}_clearcoatRoughness.outputs:g>`);let t=new tO.Q1f(e.clearcoatRoughness,e.clearcoatRoughness,e.clearcoatRoughness);r(e.clearcoatRoughnessMap,"clearcoatRoughness",t).forEach(e=>a.addChild(e))}else s.addProperty(`float inputs:clearcoatRoughness = ${e.clearcoatRoughness}`);s.addProperty(`float inputs:ior = ${e.ior}`)}return s.addProperty("int inputs:useSpecularWorkflow = 0"),s.addProperty("token outputs:surface"),a.addChild(s),a.addProperty(`token outputs:surface.connect = </Materials/Material_${e.id}/PreviewSurface.outputs:surface>`),a}(s,t,i))}return a}(c,d,t.quickLookCompatible);for(let e in i=Av(n.size>0?{fps:t.animationFrameRate,endTimeCode:function(e){let t=0;for(let i=0;i<e.length;i++)e[i].duration>t&&(t=e[i].duration);return t}(t.animations)*t.animationFrameRate}:null)+"\n"+o.toString()+"\n\n"+u.toString(),r[s]=Af(i),i=null,d){let i=d[e];if(!0===i.isCompressedTexture)if(null===this.textureUtils)throw Error("THREE.USDZExporter: setTextureUtils() must be called to process compressed textures.");else i=await this.textureUtils.decompress(i);let a=function(e,t,i){if("u">typeof HTMLImageElement&&e instanceof HTMLImageElement||"u">typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"u">typeof OffscreenCanvas&&e instanceof OffscreenCanvas||"u">typeof ImageBitmap&&e instanceof ImageBitmap){let a=i/Math.max(e.width,e.height),r=document.createElement("canvas");r.width=e.width*Math.min(1,a),r.height=e.height*Math.min(1,a);let s=r.getContext("2d");return!0===t&&(s.translate(0,r.height),s.scale(1,-1)),s.drawImage(e,0,0,r.width,r.height),r}throw Error("THREE.USDZExporter: No valid image data found. Unable to process texture.")}(i.image,i.flipY,t.maxTextureSize),s="image/jpeg"===i.userData.mimeType?"image/jpeg":"image/png",n=await new Promise(e=>a.toBlob(e,s));r[`textures/Texture_${e}.${AB(i)}`]=new Uint8Array(await n.arrayBuffer())}let g=0;for(let e in r){let t=r[e],i=63&(g+=34+e.length);if(4!==i){let a=new Uint8Array(64-i);r[e]=[t,{extra:{12345:a}}]}g=t.length}return function(e,t){t||(t={});var i={},a=[];Ag(e,"",i,t);var r=0,s=0;for(var n in i){var o=i[n],l=o[0],A=o[1],h=8*(0!=A.level),c=Af(n),d=c.length,u=A.comment,g=u&&Af(u),p=g&&g.length,m=Ab(A.extra);d>65535&&l4(11);var f=h?Ac(l,A||{},0,0):l,b=f.length,I=Ah();I.p(l),a.push(Ad(A,{size:l.length,crc:I.d(),c:f,f:c,m:g,u:d!=n.length||g&&u.length!=p,o:r,compression:h})),r+=30+d+m+b,s+=76+2*(d+m)+(p||0)+b}for(var C=new lU(s+22),E=r,y=s-r,w=0;w<a.length;++w){var c=a[w];AI(C,c.o,c,c.f,c.u,c.c.length);var B=30+c.f.length+Ab(c.extra);C.set(c.c,c.o+B),AI(C,r,c,c.f,c.u,c.c.length,c.o,c.m),r+=16+B+(c.m?c.m.length:0)}return AC(C,r,a.length,y,E),C}(r,{level:0})}}function Aw(e,t){let i=e.name;return i=i.replace(/[^A-Za-z0-9_]/g,""),/^[0-9]/.test(i)&&(i="_"+i),""===i&&(i=e.isCamera?"Camera":"Object"),t.has(i)&&(i=i+"_"+e.id),t.add(i),i}function AB(e){return"image/jpeg"===e.userData.mimeType?"jpg":"png"}function Av(e=null){let t=e?`
|
|
590
|
-
startTimeCode = 0
|
|
591
|
-
endTimeCode = ${e.endTimeCode}
|
|
592
|
-
timeCodesPerSecond = ${e.fps}
|
|
593
|
-
framesPerSecond = ${e.fps}`:"";return`#usda 1.0
|
|
594
|
-
(
|
|
595
|
-
customLayerData = {
|
|
596
|
-
string creator = "Three.js USDZExporter"
|
|
597
|
-
}
|
|
598
|
-
defaultPrim = "Root"
|
|
599
|
-
metersPerUnit = 1
|
|
600
|
-
upAxis = "Y"${t}
|
|
601
|
-
)
|
|
602
|
-
`}function Ax(e,t,i,a){let r=i.times,s=i.values,n=[];for(let e=0;e<r.length;e++){let t=3*e;n.push(`${(r[e]*a).toPrecision(7)}: (${s[t].toPrecision(7)}, ${s[t+1].toPrecision(7)}, ${s[t+2].toPrecision(7)})`)}return`${t} ${e}.timeSamples = {
|
|
603
|
-
${n.join(",\n ")},
|
|
604
|
-
}`}function AQ(e,t,i,a,r,s){for(let n=0,o=e.children.length;n<o;n++)AS(e.children[n],t,i,a,r,s)}function AS(e,t,i,a,r,s){let n;if(!1!==e.visible||!0!==s.onlyVisible){if(e.isMesh){var o,l,A,h;let t,c=e.geometry,d=Array.isArray(e.material),u=d?e.material:[e.material];for(let e=0;e<u.length;e++){let t=u[e];t.isMeshStandardMaterial||console.warn("THREE.USDZExporter: Use MeshStandardMaterial for best results."),t.uuid in i||(i[t.uuid]=t)}let g=u.map(e=>i[e.uuid]);if(!1===d){let e=`geometries/Geometry_${c.id}.usda`;if(!(e in r)){let t,i,a=(o=c,t=new AE("Geometry"),i=AT(o),t.addChild(i),t);r[e]=Af(Av()+"\n"+a.toString())}}l=e,A=c,h=g,t=AR(l,a,s),1===h.length?(t.addMetadata("prepend references",`@./geometries/Geometry_${A.id}.usda@</Geometry>`),t.addMetadata("prepend apiSchemas",'["MaterialBindingAPI"]'),t.addProperty(`rel material:binding = </Materials/Material_${h[0].id}>`)):t.addChild(AT(A,h)),n=t}else n=e.isCamera?function(e,t,i){let a,r,s=Aw(e,t);0>e.matrix.determinant()&&console.warn("THREE.USDZExporter: USDZ does not support negative scales",e);let n=new AE(s,"Camera");AM(n,e,i);let o=e.isOrthographicCamera?"orthographic":"perspective";n.addProperty(`token projection = "${o}"`);let l=`(${e.near.toPrecision(7)}, ${e.far.toPrecision(7)})`;if(n.addProperty(`float2 clippingRange = ${l}`),a=e.isOrthographicCamera?((Math.abs(e.left)+Math.abs(e.right))*10).toPrecision(7):e.getFilmWidth().toPrecision(7),n.addProperty(`float horizontalAperture = ${a}`),r=e.isOrthographicCamera?((Math.abs(e.top)+Math.abs(e.bottom))*10).toPrecision(7):e.getFilmHeight().toPrecision(7),n.addProperty(`float verticalAperture = ${r}`),e.isPerspectiveCamera){let t=e.getFocalLength().toPrecision(7);n.addProperty(`float focalLength = ${t}`);let i=e.focus.toPrecision(7);n.addProperty(`float focusDistance = ${i}`)}return n}(e,a,s):AR(e,a,s);t.addChild(n),AQ(e,n,i,a,r,s)}}function AM(e,t,i){let a=i.animationTracks.get(t),r=null!==t.pivot;if(!r&&void 0===a){let i,a=(i=t.matrix.elements,`( ${AD(i,0)}, ${AD(i,4)}, ${AD(i,8)}, ${AD(i,12)} )`);e.addProperty(`matrix4d xformOp:transform = ${a}`),e.addProperty('uniform token[] xformOpOrder = ["xformOp:transform"]');return}let s=i.animationFrameRate,n=t.position,o=t.quaternion,l=t.scale;if(void 0!==a&&void 0!==a.position?e.addProperty(Ax("xformOp:translate","float3",a.position,s)):e.addProperty(`float3 xformOp:translate = (${n.x.toPrecision(7)}, ${n.y.toPrecision(7)}, ${n.z.toPrecision(7)})`),r){let i=t.pivot;e.addProperty(`float3 xformOp:translate:pivot = (${i.x.toPrecision(7)}, ${i.y.toPrecision(7)}, ${i.z.toPrecision(7)})`)}void 0!==a&&void 0!==a.quaternion?e.addProperty(function(e,t){let i=e.times,a=e.values,r=[];for(let e=0;e<i.length;e++){let s=4*e;r.push(`${(i[e]*t).toPrecision(7)}: (${a[s+3].toPrecision(7)}, ${a[s].toPrecision(7)}, ${a[s+1].toPrecision(7)}, ${a[s+2].toPrecision(7)})`)}return`quatf xformOp:orient.timeSamples = {
|
|
605
|
-
${r.join(",\n ")},
|
|
606
|
-
}`}(a.quaternion,s)):e.addProperty(`quatf xformOp:orient = (${o.w.toPrecision(7)}, ${o.x.toPrecision(7)}, ${o.y.toPrecision(7)}, ${o.z.toPrecision(7)})`),void 0!==a&&void 0!==a.scale?e.addProperty(Ax("xformOp:scale","float3",a.scale,s)):e.addProperty(`float3 xformOp:scale = (${l.x.toPrecision(7)}, ${l.y.toPrecision(7)}, ${l.z.toPrecision(7)})`),r?e.addProperty('uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:translate:pivot", "xformOp:orient", "xformOp:scale", "!invert!xformOp:translate:pivot"]'):e.addProperty('uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"]')}function AR(e,t,i){let a=Aw(e,t);0>e.matrix.determinant()&&console.warn("THREE.USDZExporter: USDZ does not support negative scales",e);let r=new AE(a,"Xform");return AM(r,e,i),r}function AD(e,t){return`(${e[t+0]}, ${e[t+1]}, ${e[t+2]}, ${e[t+3]})`}function AT(e,t=null){var i;let a=e.attributes,r=a.position.count,s=new AE("Geometry","Mesh");s.addProperty(`int[] faceVertexCounts = [${Array((null!==(i=e).index?i.index.count:i.attributes.position.count)/3).fill(3).join(", ")}]`),s.addProperty(`int[] faceVertexIndices = [${function(e){let t=e.index,i=[];if(null!==t)for(let e=0;e<t.count;e++)i.push(t.getX(e));else{let t=e.attributes.position.count;for(let e=0;e<t;e++)i.push(e)}return i.join(", ")}(e)}]`),s.addProperty(`normal3f[] normals = [${Ak(a.normal,r)}]`,['interpolation = "vertex"']),s.addProperty(`point3f[] points = [${Ak(a.position,r)}]`);for(let e=0;e<4;e++){let t=e>0?e:"",i=a["uv"+t];void 0!==i&&s.addProperty(`texCoord2f[] primvars:st${t} = [${function(e){let t=[];for(let i=0;i<e.count;i++){let a=e.getX(i),r=e.getY(i);t.push(`(${a.toPrecision(7)}, ${1-r.toPrecision(7)})`)}return t.join(", ")}(i)}]`,['interpolation = "vertex"'])}let n=a.color;if(void 0!==n&&s.addProperty(`color3f[] primvars:displayColor = [${Ak(n,r)}]`,['interpolation = "vertex"']),s.addProperty('uniform token subdivisionScheme = "none"'),null!==t){let i=e.groups,r=(null!==e.index?e.index.count:a.position.count)/3;for(let e=0;e<i.length;e++){let a=i[e],n=t[a.materialIndex];if(void 0===n)continue;let o=Math.floor(a.start/3),l=Math.min(o+Math.floor(a.count/3),r),A=[];for(let e=o;e<l;e++)A.push(e);let h=new AE(`subset_${e}`,"GeomSubset");h.addMetadata("prepend apiSchemas",'["MaterialBindingAPI"]'),h.addProperty('uniform token elementType = "face"'),h.addProperty('uniform token familyName = "materialBind"'),h.addProperty(`int[] indices = [${A.join(", ")}]`),h.addProperty(`rel material:binding = </Materials/Material_${n.id}>`),s.addChild(h)}}return s}function Ak(e,t){if(void 0===e)return console.warn("USDZExporter: Normals missing."),Array(t).fill("(0, 0, 0)").join(", ");let i=[];for(let t=0;t<e.count;t++){let a=e.getX(t),r=e.getY(t),s=e.getZ(t);i.push(`(${a.toPrecision(7)}, ${r.toPrecision(7)}, ${s.toPrecision(7)})`)}return i.join(", ")}function AF(e){return`(${e.r}, ${e.g}, ${e.b})`}function AL(e){return`(${e.x}, ${e.y})`}var AP=function(e,t,i,a){var r,s=arguments.length,n=s<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};let A_=!1,AU=!1,AG="#model-viewer-no-ar-fallback",AN=(S=["quick-look","scene-viewer","webxr","none"],e=>{try{let t=aY(e),i=(t.length?t[0].terms:[]).filter(e=>e&&"ident"===e.type).map(e=>e.value).filter(e=>S.indexOf(e)>-1);return new Set(i)}catch(e){}return new Set}),AO="quick-look",Aq="scene-viewer",AH="webxr",Aj="none",Az=Symbol("arButtonContainer"),AK=Symbol("enterARWithWebXR"),AJ=Symbol("openSceneViewer"),AV=Symbol("openIOSARQuickLook"),AY=Symbol("canActivateAR"),A$=Symbol("arMode"),AW=Symbol("arModes"),AX=Symbol("arAnchor"),AZ=Symbol("preload"),A0=Symbol("onARButtonContainerClick"),A1=Symbol("onARStatus"),A2=Symbol("onARTracking"),A8=Symbol("onARTap"),A9=Symbol("selectARMode"),A3=Symbol("triggerLoad");var A5=function(e,t,i,a){var r,s=arguments.length,n=s<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};let A4="auto",A6=Symbol("defaultProgressBarElement"),A7=Symbol("posterContainerElement"),he=Symbol("defaultPosterElement"),ht=Symbol("shouldDismissPoster"),hi=Symbol("hidePoster"),ha=Symbol("modelIsRevealed"),hr=Symbol("updateProgressBar"),hs=Symbol("ariaLabelCallToAction"),hn=Symbol("onProgress");var ho=function(e,t,i,a){var r,s=arguments.length,n=s<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};let hl={basis:[a9(aV(Math.PI/32,"rad"))],keywords:{auto:[null]}},hA=Symbol("autoRotateStartTime"),hh=Symbol("radiansPerSecond"),hc=Symbol("syncRotationRate"),hd=Symbol("onCameraChange"),hu=(e=>{var t,i,a;class r 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[lL](e)}),e.removedNodes.forEach(e=>{this[lP](e)}),this[ld]())})},this[a]=new MutationObserver(this[lk])}connectedCallback(){super.connectedCallback();for(let e=0;e<this.children.length;++e)this[lL](this.children[e]);let{ShadyDOM:e}=self;null==e?this[lF].observe(this,{childList:!0}):this[lF]=e.observeChildren(this,this[lk])}disconnectedCallback(){super.disconnectedCallback();let{ShadyDOM:e}=self;null==e?this[lF].disconnect():e.unobserveChildren(this[lF])}[(t=lT,i=lk,a=lF,lg)](){super[lg]();let e=this[lc];e.forHotspots(t=>{e.updateSurfaceHotspot(t)})}[lu](e,t){super[lu](e,t);let i=this[lc],{annotationRenderer:a}=i,r=i.getCamera();i.shouldRender()&&(i.animateSurfaceHotspots(),i.updateHotspotsVisibility(r.position),a.domElement.style.display="",a.render(i,r))}updateHotspot(e){let t=this[lT].get(e.name);null!=t&&(t.updatePosition(e.position),t.updateNormal(e.normal),t.surface=e.surface,this[lc].updateSurfaceHotspot(t),this[ld]())}queryHotspot(e){let t=this[lT].get(e);if(null==t)return null;let i=lE(t.position),a=lE(t.normal),r=t.facingCamera,s=this[lc],n=s.getCamera(),o=new tO.Pq0;o.setFromMatrixPosition(t.matrixWorld),o.project(n);let l=s.width/2,A=s.height/2;o.x=o.x*l+l,o.y=-(o.y*A)+A;let h=lE(new tO.Pq0(o.x,o.y,o.z));return Number.isFinite(h.x)&&Number.isFinite(h.y)?{position:i,normal:a,canvasPosition:h,facingCamera:r}:null}positionAndNormalFromPoint(e,t){let i=this[lc],a=i.getNDC(e,t),r=i.positionAndNormalFromPoint(a);if(null==r)return null;l_.copy(i.target.matrixWorld).invert();let s=lE(r.position.applyMatrix4(l_)),n=lE(r.normal.transformDirection(l_)),o=null;return null!=r.uv&&(o=ly(r.uv)),{position:s,normal:n,uv:o}}surfaceFromPoint(e,t){let i=this[lc],a=i.getNDC(e,t);return i.surfaceFromPoint(a)}[lL](e){if(!(e instanceof HTMLElement&&0===e.slot.indexOf("hotspot")))return;let t=this[lT].get(e.slot);null!=t?t.increment():(t=new oU({name:e.slot,position:e.dataset.position,normal:e.dataset.normal,surface:e.dataset.surface}),this[lT].set(e.slot,t),this[lc].addHotspot(t)),this[lc].queueRender()}[lP](e){if(!(e instanceof HTMLElement))return;let t=this[lT].get(e.slot);t&&(t.decrement()&&(this[lc].removeHotspot(t),this[lT].delete(e.slot)),this[lc].queueRender())}}return r})((e=>{var t,i,a;class r extends e{constructor(){super(...arguments),this[t]=void 0,this[i]=null,this[a]=null,this.variantName=null,this.orientation="0 0 0",this.scale="1 1 1"}get model(){return this[oS]}get availableVariants(){return this.model?this.model[oC]():[]}get originalGltfJson(){return this[oQ]}[(t=oS,i=ox,a=oQ,oM)](){return()=>{this[ld]()}}[oR](e){return e.colorSpace="srgb",e.wrapS=1e3,e.wrapT=1e3,new nN(this[oM](),e)}async createTexture(e,t="image/png"){let{textureUtils:i}=this[lm],a=await i.loadImage(e,this.withCredentials);return a.userData.mimeType=t,this[oR](a)}async createLottieTexture(e,t=1){let{textureUtils:i}=this[lm],a=await i.loadLottie(e,t,this.withCredentials);return this[oR](a)}createVideoTexture(e){let 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();let i=new tO.Nv2(t);return this[oR](i)}createCanvasTexture(){let e=document.createElement("canvas"),t=new tO.GOR(e);return this[oR](t)}async updated(e){if(super.updated(e),e.has("variantName")){let e=this[lf].beginActivity("variant-update");e(.1);let t=this[oS],{variantName:i}=this;null!=t&&(await t[op](i),this[ld](),this.dispatchEvent(new CustomEvent("variant-applied"))),e(1)}if(e.has("orientation")||e.has("scale")){if(!this.loaded)return;let e=this[lc];e.applyTransform(),e.updateBoundingBox(),e.updateShadow(),this[lm].arRenderer.onUpdateScene(),this[ld]()}}[lg](){super[lg]();let{currentGLTF:e}=this[lc];if(null!=e){let{correlatedSceneGraph:t}=e;null!=t&&e!==this[ox]&&(this[oS]=new oB(t,this[oM]()),this[oQ]=JSON.parse(JSON.stringify(t.gltf))),"variants"in e.userData&&this.requestUpdate("variantName")}this[ox]=e}async exportScene(e){let t=this[lc];return new Promise(async(i,a)=>{let r={binary:!0,onlyVisible:!0,maxTextureSize:1/0,includeCustomExtensions:!1,forceIndices:!1};Object.assign(r,e),r.animations=t.animations,r.truncateDrawRange=!0;let s=t.shadow,n=!1;null!=s&&(n=s.visible,s.visible=!1),await this[oS][og](),new au().register(e=>new aG(e)).parse(t.model,e=>i(new Blob([r.binary?e:JSON.stringify(e)],{type:r.binary?"application/octet-stream":"application/json"})),()=>a("glTF export failed"),r),null!=s&&(s.visible=n)})}materialFromPoint(e,t){let i=this[oS];if(null==i)return null;let a=this[lc],r=a.getNDC(e,t),s=a.hitFromPoint(r);return null==s||null==s.face?null:i[om](s)}}return ov([$({type:String,attribute:"variant-name"})],r.prototype,"variantName",void 0),ov([$({type:String,attribute:"orientation"})],r.prototype,"orientation",void 0),ov([$({type:String,attribute:"scale"})],r.prototype,"scale",void 0),r})((e=>{var t,i,a;class r extends e{constructor(){super(...arguments),this.autoRotate=!1,this.autoRotateDelay=3e3,this.rotationPerSecond="auto",this[t]=performance.now(),this[i]=0,this[a]=e=>{this.autoRotate&&"user-interaction"===e.detail.source&&(this[hA]=performance.now())}}connectedCallback(){super.connectedCallback(),this.addEventListener("camera-change",this[hd]),this[hA]=performance.now()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("camera-change",this[hd]),this[hA]=performance.now()}updated(e){super.updated(e),e.has("autoRotate")&&(this[hA]=performance.now())}[(t=hA,i=hh,hc)](e){this[hh]=e[0]}[lu](e,t){if(super[lu](e,t),!this.autoRotate||!this[lI]()||this[lm].isPresenting)return;let i=Math.min(t,e-this[hA]-this.autoRotateDelay);i>0&&(this[lc].yaw=this.turntableRotation+this[hh]*i*.001)}get turntableRotation(){return this[lc].yaw}resetTurntableRotation(e=0){this[lc].yaw=e}}return a=hd,ho([$({type:Boolean,attribute:"auto-rotate"})],r.prototype,"autoRotate",void 0),ho([$({type:Number,attribute:"auto-rotate-delay"})],r.prototype,"autoRotateDelay",void 0),ho([rQ({intrinsics:hl,updateHandler:hc}),$({type:String,attribute:"rotation-per-second"})],r.prototype,"rotationPerSecond",void 0),r})((e=>{var t,i,a;class r 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[a]=null}updated(e){var t;if(super.updated(e),e.has("shadowIntensity")&&(this[lc].setShadowIntensity(.5*this.shadowIntensity),this[ld]()),e.has("shadowSoftness")&&(this[lc].setShadowSoftness(this.shadowSoftness),this[ld]()),e.has("exposure")&&(this[lc].exposure=this.exposure,this[ld]()),e.has("toneMapping")){let e=new Map([["aces",4],["agx",6],["reinhard",2],["cineon",3],["linear",1],["none",0]]);this[lc].toneMapping=null!=(t=e.get(this.toneMapping))?t:7,this[ld]()}(e.has("environmentImage")||e.has("skyboxImage"))&&this[lC]()&&this[tL](),e.has("skyboxHeight")&&(this[lc].setGroundedSkybox(),this[ld]())}hasBakedShadow(){return this[lc].bakedShadows.size>0}async [(t=tk,i=tF,a=tP,tL)](){let{skyboxImage:e,environmentImage:t}=this;null!=this[tP]&&(this[tP](),this[tP]=null);let{textureUtils:i}=this[lm];if(null==i)return;let a=this[lf].beginActivity("environment-update");try{let{environmentMap:r,skybox:s}=await i.generateEnvironmentMapAndSkybox(eY(e),t,e=>a(eZ(e,0,1)),this.withCredentials);this[tk]!==r&&(this[tk]=r,this.dispatchEvent(new CustomEvent("environment-change"))),null!=s?this[tF]=s.name===r.name?r:s:this[tF]=null,this[lc].setEnvironmentAndSkybox(this[tk],this[tF])}catch(e){if(e instanceof Error)throw this[lc].setEnvironmentAndSkybox(null,null),e}finally{a(1)}}}return tT([$({type:String,attribute:"environment-image"})],r.prototype,"environmentImage",void 0),tT([$({type:String,attribute:"skybox-image"})],r.prototype,"skyboxImage",void 0),tT([$({type:Number,attribute:"shadow-intensity"})],r.prototype,"shadowIntensity",void 0),tT([$({type:Number,attribute:"shadow-softness"})],r.prototype,"shadowSoftness",void 0),tT([$({type:Number})],r.prototype,"exposure",void 0),tT([$({type:String,attribute:"tone-mapping"})],r.prototype,"toneMapping",void 0),tT([$({type:String,attribute:"skybox-height"})],r.prototype,"skyboxHeight",void 0),r})((e=>{var t,i,a,r,s,n,o,l,A,h,c,d,u,g,p,m,f,b;class I extends e{constructor(){super(...arguments),this.cameraControls=!1,this.cameraOrbit=rF,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=r_,this.interactionPromptStyle=rU,this.orbitSensitivity=1,this.zoomSensitivity=1,this.panSensitivity=1,this.touchAction="none",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[a]=[this.shadowRoot.querySelector("#finger0"),this.shadowRoot.querySelector("#finger1")],this[r]=this.shadowRoot.querySelector(".pan-target"),this[s]=0,this[n]=1/0,this[o]=!1,this[l]=!1,this[A]=sC,this[h]=new sE(this[lc].camera,this[lA],this[lc]),this[c]=new tO.YHV,this[d]=!1,this[u]=!1,this[g]=!1,this[p]={},this[m]=()=>{let e=this[rY].changeSource;this[si]=e,e===sb&&(this[r7]=!0,this[r0]())},this[f]=()=>{this[r1](),this[ld]();let e=this[rY].changeSource;this.dispatchEvent(new CustomEvent("camera-change",{detail:{source:e}}))},this[b]=e=>{this[ll].classList.toggle("pointer-tumbling","pointer-change-start"===e.type)}}get inputSensitivity(){return this[rY].inputSensitivity}set inputSensitivity(e){this[rY].inputSensitivity=e}getCameraOrbit(){let{theta:e,phi:t,radius:i}=this[sa];return{theta:e,phi:t,radius:i,toString(){return`${this.theta}rad ${this.phi}rad ${this.radius}m`}}}getCameraTarget(){return lE(this[lm].isPresenting?this[lm].arRenderer.target:this[lc].getDynamicTarget())}getFieldOfView(){return this[rY].getFieldOfView()}getMinimumFieldOfView(){return this[rY].options.minimumFieldOfView}getMaximumFieldOfView(){return this[rY].options.maximumFieldOfView}getIdealAspect(){return this[lc].idealAspect}jumpCameraToGoal(){this[sr]=!0,this.requestUpdate(sr,!1)}resetInteractionPrompt(){this[st]=0,this[se]=1/0,this[r7]=!1,this[r6]=this.interactionPrompt===r_&&this.cameraControls}zoom(e){let t=new WheelEvent("wheel",{deltaY:-30*e});this[lA].dispatchEvent(t)}connectedCallback(){super.connectedCallback(),this[rY].addEventListener("user-interaction",this[r3]),this[rY].addEventListener("pointer-change-start",this[r4]),this[rY].addEventListener("pointer-change-end",this[r4])}disconnectedCallback(){super.disconnectedCallback(),this[rY].removeEventListener("user-interaction",this[r3]),this[rY].removeEventListener("pointer-change-start",this[r4]),this[rY].removeEventListener("pointer-change-end",this[r4])}updated(e){super.updated(e);let t=this[rY],i=this[lc];if(e.has("cameraControls")&&(this.cameraControls?(t.enableInteraction(),this.interactionPrompt===r_&&(this[r6]=!0)):(t.disableInteraction(),this[r0]()),this[lA].setAttribute("aria-label",this[lt])),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===r_&&this.cameraControls&&!this[r7]?this[r6]=!0:this[r0]()),e.has("interactionPromptStyle")&&(this[rX].style.opacity="basic"==this.interactionPromptStyle?"1":"0"),e.has("touchAction")){let 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[r8](),!0===this[sr]&&Promise.resolve().then(()=>{t.jumpToGoal(),i.jumpToGoal(),this[r5](),this[sr]=!1})}async updateFraming(){let e=this[lc],t=e.adjustedFoV(e.framedFoVDeg);await e.updateFraming();let i=e.adjustedFoV(e.framedFoVDeg),a=this[rY].getFieldOfView()/t;this[rY].setFieldOfView(i*a),this[sn]=!0,this.requestUpdate("maxFieldOfView"),this.requestUpdate("fieldOfView"),this.requestUpdate("minCameraOrbit"),this.requestUpdate("maxCameraOrbit"),this.requestUpdate("cameraOrbit"),await this.updateComplete}interact(e,t,i){let a=this[lA],r=this[rZ];if("1"===r[0].style.opacity)return void console.warn("interact() failed because an existing interaction is running.");let s=[];s.push({x:rR(t.x),y:rR(t.y)});let n=[{x:s[0].x(0),y:s[0].y(0)}];null!=i&&(s.push({x:rR(i.x),y:rR(i.y)}),n.push({x:s[1].x(0),y:s[1].y(0)}));let o=performance.now(),{width:l,height:A}=this[lc],h=this.getBoundingClientRect(),c=e=>{for(let[t,i]of n.entries()){let{style:s}=r[t];s.transform=`translateX(${l*i.x}px) translateY(${A*i.y}px)`,"pointerdown"===e?s.opacity="1":"pointerup"===e&&(s.opacity="0");let n={pointerId:t-5678,pointerType:"touch",target:a,clientX:l*i.x+h.x,clientY:A*i.y+h.y,altKey:!0};a.dispatchEvent(new PointerEvent(e,n))}},d=()=>{let t=this[si];if(t!==sC||!a.isConnected){for(let e of this[rZ])e.style.opacity="0";c("pointercancel"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:t}})),document.removeEventListener("visibilitychange",u);return}let i=Math.min(1,(performance.now()-o)/e);for(let[e,t]of n.entries())t.x=s[e].x(i),t.y=s[e].y(i);c("pointermove"),i<1?requestAnimationFrame(d):(c("pointerup"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:sC}})),document.removeEventListener("visibilitychange",u))},u=()=>{let e=0;"hidden"===document.visibilityState?e=performance.now()-o:o=performance.now()-e};document.addEventListener("visibilitychange",u),c("pointerdown"),this[si]=sC,requestAnimationFrame(d)}[(t=rW,i=rX,a=rZ,r=r$,s=st,n=se,o=r7,l=r6,A=si,h=rY,c=sa,d=sr,u=ss,g=sn,p=r2,sl)](e){let t=this[rY],i=this[lc];i.framedFoVDeg=180*e[0]/Math.PI,t.changeSource=sI,t.setFieldOfView(i.adjustedFoV(i.framedFoVDeg)),this[r3]()}[so](e){let t=this[rY];if(this[sn]){let{theta:t,phi:i}=this.getCameraOrbit();e[0]=t,e[1]=i,this[sn]=!1}t.changeSource=sI,t.setOrbit(e[0],e[1],e[2]),this[r3]()}[sh](e){this[rY].applyOptions({minimumAzimuthalAngle:e[0],minimumPolarAngle:e[1],minimumRadius:e[2]}),this.jumpCameraToGoal()}[sc](e){this[rY].applyOptions({maximumAzimuthalAngle:e[0],maximumPolarAngle:e[1],maximumRadius:e[2]}),this[r9](e[2]),this.jumpCameraToGoal()}[sd](e){this[rY].applyOptions({minimumFieldOfView:180*e[0]/Math.PI}),this.jumpCameraToGoal()}[su](e){let t=this[lc].adjustedFoV(180*e[0]/Math.PI);this[rY].applyOptions({maximumFieldOfView:t}),this.jumpCameraToGoal()}[sA](e){let[t,i,a]=e;this[lm].arRenderer.isPresenting||this[lc].setTarget(t,i,a),this[rY].changeSource=sI,this[lm].arRenderer.updateTarget(),this[r3]()}[lu](e,t){if(super[lu](e,t),this[lm].isPresenting||!this[lI]())return;let i=this[rY],a=this[lc],r=performance.now();if(this[r6]&&this.loaded&&r>this[ls]+this.interactionPromptThreshold&&(this[r6]=!1,this[se]=r,this[rW].classList.add("visible")),isFinite(this[se])&&this.interactionPromptStyle===rU){let e=(r-this[se])/5e3%1,t=rT(e),s=rk(e);if(this[rX].style.opacity=`${s}`,t!==this[st]){let e=t*a.width*.05,r=(t-this[st])*Math.PI/16;this[rX].style.transform=`translateX(${e}px)`,i.changeSource=sC,i.adjustOrbit(r,0,0),this[st]=t}}let s=i.update(e,t),n=a.updateTarget(t);(s||n)&&this[r5]()}[r0](){this[r6]=!1,this[rW].classList.remove("visible"),this[se]=1/0}[r9](e){let t=Math.abs(2*Math.max(this[lc].farRadius(),e));this[rY].updateNearFar(0,t)}[r1](){let{theta:e,phi:t}=this[rY].getCameraSpherical(this[sa]),i=Math.floor(t/rK),a=rL[(4+Math.floor((e%rV+rJ)/rz))%4],r=rP[i],s=`${r}${a}`;s in this[r2]?this[lr](this[r2][s]):this[lr](`View from stage ${s}`)}get[lt](){let e=". Use mouse, touch or arrow keys to move.";return"interaction-prompt"in this[r2]&&(e=`. ${this[r2]["interaction-prompt"]}`),super[$ariaLabel].replace(/\.$/,"")+(this.cameraControls?e:"")}async [lp](e){let t=this[rY],i=this[lc],a=i.adjustedFoV(i.framedFoVDeg);super[lp](e);let r=i.adjustedFoV(i.framedFoVDeg)/a,s=t.getFieldOfView()*(isFinite(r)?r:1);t.updateAspect(this[lc].aspect),this.requestUpdate("maxFieldOfView",this.maxFieldOfView),await this.updateComplete,this[rY].setFieldOfView(s),this.jumpCameraToGoal()}[lg](){super[lg](),this[ss]?this[sn]=!0:this[ss]=!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=r3,f=r5,b=r4,r8)](){if("string"==typeof this.a11y)if(this.a11y.startsWith("{"))try{this[r2]=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[r2]={};else"object"==typeof this.a11y&&null!=this.a11y?this[r2]=Object.assign({},this.a11y):this[r2]={};this[lA].setAttribute("aria-label",this[lt])}}return rD([$({type:Boolean,attribute:"camera-controls"})],I.prototype,"cameraControls",void 0),rD([rQ({intrinsics:rO,observeEffects:!0,updateHandler:so}),$({type:String,attribute:"camera-orbit",hasChanged:()=>!0})],I.prototype,"cameraOrbit",void 0),rD([rQ({intrinsics:rj,observeEffects:!0,updateHandler:sA}),$({type:String,attribute:"camera-target",hasChanged:()=>!0})],I.prototype,"cameraTarget",void 0),rD([rQ({intrinsics:rG,observeEffects:!0,updateHandler:sl}),$({type:String,attribute:"field-of-view",hasChanged:()=>!0})],I.prototype,"fieldOfView",void 0),rD([rQ({intrinsics:rq,updateHandler:sh}),$({type:String,attribute:"min-camera-orbit",hasChanged:()=>!0})],I.prototype,"minCameraOrbit",void 0),rD([rQ({intrinsics:rH,updateHandler:sc}),$({type:String,attribute:"max-camera-orbit",hasChanged:()=>!0})],I.prototype,"maxCameraOrbit",void 0),rD([rQ({intrinsics:rN,updateHandler:sd}),$({type:String,attribute:"min-field-of-view",hasChanged:()=>!0})],I.prototype,"minFieldOfView",void 0),rD([rQ({intrinsics:rG,updateHandler:su}),$({type:String,attribute:"max-field-of-view",hasChanged:()=>!0})],I.prototype,"maxFieldOfView",void 0),rD([$({type:Number,attribute:"interaction-prompt-threshold"})],I.prototype,"interactionPromptThreshold",void 0),rD([$({type:String,attribute:"interaction-prompt"})],I.prototype,"interactionPrompt",void 0),rD([$({type:String,attribute:"interaction-prompt-style"})],I.prototype,"interactionPromptStyle",void 0),rD([$({type:Number,attribute:"orbit-sensitivity"})],I.prototype,"orbitSensitivity",void 0),rD([$({type:Number,attribute:"zoom-sensitivity"})],I.prototype,"zoomSensitivity",void 0),rD([$({type:Number,attribute:"pan-sensitivity"})],I.prototype,"panSensitivity",void 0),rD([$({type:String,attribute:"touch-action"})],I.prototype,"touchAction",void 0),rD([$({type:Boolean,attribute:"disable-zoom"})],I.prototype,"disableZoom",void 0),rD([$({type:Boolean,attribute:"disable-pan"})],I.prototype,"disablePan",void 0),rD([$({type:Boolean,attribute:"disable-tap"})],I.prototype,"disableTap",void 0),rD([$({type:Number,attribute:"interpolation-decay"})],I.prototype,"interpolationDecay",void 0),rD([$()],I.prototype,"a11y",void 0),I})((e=>{var t,i,a,r,s,n,o,l,A,h;class c 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[a]=document.createElement("a"),this[r]=new Set,this[s]=Aj,this[n]=!1,this[o]=e=>{e.preventDefault(),this.activateAR()},this[l]=({status:e})=>{(e===sS||this[lm].arRenderer.presentedScene===this[lc])&&(this.setAttribute("ar-status",e),this.dispatchEvent(new CustomEvent("ar-status",{detail:{status:e}})),e===sS?this.removeAttribute("ar-tracking"):e===sM&&this.setAttribute("ar-tracking",sD))},this[A]=({status:e})=>{this.setAttribute("ar-tracking",e),this.dispatchEvent(new CustomEvent("ar-tracking",{detail:{status:e}}))},this[h]=e=>{"_apple_ar_quicklook_button_tapped"==e.data&&this.dispatchEvent(new CustomEvent("quick-look-button-tapped"))}}get canActivateAR(){return this[A$]!==Aj}connectedCallback(){super.connectedCallback(),null!=this[lm].arRenderer&&(this[lm].arRenderer.addEventListener("status",this[A1]),this.setAttribute("ar-status",sS),this[lm].arRenderer.addEventListener("tracking",this[A2])),this[AX].addEventListener("message",this[A8])}disconnectedCallback(){super.disconnectedCallback(),null!=this[lm].arRenderer&&(this[lm].arRenderer.removeEventListener("status",this[A1]),this[lm].arRenderer.removeEventListener("tracking",this[A2])),this[AX].removeEventListener("message",this[A8])}update(e){super.update(e),e.has("arScale")&&(this[lc].canScale="fixed"!==this.arScale),e.has("arPlacement")&&(this[lc].updateShadow(),this[ld]()),e.has("arModes")&&(this[AW]=AN(this.arModes)),(e.has("ar")||e.has("arModes")||e.has("src")||e.has("iosSrc")||e.has("arUsdzMaxTextureSize"))&&this[A9]()}async activateAR(){switch(this[A$]){case AO:await this[AV]();break;case AH:await this[AK]();break;case Aq:this[AJ]();break;default:console.warn("No AR Mode can be activated. This is probably due to missing configuration or device capabilities")}}async [(t=AY,i=Az,a=AX,r=AW,s=A$,n=AZ,o=A0,l=A1,A=A2,h=A8,A9)](){var e;let t=Aj;if(this.ar){if(null!=this.src)for(let i of this[AW]){if("webxr"===i&&eG&&!A_&&await this[lm].arRenderer.supportsPresentation()){t=AH;break}if("scene-viewer"===i&&!AU&&(eK||navigator.userAgentData&&navigator.userAgentData.getHighEntropyValues&&(null==(e=(await navigator.userAgentData.getHighEntropyValues(["formFactor"])).formFactor)?void 0:e.includes("XR")))){t=Aq;break}if("quick-look"===i&&eV){t=AO;break}}t===Aj&&null!=this.iosSrc&&eV&&(t=AO)}if(t!==Aj)this[Az].classList.add("enabled"),this[Az].addEventListener("click",this[A0]);else if(this[Az].classList.contains("enabled")){this[Az].removeEventListener("click",this[A0]),this[Az].classList.remove("enabled");let e="failed";this.setAttribute("ar-status",e),this.dispatchEvent(new CustomEvent("ar-status",{detail:{status:e}}))}this[A$]=t}async [AK](){console.log("Attempting to present in AR with WebXR..."),await this[A3]();try{this[Az].removeEventListener("click",this[A0]);let{arRenderer:e}=this[lm];e.placeOnWall="wall"===this.arPlacement,await e.present(this[lc],this.xrEnvironment)}catch(e){console.warn("Error while trying to present in AR with WebXR"),console.error(e),await this[lm].arRenderer.stopPresenting(),A_=!0,console.warn("Falling back to next ar-mode"),await this[A9](),this.activateAR()}finally{this[A9]()}}async [A3](){this.loaded||(this[AZ]=!0,this[ln](),await ((e,t,i=null)=>new Promise(a=>{e.addEventListener(t,function r(s){(!i||i(s))&&(a(s),e.removeEventListener(t,r))})}))(this,"load"),this[AZ]=!1)}[lC](){return super[lC]()||this[AZ]}[AJ](){let e=self.location.toString(),t=new URL(e),i=new URL(this.src,e);i.hash&&(i.hash="");let a=new URLSearchParams(i.search);if(t.hash=AG,a.set("mode","ar_preferred"),a.has("disable_occlusion")||a.set("disable_occlusion","true"),"fixed"===this.arScale&&a.set("resizable","false"),"wall"===this.arPlacement&&a.set("enable_vertical_placement","true"),a.has("sound")){let t=new URL(a.get("sound"),e);a.set("sound",t.toString())}if(a.has("link")){let t=new URL(a.get("link"),e);a.set("link",t.toString())}let r=`intent://arvr.google.com/scene-viewer/1.2?${a.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;`,s=()=>{self.location.hash===AG&&(AU=!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[A9]())};self.addEventListener("hashchange",s,{once:!0}),this[AX].setAttribute("href",r),console.log("Attempting to present in AR with Scene Viewer..."),this[AX].click()}async [AV](){let e=!this.iosSrc;this[Az].classList.remove("enabled");let t=e?await this.prepareUSDZ():this.iosSrc,i=new URL(t,self.location.toString());if(e){let e=new URL(self.location.toString()),t=new URL(this.src,e);t.hash&&(i.hash=t.hash)}"fixed"===this.arScale&&(i.hash&&(i.hash+="&"),i.hash+="allowsContentScaling=0");let a=this[AX];a.setAttribute("rel","ar");let r=document.createElement("img");a.appendChild(r),a.setAttribute("href",i.toString()),e&&a.setAttribute("download","model.usdz"),a.style.display="none",a.isConnected||this.shadowRoot.appendChild(a),console.log("Attempting to present in AR with Quick Look..."),a.click(),a.removeChild(r),e&&URL.revokeObjectURL(t),this[Az].classList.add("enabled")}async prepareUSDZ(){let e=this[lf].beginActivity("usdz-conversion");await this[A3]();let{model:t,shadow:i,target:a}=this[lc];if(null==t)return"";let r=!1;null!=i&&(r=i.visible,i.visible=!1),e(.2);let s=new Ay;a.remove(t),t.position.copy(a.position),t.updateWorldMatrix(!1,!0);let n=await s.parseAsync(t,{maxTextureSize:isNaN(this.arUsdzMaxTextureSize)?1/0:Math.max(parseInt(this.arUsdzMaxTextureSize),16)});t.position.set(0,0,0),a.add(t);let o=new Blob([n],{type:"model/vnd.usdz+zip"}),l=URL.createObjectURL(o);return e(1),null!=i&&(i.visible=r),l}}return AP([$({type:Boolean,attribute:"ar"})],c.prototype,"ar",void 0),AP([$({type:String,attribute:"ar-scale"})],c.prototype,"arScale",void 0),AP([$({type:String,attribute:"ar-usdz-max-texture-size"})],c.prototype,"arUsdzMaxTextureSize",void 0),AP([$({type:String,attribute:"ar-placement"})],c.prototype,"arPlacement",void 0),AP([$({type:String,attribute:"ar-modes"})],c.prototype,"arModes",void 0),AP([$({type:String,attribute:"ios-src"})],c.prototype,"iosSrc",void 0),AP([$({type:Boolean,attribute:"xr-environment"})],c.prototype,"xrEnvironment",void 0),c})((e=>{var t,i,a,r,s,n,o,l;class A extends e{static set dracoDecoderLocation(e){aa.setDRACODecoderLocation(e)}static get dracoDecoderLocation(){return aa.getDRACODecoderLocation()}static set ktx2TranscoderLocation(e){aa.setKTX2TranscoderLocation(e)}static get ktx2TranscoderLocation(){return aa.getKTX2TranscoderLocation()}static set meshoptDecoderLocation(e){aa.setMeshoptDecoderLocation(e)}static get meshoptDecoderLocation(){return aa.getMeshoptDecoderLocation()}static set lottieLoaderLocation(e){nf.singleton.textureUtils.lottieLoaderUrl=e}static get lottieLoaderLocation(){return nf.singleton.textureUtils.lottieLoaderUrl}static mapURLs(e){nf.singleton.loader[ae].manager.setURLModifier(e)}dismissPoster(){this.loaded?this[hi]():(this[ht]=!0,this[ln]())}showPoster(){let e=this[A7];if(e.classList.contains("show"))return;e.classList.add("show"),this[lA].classList.remove("show");let t=this[he];t.removeAttribute("tabindex"),t.removeAttribute("aria-hidden");let i=this.modelIsVisible;this[ha]=!1,this[le](i)}getDimensions(){return lE(this[lc].size)}getBoundingBoxCenter(){return lE(this[lc].boundingBox.getCenter(new tO.Pq0))}constructor(...e){super(...e),this.poster=null,this.reveal=A4,this.loading="auto",this[t]=!1,this[i]=!1,this[a]=this.shadowRoot.querySelector(".slot.poster"),this[r]=this.shadowRoot.querySelector("#default-poster"),this[s]=this.shadowRoot.querySelector("#default-progress-bar > .bar"),this[n]=this[he].getAttribute("aria-label"),this[o]=((e,t)=>{let i=null,a=(...a)=>{null==i&&(e(...a),i=self.setTimeout(()=>i=null,t))};return a.flush=()=>{null!=i&&(self.clearTimeout(i),i=null)},a})(e=>{let t=this[A6].parentNode;requestAnimationFrame(()=>{this[A6].style.transform=`scaleX(${e})`,0===e&&(t.removeChild(this[A6]),t.appendChild(this[A6])),this[A6].classList.toggle("hide",1===e)})},100),this[l]=e=>{let t=e.detail.totalProgress,i=e.detail.reason;1===t&&(this[hr].flush(),this.loaded&&(this[ht]||this.reveal===A4)&&this[hi]()),this[hr](t),this.dispatchEvent(new CustomEvent("progress",{detail:{totalProgress:t,reason:i}}))};const A=self.ModelViewerElement||{},h=A.dracoDecoderLocation||"https://www.gstatic.com/draco/versioned/decoders/1.5.6/";aa.setDRACODecoderLocation(h);const c=A.ktx2TranscoderLocation||"https://www.gstatic.com/basis-universal/versioned/2021-04-15-ba1c3e4/";aa.setKTX2TranscoderLocation(c),A.meshoptDecoderLocation&&aa.setMeshoptDecoderLocation(A.meshoptDecoderLocation);const d=A.lottieLoaderLocation||"https://cdn.jsdelivr.net/npm/three@0.149.0/examples/jsm/loaders/LottieLoader.js";null!=nf.singleton.textureUtils&&(nf.singleton.textureUtils.lottieLoaderUrl=d)}connectedCallback(){super.connectedCallback(),this.loaded||this.showPoster(),this[lf].addEventListener("progress",this[hn])}disconnectedCallback(){super.disconnectedCallback(),this[lf].removeEventListener("progress",this[hn])}async updated(e){super.updated(e),e.has("poster")&&null!=this.poster&&(this[he].style.backgroundImage=`url(${this.poster})`),e.has("alt")&&this[he].setAttribute("aria-label",this[li]),(e.has("reveal")||e.has("loading"))&&this[ln]()}[(t=ha,i=ht,a=A7,r=he,s=A6,n=hs,o=hr,l=hn,lC)](){return!!this.src&&(this[ht]||"eager"===this.loading||this.reveal===A4&&this[o7])}[hi](){this[ht]=!1;let e=this[A7];if(!e.classList.contains("show"))return;e.classList.remove("show"),this[lA].classList.add("show");let t=this.modelIsVisible;this[ha]=!0,this[le](t);let i=this.getRootNode();i&&i.activeElement===this&&this[lA].focus();let a=this[he];a.setAttribute("aria-hidden","true"),a.tabIndex=-1,this.dispatchEvent(new CustomEvent("poster-dismissed"))}[lI](){return super[lI]()&&this[ha]}}return A5([$({type:String})],A.prototype,"poster",void 0),A5([$({type:String})],A.prototype,"reveal",void 0),A5([$({type:String})],A.prototype,"loading",void 0),A})((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[lc].subscribeMixerEvent("loop",e=>{let t=e.action._loopCount,i=e.action._clip.name,a=e.action._clip.uuid,r=this[lc].markedAnimations.find(e=>e.name===i);if(r){this[lc].updateAnimationLoop(r.name,r.loopMode,r.repetitionCount);let e=this[lc].markedAnimations.filter(e=>e.name!==i);this[lc].markedAnimations=e}this.dispatchEvent(new CustomEvent("loop",{detail:{count:t,name:i,uuid:a}}))}),this[lc].subscribeMixerEvent("finished",e=>{if(this[lc].appendedAnimations.includes(e.action._clip.name)){let t=this[lc].appendedAnimations.filter(t=>t!==e.action._clip.name);this[lc].appendedAnimations=t}else this[lS]=!0;this.dispatchEvent(new CustomEvent("finished"))})}get availableAnimations(){return this.loaded?this[lc].animationNames:[]}get duration(){return this[lc].duration}get paused(){return this[lS]}get currentTime(){return this[lc].animationTime}get appendedAnimations(){return this[lc].appendedAnimations}set currentTime(e){this[lc].animationTime=e,this[ld]()}get timeScale(){return this[lc].animationTimeScale}set timeScale(e){this[lc].animationTimeScale=e}pause(){this[lS]||(this[lS]=!0,this.dispatchEvent(new CustomEvent("pause")))}play(e){this.availableAnimations.length>0&&(this[lS]=!1,this[lv](e),this.dispatchEvent(new CustomEvent("play")))}appendAnimation(e,t){this.availableAnimations.length>0&&(this[lS]=!1,this[lx](e,t),this.dispatchEvent(new CustomEvent("append-animation")))}detachAnimation(e,t){this.availableAnimations.length>0&&(this[lS]=!1,this[lQ](e,t),this.dispatchEvent(new CustomEvent("detach-animation")))}[(t=lS,lg)](){super[lg](),this[lS]=!0,null!=this.animationName&&this[lv](),this.autoplay&&this.play()}[lu](e,t){super[lu](e,t),!this[lS]&&(this[lI]()||this[lm].isPresenting)&&(this[lc].updateAnimation(t/1e3),this[ld]())}updated(e){super.updated(e),e.has("autoplay")&&this.autoplay&&this.play(),e.has("animationName")&&this[lv]()}[lv](e=lM){var t;let i=null!=(t=e.repetitions)?t:1/0,a=e.pingpong?2202:1===i?2200:2201;this[lc].playAnimation(this.animationName,this.animationCrossfadeDuration/1e3,a,i),this[lS]&&(this[lc].updateAnimation(0),this[ld]())}[lx](e="",t=lR){var i;let a=null!=(i=t.repetitions)?i:1/0,r=t.pingpong?2202:1===a?2200:2201,s=!!t.repetitions||"pingpong"in t;this[lc].appendAnimation(e||this.animationName,r,a,t.weight,t.timeScale,t.fade,t.warp,t.relativeWarp,t.time,s),this[lS]&&(this[lc].updateAnimation(0),this[ld]())}[lQ](e="",t=lD){this[lc].detachAnimation(e||this.animationName,t.fade),this[lS]&&(this[lc].updateAnimation(0),this[ld]())}}return lB([$({type:Boolean})],i.prototype,"autoplay",void 0),lB([$({type:String,attribute:"animation-name"})],i.prototype,"animationName",void 0),lB([$({type:Number,attribute:"animation-crossfade-duration"})],i.prototype,"animationCrossfadeDuration",void 0),i})(lw))))))));customElements.define("model-viewer",hu)},4525(e,t,i){"use strict";i.d(t,{b:()=>o});var a=i(9081),r=i(4253),s=i(8525),n=a.forwardRef((e,t)=>(0,s.jsx)(r.sG.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));n.displayName="Label";var o=n},1104(e,t,i){"use strict";i.d(t,{C1:()=>ei,bL:()=>ee,q7:()=>et});var a=i(9081),r=i(6478),s=i(3577),n=i(7463),o=i(4253),l=i(2849),A=i(8525),h=i(4798),c=i(2274),d=i(8794),u=i(5422),g="rovingFocusGroup.onEntryFocus",p={bubbles:!1,cancelable:!0},m="RovingFocusGroup",[f,b,I]=function(e){let t=e+"CollectionProvider",[i,r]=(0,n.A)(t),[o,h]=i(t,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:t,children:i}=e,r=a.useRef(null),s=a.useRef(new Map).current;return(0,A.jsx)(o,{scope:t,itemMap:s,collectionRef:r,children:i})};c.displayName=t;let d=e+"CollectionSlot",u=(0,l.TL)(d),g=a.forwardRef((e,t)=>{let{scope:i,children:a}=e,r=h(d,i),n=(0,s.s)(t,r.collectionRef);return(0,A.jsx)(u,{ref:n,children:a})});g.displayName=d;let p=e+"CollectionItemSlot",m="data-radix-collection-item",f=(0,l.TL)(p),b=a.forwardRef((e,t)=>{let{scope:i,children:r,...n}=e,o=a.useRef(null),l=(0,s.s)(t,o),c=h(p,i);return a.useEffect(()=>(c.itemMap.set(o,{ref:o,...n}),()=>void c.itemMap.delete(o))),(0,A.jsx)(f,{...{[m]:""},ref:l,children:r})});return b.displayName=p,[{Provider:c,Slot:g,ItemSlot:b},function(t){let i=h(e+"CollectionConsumer",t);return a.useCallback(()=>{let e=i.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(i.itemMap.values()).sort((e,i)=>t.indexOf(e.ref.current)-t.indexOf(i.ref.current))},[i.collectionRef,i.itemMap])},r]}(m),[C,E]=(0,n.A)(m,[I]),[y,w]=C(m),B=a.forwardRef((e,t)=>(0,A.jsx)(f.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,A.jsx)(f.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,A.jsx)(v,{...e,ref:t})})}));B.displayName=m;var v=a.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:i,orientation:n,loop:l=!1,dir:h,currentTabStopId:f,defaultCurrentTabStopId:I,onCurrentTabStopIdChange:C,onEntryFocus:E,preventScrollOnEntryFocus:w=!1,...B}=e,v=a.useRef(null),x=(0,s.s)(t,v),Q=(0,u.jH)(h),[S,R]=(0,d.i)({prop:f,defaultProp:I??null,onChange:C,caller:m}),[D,T]=a.useState(!1),k=(0,c.c)(E),F=b(i),L=a.useRef(!1),[P,_]=a.useState(0);return a.useEffect(()=>{let e=v.current;if(e)return e.addEventListener(g,k),()=>e.removeEventListener(g,k)},[k]),(0,A.jsx)(y,{scope:i,orientation:n,dir:Q,loop:l,currentTabStopId:S,onItemFocus:a.useCallback(e=>R(e),[R]),onItemShiftTab:a.useCallback(()=>T(!0),[]),onFocusableItemAdd:a.useCallback(()=>_(e=>e+1),[]),onFocusableItemRemove:a.useCallback(()=>_(e=>e-1),[]),children:(0,A.jsx)(o.sG.div,{tabIndex:D||0===P?-1:0,"data-orientation":n,...B,ref:x,style:{outline:"none",...e.style},onMouseDown:(0,r.mK)(e.onMouseDown,()=>{L.current=!0}),onFocus:(0,r.mK)(e.onFocus,e=>{let t=!L.current;if(e.target===e.currentTarget&&t&&!D){let t=new CustomEvent(g,p);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=F().filter(e=>e.focusable);M([e.find(e=>e.active),e.find(e=>e.id===S),...e].filter(Boolean).map(e=>e.ref.current),w)}}L.current=!1}),onBlur:(0,r.mK)(e.onBlur,()=>T(!1))})})}),x="RovingFocusGroupItem",Q=a.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:i,focusable:s=!0,active:n=!1,tabStopId:l,children:c,...d}=e,u=(0,h.B)(),g=l||u,p=w(x,i),m=p.currentTabStopId===g,I=b(i),{onFocusableItemAdd:C,onFocusableItemRemove:E,currentTabStopId:y}=p;return a.useEffect(()=>{if(s)return C(),()=>E()},[s,C,E]),(0,A.jsx)(f.ItemSlot,{scope:i,id:g,focusable:s,active:n,children:(0,A.jsx)(o.sG.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...d,ref:t,onMouseDown:(0,r.mK)(e.onMouseDown,e=>{s?p.onItemFocus(g):e.preventDefault()}),onFocus:(0,r.mK)(e.onFocus,()=>p.onItemFocus(g)),onKeyDown:(0,r.mK)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,i){var a;let r=(a=e.key,"rtl"!==i?a:"ArrowLeft"===a?"ArrowRight":"ArrowRight"===a?"ArrowLeft":a);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return S[r]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=I().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){var i,a;"prev"===t&&r.reverse();let s=r.indexOf(e.currentTarget);r=p.loop?(i=r,a=s+1,i.map((e,t)=>i[(a+t)%i.length])):r.slice(s+1)}setTimeout(()=>M(r))}}),children:"function"==typeof c?c({isCurrentTabStop:m,hasTabStop:null!=y}):c})})});Q.displayName=x;var S={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function M(e,t=!1){let i=document.activeElement;for(let a of e)if(a===i||(a.focus({preventScroll:t}),document.activeElement!==i))return}var R=i(6026),D=i(7537),T="Radio",[k,F]=(0,n.A)(T),[L,P]=k(T),_=a.forwardRef((e,t)=>{let{__scopeRadio:i,name:n,checked:l=!1,required:h,disabled:c,value:d="on",onCheck:u,form:g,...p}=e,[m,f]=a.useState(null),b=(0,s.s)(t,e=>f(e)),I=a.useRef(!1),C=!m||g||!!m.closest("form");return(0,A.jsxs)(L,{scope:i,checked:l,disabled:c,children:[(0,A.jsx)(o.sG.button,{type:"button",role:"radio","aria-checked":l,"data-state":O(l),"data-disabled":c?"":void 0,disabled:c,value:d,...p,ref:b,onClick:(0,r.mK)(e.onClick,e=>{l||u?.(),C&&(I.current=e.isPropagationStopped(),I.current||e.stopPropagation())})}),C&&(0,A.jsx)(N,{control:m,bubbles:!I.current,name:n,value:d,checked:l,required:h,disabled:c,form:g,style:{transform:"translateX(-100%)"}})]})});_.displayName=T;var U="RadioIndicator",G=a.forwardRef((e,t)=>{let{__scopeRadio:i,forceMount:a,...r}=e,s=P(U,i);return(0,A.jsx)(D.C,{present:a||s.checked,children:(0,A.jsx)(o.sG.span,{"data-state":O(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})})});G.displayName=U;var N=a.forwardRef(({__scopeRadio:e,control:t,checked:i,bubbles:r=!0,...n},l)=>{let h,c=a.useRef(null),d=(0,s.s)(c,l),u=(h=a.useRef({value:i,previous:i}),a.useMemo(()=>(h.current.value!==i&&(h.current.previous=h.current.value,h.current.value=i),h.current.previous),[i])),g=function(e){let[t,i]=a.useState(void 0);return(0,R.N)(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let a,r;if(!Array.isArray(t)||!t.length)return;let s=t[0];if("borderBoxSize"in s){let e=s.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,r=t.blockSize}else a=e.offsetWidth,r=e.offsetHeight;i({width:a,height:r})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}i(void 0)},[e]),t}(t);return a.useEffect(()=>{let e=c.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(u!==i&&t){let a=new Event("click",{bubbles:r});t.call(e,i),e.dispatchEvent(a)}},[u,i,r]),(0,A.jsx)(o.sG.input,{type:"radio","aria-hidden":!0,defaultChecked:i,...n,tabIndex:-1,ref:d,style:{...n.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function O(e){return e?"checked":"unchecked"}N.displayName="RadioBubbleInput";var q=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],H="RadioGroup",[j,z]=(0,n.A)(H,[E,F]),K=E(),J=F(),[V,Y]=j(H),$=a.forwardRef((e,t)=>{let{__scopeRadioGroup:i,name:a,defaultValue:r,value:s,required:n=!1,disabled:l=!1,orientation:h,dir:c,loop:g=!0,onValueChange:p,...m}=e,f=K(i),b=(0,u.jH)(c),[I,C]=(0,d.i)({prop:s,defaultProp:r??null,onChange:p,caller:H});return(0,A.jsx)(V,{scope:i,name:a,required:n,disabled:l,value:I,onValueChange:C,children:(0,A.jsx)(B,{asChild:!0,...f,orientation:h,dir:b,loop:g,children:(0,A.jsx)(o.sG.div,{role:"radiogroup","aria-required":n,"aria-orientation":h,"data-disabled":l?"":void 0,dir:b,...m,ref:t})})})});$.displayName=H;var W="RadioGroupItem",X=a.forwardRef((e,t)=>{let{__scopeRadioGroup:i,disabled:n,...o}=e,l=Y(W,i),h=l.disabled||n,c=K(i),d=J(i),u=a.useRef(null),g=(0,s.s)(t,u),p=l.value===o.value,m=a.useRef(!1);return a.useEffect(()=>{let e=e=>{q.includes(e.key)&&(m.current=!0)},t=()=>m.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),(0,A.jsx)(Q,{asChild:!0,...c,focusable:!h,active:p,children:(0,A.jsx)(_,{disabled:h,required:l.required,checked:p,...d,...o,name:l.name,ref:g,onCheck:()=>l.onValueChange(o.value),onKeyDown:(0,r.mK)(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:(0,r.mK)(o.onFocus,()=>{m.current&&u.current?.click()})})})});X.displayName=W;var Z=a.forwardRef((e,t)=>{let{__scopeRadioGroup:i,...a}=e,r=J(i);return(0,A.jsx)(G,{...r,...a,ref:t})});Z.displayName="RadioGroupIndicator";var ee=$,et=X,ei=Z},2608(e,t,i){"use strict";let a,r,s,n;i.d(t,{NNP:()=>tY,yLC:()=>t$});let o=(e,t)=>{if("number"==typeof e){if(3===t)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|240&e)/255,b:(15&e|e<<4&240)/255};if(4===t)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|240&e)/255,alpha:(15&e|e<<4&240)/255};if(6===t)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(255&e)/255};if(8===t)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(255&e)/255}}},l={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},A=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,h="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",c=`${h}%`,d=`(?:${h}%|${h})`,u=`(?:${h}%|${h}|none)`,g=`(?:${h}(deg|grad|rad|turn)|${h})`,p="\\s*,\\s*";RegExp("^"+u+"$");let m=RegExp(`^rgba?\\(\\s*${h}${p}${h}${p}${h}\\s*(?:,\\s*${d}\\s*)?\\)$`),f=RegExp(`^rgba?\\(\\s*${c}${p}${c}${p}${c}\\s*(?:,\\s*${d}\\s*)?\\)$`),b=(e="rgb")=>t=>{let i;return void 0!==(t=void 0===(i=t)?void 0:"object"!=typeof i?q(i):void 0!==i.mode?i:e?{...i,mode:e}:void 0)?t.mode===e?t:I[t.mode][e]?I[t.mode][e](t):"rgb"===e?I[t.mode].rgb(t):I.rgb[e](I[t.mode].rgb(t)):void 0},I={},C={},E=[],y={},w=e=>e,B=e=>(I[e.mode]={...I[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{I[t]||(I[t]={}),I[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(void 0===e.ranges[t]&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw Error(`Missing interpolator for: ${t}`);"function"==typeof e.interpolate[t]&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=w)}),C[e.mode]=e,(e.parse||[]).forEach(t=>{v(t,e.mode)}),b(e.mode)),v=(e,t)=>{if("string"==typeof e){if(!t)throw Error("'mode' required when 'parser' is a string");y[e]=t}else"function"==typeof e&&0>E.indexOf(e)&&E.push(e)},x=/[^\x00-\x7F]|[a-zA-Z_]/,Q=/[^\x00-\x7F]|[-\w]/,S="function",M="ident",R="number",D="percentage",T="none",k="alpha",F=0;function L(e){let t=e[F],i=e[F+1];return"-"===t||"+"===t?/\d/.test(i)||"."===i&&/\d/.test(e[F+2]):"."===t?/\d/.test(i):/\d/.test(t)}function P(e){if(F>=e.length)return!1;let t=e[F];if(x.test(t))return!0;if("-"===t){if(e.length-F<2)return!1;let t=e[F+1];if("-"===t||x.test(t))return!0}return!1}let _={deg:1,rad:180/Math.PI,grad:.9,turn:360};function U(e){let t="";if(("-"===e[F]||"+"===e[F])&&(t+=e[F++]),t+=G(e),"."===e[F]&&/\d/.test(e[F+1])&&(t+=e[F++]+G(e)),("e"===e[F]||"E"===e[F])&&(("-"===e[F+1]||"+"===e[F+1])&&/\d/.test(e[F+2])?t+=e[F++]+e[F++]+G(e):/\d/.test(e[F+1])&&(t+=e[F++]+G(e))),P(e)){let i=N(e);return"deg"===i||"rad"===i||"turn"===i||"grad"===i?{type:"hue",value:t*_[i]}:void 0}return"%"===e[F]?(F++,{type:D,value:+t}):{type:R,value:+t}}function G(e){let t="";for(;/\d/.test(e[F]);)t+=e[F++];return t}function N(e){let t="";for(;F<e.length&&Q.test(e[F]);)t+=e[F++];return t}function O(e,t){let i,a=[];for(;e._i<e.length;){if((i=e[e._i++]).type===T||i.type===R||i.type===k||i.type===D||t&&"hue"===i.type){a.push(i);continue}if(")"===i.type){if(e._i<e.length)return;continue}return}if(!(a.length<3)&&!(a.length>4)){if(4===a.length){if(a[3].type!==k)return;a[3]=a[3].value}return 3===a.length&&a.push({type:T,value:void 0}),a.every(e=>e.type!==k)?a:void 0}}let q=e=>{let t;if("string"!=typeof e)return;let i=function(e=""){let t,i=e.trim(),a=[];for(F=0;F<i.length;){if("\n"===(t=i[F++])||" "===t||" "===t){for(;F<i.length&&("\n"===i[F]||" "===i[F]||" "===i[F]);)F++;continue}if(","===t)return;if(")"===t){a.push({type:")"});continue}if("+"===t){if(F--,L(i)){a.push(U(i));continue}return}if("-"===t){if(F--,L(i)){a.push(U(i));continue}if(P(i)){a.push({type:M,value:N(i)});continue}return}if("."===t){if(F--,L(i)){a.push(U(i));continue}return}if("/"===t){let e;for(;F<i.length&&("\n"===i[F]||" "===i[F]||" "===i[F]);)F++;if(L(i)&&"hue"!==(e=U(i)).type){a.push({type:k,value:e});continue}if(P(i)&&"none"===N(i)){a.push({type:k,value:{type:T,value:void 0}});continue}return}if(/\d/.test(t)){F--,a.push(U(i));continue}if(x.test(t)){F--,a.push(function(e){let t=N(e);return"("===e[F]?(F++,{type:S,value:t}):"none"===t?{type:T,value:void 0}:{type:M,value:t}}(i));continue}return}return a}(e),a=i?function(e,t){e._i=0;let i=e[e._i++];if(!i||i.type!==S)return;let a=O(e,t);if(a)return a.unshift(i.value),a}(i,!0):void 0,r=0,s=E.length;for(;r<s;)if(void 0!==(t=E[r++](e,a)))return t;return i?function(e){e._i=0;let t=e[e._i++];if(!t||t.type!==S||"color"!==t.value||(t=e[e._i++]).type!==M)return;let i=y[t.value];if(!i)return;let a={mode:i},r=O(e,!1);if(!r)return;let s=C[i].channels;for(let e=0,t,i;e<s.length;e++)t=r[e],i=s[e],t.type!==T&&(a[i]=t.type===R?t.value:t.value/100,"alpha"===i&&(a[i]=Math.max(0,Math.min(1,a[i]))));return a}(i):void 0},H=(a=(e,t,i)=>e+i*(t-e),e=>{let t=(e=>{let t=[];for(let i=0;i<e.length-1;i++){let a=e[i],r=e[i+1];void 0===a&&void 0===r?t.push(void 0):void 0!==a&&void 0!==r?t.push([a,r]):t.push(void 0!==a?[a,a]:[r,r])}return t})(e);return e=>{let i=e*t.length,r=e>=1?t.length-1:Math.max(Math.floor(i),0),s=t[r];return void 0===s?void 0:a(s[0],s[1],i-r)}}),j=e=>{let t=!1,i=e.map(e=>void 0!==e?(t=!0,e):1);return t?i:e},z={mode:"rgb",channels:["r","g","b","alpha"],parse:[function(e,t){if(!t||"rgb"!==t[0]&&"rgba"!==t[0])return;let i={mode:"rgb"},[,a,r,s,n]=t;if("hue"!==a.type&&"hue"!==r.type&&"hue"!==s.type)return a.type!==T&&(i.r=a.type===R?a.value/255:a.value/100),r.type!==T&&(i.g=r.type===R?r.value/255:r.value/100),s.type!==T&&(i.b=s.type===R?s.value/255:s.value/100),n.type!==T&&(i.alpha=Math.min(1,Math.max(0,n.type===R?n.value:n.value/100))),i},e=>{let t;return(t=e.match(A))?o(parseInt(t[1],16),t[1].length):void 0},e=>{let t,i={mode:"rgb"};if(t=e.match(m))void 0!==t[1]&&(i.r=t[1]/255),void 0!==t[2]&&(i.g=t[2]/255),void 0!==t[3]&&(i.b=t[3]/255);else{if(!(t=e.match(f)))return;void 0!==t[1]&&(i.r=t[1]/100),void 0!==t[2]&&(i.g=t[2]/100),void 0!==t[3]&&(i.b=t[3]/100)}return void 0!==t[4]?i.alpha=Math.max(0,Math.min(1,t[4]/100)):void 0!==t[5]&&(i.alpha=Math.max(0,Math.min(1,+t[5]))),i},e=>o(l[e.toLowerCase()],6),e=>"transparent"===e?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,"srgb"],serialize:"srgb",interpolate:{r:H,g:H,b:H,alpha:{use:H,fixup:j}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},K=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),J=e=>{let t=K(e.r),i=K(e.g),a=K(e.b),r={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*i+.1882286462349947*a,y:.297344975250536*t+.6273635662554661*i+.0752914584939979*a,z:.0270313613864123*t+.0706888525358272*i+.9913375368376386*a};return void 0!==e.alpha&&(r.alpha=e.alpha),r},V=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Y=({x:e,y:t,z:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r={mode:"a98",r:V(2.0415879038107465*e-.5650069742788597*t-.3447313507783297*i),g:V(-.9692436362808798*e+1.8759675015077206*t+.0415550574071756*i),b:V(.0134442806320312*e-.1183623922310184*t+1.0151749943912058*i)};return void 0!==a&&(r.alpha=a),r},$=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},W=({r:e,g:t,b:i,alpha:a})=>{let r={mode:"lrgb",r:$(e),g:$(t),b:$(i)};return void 0!==a&&(r.alpha=a),r},X=e=>{let{r:t,g:i,b:a,alpha:r}=W(e),s={mode:"xyz65",x:.4123907992659593*t+.357584339383878*i+.1804807884018343*a,y:.2126390058715102*t+.715168678767756*i+.0721923153607337*a,z:.0193308187155918*t+.119194779794626*i+.9505321522496607*a};return void 0!==r&&(s.alpha=r),s},Z=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):12.92*e},ee=({r:e,g:t,b:i,alpha:a},r="rgb")=>{let s={mode:r,r:Z(e),g:Z(t),b:Z(i)};return void 0!==a&&(s.alpha=a),s},et=({x:e,y:t,z:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=ee({r:3.2409699419045226*e-1.537383177570094*t-.4986107602930034*i,g:-.9692436362808796*e+1.8759675015077204*t+.0415550574071756*i,b:.0556300796969936*e-.2039769588889765*t+1.0569715142428784*i});return void 0!==a&&(r.alpha=a),r},ei={...z,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Y(X(e)),xyz65:Y},toMode:{rgb:e=>et(J(e)),xyz65:J}},ea=e=>(e%=360)<0?e+360:e,er=e=>{let t;return t=e=>180>=Math.abs(e)?e:e-360*Math.sign(e),e.map((i,a,r)=>{if(void 0===i)return i;let s=ea(i);return 0===a||void 0===e[a-1]?s:t(s-ea(r[a-1]))}).reduce((e,t)=>(e.length&&void 0!==t&&void 0!==e[e.length-1]?e.push(t+e[e.length-1]):e.push(t),e),[])},es=[-.14861,1.78277,-.29227,-.90649,1.97294,0],en=Math.PI/180,eo=180/Math.PI,el=es["3"]*es["4"],eA=es["1"]*es["4"],eh=es["1"]*es["2"]-es["0"]*es["3"],ec=(e,t)=>{if(void 0===e.h||void 0===t.h||!e.s||!t.s)return 0;let i=ea(e.h),a=Math.sin((ea(t.h)-i+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*a},ed=(e,t)=>{if(void 0===e.h||void 0===t.h||!e.c||!t.c)return 0;let i=ea(e.h),a=Math.sin((ea(t.h)-i+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*a},eu=e=>{let t=e.reduce((e,t)=>{if(void 0!==t){let i=t*Math.PI/180;e.sin+=Math.sin(i),e.cos+=Math.cos(i)}return e},{sin:0,cos:0}),i=180*Math.atan2(t.sin,t.cos)/Math.PI;return i<0?360+i:i},eg={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:({r:e,g:t,b:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=(eh*i+e*el-t*eA)/(eh+el-eA),s=i-r,n=(es["4"]*(t-r)-es["2"]*s)/es["3"],o={mode:"cubehelix",l:r,s:0===r||1===r?void 0:Math.sqrt(s*s+n*n)/(es["4"]*r*(1-r))};return o.s&&(o.h=Math.atan2(n,s)*eo-120),void 0!==a&&(o.alpha=a),o}},toMode:{rgb:({h:e,s:t,l:i,alpha:a})=>{let r={mode:"rgb"};void 0===i&&(i=0);let s=void 0===t?0:t*i*(1-i),n=Math.cos(e=(void 0===e?0:e+120)*en),o=Math.sin(e);return r.r=i+s*(es["0"]*n+es["1"]*o),r.g=i+s*(es["2"]*n+es["3"]*o),r.b=i+s*(es["4"]*n+es["5"]*o),void 0!==a&&(r.alpha=a),r}},interpolate:{h:{use:H,fixup:er},s:H,l:H,alpha:{use:H,fixup:j}},difference:{h:ec},average:{h:eu}},ep=({l:e,a:t,b:i,alpha:a},r="lch")=>{void 0===t&&(t=0),void 0===i&&(i=0);let s=Math.sqrt(t*t+i*i),n={mode:r,l:e,c:s};return s&&(n.h=ea(180*Math.atan2(i,t)/Math.PI)),void 0!==a&&(n.alpha=a),n},em=({l:e,c:t,h:i,alpha:a},r="lab")=>{void 0===i&&(i=0);let s={mode:r,l:e,a:t?t*Math.cos(i/180*Math.PI):0,b:t?t*Math.sin(i/180*Math.PI):0};return void 0!==a&&(s.alpha=a),s},ef={X:.3457/.3585,Y:1,Z:.8251046025104602},eb={X:.3127/.329,Y:1,Z:1.0890577507598784},eI=e=>Math.pow(e,3)>.008856451679035631?Math.pow(e,3):(116*e-16)/903.2962962962963,eC=({l:e,a:t,b:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=(e+16)/116,s=t/500+r,n=r-i/200,o={mode:"xyz65",x:eI(s)*eb.X,y:eI(r)*eb.Y,z:eI(n)*eb.Z};return void 0!==a&&(o.alpha=a),o},eE=e=>et(eC(e)),ey=e=>e>.008856451679035631?Math.cbrt(e):(903.2962962962963*e+16)/116,ew=({x:e,y:t,z:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=ey(e/eb.X),s=ey(t/eb.Y),n={mode:"lab65",l:116*s-16,a:500*(r-s),b:200*(s-ey(i/eb.Z))};return void 0!==a&&(n.alpha=a),n},eB=e=>{let t=ew(X(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ev=26/180*Math.PI,ex=Math.cos(ev),eQ=Math.sin(ev),eS=100/Math.log(1.39),eM=({l:e,c:t,h:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r={mode:"lab65",l:(Math.exp(e/eS)-1)/.0039},s=(Math.exp(.0435*t*1)-1)/.075,n=s*Math.cos(i/180*Math.PI-ev),o=s*Math.sin(i/180*Math.PI-ev);return r.a=n*ex-o/.83*eQ,r.b=n*eQ+o/.83*ex,void 0!==a&&(r.alpha=a),r},eR=({l:e,a:t,b:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=t*ex+i*eQ,s=.83*(i*ex-t*eQ),n={mode:"dlch",l:eS/1*Math.log(1+.0039*e),c:Math.log(1+.075*Math.sqrt(r*r+s*s))/.0435};return n.c&&(n.h=ea((Math.atan2(s,r)+ev)/Math.PI*180)),void 0!==a&&(n.alpha=a),n},eD=e=>eM(ep(e,"dlch")),eT=e=>em(eR(e),"dlab"),ek=RegExp(`^hsla?\\(\\s*${g}${p}${c}${p}${c}\\s*(?:,\\s*${d}\\s*)?\\)$`),eF={mode:"hsl",toMode:{rgb:function({h:e,s:t,l:i,alpha:a}){let r;e=ea(void 0!==e?e:0),void 0===t&&(t=0),void 0===i&&(i=0);let s=i+t*(i<.5?i:1-i),n=s-(s-i)*2*Math.abs(e/60%2-1);switch(Math.floor(e/60)){case 0:r={r:s,g:n,b:2*i-s};break;case 1:r={r:n,g:s,b:2*i-s};break;case 2:r={r:2*i-s,g:s,b:n};break;case 3:r={r:2*i-s,g:n,b:s};break;case 4:r={r:n,g:2*i-s,b:s};break;case 5:r={r:s,g:2*i-s,b:n};break;default:r={r:2*i-s,g:2*i-s,b:2*i-s}}return r.mode="rgb",void 0!==a&&(r.alpha=a),r}},fromMode:{rgb:function({r:e,g:t,b:i,alpha:a}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=Math.max(e,t,i),s=Math.min(e,t,i),n={mode:"hsl",s:r===s?0:(r-s)/(1-Math.abs(r+s-1)),l:.5*(r+s)};return r-s!=0&&(n.h=(r===e?(t-i)/(r-s)+(t<i)*6:r===t?(i-e)/(r-s)+2:(e-t)/(r-s)+4)*60),void 0!==a&&(n.alpha=a),n}},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[function(e,t){if(!t||"hsl"!==t[0]&&"hsla"!==t[0])return;let i={mode:"hsl"},[,a,r,s,n]=t;if(a.type!==T){if(a.type===D)return;i.h=a.value}if(r.type!==T){if("hue"===r.type)return;i.s=r.value/100}if(s.type!==T){if("hue"===s.type)return;i.l=s.value/100}return n.type!==T&&(i.alpha=Math.min(1,Math.max(0,n.type===R?n.value:n.value/100))),i},e=>{let t=e.match(ek);if(!t)return;let i={mode:"hsl"};return void 0!==t[3]?i.h=+t[3]:void 0!==t[1]&&void 0!==t[2]&&(i.h=((e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return 360*e}})(t[1],t[2])),void 0!==t[4]&&(i.s=Math.min(Math.max(0,t[4]/100),1)),void 0!==t[5]&&(i.l=Math.min(Math.max(0,t[5]/100),1)),void 0!==t[6]?i.alpha=Math.max(0,Math.min(1,t[6]/100)):void 0!==t[7]&&(i.alpha=Math.max(0,Math.min(1,+t[7]))),i}],serialize:e=>`hsl(${void 0!==e.h?e.h:"none"} ${void 0!==e.s?100*e.s+"%":"none"} ${void 0!==e.l?100*e.l+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:H,fixup:er},s:H,l:H,alpha:{use:H,fixup:j}},difference:{h:ec},average:{h:eu}};function eL({h:e,s:t,v:i,alpha:a}){let r;e=ea(void 0!==e?e:0),void 0===t&&(t=0),void 0===i&&(i=0);let s=Math.abs(e/60%2-1);switch(Math.floor(e/60)){case 0:r={r:i,g:i*(1-t*s),b:i*(1-t)};break;case 1:r={r:i*(1-t*s),g:i,b:i*(1-t)};break;case 2:r={r:i*(1-t),g:i,b:i*(1-t*s)};break;case 3:r={r:i*(1-t),g:i*(1-t*s),b:i};break;case 4:r={r:i*(1-t*s),g:i*(1-t),b:i};break;case 5:r={r:i,g:i*(1-t),b:i*(1-t*s)};break;default:r={r:i*(1-t),g:i*(1-t),b:i*(1-t)}}return r.mode="rgb",void 0!==a&&(r.alpha=a),r}function eP({r:e,g:t,b:i,alpha:a}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=Math.max(e,t,i),s=Math.min(e,t,i),n={mode:"hsv",s:0===r?0:1-s/r,v:r};return r-s!=0&&(n.h=(r===e?(t-i)/(r-s)+(t<i)*6:r===t?(i-e)/(r-s)+2:(e-t)/(r-s)+4)*60),void 0!==a&&(n.alpha=a),n}let e_={mode:"hsv",toMode:{rgb:eL},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:eP},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:H,fixup:er},s:H,v:H,alpha:{use:H,fixup:j}},difference:{h:ec},average:{h:eu}};function eU(e){if(e<0)return 0;let t=Math.pow(e,.012683313515655966);return 1e4*Math.pow(Math.max(0,t-.8359375)/(18.8515625-18.6875*t),6.277394636015326)}function eG(e){if(e<0)return 0;let t=Math.pow(e/1e4,.1593017578125);return Math.pow((.8359375+18.8515625*t)/(1+18.6875*t),78.84375)}let eN=e=>Math.max(e/203,0),eO=({i:e,t,p:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=eU(e+.008609037037932761*t+.11102962500302593*i),s=eU(e-.00860903703793275*t-.11102962500302599*i),n=eU(e+.5600313357106791*t-.32062717498731885*i),o={mode:"xyz65",x:eN(2.070152218389422*r-1.3263473389671556*s+.2066510476294051*n),y:eN(.3647385209748074*r+.680566024947227*s-.0453045459220346*n),z:eN(-.049747207535812*r-.0492609666966138*s+1.1880659249923042*n)};return void 0!==a&&(o.alpha=a),o},eq=(e=0)=>Math.max(203*e,0),eH=({x:e,y:t,z:i,alpha:a})=>{let r=eq(e),s=eq(t),n=eq(i),o=eG(.3592832590121217*r+.6976051147779502*s-.0358915932320289*n),l=eG(-.1920808463704995*r+1.1004767970374323*s+.0753748658519118*n),A=eG(.0070797844607477*r+.0748396662186366*s+.8433265453898765*n),h={mode:"itp",i:.5*o+.5*l,t:1.61376953125*o-3.323486328125*l+1.709716796875*A,p:4.378173828125*o-4.24560546875*l-.132568359375*A};return void 0!==a&&(h.alpha=a),h},ej=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,.1593017578125);return Math.pow((.8359375+18.8515625*t)/(1+18.6875*t),134.03437499999998)},ez=(e=0)=>Math.max(203*e,0),eK=({x:e,y:t,z:i,alpha:a})=>{e=ez(e),t=ez(t);let r=1.15*e-.15*(i=ez(i)),s=.66*t+.34*e,n=ej(.41478972*r+.579999*s+.014648*i),o=ej(-.20151*r+1.120649*s+.0531008*i),l=ej(-.0166008*r+.2648*s+.6684799*i),A=(n+o)/2,h={mode:"jab",j:.44*A/(1-.56*A)-16295499532821565e-27,a:3.524*n-4.066708*o+.542708*l,b:.199076*n+1.096799*o-1.295875*l};return void 0!==a&&(h.alpha=a),h},eJ=e=>{if(e<0)return 0;let t=Math.pow(e,.007460772656268216);return 1e4*Math.pow((.8359375-t)/(18.6875*t-18.8515625),6.277394636015326)},eV=({j:e,a:t,b:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=(e+16295499532821565e-27)/(.44+.56*(e+16295499532821565e-27)),s=eJ(r+.13860504*t+.058047316*i),n=eJ(r-.13860504*t-.058047316*i),o=eJ(r-.096019242*t-.8118919*i),l={mode:"xyz65",x:(1.661373024652174*s-.914523081304348*n+.23136208173913045*o)/203,y:(-.3250758611844533*s+1.571847026732543*n-.21825383453227928*o)/203,z:(-.090982811*s-.31272829*n+1.5227666*o)/203};return void 0!==a&&(l.alpha=a),l},eY=e=>{let t=eK(X(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},e$=e=>et(eV(e)),eW=({j:e,a:t,b:i,alpha:a})=>{void 0===t&&(t=0),void 0===i&&(i=0);let r=Math.sqrt(t*t+i*i),s={mode:"jch",j:e,c:r};return r&&(s.h=ea(180*Math.atan2(i,t)/Math.PI)),void 0!==a&&(s.alpha=a),s},eX=({j:e,c:t,h:i,alpha:a})=>{void 0===i&&(i=0);let r={mode:"jab",j:e,a:t?t*Math.cos(i/180*Math.PI):0,b:t?t*Math.sin(i/180*Math.PI):0};return void 0!==a&&(r.alpha=a),r},eZ=e=>Math.pow(e,3)>.008856451679035631?Math.pow(e,3):(116*e-16)/903.2962962962963,e0=({l:e,a:t,b:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=(e+16)/116,s=t/500+r,n=r-i/200,o={mode:"xyz50",x:eZ(s)*ef.X,y:eZ(r)*ef.Y,z:eZ(n)*ef.Z};return void 0!==a&&(o.alpha=a),o},e1=({x:e,y:t,z:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=ee({r:3.1341359569958707*e-1.6173863321612538*t-.4906619460083532*i,g:-.978795502912089*e+1.916254567259524*t+.03344273116131949*i,b:.07195537988411677*e-.2289768264158322*t+1.405386058324125*i});return void 0!==a&&(r.alpha=a),r},e2=e=>e1(e0(e)),e8=e=>{let{r:t,g:i,b:a,alpha:r}=W(e),s={mode:"xyz50",x:.436065742824811*t+.3851514688337912*i+.14307845442264197*a,y:.22249319175623702*t+.7168870538238823*i+.06061979053616537*a,z:.013923904500943465*t+.09708128566574634*i+.7140993584005155*a};return void 0!==r&&(s.alpha=r),s},e9=e=>e>.008856451679035631?Math.cbrt(e):(903.2962962962963*e+16)/116,e3=({x:e,y:t,z:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=e9(e/ef.X),s=e9(t/ef.Y),n={mode:"lab",l:116*s-16,a:500*(r-s),b:200*(s-e9(i/ef.Z))};return void 0!==a&&(n.alpha=a),n},e5=e=>{let t=e3(e8(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},e4={mode:"lab",toMode:{xyz50:e0,rgb:e2},fromMode:{xyz50:e3,rgb:e5},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[function(e,t){if(!t||"lab"!==t[0])return;let i={mode:"lab"},[,a,r,s,n]=t;if("hue"!==a.type&&"hue"!==r.type&&"hue"!==s.type)return a.type!==T&&(i.l=Math.min(Math.max(0,a.value),100)),r.type!==T&&(i.a=r.type===R?r.value:125*r.value/100),s.type!==T&&(i.b=s.type===R?s.value:125*s.value/100),n.type!==T&&(i.alpha=Math.min(1,Math.max(0,n.type===R?n.value:n.value/100))),i}],serialize:e=>`lab(${void 0!==e.l?e.l:"none"} ${void 0!==e.a?e.a:"none"} ${void 0!==e.b?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:H,a:H,b:H,alpha:{use:H,fixup:j}}},e6={...e4,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:eC,rgb:eE},fromMode:{xyz65:ew,rgb:eB},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},e7={mode:"lch",toMode:{lab:em,rgb:e=>e2(em(e))},fromMode:{rgb:e=>ep(e5(e)),lab:ep},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[function(e,t){if(!t||"lch"!==t[0])return;let i={mode:"lch"},[,a,r,s,n]=t;if(a.type!==T){if("hue"===a.type)return;i.l=Math.min(Math.max(0,a.value),100)}if(r.type!==T&&(i.c=Math.max(0,r.type===R?r.value:150*r.value/100)),s.type!==T){if(s.type===D)return;i.h=s.value}return n.type!==T&&(i.alpha=Math.min(1,Math.max(0,n.type===R?n.value:n.value/100))),i}],serialize:e=>`lch(${void 0!==e.l?e.l:"none"} ${void 0!==e.c?e.c:"none"} ${void 0!==e.h?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:H,fixup:er},c:H,l:H,alpha:{use:H,fixup:j}},difference:{h:ed},average:{h:eu}},te={...e7,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>em(e,"lab65"),rgb:e=>eE(em(e,"lab65"))},fromMode:{rgb:e=>ep(eB(e),"lch65"),lab65:e=>ep(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},tt=({l:e,u:t,v:i,alpha:a})=>{void 0===t&&(t=0),void 0===i&&(i=0);let r=Math.sqrt(t*t+i*i),s={mode:"lchuv",l:e,c:r};return r&&(s.h=ea(180*Math.atan2(i,t)/Math.PI)),void 0!==a&&(s.alpha=a),s},ti=({l:e,c:t,h:i,alpha:a})=>{void 0===i&&(i=0);let r={mode:"luv",l:e,u:t?t*Math.cos(i/180*Math.PI):0,v:t?t*Math.sin(i/180*Math.PI):0};return void 0!==a&&(r.alpha=a),r},ta=(e,t,i)=>4*e/(e+15*t+3*i),tr=(e,t,i)=>9*t/(e+15*t+3*i),ts=ta(ef.X,ef.Y,ef.Z),tn=tr(ef.X,ef.Y,ef.Z),to=({x:e,y:t,z:i,alpha:a})=>{let r;void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let s=(r=t/ef.Y)<=.008856451679035631?903.2962962962963*r:116*Math.cbrt(r)-16,n=ta(e,t,i),o=tr(e,t,i);isFinite(n)&&isFinite(o)?(n=13*s*(n-ts),o=13*s*(o-tn)):s=n=o=0;let l={mode:"luv",l:s,u:n,v:o};return void 0!==a&&(l.alpha=a),l},tl=(r=ef.X,4*r/(r+15*ef.Y+3*ef.Z)),tA=(s=ef.X,9*(n=ef.Y)/(s+15*n+3*ef.Z)),th=({l:e,u:t,v:i,alpha:a})=>{if(void 0===e&&(e=0),0===e)return{mode:"xyz50",x:0,y:0,z:0};void 0===t&&(t=0),void 0===i&&(i=0);let r=t/(13*e)+tl,s=i/(13*e)+tA,n=ef.Y*(e<=8?e/903.2962962962963:Math.pow((e+16)/116,3)),o={mode:"xyz50",x:9*r*n/(4*s),y:n,z:n*(12-3*r-20*s)/(4*s)};return void 0!==a&&(o.alpha=a),o},tc={...z,mode:"lrgb",toMode:{rgb:ee},fromMode:{rgb:W},parse:["srgb-linear"],serialize:"srgb-linear"},td=({r:e,g:t,b:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*i),s=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*i),n=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*i),o={mode:"oklab",l:.210454268309314*r+.7936177747023054*s-.0040720430116193*n,a:1.9779985324311684*r-2.42859224204858*s+.450593709617411*n,b:.0259040424655478*r+.7827717124575296*s-.8086757549230774*n};return void 0!==a&&(o.alpha=a),o},tu=e=>{let t=td(W(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},tg=({l:e,a:t,b:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=Math.pow(e+.3963377773761749*t+.2158037573099136*i,3),s=Math.pow(e-.1055613458156586*t-.0638541728258133*i,3),n=Math.pow(e-.0894841775298119*t-1.2914855480194092*i,3),o={mode:"lrgb",r:4.076741636075957*r-3.3077115392580616*s+.2309699031821044*n,g:-1.2684379732850317*r+2.6097573492876887*s-.3413193760026573*n,b:-.0041960761386756*r-.7034186179359362*s+1.7076146940746117*n};return void 0!==a&&(o.alpha=a),o},tp=e=>ee(tg(e));function tm(e){return .5*(1.206/1.03*e-.206+Math.sqrt((1.206/1.03*e-.206)*(1.206/1.03*e-.206)+1.206/1.03*.12*e))}function tf(e){return(e*e+.206*e)/(1.206/1.03*(e+.03))}function tb(e,t){let i,a,r,s,n,o,l,A,h,c,d,u,g,p,m,f,b,I=(-1.88170328*e-.80936493*t>1?(i=1.19086277,a=1.76576728,r=.59662641,s=.75515197,n=.56771245,o=4.0767416621,l=-3.3077115913,A=.2309699292):1.81444104*e-1.19445276*t>1?(i=.73956515,a=-.45954404,r=.08285427,s=.1254107,n=.14503204,o=-1.2684380046,l=2.6097574011,A=-.3413193965):(i=1.35733652,a=-.00915799,r=-1.1513021,s=-.50559606,n=.00692167,o=-.0041960863,l=-.7034186147,A=1.707614701),h=i+a*e+r*t+s*e*e+n*e*t,c=.3963377774*e+.2158037573*t,d=-.1055613458*e-.0638541728*t,u=-.0894841775*e-1.291485548*t,f=o*((g=1+h*c)*g*g)+l*((p=1+h*d)*p*p)+A*((m=1+h*u)*m*m),h-=f*(b=3*c*g*g*o+3*d*p*p*l+3*u*m*m*A)/(b*b-.5*f*(6*c*c*g*o+6*d*d*p*l+6*u*u*m*A))),C=tg({l:1,a:I*e,b:I*t}),E=Math.cbrt(1/Math.max(C.r,C.g,C.b));return[E,E*I]}function tI(e,t,i=null){i||(i=tb(e,t));let a=i[0],r=i[1];return[r/a,r/(1-a)]}function tC(e,t,i){let a=tb(t,i),r=function(e,t,i,a,r,s=null){let n;if(s||(s=tb(e,t)),(i-r)*s[1]-(s[0]-r)*1<=0)n=s[1]*r/(+s[0]+s[1]*(r-i));else{n=s[1]*(r-1)/(+(s[0]-1)+s[1]*(r-i));{let a=i-r,s=.3963377774*e+.2158037573*t,o=-.1055613458*e-.0638541728*t,l=-.0894841775*e-1.291485548*t,A=a+ +s,h=a+ +o,c=a+ +l;{let e=r*(1-n)+n*i,t=+n,a=e+t*s,d=e+t*o,u=e+t*l,g=a*a*a,p=d*d*d,m=u*u*u,f=3*A*a*a,b=3*h*d*d,I=3*c*u*u,C=6*A*A*a,E=6*h*h*d,y=6*c*c*u,w=4.0767416621*g-3.3077115913*p+.2309699292*m-1,B=4.0767416621*f-3.3077115913*b+.2309699292*I,v=B/(B*B-.5*w*(4.0767416621*C-3.3077115913*E+.2309699292*y)),x=-w*v,Q=-1.2684380046*g+2.6097574011*p-.3413193965*m-1,S=-1.2684380046*f+2.6097574011*b-.3413193965*I,M=S/(S*S-.5*Q*(-1.2684380046*C+2.6097574011*E-.3413193965*y)),R=-Q*M,D=-.0041960863*g-.7034186147*p+1.707614701*m-1,T=-.0041960863*f-.7034186147*b+1.707614701*I,k=T/(T*T-.5*D*(-.0041960863*C-.7034186147*E+1.707614701*y)),F=-D*k;n+=Math.min(x=v>=0?x:1e6,Math.min(R=M>=0?R:1e6,F=k>=0?F:1e6))}}}return n}(t,i,e,0,e,a),s=tI(t,i,a),n=.11516993+1/(7.4477897+4.1590124*i+t*(-2.19557347+1.75198401*i+t*(-2.13704948-10.02301043*i+t*(-4.24894561+5.38770819*i+4.69891013*t)))),o=.11239642+1/(1.6132032-.68124379*i+t*(.40370612+.90148123*i+t*(-.27087943+.6122399*i+t*(.00299215-.45399568*i-.14661872*t)))),l=r/Math.min(e*s[0],(1-e)*s[1]),A=e*n,h=(1-e)*o,c=.9*l*Math.sqrt(Math.sqrt(1/(1/(A*A*A*A)+1/(h*h*h*h))));return[Math.sqrt(1/(1/((A=.4*e)*A)+1/((h=(1-e)*.8)*h))),c,r]}function tE(e){let t,i=void 0!==e.l?e.l:0,a=void 0!==e.a?e.a:0,r=void 0!==e.b?e.b:0,s={mode:"okhsl",l:tm(i)};void 0!==e.alpha&&(s.alpha=e.alpha);let n=Math.sqrt(a*a+r*r);if(!n)return s.s=0,s;let[o,l,A]=tC(i,a/n,r/n);if(n<l){let e=.8*o;t=(n-0)/(e+(1-e/l)*(n-0))*.8}else{let e=.2*l*l*1.5625/o;t=.8+.2*((n-l)/(e+(1-e/(A-l))*(n-l)))}return t&&(s.s=t,s.h=ea(180*Math.atan2(r,a)/Math.PI)),s}function ty(e){let t,i,a,r,s=void 0!==e.h?e.h:0,n=void 0!==e.s?e.s:0,o=void 0!==e.l?e.l:0,l={mode:"oklab",l:tf(o)};if(void 0!==e.alpha&&(l.alpha=e.alpha),!n||1===o)return l.a=l.b=0,l;let A=Math.cos(s/180*Math.PI),h=Math.sin(s/180*Math.PI),[c,d,u]=tC(l.l,A,h);n<.8?(t=1.25*n,i=0,r=1-(a=.8*c)/d):(t=5*(n-.8),i=d,r=1-(a=.2*d*d*1.5625/c)/(u-d));let g=i+t*a/(1-r*t);return l.a=g*A,l.b=g*h,l}let tw={...eF,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:tE,rgb:e=>tE(tu(e))},toMode:{oklab:ty,rgb:e=>tp(ty(e))}};function tB(e){let t=void 0!==e.l?e.l:0,i=void 0!==e.a?e.a:0,a=void 0!==e.b?e.b:0,r=Math.sqrt(i*i+a*a),s=r?i/r:1,n=r?a/r:1,[o,l]=tI(s,n),A=l/(r+t*l),h=A*t,c=A*r,d=tf(h),u=c*d/h,g=tg({l:d,a:s*u,b:n*u}),p=Math.cbrt(1/Math.max(g.r,g.g,g.b,0));t/=p;let m={mode:"okhsv",s:(r=r/p*tm(t)/t)?(.5+l)*c/(.5*l+l*(1-.5/o)*c):0,v:(t=tm(t))?t/h:0};return m.s&&(m.h=ea(180*Math.atan2(a,i)/Math.PI)),void 0!==e.alpha&&(m.alpha=e.alpha),m}function tv(e){let t={mode:"oklab"};void 0!==e.alpha&&(t.alpha=e.alpha);let i=void 0!==e.h?e.h:0,a=void 0!==e.s?e.s:0,r=void 0!==e.v?e.v:0,s=Math.cos(i/180*Math.PI),n=Math.sin(i/180*Math.PI),[o,l]=tI(s,n),A=1-.5/o,h=1-.5*a/(.5+l-l*A*a),c=a*l*.5/(.5+l-l*A*a),d=tf(h),u=c*d/h,g=tg({l:d,a:s*u,b:n*u}),p=Math.cbrt(1/Math.max(g.r,g.g,g.b,0)),m=tf(r*h),f=c*m/h;return t.l=m*p,t.a=f*s*p,t.b=f*n*p,t}let tx={...e_,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:tB,rgb:e=>tB(tu(e))},toMode:{oklab:tv,rgb:e=>tp(tv(e))}},tQ={...e4,mode:"oklab",toMode:{lrgb:tg,rgb:tp},fromMode:{lrgb:td,rgb:tu},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[function(e,t){if(!t||"oklab"!==t[0])return;let i={mode:"oklab"},[,a,r,s,n]=t;if("hue"!==a.type&&"hue"!==r.type&&"hue"!==s.type)return a.type!==T&&(i.l=Math.min(Math.max(0,a.type===R?a.value:a.value/100),1)),r.type!==T&&(i.a=r.type===R?r.value:.4*r.value/100),s.type!==T&&(i.b=s.type===R?s.value:.4*s.value/100),n.type!==T&&(i.alpha=Math.min(1,Math.max(0,n.type===R?n.value:n.value/100))),i}],serialize:e=>`oklab(${void 0!==e.l?e.l:"none"} ${void 0!==e.a?e.a:"none"} ${void 0!==e.b?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},tS={...e7,mode:"oklch",toMode:{oklab:e=>em(e,"oklab"),rgb:e=>tp(em(e,"oklab"))},fromMode:{rgb:e=>ep(tu(e),"oklch"),oklab:e=>ep(e,"oklch")},parse:[function(e,t){if(!t||"oklch"!==t[0])return;let i={mode:"oklch"},[,a,r,s,n]=t;if(a.type!==T){if("hue"===a.type)return;i.l=Math.min(Math.max(0,a.type===R?a.value:a.value/100),1)}if(r.type!==T&&(i.c=Math.max(0,r.type===R?r.value:.4*r.value/100)),s.type!==T){if(s.type===D)return;i.h=s.value}return n.type!==T&&(i.alpha=Math.min(1,Math.max(0,n.type===R?n.value:n.value/100))),i}],serialize:e=>`oklch(${void 0!==e.l?e.l:"none"} ${void 0!==e.c?e.c:"none"} ${void 0!==e.h?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},tM=e=>{let{r:t,g:i,b:a,alpha:r}=W(e),s={mode:"xyz65",x:.486570948648216*t+.265667693169093*i+.1982172852343625*a,y:.2289745640697487*t+.6917385218365062*i+.079286914093745*a,z:0*t+.0451133818589026*i+1.043944368900976*a};return void 0!==r&&(s.alpha=r),s},tR=({x:e,y:t,z:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=ee({r:2.4934969119414263*e-.9313836179191242*t-.402710784450717*i,g:-.8294889695615749*e+1.7626640603183465*t+.0236246858419436*i,b:.0358458302437845*e-.0761723892680418*t+.9568845240076871*i},"p3");return void 0!==a&&(r.alpha=a),r},tD={...z,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>tR(X(e)),xyz65:tR},toMode:{rgb:e=>et(tM(e)),xyz65:tM}},tT=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},tk=({x:e,y:t,z:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r={mode:"prophoto",r:tT(1.3457868816471585*e-.2555720873797946*t-.0511018649755453*i),g:tT(-.5446307051249019*e+1.5082477428451466*t+.0205274474364214*i),b:tT(0*e+0*t+1.2119675456389452*i)};return void 0!==a&&(r.alpha=a),r},tF=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},tL=e=>{let t=tF(e.r),i=tF(e.g),a=tF(e.b),r={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*i+.0313477341283922*a,y:.2880748288194013*t+.7118352342418731*i+899369387256e-16*a,z:0*t+0*i+.8251046025104602*a};return void 0!==e.alpha&&(r.alpha=e.alpha),r},tP={...z,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:tk,rgb:e=>tk(e8(e))},toMode:{xyz50:tL,rgb:e=>e1(tL(e))}},t_=e=>{let t=Math.abs(e);return t>.018053968510807?(Math.sign(e)||1)*(1.09929682680944*Math.pow(t,.45)-(1.09929682680944-1)):4.5*e},tU=({x:e,y:t,z:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r={mode:"rec2020",r:t_(1.7166511879712683*e-.3556707837763925*t-.2533662813736599*i),g:t_(-.6666843518324893*e+1.6164812366349395*t+.0157685458139111*i),b:t_(.0176398574453108*e-.0427706132578085*t+.9421031212354739*i)};return void 0!==a&&(r.alpha=a),r},tG=(e=0)=>{let t=Math.abs(e);return t<.08124285829863151?e/4.5:(Math.sign(e)||1)*Math.pow((t+1.09929682680944-1)/1.09929682680944,1/.45)},tN=e=>{let t=tG(e.r),i=tG(e.g),a=tG(e.b),r={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*i+.1688809751641721*a,y:.262700212011267*t+.6779980715188708*i+.059301716469862*a,z:0*t+.0280726930490874*i+1.0609850577107909*a};return void 0!==e.alpha&&(r.alpha=e.alpha),r},tO={...z,mode:"rec2020",fromMode:{xyz65:tU,rgb:e=>tU(X(e))},toMode:{xyz65:tN,rgb:e=>et(tN(e))},parse:["rec2020"],serialize:"rec2020"},tq=Math.cbrt(.0037930732552754493),tH=e=>Math.cbrt(e)-tq,tj=e=>Math.pow(e+tq,3),tz={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:({x:e,y:t,b:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=tj(e+t)-.0037930732552754493,s=tj(t-e)-.0037930732552754493,n=tj(i+t)-.0037930732552754493,o=ee({r:11.031566904639861*r-9.866943908131562*s-.16462299650829934*n,g:-3.2541473810744237*r+4.418770377582723*s-.16462299650829934*n,b:-3.6588512867136815*r+2.7129230459360922*s+1.9459282407775895*n});return void 0!==a&&(o.alpha=a),o}},fromMode:{rgb:e=>{let{r:t,g:i,b:a,alpha:r}=W(e),s=tH(.3*t+.622*i+.078*a+.0037930732552754493),n=tH(.23*t+.692*i+.078*a+.0037930732552754493),o={mode:"xyb",x:(s-n)/2,y:(s+n)/2,b:tH(.2434226892454782*t+.2047674442449682*i+.5518098665095535*a+.0037930732552754493)-(s+n)/2};return void 0!==r&&(o.alpha=r),o}},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:H,y:H,b:H,alpha:{use:H,fixup:j}}},tK={mode:"yiq",toMode:{rgb:({y:e,i:t,q:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r={mode:"rgb",r:e+.95608445*t+.6208885*i,g:e-.27137664*t-.6486059*i,b:e-1.10561724*t+1.70250126*i};return void 0!==a&&(r.alpha=a),r}},fromMode:{rgb:({r:e,g:t,b:i,alpha:a})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*i,i:.59597799*e-.2741761*t-.32180189*i,q:.21147017*e-.52261711*t+.31114694*i};return void 0!==a&&(r.alpha=a),r}},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:H,i:H,q:H,alpha:{use:H,fixup:j}}};((e=4)=>t=>{let i;return"number"==typeof t?Math.round(t*(i=Math.pow(10,i=e)))/i:t})(2);let tJ=e=>Math.round(255*Math.max(0,Math.min(1,e||0))),tV=b("rgb");b("hsl");let tY=e=>(e=>{if(void 0!==e)return"#"+(0x1000000|tJ(e.r)<<16|tJ(e.g)<<8|tJ(e.b)).toString(16).slice(1)})(tV(e));B(ei),B(eg),B({mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:eD,rgb:e=>eE(eD(e))},fromMode:{lab65:eT,rgb:e=>eT(eB(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:H,a:H,b:H,alpha:{use:H,fixup:j}}}),B({mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:eM,dlab:e=>em(e,"dlab"),rgb:e=>eE(eM(e))},fromMode:{lab65:eR,dlab:e=>ep(e,"dlch"),rgb:e=>eR(eB(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:H,c:H,h:{use:H,fixup:er},alpha:{use:H,fixup:j}},difference:{h:ed},average:{h:eu}}),B({mode:"hsi",toMode:{rgb:function({h:e,s:t,i,alpha:a}){let r;e=ea(void 0!==e?e:0),void 0===t&&(t=0),void 0===i&&(i=0);let s=Math.abs(e/60%2-1);switch(Math.floor(e/60)){case 0:r={r:i*(1+t*(3/(2-s)-1)),g:i*(1+t*(3*(1-s)/(2-s)-1)),b:i*(1-t)};break;case 1:r={r:i*(1+t*(3*(1-s)/(2-s)-1)),g:i*(1+t*(3/(2-s)-1)),b:i*(1-t)};break;case 2:r={r:i*(1-t),g:i*(1+t*(3/(2-s)-1)),b:i*(1+t*(3*(1-s)/(2-s)-1))};break;case 3:r={r:i*(1-t),g:i*(1+t*(3*(1-s)/(2-s)-1)),b:i*(1+t*(3/(2-s)-1))};break;case 4:r={r:i*(1+t*(3*(1-s)/(2-s)-1)),g:i*(1-t),b:i*(1+t*(3/(2-s)-1))};break;case 5:r={r:i*(1+t*(3/(2-s)-1)),g:i*(1-t),b:i*(1+t*(3*(1-s)/(2-s)-1))};break;default:r={r:i*(1-t),g:i*(1-t),b:i*(1-t)}}return r.mode="rgb",void 0!==a&&(r.alpha=a),r}},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:function({r:e,g:t,b:i,alpha:a}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0);let r=Math.max(e,t,i),s=Math.min(e,t,i),n={mode:"hsi",s:e+t+i===0?0:1-3*s/(e+t+i),i:(e+t+i)/3};return r-s!=0&&(n.h=(r===e?(t-i)/(r-s)+(t<i)*6:r===t?(i-e)/(r-s)+2:(e-t)/(r-s)+4)*60),void 0!==a&&(n.alpha=a),n}},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:H,fixup:er},s:H,i:H,alpha:{use:H,fixup:j}},difference:{h:ec},average:{h:eu}}),B(eF),B(e_),B({mode:"hwb",toMode:{rgb:function({h:e,w:t,b:i,alpha:a}){if(void 0===t&&(t=0),void 0===i&&(i=0),t+i>1){let e=t+i;t/=e,i/=e}return eL({h:e,s:1===i?1:1-t/(1-i),v:1-i,alpha:a})}},fromMode:{rgb:function(e){let t=eP(e);if(void 0===t)return;let i=void 0!==t.s?t.s:0,a=void 0!==t.v?t.v:0,r={mode:"hwb",w:(1-i)*a,b:1-a};return void 0!==t.h&&(r.h=t.h),void 0!==t.alpha&&(r.alpha=t.alpha),r}},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[function(e,t){if(!t||"hwb"!==t[0])return;let i={mode:"hwb"},[,a,r,s,n]=t;if(a.type!==T){if(a.type===D)return;i.h=a.value}if(r.type!==T){if("hue"===r.type)return;i.w=r.value/100}if(s.type!==T){if("hue"===s.type)return;i.b=s.value/100}return n.type!==T&&(i.alpha=Math.min(1,Math.max(0,n.type===R?n.value:n.value/100))),i}],serialize:e=>`hwb(${void 0!==e.h?e.h:"none"} ${void 0!==e.w?100*e.w+"%":"none"} ${void 0!==e.b?100*e.b+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:H,fixup:er},w:H,b:H,alpha:{use:H,fixup:j}},difference:{h:(e,t)=>{if(void 0===e.h||void 0===t.h)return 0;let i=ea(e.h),a=ea(t.h);return Math.abs(a-i)>180?i-(a-360*Math.sign(a-i)):a-i}},average:{h:eu}}),B({mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:eO,rgb:e=>et(eO(e))},fromMode:{xyz65:eH,rgb:e=>eH(X(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:H,t:H,p:H,alpha:{use:H,fixup:j}}}),B({mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:eY,xyz65:eK},toMode:{rgb:e$,xyz65:eV},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:H,a:H,b:H,alpha:{use:H,fixup:j}}}),B({mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:eX,rgb:e=>e$(eX(e))},fromMode:{rgb:e=>eW(eY(e)),jab:eW},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:H,fixup:er},c:H,j:H,alpha:{use:H,fixup:j}},difference:{h:ed},average:{h:eu}}),B(e4),B(e6),B(e7),B(te),B({mode:"lchuv",toMode:{luv:ti,rgb:e=>e1(th(ti(e)))},fromMode:{rgb:e=>tt(to(e8(e))),luv:tt},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:H,fixup:er},c:H,l:H,alpha:{use:H,fixup:j}},difference:{h:ed},average:{h:eu}}),B(tc),B({mode:"luv",toMode:{xyz50:th,rgb:e=>e1(th(e))},fromMode:{xyz50:to,rgb:e=>to(e8(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:H,u:H,v:H,alpha:{use:H,fixup:j}}}),B(tw),B(tx),B(tQ);let t$=B(tS);B(tD),B(tP),B(tO),B(z),B(tz),B({mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:e1,lab:e3},fromMode:{rgb:e8,lab:e0},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:H,y:H,z:H,alpha:{use:H,fixup:j}}}),B({mode:"xyz65",toMode:{rgb:et,xyz50:e=>{let{x:t,y:i,z:a,alpha:r}=e;void 0===t&&(t=0),void 0===i&&(i=0),void 0===a&&(a=0);let s={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*i-.0501922295431356*a,y:.0296278156881593*t+.990434484573249*i-.0170738250293851*a,z:-.0092430581525912*t+.0150551448965779*i+.7518742899580008*a};return void 0!==r&&(s.alpha=r),s}},fromMode:{rgb:X,xyz50:e=>{let{x:t,y:i,z:a,alpha:r}=e;void 0===t&&(t=0),void 0===i&&(i=0),void 0===a&&(a=0);let s={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*i+.0632593086610217*a,y:-.0283697069632081*t+1.0099954580058226*i+.021041398966943*a,z:.0123140016883199*t-.0205076964334779*i+1.3303659366080753*a};return void 0!==r&&(s.alpha=r),s}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:H,y:H,z:H,alpha:{use:H,fixup:j}}}),B(tK)}}]);
|