@bimdata/viewer 2.15.0-beta.6 → 2.15.0-beta.7
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.
|
@@ -1375,7 +1375,7 @@ Fragment shader:
|
|
|
1375
1375
|
} catch (error) {
|
|
1376
1376
|
console.error(error);
|
|
1377
1377
|
throw error;
|
|
1378
|
-
}`}function zJ(i,e=!0,t){const o=t||new Set;if(i){if(qJ(i))o.add(i);else if(qJ(i.buffer))o.add(i.buffer);else if(!ArrayBuffer.isView(i)&&e&&typeof i=="object")for(const n in i)zJ(i[n],e,o)}return t===void 0?Array.from(o):[]}function qJ(i){return i?i instanceof ArrayBuffer||typeof MessagePort<"u"&&i instanceof MessagePort||typeof ImageBitmap<"u"&&i instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas:!1}const fE=()=>{};class AE{name;source;url;terminated=!1;worker;onMessage;onError;_loadableURL="";static isSupported(){return typeof Worker<"u"&&ba||typeof hE<"u"&&!ba}constructor(e){const{name:t,source:o,url:n}=e;ql(o||n),this.name=t,this.source=o,this.url=n,this.onMessage=fE,this.onError=r=>console.log(r),this.worker=ba?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=fE,this.onError=fE,this.worker.terminate(),this.terminated=!0}get isRunning(){return!!this.onMessage}postMessage(e,t){t=t||zJ(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+=`worker ${this.name} from ${this.url}. `,e.message&&(t+=`${e.message} in `),e.lineno&&(t+=`:${e.lineno}:${e.colno}`),new Error(t)}_createBrowserWorker(){this._loadableURL=Lxt({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=t=>{t.data?this.onMessage(t.data):this.onError(new Error("No data received"))},e.onerror=t=>{this.onError(this._getErrorFromErrorEvent(t)),this.terminated=!0},e.onmessageerror=t=>console.error(t),e}_createNodeWorker(){let e;if(this.url){const t=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;e=new hE(t,{eval:!1})}else if(this.source)e=new hE(this.source,{eval:!0});else throw new Error("no worker");return e.on("message",t=>{this.onMessage(t)}),e.on("error",t=>{this.onError(t)}),e.on("exit",t=>{}),e}}class Fxt{name="unnamed";source;url;maxConcurrency=1;maxMobileConcurrency=1;onDebug=()=>{};reuseWorkers=!0;props={};jobQueue=[];idleQueue=[];count=0;isDestroyed=!1;static isSupported(){return AE.isSupported()}constructor(e){this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},e.name!==void 0&&(this.name=e.name),e.maxConcurrency!==void 0&&(this.maxConcurrency=e.maxConcurrency),e.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=e.maxMobileConcurrency),e.reuseWorkers!==void 0&&(this.reuseWorkers=e.reuseWorkers),e.onDebug!==void 0&&(this.onDebug=e.onDebug)}async startJob(e,t=(n,r,a)=>n.done(a),o=(n,r)=>n.error(r)){const n=new Promise(r=>(this.jobQueue.push({name:e,onMessage:t,onError:o,onStart:r}),this));return this._startQueuedJob(),await n}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const o=new Rxt(t.name,e);e.onMessage=n=>t.onMessage(o,n.type,n.payload),e.onError=n=>t.onError(o,n),t.onStart(o);try{await o.result}catch(n){console.error(`Worker exception: ${n}`)}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){!ba||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new AE({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return Txt?this.maxMobileConcurrency:this.maxConcurrency}}const Oxt={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}};class Dd{props;workerPools=new Map;static _workerFarm;static isSupported(){return AE.isSupported()}static getWorkerFarm(e={}){return Dd._workerFarm=Dd._workerFarm||new Dd({}),Dd._workerFarm.setProps(e),Dd._workerFarm}constructor(e){this.props={...Oxt},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const t of this.workerPools.values())t.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:o,url:n}=e;let r=this.workerPools.get(t);return r||(r=new Fxt({name:t,source:o,url:n}),r.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,r)),r}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}function Uxt(i,e={}){const t=e[i.id]||{},o=ba?`${i.id}-worker.js`:`${i.id}-worker-node.js`;let n=t.workerUrl;if(!n&&i.id==="compression"&&(n=e.workerUrl),e._workerType==="test"&&(ba?n=`modules/${i.module}/dist/${o}`:n=`modules/${i.module}/src/workers/${i.id}-worker-node.ts`),!n){let r=i.version;r==="latest"&&(r=Ixt);const a=r?`@${r}`:"";n=`https://unpkg.com/@loaders.gl/${i.module}${a}/dist/${o}`}return ql(n),n}function Nxt(i,e=jJ){ql(i,"no worker provided");const t=i.version;return!(!e||!t)}const gE={};async function Iu(i,e=null,t={},o=null){return e&&(i=jxt(i,e,t,o)),gE[i]=gE[i]||Vxt(i),await gE[i]}function jxt(i,e,t={},o=null){if(!t.useLocalLibraries&&i.startsWith("http"))return i;o=o||i;const n=t.modules||{};return n[o]?n[o]:ba?t.CDN?(ql(t.CDN.startsWith("http")),`${t.CDN}/${e}@${jJ}/dist/libs/${o}`):uE?`../src/libs/${o}`:`modules/${e}/src/libs/${o}`:`modules/${e}/dist/libs/${o}`}async function Vxt(i){if(i.endsWith("wasm"))return await zxt(i);if(!ba)try{const{requireFromFile:t}=globalThis.loaders||{};return await t?.(i)}catch(t){return console.error(t),null}if(uE)return importScripts(i);const e=await qxt(i);return Hxt(e,i)}function Hxt(i,e){if(!ba){const{requireFromString:o}=globalThis.loaders||{};return o?.(i,e)}if(uE)return eval.call(globalThis,i),null;const t=document.createElement("script");t.id=e;try{t.appendChild(document.createTextNode(i))}catch{t.text=i}return document.body.appendChild(t),null}async function zxt(i){const{readFileAsArrayBuffer:e}=globalThis.loaders||{};return ba||!e||i.startsWith("http")?await(await fetch(i)).arrayBuffer():await e(i)}async function qxt(i){const{readFileAsText:e}=globalThis.loaders||{};return ba||!e||i.startsWith("http")?await(await fetch(i)).text():await e(i)}function Qxt(i,e){return!Dd.isSupported()||!ba&&!e?._nodeWorkers?!1:i.worker&&e?.worker}async function Gxt(i,e,t,o,n){const r=i.id,a=Uxt(i,t),s=Dd.getWorkerFarm(t).getWorkerPool({name:r,url:a});t=JSON.parse(JSON.stringify(t)),o=JSON.parse(JSON.stringify(o||{}));const l=await s.startJob("process-on-worker",Kxt.bind(null,n));return l.postMessage("process",{input:e,options:t,context:o}),await(await l.result).result}async function Kxt(i,e,t,o){switch(t){case"done":e.done(o);break;case"error":e.error(new Error(o.error));break;case"process":const{id:n,input:r,options:a}=o;try{const s=await i(r,a);e.postMessage("done",{id:n,result:s})}catch(s){const l=s instanceof Error?s.message:"unknown error";e.postMessage("error",{id:n,error:l})}break;default:console.warn(`parse-with-worker unknown message ${t}`)}}function Jxt(i,e=5){return typeof i=="string"?i.slice(0,e):ArrayBuffer.isView(i)?QJ(i.buffer,i.byteOffset,e):i instanceof ArrayBuffer?QJ(i,0,e):""}function QJ(i,e,t){if(i.byteLength<=e+t)return"";const o=new DataView(i);let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(o.getUint8(e+r));return n}function Zxt(i){try{return JSON.parse(i)}catch{throw new Error(`Failed to parse JSON from data starting with "${Jxt(i)}"`)}}function Wxt(i,e,t){if(t=t||i.byteLength,i.byteLength<t||e.byteLength<t)return!1;const o=new Uint8Array(i),n=new Uint8Array(e);for(let r=0;r<o.length;++r)if(o[r]!==n[r])return!1;return!0}function Yxt(...i){return Xxt(i)}function Xxt(i){const e=i.map(r=>r instanceof ArrayBuffer?new Uint8Array(r):r),t=e.reduce((r,a)=>r+a.byteLength,0),o=new Uint8Array(t);let n=0;for(const r of e)o.set(r,n),n+=r.byteLength;return o.buffer}function GJ(i,e,t){const o=t!==void 0?new Uint8Array(i).subarray(e,e+t):new Uint8Array(i).subarray(e);return new Uint8Array(o).buffer}function Iv(i,e){return zl(i>=0),zl(e>0),i+(e-1)&-4}function $xt(i,e,t){let o;if(i instanceof ArrayBuffer)o=new Uint8Array(i);else{const n=i.byteOffset,r=i.byteLength;o=new Uint8Array(i.buffer||i.arrayBuffer,n,r)}return e.set(o,t),t+Iv(o.byteLength,4)}async function ekt(i){const e=[];for await(const t of i)e.push(t);return Yxt(...e)}let tkt="";const KJ={};function ikt(i){for(const e in KJ)if(i.startsWith(e)){const t=KJ[e];i=i.replace(e,t)}return!i.startsWith("http://")&&!i.startsWith("https://")&&(i=`${tkt}${i}`),i}function okt(i){return i&&typeof i=="object"&&i.isBuffer}function JJ(i){if(okt(i)||i instanceof ArrayBuffer)return i;if(ArrayBuffer.isView(i))return i.byteOffset===0&&i.byteLength===i.buffer.byteLength?i.buffer:i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength);if(typeof i=="string"){const e=i;return new TextEncoder().encode(e).buffer}if(i&&typeof i=="object"&&i._toArrayBuffer)return i._toArrayBuffer();throw new Error("toArrayBuffer")}function ZJ(i){const e=i?i.lastIndexOf("/"):-1;return e>=0?i.substr(e+1):""}function rkt(i){const e=i?i.lastIndexOf("/"):-1;return e>=0?i.substr(0,e):""}const nkt=i=>typeof i=="boolean",Sv=i=>typeof i=="function",Tv=i=>i!==null&&typeof i=="object",WJ=i=>Tv(i)&&i.constructor==={}.constructor,akt=i=>!!i&&typeof i[Symbol.iterator]=="function",skt=i=>i&&typeof i[Symbol.asyncIterator]=="function",Su=i=>typeof Response<"u"&&i instanceof Response||i&&i.arrayBuffer&&i.text&&i.json,qp=i=>typeof Blob<"u"&&i instanceof Blob,lkt=i=>i&&typeof i=="object"&&i.isBuffer,ckt=i=>typeof ReadableStream<"u"&&i instanceof ReadableStream||Tv(i)&&Sv(i.tee)&&Sv(i.cancel)&&Sv(i.getReader),dkt=i=>Tv(i)&&Sv(i.read)&&Sv(i.pipe)&&nkt(i.readable),YJ=i=>ckt(i)||dkt(i);class ukt extends Error{constructor(e,t){super(e),this.reason=t.reason,this.url=t.url,this.response=t.response}reason;url;response}const hkt=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,pkt=/^([-\w.]+\/[-\w.+]+)/;function XJ(i,e){return i.toLowerCase()===e.toLowerCase()}function fkt(i){const e=pkt.exec(i);return e?e[1]:i}function $J(i){const e=hkt.exec(i);return e?e[1]:""}const eZ=/\?.*/;function Akt(i){const e=i.match(eZ);return e&&e[0]}function mE(i){return i.replace(eZ,"")}function gkt(i){if(i.length<50)return i;const e=i.slice(i.length-15);return`${i.substr(0,32)}...${e}`}function Hy(i){return Su(i)?i.url:qp(i)?i.name||"":typeof i=="string"?i:""}function vE(i){if(Su(i)){const e=i,t=e.headers.get("content-type")||"",o=mE(e.url);return fkt(t)||$J(o)}return qp(i)?i.type||"":typeof i=="string"?$J(i):""}function mkt(i){return Su(i)?i.headers["content-length"]||-1:qp(i)?i.size:typeof i=="string"?i.length:i instanceof ArrayBuffer||ArrayBuffer.isView(i)?i.byteLength:-1}async function tZ(i){if(Su(i))return i;const e={},t=mkt(i);t>=0&&(e["content-length"]=String(t));const o=Hy(i),n=vE(i);n&&(e["content-type"]=n);const r=await bkt(i);r&&(e["x-first-bytes"]=r),typeof i=="string"&&(i=new TextEncoder().encode(i));const a=new Response(i,{headers:e});return Object.defineProperty(a,"url",{value:o}),a}async function vkt(i){if(!i.ok)throw await ykt(i)}async function ykt(i){const e=gkt(i.url);let t=`Failed to fetch resource (${i.status}) ${i.statusText}: ${e}`;t=t.length>100?`${t.slice(0,100)}...`:t;const o={reason:i.statusText,url:i.url,response:i};try{const n=i.headers.get("Content-Type");o.reason=!i.bodyUsed&&n?.includes("application/json")?await i.json():await i.text()}catch{}return new ukt(t,o)}async function bkt(i){if(typeof i=="string")return`data:,${i.slice(0,5)}`;if(i instanceof Blob){const e=i.slice(0,5);return await new Promise(t=>{const o=new FileReader;o.onload=n=>t(n?.target?.result),o.readAsDataURL(e)})}if(i instanceof ArrayBuffer){const e=i.slice(0,5);return`data:base64,${wkt(e)}`}return null}function wkt(i){let e="";const t=new Uint8Array(i);for(let o=0;o<t.byteLength;o++)e+=String.fromCharCode(t[o]);return btoa(e)}function Ckt(i){return!xkt(i)&&!kkt(i)}function xkt(i){return i.startsWith("http:")||i.startsWith("https:")}function kkt(i){return i.startsWith("data:")}async function iZ(i,e){if(typeof i=="string"){const t=ikt(i);return Ckt(t)&&globalThis.loaders?.fetchNode?globalThis.loaders?.fetchNode(t,e):await fetch(t,e)}return await tZ(i)}const oZ=new cE({id:"loaders.gl"});class Mkt{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}class Bkt{console;constructor(){this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}}const rZ={fetch:null,mimeType:void 0,nothrow:!1,log:new Bkt,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:jy,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},Ekt={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function nZ(){globalThis.loaders=globalThis.loaders||{};const{loaders:i}=globalThis;return i._state||(i._state={}),i._state}function aZ(){const i=nZ();return i.globalOptions=i.globalOptions||{...rZ},i.globalOptions}function Pkt(i,e,t,o){return t=t||[],t=Array.isArray(t)?t:[t],Ikt(i,t),Tkt(e,i,o)}function Ikt(i,e){sZ(i,null,rZ,Ekt,e);for(const t of e){const o=i&&i[t.id]||{},n=t.options&&t.options[t.id]||{},r=t.deprecatedOptions&&t.deprecatedOptions[t.id]||{};sZ(o,t.id,n,r,e)}}function sZ(i,e,t,o,n){const r=e||"Top level",a=e?`${e}.`:"";for(const s in i){const l=!e&&Tv(i[s]),c=s==="baseUri"&&!e,d=s==="workerUrl"&&e;if(!(s in t)&&!c&&!d){if(s in o)oZ.warn(`${r} loader option '${a}${s}' no longer supported, use '${o[s]}'`)();else if(!l){const u=Skt(s,n);oZ.warn(`${r} loader option '${a}${s}' not recognized. ${u}`)()}}}}function Skt(i,e){const t=i.toLowerCase();let o="";for(const n of e)for(const r in n.options){if(i===r)return`Did you mean '${n.id}.${r}'?`;const a=r.toLowerCase();(t.startsWith(a)||a.startsWith(t))&&(o=o||`Did you mean '${n.id}.${r}'?`)}return o}function Tkt(i,e,t){const o={...i.options||{}};return Rkt(o,t),o.log===null&&(o.log=new Mkt),lZ(o,aZ()),lZ(o,e),o}function lZ(i,e){for(const t in e)if(t in e){const o=e[t];WJ(o)&&WJ(i[t])?i[t]={...i[t],...e[t]}:i[t]=e[t]}}function Rkt(i,e){e&&!("baseUri"in i)&&(i.baseUri=e)}function cZ(i){return i?(Array.isArray(i)&&(i=i[0]),Array.isArray(i?.extensions)):!1}function dZ(i){zl(i,"null loader"),zl(cZ(i),"invalid loader");let e;return Array.isArray(i)&&(e=i[1],i=i[0],i={...i,options:{...i.options,...e}}),(i?.parseTextSync||i?.parseText)&&(i.text=!0),i.text||(i.binary=!0),i}const Lkt=()=>{const i=nZ();return i.loaderRegistry=i.loaderRegistry||[],i.loaderRegistry};function Dkt(){return Lkt()}const _kt=/\.([^.]+)$/;async function Fkt(i,e=[],t,o){if(!hZ(i))return null;let n=uZ(i,e,{...t,nothrow:!0},o);if(n)return n;if(qp(i)&&(i=await i.slice(0,10).arrayBuffer(),n=uZ(i,e,t,o)),!n&&!t?.nothrow)throw new Error(pZ(i));return n}function uZ(i,e=[],t,o){if(!hZ(i))return null;if(e&&!Array.isArray(e))return dZ(e);let n=[];e&&(n=n.concat(e)),t?.ignoreRegisteredLoaders||n.push(...Dkt()),Ukt(n);const r=Okt(i,n,t,o);if(!r&&!t?.nothrow)throw new Error(pZ(i));return r}function Okt(i,e,t,o){const n=Hy(i),r=vE(i),a=mE(n)||o?.url;let s=null,l="";return t?.mimeType&&(s=yE(e,t?.mimeType),l=`match forced by supplied MIME type ${t?.mimeType}`),s=s||Nkt(e,a),l=l||(s?`matched url ${a}`:""),s=s||yE(e,r),l=l||(s?`matched MIME type ${r}`:""),s=s||Vkt(e,i),l=l||(s?`matched initial data ${AZ(i)}`:""),t?.fallbackMimeType&&(s=s||yE(e,t?.fallbackMimeType),l=l||(s?`matched fallback MIME type ${r}`:"")),l&&Mxt.log(1,`selectLoader selected ${s?.name}: ${l}.`),s}function hZ(i){return!(i instanceof Response&&i.status===204)}function pZ(i){const e=Hy(i),t=vE(i);let o="No valid loader found (";o+=e?`${ZJ(e)}, `:"no url provided, ",o+=`MIME type: ${t?`"${t}"`:"not provided"}, `;const n=i?AZ(i):"";return o+=n?` first bytes: "${n}"`:"first bytes: not available",o+=")",o}function Ukt(i){for(const e of i)dZ(e)}function Nkt(i,e){const t=e&&_kt.exec(e),o=t&&t[1];return o?jkt(i,o):null}function jkt(i,e){e=e.toLowerCase();for(const t of i)for(const o of t.extensions)if(o.toLowerCase()===e)return t;return null}function yE(i,e){for(const t of i)if(t.mimeTypes?.some(o=>XJ(e,o))||XJ(e,`application/x.${t.id}`))return t;return null}function Vkt(i,e){if(!e)return null;for(const t of i)if(typeof e=="string"){if(Hkt(e,t))return t}else if(ArrayBuffer.isView(e)){if(fZ(e.buffer,e.byteOffset,t))return t}else if(e instanceof ArrayBuffer&&fZ(e,0,t))return t;return null}function Hkt(i,e){return e.testText?e.testText(i):(Array.isArray(e.tests)?e.tests:[e.tests]).some(t=>i.startsWith(t))}function fZ(i,e,t){return(Array.isArray(t.tests)?t.tests:[t.tests]).some(o=>zkt(i,e,t,o))}function zkt(i,e,t,o){if(o instanceof ArrayBuffer)return Wxt(o,i,o.byteLength);switch(typeof o){case"function":return o(i);case"string":const n=bE(i,e,o.length);return o===n;default:return!1}}function AZ(i,e=5){return typeof i=="string"?i.slice(0,e):ArrayBuffer.isView(i)?bE(i.buffer,i.byteOffset,e):i instanceof ArrayBuffer?bE(i,0,e):""}function bE(i,e,t){if(i.byteLength<e+t)return"";const o=new DataView(i);let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(o.getUint8(e+r));return n}const qkt=256*1024;function*Qkt(i,e){const t=e?.chunkSize||qkt;let o=0;const n=new TextEncoder;for(;o<i.length;){const r=Math.min(i.length-o,t),a=i.slice(o,o+r);o+=r,yield n.encode(a)}}const Gkt=256*1024;function*Kkt(i,e={}){const{chunkSize:t=Gkt}=e;let o=0;for(;o<i.byteLength;){const n=Math.min(i.byteLength-o,t),r=new ArrayBuffer(n),a=new Uint8Array(i,o,n);new Uint8Array(r).set(a),o+=n,yield r}}const Jkt=1024*1024;async function*Zkt(i,e){const t=e?.chunkSize||Jkt;let o=0;for(;o<i.size;){const n=o+t,r=await i.slice(o,n).arrayBuffer();o=n,yield r}}function gZ(i,e){return jy?Wkt(i,e):Ykt(i)}async function*Wkt(i,e){const t=i.getReader();let o;try{for(;;){const n=o||t.read();e?._streamReadAhead&&(o=t.read());const{done:r,value:a}=await n;if(r)return;yield JJ(a)}}catch{t.releaseLock()}}async function*Ykt(i,e){for await(const t of i)yield JJ(t)}function Xkt(i,e){if(typeof i=="string")return Qkt(i,e);if(i instanceof ArrayBuffer)return Kkt(i,e);if(qp(i))return Zkt(i,e);if(YJ(i))return gZ(i,e);if(Su(i))return gZ(i.body,e);throw new Error("makeIterator")}const mZ="Cannot convert supplied data type";function $kt(i,e,t){if(e.text&&typeof i=="string")return i;if(lkt(i)&&(i=i.buffer),i instanceof ArrayBuffer){const o=i;return e.text&&!e.binary?new TextDecoder("utf8").decode(o):o}if(ArrayBuffer.isView(i)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(i);let o=i.buffer;const n=i.byteLength||i.length;return(i.byteOffset!==0||n!==o.byteLength)&&(o=o.slice(i.byteOffset,i.byteOffset+n)),o}throw new Error(mZ)}async function eMt(i,e,t){const o=i instanceof ArrayBuffer||ArrayBuffer.isView(i);if(typeof i=="string"||o)return $kt(i,e);if(qp(i)&&(i=await tZ(i)),Su(i)){const n=i;return await vkt(n),e.binary?await n.arrayBuffer():await n.text()}if(YJ(i)&&(i=Xkt(i,t)),akt(i)||skt(i))return ekt(i);throw new Error(mZ)}function tMt(i,e){const t=aZ(),o=i||t;return typeof o.fetch=="function"?o.fetch:Tv(o.fetch)?n=>iZ(n,o.fetch):e?.fetch?e?.fetch:iZ}function iMt(i,e,t){if(t)return t;const o={fetch:tMt(e,i),...i};if(o.url){const n=mE(o.url);o.baseUrl=n,o.queryString=Akt(o.url),o.filename=ZJ(n),o.baseUrl=rkt(n)}return Array.isArray(o.loaders)||(o.loaders=null),o}function oMt(i,e){if(i&&!Array.isArray(i))return i;let t;if(i&&(t=Array.isArray(i)?i:[i]),e&&e.loaders){const o=Array.isArray(e.loaders)?e.loaders:[e.loaders];t=t?[...t,...o]:o}return t&&t.length?t:void 0}async function wE(i,e,t,o){e&&!Array.isArray(e)&&!cZ(e)&&(o=void 0,t=e,e=void 0),i=await i,t=t||{};const n=Hy(i),r=oMt(e,o),a=await Fkt(i,r,t);return a?(t=Pkt(t,a,r,n),o=iMt({url:n,_parse:wE,loaders:r},t,o||null),await rMt(a,i,t,o)):null}async function rMt(i,e,t,o){if(Nxt(i),t=Bxt(i.options,t),Su(e)){const r=e,{ok:a,redirected:s,status:l,statusText:c,type:d,url:u}=r,h=Object.fromEntries(r.headers.entries());o.response={headers:h,ok:a,redirected:s,status:l,statusText:c,type:d,url:u}}e=await eMt(e,i,t);const n=i;if(n.parseTextSync&&typeof e=="string")return n.parseTextSync(e,t,o);if(Qxt(i,t))return await Gxt(i,e,t,o,wE);if(n.parseText&&typeof e=="string")return await n.parseText(e,t,o);if(n.parse)return await n.parse(e,t,o);throw ql(!n.parseSync),new Error(`${i.id} loader - no parser found and worker is disabled`)}function nMt(i){switch(i.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function aMt(i){let e=1/0,t=1/0,o=1/0,n=-1/0,r=-1/0,a=-1/0;const s=i.POSITION?i.POSITION.value:[],l=s&&s.length;for(let c=0;c<l;c+=3){const d=s[c],u=s[c+1],h=s[c+2];e=d<e?d:e,t=u<t?u:t,o=h<o?h:o,n=d>n?d:n,r=u>r?u:r,a=h>a?h:a}return[[e,t,o],[n,r,a]]}function sMt(i,e,t){const o=nMt(e.value),n=t||lMt(e);return{name:i,type:{type:"fixed-size-list",listSize:e.size,children:[{name:"value",type:o}]},nullable:!1,metadata:n}}function lMt(i){const e={};return"byteOffset"in i&&(e.byteOffset=i.byteOffset.toString(10)),"byteStride"in i&&(e.byteStride=i.byteStride.toString(10)),"normalized"in i&&(e.normalized=i.normalized.toString()),e}const cMt="4.3.3",dMt=globalThis.loaders?.parseImageNode,CE=typeof Image<"u",xE=typeof ImageBitmap<"u",uMt=!!dMt,kE=jy?!0:uMt;function hMt(i){switch(i){case"auto":return xE||CE||kE;case"imagebitmap":return xE;case"image":return CE;case"data":return kE;default:throw new Error(`@loaders.gl/images: image ${i} not supported in this environment`)}}function pMt(){if(xE)return"imagebitmap";if(CE)return"image";if(kE)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function fMt(i){const e=AMt(i);if(!e)throw new Error("Not an image");return e}function vZ(i){switch(fMt(i)){case"data":return i;case"image":case"imagebitmap":const e=document.createElement("canvas"),t=e.getContext("2d");if(!t)throw new Error("getImageData");return e.width=i.width,e.height=i.height,t.drawImage(i,0,0),t.getImageData(0,0,i.width,i.height);default:throw new Error("getImageData")}}function AMt(i){return typeof ImageBitmap<"u"&&i instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&i instanceof Image?"image":i&&typeof i=="object"&&i.data&&i.width&&i.height?"data":null}const gMt=/^data:image\/svg\+xml/,mMt=/\.svg((\?|#).*)?$/;function ME(i){return i&&(gMt.test(i)||mMt.test(i))}function vMt(i,e){if(ME(e)){let t=new TextDecoder().decode(i);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(t=unescape(encodeURIComponent(t)))}catch(o){throw new Error(o.message)}return`data:image/svg+xml;base64,${btoa(t)}`}return yZ(i,e)}function yZ(i,e){if(ME(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(i)])}async function bZ(i,e,t){const o=vMt(i,t),n=self.URL||self.webkitURL,r=typeof o!="string"&&n.createObjectURL(o);try{return await yMt(r||o,e)}finally{r&&n.revokeObjectURL(r)}}async function yMt(i,e){const t=new Image;return t.src=i,e.image&&e.image.decode&&t.decode?(await t.decode(),t):await new Promise((o,n)=>{try{t.onload=()=>o(t),t.onerror=r=>{const a=r instanceof Error?r.message:"error";n(new Error(a))}}catch(r){n(r)}})}const bMt={};let wZ=!0;async function wMt(i,e,t){let o;ME(t)?o=await bZ(i,e,t):o=yZ(i,t);const n=e&&e.imagebitmap;return await CMt(o,n)}async function CMt(i,e=null){if((xMt(e)||!wZ)&&(e=null),e)try{return await createImageBitmap(i,e)}catch(t){console.warn(t),wZ=!1}return await createImageBitmap(i)}function xMt(i){for(const e in i||bMt)return!1;return!0}function kMt(i){return!PMt(i,"ftyp",4)||(i[8]&96)===0?null:MMt(i)}function MMt(i){switch(BMt(i,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function BMt(i,e,t){return String.fromCharCode(...i.slice(e,t))}function EMt(i){return[...i].map(e=>e.charCodeAt(0))}function PMt(i,e,t=0){const o=EMt(e);for(let n=0;n<o.length;++n)if(o[n]!==i[n+t])return!1;return!0}const Hs=!1,Rv=!0;function BE(i){const e=Lv(i);return SMt(e)||LMt(e)||TMt(e)||RMt(e)||IMt(e)}function IMt(i){const e=new Uint8Array(i instanceof DataView?i.buffer:i),t=kMt(e);return t?{mimeType:t.mimeType,width:0,height:0}:null}function SMt(i){const e=Lv(i);return e.byteLength>=24&&e.getUint32(0,Hs)===2303741511?{mimeType:"image/png",width:e.getUint32(16,Hs),height:e.getUint32(20,Hs)}:null}function TMt(i){const e=Lv(i);return e.byteLength>=10&&e.getUint32(0,Hs)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,Rv),height:e.getUint16(8,Rv)}:null}function RMt(i){const e=Lv(i);return e.byteLength>=14&&e.getUint16(0,Hs)===16973&&e.getUint32(2,Rv)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,Rv),height:e.getUint32(22,Rv)}:null}function LMt(i){const e=Lv(i);if(!(e.byteLength>=3&&e.getUint16(0,Hs)===65496&&e.getUint8(2)===255))return null;const{tableMarkers:t,sofMarkers:o}=DMt();let n=2;for(;n+9<e.byteLength;){const r=e.getUint16(n,Hs);if(o.has(r))return{mimeType:"image/jpeg",height:e.getUint16(n+5,Hs),width:e.getUint16(n+7,Hs)};if(!t.has(r))return null;n+=2,n+=e.getUint16(n,Hs)}return null}function DMt(){const i=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)i.add(e);return{tableMarkers:i,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function Lv(i){if(i instanceof DataView)return i;if(ArrayBuffer.isView(i))return new DataView(i.buffer);if(i instanceof ArrayBuffer)return new DataView(i);throw new Error("toDataView")}async function _Mt(i,e){const{mimeType:t}=BE(i)||{},o=globalThis.loaders?.parseImageNode;return zl(o),await o(i,t)}async function FMt(i,e,t){e=e||{};const o=(e.image||{}).type||"auto",{url:n}=t||{},r=OMt(o);let a;switch(r){case"imagebitmap":a=await wMt(i,e,n);break;case"image":a=await bZ(i,e,n);break;case"data":a=await _Mt(i);break;default:zl(!1)}return o==="data"&&(a=vZ(a)),a}function OMt(i){switch(i){case"auto":case"data":return pMt();default:return hMt(i),i}}const UMt=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],NMt=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],jMt={image:{type:"auto",decode:!0}},VMt={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:cMt,mimeTypes:NMt,extensions:UMt,parse:FMt,tests:[i=>!!BE(new DataView(i))],options:jMt},EE={};function HMt(i){if(EE[i]===void 0){const e=jy?qMt(i):zMt(i);EE[i]=e}return EE[i]}function zMt(i){const e=["image/png","image/jpeg","image/gif"],t=globalThis.loaders?.imageFormatsNode||e;return!!globalThis.loaders?.parseImageNode&&t.includes(i)}function qMt(i){switch(i){case"image/avif":case"image/webp":return QMt(i);default:return!0}}function QMt(i){try{return document.createElement("canvas").toDataURL(i).indexOf(`data:${i}`)===0}catch{return!1}}function Yn(i,e){if(!i)throw new Error(e||"assert failed: gltf")}const CZ={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},xZ={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},kZ=["SCALAR","VEC2","VEC3","VEC4"],GMt=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],KMt=new Map(GMt),JMt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ZMt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},WMt={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function MZ(i){return kZ[i-1]||kZ[0]}function zy(i){const e=KMt.get(i.constructor);if(!e)throw new Error("Illegal typed array");return e}function PE(i,e){const t=WMt[i.componentType],o=JMt[i.type],n=ZMt[i.componentType],r=i.count*o,a=i.count*o*n;Yn(a>=0&&a<=e.byteLength);const s=xZ[i.componentType],l=CZ[i.type];return{ArrayType:t,length:r,byteLength:a,componentByteSize:s,numberOfComponentsInElement:l}}function YMt(i,e,t){const o=i.bufferViews[t];Yn(o);const n=o.buffer,r=e[n];Yn(r);const a=(o.byteOffset||0)+r.byteOffset;return new Uint8Array(r.arrayBuffer,a,o.byteLength)}function XMt(i,e,t){const o=typeof t=="number"?i.accessors?.[t]:t;if(!o)throw new Error(`No gltf accessor ${JSON.stringify(t)}`);const n=i.bufferViews?.[o.bufferView||0];if(!n)throw new Error(`No gltf buffer view for accessor ${n}`);const{arrayBuffer:r,byteOffset:a}=e[n.buffer],s=(a||0)+(o.byteOffset||0)+(n.byteOffset||0),{ArrayType:l,length:c,componentByteSize:d,numberOfComponentsInElement:u}=PE(o,n),h=d*u,p=n.byteStride||h;if(typeof n.byteStride>"u"||n.byteStride===h)return new l(r,s,c);const A=new l(c);for(let f=0;f<o.count;f++){const m=new l(r,s+f*p,u);A.set(m,f*u)}return A}function $Mt(){return{asset:{version:"2.0",generator:"loaders.gl"},buffers:[],extensions:{},extensionsRequired:[],extensionsUsed:[]}}class gr{gltf;sourceBuffers;byteLength;constructor(e){this.gltf={json:e?.json||$Mt(),buffers:e?.buffers||[],images:e?.images||[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(e){return this.json[e]}getExtraData(e){return(this.json.extras||{})[e]}hasExtension(e){const t=this.getUsedExtensions().find(n=>n===e),o=this.getRequiredExtensions().find(n=>n===e);return typeof t=="string"||typeof o=="string"}getExtension(e){const t=this.getUsedExtensions().find(n=>n===e),o=this.json.extensions||{};return t?o[e]:null}getRequiredExtension(e){return this.getRequiredExtensions().find(t=>t===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(e,t){return(e.extensions||{})[t]}getScene(e){return this.getObject("scenes",e)}getNode(e){return this.getObject("nodes",e)}getSkin(e){return this.getObject("skins",e)}getMesh(e){return this.getObject("meshes",e)}getMaterial(e){return this.getObject("materials",e)}getAccessor(e){return this.getObject("accessors",e)}getTexture(e){return this.getObject("textures",e)}getSampler(e){return this.getObject("samplers",e)}getImage(e){return this.getObject("images",e)}getBufferView(e){return this.getObject("bufferViews",e)}getBuffer(e){return this.getObject("buffers",e)}getObject(e,t){if(typeof t=="object")return t;const o=this.json[e]&&this.json[e][t];if(!o)throw new Error(`glTF file error: Could not find ${e}[${t}]`);return o}getTypedArrayForBufferView(e){e=this.getBufferView(e);const t=e.buffer,o=this.gltf.buffers[t];Yn(o);const n=(e.byteOffset||0)+o.byteOffset;return new Uint8Array(o.arrayBuffer,n,e.byteLength)}getTypedArrayForAccessor(e){const t=this.getAccessor(e);return XMt(this.gltf.json,this.gltf.buffers,t)}getTypedArrayForImageData(e){e=this.getAccessor(e);const t=this.getBufferView(e.bufferView),o=this.getBuffer(t.buffer).data,n=t.byteOffset||0;return new Uint8Array(o,n,t.byteLength)}addApplicationData(e,t){return this.json[e]=t,this}addExtraData(e,t){return this.json.extras=this.json.extras||{},this.json.extras[e]=t,this}addObjectExtension(e,t,o){return e.extensions=e.extensions||{},e.extensions[t]=o,this.registerUsedExtension(t),this}setObjectExtension(e,t,o){const n=e.extensions||{};n[t]=o}removeObjectExtension(e,t){const o=e?.extensions||{};if(o[t]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const n=this.json.extensionsRemoved;n.includes(t)||n.push(t)}delete o[t]}addExtension(e,t={}){return Yn(t),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=t,this.registerUsedExtension(e),t}addRequiredExtension(e,t={}){return Yn(t),this.addExtension(e,t),this.registerRequiredExtension(e),t}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(t=>t===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(t=>t===e)||this.json.extensionsRequired.push(e)}removeExtension(e){if(this.json.extensions?.[e]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const t=this.json.extensionsRemoved;t.includes(e)||t.push(e)}this.json.extensions&&delete this.json.extensions[e],this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e)}setDefaultScene(e){this.json.scene=e}addScene(e){const{nodeIndices:t}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:t}),this.json.scenes.length-1}addNode(e){const{meshIndex:t,matrix:o}=e;this.json.nodes=this.json.nodes||[];const n={mesh:t};return o&&(n.matrix=o),this.json.nodes.push(n),this.json.nodes.length-1}addMesh(e){const{attributes:t,indices:o,material:n,mode:r=4}=e,a={primitives:[{attributes:this._addAttributes(t),mode:r}]};if(o){const s=this._addIndices(o);a.primitives[0].indices=s}return Number.isFinite(n)&&(a.primitives[0].material=n),this.json.meshes=this.json.meshes||[],this.json.meshes.push(a),this.json.meshes.length-1}addPointCloud(e){const t={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(t),this.json.meshes.length-1}addImage(e,t){const o=BE(e),n=t||o?.mimeType,r={bufferView:this.addBufferView(e),mimeType:n};return this.json.images=this.json.images||[],this.json.images.push(r),this.json.images.length-1}addBufferView(e,t=0,o=this.byteLength){const n=e.byteLength;Yn(Number.isFinite(n)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);const r={buffer:t,byteOffset:o,byteLength:n};return this.byteLength+=Iv(n,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(r),this.json.bufferViews.length-1}addAccessor(e,t){const o={bufferView:e,type:MZ(t.size),componentType:t.componentType,count:t.count,max:t.max,min:t.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(o),this.json.accessors.length-1}addBinaryBuffer(e,t={size:3}){const o=this.addBufferView(e);let n={min:t.min,max:t.max};(!n.min||!n.max)&&(n=this._getAccessorMinMax(e,t.size));const r={size:t.size,componentType:zy(e),count:Math.round(e.length/t.size),min:n.min,max:n.max};return this.addAccessor(o,Object.assign(r,t))}addTexture(e){const{imageIndex:t}=e,o={source:t};return this.json.textures=this.json.textures||[],this.json.textures.push(o),this.json.textures.length-1}addMaterial(e){return this.json.materials=this.json.materials||[],this.json.materials.push(e),this.json.materials.length-1}createBinaryChunk(){const e=this.byteLength,t=new ArrayBuffer(e),o=new Uint8Array(t);let n=0;for(const r of this.sourceBuffers||[])n=$xt(r,o,n);this.json?.buffers?.[0]?this.json.buffers[0].byteLength=e:this.json.buffers=[{byteLength:e}],this.gltf.binary=t,this.sourceBuffers=[t],this.gltf.buffers=[{arrayBuffer:t,byteOffset:0,byteLength:t.byteLength}]}_removeStringFromArray(e,t){let o=!0;for(;o;){const n=e.indexOf(t);n>-1?e.splice(n,1):o=!1}}_addAttributes(e={}){const t={};for(const o in e){const n=e[o],r=this._getGltfAttributeName(o),a=this.addBinaryBuffer(n.value,n);t[r]=a}return t}_addIndices(e){return this.addBinaryBuffer(e,{size:1})}_getGltfAttributeName(e){switch(e.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return e}}_getAccessorMinMax(e,t){const o={min:null,max:null};if(e.length<t)return o;o.min=[],o.max=[];const n=e.subarray(0,t);for(const r of n)o.min.push(r),o.max.push(r);for(let r=t;r<e.length;r+=t)for(let a=0;a<t;a++)o.min[0+a]=Math.min(o.min[0+a],e[r+a]),o.max[0+a]=Math.max(o.max[0+a],e[r+a]);return o}}function BZ(i){return(i%1+1)%1}const EZ={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16,BOOLEAN:1,STRING:1,ENUM:1},eBt={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:BigInt64Array,UINT64:BigUint64Array,FLOAT32:Float32Array,FLOAT64:Float64Array},PZ={INT8:1,UINT8:1,INT16:2,UINT16:2,INT32:4,UINT32:4,INT64:8,UINT64:8,FLOAT32:4,FLOAT64:8};function IE(i,e){return PZ[e]*EZ[i]}function qy(i,e,t,o){if(t!=="UINT8"&&t!=="UINT16"&&t!=="UINT32"&&t!=="UINT64")return null;const n=i.getTypedArrayForBufferView(e),r=Qy(n,"SCALAR",t,o+1);return r instanceof BigInt64Array||r instanceof BigUint64Array?null:r}function Qy(i,e,t,o=1){const n=EZ[e],r=eBt[t],a=PZ[t],s=o*n,l=s*a;let c=i.buffer,d=i.byteOffset;return d%a!==0&&(c=new Uint8Array(c).slice(d,d+l).buffer,d=0),new r(c,d,s)}function SE(i,e,t){const o=`TEXCOORD_${e.texCoord||0}`,n=t.attributes[o],r=i.getTypedArrayForAccessor(n),a=i.gltf.json,s=e.index,l=a.textures?.[s]?.source;if(typeof l<"u"){const c=a.images?.[l]?.mimeType,d=i.gltf.images?.[l];if(d&&typeof d.width<"u"){const u=[];for(let h=0;h<r.length;h+=2){const p=tBt(d,c,r,h,e.channels);u.push(p)}return u}}return[]}function IZ(i,e,t,o,n){if(!t?.length)return;const r=[];for(const d of t){let u=o.findIndex(h=>h===d);u===-1&&(u=o.push(d)-1),r.push(u)}const a=new Uint32Array(r),s=i.gltf.buffers.push({arrayBuffer:a.buffer,byteOffset:a.byteOffset,byteLength:a.byteLength})-1,l=i.addBufferView(a,s,0),c=i.addAccessor(l,{size:1,componentType:zy(a),count:a.length});n.attributes[e]=c}function tBt(i,e,t,o,n=[0]){const r={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},a=t[o],s=t[o+1];let l=1;e&&(e.indexOf("image/jpeg")!==-1||e.indexOf("image/png")!==-1)&&(l=4);const c=iBt(a,s,i,l);let d=0;for(const u of n){const h=typeof u=="number"?Object.values(r)[u]:r[u],p=c+h.offset,A=vZ(i);if(A.data.length<=p)throw new Error(`${A.data.length} <= ${p}`);const f=A.data[p];d|=f<<h.shift}return d}function iBt(i,e,t,o=1){const n=t.width,r=BZ(i)*(n-1),a=Math.round(r),s=t.height,l=BZ(e)*(s-1),c=Math.round(l),d=t.components?t.components:o;return(c*n+a)*d}function SZ(i,e,t,o,n){const r=[];for(let a=0;a<e;a++){const s=t[a],l=t[a+1]-t[a];if(l+s>o)break;const c=s/n,d=l/n;r.push(i.slice(c,c+d))}return r}function TZ(i,e,t){const o=[];for(let n=0;n<e;n++){const r=n*t;o.push(i.slice(r,r+t))}return o}function RZ(i,e,t,o){if(t)throw new Error("Not implemented - arrayOffsets for strings is specified");if(o){const n=[],r=new TextDecoder("utf8");let a=0;for(let s=0;s<i;s++){const l=o[s+1]-o[s];if(l+a<=e.length){const c=e.subarray(a,l+a),d=r.decode(c);n.push(d),a+=l}}return n}return[]}const Qp="EXT_mesh_features",oBt=Qp;async function rBt(i,e){const t=new gr(i);aBt(t,e)}function nBt(i,e){const t=new gr(i);return lBt(t),t.createBinaryChunk(),t.gltf}function aBt(i,e){const t=i.gltf.json;if(t.meshes)for(const o of t.meshes)for(const n of o.primitives)sBt(i,n,e)}function sBt(i,e,t){if(!t?.gltf?.loadBuffers)return;const o=e.extensions?.[Qp]?.featureIds;if(o)for(const n of o){let r;if(typeof n.attribute<"u"){const a=`_FEATURE_ID_${n.attribute}`,s=e.attributes[a];r=i.getTypedArrayForAccessor(s)}else typeof n.texture<"u"&&t?.gltf?.loadImages?r=SE(i,n.texture,e):r=[];n.data=r}}function lBt(i,e){const t=i.gltf.json.meshes;if(t)for(const o of t)for(const n of o.primitives)dBt(i,n)}function cBt(i,e,t,o){e.extensions||(e.extensions={});let n=e.extensions[Qp];n||(n={featureIds:[]},e.extensions[Qp]=n);const{featureIds:r}=n,a={featureCount:t.length,propertyTable:o,data:t};r.push(a),i.addObjectExtension(e,Qp,n)}function dBt(i,e){const t=e.extensions?.[Qp];if(!t)return;const o=t.featureIds;o.forEach((n,r)=>{if(n.data){const{accessorKey:a,index:s}=uBt(e.attributes),l=new Uint32Array(n.data);o[r]={featureCount:l.length,propertyTable:n.propertyTable,attribute:s},i.gltf.buffers.push({arrayBuffer:l.buffer,byteOffset:l.byteOffset,byteLength:l.byteLength});const c=i.addBufferView(l),d=i.addAccessor(c,{size:1,componentType:zy(l),count:l.length});e.attributes[a]=d}})}function uBt(i){const e="_FEATURE_ID_",t=Object.keys(i).filter(n=>n.indexOf(e)===0);let o=-1;for(const n of t){const r=Number(n.substring(e.length));r>o&&(o=r)}return o++,{accessorKey:`${e}${o}`,index:o}}const hBt=Object.freeze(Object.defineProperty({__proto__:null,createExtMeshFeatures:cBt,decode:rBt,encode:nBt,name:oBt},Symbol.toStringTag,{value:"Module"})),Gp="EXT_structural_metadata",pBt=Gp;async function fBt(i,e){const t=new gr(i);gBt(t,e)}function ABt(i,e){const t=new gr(i);return RBt(t),t.createBinaryChunk(),t.gltf}function gBt(i,e){if(!e.gltf?.loadBuffers)return;const t=i.getExtension(Gp);t&&(e.gltf?.loadImages&&mBt(i,t),vBt(i,t))}function mBt(i,e){const t=e.propertyTextures,o=i.gltf.json;if(t&&o.meshes)for(const n of o.meshes)for(const r of n.primitives)bBt(i,t,r,e)}function vBt(i,e){const t=e.schema;if(!t)return;const o=t.classes,n=e.propertyTables;if(o&&n)for(const r in o){const a=yBt(n,r);a&&CBt(i,t,a)}}function yBt(i,e){for(const t of i)if(t.class===e)return t;return null}function bBt(i,e,t,o){if(!e)return;const n=t.extensions?.[Gp]?.propertyTextures;if(n)for(const r of n){const a=e[r];wBt(i,a,t,o)}}function wBt(i,e,t,o){if(!e.properties)return;o.dataAttributeNames||(o.dataAttributeNames=[]);const n=e.class;for(const r in e.properties){const a=`${n}_${r}`,s=e.properties?.[r];if(!s)continue;s.data||(s.data=[]);const l=s.data,c=SE(i,s,t);c!==null&&(IZ(i,a,c,l,t),s.data=l,o.dataAttributeNames.push(a))}}function CBt(i,e,t){const o=e.classes?.[t.class];if(!o)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${t.class}`);const n=t.count;for(const r in o.properties){const a=o.properties[r],s=t.properties?.[r];if(s){const l=xBt(i,e,a,n,s);s.data=l}}}function xBt(i,e,t,o,n){let r=[];const a=n.values,s=i.getTypedArrayForBufferView(a),l=kBt(i,t,n,o),c=MBt(i,n,o);switch(t.type){case"SCALAR":case"VEC2":case"VEC3":case"VEC4":case"MAT2":case"MAT3":case"MAT4":{r=BBt(t,o,s,l);break}case"BOOLEAN":throw new Error(`Not implemented - classProperty.type=${t.type}`);case"STRING":{r=RZ(o,s,l,c);break}case"ENUM":{r=EBt(e,t,o,s,l);break}default:throw new Error(`Unknown classProperty type ${t.type}`)}return r}function kBt(i,e,t,o){return e.array&&typeof e.count>"u"&&typeof t.arrayOffsets<"u"?qy(i,t.arrayOffsets,t.arrayOffsetType||"UINT32",o):null}function MBt(i,e,t){return typeof e.stringOffsets<"u"?qy(i,e.stringOffsets,e.stringOffsetType||"UINT32",t):null}function BBt(i,e,t,o){const n=i.array,r=i.count,a=IE(i.type,i.componentType),s=t.byteLength/a;let l;return i.componentType?l=Qy(t,i.type,i.componentType,s):l=t,n?o?SZ(l,e,o,t.length,a):r?TZ(l,e,r):[]:l}function EBt(i,e,t,o,n){const r=e.enumType;if(!r)throw new Error("Incorrect data in the EXT_structural_metadata extension: classProperty.enumType is not set for type ENUM");const a=i.enums?.[r];if(!a)throw new Error(`Incorrect data in the EXT_structural_metadata extension: schema.enums does't contain ${r}`);const s=a.valueType||"UINT16",l=IE(e.type,s),c=o.byteLength/l;let d=Qy(o,e.type,s,c);if(d||(d=o),e.array){if(n)return PBt({valuesData:d,numberOfElements:t,arrayOffsets:n,valuesDataBytesLength:o.length,elementSize:l,enumEntry:a});const u=e.count;return u?IBt(d,t,u,a):[]}return TE(d,0,t,a)}function PBt(i){const{valuesData:e,numberOfElements:t,arrayOffsets:o,valuesDataBytesLength:n,elementSize:r,enumEntry:a}=i,s=[];for(let l=0;l<t;l++){const c=o[l],d=o[l+1]-o[l];if(d+c>n)break;const u=c/r,h=d/r,p=TE(e,u,h,a);s.push(p)}return s}function IBt(i,e,t,o){const n=[];for(let r=0;r<e;r++){const a=t*r,s=TE(i,a,t,o);n.push(s)}return n}function TE(i,e,t,o){const n=[];for(let r=0;r<t;r++)if(i instanceof BigInt64Array||i instanceof BigUint64Array)n.push("");else{const a=i[e+r],s=SBt(o,a);s?n.push(s.name):n.push("")}return n}function SBt(i,e){for(const t of i.values)if(t.value===e)return t;return null}const TBt="schemaClassId";function RBt(i,e){const t=i.getExtension(Gp);if(t&&t.propertyTables)for(const o of t.propertyTables){const n=o.class,r=t.schema?.classes?.[n];o.properties&&r&&LBt(o,r,i)}}function LBt(i,e,t){for(const o in i.properties){const n=i.properties[o].data;if(n){const r=e.properties[o];if(r){const a=OBt(n,r,t);i.properties[o]=a}}}}function DBt(i,e,t=TBt){let o=i.getExtension(Gp);o||(o=i.addExtension(Gp)),o.schema=_Bt(e,t,o.schema);const n=FBt(e,t,o.schema);return o.propertyTables||(o.propertyTables=[]),o.propertyTables.push(n)-1}function _Bt(i,e,t){const o=t??{id:"schema_id"},n={properties:{}};for(const r of i){const a={type:r.elementType,componentType:r.componentType};n.properties[r.name]=a}return o.classes={},o.classes[e]=n,o}function FBt(i,e,t){const o={class:e,count:0};let n=0;const r=t.classes?.[e];for(const a of i){if(n===0&&(n=a.values.length),n!==a.values.length&&a.values.length)throw new Error("Illegal values in attributes");r?.properties[a.name]&&(o.properties||(o.properties={}),o.properties[a.name]={values:0,data:a.values})}return o.count=n,o}function OBt(i,e,t){const o={values:0};if(e.type==="STRING"){const{stringData:n,stringOffsets:r}=jBt(i);o.stringOffsets=RE(r,t),o.values=RE(n,t)}else if(e.type==="SCALAR"&&e.componentType){const n=NBt(i,e.componentType);o.values=RE(n,t)}return o}const UBt={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:Int32Array,UINT64:Uint32Array,FLOAT32:Float32Array,FLOAT64:Float64Array};function NBt(i,e){const t=[];for(const n of i)t.push(Number(n));const o=UBt[e];if(!o)throw new Error("Illegal component type");return new o(t)}function jBt(i){const e=new TextEncoder,t=[];let o=0;for(const l of i){const c=e.encode(l);o+=c.length,t.push(c)}const n=new Uint8Array(o),r=[];let a=0;for(const l of t)n.set(l,a),r.push(a),a+=l.length;r.push(a);const s=new Uint32Array(r);return{stringData:n,stringOffsets:s}}function RE(i,e){return e.gltf.buffers.push({arrayBuffer:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}),e.addBufferView(i)}const VBt=Object.freeze(Object.defineProperty({__proto__:null,createExtStructuralMetadata:DBt,decode:fBt,encode:ABt,name:pBt},Symbol.toStringTag,{value:"Module"})),LZ="EXT_feature_metadata",HBt=LZ;async function zBt(i,e){const t=new gr(i);qBt(t,e)}function qBt(i,e){if(!e.gltf?.loadBuffers)return;const t=i.getExtension(LZ);t&&(e.gltf?.loadImages&&QBt(i,t),GBt(i,t))}function QBt(i,e){const t=e.schema;if(!t)return;const o=t.classes,{featureTextures:n}=e;if(o&&n)for(const r in o){const a=o[r],s=JBt(n,r);s&&WBt(i,s,a)}}function GBt(i,e){const t=e.schema;if(!t)return;const o=t.classes,n=e.featureTables;if(o&&n)for(const r in o){const a=KBt(n,r);a&&ZBt(i,t,a)}}function KBt(i,e){for(const t in i){const o=i[t];if(o.class===e)return o}return null}function JBt(i,e){for(const t in i){const o=i[t];if(o.class===e)return o}return null}function ZBt(i,e,t){if(!t.class)return;const o=e.classes?.[t.class];if(!o)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${t.class}`);const n=t.count;for(const r in o.properties){const a=o.properties[r],s=t.properties?.[r];if(s){const l=YBt(i,e,a,n,s);s.data=l}}}function WBt(i,e,t){const o=e.class;for(const n in t.properties){const r=e?.properties?.[n];if(r){const a=iEt(i,r,o);r.data=a}}}function YBt(i,e,t,o,n){let r=[];const a=n.bufferView,s=i.getTypedArrayForBufferView(a),l=XBt(i,t,n,o),c=$Bt(i,t,n,o);return t.type==="STRING"||t.componentType==="STRING"?r=RZ(o,s,l,c):eEt(t)&&(r=tEt(t,o,s,l)),r}function XBt(i,e,t,o){return e.type==="ARRAY"&&typeof e.componentCount>"u"&&typeof t.arrayOffsetBufferView<"u"?qy(i,t.arrayOffsetBufferView,t.offsetType||"UINT32",o):null}function $Bt(i,e,t,o){return typeof t.stringOffsetBufferView<"u"?qy(i,t.stringOffsetBufferView,t.offsetType||"UINT32",o):null}function eEt(i){const e=["UINT8","INT16","UINT16","INT32","UINT32","INT64","UINT64","FLOAT32","FLOAT64"];return e.includes(i.type)||typeof i.componentType<"u"&&e.includes(i.componentType)}function tEt(i,e,t,o){const n=i.type==="ARRAY",r=i.componentCount,a="SCALAR",s=i.componentType||i.type,l=IE(a,s),c=t.byteLength/l,d=Qy(t,a,s,c);return n?o?SZ(d,e,o,t.length,l):r?TZ(d,e,r):[]:d}function iEt(i,e,t){const o=i.gltf.json;if(!o.meshes)return[];const n=[];for(const r of o.meshes)for(const a of r.primitives)oEt(i,t,e,n,a);return n}function oEt(i,e,t,o,n){const r={channels:t.channels,...t.texture},a=SE(i,r,n);a&&IZ(i,e,a,o,n)}const rEt=Object.freeze(Object.defineProperty({__proto__:null,decode:zBt,name:HBt},Symbol.toStringTag,{value:"Module"})),nEt="4.3.3",aEt="4.3.3",Gy={TRANSCODER:"basis_transcoder.js",TRANSCODER_WASM:"basis_transcoder.wasm",ENCODER:"basis_encoder.js",ENCODER_WASM:"basis_encoder.wasm"};let DZ;async function _Z(i){return Ext(i.modules),Pxt("basis")||(DZ||=sEt(i),await DZ)}async function sEt(i){let e=null,t=null;return[e,t]=await Promise.all([await Iu(Gy.TRANSCODER,"textures",i),await Iu(Gy.TRANSCODER_WASM,"textures",i)]),e=e||globalThis.BASIS,await lEt(e,t)}function lEt(i,e){const t={};return e&&(t.wasmBinary=e),new Promise(o=>{i(t).then(n=>{const{BasisFile:r,initializeBasis:a}=n;a(),o({BasisFile:r})})})}let LE;async function FZ(i){const e=i.modules||{};return e.basisEncoder?e.basisEncoder:(LE=LE||cEt(i),await LE)}async function cEt(i){let e=null,t=null;return[e,t]=await Promise.all([await Iu(Gy.ENCODER,"textures",i),await Iu(Gy.ENCODER_WASM,"textures",i)]),e=e||globalThis.BASIS,await dEt(e,t)}function dEt(i,e){const t={};return e&&(t.wasmBinary=e),new Promise(o=>{i(t).then(n=>{const{BasisFile:r,KTX2File:a,initializeBasis:s,BasisEncoder:l}=n;s(),o({BasisFile:r,KTX2File:a,BasisEncoder:l})})})}const Kp={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_ASTC_4X4_KHR:37808},uEt=["","WEBKIT_","MOZ_"],OZ={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let Ky=null;function hEt(i){if(!Ky){i=i||pEt()||void 0,Ky=new Set;for(const e of uEt)for(const t in OZ)if(i&&i.getExtension(`${e}${t}`)){const o=OZ[t];Ky.add(o)}}return Ky}function pEt(){try{return document.createElement("canvas").getContext("webgl")}catch{return null}}const Xn=[171,75,84,88,32,50,48,187,13,10,26,10];function fEt(i){const e=new Uint8Array(i);return!(e.byteLength<Xn.length||e[0]!==Xn[0]||e[1]!==Xn[1]||e[2]!==Xn[2]||e[3]!==Xn[3]||e[4]!==Xn[4]||e[5]!==Xn[5]||e[6]!==Xn[6]||e[7]!==Xn[7]||e[8]!==Xn[8]||e[9]!==Xn[9]||e[10]!==Xn[10]||e[11]!==Xn[11])}const AEt={etc1:{basisFormat:0,compressed:!0,format:Kp.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:Kp.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:Kp.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:Kp.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:Kp.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:Kp.COMPRESSED_RGBA_ASTC_4X4_KHR},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};async function gEt(i,e){if(e.basis.containerFormat==="auto"){if(fEt(i)){const o=await FZ(e);return UZ(o.KTX2File,i,e)}const{BasisFile:t}=await _Z(e);return DE(t,i,e)}switch(e.basis.module){case"encoder":const t=await FZ(e);switch(e.basis.containerFormat){case"ktx2":return UZ(t.KTX2File,i,e);case"basis":default:return DE(t.BasisFile,i,e)}case"transcoder":default:const{BasisFile:o}=await _Z(e);return DE(o,i,e)}}function DE(i,e,t){const o=new i(new Uint8Array(e));try{if(!o.startTranscoding())throw new Error("Failed to start basis transcoding");const n=o.getNumImages(),r=[];for(let a=0;a<n;a++){const s=o.getNumLevels(a),l=[];for(let c=0;c<s;c++)l.push(mEt(o,a,c,t));r.push(l)}return r}finally{o.close(),o.delete()}}function mEt(i,e,t,o){const n=i.getImageWidth(e,t),r=i.getImageHeight(e,t),a=i.getHasAlpha(),{compressed:s,format:l,basisFormat:c}=NZ(o,a),d=i.getImageTranscodedSizeInBytes(e,t,c),u=new Uint8Array(d);if(!i.transcodeImage(u,e,t,c,0,0))throw new Error("failed to start Basis transcoding");return{width:n,height:r,data:u,compressed:s,format:l,hasAlpha:a}}function UZ(i,e,t){const o=new i(new Uint8Array(e));try{if(!o.startTranscoding())throw new Error("failed to start KTX2 transcoding");const n=o.getLevels(),r=[];for(let a=0;a<n;a++)r.push(vEt(o,a,t));return[r]}finally{o.close(),o.delete()}}function vEt(i,e,t){const{alphaFlag:o,height:n,width:r}=i.getImageLevelInfo(e,0,0),{compressed:a,format:s,basisFormat:l}=NZ(t,o),c=i.getImageTranscodedSizeInBytes(e,0,0,l),d=new Uint8Array(c);if(!i.transcodeImage(d,e,0,0,l,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:r,height:n,data:d,compressed:a,levelSize:c,hasAlpha:o,format:s}}function NZ(i,e){let t=i&&i.basis&&i.basis.format;return t==="auto"&&(t=jZ()),typeof t=="object"&&(t=e?t.alpha:t.noAlpha),t=t.toLowerCase(),AEt[t]}function jZ(){const i=hEt();return i.has("astc")?"astc-4x4":i.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:i.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:i.has("etc1")?"etc1":i.has("etc2")?"etc2":"rgb565"}const yEt={dataType:null,batchType:null,name:"Basis",id:"basis",module:"textures",version:aEt,worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},bEt={...yEt,parse:gEt},Jp=!0,VZ=1735152710,_E=12,Jy=8,wEt=1313821514,CEt=5130562,xEt=0,kEt=0,MEt=1;function BEt(i,e=0){return`${String.fromCharCode(i.getUint8(e+0))}${String.fromCharCode(i.getUint8(e+1))}${String.fromCharCode(i.getUint8(e+2))}${String.fromCharCode(i.getUint8(e+3))}`}function EEt(i,e=0,t={}){const o=new DataView(i),{magic:n=VZ}=t,r=o.getUint32(e,!1);return r===n||r===VZ}function PEt(i,e,t=0,o={}){const n=new DataView(e),r=BEt(n,t+0),a=n.getUint32(t+4,Jp),s=n.getUint32(t+8,Jp);switch(Object.assign(i,{header:{byteOffset:t,byteLength:s,hasBinChunk:!1},type:r,version:a,json:{},binChunks:[]}),t+=_E,i.version){case 1:return IEt(i,n,t);case 2:return SEt(i,n,t,o={});default:throw new Error(`Invalid GLB version ${i.version}. Only supports version 1 and 2.`)}}function IEt(i,e,t){zl(i.header.byteLength>_E+Jy);const o=e.getUint32(t+0,Jp),n=e.getUint32(t+4,Jp);return t+=Jy,zl(n===xEt),FE(i,e,t,o),t+=o,t+=OE(i,e,t,i.header.byteLength),t}function SEt(i,e,t,o){return zl(i.header.byteLength>_E+Jy),TEt(i,e,t,o),t+i.header.byteLength}function TEt(i,e,t,o){for(;t+8<=i.header.byteLength;){const n=e.getUint32(t+0,Jp),r=e.getUint32(t+4,Jp);switch(t+=Jy,r){case wEt:FE(i,e,t,n);break;case CEt:OE(i,e,t,n);break;case kEt:o.strict||FE(i,e,t,n);break;case MEt:o.strict||OE(i,e,t,n);break}t+=Iv(n,4)}return t}function FE(i,e,t,o){const n=new Uint8Array(e.buffer,t,o),r=new TextDecoder("utf8").decode(n);return i.json=JSON.parse(r),Iv(o,4)}function OE(i,e,t,o){return i.header.hasBinChunk=!0,i.binChunks.push({byteOffset:t,byteLength:o,arrayBuffer:e.buffer}),Iv(o,4)}function HZ(i,e){if(i.startsWith("data:")||i.startsWith("http:")||i.startsWith("https:"))return i;const t=e.baseUri||e.uri;if(!t)throw new Error(`'baseUri' must be provided to resolve relative url ${i}`);return t.substr(0,t.lastIndexOf("/")+1)+i}const REt="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",LEt="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",DEt=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]),_Et=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),FEt={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},OEt={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};async function UEt(i,e,t,o,n,r="NONE"){const a=await NEt();HEt(a,a.exports[OEt[n]],i,e,t,o,a.exports[FEt[r||"NONE"]])}let UE;async function NEt(){return UE||(UE=jEt()),UE}async function jEt(){let i=REt;WebAssembly.validate(DEt)&&(i=LEt,console.log("Warning: meshopt_decoder is using experimental SIMD support"));const e=await WebAssembly.instantiate(VEt(i),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}function VEt(i){const e=new Uint8Array(i.length);for(let o=0;o<i.length;++o){const n=i.charCodeAt(o);e[o]=n>96?n-71:n>64?n-65:n>47?n+4:n>46?63:62}let t=0;for(let o=0;o<i.length;++o)e[t++]=e[o]<60?_Et[e[o]]:(e[o]-60)*64+e[++o];return e.buffer.slice(0,t)}function HEt(i,e,t,o,n,r,a){const s=i.exports.sbrk,l=o+3&-4,c=s(l*n),d=s(r.length),u=new Uint8Array(i.exports.memory.buffer);u.set(r,d);const h=e(c,o,n,d,r.length);if(h===0&&a&&a(c,l,n),t.set(u.subarray(c,c+o*n)),s(c-s(0)),h!==0)throw new Error(`Malformed buffer data: ${h}`)}const Zy="EXT_meshopt_compression",zEt=Zy;async function qEt(i,e){const t=new gr(i);if(!e?.gltf?.decompressMeshes||!e.gltf?.loadBuffers)return;const o=[];for(const n of i.json.bufferViews||[])o.push(QEt(t,n));await Promise.all(o),t.removeExtension(Zy)}async function QEt(i,e){const t=i.getObjectExtension(e,Zy);if(t){const{byteOffset:o=0,byteLength:n=0,byteStride:r,count:a,mode:s,filter:l="NONE",buffer:c}=t,d=i.gltf.buffers[c],u=new Uint8Array(d.arrayBuffer,d.byteOffset+o,n),h=new Uint8Array(i.gltf.buffers[e.buffer].arrayBuffer,e.byteOffset,e.byteLength);await UEt(h,a,r,u,s,l),i.removeObjectExtension(e,Zy)}}const GEt=Object.freeze(Object.defineProperty({__proto__:null,decode:qEt,name:zEt},Symbol.toStringTag,{value:"Module"})),Zp="EXT_texture_webp",KEt=Zp;function JEt(i,e){const t=new gr(i);if(!HMt("image/webp")){if(t.getRequiredExtensions().includes(Zp))throw new Error(`gltf: Required extension ${Zp} not supported by browser`);return}const{json:o}=t;for(const n of o.textures||[]){const r=t.getObjectExtension(n,Zp);r&&(n.source=r.source),t.removeObjectExtension(n,Zp)}t.removeExtension(Zp)}const ZEt=Object.freeze(Object.defineProperty({__proto__:null,name:KEt,preprocess:JEt},Symbol.toStringTag,{value:"Module"})),Wy="KHR_texture_basisu",WEt=Wy;function YEt(i,e){const t=new gr(i),{json:o}=t;for(const n of o.textures||[]){const r=t.getObjectExtension(n,Wy);r&&(n.source=r.source,t.removeObjectExtension(n,Wy))}t.removeExtension(Wy)}const XEt=Object.freeze(Object.defineProperty({__proto__:null,name:WEt,preprocess:YEt},Symbol.toStringTag,{value:"Module"})),$Et="4.3.3",ePt={dataType:null,batchType:null,name:"Draco",id:"draco",module:"draco",version:$Et,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function tPt(i,e,t){const o=qZ(e.metadata),n=[],r=iPt(e.attributes);for(const a in i){const s=i[a],l=zZ(a,s,r[a]);n.push(l)}if(t){const a=zZ("indices",t);n.push(a)}return{fields:n,metadata:o}}function iPt(i){const e={};for(const t in i){const o=i[t];e[o.name||"undefined"]=o}return e}function zZ(i,e,t){const o=t?qZ(t.metadata):void 0;return sMt(i,e,o)}function qZ(i){Object.entries(i);const e={};for(const t in i)e[`${t}.string`]=JSON.stringify(i[t]);return e}const QZ={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},oPt={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},rPt=4;class nPt{draco;decoder;metadataQuerier;constructor(e){this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(e,t={}){const o=new this.draco.DecoderBuffer;o.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(t);const n=this.decoder.GetEncodedGeometryType(o),r=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let a;switch(n){case this.draco.TRIANGULAR_MESH:a=this.decoder.DecodeBufferToMesh(o,r);break;case this.draco.POINT_CLOUD:a=this.decoder.DecodeBufferToPointCloud(o,r);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!a.ok()||!r.ptr){const u=`DRACO decompression failed: ${a.error_msg()}`;throw new Error(u)}const s=this._getDracoLoaderData(r,n,t),l=this._getMeshData(r,s,t),c=aMt(l.attributes),d=tPt(l.attributes,s,l.indices);return{loader:"draco",loaderData:s,header:{vertexCount:r.num_points(),boundingBox:c},...l,schema:d}}finally{this.draco.destroy(o),r&&this.draco.destroy(r)}}_getDracoLoaderData(e,t,o){const n=this._getTopLevelMetadata(e),r=this._getDracoAttributes(e,o);return{geometry_type:t,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:n,attributes:r}}_getDracoAttributes(e,t){const o={};for(let n=0;n<e.num_attributes();n++){const r=this.decoder.GetAttribute(e,n),a=this._getAttributeMetadata(e,n);o[r.unique_id()]={unique_id:r.unique_id(),attribute_type:r.attribute_type(),data_type:r.data_type(),num_components:r.num_components(),byte_offset:r.byte_offset(),byte_stride:r.byte_stride(),normalized:r.normalized(),attribute_index:n,metadata:a};const s=this._getQuantizationTransform(r,t);s&&(o[r.unique_id()].quantization_transform=s);const l=this._getOctahedronTransform(r,t);l&&(o[r.unique_id()].octahedron_transform=l)}return o}_getMeshData(e,t,o){const n=this._getMeshAttributes(t,e,o);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(e instanceof this.draco.Mesh)switch(o.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(e),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(e),size:1}}}return{topology:"point-list",mode:0,attributes:n}}_getMeshAttributes(e,t,o){const n={};for(const r of Object.values(e.attributes)){const a=this._deduceAttributeName(r,o);r.name=a;const s=this._getAttributeValues(t,r);if(s){const{value:l,size:c}=s;n[a]={value:l,size:c,byteOffset:r.byte_offset,byteStride:r.byte_stride,normalized:r.normalized}}}return n}_getTriangleListIndices(e){const t=e.num_faces()*3,o=t*rPt,n=this.draco._malloc(o);try{return this.decoder.GetTrianglesUInt32Array(e,o,n),new Uint32Array(this.draco.HEAPF32.buffer,n,t).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(e){const t=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(e,t),lPt(t)}finally{this.draco.destroy(t)}}_getAttributeValues(e,t){const o=oPt[t.data_type];if(!o)return console.warn(`DRACO: Unsupported attribute type ${t.data_type}`),null;const n=t.num_components,r=e.num_points()*n,a=r*o.BYTES_PER_ELEMENT,s=aPt(this.draco,o);let l;const c=this.draco._malloc(a);try{const d=this.decoder.GetAttribute(e,t.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(e,d,s,a,c),l=new o(this.draco.HEAPF32.buffer,c,r).slice()}finally{this.draco._free(c)}return{value:l,size:n}}_deduceAttributeName(e,t){const o=e.unique_id;for(const[a,s]of Object.entries(t.extraAttributes||{}))if(s===o)return a;const n=e.attribute_type;for(const a in QZ)if(this.draco[a]===n)return QZ[a];const r=t.attributeNameEntry||"name";return e.metadata[r]?e.metadata[r].string:`CUSTOM_ATTRIBUTE_${o}`}_getTopLevelMetadata(e){const t=this.decoder.GetMetadata(e);return this._getDracoMetadata(t)}_getAttributeMetadata(e,t){const o=this.decoder.GetAttributeMetadata(e,t);return this._getDracoMetadata(o)}_getDracoMetadata(e){if(!e||!e.ptr)return{};const t={},o=this.metadataQuerier.NumEntries(e);for(let n=0;n<o;n++){const r=this.metadataQuerier.GetEntryName(e,n);t[r]=this._getDracoMetadataField(e,r)}return t}_getDracoMetadataField(e,t){const o=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(e,t,o);const n=sPt(o);return{int:this.metadataQuerier.GetIntEntry(e,t),string:this.metadataQuerier.GetStringEntry(e,t),double:this.metadataQuerier.GetDoubleEntry(e,t),intArray:n}}finally{this.draco.destroy(o)}}_disableAttributeTransforms(e){const{quantizedAttributes:t=[],octahedronAttributes:o=[]}=e,n=[...t,...o];for(const r of n)this.decoder.SkipAttributeTransform(this.draco[r])}_getQuantizationTransform(e,t){const{quantizedAttributes:o=[]}=t,n=e.attribute_type();if(o.map(r=>this.decoder[r]).includes(n)){const r=new this.draco.AttributeQuantizationTransform;try{if(r.InitFromAttribute(e))return{quantization_bits:r.quantization_bits(),range:r.range(),min_values:new Float32Array([1,2,3]).map(a=>r.min_value(a))}}finally{this.draco.destroy(r)}}return null}_getOctahedronTransform(e,t){const{octahedronAttributes:o=[]}=t,n=e.attribute_type();if(o.map(r=>this.decoder[r]).includes(n)){const r=new this.draco.AttributeQuantizationTransform;try{if(r.InitFromAttribute(e))return{quantization_bits:r.quantization_bits()}}finally{this.draco.destroy(r)}}return null}}function aPt(i,e){switch(e){case Float32Array:return i.DT_FLOAT32;case Int8Array:return i.DT_INT8;case Int16Array:return i.DT_INT16;case Int32Array:return i.DT_INT32;case Uint8Array:return i.DT_UINT8;case Uint16Array:return i.DT_UINT16;case Uint32Array:return i.DT_UINT32;default:return i.DT_INVALID}}function sPt(i){const e=i.size(),t=new Int32Array(e);for(let o=0;o<e;o++)t[o]=i.GetValue(o);return t}function lPt(i){const e=i.size(),t=new Int32Array(e);for(let o=0;o<e;o++)t[o]=i.GetValue(o);return t}const cPt="1.5.6",dPt="1.4.1",NE=`https://www.gstatic.com/draco/versioned/decoders/${cPt}`,Fn={DECODER:"draco_wasm_wrapper.js",DECODER_WASM:"draco_decoder.wasm",FALLBACK_DECODER:"draco_decoder.js",ENCODER:"draco_encoder.js"},jE={[Fn.DECODER]:`${NE}/${Fn.DECODER}`,[Fn.DECODER_WASM]:`${NE}/${Fn.DECODER_WASM}`,[Fn.FALLBACK_DECODER]:`${NE}/${Fn.FALLBACK_DECODER}`,[Fn.ENCODER]:`https://raw.githubusercontent.com/google/draco/${dPt}/javascript/${Fn.ENCODER}`};let VE;async function uPt(i){const e=i.modules||{};return e.draco3d?VE||=e.draco3d.createDecoderModule({}).then(t=>({draco:t})):VE||=hPt(i),await VE}async function hPt(i){let e,t;switch(i.draco&&i.draco.decoderType){case"js":e=await Iu(jE[Fn.FALLBACK_DECODER],"draco",i,Fn.FALLBACK_DECODER);break;case"wasm":default:[e,t]=await Promise.all([await Iu(jE[Fn.DECODER],"draco",i,Fn.DECODER),await Iu(jE[Fn.DECODER_WASM],"draco",i,Fn.DECODER_WASM)])}return e=e||globalThis.DracoDecoderModule,await pPt(e,t)}function pPt(i,e){const t={};return e&&(t.wasmBinary=e),new Promise(o=>{i({...t,onModuleLoaded:n=>o({draco:n})})})}const fPt={...ePt,parse:APt};async function APt(i,e){const{draco:t}=await uPt(e),o=new nPt(t);try{return o.parseSync(i,e?.draco)}finally{o.destroy()}}function gPt(i){const e={};for(const t in i){const o=i[t];if(t!=="indices"){const n=GZ(o);e[t]=n}}return e}function GZ(i){const{buffer:e,size:t,count:o}=mPt(i);return{value:e,size:t,byteOffset:0,count:o,type:MZ(t),componentType:zy(e)}}function mPt(i){let e=i,t=1,o=0;return i&&i.value&&(e=i.value,t=i.size||1),e&&(ArrayBuffer.isView(e)||(e=vPt(e,Float32Array)),o=e.length/t),{buffer:e,size:t,count:o}}function vPt(i,e,t=!1){return i?Array.isArray(i)?new e(i):t&&!(i instanceof e)?new e(i):i:null}const nd="KHR_draco_mesh_compression",yPt=nd;function bPt(i,e,t){const o=new gr(i);for(const n of KZ(o))o.getObjectExtension(n,nd)}async function wPt(i,e,t){if(!e?.gltf?.decompressMeshes)return;const o=new gr(i),n=[];for(const r of KZ(o))o.getObjectExtension(r,nd)&&n.push(xPt(o,r,e,t));await Promise.all(n),o.removeExtension(nd)}function CPt(i,e={}){const t=new gr(i);for(const o of t.json.meshes||[])kPt(o),t.addRequiredExtension(nd)}async function xPt(i,e,t,o){const n=i.getObjectExtension(e,nd);if(!n)return;const r=i.getTypedArrayForBufferView(n.bufferView),a=GJ(r.buffer,r.byteOffset),s={...t};delete s["3d-tiles"];const l=await IJ(a,fPt,s,o),c=gPt(l.attributes);for(const[d,u]of Object.entries(c))if(d in e.attributes){const h=e.attributes[d],p=i.getAccessor(h);p?.min&&p?.max&&(u.min=p.min,u.max=p.max)}e.attributes=c,l.indices&&(e.indices=GZ(l.indices)),i.removeObjectExtension(e,nd),MPt(e)}function kPt(i,e,t=4,o,n){if(!o.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const r=o.DracoWriter.encodeSync({attributes:i}),a=n?.parseSync?.({attributes:i}),s=o._addFauxAttributes(a.attributes),l=o.addBufferView(r);return{primitives:[{attributes:s,mode:t,extensions:{[nd]:{bufferView:l,attributes:s}}}]}}function MPt(i){if(!i.attributes&&Object.keys(i.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function*KZ(i){for(const e of i.json.meshes||[])for(const t of e.primitives)yield t}const BPt=Object.freeze(Object.defineProperty({__proto__:null,decode:wPt,encode:CPt,name:yPt,preprocess:bPt},Symbol.toStringTag,{value:"Module"})),EPt={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...EPt}};const wa=globalThis.mathgl.config;function PPt(i,{precision:e=wa.precision}={}){return i=IPt(i),`${parseFloat(i.toPrecision(e))}`}function Yy(i){return Array.isArray(i)||ArrayBuffer.isView(i)&&!(i instanceof DataView)}function JZ(i,e,t){const o=wa.EPSILON;try{if(i===e)return!0;if(Yy(i)&&Yy(e)){if(i.length!==e.length)return!1;for(let n=0;n<i.length;++n)if(!JZ(i[n],e[n]))return!1;return!0}return i&&i.equals?i.equals(e):e&&e.equals?e.equals(i):typeof i=="number"&&typeof e=="number"?Math.abs(i-e)<=wa.EPSILON*Math.max(1,Math.abs(i),Math.abs(e)):!1}finally{wa.EPSILON=o}}function IPt(i){return Math.round(i/wa.EPSILON)*wa.EPSILON}class ZZ extends Array{clone(){return new this.constructor().copy(this)}fromArray(e,t=0){for(let o=0;o<this.ELEMENTS;++o)this[o]=e[o+t];return this.check()}toArray(e=[],t=0){for(let o=0;o<this.ELEMENTS;++o)e[t+o]=this[o];return e}toObject(e){return e}from(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}to(e){return e===this?this:Yy(e)?this.toArray(e):this.toObject(e)}toTarget(e){return e?this.to(e):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(wa)}formatString(e){let t="";for(let o=0;o<this.ELEMENTS;++o)t+=(o>0?", ":"")+PPt(this[o],e);return`${e.printTypes?this.constructor.name:""}[${t}]`}equals(e){if(!e||this.length!==e.length)return!1;for(let t=0;t<this.ELEMENTS;++t)if(!JZ(this[t],e[t]))return!1;return!0}exactEquals(e){if(!e||this.length!==e.length)return!1;for(let t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}negate(){for(let e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}lerp(e,t,o){if(o===void 0)return this.lerp(this,e,t);for(let n=0;n<this.ELEMENTS;++n){const r=e[n],a=typeof t=="number"?t:t[n];this[n]=r+o*(a-r)}return this.check()}min(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}max(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}clamp(e,t){for(let o=0;o<this.ELEMENTS;++o)this[o]=Math.min(Math.max(this[o],e[o]),t[o]);return this.check()}add(...e){for(const t of e)for(let o=0;o<this.ELEMENTS;++o)this[o]+=t[o];return this.check()}subtract(...e){for(const t of e)for(let o=0;o<this.ELEMENTS;++o)this[o]-=t[o];return this.check()}scale(e){if(typeof e=="number")for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;else for(let t=0;t<this.ELEMENTS&&t<e.length;++t)this[t]*=e[t];return this.check()}multiplyByScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}check(){if(wa.debug&&!this.validate())throw new Error(`math.gl: ${this.constructor.name} some fields set to invalid numbers'`);return this}validate(){let e=this.length===this.ELEMENTS;for(let t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}sub(e){return this.subtract(e)}setScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}addScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}subScalar(e){return this.addScalar(-e)}multiplyScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}divideScalar(e){return this.multiplyByScalar(1/e)}clampScalar(e,t){for(let o=0;o<this.ELEMENTS;++o)this[o]=Math.min(Math.max(this[o],e),t);return this.check()}get elements(){return this}}function SPt(i,e){if(i.length!==e)return!1;for(let t=0;t<i.length;++t)if(!Number.isFinite(i[t]))return!1;return!0}function $n(i){if(!Number.isFinite(i))throw new Error(`Invalid number ${JSON.stringify(i)}`);return i}function TPt(i,e,t=""){if(wa.debug&&!SPt(i,e))throw new Error(`math.gl: ${t} some fields set to invalid numbers'`);return i}function WZ(i,e){if(!i)throw new Error(`math.gl assertion ${e}`)}class RPt extends ZZ{get x(){return this[0]}set x(e){this[0]=$n(e)}get y(){return this[1]}set y(e){this[1]=$n(e)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let e=0;for(let t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}magnitudeSquared(){return this.lengthSquared()}distance(e){return Math.sqrt(this.distanceSquared(e))}distanceSquared(e){let t=0;for(let o=0;o<this.ELEMENTS;++o){const n=this[o]-e[o];t+=n*n}return $n(t)}dot(e){let t=0;for(let o=0;o<this.ELEMENTS;++o)t+=this[o]*e[o];return $n(t)}normalize(){const e=this.magnitude();if(e!==0)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}multiply(...e){for(const t of e)for(let o=0;o<this.ELEMENTS;++o)this[o]*=t[o];return this.check()}divide(...e){for(const t of e)for(let o=0;o<this.ELEMENTS;++o)this[o]/=t[o];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(e){return this.distance(e)}distanceToSquared(e){return this.distanceSquared(e)}getComponent(e){return WZ(e>=0&&e<this.ELEMENTS,"index is out of range"),$n(this[e])}setComponent(e,t){return WZ(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}addVectors(e,t){return this.copy(e).add(t)}subVectors(e,t){return this.copy(e).subtract(t)}multiplyVectors(e,t){return this.copy(e).multiply(t)}addScaledVector(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}}let Xy=typeof Float32Array<"u"?Float32Array:Array;function LPt(){const i=new Xy(2);return Xy!=Float32Array&&(i[0]=0,i[1]=0),i}function DPt(i,e,t){const o=e[0],n=e[1];return i[0]=t[0]*o+t[3]*n+t[6],i[1]=t[1]*o+t[4]*n+t[7],i}(function(){const i=LPt();return function(e,t,o,n,r,a){let s,l;for(t||(t=2),o||(o=0),n?l=Math.min(n*t+o,e.length):l=e.length,s=o;s<l;s+=t)i[0]=e[s],i[1]=e[s+1],r(i,i,a),e[s]=i[0],e[s+1]=i[1];return e}})();function _Pt(i,e,t){const o=e[0],n=e[1],r=e[2],a=t[3]*o+t[7]*n+t[11]*r||1;return i[0]=(t[0]*o+t[4]*n+t[8]*r)/a,i[1]=(t[1]*o+t[5]*n+t[9]*r)/a,i[2]=(t[2]*o+t[6]*n+t[10]*r)/a,i}function FPt(i,e,t){const o=e[0],n=e[1];return i[0]=t[0]*o+t[2]*n,i[1]=t[1]*o+t[3]*n,i[2]=e[2],i}function OPt(i,e,t){const o=e[0],n=e[1],r=e[2];return i[0]=t[0]*o+t[3]*n+t[6]*r,i[1]=t[1]*o+t[4]*n+t[7]*r,i[2]=t[2]*o+t[5]*n+t[8]*r,i[3]=e[3],i}function UPt(){const i=new Xy(3);return Xy!=Float32Array&&(i[0]=0,i[1]=0,i[2]=0),i}function NPt(i,e){return i[0]*e[0]+i[1]*e[1]+i[2]*e[2]}function jPt(i,e,t){const o=e[0],n=e[1],r=e[2],a=t[0],s=t[1],l=t[2];return i[0]=n*l-r*s,i[1]=r*a-o*l,i[2]=o*s-n*a,i}function VPt(i,e,t){const o=e[0],n=e[1],r=e[2];let a=t[3]*o+t[7]*n+t[11]*r+t[15];return a=a||1,i[0]=(t[0]*o+t[4]*n+t[8]*r+t[12])/a,i[1]=(t[1]*o+t[5]*n+t[9]*r+t[13])/a,i[2]=(t[2]*o+t[6]*n+t[10]*r+t[14])/a,i}function YZ(i,e,t){const o=e[0],n=e[1],r=e[2];return i[0]=o*t[0]+n*t[3]+r*t[6],i[1]=o*t[1]+n*t[4]+r*t[7],i[2]=o*t[2]+n*t[5]+r*t[8],i}function HPt(i,e,t){const o=t[0],n=t[1],r=t[2],a=t[3],s=e[0],l=e[1],c=e[2];let d=n*c-r*l,u=r*s-o*c,h=o*l-n*s,p=n*h-r*u,A=r*d-o*h,f=o*u-n*d;const m=a*2;return d*=m,u*=m,h*=m,p*=2,A*=2,f*=2,i[0]=s+d+p,i[1]=l+u+A,i[2]=c+h+f,i}function zPt(i,e,t,o){const n=[],r=[];return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],r[0]=n[0],r[1]=n[1]*Math.cos(o)-n[2]*Math.sin(o),r[2]=n[1]*Math.sin(o)+n[2]*Math.cos(o),i[0]=r[0]+t[0],i[1]=r[1]+t[1],i[2]=r[2]+t[2],i}function qPt(i,e,t,o){const n=[],r=[];return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],r[0]=n[2]*Math.sin(o)+n[0]*Math.cos(o),r[1]=n[1],r[2]=n[2]*Math.cos(o)-n[0]*Math.sin(o),i[0]=r[0]+t[0],i[1]=r[1]+t[1],i[2]=r[2]+t[2],i}function QPt(i,e,t,o){const n=[],r=[];return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],r[0]=n[0]*Math.cos(o)-n[1]*Math.sin(o),r[1]=n[0]*Math.sin(o)+n[1]*Math.cos(o),r[2]=n[2],i[0]=r[0]+t[0],i[1]=r[1]+t[1],i[2]=r[2]+t[2],i}function GPt(i,e){const t=i[0],o=i[1],n=i[2],r=e[0],a=e[1],s=e[2],l=Math.sqrt((t*t+o*o+n*n)*(r*r+a*a+s*s)),c=l&&NPt(i,e)/l;return Math.acos(Math.min(Math.max(c,-1),1))}(function(){const i=UPt();return function(e,t,o,n,r,a){let s,l;for(t||(t=3),o||(o=0),n?l=Math.min(n*t+o,e.length):l=e.length,s=o;s<l;s+=t)i[0]=e[s],i[1]=e[s+1],i[2]=e[s+2],r(i,i,a),e[s]=i[0],e[s+1]=i[1],e[s+2]=i[2];return e}})();const HE=[0,0,0];let $y,KPt=class Yhe extends RPt{static get ZERO(){return $y||($y=new Yhe(0,0,0),Object.freeze($y)),$y}constructor(e=0,t=0,o=0){super(-0,-0,-0),arguments.length===1&&Yy(e)?this.copy(e):(wa.debug&&($n(e),$n(t),$n(o)),this[0]=e,this[1]=t,this[2]=o)}set(e,t,o){return this[0]=e,this[1]=t,this[2]=o,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}fromObject(e){return wa.debug&&($n(e.x),$n(e.y),$n(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}toObject(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}get ELEMENTS(){return 3}get z(){return this[2]}set z(e){this[2]=$n(e)}angle(e){return GPt(this,e)}cross(e){return jPt(this,this,e),this.check()}rotateX({radians:e,origin:t=HE}){return zPt(this,this,t,e),this.check()}rotateY({radians:e,origin:t=HE}){return qPt(this,this,t,e),this.check()}rotateZ({radians:e,origin:t=HE}){return QPt(this,this,t,e),this.check()}transform(e){return this.transformAsPoint(e)}transformAsPoint(e){return VPt(this,this,e),this.check()}transformAsVector(e){return _Pt(this,this,e),this.check()}transformByMatrix3(e){return YZ(this,this,e),this.check()}transformByMatrix2(e){return FPt(this,this,e),this.check()}transformByQuaternion(e){return HPt(this,this,e),this.check()}};class JPt extends ZZ{toString(){let e="[";if(wa.printRowMajor){e+="row-major:";for(let t=0;t<this.RANK;++t)for(let o=0;o<this.RANK;++o)e+=` ${this[o*this.RANK+t]}`}else{e+="column-major:";for(let t=0;t<this.ELEMENTS;++t)e+=` ${this[t]}`}return e+="]",e}getElementIndex(e,t){return t*this.RANK+e}getElement(e,t){return this[t*this.RANK+e]}setElement(e,t,o){return this[t*this.RANK+e]=$n(o),this}getColumn(e,t=new Array(this.RANK).fill(-0)){const o=e*this.RANK;for(let n=0;n<this.RANK;++n)t[n]=this[o+n];return t}setColumn(e,t){const o=e*this.RANK;for(let n=0;n<this.RANK;++n)this[o+n]=t[n];return this}}function ZPt(i,e){if(i===e){const t=e[1],o=e[2],n=e[5];i[1]=e[3],i[2]=e[6],i[3]=t,i[5]=e[7],i[6]=o,i[7]=n}else i[0]=e[0],i[1]=e[3],i[2]=e[6],i[3]=e[1],i[4]=e[4],i[5]=e[7],i[6]=e[2],i[7]=e[5],i[8]=e[8];return i}function WPt(i,e){const t=e[0],o=e[1],n=e[2],r=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8],u=d*a-s*c,h=-d*r+s*l,p=c*r-a*l;let A=t*u+o*h+n*p;return A?(A=1/A,i[0]=u*A,i[1]=(-d*o+n*c)*A,i[2]=(s*o-n*a)*A,i[3]=h*A,i[4]=(d*t-n*l)*A,i[5]=(-s*t+n*r)*A,i[6]=p*A,i[7]=(-c*t+o*l)*A,i[8]=(a*t-o*r)*A,i):null}function YPt(i){const e=i[0],t=i[1],o=i[2],n=i[3],r=i[4],a=i[5],s=i[6],l=i[7],c=i[8];return e*(c*r-a*l)+t*(-c*n+a*s)+o*(l*n-r*s)}function XZ(i,e,t){const o=e[0],n=e[1],r=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=t[0],p=t[1],A=t[2],f=t[3],m=t[4],g=t[5],y=t[6],v=t[7],w=t[8];return i[0]=h*o+p*a+A*c,i[1]=h*n+p*s+A*d,i[2]=h*r+p*l+A*u,i[3]=f*o+m*a+g*c,i[4]=f*n+m*s+g*d,i[5]=f*r+m*l+g*u,i[6]=y*o+v*a+w*c,i[7]=y*n+v*s+w*d,i[8]=y*r+v*l+w*u,i}function XPt(i,e,t){const o=e[0],n=e[1],r=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=t[0],p=t[1];return i[0]=o,i[1]=n,i[2]=r,i[3]=a,i[4]=s,i[5]=l,i[6]=h*o+p*a+c,i[7]=h*n+p*s+d,i[8]=h*r+p*l+u,i}function $Pt(i,e,t){const o=e[0],n=e[1],r=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=Math.sin(t),p=Math.cos(t);return i[0]=p*o+h*a,i[1]=p*n+h*s,i[2]=p*r+h*l,i[3]=p*a-h*o,i[4]=p*s-h*n,i[5]=p*l-h*r,i[6]=c,i[7]=d,i[8]=u,i}function $Z(i,e,t){const o=t[0],n=t[1];return i[0]=o*e[0],i[1]=o*e[1],i[2]=o*e[2],i[3]=n*e[3],i[4]=n*e[4],i[5]=n*e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i}function eIt(i,e){const t=e[0],o=e[1],n=e[2],r=e[3],a=t+t,s=o+o,l=n+n,c=t*a,d=o*a,u=o*s,h=n*a,p=n*s,A=n*l,f=r*a,m=r*s,g=r*l;return i[0]=1-u-A,i[3]=d-g,i[6]=h+m,i[1]=d+g,i[4]=1-c-A,i[7]=p-f,i[2]=h-m,i[5]=p+f,i[8]=1-c-u,i}var zE;(function(i){i[i.COL0ROW0=0]="COL0ROW0",i[i.COL0ROW1=1]="COL0ROW1",i[i.COL0ROW2=2]="COL0ROW2",i[i.COL1ROW0=3]="COL1ROW0",i[i.COL1ROW1=4]="COL1ROW1",i[i.COL1ROW2=5]="COL1ROW2",i[i.COL2ROW0=6]="COL2ROW0",i[i.COL2ROW1=7]="COL2ROW1",i[i.COL2ROW2=8]="COL2ROW2"})(zE||(zE={}));const tIt=Object.freeze([1,0,0,0,1,0,0,0,1]);let Dv=class extends JPt{static get IDENTITY(){return oIt()}static get ZERO(){return iIt()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return zE}constructor(i,...e){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(i)?this.copy(i):e.length>0?this.copy([i,...e]):this.identity()}copy(i){return this[0]=i[0],this[1]=i[1],this[2]=i[2],this[3]=i[3],this[4]=i[4],this[5]=i[5],this[6]=i[6],this[7]=i[7],this[8]=i[8],this.check()}identity(){return this.copy(tIt)}fromObject(i){return this.check()}fromQuaternion(i){return eIt(this,i),this.check()}set(i,e,t,o,n,r,a,s,l){return this[0]=i,this[1]=e,this[2]=t,this[3]=o,this[4]=n,this[5]=r,this[6]=a,this[7]=s,this[8]=l,this.check()}setRowMajor(i,e,t,o,n,r,a,s,l){return this[0]=i,this[1]=o,this[2]=a,this[3]=e,this[4]=n,this[5]=s,this[6]=t,this[7]=r,this[8]=l,this.check()}determinant(){return YPt(this)}transpose(){return ZPt(this,this),this.check()}invert(){return WPt(this,this),this.check()}multiplyLeft(i){return XZ(this,i,this),this.check()}multiplyRight(i){return XZ(this,this,i),this.check()}rotate(i){return $Pt(this,this,i),this.check()}scale(i){return Array.isArray(i)?$Z(this,this,i):$Z(this,this,[i,i]),this.check()}translate(i){return XPt(this,this,i),this.check()}transform(i,e){let t;switch(i.length){case 2:t=DPt(e||[-0,-0],i,this);break;case 3:t=YZ(e||[-0,-0,-0],i,this);break;case 4:t=OPt(e||[-0,-0,-0,-0],i,this);break;default:throw new Error("Illegal vector")}return TPt(t,i.length),t}transformVector(i,e){return this.transform(i,e)}transformVector2(i,e){return this.transform(i,e)}transformVector3(i,e){return this.transform(i,e)}},e7,t7=null;function iIt(){return e7||(e7=new Dv([0,0,0,0,0,0,0,0,0]),Object.freeze(e7)),e7}function oIt(){return t7||(t7=new Dv,Object.freeze(t7)),t7}const i7="KHR_texture_transform",rIt=i7,o7=new KPt,nIt=new Dv,aIt=new Dv;async function sIt(i,e){if(!new gr(i).hasExtension(i7)||!e.gltf?.loadBuffers)return;const t=i.json.materials||[];for(let o=0;o<t.length;o++)lIt(o,i)}function lIt(i,e){const t=e.json.materials?.[i],o=[t?.pbrMetallicRoughness?.baseColorTexture,t?.emissiveTexture,t?.normalTexture,t?.occlusionTexture,t?.pbrMetallicRoughness?.metallicRoughnessTexture],n=[];for(const r of o)r&&r?.extensions?.[i7]&&cIt(e,i,r,n)}function cIt(i,e,t,o){const n=dIt(t,o);if(!n)return;const r=i.json.meshes||[];for(const a of r)for(const s of a.primitives){const l=s.material;Number.isFinite(l)&&e===l&&uIt(i,s,n)}}function dIt(i,e){const t=i.extensions?.[i7],{texCoord:o=0}=i,{texCoord:n=o}=t;if(e.findIndex(([r,a])=>r===o&&a===n)===-1){const r=fIt(t);return o!==n&&(i.texCoord=n),e.push([o,n]),{originalTexCoord:o,texCoord:n,matrix:r}}return null}function uIt(i,e,t){const{originalTexCoord:o,texCoord:n,matrix:r}=t,a=e.attributes[`TEXCOORD_${o}`];if(Number.isFinite(a)){const s=i.json.accessors?.[a];if(s&&s.bufferView){const l=i.json.bufferViews?.[s.bufferView];if(l){const{arrayBuffer:c,byteOffset:d}=i.buffers[l.buffer],u=(d||0)+(s.byteOffset||0)+(l.byteOffset||0),{ArrayType:h,length:p}=PE(s,l),A=xZ[s.componentType],f=CZ[s.type],m=l.byteStride||A*f,g=new Float32Array(p);for(let y=0;y<s.count;y++){const v=new h(c,u+y*m,2);o7.set(v[0],v[1],1),o7.transformByMatrix3(r),g.set([o7[0],o7[1]],y*f)}o===n?hIt(s,l,i.buffers,g):pIt(n,s,e,i,g)}}}}function hIt(i,e,t,o){i.componentType=5126,t.push({arrayBuffer:o.buffer,byteOffset:0,byteLength:o.buffer.byteLength}),e.buffer=t.length-1,e.byteLength=o.buffer.byteLength,e.byteOffset=0,delete e.byteStride}function pIt(i,e,t,o,n){o.buffers.push({arrayBuffer:n.buffer,byteOffset:0,byteLength:n.buffer.byteLength});const r=o.json.bufferViews;if(!r)return;r.push({buffer:o.buffers.length-1,byteLength:n.buffer.byteLength,byteOffset:0});const a=o.json.accessors;a&&(a.push({bufferView:r?.length-1,byteOffset:0,componentType:5126,count:e.count,type:"VEC2"}),t.attributes[`TEXCOORD_${i}`]=a.length-1)}function fIt(i){const{offset:e=[0,0],rotation:t=0,scale:o=[1,1]}=i,n=new Dv().set(1,0,0,0,1,0,e[0],e[1],1),r=nIt.set(Math.cos(t),Math.sin(t),0,-Math.sin(t),Math.cos(t),0,0,0,1),a=aIt.set(o[0],0,0,0,o[1],0,0,0,1);return n.multiplyRight(r).multiplyRight(a)}const AIt=Object.freeze(Object.defineProperty({__proto__:null,decode:sIt,name:rIt},Symbol.toStringTag,{value:"Module"})),Tu="KHR_lights_punctual",gIt=Tu;async function mIt(i){const e=new gr(i),{json:t}=e,o=e.getExtension(Tu);o&&(e.json.lights=o.lights,e.removeExtension(Tu));for(const n of t.nodes||[]){const r=e.getObjectExtension(n,Tu);r&&(n.light=r.light),e.removeObjectExtension(n,Tu)}}async function vIt(i){const e=new gr(i),{json:t}=e;if(t.lights){const o=e.addExtension(Tu);Yn(!o.lights),o.lights=t.lights,delete t.lights}if(e.json.lights){for(const o of e.json.lights){const n=o.node;e.addObjectExtension(n,Tu,o)}delete e.json.lights}}const yIt=Object.freeze(Object.defineProperty({__proto__:null,decode:mIt,encode:vIt,name:gIt},Symbol.toStringTag,{value:"Module"})),_v="KHR_materials_unlit",bIt=_v;async function wIt(i){const e=new gr(i),{json:t}=e;for(const o of t.materials||[])o.extensions&&o.extensions.KHR_materials_unlit&&(o.unlit=!0),e.removeObjectExtension(o,_v);e.removeExtension(_v)}function CIt(i){const e=new gr(i),{json:t}=e;if(e.materials)for(const o of t.materials||[])o.unlit&&(delete o.unlit,e.addObjectExtension(o,_v,{}),e.addExtension(_v))}const xIt=Object.freeze(Object.defineProperty({__proto__:null,decode:wIt,encode:CIt,name:bIt},Symbol.toStringTag,{value:"Module"})),Fv="KHR_techniques_webgl",kIt=Fv;async function MIt(i){const e=new gr(i),{json:t}=e,o=e.getExtension(Fv);if(o){const n=EIt(o,e);for(const r of t.materials||[]){const a=e.getObjectExtension(r,Fv);a&&(r.technique=Object.assign({},a,n[a.technique]),r.technique.values=PIt(r.technique,e)),e.removeObjectExtension(r,Fv)}e.removeExtension(Fv)}}async function BIt(i,e){}function EIt(i,e){const{programs:t=[],shaders:o=[],techniques:n=[]}=i,r=new TextDecoder;return o.forEach(a=>{if(Number.isFinite(a.bufferView))a.code=r.decode(e.getTypedArrayForBufferView(a.bufferView));else throw new Error("KHR_techniques_webgl: no shader code")}),t.forEach(a=>{a.fragmentShader=o[a.fragmentShader],a.vertexShader=o[a.vertexShader]}),n.forEach(a=>{a.program=t[a.program]}),n}function PIt(i,e){const t=Object.assign({},i.values);return Object.keys(i.uniforms||{}).forEach(o=>{i.uniforms[o].value&&!(o in t)&&(t[o]=i.uniforms[o].value)}),Object.keys(t).forEach(o=>{typeof t[o]=="object"&&t[o].index!==void 0&&(t[o].texture=e.getTexture(t[o].index))}),t}const IIt=Object.freeze(Object.defineProperty({__proto__:null,decode:MIt,encode:BIt,name:kIt},Symbol.toStringTag,{value:"Module"})),eW=[VBt,hBt,GEt,ZEt,XEt,BPt,yIt,xIt,IIt,AIt,rEt];function SIt(i,e={},t){const o=eW.filter(n=>tW(n.name,e));for(const n of o)n.preprocess?.(i,e,t)}async function TIt(i,e={},t){const o=eW.filter(n=>tW(n.name,e));for(const n of o)await n.decode?.(i,e,t)}function tW(i,e){const t=e?.gltf?.excludeExtensions||{};return!(i in t&&!t[i])}const qE="KHR_binary_glTF";function RIt(i){const e=new gr(i),{json:t}=e;for(const o of t.images||[]){const n=e.getObjectExtension(o,qE);n&&Object.assign(o,n),e.removeObjectExtension(o,qE)}t.buffers&&t.buffers[0]&&delete t.buffers[0].uri,e.removeExtension(qE)}const iW={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},LIt={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class DIt{idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}};json;normalize(e,t){this.json=e.json;const o=e.json;switch(o.asset&&o.asset.version){case"2.0":return;case void 0:case"1.0":break;default:console.warn(`glTF: Unknown version ${o.asset.version}`);return}if(!t.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(o),this._convertTopLevelObjectsToArrays(o),RIt(e),this._convertObjectIdsToArrayIndices(o),this._updateObjects(o),this._updateMaterial(o)}_addAsset(e){e.asset=e.asset||{},e.asset.version="2.0",e.asset.generator=e.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(e){for(const t in iW)this._convertTopLevelObjectToArray(e,t)}_convertTopLevelObjectToArray(e,t){const o=e[t];if(!(!o||Array.isArray(o))){e[t]=[];for(const n in o){const r=o[n];r.id=r.id||n;const a=e[t].length;e[t].push(r),this.idToIndexMap[t][n]=a}}}_convertObjectIdsToArrayIndices(e){for(const t in iW)this._convertIdsToIndices(e,t);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));for(const t of e.textures)this._convertTextureIds(t);for(const t of e.meshes)this._convertMeshIds(t);for(const t of e.nodes)this._convertNodeIds(t);for(const t of e.scenes)this._convertSceneIds(t)}_convertTextureIds(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}_convertMeshIds(e){for(const t of e.primitives){const{attributes:o,indices:n,material:r}=t;for(const a in o)o[a]=this._convertIdToIndex(o[a],"accessor");n&&(t.indices=this._convertIdToIndex(n,"accessor")),r&&(t.material=this._convertIdToIndex(r,"material"))}}_convertNodeIds(e){e.children&&(e.children=e.children.map(t=>this._convertIdToIndex(t,"node"))),e.meshes&&(e.meshes=e.meshes.map(t=>this._convertIdToIndex(t,"mesh")))}_convertSceneIds(e){e.nodes&&(e.nodes=e.nodes.map(t=>this._convertIdToIndex(t,"node")))}_convertIdsToIndices(e,t){e[t]||(console.warn(`gltf v1: json doesn't contain attribute ${t}`),e[t]=[]);for(const o of e[t])for(const n in o){const r=o[n],a=this._convertIdToIndex(r,n);o[n]=a}}_convertIdToIndex(e,t){const o=LIt[t];if(o in this.idToIndexMap){const n=this.idToIndexMap[o][e];if(!Number.isFinite(n))throw new Error(`gltf v1: failed to resolve ${t} with id ${e}`);return n}return e}_updateObjects(e){for(const t of this.json.buffers)delete t.type}_updateMaterial(e){for(const t of e.materials){t.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const o=t.values?.tex||t.values?.texture2d_0||t.values?.diffuseTex,n=e.textures.findIndex(r=>r.id===o);n!==-1&&(t.pbrMetallicRoughness.baseColorTexture={index:n})}}}function _It(i,e={}){return new DIt().normalize(i,e)}async function FIt(i,e,t=0,o,n){return OIt(i,e,t,o),_It(i,{normalize:o?.gltf?.normalize}),SIt(i,o,n),o?.gltf?.loadBuffers&&i.json.buffers&&await UIt(i,o,n),o?.gltf?.loadImages&&await NIt(i,o,n),await TIt(i,o,n),i}function OIt(i,e,t,o){if(o.uri&&(i.baseUri=o.uri),e instanceof ArrayBuffer&&!EEt(e,t,o)&&(e=new TextDecoder().decode(e)),typeof e=="string")i.json=Zxt(e);else if(e instanceof ArrayBuffer){const a={};t=PEt(a,e,t,o.glb),Yn(a.type==="glTF",`Invalid GLB magic string ${a.type}`),i._glb=a,i.json=a.json}else Yn(!1,"GLTF: must be ArrayBuffer or string");const n=i.json.buffers||[];if(i.buffers=new Array(n.length).fill(null),i._glb&&i._glb.header.hasBinChunk){const{binChunks:a}=i._glb;i.buffers[0]={arrayBuffer:a[0].arrayBuffer,byteOffset:a[0].byteOffset,byteLength:a[0].byteLength}}const r=i.json.images||[];i.images=new Array(r.length).fill({})}async function UIt(i,e,t){const o=i.json.buffers||[];for(let n=0;n<o.length;++n){const r=o[n];if(r.uri){const{fetch:a}=t;Yn(a);const s=HZ(r.uri,e),l=await(await t?.fetch?.(s))?.arrayBuffer?.();i.buffers[n]={arrayBuffer:l,byteOffset:0,byteLength:l.byteLength},delete r.uri}else i.buffers[n]===null&&(i.buffers[n]={arrayBuffer:new ArrayBuffer(r.byteLength),byteOffset:0,byteLength:r.byteLength})}}async function NIt(i,e,t){const o=jIt(i),n=i.json.images||[],r=[];for(const a of o)r.push(VIt(i,n[a],a,e,t));return await Promise.all(r)}function jIt(i){const e=new Set,t=i.json.textures||[];for(const o of t)o.source!==void 0&&e.add(o.source);return Array.from(e).sort()}async function VIt(i,e,t,o,n){let r;if(e.uri&&!e.hasOwnProperty("bufferView")){const s=HZ(e.uri,o),{fetch:l}=n;r=await(await l(s)).arrayBuffer(),e.bufferView={data:r}}if(Number.isFinite(e.bufferView)){const s=YMt(i.json,i.buffers,e.bufferView);r=GJ(s.buffer,s.byteOffset,s.byteLength)}Yn(r,"glTF image has no data");let a=await IJ(r,[VMt,bEt],{...o,mimeType:e.mimeType,basis:o.basis||{format:jZ()}},n);a&&a[0]&&(a={compressed:!0,mipmaps:!1,width:a[0].width,height:a[0].height,data:a[0]}),i.images=i.images||[],i.images[t]=a}const QE={dataType:null,batchType:null,name:"glTF",id:"gltf",module:"gltf",version:nEt,extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:HIt,options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0},log:console}};async function HIt(i,e={},t){e={...QE.options,...e},e.gltf={...QE.options.gltf,...e.gltf};const{byteOffset:o=0}=e;return await FIt({},i,o,e,t)}const zIt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},qIt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Ca={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},QIt={magFilter:Ca.TEXTURE_MAG_FILTER,minFilter:Ca.TEXTURE_MIN_FILTER,wrapS:Ca.TEXTURE_WRAP_S,wrapT:Ca.TEXTURE_WRAP_T},GIt={[Ca.TEXTURE_MAG_FILTER]:Ca.LINEAR,[Ca.TEXTURE_MIN_FILTER]:Ca.NEAREST_MIPMAP_LINEAR,[Ca.TEXTURE_WRAP_S]:Ca.REPEAT,[Ca.TEXTURE_WRAP_T]:Ca.REPEAT};function KIt(){return{id:"default-sampler",parameters:GIt}}function JIt(i){return qIt[i]}function ZIt(i){return zIt[i]}class WIt{baseUri="";jsonUnprocessed;json;buffers=[];images=[];postProcess(e,t={}){const{json:o,buffers:n=[],images:r=[]}=e,{baseUri:a=""}=e;return Yn(o),this.baseUri=a,this.buffers=n,this.images=r,this.jsonUnprocessed=o,this.json=this._resolveTree(e.json,t),this.json}_resolveTree(e,t={}){const o={...e};return this.json=o,e.bufferViews&&(o.bufferViews=e.bufferViews.map((n,r)=>this._resolveBufferView(n,r))),e.images&&(o.images=e.images.map((n,r)=>this._resolveImage(n,r))),e.samplers&&(o.samplers=e.samplers.map((n,r)=>this._resolveSampler(n,r))),e.textures&&(o.textures=e.textures.map((n,r)=>this._resolveTexture(n,r))),e.accessors&&(o.accessors=e.accessors.map((n,r)=>this._resolveAccessor(n,r))),e.materials&&(o.materials=e.materials.map((n,r)=>this._resolveMaterial(n,r))),e.meshes&&(o.meshes=e.meshes.map((n,r)=>this._resolveMesh(n,r))),e.nodes&&(o.nodes=e.nodes.map((n,r)=>this._resolveNode(n,r)),o.nodes=o.nodes.map((n,r)=>this._resolveNodeChildren(n))),e.skins&&(o.skins=e.skins.map((n,r)=>this._resolveSkin(n,r))),e.scenes&&(o.scenes=e.scenes.map((n,r)=>this._resolveScene(n,r))),typeof this.json.scene=="number"&&o.scenes&&(o.scene=o.scenes[this.json.scene]),o}getScene(e){return this._get(this.json.scenes,e)}getNode(e){return this._get(this.json.nodes,e)}getSkin(e){return this._get(this.json.skins,e)}getMesh(e){return this._get(this.json.meshes,e)}getMaterial(e){return this._get(this.json.materials,e)}getAccessor(e){return this._get(this.json.accessors,e)}getCamera(e){return this._get(this.json.cameras,e)}getTexture(e){return this._get(this.json.textures,e)}getSampler(e){return this._get(this.json.samplers,e)}getImage(e){return this._get(this.json.images,e)}getBufferView(e){return this._get(this.json.bufferViews,e)}getBuffer(e){return this._get(this.json.buffers,e)}_get(e,t){if(typeof t=="object")return t;const o=e&&e[t];return o||console.warn(`glTF file error: Could not find ${e}[${t}]`),o}_resolveScene(e,t){return{...e,id:e.id||`scene-${t}`,nodes:(e.nodes||[]).map(o=>this.getNode(o))}}_resolveNode(e,t){const o={...e,id:e?.id||`node-${t}`};return e.mesh!==void 0&&(o.mesh=this.getMesh(e.mesh)),e.camera!==void 0&&(o.camera=this.getCamera(e.camera)),e.skin!==void 0&&(o.skin=this.getSkin(e.skin)),e.meshes!==void 0&&e.meshes.length&&(o.mesh=e.meshes.reduce((n,r)=>{const a=this.getMesh(r);return n.id=a.id,n.primitives=n.primitives.concat(a.primitives),n},{primitives:[]})),o}_resolveNodeChildren(e){return e.children&&(e.children=e.children.map(t=>this.getNode(t))),e}_resolveSkin(e,t){const o=typeof e.inverseBindMatrices=="number"?this.getAccessor(e.inverseBindMatrices):void 0;return{...e,id:e.id||`skin-${t}`,inverseBindMatrices:o}}_resolveMesh(e,t){const o={...e,id:e.id||`mesh-${t}`,primitives:[]};return e.primitives&&(o.primitives=e.primitives.map(n=>{const r={...n,attributes:{},indices:void 0,material:void 0},a=n.attributes;for(const s in a)r.attributes[s]=this.getAccessor(a[s]);return n.indices!==void 0&&(r.indices=this.getAccessor(n.indices)),n.material!==void 0&&(r.material=this.getMaterial(n.material)),r})),o}_resolveMaterial(e,t){const o={...e,id:e.id||`material-${t}`};if(o.normalTexture&&(o.normalTexture={...o.normalTexture},o.normalTexture.texture=this.getTexture(o.normalTexture.index)),o.occlusionTexture&&(o.occlusionTexture={...o.occlusionTexture},o.occlusionTexture.texture=this.getTexture(o.occlusionTexture.index)),o.emissiveTexture&&(o.emissiveTexture={...o.emissiveTexture},o.emissiveTexture.texture=this.getTexture(o.emissiveTexture.index)),o.emissiveFactor||(o.emissiveFactor=o.emissiveTexture?[1,1,1]:[0,0,0]),o.pbrMetallicRoughness){o.pbrMetallicRoughness={...o.pbrMetallicRoughness};const n=o.pbrMetallicRoughness;n.baseColorTexture&&(n.baseColorTexture={...n.baseColorTexture},n.baseColorTexture.texture=this.getTexture(n.baseColorTexture.index)),n.metallicRoughnessTexture&&(n.metallicRoughnessTexture={...n.metallicRoughnessTexture},n.metallicRoughnessTexture.texture=this.getTexture(n.metallicRoughnessTexture.index))}return o}_resolveAccessor(e,t){const o=JIt(e.componentType),n=ZIt(e.type),r=o*n,a={...e,id:e.id||`accessor-${t}`,bytesPerComponent:o,components:n,bytesPerElement:r,value:void 0,bufferView:void 0,sparse:void 0};if(e.bufferView!==void 0&&(a.bufferView=this.getBufferView(e.bufferView)),a.bufferView){const s=a.bufferView.buffer,{ArrayType:l,byteLength:c}=PE(a,a.bufferView),d=(a.bufferView.byteOffset||0)+(a.byteOffset||0)+s.byteOffset;let u=s.arrayBuffer.slice(d,d+c);a.bufferView.byteStride&&(u=this._getValueFromInterleavedBuffer(s,d,a.bufferView.byteStride,a.bytesPerElement,a.count)),a.value=new l(u)}return a}_getValueFromInterleavedBuffer(e,t,o,n,r){const a=new Uint8Array(r*n);for(let s=0;s<r;s++){const l=t+s*o;a.set(new Uint8Array(e.arrayBuffer.slice(l,l+n)),s*n)}return a.buffer}_resolveTexture(e,t){return{...e,id:e.id||`texture-${t}`,sampler:typeof e.sampler=="number"?this.getSampler(e.sampler):KIt(),source:typeof e.source=="number"?this.getImage(e.source):void 0}}_resolveSampler(e,t){const o={id:e.id||`sampler-${t}`,...e,parameters:{}};for(const n in o){const r=this._enumSamplerParameter(n);r!==void 0&&(o.parameters[r]=o[n])}return o}_enumSamplerParameter(e){return QIt[e]}_resolveImage(e,t){const o={...e,id:e.id||`image-${t}`,image:null,bufferView:e.bufferView!==void 0?this.getBufferView(e.bufferView):void 0},n=this.images[t];return n&&(o.image=n),o}_resolveBufferView(e,t){const o=e.buffer,n=this.buffers[o].arrayBuffer;let r=this.buffers[o].byteOffset||0;return e.byteOffset&&(r+=e.byteOffset),{id:`bufferView-${t}`,...e,buffer:this.buffers[o],data:new Uint8Array(n,r,e.byteLength)}}_resolveCamera(e,t){const o={...e,id:e.id||`camera-${t}`};return o.perspective,o.orthographic,o}}function YIt(i,e){return new WIt().postProcess(i,e)}class XIt{constructor(e){}load(e,t,o,n,r,a,s){n=n||{},$It(e,t,o,n,r,function(){no.scheduleTask(function(){r.scene.fire("modelLoaded",r.id),r.fire("loaded",!0,!1)}),a&&a()},function(l){e.error(l),s&&s(l),r.fire("error",l)})}parse(e,t,o,n,r,a,s){n=n||{},GE(e,"",t,o,n,r,function(){r.scene.fire("modelLoaded",r.id),r.fire("loaded",!0,!1),a&&a()},function(l){r.error(l),r.fire("error",l),s&&s(l)})}}function $It(i,e,t,o,n,r,a){const s=i.viewer.scene.canvas.spinner;s.processes++,e.split(".").pop()==="glb"?i.dataSource.getGLB(e,l=>{o.basePath=oW(e),GE(i,e,l,t,o,n,r,a),s.processes--},l=>{s.processes--,a(l)}):i.dataSource.getGLTF(e,l=>{o.basePath=oW(e),GE(i,e,l,t,o,n,r,a),s.processes--},l=>{s.processes--,a(l)})}function oW(i){const e=i.lastIndexOf("/");return e!==0?i.substring(0,e+1):""}function GE(i,e,t,o,n,r,a,s){const l=i.viewer.scene.canvas.spinner;l.processes++,wE(t,QE,{baseUri:n.basePath}).then(c=>{const d=YIt(c),u={entityId:n.entityId,autoMetaModel:n.autoMetaModel,globalizeObjectIds:n.globalizeObjectIds,metaObjects:[],loadBuffer:n.loadBuffer,basePath:n.basePath,handlenode:n.handlenode,backfaces:!!n.backfaces,gltfData:d,scene:r.scene,plugin:i,sceneModel:r,numObjects:0,nextId:0};eSt(u),iSt(u),n.autoMetaModel&&u.metaObjects.push({id:r.id,type:"Default",name:r.id}),nSt(u),r.finalize(),n.autoMetaModel&&i.viewer.metaScene.createMetaModel(r.id,{metaObjects:u.metaObjects}),l.processes--,a()}).catch(c=>{s&&s(c)})}function eSt(i){const e=i.gltfData.textures;if(e)for(let t=0,o=e.length;t<o;t++)tSt(i,e[t])}function tSt(i,e){if(!e.source||!e.source.image)return;const t=`texture-${i.nextId++}`;let o=bp;switch(e.sampler.minFilter){case 9728:o=wu;break;case 9729:o=Gr;break;case 9984:o=Km;break;case 9985:o=Jm;break;case 9986:o=bp;break;case 9987:o=wp;break}let n=Gr;switch(e.sampler.magFilter){case 9728:n=wu;break;case 9729:n=Gr;break}let r=mo;switch(e.sampler.wrapS){case 33071:r=Qr;break;case 33648:r=Dl;break;case 10497:r=mo;break}let a=mo;switch(e.sampler.wrapT){case 33071:a=Qr;break;case 33648:a=Dl;break;case 10497:a=mo;break}let s=mo;switch(e.sampler.wrapR){case 33071:s=Qr;break;case 33648:s=Dl;break;case 10497:s=mo;break}i.sceneModel.createTexture({id:t,image:e.source.image,flipY:!!e.flipY,minFilter:o,magFilter:n,wrapS:r,wrapT:a,wrapR:s,encoding:ao}),e._textureId=t}function iSt(i){const e=i.gltfData.materials;if(e)for(let t=0,o=e.length;t<o;t++){const n=e[t];n._textureSetId=oSt(i,n),n._attributes=rSt(i,n)}}function oSt(i,e){const t={};switch(e.normalTexture&&(t.normalTextureId=e.normalTexture.texture._textureId),e.occlusionTexture&&(t.occlusionTextureId=e.occlusionTexture.texture._textureId),e.emissiveTexture&&(t.emissiveTextureId=e.emissiveTexture.texture._textureId),e.alphaMode){case"OPAQUE":break;case"MASK":const r=e.alphaCutoff;t.alphaCutoff=r!==void 0?r:.5;break}const o=e.pbrMetallicRoughness;if(e.pbrMetallicRoughness){const r=e.pbrMetallicRoughness,a=r.baseColorTexture||r.colorTexture;a&&(a.texture?t.colorTextureId=a.texture._textureId:t.colorTextureId=i.gltfData.textures[a.index]._textureId),o.metallicRoughnessTexture&&(t.metallicRoughnessTextureId=o.metallicRoughnessTexture.texture._textureId)}const n=e.extensions;if(n){const r=n.KHR_materials_pbrSpecularGlossiness;if(r){r.specularTexture;const a=r.specularColorTexture;a!=null&&(t.colorTextureId=i.gltfData.textures[a.index]._textureId)}}return t.normalTextureId!==void 0||t.occlusionTextureId!==void 0||t.emissiveTextureId!==void 0||t.colorTextureId!==void 0||t.metallicRoughnessTextureId!==void 0?(t.id=`textureSet-${i.nextId++};`,i.sceneModel.createTextureSet(t),t.id):null}function rSt(i,e){const t=e.extensions,o={color:new Float32Array([1,1,1,1]),opacity:1,metallic:0,roughness:1,doubleSided:!0};if(t){const r=t.KHR_materials_pbrSpecularGlossiness;if(r){const s=r.diffuseFactor;s!=null&&o.color.set(s)}const a=t.KHR_materials_common;if(a){const s=a.technique,l=a.values||{},c=s==="BLINN",d=s==="PHONG",u=s==="LAMBERT",h=l.diffuse;h&&(c||d||u)&&(mt.isString(h)||o.color.set(h));const p=l.transparency;p!=null&&(o.opacity=p);const A=l.transparent;A!=null&&(o.opacity=A)}}const n=e.pbrMetallicRoughness;if(n){const r=n.baseColorFactor;r&&(o.color[0]=r[0],o.color[1]=r[1],o.color[2]=r[2],o.opacity=r[3]);const a=n.metallicFactor;a!=null&&(o.metallic=a);const s=n.roughnessFactor;s!=null&&(o.roughness=s)}return o.doubleSided=e.doubleSided!==!1,o}function nSt(i){const e=i.gltfData,t=e.scene||e.scenes[0];if(!t){lSt(i,"glTF has no default scene");return}const o=t.nodes;if(!o)return;(function a(s){s.forEach(l=>{const c=l.mesh;c&&(c.instances||=0,c.instances+=1),l.children&&a(l.children)})})(o);const n=[];let r=null;(function a(s,l,c){s.forEach(d=>{const u=d.name;let h=u!=null&&u||l===0&&"entity-"+i.nextId++;if(h){for(;i.sceneModel.objects[h];)h="entity-"+i.nextId++;n.push(r),r=[]}const p=aSt(d,c);if(d.mesh&&sSt(d,i,p,r),d.children&&a(d.children,l+1,p),h){if(r.length>0){const A=i.globalizeObjectIds?C.globalizeObjectId(i.sceneModel.id,h):h;i.sceneModel.createEntity({id:A,meshIds:r,isObject:!0}),i.autoMetaModel&&i.metaObjects.push({id:A,type:"Default",name:A,parent:i.sceneModel.id})}r=n.pop()}})})(o,0,null)}function aSt(i,e){let t;return i.matrix&&(t=i.matrix,e?e=C.mulMat4(e,t,C.mat4()):e=t),i.translation&&(t=C.translationMat4v(i.translation),e?e=C.mulMat4(e,t,C.mat4()):e=t),i.rotation&&(t=C.quaternionToMat4(i.rotation),e?e=C.mulMat4(e,t,C.mat4()):e=t),i.scale&&(t=C.scalingMat4v(i.scale),e?e=C.mulMat4(e,t,C.mat4()):e=t),e}function sSt(i,e,t,o){const n=i.mesh;if(!n)return;const r=n.primitives.length;if(r>0)for(let a=0;a<r;a++){const s=n.primitives[a];if(s.mode<4)continue;const l={id:e.sceneModel.id+"."+e.numObjects++},c=s.material;c?(l.textureSetId=c._textureSetId,l.color=c._attributes.color,l.opacity=c._attributes.opacity,l.metallic=c._attributes.metallic,l.roughness=c._attributes.roughness):(l.color=new Float32Array([1,1,1]),l.opacity=1);const d=e.backfaces!==!1||c&&c.doubleSided!==!1;switch(s.mode){case 0:l.primitive="points";break;case 1:l.primitive="lines";break;case 2:l.primitive="lines";break;case 3:l.primitive="lines";break;case 4:l.primitive=d?"triangles":"solid";break;case 5:l.primitive=d?"triangles":"solid";break;case 6:l.primitive=d?"triangles":"solid";break;default:l.primitive=d?"triangles":"solid"}const u=s.attributes.POSITION;if(!u)continue;l.localPositions=u.value,l.positions=new Float64Array(l.localPositions.length),s.attributes.NORMAL&&(l.normals=s.attributes.NORMAL.value),s.attributes.TEXCOORD_0&&(l.uv=s.attributes.TEXCOORD_0.value),s.indices&&(l.indices=s.indices.value),t?C.transformPositions3(t,l.localPositions,l.positions):l.positions.set(l.localPositions);const h=C.vec3();T8(l.positions,l.positions,h)&&(l.origin=h),e.sceneModel.createMesh(l),o.push(l.id)}}function lSt(i,e){i.plugin.error(e)}const rW={DEFAULT:{}};class KE extends va{constructor(e,t={}){super("GLTFLoader",e,t),this._sceneModelLoader=new XIt(this,t),this.dataSource=t.dataSource,this.objectDefaults=t.objectDefaults}set dataSource(e){this._dataSource=e||new PJ}get dataSource(){return this._dataSource}set objectDefaults(e){this._objectDefaults=e||rW}get objectDefaults(){return this._objectDefaults}load(e={}){e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id);const t=new gv(this.viewer.scene,mt.apply(e,{isModel:!0,dtxEnabled:e.dtxEnabled})),o=t.id;if(!e.src&&!e.gltf)return this.error("load() param expected: src or gltf"),t;if(e.metaModelSrc||e.metaModelJSON){const n=r=>{this.viewer.metaScene.createMetaModel(o,r,{}),this.viewer.scene.canvas.spinner.processes--,e.src?this._sceneModelLoader.load(this,e.src,r,e,t):this._sceneModelLoader.parse(this,e.gltf,r,e,t)};if(e.metaModelSrc){const r=e.metaModelSrc;this.viewer.scene.canvas.spinner.processes++,this._dataSource.getMetaModel(r,a=>{this.viewer.scene.canvas.spinner.processes--,n(a)},a=>{this.error(`load(): Failed to load model metadata for model '${o} from '${r}' - ${a}`),this.viewer.scene.canvas.spinner.processes--})}else e.metaModelJSON&&n(e.metaModelJSON)}else e.src?this._sceneModelLoader.load(this,e.src,null,e,t):this._sceneModelLoader.parse(this,e.gltf,null,e,t);return t.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(o)}),t}destroy(){super.destroy()}}function cSt(i,e,t={}){const o="lightgrey",n=t.hoverColor||"rgba(0,0,0,0.4)",r=t.textColor||"black",a=t.canvasElement||document.body,s=500,l=s+s/3,c=l/24,d=[{boundary:[6,6,6,6],color:t.frontColor||t.color||"#55FF55"},{boundary:[18,6,6,6],color:t.backColor||t.color||"#55FF55"},{boundary:[12,6,6,6],color:t.rightColor||t.color||"#FF5555"},{boundary:[0,6,6,6],color:t.leftColor||t.color||"#FF5555"},{boundary:[6,0,6,6],color:t.topColor||t.color||"#7777FF"},{boundary:[6,12,6,6],color:t.bottomColor||t.color||"#7777FF"}],u=[{label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,1,0],up:[0,0,1]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,-1,0],up:[0,0,1]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,0,1]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,0,1]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,0,1],up:[0,-1,0]},{boundaries:[[7,5,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,0,-1],up:[1,0,1]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-1,-1],up:[0,-1,1]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,0,-1],up:[-1,0,1]},{boundaries:[[7,11,4,2]],dir:[0,1,1],up:[0,-1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,0,1],up:[-1,0,1]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,-1,1],up:[0,1,1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,0,1],up:[1,0,1]},{boundaries:[[5,7,2,4]],dir:[1,1,0],up:[0,0,1]},{boundaries:[[11,7,2,4]],dir:[-1,1,0],up:[0,0,1]},{boundaries:[[17,7,2,4]],dir:[-1,-1,0],up:[0,0,1]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,-1,0],up:[0,0,1]},{boundaries:[[5,11,2,2]],dir:[1,1,1],up:[-1,-1,1]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[1,-1,1],up:[-1,1,1]},{boundaries:[[5,5,2,2]],dir:[1,1,-1],up:[1,1,1]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-1,-1,1],up:[1,1,1]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-1,-1,-1],up:[-1,-1,1]},{boundaries:[[11,11,2,2]],dir:[-1,1,1],up:[1,-1,1]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[1,-1,-1],up:[1,-1,1]},{boundaries:[[11,5,2,2]],dir:[-1,1,-1],up:[-1,1,1]}];t.frontColor||t.color,t.backColor||t.color,t.rightColor||t.color,t.leftColor||t.color,t.topColor||t.color,t.bottomColor||t.color;const h=[{yUp:"",label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,0,1],up:[0,1,0]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,1,0]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,1,0]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,-1,0],up:[0,0,-1]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,1,0],up:[0,0,1]},{boundaries:[[7,5,4,2]],dir:[0,-.7071,-.7071],up:[0,.7071,-.7071]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,-1,0],up:[1,1,0]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-.7071,.7071],up:[0,.7071,.7071]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,-1,0],up:[-1,1,0]},{boundaries:[[7,11,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,1,0],up:[-1,1,0]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,1,1],up:[0,1,-1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,1,0],up:[1,1,0]},{boundaries:[[5,7,2,4]],dir:[1,0,-1],up:[0,1,0]},{boundaries:[[11,7,2,4]],dir:[-1,0,-1],up:[0,1,0]},{boundaries:[[17,7,2,4]],dir:[-1,0,1],up:[0,1,0]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,0,1],up:[0,1,0]},{boundaries:[[5,11,2,2]],dir:[.5,.7071,-.5],up:[-.5,.7071,.5]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[.5,.7071,.5],up:[-.5,.7071,-.5]},{boundaries:[[5,5,2,2]],dir:[.5,-.7071,-.5],up:[.5,.7071,-.5]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-.5,.7071,.5],up:[.5,.7071,-.5]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-.5,-.7071,.5],up:[-.5,.7071,.5]},{boundaries:[[11,11,2,2]],dir:[-.5,.7071,-.5],up:[.5,.7071,.5]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[.5,-.7071,.5],up:[.5,.7071,.5]},{boundaries:[[11,5,2,2]],dir:[-.5,-.7071,-.5],up:[-.5,.7071,-.5]}];for(let y=0,v=u.length;y<v;y++)C.normalizeVec3(u[y].dir,u[y].dir),C.normalizeVec3(u[y].up,u[y].up);for(let y=0,v=h.length;y<v;y++)C.normalizeVec3(h[y].dir,h[y].dir),C.normalizeVec3(h[y].up,h[y].up);var p=h;this._textureCanvas=document.createElement("canvas"),this._textureCanvas.width=l,this._textureCanvas.height=s,this._textureCanvas.style.width=l+"px",this._textureCanvas.style.height=s+"px",this._textureCanvas.style.padding="0",this._textureCanvas.style.margin="0",this._textureCanvas.style.top="0",this._textureCanvas.style.background=o,this._textureCanvas.style.position="absolute",this._textureCanvas.style.opacity="1.0",this._textureCanvas.style.visibility="hidden",this._textureCanvas.style["z-index"]=2e6,a.appendChild(this._textureCanvas);const A=this._textureCanvas.getContext("2d");let f=!1;function m(){for(let k=0,B=d.length;k<B;k++){const E=d[k],P=E.boundary,R=Math.round(P[0]*c),T=Math.round(P[1]*c),L=Math.round(P[2]*c),F=Math.round(P[3]*c);A.fillStyle=E.color,A.fillRect(R,T,L,F)}for(let k=0,B=p.length;k<B;k++){let E,P,R,T;const L=p[k],F=L.boundaries;for(var y=0,v=F.length;y<v;y++){const U=F[y];E=Math.round(U[0]*c),P=Math.round(U[1]*c),R=Math.round(U[2]*c),T=Math.round(U[3]*c),L.highlighted&&(A.fillStyle=L.highlighted?n:L.color||o,A.fillRect(E,P,R,T))}if(L.label){A.fillStyle=r,A.font="60px sans-serif",A.textAlign="center";var w=E+R*.5,x=P+T*.7;A.fillText(g(L.label),w,x,80)}}e.glRedraw()}const g=(function(){const y={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},v={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},w={"NavCube.front":"FRONT","NavCube.back":"BACK","NavCube.right":"RIGHT","NavCube.left":"LEFT","NavCube.top":"TOP","NavCube.bottom":"BOTTOM"};return function(x){const k=f?v:y,B=k?k[x]:null;return B?i.localeService.translate(B)||w[B]||B:x}})();this.setZUp=function(){f=!0,p=u,this.clear()},this.setYUp=function(){f=!1,p=h,this.clear()},this.clear=function(){A.fillStyle=o,A.fillRect(0,0,l,s);for(var y=0,v=p.length;y<v;y++){const w=p[y];w.highlighted=!1}m()},this.getArea=function(y){const v=y[0]*l,w=s-y[1]*s;for(var x=0,k=p.length;x<k;x++){const P=p[x].boundaries;for(var B=0,E=P.length;B<E;B++){const R=P[B];if(v>=R[0]*c&&v<=(R[0]+R[2])*c&&w>=R[1]*c&&w<=(R[1]+R[3])*c)return x}}return-1},this.setAreaHighlighted=function(y,v){var w=p[y];if(!w)throw"Area not found: "+y;w.highlighted=!!v,m()},this.getAreaDir=function(y){var v=p[y];if(!v)throw"Unknown area: "+y;return v.dir},this.getAreaUp=function(y){var v=p[y];if(!v)throw"Unknown area: "+y;return v.up},this.getImage=function(){return this._textureCanvas},this.destroy=function(){this._textureCanvas&&(this._textureCanvas.parentNode.removeChild(this._textureCanvas),this._textureCanvas=null)}}const nW=C.vec3(),aW=C.vec3();C.mat4();class JE extends va{constructor(e,t={}){super("NavCube",e,t),e.navCube=this;try{this._navCubeScene=new my(e,{canvasId:t.canvasId,canvasElement:t.canvasElement,transparent:!0}),this._navCubeCanvas=this._navCubeScene.canvas.canvas,this._navCubeScene.input.keyboardEnabled=!1}catch(g){this.error(g);return}const o=this._navCubeScene;o.clearLights(),new Wa(o,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Wa(o,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Wa(o,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._navCubeCamera=o.camera,this._navCubeCamera.ortho.scale=7,this._navCubeCamera.ortho.near=.1,this._navCubeCamera.ortho.far=2e3,o.edgeMaterial.edgeColor=[.2,.2,.2],o.edgeMaterial.edgeAlpha=.6,this._zUp=!!e.camera.zUp;var n=this;this.setIsProjectNorth(t.isProjectNorth),this.setProjectNorthOffsetAngle(t.projectNorthOffsetAngle);const r=(function(){const g=C.mat4();return function(y,v,w){return C.identityMat4(g),C.rotationMat4v(y*n._projectNorthOffsetAngle*C.DEGTORAD,[0,1,0],g),C.transformVec3(g,v,w)}})();this._synchCamera=(function(){var g=C.rotationMat4c(-90*C.DEGTORAD,1,0,0),y=C.vec3(),v=C.vec3(),w=C.vec3();return function(){var x=e.camera.eye,k=e.camera.look,B=e.camera.up;y=C.mulVec3Scalar(C.normalizeVec3(C.subVec3(x,k,y)),5),n._isProjectNorth&&n._projectNorthOffsetAngle&&(y=r(-1,y,nW),B=r(-1,B,aW)),n._zUp?(C.transformVec3(g,y,v),C.transformVec3(g,B,w),n._navCubeCamera.look=[0,0,0],n._navCubeCamera.eye=C.transformVec3(g,y,v),n._navCubeCamera.up=C.transformPoint3(g,B,w)):(n._navCubeCamera.look=[0,0,0],n._navCubeCamera.eye=y,n._navCubeCamera.up=B)}})(),this._cubeTextureCanvas=new cSt(e,o,t),this._cubeSampler=new Cp(o,{image:this._cubeTextureCanvas.getImage(),flipY:!0,wrapS:Qr,wrapT:Qr}),this._cubeMesh=new pi(o,{geometry:new uo(o,{primitive:"triangles",normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),material:new ho(o,{diffuse:[.4,.4,.4],specular:[.4,.4,.4],emissive:[.6,.6,.6],diffuseMap:this._cubeSampler,emissiveMap:this._cubeSampler}),visible:!0,edges:!0}),this._shadow=t.shadowVisible===!1?null:new pi(o,{geometry:new uo(o,mp({center:[0,0,0],radiusTop:.001,radiusBottom:1.4,height:.01,radialSegments:20,heightSegments:1,openEnded:!0})),material:new ho(o,{diffuse:[0,0,0],specular:[0,0,0],emissive:[0,0,0],alpha:.5}),position:[0,-1.5,0],visible:!0,pickable:!1,backfaces:!1}),this._onCameraMatrix=e.camera.on("matrix",this._synchCamera),this._onCameraWorldAxis=e.camera.on("worldAxis",()=>{e.camera.zUp?(this._zUp=!0,this._cubeTextureCanvas.setZUp(),this._repaint(),this._synchCamera()):e.camera.yUp&&(this._zUp=!1,this._cubeTextureCanvas.setYUp(),this._repaint(),this._synchCamera())}),this._onCameraFOV=e.camera.perspective.on("fov",g=>{this._synchProjection&&(this._navCubeCamera.perspective.fov=g)}),this._onCameraProjection=e.camera.on("projection",g=>{this._synchProjection&&(this._navCubeCamera.projection=g==="ortho"||g==="perspective"?g:"perspective")});var a=-1;function s(g,y){var v=(g-A)*-p,w=(y-f)*-p;e.camera.orbitYaw(v),e.camera.orbitPitch(-w),A=g,f=y}function l(g){const{left:y,top:v}=n._navCubeCanvas.getBoundingClientRect();return[g.clientX-y,g.clientY-v]}{var c=null,d=null,u=!1,h=!1,p=.5,A,f;n._navCubeCanvas.addEventListener("mouseenter",n._onMouseEnter=function(g){h=!0}),n._navCubeCanvas.addEventListener("mouseleave",n._onMouseLeave=function(g){h=!1}),n._navCubeCanvas.addEventListener("mousedown",n._onMouseDown=function(g){if(g.which===1){c=g.x,d=g.y,A=g.clientX,f=g.clientY;var y=l({clientX:g.clientX,clientY:g.clientY}),v=o.pick({canvasPos:y});v?u=!0:u=!1}}),n._navCubeCanvas.addEventListener("mouseup",n._onMouseUp=function(g){if(g.which===1&&(u=!1,c!==null)){var y=l({clientX:g.clientX,clientY:g.clientY}),v=o.pick({canvasPos:y,pickSurface:!0});if(v&&v.uv){var w=n._cubeTextureCanvas.getArea(v.uv);if(w>=0&&(n._navCubeCanvas.style.cursor="pointer",a>=0&&(n._cubeTextureCanvas.setAreaHighlighted(a,!1),n._repaint(),a=-1),w>=0)){if(n._cubeTextureCanvas.setAreaHighlighted(w,!0),a=w,n._repaint(),g.x<c-3||g.x>c+3||g.y<d-3||g.y>d+3)return;var x=n._cubeTextureCanvas.getAreaDir(w);if(x){var k=n._cubeTextureCanvas.getAreaUp(w);n._isProjectNorth&&n._projectNorthOffsetAngle&&(x=r(1,x,nW),k=r(1,k,aW)),m(x,k,function(){a>=0&&(n._cubeTextureCanvas.setAreaHighlighted(a,!1),n._repaint(),a=-1),n._navCubeCanvas.style.cursor="pointer",a>=0&&(n._cubeTextureCanvas.setAreaHighlighted(a,!1),n._repaint(),a=-1),w>=0&&(n._cubeTextureCanvas.setAreaHighlighted(w,!1),a=-1,n._repaint())})}}}}}),n._navCubeCanvas.addEventListener("mousemove",n._onMouseMove=function(g){if(a>=0&&(n._cubeTextureCanvas.setAreaHighlighted(a,!1),n._repaint(),a=-1),!(g.buttons===1&&!u)){if(u){var y=g.clientX,v=g.clientY;n._navCubeCanvas.style.cursor="move",s(y,v);return}if(h){var w=l({clientX:g.clientX,clientY:g.clientY}),x=o.pick({canvasPos:w,pickSurface:!0});if(x){if(x.uv){n._navCubeCanvas.style.cursor="pointer";var k=n._cubeTextureCanvas.getArea(x.uv);if(k===a)return;a>=0&&n._cubeTextureCanvas.setAreaHighlighted(a,!1),k>=0&&(n._cubeTextureCanvas.setAreaHighlighted(k,!0),n._repaint(),a=k)}}else n._navCubeCanvas.style.cursor="default",a>=0&&(n._cubeTextureCanvas.setAreaHighlighted(a,!1),n._repaint(),a=-1)}}}),n._navCubeCanvas.addEventListener("touchstart",n._onTouchStart=function(g){if(g.touches.length>0){c=g.touches[0].clientX,d=g.touches[0].clientY,A=g.touches[0].clientX,f=g.touches[0].clientY;var y=l({clientX:g.touches[0].clientX,clientY:g.touches[0].clientY}),v=o.pick({canvasPos:y});v?u=!0:u=!1}},{passive:!1}),n._navCubeCanvas.addEventListener("touchmove",n._onTouchMove=function(g){g.preventDefault();var y=g.touches[0],v=y.clientX,w=y.clientY,x=document.elementFromPoint(v,w);if(h=n._navCubeCanvas===x,!!h&&u){s(v,w);return}},{passive:!1}),n._navCubeCanvas.addEventListener("touchend",n._onTouchEnd=function(g){u=!1});var m=(function(){var g=C.vec3();return function(y,v,w){var x=n._fitVisible?e.scene.getAABB(e.scene.visibleObjectIds):e.scene.aabb,k=C.getAABB3Diag(x);C.getAABB3Center(x,g);var B=Math.abs(k/Math.tan(n._cameraFitFOV*C.DEGTORAD));e.cameraControl.pivotPos=g,n._cameraFly?e.cameraFlight.flyTo({look:g,eye:[g[0]-B*y[0],g[1]-B*y[1],g[2]-B*y[2]],up:v||[0,1,0],orthoScale:k*1.1,fitFOV:n._cameraFitFOV,duration:n._cameraFlyDuration},w):e.cameraFlight.jumpTo({look:g,eye:[g[0]-B*y[0],g[1]-B*y[1],g[2]-B*y[2]],up:v||[0,1,0],orthoScale:k*1.1,fitFOV:n._cameraFitFOV},w)}})()}this._onUpdated=e.localeService.on("updated",()=>{this._cubeTextureCanvas.clear(),this._repaint()}),this.setVisible(t.visible),this.setCameraFitFOV(t.cameraFitFOV),this.setCameraFly(t.cameraFly),this.setCameraFlyDuration(t.cameraFlyDuration),this.setFitVisible(t.fitVisible),this.setSynchProjection(t.synchProjection)}send(e,t){switch(e){case"language":this._cubeTextureCanvas.clear(),this._repaint();break}}_repaint(){const e=this._cubeTextureCanvas.getImage();this._cubeMesh.material.diffuseMap.image=e,this._cubeMesh.material.emissiveMap.image=e}setVisible(e=!0){this._navCubeCanvas&&(this._cubeMesh.visible=e,this._shadow&&(this._shadow.visible=e),this._navCubeCanvas.style.visibility=e?"visible":"hidden")}getVisible(){return this._navCubeCanvas?this._cubeMesh.visible:!1}setFitVisible(e=!1){this._fitVisible=e}getFitVisible(){return this._fitVisible}setCameraFly(e=!0){this._cameraFly=e}getCameraFly(){return this._cameraFly}setCameraFitFOV(e=45){this._cameraFitFOV=e}getCameraFitFOV(){return this._cameraFitFOV}setCameraFlyDuration(e=.5){this._cameraFlyDuration=e}getCameraFlyDuration(){return this._cameraFlyDuration}setSynchProjection(e=!1){this._synchProjection=e}getSynchProjection(){return this._synchProjection}setIsProjectNorth(e=!1){this._isProjectNorth=e}getIsProjectNorth(){return this._isProjectNorth}setProjectNorthOffsetAngle(e){this._projectNorthOffsetAngle=e}getProjectNorthOffsetAngle(){return this._projectNorthOffsetAngle}destroy(){this._navCubeCanvas&&(this.viewer.localeService.off(this._onUpdated),this.viewer.camera.off(this._onCameraMatrix),this.viewer.camera.off(this._onCameraWorldAxis),this.viewer.camera.perspective.off(this._onCameraFOV),this.viewer.camera.off(this._onCameraProjection),this._navCubeCanvas.removeEventListener("mouseenter",this._onMouseEnter),this._navCubeCanvas.removeEventListener("mouseleave",this._onMouseLeave),this._navCubeCanvas.removeEventListener("mousedown",this._onMouseDown),this._navCubeCanvas.removeEventListener("mousemove",this._onMouseMove),this._navCubeCanvas.removeEventListener("mouseup",this._onMouseUp),this._navCubeCanvas.removeEventListener("touchstart",this._onTouchStart),this._navCubeCanvas.removeEventListener("touchmove",this._onTouchMove),this._navCubeCanvas.removeEventListener("touchend",this._onTouchEnd),this._navCubeCanvas=null,this._cubeTextureCanvas.destroy(),this._cubeTextureCanvas=null,this._onMouseEnter=null,this._onMouseLeave=null,this._onMouseDown=null,this._onMouseMove=null,this._onMouseUp=null,this._onTouchStart=null,this._onTouchMove=null,this._onTouchEnd=null),this._navCubeScene.destroy(),this._navCubeScene=null,this._cubeMesh=null,this._shadow=null,super.destroy()}}class dSt{constructor(e){const t=e.cameraControl,o=e.scene,n=o.canvas.canvas,r=!1,a=1,s=.09,l=.01,c=new Gm(o,{position:[0,0,0],scale:[5,5,5],isObject:!1}),d=C.vec3();this._setPosition=(function(){const x=C.vec3(),k=C.vec3();return function(B){d.set(B),bu(B,x,k),c.origin=x,c.position=k}})(),this._setQuaternion=x=>{c.quaternion=x};const u=(x,k)=>new uo(c,mp({radiusTop:.001,radiusBottom:x,radialSegments:32,heightSegments:1,height:k,openEnded:!1})),h=(x,k,B)=>new uo(c,mp({radiusTop:x,radiusBottom:x,radialSegments:B,heightSegments:1,height:k,openEnded:!1})),p=(x,k,B)=>new uo(c,BM({radius:a-.2,tube:x,radialSegments:64,tubeSegments:B,arc:Math.PI*2*k})),A={curve:p(l,.25,14),curveHandle:p(s,.25,14),hoop:p(l,1,8),arrowHead:u(.07,.2),arrowHeadBig:u(.09,.25),arrowHeadHandle:h(s,.37,8),axis:h(l,a,20),axisHandle:h(s,a,20)},f=x=>new ho(c,{diffuse:x,emissive:x,ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),m=(x,k)=>new Ul(c,{edges:!1,fill:!0,fillColor:x,fillAlpha:k}),g=new ho(c,{diffuse:[1,1,0],alpha:0,alphaMode:"blend"}),y={},v=(x,k)=>{C.mulVec3Scalar(x,-1,C.vec3());const B=f(x),E=C.quaternionToRotationMat4(k,C.identityMat4());C.mulMat4(C.rotationMat4v(Math.PI,[0,1,0],C.mat4()),E,E);const P=C.scaleMat4v([.6,.6,.6],C.identityMat4()),R=(ee,ae)=>{const Be=C.translateMat4v(ee,C.identityMat4()),pe=C.identityMat4();return C.mulMat4(Be,ae,pe),C.mulMat4(E,pe,pe),C.mulMat4(pe,P,C.identityMat4())},T=c.addChild(new pi(c,{geometry:A.curve,material:B,matrix:E,pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),r),L=c.addChild(new pi(c,{geometry:A.curveHandle,material:g,matrix:E,pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),r),F=c.addChild(new pi(c,{geometry:A.arrowHead,material:B,matrix:R([.8,.07,0],C.rotationMat4v(180*C.DEGTORAD,[0,0,1],C.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),U=c.addChild(new pi(c,{geometry:A.arrowHead,material:B,matrix:R([.07,.8,0],C.rotationMat4v(90*C.DEGTORAD,[0,0,1],C.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),q=c.addChild(new pi(c,{geometry:A.hoop,material:B,highlighted:!0,highlightMaterial:m(x,.6),matrix:E,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),V=C.quaternionToRotationMat4(C.vec3PairToQuaternion([0,1,0],x),C.identityMat4());C.mulMat4(C.rotationMat4v(Math.PI,[0,1,0],C.mat4()),V,V);const W=ee=>C.mulMat4(V,C.translateMat4c(0,ee,0,C.identityMat4()),C.identityMat4()),Y=W(a+.1),$=W(a/2),me=c.addChild(new pi(c,{geometry:A.arrowHead,material:B,matrix:Y,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),Ie=c.addChild(new pi(c,{geometry:A.arrowHeadHandle,material:g,matrix:Y,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),Se=c.addChild(new pi(c,{geometry:A.axis,material:B,matrix:$,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),qe=c.addChild(new pi(c,{geometry:A.axisHandle,material:g,matrix:$,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),Qe=c.addChild(new pi(c,{geometry:A.arrowHeadBig,material:B,matrix:Y,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),Ce=(ee,ae)=>C.vec3ApplyQuaternion(c.quaternion,ee,ae),De=(function(){const ee=C.vec3(),ae=C.vec3(),Be=C.vec3();return(pe,Q)=>{Ce(x,ee);const Z=d,ie=ee;C.canvasPosToWorldRay(n,o.camera.viewMatrix,o.camera.projMatrix,o.camera.projection,pe,ae,Be);const re=C.dotVec3(ie,Be),ne=C.subVec3(ae,Z,Q),G=C.dotVec3(ne,ie),K=C.dotVec3(ne,Be),ue=1-re*re;if(Math.abs(ue)>1e-10){const xe=(G-re*K)/ue;return C.addVec3(Z,C.mulVec3Scalar(ie,xe,Q),Q),!0}else return!1}})(),Fe=C.vec3(),ve=C.vec3();y[Ie.id]=y[qe.id]={setActivated:ee=>Qe.visible=ee,initDragAction:ee=>De(ee,Fe)&&C.subVec3(Fe,d,Fe)&&(ae=>{De(ae,ve)&&(C.subVec3(ve,Fe,ve),this._setPosition(ve),this._handlers&&this._handlers.onPosition(ve))})},y[L.id]={setActivated:ee=>q.visible=ee,initDragAction:ee=>{const ae=(function(){const pe=o.camera.projectWorldPos(d);Ce(x,ve),C.transformVec3(o.camera.normalMatrix,ve,ve);const Q=Math.sign(ve[2]);return Z=>{const ie=Z[0]-pe[0],re=Z[1]-pe[1];return Q*Math.atan2(-re,ie)}})();let Be=ae(ee);return pe=>{const Q=ae(pe);c.rotate(x,(Q-Be)*180/Math.PI),this._handlers&&this._handlers.onQuaternion(c.quaternion),Be=Q}}};let ge=!1,we=!1,Le=!1;const We=()=>{const ee=Le&≥Ie.visible=qe.visible=me.visible=Se.visible=!!ee,ee||(Qe.visible=!1)},H=()=>{const ee=Le&&we;L.visible=T.visible=F.visible=U.visible=!!ee,ee||(q.visible=!1)};return{setPositionActive:ee=>{ge=ee,We()},setRotationActive:ee=>{we=ee,H()},set visible(ee){Le=ee,We(),H()}}};this._displayMeshes={center:c.addChild(new pi(c,{geometry:new uo(c,vp({radius:.05})),material:new ho(c,{diffuse:[0,0,0],emissive:[0,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80}),pickable:!1,collidable:!0,clippable:!1,visible:!1,isObject:!1}),r),x:v([1,0,0],C.vec3PairToQuaternion([1,0,0],[0,0,1])),y:v([0,1,0],C.eulerToQuaternion([90,0,0],"XYZ")),z:v([0,0,1],C.identityQuaternion())};const w=[];{let x=-1;const k=E=>{c.scale[0]!==E&&(c.scale=[E,E,E],this._handlers&&this._handlers.onScreenScale&&this._handlers.onScreenScale(c.scale))},B=o.on("tick",()=>{const E=o.camera,P=Math.abs(C.distVec3(E.eye,d));E.projection==="perspective"?P!==x&&k(.07*P*Math.tan(E.perspective.fov*C.DEGTORAD)):E.projection==="ortho"&&k(E.ortho.scale/10),x=P});w.push(()=>o.off(B))}{let x=null,k=null;w.push(()=>{k&&k.cleanup()});const B=C.vec2(),E=(F,U)=>{U[0]=F.pageX,U[1]=F.pageY,Ns(n.ownerDocument.documentElement,n,U)},P=F=>{E(F,B);const U=o.pick({canvasPos:B}),q=U&&U.entity,V=q&&q.id;return V in y&&y[V]},R=(F,U)=>{const q=P(U(F));if(q){k&&k.cleanup();const V=q.initDragAction(B);return V&&(t.pointerEnabled=!1,q.setActivated(!0),k={onChange:W=>{const Y=U(W);Y&&(E(Y,B),V(B))},cleanup:function(){k=null,t.pointerEnabled=!0,q.setActivated(!1)}}),!!V}else return!1},T=(F,U)=>{n.addEventListener(F,U),w.push(()=>n.removeEventListener(F,U))},L=F=>{F.preventDefault(),F.stopPropagation(),F.stopImmediatePropagation()};T("mousedown",F=>{F.which===1&&R(F,U=>U.which===1&&U)&&L(F)}),T("mousemove",F=>{if(k)k.onChange(F),L(F);else{x&&x();const U=P(F);U?(U.setActivated(!0),x=()=>U.setActivated(!1)):x=null}}),T("mouseup",F=>{k&&(k.onChange(F),k.cleanup())}),T("touchstart",F=>{if(F.preventDefault(),F.touches.length===1){const U=F.touches[0].identifier;R(F,q=>[...q.changedTouches].find(V=>V.identifier===U))&&L(F)}}),T("touchmove",F=>{k&&(k.onChange(F),L(F))}),T("touchend",F=>{k&&(k.onChange(F),k.cleanup())})}this.__destroy=()=>{w.forEach(x=>x()),c.destroy();for(let x in y)delete y[x]}}destroy(){this.__destroy()}setHandlers(e){Object.values(this._displayMeshes).forEach(t=>t.visible=!!e),this._handlers=e,this._displayMeshes.x.setPositionActive(e&&e.onPosition),this._displayMeshes.y.setPositionActive(e&&e.onPosition),this._displayMeshes.z.setPositionActive(e&&e.onPosition),this._displayMeshes.x.setRotationActive(e&&e.onQuaternion),this._displayMeshes.y.setRotationActive(e&&e.onQuaternion),this._displayMeshes.z.setRotationActive(e&&e.onQuaternion)}setPosition(e){this._setPosition(e)}setQuaternion(e){this._setQuaternion(e)}}let uSt=class{constructor(i,e,t){this.id=t.id,this._sectionPlane=t,this._mesh=new pi(e,{id:t.id,geometry:new uo(e,xM({xSize:.5,ySize:.5,zSize:.001})),material:new ho(e,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new eB(e,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new Ul(e,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new Ul(e,{fill:!0,fillColor:[0,0,1],fillAlpha:.7,edges:!0,edgeColor:[1,0,0],edgeAlpha:1,edgeWidth:1}),highlighted:!0,scale:[3,3,3],position:[0,0,0],rotation:[0,0,0],opacity:.3,edges:!0});{const o=C.vec3([0,0,0]),n=C.vec3(),r=C.vec3([0,0,1]),a=C.vec4(4),s=C.vec3(),l=()=>{const c=this._sectionPlane.scene.center,d=[-this._sectionPlane.dir[0],-this._sectionPlane.dir[1],-this._sectionPlane.dir[2]];C.subVec3(c,this._sectionPlane.pos,o);const u=-C.dotVec3(d,o);C.normalizeVec3(d),C.mulVec3Scalar(d,u,n);const h=C.vec3PairToQuaternion(r,this._sectionPlane.dir,a);s[0]=n[0]*.1,s[1]=n[1]*.1,s[2]=n[2]*.1,this._mesh.quaternion=h,this._mesh.position=s};this._onSectionPlanePos=this._sectionPlane.on("pos",l),this._onSectionPlaneDir=this._sectionPlane.on("dir",l)}this._highlighted=!1,this._selected=!1}setHighlighted(i){this._highlighted=!!i,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=i?[0,.7,0]:[0,0,0]}getHighlighted(){return this._highlighted}setSelected(i){this._selected=!!i,this._mesh.edgeMaterial.edgeWidth=i?3:1,this._mesh.highlightMaterial.edgeWidth=i?3:1}getSelected(){return this._selected}destroy(){this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._mesh.destroy()}};class hSt{constructor(e,t){if(!t.onHoverEnterPlane||!t.onHoverLeavePlane||!t.onClickedNothing||!t.onClickedPlane)throw"Missing config(s): onHoverEnterPlane, onHoverLeavePlane, onClickedNothing || onClickedPlane";this.plugin=e,this._viewer=e.viewer,this._onHoverEnterPlane=t.onHoverEnterPlane,this._onHoverLeavePlane=t.onHoverLeavePlane,this._onClickedNothing=t.onClickedNothing,this._onClickedPlane=t.onClickedPlane,this._visible=!0,this._planes={},this._canvas=t.overviewCanvas,this._scene=new my(this._viewer,{canvasId:this._canvas.id,transparent:!0}),this._scene.clearLights(),new Wa(this._scene,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Wa(this._scene,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Wa(this._scene,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._scene.camera,this._scene.camera.perspective.fov=70,this._zUp=!1;{const n=this._scene.camera,r=C.rotationMat4c(-90*C.DEGTORAD,1,0,0),a=C.vec3(),s=C.vec3(),l=C.vec3();this._synchCamera=()=>{const c=this._viewer.camera.eye,d=this._viewer.camera.look,u=this._viewer.camera.up;C.mulVec3Scalar(C.normalizeVec3(C.subVec3(c,d,a)),7),this._zUp?(C.transformVec3(r,a,s),C.transformVec3(r,u,l),n.look=[0,0,0],n.eye=C.transformVec3(r,a,s),n.up=C.transformPoint3(r,u,l)):(n.look=[0,0,0],n.eye=a,n.up=u)}}this._onViewerCameraMatrix=this._viewer.camera.on("matrix",this._synchCamera),this._onViewerCameraWorldAxis=this._viewer.camera.on("worldAxis",this._synchCamera),this._onViewerCameraFOV=this._viewer.camera.perspective.on("fov",n=>{this._scene.camera.perspective.fov=n});{var o=null;this._onInputMouseMove=this._scene.input.on("mousemove",n=>{const r=this._scene.pick({canvasPos:n});r?(!o||r.entity.id!==o.id)&&(o&&this._planes[o.id]&&this._onHoverLeavePlane(o.id),o=r.entity,this._planes[o.id]&&this._onHoverEnterPlane(o.id)):o&&(this._onHoverLeavePlane(o.id),o=null)}),this._scene.canvas.canvas.addEventListener("mouseup",this._onCanvasMouseUp=()=>{o?this._planes[o.id]&&this._onClickedPlane(o.id):this._onClickedNothing()}),this._scene.canvas.canvas.addEventListener("mouseout",this._onCanvasMouseOut=()=>{o&&(this._onHoverLeavePlane(o.id),o=null)})}this.setVisible(t.overviewVisible)}addSectionPlane(e){this._planes[e.id]=new uSt(this,this._scene,e)}setPlaneHighlighted(e,t){const o=this._planes[e];o&&o.setHighlighted(t)}setPlaneSelected(e,t){const o=this._planes[e];o&&o.setSelected(t)}removeSectionPlane(e){const t=this._planes[e.id];t&&(t.destroy(),delete this._planes[e.id])}setVisible(e=!0){this._visible=e,this._canvas.style.visibility=e?"visible":"hidden"}getVisible(){return this._visible}destroy(){this._viewer.camera.off(this._onViewerCameraMatrix),this._viewer.camera.off(this._onViewerCameraWorldAxis),this._viewer.camera.perspective.off(this._onViewerCameraFOV),this._scene.input.off(this._onInputMouseMove),this._scene.canvas.canvas.removeEventListener("mouseup",this._onCanvasMouseUp),this._scene.canvas.canvas.removeEventListener("mouseout",this._onCanvasMouseOut),this._scene.destroy()}}const Ql=C.AABB3(),Ru=C.vec3();class pSt extends va{constructor(e,t={}){if(super("SectionPlanes",e),this._freeControls=[],this._sectionPlanes=e.scene.sectionPlanes,this._controls={},this._shownControlId=null,t.overviewCanvasId!==null&&t.overviewCanvasId!==void 0){const o=document.getElementById(t.overviewCanvasId);o?this._overview=new hSt(this,{overviewCanvas:o,visible:t.overviewVisible,onHoverEnterPlane:(n=>{this._overview.setPlaneHighlighted(n,!0)}),onHoverLeavePlane:(n=>{this._overview.setPlaneHighlighted(n,!1)}),onClickedPlane:(n=>{if(this.getShownControl()===n){this.hideControl();return}this.showControl(n);const r=this.sectionPlanes[n].pos;Ql.set(this.viewer.scene.aabb),C.getAABB3Center(Ql,Ru),Ql[0]+=r[0]-Ru[0],Ql[1]+=r[1]-Ru[1],Ql[2]+=r[2]-Ru[2],Ql[3]+=r[0]-Ru[0],Ql[4]+=r[1]-Ru[1],Ql[5]+=r[2]-Ru[2],this.viewer.cameraFlight.flyTo({aabb:Ql,fitFOV:65})}),onClickedNothing:(()=>{this.hideControl()})}):this.warn("Can't find overview canvas: '"+t.overviewCanvasId+"' - will create plugin without overview")}this._onSceneSectionPlaneCreated=e.scene.on("sectionPlaneCreated",o=>{this._sectionPlaneCreated(o)})}setOverviewVisible(e){this._overview&&this._overview.setVisible(e)}getOverviewVisible(){if(this._overview)return this._overview.getVisible()}get sectionPlanes(){return this._sectionPlanes}createSectionPlane(e={}){return e.id!==void 0&&e.id!==null&&this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id),new RB(this.viewer.scene,{id:e.id,pos:e.pos,dir:e.dir,active:!0})}_sectionPlaneCreated(e){const t=this._freeControls.length>0?this._freeControls.pop():(()=>{const o=this.viewer.scene,n=(function(){const u=new Gm(o,{isObject:!1});return u.addChild(new pi(u,{geometry:new uo(u,{primitive:"triangles",positions:[.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,.5,.5,-0,.5,-.5,-0,-.5,-.5,-0,-.5,.5,-0],indices:[0,1,2,2,3,0]}),material:new ho(u,{emissive:[0,0,0],diffuse:[0,0,0],backfaces:!0}),opacity:.6,ghosted:!0,ghostMaterial:new Ul(u,{edges:!1,filled:!0,fillColor:[1,1,0],edgeColor:[0,0,0],fillAlpha:.1,backfaces:!0}),pickable:!1,collidable:!0,clippable:!1,visible:!1,scale:[2.4,2.4,1],isObject:!1})),u.addChild(new pi(u,{geometry:new uo(u,BM({center:[0,0,0],radius:1.7,tube:.02,radialSegments:4,tubeSegments:4,arc:Math.PI*2})),material:new ho(u,{emissive:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],shininess:0}),highlightMaterial:new Ul(u,{edges:!1,edgeColor:[0,0,0],filled:!0,fillColor:[.8,.8,.8],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,.1],rotation:[0,0,45],isObject:!1})),{setPosition:(function(){const h=C.vec3(),p=C.vec3();return function(A){bu(A,h,p),u.origin=h,u.position=p}})(),setQuaternion:h=>{u.quaternion=h},setScale:h=>{u.scale=h},setVisible:h=>{u.visible=h},destroy:()=>{u.destroy()}}})();let r=()=>{};const a=new dSt(this.viewer);let s=!1,l=!1,c=null;const d=()=>{const u=l&&!s;n.setVisible(u),a.setHandlers(u&&c)};return{_destroy:()=>{r(),a.destroy(),n.destroy()},setCulled:u=>{s=u,d()},setVisible:u=>{l=u,d()},_setSectionPlane:u=>{if(r(),u){let h=!1;c={onPosition:g=>{n.setPosition(g),u.pos=g},onQuaternion:g=>{n.setQuaternion(g),h=!0,u.quaternion=g},onScreenScale:g=>{n.setScale(g)}};const p=()=>{n.setPosition(u.pos),a.setPosition(u.pos)},A=()=>{n.setQuaternion(u.quaternion),a.setQuaternion(u.quaternion)};p(),A();const f=u.on("pos",p),m=u.on("dir",()=>{h?h=!1:A()});r=()=>{u.off(f),u.off(m),r=()=>{}}}}}})();t._setSectionPlane(e),t.setVisible(!1),this._controls[e.id]=t,this._overview&&this._overview.addSectionPlane(e),e.once("destroyed",()=>{this._sectionPlaneDestroyed(e)})}flipSectionPlanes(){const e=this.viewer.scene.sectionPlanes;for(let t in e)e[t].flipDir()}showControl(e){const t=this._controls[e];if(!t){this.error("Control not found: "+e);return}this.hideControl(),t.setVisible(!0),this._overview&&this._overview.setPlaneSelected(e,!0),this._shownControlId=e}getShownControl(){return this._shownControlId}hideControl(){for(var e in this._controls)this._controls.hasOwnProperty(e)&&(this._controls[e].setVisible(!1),this._overview&&this._overview.setPlaneSelected(e,!1));this._shownControlId=null}destroySectionPlane(e){var t=this.viewer.scene.sectionPlanes[e];if(!t){this.error("SectionPlane not found: "+e);return}this._sectionPlaneDestroyed(t),t.destroy(),e===this._shownControlId&&(this._shownControlId=null)}_sectionPlaneDestroyed(e){this._overview&&this._overview.removeSectionPlane(e);const t=this._controls[e.id];t&&(t.setVisible(!1),t._setSectionPlane(null),delete this._controls[e.id],this._freeControls.push(t))}clear(){const e=Object.keys(this._sectionPlanes);for(var t=0,o=e.length;t<o;t++)this.destroySectionPlane(e[t])}send(e,t){switch(e){case"snapshotStarting":for(let o in this._controls)this._controls.hasOwnProperty(o)&&this._controls[o].setCulled(!0);break;case"snapshotFinished":for(let o in this._controls)this._controls.hasOwnProperty(o)&&this._controls[o].setCulled(!1);break;case"clearSectionPlanes":this.clear();break}}destroy(){this.clear(),this._overview&&this._overview.destroy(),this._destroyFreeControls(),super.destroy()}_destroyFreeControls(){for(var e=this._freeControls.pop();e;)e._destroy(),e=this._freeControls.pop();this.viewer.scene.off(this._onSceneSectionPlaneCreated)}}class sW{constructor(e={}){this.cacheBuster=e.cacheBuster!==!1}_cacheBusterURL(e){if(!this.cacheBuster)return e;const t=new Date().getTime();return e.indexOf("?")>-1?e+"&_="+t:e+"?_="+t}getManifest(e,t,o){mt.loadJSON(this._cacheBusterURL(e),n=>{t(n)},function(n){o(n)})}getMetaModel(e,t,o){mt.loadJSON(this._cacheBusterURL(e),n=>{t(n)},function(n){o(n)})}getXKT(e,t,o){var n=()=>{};t=t||n,o=o||n;const r=/^data:(.*?)(;base64)?,(.*)$/,a=e.match(r);if(a){const c=!!a[2];var s=a[3];s=window.decodeURIComponent(s),c&&(s=window.atob(s));try{const d=new ArrayBuffer(s.length),u=new Uint8Array(d);for(var l=0;l<s.length;l++)u[l]=s.charCodeAt(l);t(d)}catch(d){o(d)}}else{const c=new XMLHttpRequest;c.open("GET",this._cacheBusterURL(e),!0),c.responseType="arraybuffer",c.onreadystatechange=function(){c.readyState===4&&(c.status===200?t(c.response):o("getXKT error : "+c.response))},c.send(null)}}}var r7={exports:{}},fSt=r7.exports,lW;function ASt(){return lW||(lW=1,(function(i,e){(function(t,o){o(e)})(fSt,(function(t){function o(D){let X=D.length;for(;--X>=0;)D[X]=0}const n=256,r=286,a=30,s=15,l=new Uint8Array([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]),c=new Uint8Array([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]),d=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),u=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),h=new Array(576);o(h);const p=new Array(60);o(p);const A=new Array(512);o(A);const f=new Array(256);o(f);const m=new Array(29);o(m);const g=new Array(a);function y(D,X,O,ke,ye){this.static_tree=D,this.extra_bits=X,this.extra_base=O,this.elems=ke,this.max_length=ye,this.has_stree=D&&D.length}let v,w,x;function k(D,X){this.dyn_tree=D,this.max_code=0,this.stat_desc=X}o(g);const B=D=>D<256?A[D]:A[256+(D>>>7)],E=(D,X)=>{D.pending_buf[D.pending++]=255&X,D.pending_buf[D.pending++]=X>>>8&255},P=(D,X,O)=>{D.bi_valid>16-O?(D.bi_buf|=X<<D.bi_valid&65535,E(D,D.bi_buf),D.bi_buf=X>>16-D.bi_valid,D.bi_valid+=O-16):(D.bi_buf|=X<<D.bi_valid&65535,D.bi_valid+=O)},R=(D,X,O)=>{P(D,O[2*X],O[2*X+1])},T=(D,X)=>{let O=0;do O|=1&D,D>>>=1,O<<=1;while(--X>0);return O>>>1},L=(D,X,O)=>{const ke=new Array(16);let ye,Ae,tt=0;for(ye=1;ye<=s;ye++)tt=tt+O[ye-1]<<1,ke[ye]=tt;for(Ae=0;Ae<=X;Ae++){let Oe=D[2*Ae+1];Oe!==0&&(D[2*Ae]=T(ke[Oe]++,Oe))}},F=D=>{let X;for(X=0;X<r;X++)D.dyn_ltree[2*X]=0;for(X=0;X<a;X++)D.dyn_dtree[2*X]=0;for(X=0;X<19;X++)D.bl_tree[2*X]=0;D.dyn_ltree[512]=1,D.opt_len=D.static_len=0,D.sym_next=D.matches=0},U=D=>{D.bi_valid>8?E(D,D.bi_buf):D.bi_valid>0&&(D.pending_buf[D.pending++]=D.bi_buf),D.bi_buf=0,D.bi_valid=0},q=(D,X,O,ke)=>{const ye=2*X,Ae=2*O;return D[ye]<D[Ae]||D[ye]===D[Ae]&&ke[X]<=ke[O]},V=(D,X,O)=>{const ke=D.heap[O];let ye=O<<1;for(;ye<=D.heap_len&&(ye<D.heap_len&&q(X,D.heap[ye+1],D.heap[ye],D.depth)&&ye++,!q(X,ke,D.heap[ye],D.depth));)D.heap[O]=D.heap[ye],O=ye,ye<<=1;D.heap[O]=ke},W=(D,X,O)=>{let ke,ye,Ae,tt,Oe=0;if(D.sym_next!==0)do ke=255&D.pending_buf[D.sym_buf+Oe++],ke+=(255&D.pending_buf[D.sym_buf+Oe++])<<8,ye=D.pending_buf[D.sym_buf+Oe++],ke===0?R(D,ye,X):(Ae=f[ye],R(D,Ae+n+1,X),tt=l[Ae],tt!==0&&(ye-=m[Ae],P(D,ye,tt)),ke--,Ae=B(ke),R(D,Ae,O),tt=c[Ae],tt!==0&&(ke-=g[Ae],P(D,ke,tt)));while(Oe<D.sym_next);R(D,256,X)},Y=(D,X)=>{const O=X.dyn_tree,ke=X.stat_desc.static_tree,ye=X.stat_desc.has_stree,Ae=X.stat_desc.elems;let tt,Oe,wt,Ve=-1;for(D.heap_len=0,D.heap_max=573,tt=0;tt<Ae;tt++)O[2*tt]!==0?(D.heap[++D.heap_len]=Ve=tt,D.depth[tt]=0):O[2*tt+1]=0;for(;D.heap_len<2;)wt=D.heap[++D.heap_len]=Ve<2?++Ve:0,O[2*wt]=1,D.depth[wt]=0,D.opt_len--,ye&&(D.static_len-=ke[2*wt+1]);for(X.max_code=Ve,tt=D.heap_len>>1;tt>=1;tt--)V(D,O,tt);wt=Ae;do tt=D.heap[1],D.heap[1]=D.heap[D.heap_len--],V(D,O,1),Oe=D.heap[1],D.heap[--D.heap_max]=tt,D.heap[--D.heap_max]=Oe,O[2*wt]=O[2*tt]+O[2*Oe],D.depth[wt]=(D.depth[tt]>=D.depth[Oe]?D.depth[tt]:D.depth[Oe])+1,O[2*tt+1]=O[2*Oe+1]=wt,D.heap[1]=wt++,V(D,O,1);while(D.heap_len>=2);D.heap[--D.heap_max]=D.heap[1],((et,ii)=>{const Ht=ii.dyn_tree,Ct=ii.max_code,Ho=ii.stat_desc.static_tree,Bi=ii.stat_desc.has_stree,Qt=ii.stat_desc.extra_bits,Li=ii.stat_desc.extra_base,ti=ii.stat_desc.max_length;let kt,ei,Di,Pt,wi,oi,Gt=0;for(Pt=0;Pt<=s;Pt++)et.bl_count[Pt]=0;for(Ht[2*et.heap[et.heap_max]+1]=0,kt=et.heap_max+1;kt<573;kt++)ei=et.heap[kt],Pt=Ht[2*Ht[2*ei+1]+1]+1,Pt>ti&&(Pt=ti,Gt++),Ht[2*ei+1]=Pt,ei>Ct||(et.bl_count[Pt]++,wi=0,ei>=Li&&(wi=Qt[ei-Li]),oi=Ht[2*ei],et.opt_len+=oi*(Pt+wi),Bi&&(et.static_len+=oi*(Ho[2*ei+1]+wi)));if(Gt!==0){do{for(Pt=ti-1;et.bl_count[Pt]===0;)Pt--;et.bl_count[Pt]--,et.bl_count[Pt+1]+=2,et.bl_count[ti]--,Gt-=2}while(Gt>0);for(Pt=ti;Pt!==0;Pt--)for(ei=et.bl_count[Pt];ei!==0;)Di=et.heap[--kt],Di>Ct||(Ht[2*Di+1]!==Pt&&(et.opt_len+=(Pt-Ht[2*Di+1])*Ht[2*Di],Ht[2*Di+1]=Pt),ei--)}})(D,X),L(O,Ve,D.bl_count)},$=(D,X,O)=>{let ke,ye,Ae=-1,tt=X[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),X[2*(O+1)+1]=65535,ke=0;ke<=O;ke++)ye=tt,tt=X[2*(ke+1)+1],++Oe<wt&&ye===tt||(Oe<Ve?D.bl_tree[2*ye]+=Oe:ye!==0?(ye!==Ae&&D.bl_tree[2*ye]++,D.bl_tree[32]++):Oe<=10?D.bl_tree[34]++:D.bl_tree[36]++,Oe=0,Ae=ye,tt===0?(wt=138,Ve=3):ye===tt?(wt=6,Ve=3):(wt=7,Ve=4))},me=(D,X,O)=>{let ke,ye,Ae=-1,tt=X[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),ke=0;ke<=O;ke++)if(ye=tt,tt=X[2*(ke+1)+1],!(++Oe<wt&&ye===tt)){if(Oe<Ve)do R(D,ye,D.bl_tree);while(--Oe!=0);else ye!==0?(ye!==Ae&&(R(D,ye,D.bl_tree),Oe--),R(D,16,D.bl_tree),P(D,Oe-3,2)):Oe<=10?(R(D,17,D.bl_tree),P(D,Oe-3,3)):(R(D,18,D.bl_tree),P(D,Oe-11,7));Oe=0,Ae=ye,tt===0?(wt=138,Ve=3):ye===tt?(wt=6,Ve=3):(wt=7,Ve=4)}};let Ie=!1;const Se=(D,X,O,ke)=>{P(D,0+(ke?1:0),3),U(D),E(D,O),E(D,~O),O&&D.pending_buf.set(D.window.subarray(X,X+O),D.pending),D.pending+=O};var qe=(D,X,O,ke)=>{let ye,Ae,tt=0;D.level>0?(D.strm.data_type===2&&(D.strm.data_type=(Oe=>{let wt,Ve=4093624447;for(wt=0;wt<=31;wt++,Ve>>>=1)if(1&Ve&&Oe.dyn_ltree[2*wt]!==0)return 0;if(Oe.dyn_ltree[18]!==0||Oe.dyn_ltree[20]!==0||Oe.dyn_ltree[26]!==0)return 1;for(wt=32;wt<n;wt++)if(Oe.dyn_ltree[2*wt]!==0)return 1;return 0})(D)),Y(D,D.l_desc),Y(D,D.d_desc),tt=(Oe=>{let wt;for($(Oe,Oe.dyn_ltree,Oe.l_desc.max_code),$(Oe,Oe.dyn_dtree,Oe.d_desc.max_code),Y(Oe,Oe.bl_desc),wt=18;wt>=3&&Oe.bl_tree[2*u[wt]+1]===0;wt--);return Oe.opt_len+=3*(wt+1)+5+5+4,wt})(D),ye=D.opt_len+3+7>>>3,Ae=D.static_len+3+7>>>3,Ae<=ye&&(ye=Ae)):ye=Ae=O+5,O+4<=ye&&X!==-1?Se(D,X,O,ke):D.strategy===4||Ae===ye?(P(D,2+(ke?1:0),3),W(D,h,p)):(P(D,4+(ke?1:0),3),((Oe,wt,Ve,et)=>{let ii;for(P(Oe,wt-257,5),P(Oe,Ve-1,5),P(Oe,et-4,4),ii=0;ii<et;ii++)P(Oe,Oe.bl_tree[2*u[ii]+1],3);me(Oe,Oe.dyn_ltree,wt-1),me(Oe,Oe.dyn_dtree,Ve-1)})(D,D.l_desc.max_code+1,D.d_desc.max_code+1,tt+1),W(D,D.dyn_ltree,D.dyn_dtree)),F(D),ke&&U(D)},Qe={_tr_init:D=>{Ie||((()=>{let X,O,ke,ye,Ae;const tt=new Array(16);for(ke=0,ye=0;ye<28;ye++)for(m[ye]=ke,X=0;X<1<<l[ye];X++)f[ke++]=ye;for(f[ke-1]=ye,Ae=0,ye=0;ye<16;ye++)for(g[ye]=Ae,X=0;X<1<<c[ye];X++)A[Ae++]=ye;for(Ae>>=7;ye<a;ye++)for(g[ye]=Ae<<7,X=0;X<1<<c[ye]-7;X++)A[256+Ae++]=ye;for(O=0;O<=s;O++)tt[O]=0;for(X=0;X<=143;)h[2*X+1]=8,X++,tt[8]++;for(;X<=255;)h[2*X+1]=9,X++,tt[9]++;for(;X<=279;)h[2*X+1]=7,X++,tt[7]++;for(;X<=287;)h[2*X+1]=8,X++,tt[8]++;for(L(h,287,tt),X=0;X<a;X++)p[2*X+1]=5,p[2*X]=T(X,5);v=new y(h,l,257,r,s),w=new y(p,c,0,a,s),x=new y(new Array(0),d,0,19,7)})(),Ie=!0),D.l_desc=new k(D.dyn_ltree,v),D.d_desc=new k(D.dyn_dtree,w),D.bl_desc=new k(D.bl_tree,x),D.bi_buf=0,D.bi_valid=0,F(D)},_tr_stored_block:Se,_tr_flush_block:qe,_tr_tally:(D,X,O)=>(D.pending_buf[D.sym_buf+D.sym_next++]=X,D.pending_buf[D.sym_buf+D.sym_next++]=X>>8,D.pending_buf[D.sym_buf+D.sym_next++]=O,X===0?D.dyn_ltree[2*O]++:(D.matches++,X--,D.dyn_ltree[2*(f[O]+n+1)]++,D.dyn_dtree[2*B(X)]++),D.sym_next===D.sym_end),_tr_align:D=>{P(D,2,3),R(D,256,h),(X=>{X.bi_valid===16?(E(X,X.bi_buf),X.bi_buf=0,X.bi_valid=0):X.bi_valid>=8&&(X.pending_buf[X.pending++]=255&X.bi_buf,X.bi_buf>>=8,X.bi_valid-=8)})(D)}},Ce=(D,X,O,ke)=>{let ye=65535&D|0,Ae=D>>>16&65535|0,tt=0;for(;O!==0;){tt=O>2e3?2e3:O,O-=tt;do ye=ye+X[ke++]|0,Ae=Ae+ye|0;while(--tt);ye%=65521,Ae%=65521}return ye|Ae<<16|0};const De=new Uint32Array((()=>{let D,X=[];for(var O=0;O<256;O++){D=O;for(var ke=0;ke<8;ke++)D=1&D?3988292384^D>>>1:D>>>1;X[O]=D}return X})());var Fe=(D,X,O,ke)=>{const ye=De,Ae=ke+O;D^=-1;for(let tt=ke;tt<Ae;tt++)D=D>>>8^ye[255&(D^X[tt])];return-1^D},ve={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ge={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:we,_tr_stored_block:Le,_tr_flush_block:We,_tr_tally:H,_tr_align:ee}=Qe,{Z_NO_FLUSH:ae,Z_PARTIAL_FLUSH:Be,Z_FULL_FLUSH:pe,Z_FINISH:Q,Z_BLOCK:Z,Z_OK:ie,Z_STREAM_END:re,Z_STREAM_ERROR:ne,Z_DATA_ERROR:G,Z_BUF_ERROR:K,Z_DEFAULT_COMPRESSION:ue,Z_FILTERED:xe,Z_HUFFMAN_ONLY:oe,Z_RLE:Me,Z_FIXED:je,Z_DEFAULT_STRATEGY:he,Z_UNKNOWN:Ne,Z_DEFLATED:Ee}=ge,ze=258,ot=262,At=42,ft=113,lt=666,ut=(D,X)=>(D.msg=ve[X],X),Te=D=>2*D-(D>4?9:0),st=D=>{let X=D.length;for(;--X>=0;)D[X]=0},dt=D=>{let X,O,ke,ye=D.w_size;X=D.hash_size,ke=X;do O=D.head[--ke],D.head[ke]=O>=ye?O-ye:0;while(--X);X=ye,ke=X;do O=D.prev[--ke],D.prev[ke]=O>=ye?O-ye:0;while(--X)};let Ye=(D,X,O)=>(X<<D.hash_shift^O)&D.hash_mask;const fe=D=>{const X=D.state;let O=X.pending;O>D.avail_out&&(O=D.avail_out),O!==0&&(D.output.set(X.pending_buf.subarray(X.pending_out,X.pending_out+O),D.next_out),D.next_out+=O,X.pending_out+=O,D.total_out+=O,D.avail_out-=O,X.pending-=O,X.pending===0&&(X.pending_out=0))},be=(D,X)=>{We(D,D.block_start>=0?D.block_start:-1,D.strstart-D.block_start,X),D.block_start=D.strstart,fe(D.strm)},Xe=(D,X)=>{D.pending_buf[D.pending++]=X},ht=(D,X)=>{D.pending_buf[D.pending++]=X>>>8&255,D.pending_buf[D.pending++]=255&X},St=(D,X,O,ke)=>{let ye=D.avail_in;return ye>ke&&(ye=ke),ye===0?0:(D.avail_in-=ye,X.set(D.input.subarray(D.next_in,D.next_in+ye),O),D.state.wrap===1?D.adler=Ce(D.adler,X,ye,O):D.state.wrap===2&&(D.adler=Fe(D.adler,X,ye,O)),D.next_in+=ye,D.total_in+=ye,ye)},xt=(D,X)=>{let O,ke,ye=D.max_chain_length,Ae=D.strstart,tt=D.prev_length,Oe=D.nice_match;const wt=D.strstart>D.w_size-ot?D.strstart-(D.w_size-ot):0,Ve=D.window,et=D.w_mask,ii=D.prev,Ht=D.strstart+ze;let Ct=Ve[Ae+tt-1],Ho=Ve[Ae+tt];D.prev_length>=D.good_match&&(ye>>=2),Oe>D.lookahead&&(Oe=D.lookahead);do if(O=X,Ve[O+tt]===Ho&&Ve[O+tt-1]===Ct&&Ve[O]===Ve[Ae]&&Ve[++O]===Ve[Ae+1]){Ae+=2,O++;do;while(Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ae<Ht);if(ke=ze-(Ht-Ae),Ae=Ht-ze,ke>tt){if(D.match_start=X,tt=ke,ke>=Oe)break;Ct=Ve[Ae+tt-1],Ho=Ve[Ae+tt]}}while((X=ii[X&et])>wt&&--ye!=0);return tt<=D.lookahead?tt:D.lookahead},fi=D=>{const X=D.w_size;let O,ke,ye;do{if(ke=D.window_size-D.lookahead-D.strstart,D.strstart>=X+(X-ot)&&(D.window.set(D.window.subarray(X,X+X-ke),0),D.match_start-=X,D.strstart-=X,D.block_start-=X,D.insert>D.strstart&&(D.insert=D.strstart),dt(D),ke+=X),D.strm.avail_in===0)break;if(O=St(D.strm,D.window,D.strstart+D.lookahead,ke),D.lookahead+=O,D.lookahead+D.insert>=3)for(ye=D.strstart-D.insert,D.ins_h=D.window[ye],D.ins_h=Ye(D,D.ins_h,D.window[ye+1]);D.insert&&(D.ins_h=Ye(D,D.ins_h,D.window[ye+3-1]),D.prev[ye&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=ye,ye++,D.insert--,!(D.lookahead+D.insert<3)););}while(D.lookahead<ot&&D.strm.avail_in!==0)},ji=(D,X)=>{let O,ke,ye,Ae=D.pending_buf_size-5>D.w_size?D.w_size:D.pending_buf_size-5,tt=0,Oe=D.strm.avail_in;do{if(O=65535,ye=D.bi_valid+42>>3,D.strm.avail_out<ye||(ye=D.strm.avail_out-ye,ke=D.strstart-D.block_start,O>ke+D.strm.avail_in&&(O=ke+D.strm.avail_in),O>ye&&(O=ye),O<Ae&&(O===0&&X!==Q||X===ae||O!==ke+D.strm.avail_in)))break;tt=X===Q&&O===ke+D.strm.avail_in?1:0,Le(D,0,0,tt),D.pending_buf[D.pending-4]=O,D.pending_buf[D.pending-3]=O>>8,D.pending_buf[D.pending-2]=~O,D.pending_buf[D.pending-1]=~O>>8,fe(D.strm),ke&&(ke>O&&(ke=O),D.strm.output.set(D.window.subarray(D.block_start,D.block_start+ke),D.strm.next_out),D.strm.next_out+=ke,D.strm.avail_out-=ke,D.strm.total_out+=ke,D.block_start+=ke,O-=ke),O&&(St(D.strm,D.strm.output,D.strm.next_out,O),D.strm.next_out+=O,D.strm.avail_out-=O,D.strm.total_out+=O)}while(tt===0);return Oe-=D.strm.avail_in,Oe&&(Oe>=D.w_size?(D.matches=2,D.window.set(D.strm.input.subarray(D.strm.next_in-D.w_size,D.strm.next_in),0),D.strstart=D.w_size,D.insert=D.strstart):(D.window_size-D.strstart<=Oe&&(D.strstart-=D.w_size,D.window.set(D.window.subarray(D.w_size,D.w_size+D.strstart),0),D.matches<2&&D.matches++,D.insert>D.strstart&&(D.insert=D.strstart)),D.window.set(D.strm.input.subarray(D.strm.next_in-Oe,D.strm.next_in),D.strstart),D.strstart+=Oe,D.insert+=Oe>D.w_size-D.insert?D.w_size-D.insert:Oe),D.block_start=D.strstart),D.high_water<D.strstart&&(D.high_water=D.strstart),tt?4:X!==ae&&X!==Q&&D.strm.avail_in===0&&D.strstart===D.block_start?2:(ye=D.window_size-D.strstart,D.strm.avail_in>ye&&D.block_start>=D.w_size&&(D.block_start-=D.w_size,D.strstart-=D.w_size,D.window.set(D.window.subarray(D.w_size,D.w_size+D.strstart),0),D.matches<2&&D.matches++,ye+=D.w_size,D.insert>D.strstart&&(D.insert=D.strstart)),ye>D.strm.avail_in&&(ye=D.strm.avail_in),ye&&(St(D.strm,D.window,D.strstart,ye),D.strstart+=ye,D.insert+=ye>D.w_size-D.insert?D.w_size-D.insert:ye),D.high_water<D.strstart&&(D.high_water=D.strstart),ye=D.bi_valid+42>>3,ye=D.pending_buf_size-ye>65535?65535:D.pending_buf_size-ye,Ae=ye>D.w_size?D.w_size:ye,ke=D.strstart-D.block_start,(ke>=Ae||(ke||X===Q)&&X!==ae&&D.strm.avail_in===0&&ke<=ye)&&(O=ke>ye?ye:ke,tt=X===Q&&D.strm.avail_in===0&&O===ke?1:0,Le(D,D.block_start,O,tt),D.block_start+=O,fe(D.strm)),tt?3:1)},Mo=(D,X)=>{let O,ke;for(;;){if(D.lookahead<ot){if(fi(D),D.lookahead<ot&&X===ae)return 1;if(D.lookahead===0)break}if(O=0,D.lookahead>=3&&(D.ins_h=Ye(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart),O!==0&&D.strstart-O<=D.w_size-ot&&(D.match_length=xt(D,O)),D.match_length>=3)if(ke=H(D,D.strstart-D.match_start,D.match_length-3),D.lookahead-=D.match_length,D.match_length<=D.max_lazy_match&&D.lookahead>=3){D.match_length--;do D.strstart++,D.ins_h=Ye(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart;while(--D.match_length!=0);D.strstart++}else D.strstart+=D.match_length,D.match_length=0,D.ins_h=D.window[D.strstart],D.ins_h=Ye(D,D.ins_h,D.window[D.strstart+1]);else ke=H(D,0,D.window[D.strstart]),D.lookahead--,D.strstart++;if(ke&&(be(D,!1),D.strm.avail_out===0))return 1}return D.insert=D.strstart<2?D.strstart:2,X===Q?(be(D,!0),D.strm.avail_out===0?3:4):D.sym_next&&(be(D,!1),D.strm.avail_out===0)?1:2},eo=(D,X)=>{let O,ke,ye;for(;;){if(D.lookahead<ot){if(fi(D),D.lookahead<ot&&X===ae)return 1;if(D.lookahead===0)break}if(O=0,D.lookahead>=3&&(D.ins_h=Ye(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart),D.prev_length=D.match_length,D.prev_match=D.match_start,D.match_length=2,O!==0&&D.prev_length<D.max_lazy_match&&D.strstart-O<=D.w_size-ot&&(D.match_length=xt(D,O),D.match_length<=5&&(D.strategy===xe||D.match_length===3&&D.strstart-D.match_start>4096)&&(D.match_length=2)),D.prev_length>=3&&D.match_length<=D.prev_length){ye=D.strstart+D.lookahead-3,ke=H(D,D.strstart-1-D.prev_match,D.prev_length-3),D.lookahead-=D.prev_length-1,D.prev_length-=2;do++D.strstart<=ye&&(D.ins_h=Ye(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart);while(--D.prev_length!=0);if(D.match_available=0,D.match_length=2,D.strstart++,ke&&(be(D,!1),D.strm.avail_out===0))return 1}else if(D.match_available){if(ke=H(D,0,D.window[D.strstart-1]),ke&&be(D,!1),D.strstart++,D.lookahead--,D.strm.avail_out===0)return 1}else D.match_available=1,D.strstart++,D.lookahead--}return D.match_available&&(ke=H(D,0,D.window[D.strstart-1]),D.match_available=0),D.insert=D.strstart<2?D.strstart:2,X===Q?(be(D,!0),D.strm.avail_out===0?3:4):D.sym_next&&(be(D,!1),D.strm.avail_out===0)?1:2};function ar(D,X,O,ke,ye){this.good_length=D,this.max_lazy=X,this.nice_length=O,this.max_chain=ke,this.func=ye}const Vi=[new ar(0,0,0,0,ji),new ar(4,4,8,4,Mo),new ar(4,5,16,8,Mo),new ar(4,6,32,32,Mo),new ar(4,4,16,16,eo),new ar(8,16,32,32,eo),new ar(8,16,128,128,eo),new ar(8,32,128,256,eo),new ar(32,128,258,1024,eo),new ar(32,258,258,4096,eo)];function rh(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Ee,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),st(this.dyn_ltree),st(this.dyn_dtree),st(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),st(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),st(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const ds=D=>{if(!D)return 1;const X=D.state;return!X||X.strm!==D||X.status!==At&&X.status!==57&&X.status!==69&&X.status!==73&&X.status!==91&&X.status!==103&&X.status!==ft&&X.status!==lt?1:0},c2=D=>{if(ds(D))return ut(D,ne);D.total_in=D.total_out=0,D.data_type=Ne;const X=D.state;return X.pending=0,X.pending_out=0,X.wrap<0&&(X.wrap=-X.wrap),X.status=X.wrap===2?57:X.wrap?At:ft,D.adler=X.wrap===2?0:1,X.last_flush=-2,we(X),ie},_d=D=>{const X=c2(D);var O;return X===ie&&((O=D.state).window_size=2*O.w_size,st(O.head),O.max_lazy_match=Vi[O.level].max_lazy,O.good_match=Vi[O.level].good_length,O.nice_match=Vi[O.level].nice_length,O.max_chain_length=Vi[O.level].max_chain,O.strstart=0,O.block_start=0,O.lookahead=0,O.insert=0,O.match_length=O.prev_length=2,O.match_available=0,O.ins_h=0),X},d2=(D,X,O,ke,ye,Ae)=>{if(!D)return ne;let tt=1;if(X===ue&&(X=6),ke<0?(tt=0,ke=-ke):ke>15&&(tt=2,ke-=16),ye<1||ye>9||O!==Ee||ke<8||ke>15||X<0||X>9||Ae<0||Ae>je||ke===8&&tt!==1)return ut(D,ne);ke===8&&(ke=9);const Oe=new rh;return D.state=Oe,Oe.strm=D,Oe.status=At,Oe.wrap=tt,Oe.gzhead=null,Oe.w_bits=ke,Oe.w_size=1<<Oe.w_bits,Oe.w_mask=Oe.w_size-1,Oe.hash_bits=ye+7,Oe.hash_size=1<<Oe.hash_bits,Oe.hash_mask=Oe.hash_size-1,Oe.hash_shift=~~((Oe.hash_bits+3-1)/3),Oe.window=new Uint8Array(2*Oe.w_size),Oe.head=new Uint16Array(Oe.hash_size),Oe.prev=new Uint16Array(Oe.w_size),Oe.lit_bufsize=1<<ye+6,Oe.pending_buf_size=4*Oe.lit_bufsize,Oe.pending_buf=new Uint8Array(Oe.pending_buf_size),Oe.sym_buf=Oe.lit_bufsize,Oe.sym_end=3*(Oe.lit_bufsize-1),Oe.level=X,Oe.strategy=Ae,Oe.method=O,_d(D)};var fc={deflateInit:(D,X)=>d2(D,X,Ee,15,8,he),deflateInit2:d2,deflateReset:_d,deflateResetKeep:c2,deflateSetHeader:(D,X)=>ds(D)||D.state.wrap!==2?ne:(D.state.gzhead=X,ie),deflate:(D,X)=>{if(ds(D)||X>Z||X<0)return D?ut(D,ne):ne;const O=D.state;if(!D.output||D.avail_in!==0&&!D.input||O.status===lt&&X!==Q)return ut(D,D.avail_out===0?K:ne);const ke=O.last_flush;if(O.last_flush=X,O.pending!==0){if(fe(D),D.avail_out===0)return O.last_flush=-1,ie}else if(D.avail_in===0&&Te(X)<=Te(ke)&&X!==Q)return ut(D,K);if(O.status===lt&&D.avail_in!==0)return ut(D,K);if(O.status===At&&O.wrap===0&&(O.status=ft),O.status===At){let ye=Ee+(O.w_bits-8<<4)<<8,Ae=-1;if(Ae=O.strategy>=oe||O.level<2?0:O.level<6?1:O.level===6?2:3,ye|=Ae<<6,O.strstart!==0&&(ye|=32),ye+=31-ye%31,ht(O,ye),O.strstart!==0&&(ht(O,D.adler>>>16),ht(O,65535&D.adler)),D.adler=1,O.status=ft,fe(D),O.pending!==0)return O.last_flush=-1,ie}if(O.status===57){if(D.adler=0,Xe(O,31),Xe(O,139),Xe(O,8),O.gzhead)Xe(O,(O.gzhead.text?1:0)+(O.gzhead.hcrc?2:0)+(O.gzhead.extra?4:0)+(O.gzhead.name?8:0)+(O.gzhead.comment?16:0)),Xe(O,255&O.gzhead.time),Xe(O,O.gzhead.time>>8&255),Xe(O,O.gzhead.time>>16&255),Xe(O,O.gzhead.time>>24&255),Xe(O,O.level===9?2:O.strategy>=oe||O.level<2?4:0),Xe(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&(Xe(O,255&O.gzhead.extra.length),Xe(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(D.adler=Fe(D.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69;else if(Xe(O,0),Xe(O,0),Xe(O,0),Xe(O,0),Xe(O,0),Xe(O,O.level===9?2:O.strategy>=oe||O.level<2?4:0),Xe(O,3),O.status=ft,fe(D),O.pending!==0)return O.last_flush=-1,ie}if(O.status===69){if(O.gzhead.extra){let ye=O.pending,Ae=(65535&O.gzhead.extra.length)-O.gzindex;for(;O.pending+Ae>O.pending_buf_size;){let Oe=O.pending_buf_size-O.pending;if(O.pending_buf.set(O.gzhead.extra.subarray(O.gzindex,O.gzindex+Oe),O.pending),O.pending=O.pending_buf_size,O.gzhead.hcrc&&O.pending>ye&&(D.adler=Fe(D.adler,O.pending_buf,O.pending-ye,ye)),O.gzindex+=Oe,fe(D),O.pending!==0)return O.last_flush=-1,ie;ye=0,Ae-=Oe}let tt=new Uint8Array(O.gzhead.extra);O.pending_buf.set(tt.subarray(O.gzindex,O.gzindex+Ae),O.pending),O.pending+=Ae,O.gzhead.hcrc&&O.pending>ye&&(D.adler=Fe(D.adler,O.pending_buf,O.pending-ye,ye)),O.gzindex=0}O.status=73}if(O.status===73){if(O.gzhead.name){let ye,Ae=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>Ae&&(D.adler=Fe(D.adler,O.pending_buf,O.pending-Ae,Ae)),fe(D),O.pending!==0)return O.last_flush=-1,ie;Ae=0}ye=O.gzindex<O.gzhead.name.length?255&O.gzhead.name.charCodeAt(O.gzindex++):0,Xe(O,ye)}while(ye!==0);O.gzhead.hcrc&&O.pending>Ae&&(D.adler=Fe(D.adler,O.pending_buf,O.pending-Ae,Ae)),O.gzindex=0}O.status=91}if(O.status===91){if(O.gzhead.comment){let ye,Ae=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>Ae&&(D.adler=Fe(D.adler,O.pending_buf,O.pending-Ae,Ae)),fe(D),O.pending!==0)return O.last_flush=-1,ie;Ae=0}ye=O.gzindex<O.gzhead.comment.length?255&O.gzhead.comment.charCodeAt(O.gzindex++):0,Xe(O,ye)}while(ye!==0);O.gzhead.hcrc&&O.pending>Ae&&(D.adler=Fe(D.adler,O.pending_buf,O.pending-Ae,Ae))}O.status=103}if(O.status===103){if(O.gzhead.hcrc){if(O.pending+2>O.pending_buf_size&&(fe(D),O.pending!==0))return O.last_flush=-1,ie;Xe(O,255&D.adler),Xe(O,D.adler>>8&255),D.adler=0}if(O.status=ft,fe(D),O.pending!==0)return O.last_flush=-1,ie}if(D.avail_in!==0||O.lookahead!==0||X!==ae&&O.status!==lt){let ye=O.level===0?ji(O,X):O.strategy===oe?((Ae,tt)=>{let Oe;for(;;){if(Ae.lookahead===0&&(fi(Ae),Ae.lookahead===0)){if(tt===ae)return 1;break}if(Ae.match_length=0,Oe=H(Ae,0,Ae.window[Ae.strstart]),Ae.lookahead--,Ae.strstart++,Oe&&(be(Ae,!1),Ae.strm.avail_out===0))return 1}return Ae.insert=0,tt===Q?(be(Ae,!0),Ae.strm.avail_out===0?3:4):Ae.sym_next&&(be(Ae,!1),Ae.strm.avail_out===0)?1:2})(O,X):O.strategy===Me?((Ae,tt)=>{let Oe,wt,Ve,et;const ii=Ae.window;for(;;){if(Ae.lookahead<=ze){if(fi(Ae),Ae.lookahead<=ze&&tt===ae)return 1;if(Ae.lookahead===0)break}if(Ae.match_length=0,Ae.lookahead>=3&&Ae.strstart>0&&(Ve=Ae.strstart-1,wt=ii[Ve],wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve])){et=Ae.strstart+ze;do;while(wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&Ve<et);Ae.match_length=ze-(et-Ve),Ae.match_length>Ae.lookahead&&(Ae.match_length=Ae.lookahead)}if(Ae.match_length>=3?(Oe=H(Ae,1,Ae.match_length-3),Ae.lookahead-=Ae.match_length,Ae.strstart+=Ae.match_length,Ae.match_length=0):(Oe=H(Ae,0,Ae.window[Ae.strstart]),Ae.lookahead--,Ae.strstart++),Oe&&(be(Ae,!1),Ae.strm.avail_out===0))return 1}return Ae.insert=0,tt===Q?(be(Ae,!0),Ae.strm.avail_out===0?3:4):Ae.sym_next&&(be(Ae,!1),Ae.strm.avail_out===0)?1:2})(O,X):Vi[O.level].func(O,X);if(ye!==3&&ye!==4||(O.status=lt),ye===1||ye===3)return D.avail_out===0&&(O.last_flush=-1),ie;if(ye===2&&(X===Be?ee(O):X!==Z&&(Le(O,0,0,!1),X===pe&&(st(O.head),O.lookahead===0&&(O.strstart=0,O.block_start=0,O.insert=0))),fe(D),D.avail_out===0))return O.last_flush=-1,ie}return X!==Q?ie:O.wrap<=0?re:(O.wrap===2?(Xe(O,255&D.adler),Xe(O,D.adler>>8&255),Xe(O,D.adler>>16&255),Xe(O,D.adler>>24&255),Xe(O,255&D.total_in),Xe(O,D.total_in>>8&255),Xe(O,D.total_in>>16&255),Xe(O,D.total_in>>24&255)):(ht(O,D.adler>>>16),ht(O,65535&D.adler)),fe(D),O.wrap>0&&(O.wrap=-O.wrap),O.pending!==0?ie:re)},deflateEnd:D=>{if(ds(D))return ne;const X=D.state.status;return D.state=null,X===ft?ut(D,G):ie},deflateSetDictionary:(D,X)=>{let O=X.length;if(ds(D))return ne;const ke=D.state,ye=ke.wrap;if(ye===2||ye===1&&ke.status!==At||ke.lookahead)return ne;if(ye===1&&(D.adler=Ce(D.adler,X,O,0)),ke.wrap=0,O>=ke.w_size){ye===0&&(st(ke.head),ke.strstart=0,ke.block_start=0,ke.insert=0);let wt=new Uint8Array(ke.w_size);wt.set(X.subarray(O-ke.w_size,O),0),X=wt,O=ke.w_size}const Ae=D.avail_in,tt=D.next_in,Oe=D.input;for(D.avail_in=O,D.next_in=0,D.input=X,fi(ke);ke.lookahead>=3;){let wt=ke.strstart,Ve=ke.lookahead-2;do ke.ins_h=Ye(ke,ke.ins_h,ke.window[wt+3-1]),ke.prev[wt&ke.w_mask]=ke.head[ke.ins_h],ke.head[ke.ins_h]=wt,wt++;while(--Ve);ke.strstart=wt,ke.lookahead=2,fi(ke)}return ke.strstart+=ke.lookahead,ke.block_start=ke.strstart,ke.insert=ke.lookahead,ke.lookahead=0,ke.match_length=ke.prev_length=2,ke.match_available=0,D.next_in=tt,D.input=Oe,D.avail_in=Ae,ke.wrap=ye,ie},deflateInfo:"pako deflate (from Nodeca project)"};const Q9=(D,X)=>Object.prototype.hasOwnProperty.call(D,X);var G3=function(D){const X=Array.prototype.slice.call(arguments,1);for(;X.length;){const O=X.shift();if(O){if(typeof O!="object")throw new TypeError(O+"must be non-object");for(const ke in O)Q9(O,ke)&&(D[ke]=O[ke])}}return D},K3=D=>{let X=0;for(let ke=0,ye=D.length;ke<ye;ke++)X+=D[ke].length;const O=new Uint8Array(X);for(let ke=0,ye=0,Ae=D.length;ke<Ae;ke++){let tt=D[ke];O.set(tt,ye),ye+=tt.length}return O};let J3=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{J3=!1}const Fd=new Uint8Array(256);for(let D=0;D<256;D++)Fd[D]=D>=252?6:D>=248?5:D>=240?4:D>=224?3:D>=192?2:1;Fd[254]=Fd[254]=1;var u2=D=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(D);let X,O,ke,ye,Ae,tt=D.length,Oe=0;for(ye=0;ye<tt;ye++)O=D.charCodeAt(ye),(64512&O)==55296&&ye+1<tt&&(ke=D.charCodeAt(ye+1),(64512&ke)==56320&&(O=65536+(O-55296<<10)+(ke-56320),ye++)),Oe+=O<128?1:O<2048?2:O<65536?3:4;for(X=new Uint8Array(Oe),Ae=0,ye=0;Ae<Oe;ye++)O=D.charCodeAt(ye),(64512&O)==55296&&ye+1<tt&&(ke=D.charCodeAt(ye+1),(64512&ke)==56320&&(O=65536+(O-55296<<10)+(ke-56320),ye++)),O<128?X[Ae++]=O:O<2048?(X[Ae++]=192|O>>>6,X[Ae++]=128|63&O):O<65536?(X[Ae++]=224|O>>>12,X[Ae++]=128|O>>>6&63,X[Ae++]=128|63&O):(X[Ae++]=240|O>>>18,X[Ae++]=128|O>>>12&63,X[Ae++]=128|O>>>6&63,X[Ae++]=128|63&O);return X},se=(D,X)=>{const O=X||D.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(D.subarray(0,X));let ke,ye;const Ae=new Array(2*O);for(ye=0,ke=0;ke<O;){let tt=D[ke++];if(tt<128){Ae[ye++]=tt;continue}let Oe=Fd[tt];if(Oe>4)Ae[ye++]=65533,ke+=Oe-1;else{for(tt&=Oe===2?31:Oe===3?15:7;Oe>1&&ke<O;)tt=tt<<6|63&D[ke++],Oe--;Oe>1?Ae[ye++]=65533:tt<65536?Ae[ye++]=tt:(tt-=65536,Ae[ye++]=55296|tt>>10&1023,Ae[ye++]=56320|1023&tt)}}return((tt,Oe)=>{if(Oe<65534&&tt.subarray&&J3)return String.fromCharCode.apply(null,tt.length===Oe?tt:tt.subarray(0,Oe));let wt="";for(let Ve=0;Ve<Oe;Ve++)wt+=String.fromCharCode(tt[Ve]);return wt})(Ae,ye)},Ke=(D,X)=>{(X=X||D.length)>D.length&&(X=D.length);let O=X-1;for(;O>=0&&(192&D[O])==128;)O--;return O<0||O===0?X:O+Fd[D[O]]>X?O:X},nt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const at=Object.prototype.toString,{Z_NO_FLUSH:Ge,Z_SYNC_FLUSH:bt,Z_FULL_FLUSH:Lt,Z_FINISH:Ot,Z_OK:Ft,Z_STREAM_END:Yt,Z_DEFAULT_COMPRESSION:$t,Z_DEFAULT_STRATEGY:Xt,Z_DEFLATED:bi}=ge;function Ri(D){this.options=G3({level:$t,method:bi,chunkSize:16384,windowBits:15,memLevel:8,strategy:Xt},D||{});let X=this.options;X.raw&&X.windowBits>0?X.windowBits=-X.windowBits:X.gzip&&X.windowBits>0&&X.windowBits<16&&(X.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new nt,this.strm.avail_out=0;let O=fc.deflateInit2(this.strm,X.level,X.method,X.windowBits,X.memLevel,X.strategy);if(O!==Ft)throw new Error(ve[O]);if(X.header&&fc.deflateSetHeader(this.strm,X.header),X.dictionary){let ke;if(ke=typeof X.dictionary=="string"?u2(X.dictionary):at.call(X.dictionary)==="[object ArrayBuffer]"?new Uint8Array(X.dictionary):X.dictionary,O=fc.deflateSetDictionary(this.strm,ke),O!==Ft)throw new Error(ve[O]);this._dict_set=!0}}function Zi(D,X){const O=new Ri(X);if(O.push(D,!0),O.err)throw O.msg||ve[O.err];return O.result}Ri.prototype.push=function(D,X){const O=this.strm,ke=this.options.chunkSize;let ye,Ae;if(this.ended)return!1;for(Ae=X===~~X?X:X===!0?Ot:Ge,typeof D=="string"?O.input=u2(D):at.call(D)==="[object ArrayBuffer]"?O.input=new Uint8Array(D):O.input=D,O.next_in=0,O.avail_in=O.input.length;;)if(O.avail_out===0&&(O.output=new Uint8Array(ke),O.next_out=0,O.avail_out=ke),(Ae===bt||Ae===Lt)&&O.avail_out<=6)this.onData(O.output.subarray(0,O.next_out)),O.avail_out=0;else{if(ye=fc.deflate(O,Ae),ye===Yt)return O.next_out>0&&this.onData(O.output.subarray(0,O.next_out)),ye=fc.deflateEnd(this.strm),this.onEnd(ye),this.ended=!0,ye===Ft;if(O.avail_out!==0){if(Ae>0&&O.next_out>0)this.onData(O.output.subarray(0,O.next_out)),O.avail_out=0;else if(O.avail_in===0)break}else this.onData(O.output)}return!0},Ri.prototype.onData=function(D){this.chunks.push(D)},Ri.prototype.onEnd=function(D){D===Ft&&(this.result=K3(this.chunks)),this.chunks=[],this.err=D,this.msg=this.strm.msg};var yo={Deflate:Ri,deflate:Zi,deflateRaw:function(D,X){return(X=X||{}).raw=!0,Zi(D,X)},gzip:function(D,X){return(X=X||{}).gzip=!0,Zi(D,X)}};const Fi=16209;var qt=function(D,X){let O,ke,ye,Ae,tt,Oe,wt,Ve,et,ii,Ht,Ct,Ho,Bi,Qt,Li,ti,kt,ei,Di,Pt,wi,oi,Gt;const ui=D.state;O=D.next_in,oi=D.input,ke=O+(D.avail_in-5),ye=D.next_out,Gt=D.output,Ae=ye-(X-D.avail_out),tt=ye+(D.avail_out-257),Oe=ui.dmax,wt=ui.wsize,Ve=ui.whave,et=ui.wnext,ii=ui.window,Ht=ui.hold,Ct=ui.bits,Ho=ui.lencode,Bi=ui.distcode,Qt=(1<<ui.lenbits)-1,Li=(1<<ui.distbits)-1;e:do{Ct<15&&(Ht+=oi[O++]<<Ct,Ct+=8,Ht+=oi[O++]<<Ct,Ct+=8),ti=Ho[Ht&Qt];t:for(;;){if(kt=ti>>>24,Ht>>>=kt,Ct-=kt,kt=ti>>>16&255,kt===0)Gt[ye++]=65535&ti;else{if(!(16&kt)){if((64&kt)==0){ti=Ho[(65535&ti)+(Ht&(1<<kt)-1)];continue t}if(32&kt){ui.mode=16191;break e}D.msg="invalid literal/length code",ui.mode=Fi;break e}ei=65535&ti,kt&=15,kt&&(Ct<kt&&(Ht+=oi[O++]<<Ct,Ct+=8),ei+=Ht&(1<<kt)-1,Ht>>>=kt,Ct-=kt),Ct<15&&(Ht+=oi[O++]<<Ct,Ct+=8,Ht+=oi[O++]<<Ct,Ct+=8),ti=Bi[Ht&Li];i:for(;;){if(kt=ti>>>24,Ht>>>=kt,Ct-=kt,kt=ti>>>16&255,!(16&kt)){if((64&kt)==0){ti=Bi[(65535&ti)+(Ht&(1<<kt)-1)];continue i}D.msg="invalid distance code",ui.mode=Fi;break e}if(Di=65535&ti,kt&=15,Ct<kt&&(Ht+=oi[O++]<<Ct,Ct+=8,Ct<kt&&(Ht+=oi[O++]<<Ct,Ct+=8)),Di+=Ht&(1<<kt)-1,Di>Oe){D.msg="invalid distance too far back",ui.mode=Fi;break e}if(Ht>>>=kt,Ct-=kt,kt=ye-Ae,Di>kt){if(kt=Di-kt,kt>Ve&&ui.sane){D.msg="invalid distance too far back",ui.mode=Fi;break e}if(Pt=0,wi=ii,et===0){if(Pt+=wt-kt,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Di,wi=Gt}}else if(et<kt){if(Pt+=wt+et-kt,kt-=et,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);if(Pt=0,et<ei){kt=et,ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Di,wi=Gt}}}else if(Pt+=et-kt,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Di,wi=Gt}for(;ei>2;)Gt[ye++]=wi[Pt++],Gt[ye++]=wi[Pt++],Gt[ye++]=wi[Pt++],ei-=3;ei&&(Gt[ye++]=wi[Pt++],ei>1&&(Gt[ye++]=wi[Pt++]))}else{Pt=ye-Di;do Gt[ye++]=Gt[Pt++],Gt[ye++]=Gt[Pt++],Gt[ye++]=Gt[Pt++],ei-=3;while(ei>2);ei&&(Gt[ye++]=Gt[Pt++],ei>1&&(Gt[ye++]=Gt[Pt++]))}break}}break}}while(O<ke&&ye<tt);ei=Ct>>3,O-=ei,Ct-=ei<<3,Ht&=(1<<Ct)-1,D.next_in=O,D.next_out=ye,D.avail_in=O<ke?ke-O+5:5-(O-ke),D.avail_out=ye<tt?tt-ye+257:257-(ye-tt),ui.hold=Ht,ui.bits=Ct};const Fo=15,Sa=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),jn=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Ac=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Yr=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var Ta=(D,X,O,ke,ye,Ae,tt,Oe)=>{const wt=Oe.bits;let Ve,et,ii,Ht,Ct,Ho,Bi=0,Qt=0,Li=0,ti=0,kt=0,ei=0,Di=0,Pt=0,wi=0,oi=0,Gt=null;const ui=new Uint16Array(16),Xr=new Uint16Array(16);let A2,$3,e4,t4=null;for(Bi=0;Bi<=Fo;Bi++)ui[Bi]=0;for(Qt=0;Qt<ke;Qt++)ui[X[O+Qt]]++;for(kt=wt,ti=Fo;ti>=1&&ui[ti]===0;ti--);if(kt>ti&&(kt=ti),ti===0)return ye[Ae++]=20971520,ye[Ae++]=20971520,Oe.bits=1,0;for(Li=1;Li<ti&&ui[Li]===0;Li++);for(kt<Li&&(kt=Li),Pt=1,Bi=1;Bi<=Fo;Bi++)if(Pt<<=1,Pt-=ui[Bi],Pt<0)return-1;if(Pt>0&&(D===0||ti!==1))return-1;for(Xr[1]=0,Bi=1;Bi<Fo;Bi++)Xr[Bi+1]=Xr[Bi]+ui[Bi];for(Qt=0;Qt<ke;Qt++)X[O+Qt]!==0&&(tt[Xr[X[O+Qt]]++]=Qt);if(D===0?(Gt=t4=tt,Ho=20):D===1?(Gt=Sa,t4=jn,Ho=257):(Gt=Ac,t4=Yr,Ho=0),oi=0,Qt=0,Bi=Li,Ct=Ae,ei=kt,Di=0,ii=-1,wi=1<<kt,Ht=wi-1,D===1&&wi>852||D===2&&wi>592)return 1;for(;;){A2=Bi-Di,tt[Qt]+1<Ho?($3=0,e4=tt[Qt]):tt[Qt]>=Ho?($3=t4[tt[Qt]-Ho],e4=Gt[tt[Qt]-Ho]):($3=96,e4=0),Ve=1<<Bi-Di,et=1<<ei,Li=et;do et-=Ve,ye[Ct+(oi>>Di)+et]=A2<<24|$3<<16|e4|0;while(et!==0);for(Ve=1<<Bi-1;oi&Ve;)Ve>>=1;if(Ve!==0?(oi&=Ve-1,oi+=Ve):oi=0,Qt++,--ui[Bi]==0){if(Bi===ti)break;Bi=X[O+tt[Qt]]}if(Bi>kt&&(oi&Ht)!==ii){for(Di===0&&(Di=kt),Ct+=Li,ei=Bi-Di,Pt=1<<ei;ei+Di<ti&&(Pt-=ui[ei+Di],!(Pt<=0));)ei++,Pt<<=1;if(wi+=1<<ei,D===1&&wi>852||D===2&&wi>592)return 1;ii=oi&Ht,ye[ii]=kt<<24|ei<<16|Ct-Ae|0}}return oi!==0&&(ye[Ct+oi]=Bi-Di<<24|64<<16|0),Oe.bits=kt,0};const{Z_FINISH:po,Z_BLOCK:Cn,Z_TREES:kr,Z_OK:bo,Z_STREAM_END:Vn,Z_NEED_DICT:h2,Z_STREAM_ERROR:$o,Z_DATA_ERROR:hL,Z_MEM_ERROR:pL,Z_BUF_ERROR:Dpe,Z_DEFLATED:fL}=ge,Z3=16180,W3=16190,il=16191,G9=16192,K9=16194,Y3=16199,X3=16200,J9=16206,Bo=16209,AL=D=>(D>>>24&255)+(D>>>8&65280)+((65280&D)<<8)+((255&D)<<24);function _pe(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Od=D=>{if(!D)return 1;const X=D.state;return!X||X.strm!==D||X.mode<Z3||X.mode>16211?1:0},gL=D=>{if(Od(D))return $o;const X=D.state;return D.total_in=D.total_out=X.total=0,D.msg="",X.wrap&&(D.adler=1&X.wrap),X.mode=Z3,X.last=0,X.havedict=0,X.flags=-1,X.dmax=32768,X.head=null,X.hold=0,X.bits=0,X.lencode=X.lendyn=new Int32Array(852),X.distcode=X.distdyn=new Int32Array(592),X.sane=1,X.back=-1,bo},mL=D=>{if(Od(D))return $o;const X=D.state;return X.wsize=0,X.whave=0,X.wnext=0,gL(D)},vL=(D,X)=>{let O;if(Od(D))return $o;const ke=D.state;return X<0?(O=0,X=-X):(O=5+(X>>4),X<48&&(X&=15)),X&&(X<8||X>15)?$o:(ke.window!==null&&ke.wbits!==X&&(ke.window=null),ke.wrap=O,ke.wbits=X,mL(D))},yL=(D,X)=>{if(!D)return $o;const O=new _pe;D.state=O,O.strm=D,O.window=null,O.mode=Z3;const ke=vL(D,X);return ke!==bo&&(D.state=null),ke};let Z9,W9,bL=!0;const Fpe=D=>{if(bL){Z9=new Int32Array(512),W9=new Int32Array(32);let X=0;for(;X<144;)D.lens[X++]=8;for(;X<256;)D.lens[X++]=9;for(;X<280;)D.lens[X++]=7;for(;X<288;)D.lens[X++]=8;for(Ta(1,D.lens,0,288,Z9,0,D.work,{bits:9}),X=0;X<32;)D.lens[X++]=5;Ta(2,D.lens,0,32,W9,0,D.work,{bits:5}),bL=!1}D.lencode=Z9,D.lenbits=9,D.distcode=W9,D.distbits=5},wL=(D,X,O,ke)=>{let ye;const Ae=D.state;return Ae.window===null&&(Ae.wsize=1<<Ae.wbits,Ae.wnext=0,Ae.whave=0,Ae.window=new Uint8Array(Ae.wsize)),ke>=Ae.wsize?(Ae.window.set(X.subarray(O-Ae.wsize,O),0),Ae.wnext=0,Ae.whave=Ae.wsize):(ye=Ae.wsize-Ae.wnext,ye>ke&&(ye=ke),Ae.window.set(X.subarray(O-ke,O-ke+ye),Ae.wnext),(ke-=ye)?(Ae.window.set(X.subarray(O-ke,O),0),Ae.wnext=ke,Ae.whave=Ae.wsize):(Ae.wnext+=ye,Ae.wnext===Ae.wsize&&(Ae.wnext=0),Ae.whave<Ae.wsize&&(Ae.whave+=ye))),0};var ol={inflateReset:mL,inflateReset2:vL,inflateResetKeep:gL,inflateInit:D=>yL(D,15),inflateInit2:yL,inflate:(D,X)=>{let O,ke,ye,Ae,tt,Oe,wt,Ve,et,ii,Ht,Ct,Ho,Bi,Qt,Li,ti,kt,ei,Di,Pt,wi,oi=0;const Gt=new Uint8Array(4);let ui,Xr;const A2=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Od(D)||!D.output||!D.input&&D.avail_in!==0)return $o;O=D.state,O.mode===il&&(O.mode=G9),tt=D.next_out,ye=D.output,wt=D.avail_out,Ae=D.next_in,ke=D.input,Oe=D.avail_in,Ve=O.hold,et=O.bits,ii=Oe,Ht=wt,wi=bo;e:for(;;)switch(O.mode){case Z3:if(O.wrap===0){O.mode=G9;break}for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(2&O.wrap&&Ve===35615){O.wbits===0&&(O.wbits=15),O.check=0,Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0),Ve=0,et=0,O.mode=16181;break}if(O.head&&(O.head.done=!1),!(1&O.wrap)||(((255&Ve)<<8)+(Ve>>8))%31){D.msg="incorrect header check",O.mode=Bo;break}if((15&Ve)!==fL){D.msg="unknown compression method",O.mode=Bo;break}if(Ve>>>=4,et-=4,Pt=8+(15&Ve),O.wbits===0&&(O.wbits=Pt),Pt>15||Pt>O.wbits){D.msg="invalid window size",O.mode=Bo;break}O.dmax=1<<O.wbits,O.flags=0,D.adler=O.check=1,O.mode=512&Ve?16189:il,Ve=0,et=0;break;case 16181:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(O.flags=Ve,(255&O.flags)!==fL){D.msg="unknown compression method",O.mode=Bo;break}if(57344&O.flags){D.msg="unknown header flags set",O.mode=Bo;break}O.head&&(O.head.text=Ve>>8&1),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0)),Ve=0,et=0,O.mode=16182;case 16182:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.head&&(O.head.time=Ve),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,Gt[2]=Ve>>>16&255,Gt[3]=Ve>>>24&255,O.check=Fe(O.check,Gt,4,0)),Ve=0,et=0,O.mode=16183;case 16183:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.head&&(O.head.xflags=255&Ve,O.head.os=Ve>>8),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0)),Ve=0,et=0,O.mode=16184;case 16184:if(1024&O.flags){for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.length=Ve,O.head&&(O.head.extra_len=Ve),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0)),Ve=0,et=0}else O.head&&(O.head.extra=null);O.mode=16185;case 16185:if(1024&O.flags&&(Ct=O.length,Ct>Oe&&(Ct=Oe),Ct&&(O.head&&(Pt=O.head.extra_len-O.length,O.head.extra||(O.head.extra=new Uint8Array(O.head.extra_len)),O.head.extra.set(ke.subarray(Ae,Ae+Ct),Pt)),512&O.flags&&4&O.wrap&&(O.check=Fe(O.check,ke,Ct,Ae)),Oe-=Ct,Ae+=Ct,O.length-=Ct),O.length))break e;O.length=0,O.mode=16186;case 16186:if(2048&O.flags){if(Oe===0)break e;Ct=0;do Pt=ke[Ae+Ct++],O.head&&Pt&&O.length<65536&&(O.head.name+=String.fromCharCode(Pt));while(Pt&&Ct<Oe);if(512&O.flags&&4&O.wrap&&(O.check=Fe(O.check,ke,Ct,Ae)),Oe-=Ct,Ae+=Ct,Pt)break e}else O.head&&(O.head.name=null);O.length=0,O.mode=16187;case 16187:if(4096&O.flags){if(Oe===0)break e;Ct=0;do Pt=ke[Ae+Ct++],O.head&&Pt&&O.length<65536&&(O.head.comment+=String.fromCharCode(Pt));while(Pt&&Ct<Oe);if(512&O.flags&&4&O.wrap&&(O.check=Fe(O.check,ke,Ct,Ae)),Oe-=Ct,Ae+=Ct,Pt)break e}else O.head&&(O.head.comment=null);O.mode=16188;case 16188:if(512&O.flags){for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(4&O.wrap&&Ve!==(65535&O.check)){D.msg="header crc mismatch",O.mode=Bo;break}Ve=0,et=0}O.head&&(O.head.hcrc=O.flags>>9&1,O.head.done=!0),D.adler=O.check=0,O.mode=il;break;case 16189:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}D.adler=O.check=AL(Ve),Ve=0,et=0,O.mode=W3;case W3:if(O.havedict===0)return D.next_out=tt,D.avail_out=wt,D.next_in=Ae,D.avail_in=Oe,O.hold=Ve,O.bits=et,h2;D.adler=O.check=1,O.mode=il;case il:if(X===Cn||X===kr)break e;case G9:if(O.last){Ve>>>=7&et,et-=7&et,O.mode=J9;break}for(;et<3;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}switch(O.last=1&Ve,Ve>>>=1,et-=1,3&Ve){case 0:O.mode=16193;break;case 1:if(Fpe(O),O.mode=Y3,X===kr){Ve>>>=2,et-=2;break e}break;case 2:O.mode=16196;break;case 3:D.msg="invalid block type",O.mode=Bo}Ve>>>=2,et-=2;break;case 16193:for(Ve>>>=7&et,et-=7&et;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if((65535&Ve)!=(Ve>>>16^65535)){D.msg="invalid stored block lengths",O.mode=Bo;break}if(O.length=65535&Ve,Ve=0,et=0,O.mode=K9,X===kr)break e;case K9:O.mode=16195;case 16195:if(Ct=O.length,Ct){if(Ct>Oe&&(Ct=Oe),Ct>wt&&(Ct=wt),Ct===0)break e;ye.set(ke.subarray(Ae,Ae+Ct),tt),Oe-=Ct,Ae+=Ct,wt-=Ct,tt+=Ct,O.length-=Ct;break}O.mode=il;break;case 16196:for(;et<14;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(O.nlen=257+(31&Ve),Ve>>>=5,et-=5,O.ndist=1+(31&Ve),Ve>>>=5,et-=5,O.ncode=4+(15&Ve),Ve>>>=4,et-=4,O.nlen>286||O.ndist>30){D.msg="too many length or distance symbols",O.mode=Bo;break}O.have=0,O.mode=16197;case 16197:for(;O.have<O.ncode;){for(;et<3;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.lens[A2[O.have++]]=7&Ve,Ve>>>=3,et-=3}for(;O.have<19;)O.lens[A2[O.have++]]=0;if(O.lencode=O.lendyn,O.lenbits=7,ui={bits:O.lenbits},wi=Ta(0,O.lens,0,19,O.lencode,0,O.work,ui),O.lenbits=ui.bits,wi){D.msg="invalid code lengths set",O.mode=Bo;break}O.have=0,O.mode=16198;case 16198:for(;O.have<O.nlen+O.ndist;){for(;oi=O.lencode[Ve&(1<<O.lenbits)-1],Qt=oi>>>24,Li=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(ti<16)Ve>>>=Qt,et-=Qt,O.lens[O.have++]=ti;else{if(ti===16){for(Xr=Qt+2;et<Xr;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(Ve>>>=Qt,et-=Qt,O.have===0){D.msg="invalid bit length repeat",O.mode=Bo;break}Pt=O.lens[O.have-1],Ct=3+(3&Ve),Ve>>>=2,et-=2}else if(ti===17){for(Xr=Qt+3;et<Xr;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=Qt,et-=Qt,Pt=0,Ct=3+(7&Ve),Ve>>>=3,et-=3}else{for(Xr=Qt+7;et<Xr;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=Qt,et-=Qt,Pt=0,Ct=11+(127&Ve),Ve>>>=7,et-=7}if(O.have+Ct>O.nlen+O.ndist){D.msg="invalid bit length repeat",O.mode=Bo;break}for(;Ct--;)O.lens[O.have++]=Pt}}if(O.mode===Bo)break;if(O.lens[256]===0){D.msg="invalid code -- missing end-of-block",O.mode=Bo;break}if(O.lenbits=9,ui={bits:O.lenbits},wi=Ta(1,O.lens,0,O.nlen,O.lencode,0,O.work,ui),O.lenbits=ui.bits,wi){D.msg="invalid literal/lengths set",O.mode=Bo;break}if(O.distbits=6,O.distcode=O.distdyn,ui={bits:O.distbits},wi=Ta(2,O.lens,O.nlen,O.ndist,O.distcode,0,O.work,ui),O.distbits=ui.bits,wi){D.msg="invalid distances set",O.mode=Bo;break}if(O.mode=Y3,X===kr)break e;case Y3:O.mode=X3;case X3:if(Oe>=6&&wt>=258){D.next_out=tt,D.avail_out=wt,D.next_in=Ae,D.avail_in=Oe,O.hold=Ve,O.bits=et,qt(D,Ht),tt=D.next_out,ye=D.output,wt=D.avail_out,Ae=D.next_in,ke=D.input,Oe=D.avail_in,Ve=O.hold,et=O.bits,O.mode===il&&(O.back=-1);break}for(O.back=0;oi=O.lencode[Ve&(1<<O.lenbits)-1],Qt=oi>>>24,Li=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(Li&&(240&Li)==0){for(kt=Qt,ei=Li,Di=ti;oi=O.lencode[Di+((Ve&(1<<kt+ei)-1)>>kt)],Qt=oi>>>24,Li=oi>>>16&255,ti=65535&oi,!(kt+Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=kt,et-=kt,O.back+=kt}if(Ve>>>=Qt,et-=Qt,O.back+=Qt,O.length=ti,Li===0){O.mode=16205;break}if(32&Li){O.back=-1,O.mode=il;break}if(64&Li){D.msg="invalid literal/length code",O.mode=Bo;break}O.extra=15&Li,O.mode=16201;case 16201:if(O.extra){for(Xr=O.extra;et<Xr;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.length+=Ve&(1<<O.extra)-1,Ve>>>=O.extra,et-=O.extra,O.back+=O.extra}O.was=O.length,O.mode=16202;case 16202:for(;oi=O.distcode[Ve&(1<<O.distbits)-1],Qt=oi>>>24,Li=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if((240&Li)==0){for(kt=Qt,ei=Li,Di=ti;oi=O.distcode[Di+((Ve&(1<<kt+ei)-1)>>kt)],Qt=oi>>>24,Li=oi>>>16&255,ti=65535&oi,!(kt+Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=kt,et-=kt,O.back+=kt}if(Ve>>>=Qt,et-=Qt,O.back+=Qt,64&Li){D.msg="invalid distance code",O.mode=Bo;break}O.offset=ti,O.extra=15&Li,O.mode=16203;case 16203:if(O.extra){for(Xr=O.extra;et<Xr;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.offset+=Ve&(1<<O.extra)-1,Ve>>>=O.extra,et-=O.extra,O.back+=O.extra}if(O.offset>O.dmax){D.msg="invalid distance too far back",O.mode=Bo;break}O.mode=16204;case 16204:if(wt===0)break e;if(Ct=Ht-wt,O.offset>Ct){if(Ct=O.offset-Ct,Ct>O.whave&&O.sane){D.msg="invalid distance too far back",O.mode=Bo;break}Ct>O.wnext?(Ct-=O.wnext,Ho=O.wsize-Ct):Ho=O.wnext-Ct,Ct>O.length&&(Ct=O.length),Bi=O.window}else Bi=ye,Ho=tt-O.offset,Ct=O.length;Ct>wt&&(Ct=wt),wt-=Ct,O.length-=Ct;do ye[tt++]=Bi[Ho++];while(--Ct);O.length===0&&(O.mode=X3);break;case 16205:if(wt===0)break e;ye[tt++]=O.length,wt--,O.mode=X3;break;case J9:if(O.wrap){for(;et<32;){if(Oe===0)break e;Oe--,Ve|=ke[Ae++]<<et,et+=8}if(Ht-=wt,D.total_out+=Ht,O.total+=Ht,4&O.wrap&&Ht&&(D.adler=O.check=O.flags?Fe(O.check,ye,Ht,tt-Ht):Ce(O.check,ye,Ht,tt-Ht)),Ht=wt,4&O.wrap&&(O.flags?Ve:AL(Ve))!==O.check){D.msg="incorrect data check",O.mode=Bo;break}Ve=0,et=0}O.mode=16207;case 16207:if(O.wrap&&O.flags){for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(4&O.wrap&&Ve!==(4294967295&O.total)){D.msg="incorrect length check",O.mode=Bo;break}Ve=0,et=0}O.mode=16208;case 16208:wi=Vn;break e;case Bo:wi=hL;break e;case 16210:return pL;default:return $o}return D.next_out=tt,D.avail_out=wt,D.next_in=Ae,D.avail_in=Oe,O.hold=Ve,O.bits=et,(O.wsize||Ht!==D.avail_out&&O.mode<Bo&&(O.mode<J9||X!==po))&&wL(D,D.output,D.next_out,Ht-D.avail_out),ii-=D.avail_in,Ht-=D.avail_out,D.total_in+=ii,D.total_out+=Ht,O.total+=Ht,4&O.wrap&&Ht&&(D.adler=O.check=O.flags?Fe(O.check,ye,Ht,D.next_out-Ht):Ce(O.check,ye,Ht,D.next_out-Ht)),D.data_type=O.bits+(O.last?64:0)+(O.mode===il?128:0)+(O.mode===Y3||O.mode===K9?256:0),(ii===0&&Ht===0||X===po)&&wi===bo&&(wi=Dpe),wi},inflateEnd:D=>{if(Od(D))return $o;let X=D.state;return X.window&&(X.window=null),D.state=null,bo},inflateGetHeader:(D,X)=>{if(Od(D))return $o;const O=D.state;return(2&O.wrap)==0?$o:(O.head=X,X.done=!1,bo)},inflateSetDictionary:(D,X)=>{const O=X.length;let ke,ye,Ae;return Od(D)?$o:(ke=D.state,ke.wrap!==0&&ke.mode!==W3?$o:ke.mode===W3&&(ye=1,ye=Ce(ye,X,O,0),ye!==ke.check)?hL:(Ae=wL(D,X,O,O),Ae?(ke.mode=16210,pL):(ke.havedict=1,bo)))},inflateInfo:"pako inflate (from Nodeca project)"},Ope=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const CL=Object.prototype.toString,{Z_NO_FLUSH:Upe,Z_FINISH:Npe,Z_OK:p2,Z_STREAM_END:Y9,Z_NEED_DICT:X9,Z_STREAM_ERROR:jpe,Z_DATA_ERROR:xL,Z_MEM_ERROR:Vpe}=ge;function f2(D){this.options=G3({chunkSize:65536,windowBits:15,to:""},D||{});const X=this.options;X.raw&&X.windowBits>=0&&X.windowBits<16&&(X.windowBits=-X.windowBits,X.windowBits===0&&(X.windowBits=-15)),!(X.windowBits>=0&&X.windowBits<16)||D&&D.windowBits||(X.windowBits+=32),X.windowBits>15&&X.windowBits<48&&(15&X.windowBits)==0&&(X.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new nt,this.strm.avail_out=0;let O=ol.inflateInit2(this.strm,X.windowBits);if(O!==p2)throw new Error(ve[O]);if(this.header=new Ope,ol.inflateGetHeader(this.strm,this.header),X.dictionary&&(typeof X.dictionary=="string"?X.dictionary=u2(X.dictionary):CL.call(X.dictionary)==="[object ArrayBuffer]"&&(X.dictionary=new Uint8Array(X.dictionary)),X.raw&&(O=ol.inflateSetDictionary(this.strm,X.dictionary),O!==p2)))throw new Error(ve[O])}function $9(D,X){const O=new f2(X);if(O.push(D),O.err)throw O.msg||ve[O.err];return O.result}f2.prototype.push=function(D,X){const O=this.strm,ke=this.options.chunkSize,ye=this.options.dictionary;let Ae,tt,Oe;if(this.ended)return!1;for(tt=X===~~X?X:X===!0?Npe:Upe,CL.call(D)==="[object ArrayBuffer]"?O.input=new Uint8Array(D):O.input=D,O.next_in=0,O.avail_in=O.input.length;;){for(O.avail_out===0&&(O.output=new Uint8Array(ke),O.next_out=0,O.avail_out=ke),Ae=ol.inflate(O,tt),Ae===X9&&ye&&(Ae=ol.inflateSetDictionary(O,ye),Ae===p2?Ae=ol.inflate(O,tt):Ae===xL&&(Ae=X9));O.avail_in>0&&Ae===Y9&&O.state.wrap>0&&D[O.next_in]!==0;)ol.inflateReset(O),Ae=ol.inflate(O,tt);switch(Ae){case jpe:case xL:case X9:case Vpe:return this.onEnd(Ae),this.ended=!0,!1}if(Oe=O.avail_out,O.next_out&&(O.avail_out===0||Ae===Y9))if(this.options.to==="string"){let wt=Ke(O.output,O.next_out),Ve=O.next_out-wt,et=se(O.output,wt);O.next_out=Ve,O.avail_out=ke-Ve,Ve&&O.output.set(O.output.subarray(wt,wt+Ve),0),this.onData(et)}else this.onData(O.output.length===O.next_out?O.output:O.output.subarray(0,O.next_out));if(Ae!==p2||Oe!==0){if(Ae===Y9)return Ae=ol.inflateEnd(this.strm),this.onEnd(Ae),this.ended=!0,!0;if(O.avail_in===0)break}}return!0},f2.prototype.onData=function(D){this.chunks.push(D)},f2.prototype.onEnd=function(D){D===p2&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=K3(this.chunks)),this.chunks=[],this.err=D,this.msg=this.strm.msg};var Hpe={Inflate:f2,inflate:$9,inflateRaw:function(D,X){return(X=X||{}).raw=!0,$9(D,X)},ungzip:$9};const{Deflate:zpe,deflate:qpe,deflateRaw:Qpe,gzip:Gpe}=yo,{Inflate:Kpe,inflate:Jpe,inflateRaw:Zpe,ungzip:Wpe}=Hpe;var kL=zpe,ML=qpe,BL=Qpe,EL=Gpe,PL=Kpe,IL=Jpe,SL=Zpe,TL=Wpe,RL=ge,Ype={Deflate:kL,deflate:ML,deflateRaw:BL,gzip:EL,Inflate:PL,inflate:IL,inflateRaw:SL,ungzip:TL,constants:RL};t.Deflate=kL,t.Inflate=PL,t.constants=RL,t.default=Ype,t.deflate=ML,t.deflateRaw=BL,t.gzip=EL,t.inflate=IL,t.inflateRaw=SL,t.ungzip=TL,Object.defineProperty(t,"__esModule",{value:!0})}))})(r7,r7.exports)),r7.exports}var cW=ASt();const gSt=J2(cW),$a=Xpe({__proto__:null,default:gSt},[cW]);let An=window.pako||$a;An.inflate||(An=An.default);const mSt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function vSt(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],meshPositions:i[4],meshIndices:i[5],meshEdgesIndices:i[6],meshColors:i[7],entityIDs:i[8],entityMeshes:i[9],entityIsObjects:i[10],positionsDecodeMatrix:i[11]}}function ySt(i){return{positions:new Uint16Array(An.inflate(i.positions).buffer),normals:new Int8Array(An.inflate(i.normals).buffer),indices:new Uint32Array(An.inflate(i.indices).buffer),edgeIndices:new Uint32Array(An.inflate(i.edgeIndices).buffer),meshPositions:new Uint32Array(An.inflate(i.meshPositions).buffer),meshIndices:new Uint32Array(An.inflate(i.meshIndices).buffer),meshEdgesIndices:new Uint32Array(An.inflate(i.meshEdgesIndices).buffer),meshColors:new Uint8Array(An.inflate(i.meshColors).buffer),entityIDs:An.inflate(i.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(An.inflate(i.entityMeshes).buffer),entityIsObjects:new Uint8Array(An.inflate(i.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(An.inflate(i.positionsDecodeMatrix).buffer)}}function bSt(i,e,t,o,n,r){r.getNextId(),o.positionsCompression="precompressed",o.normalsCompression="precompressed";const a=t.positions,s=t.normals,l=t.indices,c=t.edgeIndices,d=t.meshPositions,u=t.meshIndices,h=t.meshEdgesIndices,p=t.meshColors,A=JSON.parse(t.entityIDs),f=t.entityMeshes,m=t.entityIsObjects,g=d.length,y=f.length;for(let v=0;v<y;v++){const w=A[v],x=e.globalizeObjectIds?C.globalizeObjectId(o.id,w):w,k=i.metaScene.metaObjects[x],B={},E={};if(k){if(e.excludeTypesMap&&k.type&&e.excludeTypesMap[k.type]||e.includeTypesMap&&k.type&&!e.includeTypesMap[k.type])continue;const T=e.objectDefaults?e.objectDefaults[k.type]||e.objectDefaults.DEFAULT:null;T&&(T.visible===!1&&(B.visible=!1),T.pickable===!1&&(B.pickable=!1),T.colorize&&(E.color=T.colorize),T.opacity!==void 0&&T.opacity!==null&&(E.opacity=T.opacity))}else if(e.excludeUnclassifiedObjects)continue;const P=v===y-1,R=[];for(let T=f[v],L=P?f.length:f[v+1];T<L;T++){const F=T===g-1,U=x+".mesh."+T,q=mSt(p.subarray(T*4,T*4+3)),V=p[T*4+3]/255;o.createMesh(mt.apply(E,{id:U,primitive:"triangles",positionsCompressed:a.subarray(d[T],F?a.length:d[T+1]),normalsCompressed:s.subarray(d[T],F?a.length:d[T+1]),indices:l.subarray(u[T],F?l.length:u[T+1]),edgeIndices:c.subarray(h[T],F?c.length:h[T+1]),positionsDecodeMatrix:t.positionsDecodeMatrix,color:q,opacity:V})),R.push(U)}o.createEntity(mt.apply(B,{id:x,isObject:m[v]===1,meshIds:R}))}}const dW={version:1,parse:function(i,e,t,o,n,r){const a=vSt(t),s=ySt(a);bSt(i,e,s,o,n,r)}};let mr=window.pako||$a;mr.inflate||(mr=mr.default);function wSt(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],meshPositions:i[4],meshIndices:i[5],meshEdgesIndices:i[6],meshColors:i[7],entityIDs:i[8],entityMeshes:i[9],entityIsObjects:i[10],positionsDecodeMatrix:i[11],entityMeshIds:i[12],entityMatrices:i[13],entityUsesInstancing:i[14]}}function CSt(i){return{positions:new Uint16Array(mr.inflate(i.positions).buffer),normals:new Int8Array(mr.inflate(i.normals).buffer),indices:new Uint32Array(mr.inflate(i.indices).buffer),edgeIndices:new Uint32Array(mr.inflate(i.edgeIndices).buffer),meshPositions:new Uint32Array(mr.inflate(i.meshPositions).buffer),meshIndices:new Uint32Array(mr.inflate(i.meshIndices).buffer),meshEdgesIndices:new Uint32Array(mr.inflate(i.meshEdgesIndices).buffer),meshColors:new Uint8Array(mr.inflate(i.meshColors).buffer),entityIDs:mr.inflate(i.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(mr.inflate(i.entityMeshes).buffer),entityIsObjects:new Uint8Array(mr.inflate(i.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(mr.inflate(i.positionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(mr.inflate(i.entityMeshIds).buffer),entityMatrices:new Float32Array(mr.inflate(i.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(mr.inflate(i.entityUsesInstancing).buffer)}}const xSt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function kSt(i,e,t,o,n,r){const a=r.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=t.positions,l=t.normals,c=t.indices,d=t.edgeIndices,u=t.meshPositions,h=t.meshIndices,p=t.meshEdgesIndices,A=t.meshColors,f=JSON.parse(t.entityIDs),m=t.entityMeshes,g=t.entityIsObjects,y=t.entityMeshIds,v=t.entityMatrices,w=t.entityUsesInstancing,x=u.length,k=m.length,B={};for(let E=0;E<k;E++){const P=f[E],R=e.globalizeObjectIds?C.globalizeObjectId(o.id,P):P,T=i.metaScene.metaObjects[R],L={},F={},U=v.subarray(E*16,E*16+16);if(T){if(e.excludeTypesMap&&T.type&&e.excludeTypesMap[T.type]||e.includeTypesMap&&T.type&&!e.includeTypesMap[T.type])continue;const W=e.objectDefaults?e.objectDefaults[T.type]||e.objectDefaults.DEFAULT:null;W&&(W.visible===!1&&(L.visible=!1),W.pickable===!1&&(L.pickable=!1),W.colorize&&(F.color=W.colorize),W.opacity!==void 0&&W.opacity!==null&&(F.opacity=W.opacity))}else if(e.excludeUnclassifiedObjects)continue;const q=E===k-1,V=[];for(let W=m[E],Y=q?y.length:m[E+1];W<Y;W++){const $=y[W],me=$===x-1,Ie=r.getNextId(),Se=xSt(A.subarray($*4,$*4+3)),qe=A[$*4+3]/255,Qe=s.subarray(u[$],me?s.length:u[$+1]),Ce=l.subarray(u[$],me?s.length:u[$+1]),De=c.subarray(h[$],me?c.length:h[$+1]),Fe=d.subarray(p[$],me?d.length:p[$+1]);if(w[E]===1){const ve=`${a}.geometry.${Ie}.${$}`;ve in B||(o.createGeometry({id:ve,positionsCompressed:Qe,normalsCompressed:Ce,indices:De,edgeIndices:Fe,primitive:"triangles",positionsDecodeMatrix:t.positionsDecodeMatrix}),B[ve]=!0),o.createMesh(mt.apply(F,{id:Ie,color:Se,opacity:qe,matrix:U,geometryId:ve})),V.push(Ie)}else o.createMesh(mt.apply(F,{id:Ie,primitive:"triangles",positionsCompressed:Qe,normalsCompressed:Ce,indices:De,edgeIndices:Fe,positionsDecodeMatrix:t.positionsDecodeMatrix,color:Se,opacity:qe})),V.push(Ie)}V.length&&o.createEntity(mt.apply(L,{id:R,isObject:g[E]===1,meshIds:V}))}}const uW={version:2,parse:function(i,e,t,o,n,r){const a=wSt(t),s=CSt(a);kSt(i,e,s,o,n,r)}};let cr=window.pako||$a;cr.inflate||(cr=cr.default);function MSt(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],meshPositions:i[4],meshIndices:i[5],meshEdgesIndices:i[6],meshColors:i[7],entityIDs:i[8],entityMeshes:i[9],entityIsObjects:i[10],instancedPositionsDecodeMatrix:i[11],batchedPositionsDecodeMatrix:i[12],entityMeshIds:i[13],entityMatrices:i[14],entityUsesInstancing:i[15]}}function BSt(i){return{positions:new Uint16Array(cr.inflate(i.positions).buffer),normals:new Int8Array(cr.inflate(i.normals).buffer),indices:new Uint32Array(cr.inflate(i.indices).buffer),edgeIndices:new Uint32Array(cr.inflate(i.edgeIndices).buffer),meshPositions:new Uint32Array(cr.inflate(i.meshPositions).buffer),meshIndices:new Uint32Array(cr.inflate(i.meshIndices).buffer),meshEdgesIndices:new Uint32Array(cr.inflate(i.meshEdgesIndices).buffer),meshColors:new Uint8Array(cr.inflate(i.meshColors).buffer),entityIDs:cr.inflate(i.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(cr.inflate(i.entityMeshes).buffer),entityIsObjects:new Uint8Array(cr.inflate(i.entityIsObjects).buffer),instancedPositionsDecodeMatrix:new Float32Array(cr.inflate(i.instancedPositionsDecodeMatrix).buffer),batchedPositionsDecodeMatrix:new Float32Array(cr.inflate(i.batchedPositionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(cr.inflate(i.entityMeshIds).buffer),entityMatrices:new Float32Array(cr.inflate(i.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(cr.inflate(i.entityUsesInstancing).buffer)}}const ESt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function PSt(i,e,t,o,n,r){const a=r.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=t.positions,l=t.normals,c=t.indices,d=t.edgeIndices,u=t.meshPositions,h=t.meshIndices,p=t.meshEdgesIndices,A=t.meshColors,f=JSON.parse(t.entityIDs),m=t.entityMeshes,g=t.entityIsObjects,y=t.entityMeshIds,v=t.entityMatrices,w=t.entityUsesInstancing,x=u.length,k=m.length,B={};for(let F=0;F<k;F++){const U=f[F],q=e.globalizeObjectIds?C.globalizeObjectId(o.id,U):U,V=i.metaScene.metaObjects[q],W={},Y={},$=v.subarray(F*16,F*16+16);if(V){if(e.excludeTypesMap&&V.type&&e.excludeTypesMap[V.type]||e.includeTypesMap&&V.type&&!e.includeTypesMap[V.type])continue;const Se=e.objectDefaults?e.objectDefaults[V.type]||e.objectDefaults.DEFAULT:null;Se&&(Se.visible===!1&&(W.visible=!1),Se.pickable===!1&&(W.pickable=!1),Se.colorize&&(Y.color=Se.colorize),Se.opacity!==void 0&&Se.opacity!==null&&(Y.opacity=Se.opacity))}else if(e.excludeUnclassifiedObjects)continue;const me=F===k-1,Ie=[];for(let Se=m[F],qe=me?y.length:m[F+1];Se<qe;Se++){var E=y[Se];const Qe=E===x-1,Ce=`${a}.${q}.mesh.${E}`,De=ESt(A.subarray(E*4,E*4+3)),Fe=A[E*4+3]/255;var P=s.subarray(u[E],Qe?s.length:u[E+1]),R=l.subarray(u[E],Qe?s.length:u[E+1]),T=c.subarray(h[E],Qe?c.length:h[E+1]),L=d.subarray(p[E],Qe?d.length:p[E+1]);if(w[F]===1){const ve=`${a}.geometry.${Ce}.${E}`;ve in B||(o.createGeometry({id:ve,positionsCompressed:P,normalsCompressed:R,indices:T,edgeIndices:L,primitive:"triangles",positionsDecodeMatrix:t.instancedPositionsDecodeMatrix}),B[ve]=!0),o.createMesh(mt.apply(Y,{id:Ce,color:De,opacity:Fe,matrix:$,geometryId:ve})),Ie.push(Ce)}else o.createMesh(mt.apply(Y,{id:Ce,primitive:"triangles",positionsCompressed:P,normalsCompressed:R,indices:T,edgeIndices:L,positionsDecodeMatrix:t.batchedPositionsDecodeMatrix,color:De,opacity:Fe})),Ie.push(Ce)}Ie.length&&o.createEntity(mt.apply(W,{id:q,isObject:g[F]===1,meshIds:Ie}))}}const hW={version:3,parse:function(i,e,t,o,n,r){const a=MSt(t),s=BSt(a);PSt(i,e,s,o,n,r)}};let vr=window.pako||$a;vr.inflate||(vr=vr.default);function ISt(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],decodeMatrices:i[4],matrices:i[5],eachPrimitivePositionsAndNormalsPortion:i[6],eachPrimitiveIndicesPortion:i[7],eachPrimitiveEdgeIndicesPortion:i[8],eachPrimitiveDecodeMatricesPortion:i[9],eachPrimitiveColor:i[10],primitiveInstances:i[11],eachEntityId:i[12],eachEntityPrimitiveInstancesPortion:i[13],eachEntityMatricesPortion:i[14],eachEntityMatrix:i[15]}}function SSt(i){return{positions:new Uint16Array(vr.inflate(i.positions).buffer),normals:new Int8Array(vr.inflate(i.normals).buffer),indices:new Uint32Array(vr.inflate(i.indices).buffer),edgeIndices:new Uint32Array(vr.inflate(i.edgeIndices).buffer),decodeMatrices:new Float32Array(vr.inflate(i.decodeMatrices).buffer),matrices:new Float32Array(vr.inflate(i.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(vr.inflate(i.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(vr.inflate(i.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(vr.inflate(i.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveDecodeMatricesPortion:new Uint32Array(vr.inflate(i.eachPrimitiveDecodeMatricesPortion).buffer),eachPrimitiveColor:new Uint8Array(vr.inflate(i.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(vr.inflate(i.primitiveInstances).buffer),eachEntityId:vr.inflate(i.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(vr.inflate(i.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(vr.inflate(i.eachEntityMatricesPortion).buffer)}}const TSt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function RSt(i,e,t,o,n,r){const a=r.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=t.positions,l=t.normals,c=t.indices,d=t.edgeIndices,u=t.decodeMatrices,h=t.matrices,p=t.eachPrimitivePositionsAndNormalsPortion,A=t.eachPrimitiveIndicesPortion,f=t.eachPrimitiveEdgeIndicesPortion,m=t.eachPrimitiveDecodeMatricesPortion,g=t.eachPrimitiveColor,y=t.primitiveInstances,v=JSON.parse(t.eachEntityId),w=t.eachEntityPrimitiveInstancesPortion,x=t.eachEntityMatricesPortion,k=p.length,B=y.length,E=new Uint8Array(k),P=new Uint32Array(k),R=v.length;for(let F=0;F<k;F++)P[F]=F;P.sort((F,U)=>m[F]<m[U]?-1:m[F]>m[U]?1:0);for(let F=0;F<B;F++){const U=y[F];E[U]++}const T={};for(let F=0;F<R;F++){const U=R-1,q=F===U,V=w[F],W=q?w[U]:w[F+1];for(let Y=V;Y<W;Y++){const $=y[Y];E[$]>1||(T[$]=F)}}for(let F=0;F<k;F++){const U=P[F],q=U===k-1,V=E[U]>1,W=TSt(g.subarray(U*4,U*4+3)),Y=g[U*4+3]/255,$=s.subarray(p[U],q?s.length:p[U+1]),me=l.subarray(p[U],q?l.length:p[U+1]),Ie=c.subarray(A[U],q?c.length:A[U+1]),Se=d.subarray(f[U],q?d.length:f[U+1]),qe=u.subarray(m[U],m[U]+16);if(V){const Qe=`${a}-geometry.${U}`;o.createGeometry({id:Qe,primitive:"triangles",positionsCompressed:$,normalsCompressed:me,indices:Ie,edgeIndices:Se,positionsDecodeMatrix:qe})}else{const Qe=`${a}-${U}`,Ce=T[U];v[Ce];const De={};o.createMesh(mt.apply(De,{id:Qe,primitive:"triangles",positionsCompressed:$,normalsCompressed:me,indices:Ie,edgeIndices:Se,positionsDecodeMatrix:qe,color:W,opacity:Y}))}}let L=0;for(let F=0;F<R;F++){const U=R-1,q=F===U,V=v[F],W=w[F],Y=q?w[U]:w[F+1],$=[];for(let me=W;me<Y;me++){const Ie=y[me];if(E[Ie]>1){const Se={},qe=`${a}-instance.${L++}`,Qe=`${a}-geometry.${Ie}`,Ce=x[F]*16,De=h.subarray(Ce,Ce+16);o.createMesh(mt.apply(Se,{id:qe,geometryId:Qe,matrix:De})),$.push(qe)}else $.push(Ie)}if($.length>0){const me={};o.createEntity(mt.apply(me,{id:V,isObject:!0,meshIds:$}))}}}const pW={version:4,parse:function(i,e,t,o,n,r){const a=ISt(t),s=SSt(a);RSt(i,e,s,o,n,r)}};let Jr=window.pako||$a;Jr.inflate||(Jr=Jr.default);function LSt(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],matrices:i[4],eachPrimitivePositionsAndNormalsPortion:i[5],eachPrimitiveIndicesPortion:i[6],eachPrimitiveEdgeIndicesPortion:i[7],eachPrimitiveColor:i[8],primitiveInstances:i[9],eachEntityId:i[10],eachEntityPrimitiveInstancesPortion:i[11],eachEntityMatricesPortion:i[12]}}function DSt(i){return{positions:new Float32Array(Jr.inflate(i.positions).buffer),normals:new Int8Array(Jr.inflate(i.normals).buffer),indices:new Uint32Array(Jr.inflate(i.indices).buffer),edgeIndices:new Uint32Array(Jr.inflate(i.edgeIndices).buffer),matrices:new Float32Array(Jr.inflate(i.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(Jr.inflate(i.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(Jr.inflate(i.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(Jr.inflate(i.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveColor:new Uint8Array(Jr.inflate(i.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(Jr.inflate(i.primitiveInstances).buffer),eachEntityId:Jr.inflate(i.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(Jr.inflate(i.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(Jr.inflate(i.eachEntityMatricesPortion).buffer)}}const _St=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function FSt(i,e,t,o,n,r){const a=r.getNextId();o.positionsCompression="disabled",o.normalsCompression="precompressed";const s=t.positions,l=t.normals,c=t.indices,d=t.edgeIndices,u=t.matrices,h=t.eachPrimitivePositionsAndNormalsPortion,p=t.eachPrimitiveIndicesPortion,A=t.eachPrimitiveEdgeIndicesPortion,f=t.eachPrimitiveColor,m=t.primitiveInstances,g=JSON.parse(t.eachEntityId),y=t.eachEntityPrimitiveInstancesPortion,v=t.eachEntityMatricesPortion,w=h.length,x=m.length,k=new Uint8Array(w),B=g.length;for(let R=0;R<x;R++){const T=m[R];k[T]++}const E={};for(let R=0;R<B;R++){const T=B-1,L=R===T,F=y[R],U=L?y[T]:y[R+1];for(let q=F;q<U;q++){const V=m[q];k[V]>1||(E[V]=R)}}for(let R=0;R<w;R++){const T=R===w-1,L=k[R]>1,F=_St(f.subarray(R*4,R*4+3)),U=f[R*4+3]/255,q=s.subarray(h[R],T?s.length:h[R+1]),V=l.subarray(h[R],T?l.length:h[R+1]),W=c.subarray(p[R],T?c.length:p[R+1]),Y=d.subarray(A[R],T?d.length:A[R+1]);if(L){const $=`${a}-geometry.${R}`;o.createGeometry({id:$,primitive:"triangles",positionsCompressed:q,normalsCompressed:V,indices:W,edgeIndices:Y})}else{const $=R,me=E[R];g[me];const Ie={};o.createMesh(mt.apply(Ie,{id:$,primitive:"triangles",positionsCompressed:q,normalsCompressed:V,indices:W,edgeIndices:Y,color:F,opacity:U}))}}let P=0;for(let R=0;R<B;R++){const T=B-1,L=R===T,F=g[R],U=y[R],q=L?y[T]:y[R+1],V=[];for(let W=U;W<q;W++){const Y=m[W];if(k[Y]>1){const $={},me="instance."+P++,Ie="geometry"+Y,Se=v[R]*16,qe=u.subarray(Se,Se+16);o.createMesh(mt.apply($,{id:me,geometryId:Ie,matrix:qe})),V.push(me)}else V.push(Y)}if(V.length>0){const W={};o.createEntity(mt.apply(W,{id:F,isObject:!0,meshIds:V}))}}}const fW={version:5,parse:function(i,e,t,o,n,r){const a=LSt(t),s=DSt(a);FSt(i,e,s,o,n,r)}};let Ov=window.pako||$a;Ov.inflate||(Ov=Ov.default);function OSt(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],matrices:i[4],reusedPrimitivesDecodeMatrix:i[5],eachPrimitivePositionsAndNormalsPortion:i[6],eachPrimitiveIndicesPortion:i[7],eachPrimitiveEdgeIndicesPortion:i[8],eachPrimitiveColorAndOpacity:i[9],primitiveInstances:i[10],eachEntityId:i[11],eachEntityPrimitiveInstancesPortion:i[12],eachEntityMatricesPortion:i[13],eachTileAABB:i[14],eachTileEntitiesPortion:i[15]}}function USt(i){function e(t,o){return t.length===0?[]:Ov.inflate(t,o).buffer}return{positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedPrimitivesDecodeMatrix:new Float32Array(e(i.reusedPrimitivesDecodeMatrix)),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(e(i.eachPrimitivePositionsAndNormalsPortion)),eachPrimitiveIndicesPortion:new Uint32Array(e(i.eachPrimitiveIndicesPortion)),eachPrimitiveEdgeIndicesPortion:new Uint32Array(e(i.eachPrimitiveEdgeIndicesPortion)),eachPrimitiveColorAndOpacity:new Uint8Array(e(i.eachPrimitiveColorAndOpacity)),primitiveInstances:new Uint32Array(e(i.primitiveInstances)),eachEntityId:Ov.inflate(i.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(e(i.eachEntityPrimitiveInstancesPortion)),eachEntityMatricesPortion:new Uint32Array(e(i.eachEntityMatricesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const NSt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function jSt(i,e,t,o,n,r){const a=r.getNextId(),s=t.positions,l=t.normals,c=t.indices,d=t.edgeIndices,u=t.matrices,h=t.reusedPrimitivesDecodeMatrix,p=t.eachPrimitivePositionsAndNormalsPortion,A=t.eachPrimitiveIndicesPortion,f=t.eachPrimitiveEdgeIndicesPortion,m=t.eachPrimitiveColorAndOpacity,g=t.primitiveInstances,y=JSON.parse(t.eachEntityId),v=t.eachEntityPrimitiveInstancesPortion,w=t.eachEntityMatricesPortion,x=t.eachTileAABB,k=t.eachTileEntitiesPortion,B=p.length,E=g.length,P=y.length,R=k.length,T=new Uint32Array(B);for(let U=0;U<E;U++){const q=g[U];T[q]!==void 0?T[q]++:T[q]=1}const L=C.vec3(),F=C.AABB3();for(let U=0;U<R;U++){const q=R-1,V=U===q,W=k[U],Y=V?P:k[U+1],$=U*6,me=x.subarray($,$+6);C.getAABB3Center(me,L),F[0]=me[0]-L[0],F[1]=me[1]-L[1],F[2]=me[2]-L[2],F[3]=me[3]-L[0],F[4]=me[4]-L[1],F[5]=me[5]-L[2];const Ie=Jt.createPositionsDecodeMatrix(F),Se={};for(let qe=W;qe<Y;qe++){const Qe=y[qe],Ce=e.globalizeObjectIds?C.globalizeObjectId(o.id,Qe):Qe,De=w[qe],Fe=u.slice(De,De+16),ve=P-1,ge=qe===ve,we=v[qe],Le=ge?g.length:v[qe+1],We=[],H=i.metaScene.metaObjects[Ce],ee={},ae={};if(H){if(e.excludeTypesMap&&H.type&&e.excludeTypesMap[H.type]||e.includeTypesMap&&H.type&&!e.includeTypesMap[H.type]||e.includeIdsMap&&H.id&&!e.includeIdsMap[H.id])continue;const Be=e.objectDefaults?e.objectDefaults[H.type]||e.objectDefaults.DEFAULT:null;Be&&(Be.visible===!1&&(ee.visible=!1),Be.pickable===!1&&(ee.pickable=!1),Be.colorize&&(ae.color=Be.colorize),Be.opacity!==void 0&&Be.opacity!==null&&(ae.opacity=Be.opacity))}else if(e.excludeUnclassifiedObjects)continue;for(let Be=we;Be<Le;Be++){const pe=g[Be],Q=T[pe]>1,Z=pe===B-1,ie=s.subarray(p[pe],Z?s.length:p[pe+1]),re=l.subarray(p[pe],Z?l.length:p[pe+1]),ne=c.subarray(A[pe],Z?c.length:A[pe+1]),G=d.subarray(f[pe],Z?d.length:f[pe+1]),K=NSt(m.subarray(pe*4,pe*4+3)),ue=m[pe*4+3]/255,xe=r.getNextId();if(Q){const oe=`${a}-geometry.${U}.${pe}`;Se[oe]||(o.createGeometry({id:oe,primitive:"triangles",positionsCompressed:ie,indices:ne,edgeIndices:G,positionsDecodeMatrix:h}),Se[oe]=!0),o.createMesh(mt.apply(ae,{id:xe,geometryId:oe,origin:L,matrix:Fe,color:K,opacity:ue})),We.push(xe)}else o.createMesh(mt.apply(ae,{id:xe,origin:L,primitive:"triangles",positionsCompressed:ie,normalsCompressed:re,indices:ne,edgeIndices:G,positionsDecodeMatrix:Ie,color:K,opacity:ue})),We.push(xe)}We.length>0&&o.createEntity(mt.apply(ee,{id:Ce,isObject:!0,meshIds:We}))}}}const AW={version:6,parse:function(i,e,t,o,n,r){const a=OSt(t),s=USt(a);jSt(i,e,s,o,n,r)}};let Uv=window.pako||$a;Uv.inflate||(Uv=Uv.default);function VSt(i){return{positions:i[0],normals:i[1],colors:i[2],indices:i[3],edgeIndices:i[4],matrices:i[5],reusedGeometriesDecodeMatrix:i[6],eachGeometryPrimitiveType:i[7],eachGeometryPositionsPortion:i[8],eachGeometryNormalsPortion:i[9],eachGeometryColorsPortion:i[10],eachGeometryIndicesPortion:i[11],eachGeometryEdgeIndicesPortion:i[12],eachMeshGeometriesPortion:i[13],eachMeshMatricesPortion:i[14],eachMeshMaterial:i[15],eachEntityId:i[16],eachEntityMeshesPortion:i[17],eachTileAABB:i[18],eachTileEntitiesPortion:i[19]}}function HSt(i){function e(t,o){return t.length===0?[]:Uv.inflate(t,o).buffer}return{positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(i.eachMeshMaterial)),eachEntityId:Uv.inflate(i.eachEntityId,{to:"string"}),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const zSt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function gW(i){const e=[];for(let t=0,o=i.length;t<o;t+=3)e.push(i[t]),e.push(i[t+1]),e.push(i[t+2]),e.push(1);return e}function qSt(i,e,t,o,n,r){const a=r.getNextId(),s=t.positions,l=t.normals,c=t.colors,d=t.indices,u=t.edgeIndices,h=t.matrices,p=t.reusedGeometriesDecodeMatrix,A=t.eachGeometryPrimitiveType,f=t.eachGeometryPositionsPortion,m=t.eachGeometryNormalsPortion,g=t.eachGeometryColorsPortion,y=t.eachGeometryIndicesPortion,v=t.eachGeometryEdgeIndicesPortion,w=t.eachMeshGeometriesPortion,x=t.eachMeshMatricesPortion,k=t.eachMeshMaterial,B=JSON.parse(t.eachEntityId),E=t.eachEntityMeshesPortion,P=t.eachTileAABB,R=t.eachTileEntitiesPortion,T=f.length,L=w.length,F=B.length,U=R.length,q=new Uint32Array(T);for(let Y=0;Y<L;Y++){const $=w[Y];q[$]!==void 0?q[$]++:q[$]=1}const V=C.vec3(),W=C.AABB3();for(let Y=0;Y<U;Y++){const $=U-1,me=Y===$,Ie=R[Y],Se=me?F:R[Y+1],qe=Y*6,Qe=P.subarray(qe,qe+6);C.getAABB3Center(Qe,V),W[0]=Qe[0]-V[0],W[1]=Qe[1]-V[1],W[2]=Qe[2]-V[2],W[3]=Qe[3]-V[0],W[4]=Qe[4]-V[1],W[5]=Qe[5]-V[2];const Ce=Jt.createPositionsDecodeMatrix(W),De={};for(let Fe=Ie;Fe<Se;Fe++){const ve=B[Fe],ge=e.globalizeObjectIds?C.globalizeObjectId(o.id,ve):ve,we=F-1,Le=Fe===we,We=E[Fe],H=Le?w.length:E[Fe+1],ee=[],ae=i.metaScene.metaObjects[ge],Be={},pe={};if(ae){if(e.excludeTypesMap&&ae.type&&e.excludeTypesMap[ae.type]||e.includeTypesMap&&ae.type&&!e.includeTypesMap[ae.type]||e.includeIdsMap&&ae.id&&!e.includeIdsMap[ae.id])continue;const Q=e.objectDefaults?e.objectDefaults[ae.type]||e.objectDefaults.DEFAULT:null;Q&&(Q.visible===!1&&(Be.visible=!1),Q.pickable===!1&&(Be.pickable=!1),Q.colorize&&(pe.color=Q.colorize),Q.opacity!==void 0&&Q.opacity!==null&&(pe.opacity=Q.opacity),Q.metallic!==void 0&&Q.metallic!==null&&(pe.metallic=Q.metallic),Q.roughness!==void 0&&Q.roughness!==null&&(pe.roughness=Q.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let Q=We;Q<H;Q++){const Z=w[Q],ie=q[Z]>1,re=Z===T-1,ne=zSt(k.subarray(Q*6,Q*6+3)),G=k[Q*6+3]/255,K=k[Q*6+4]/255,ue=k[Q*6+5]/255,xe=r.getNextId();if(ie){const oe=x[Q],Me=h.slice(oe,oe+16),je=`${a}-geometry.${Y}.${Z}`;if(!De[je]){const he=A[Z];let Ne,Ee,ze,ot,At,ft;switch(he){case 0:Ne="solid",Ee=s.subarray(f[Z],re?s.length:f[Z+1]),ze=l.subarray(m[Z],re?l.length:m[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]),ft=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 1:Ne="surface",Ee=s.subarray(f[Z],re?s.length:f[Z+1]),ze=l.subarray(m[Z],re?l.length:m[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]),ft=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 2:Ne="points",Ee=s.subarray(f[Z],re?s.length:f[Z+1]),ot=gW(c.subarray(g[Z],re?c.length:g[Z+1]));break;case 3:Ne="lines",Ee=s.subarray(f[Z],re?s.length:f[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]);break;default:continue}o.createGeometry({id:je,primitive:Ne,positionsCompressed:Ee,normalsCompressed:ze,colors:ot,indices:At,edgeIndices:ft,positionsDecodeMatrix:p}),De[je]=!0}o.createMesh(mt.apply(pe,{id:xe,geometryId:je,origin:V,matrix:Me,color:ne,metallic:K,roughness:ue,opacity:G})),ee.push(xe)}else{const oe=A[Z];let Me,je,he,Ne,Ee,ze;switch(oe){case 0:Me="solid",je=s.subarray(f[Z],re?s.length:f[Z+1]),he=l.subarray(m[Z],re?l.length:m[Z+1]),Ee=d.subarray(y[Z],re?d.length:y[Z+1]),ze=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 1:Me="surface",je=s.subarray(f[Z],re?s.length:f[Z+1]),he=l.subarray(m[Z],re?l.length:m[Z+1]),Ee=d.subarray(y[Z],re?d.length:y[Z+1]),ze=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 2:Me="points",je=s.subarray(f[Z],re?s.length:f[Z+1]),Ne=gW(c.subarray(g[Z],re?c.length:g[Z+1]));break;case 3:Me="lines",je=s.subarray(f[Z],re?s.length:f[Z+1]),Ee=d.subarray(y[Z],re?d.length:y[Z+1]);break;default:continue}o.createMesh(mt.apply(pe,{id:xe,origin:V,primitive:Me,positionsCompressed:je,normalsCompressed:he,colors:Ne,indices:Ee,edgeIndices:ze,positionsDecodeMatrix:Ce,color:ne,metallic:K,roughness:ue,opacity:G})),ee.push(xe)}}ee.length>0&&o.createEntity(mt.apply(Be,{id:ge,isObject:!0,meshIds:ee}))}}}const mW={version:7,parse:function(i,e,t,o,n,r){const a=VSt(t),s=HSt(a);qSt(i,e,s,o,n,r)}};let Lu=window.pako||$a;Lu.inflate||(Lu=Lu.default);const Gl=C.vec4(),vW=C.vec4();function QSt(i){return{types:i[0],eachMetaObjectId:i[1],eachMetaObjectType:i[2],eachMetaObjectName:i[3],eachMetaObjectParent:i[4],positions:i[5],normals:i[6],colors:i[7],indices:i[8],edgeIndices:i[9],matrices:i[10],reusedGeometriesDecodeMatrix:i[11],eachGeometryPrimitiveType:i[12],eachGeometryPositionsPortion:i[13],eachGeometryNormalsPortion:i[14],eachGeometryColorsPortion:i[15],eachGeometryIndicesPortion:i[16],eachGeometryEdgeIndicesPortion:i[17],eachMeshGeometriesPortion:i[18],eachMeshMatricesPortion:i[19],eachMeshMaterial:i[20],eachEntityMetaObject:i[21],eachEntityMeshesPortion:i[22],eachTileAABB:i[23],eachTileEntitiesPortion:i[24]}}function GSt(i){function e(t,o){return t.length===0?[]:Lu.inflate(t,o).buffer}return{types:Lu.inflate(i.types,{to:"string"}),eachMetaObjectId:Lu.inflate(i.eachMetaObjectId,{to:"string"}),eachMetaObjectType:new Uint32Array(e(i.eachMetaObjectType)),eachMetaObjectName:Lu.inflate(i.eachMetaObjectName,{to:"string"}),eachMetaObjectParent:new Uint32Array(e(i.eachMetaObjectParent)),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(i.eachMeshMaterial)),eachEntityMetaObject:new Uint32Array(e(i.eachEntityMetaObject)),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const KSt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function yW(i){const e=[];for(let t=0,o=i.length;t<o;t+=3)e.push(i[t]),e.push(i[t+1]),e.push(i[t+2]),e.push(1);return e}function JSt(i,e,t,o,n,r){const a=r.getNextId(),s=JSON.parse(t.types),l=JSON.parse(t.eachMetaObjectId),c=t.eachMetaObjectType,d=JSON.parse(t.eachMetaObjectName),u=t.eachMetaObjectParent,h=t.positions,p=t.normals,A=t.colors,f=t.indices,m=t.edgeIndices,g=t.matrices,y=t.reusedGeometriesDecodeMatrix,v=t.eachGeometryPrimitiveType,w=t.eachGeometryPositionsPortion,x=t.eachGeometryNormalsPortion,k=t.eachGeometryColorsPortion,B=t.eachGeometryIndicesPortion,E=t.eachGeometryEdgeIndicesPortion,P=t.eachMeshGeometriesPortion,R=t.eachMeshMatricesPortion,T=t.eachMeshMaterial,L=t.eachEntityMetaObject,F=t.eachEntityMeshesPortion,U=t.eachTileAABB,q=t.eachTileEntitiesPortion,V=l.length,W=w.length,Y=P.length,$=L.length,me=q.length;if(n){const Ce={metaObjects:[]};for(let De=0;De<V;De++){const Fe=l[De],ve=c[De],ge=s[ve]||"default",we=d[De],Le=u[De],We=Le!==De?l[Le]:null;Ce.metaObjects.push({id:Fe,type:ge,name:we,parent:We})}n.loadData(Ce,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds})}const Ie=new Uint32Array(W);for(let Ce=0;Ce<Y;Ce++){const De=P[Ce];Ie[De]!==void 0?Ie[De]++:Ie[De]=1}const Se=C.vec3(),qe=C.AABB3(),Qe={};for(let Ce=0;Ce<me;Ce++){const De=me-1,Fe=Ce===De,ve=q[Ce],ge=Fe?$:q[Ce+1],we=Ce*6,Le=U.subarray(we,we+6);C.getAABB3Center(Le,Se),qe[0]=Le[0]-Se[0],qe[1]=Le[1]-Se[1],qe[2]=Le[2]-Se[2],qe[3]=Le[3]-Se[0],qe[4]=Le[4]-Se[1],qe[5]=Le[5]-Se[2];const We=Jt.createPositionsDecodeMatrix(qe),H={};for(let ee=ve;ee<ge;ee++){const ae=L[ee],Be=l[ae],pe=e.globalizeObjectIds?C.globalizeObjectId(o.id,Be):Be,Q=$-1,Z=ee===Q,ie=F[ee],re=Z?P.length:F[ee+1],ne=[],G=i.metaScene.metaObjects[pe],K={},ue={};if(G){if(e.excludeTypesMap&&G.type&&e.excludeTypesMap[G.type]||e.includeTypesMap&&G.type&&!e.includeTypesMap[G.type]||e.includeIdsMap&&G.id&&!e.includeIdsMap[G.id])continue;const xe=e.objectDefaults?e.objectDefaults[G.type]||e.objectDefaults.DEFAULT:null;xe&&(xe.visible===!1&&(K.visible=!1),xe.pickable===!1&&(K.pickable=!1),xe.colorize&&(ue.color=xe.colorize),xe.opacity!==void 0&&xe.opacity!==null&&(ue.opacity=xe.opacity),xe.metallic!==void 0&&xe.metallic!==null&&(ue.metallic=xe.metallic),xe.roughness!==void 0&&xe.roughness!==null&&(ue.roughness=xe.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let xe=ie;xe<re;xe++){const oe=P[xe],Me=Ie[oe]>1,je=oe===W-1,he=KSt(T.subarray(xe*6,xe*6+3)),Ne=T[xe*6+3]/255,Ee=T[xe*6+4]/255,ze=T[xe*6+5]/255,ot=r.getNextId();if(Me){const At=R[xe],ft=g.slice(At,At+16),lt=`${a}-geometry.${Ce}.${oe}`;let ut=Qe[lt];if(!ut){ut={batchThisMesh:!e.reuseGeometries};const Te=v[oe];let st=!1;switch(Te){case 0:ut.primitiveName="solid",ut.geometryPositions=h.subarray(w[oe],je?h.length:w[oe+1]),ut.geometryNormals=p.subarray(x[oe],je?p.length:x[oe+1]),ut.geometryIndices=f.subarray(B[oe],je?f.length:B[oe+1]),ut.geometryEdgeIndices=m.subarray(E[oe],je?m.length:E[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;case 1:ut.primitiveName="surface",ut.geometryPositions=h.subarray(w[oe],je?h.length:w[oe+1]),ut.geometryNormals=p.subarray(x[oe],je?p.length:x[oe+1]),ut.geometryIndices=f.subarray(B[oe],je?f.length:B[oe+1]),ut.geometryEdgeIndices=m.subarray(E[oe],je?m.length:E[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;case 2:ut.primitiveName="points",ut.geometryPositions=h.subarray(w[oe],je?h.length:w[oe+1]),ut.geometryColors=yW(A.subarray(k[oe],je?A.length:k[oe+1])),st=ut.geometryPositions.length>0;break;case 3:ut.primitiveName="lines",ut.geometryPositions=h.subarray(w[oe],je?h.length:w[oe+1]),ut.geometryIndices=f.subarray(B[oe],je?f.length:B[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;default:continue}if(st||(ut=null),ut&&(ut.geometryPositions.length>1e3,ut.batchThisMesh)){ut.decompressedPositions=new Float32Array(ut.geometryPositions.length);const dt=ut.geometryPositions,Ye=ut.decompressedPositions;for(let fe=0,be=dt.length;fe<be;fe+=3)Ye[fe+0]=dt[fe+0]*y[0]+y[12],Ye[fe+1]=dt[fe+1]*y[5]+y[13],Ye[fe+2]=dt[fe+2]*y[10]+y[14];ut.geometryPositions=null,Qe[lt]=ut}}if(ut)if(ut.batchThisMesh){const Te=ut.decompressedPositions,st=new Uint16Array(Te.length);for(let dt=0,Ye=Te.length;dt<Ye;dt+=3)Gl[0]=Te[dt+0],Gl[1]=Te[dt+1],Gl[2]=Te[dt+2],Gl[3]=1,C.transformVec4(ft,Gl,vW),Jt.compressPosition(vW,qe,Gl),st[dt+0]=Gl[0],st[dt+1]=Gl[1],st[dt+2]=Gl[2];o.createMesh(mt.apply(ue,{id:ot,origin:Se,primitive:ut.primitiveName,positionsCompressed:st,normalsCompressed:ut.geometryNormals,colorsCompressed:ut.geometryColors,indices:ut.geometryIndices,edgeIndices:ut.geometryEdgeIndices,positionsDecodeMatrix:We,color:he,metallic:Ee,roughness:ze,opacity:Ne})),ne.push(ot)}else H[lt]||(o.createGeometry({id:lt,primitive:ut.primitiveName,positionsCompressed:ut.geometryPositions,normalsCompressed:ut.geometryNormals,colorsCompressed:ut.geometryColors,indices:ut.geometryIndices,edgeIndices:ut.geometryEdgeIndices,positionsDecodeMatrix:y}),H[lt]=!0),o.createMesh(mt.apply(ue,{id:ot,geometryId:lt,origin:Se,matrix:ft,color:he,metallic:Ee,roughness:ze,opacity:Ne})),ne.push(ot)}else{const At=v[oe];let ft,lt,ut,Te,st,dt,Ye=!1;switch(At){case 0:ft="solid",lt=h.subarray(w[oe],je?h.length:w[oe+1]),ut=p.subarray(x[oe],je?p.length:x[oe+1]),st=f.subarray(B[oe],je?f.length:B[oe+1]),dt=m.subarray(E[oe],je?m.length:E[oe+1]),Ye=lt.length>0&&st.length>0;break;case 1:ft="surface",lt=h.subarray(w[oe],je?h.length:w[oe+1]),ut=p.subarray(x[oe],je?p.length:x[oe+1]),st=f.subarray(B[oe],je?f.length:B[oe+1]),dt=m.subarray(E[oe],je?m.length:E[oe+1]),Ye=lt.length>0&&st.length>0;break;case 2:ft="points",lt=h.subarray(w[oe],je?h.length:w[oe+1]),Te=yW(A.subarray(k[oe],je?A.length:k[oe+1])),Ye=lt.length>0;break;case 3:ft="lines",lt=h.subarray(w[oe],je?h.length:w[oe+1]),st=f.subarray(B[oe],je?f.length:B[oe+1]),Ye=lt.length>0&&st.length>0;break;default:continue}Ye&&(o.createMesh(mt.apply(ue,{id:ot,origin:Se,primitive:ft,positionsCompressed:lt,normalsCompressed:ut,colorsCompressed:Te,indices:st,edgeIndices:dt,positionsDecodeMatrix:We,color:he,metallic:Ee,roughness:ze,opacity:Ne})),ne.push(ot))}}ne.length>0&&o.createEntity(mt.apply(K,{id:pe,isObject:!0,meshIds:ne}))}}}const bW={version:8,parse:function(i,e,t,o,n,r){const a=QSt(t),s=GSt(a);JSt(i,e,s,o,n,r)}};let Wp=window.pako||$a;Wp.inflate||(Wp=Wp.default);const Kl=C.vec4(),wW=C.vec4();function ZSt(i){return{metadata:i[0],positions:i[1],normals:i[2],colors:i[3],indices:i[4],edgeIndices:i[5],matrices:i[6],reusedGeometriesDecodeMatrix:i[7],eachGeometryPrimitiveType:i[8],eachGeometryPositionsPortion:i[9],eachGeometryNormalsPortion:i[10],eachGeometryColorsPortion:i[11],eachGeometryIndicesPortion:i[12],eachGeometryEdgeIndicesPortion:i[13],eachMeshGeometriesPortion:i[14],eachMeshMatricesPortion:i[15],eachMeshMaterial:i[16],eachEntityId:i[17],eachEntityMeshesPortion:i[18],eachTileAABB:i[19],eachTileEntitiesPortion:i[20]}}function WSt(i){function e(t,o){return t.length===0?[]:Wp.inflate(t,o).buffer}return{metadata:JSON.parse(Wp.inflate(i.metadata,{to:"string"})),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(i.eachMeshMaterial)),eachEntityId:JSON.parse(Wp.inflate(i.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const YSt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function XSt(i,e,t,o,n,r){const a=r.getNextId(),s=t.metadata,l=t.positions,c=t.normals,d=t.colors,u=t.indices,h=t.edgeIndices,p=t.matrices,A=t.reusedGeometriesDecodeMatrix,f=t.eachGeometryPrimitiveType,m=t.eachGeometryPositionsPortion,g=t.eachGeometryNormalsPortion,y=t.eachGeometryColorsPortion,v=t.eachGeometryIndicesPortion,w=t.eachGeometryEdgeIndicesPortion,x=t.eachMeshGeometriesPortion,k=t.eachMeshMatricesPortion,B=t.eachMeshMaterial,E=t.eachEntityId,P=t.eachEntityMeshesPortion,R=t.eachTileAABB,T=t.eachTileEntitiesPortion,L=m.length,F=x.length,U=P.length,q=T.length;n&&n.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});const V=new Uint32Array(L);for(let me=0;me<F;me++){const Ie=x[me];V[Ie]!==void 0?V[Ie]++:V[Ie]=1}const W=C.vec3(),Y=C.AABB3(),$={};for(let me=0;me<q;me++){const Ie=q-1,Se=me===Ie,qe=T[me],Qe=Se?U-1:T[me+1]-1,Ce=me*6,De=R.subarray(Ce,Ce+6);C.getAABB3Center(De,W),Y[0]=De[0]-W[0],Y[1]=De[1]-W[1],Y[2]=De[2]-W[2],Y[3]=De[3]-W[0],Y[4]=De[4]-W[1],Y[5]=De[5]-W[2];const Fe=Jt.createPositionsDecodeMatrix(Y),ve={};for(let ge=qe;ge<=Qe;ge++){const we=E[ge],Le=e.globalizeObjectIds?C.globalizeObjectId(o.id,we):we,We=U-1,H=ge===We,ee=P[ge],ae=H?x.length-1:P[ge+1]-1,Be=[],pe=i.metaScene.metaObjects[Le],Q={},Z={};if(!(e.includeIdsMap&&we&&!e.includeIdsMap[we])){if(pe){if(e.excludeTypesMap&&pe.type&&e.excludeTypesMap[pe.type]||e.includeTypesMap&&pe.type&&!e.includeTypesMap[pe.type]||e.includeIdsMap&&pe.id&&!e.includeIdsMap[pe.id])continue;const ie=e.objectDefaults?e.objectDefaults[pe.type]||e.objectDefaults.DEFAULT:null;ie&&(ie.visible===!1&&(Q.visible=!1),ie.pickable===!1&&(Q.pickable=!1),ie.colorize&&(Z.color=ie.colorize),ie.opacity!==void 0&&ie.opacity!==null&&(Z.opacity=ie.opacity),ie.metallic!==void 0&&ie.metallic!==null&&(Z.metallic=ie.metallic),ie.roughness!==void 0&&ie.roughness!==null&&(Z.roughness=ie.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let ie=ee;ie<=ae;ie++){const re=x[ie],ne=V[re]>1,G=re===L-1,K=YSt(B.subarray(ie*6,ie*6+3)),ue=B[ie*6+3]/255,xe=B[ie*6+4]/255,oe=B[ie*6+5]/255,Me=r.getNextId();if(ne){const je=k[ie],he=p.slice(je,je+16),Ne=`${a}-geometry.${me}.${re}`;let Ee=$[Ne];if(!Ee){Ee={batchThisMesh:!e.reuseGeometries};const ze=f[re];let ot=!1;switch(ze){case 0:Ee.primitiveName="solid",Ee.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Ee.geometryNormals=c.subarray(g[re],G?c.length:g[re+1]),Ee.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),Ee.geometryEdgeIndices=h.subarray(w[re],G?h.length:w[re+1]),ot=Ee.geometryPositions.length>0&&Ee.geometryIndices.length>0;break;case 1:Ee.primitiveName="surface",Ee.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Ee.geometryNormals=c.subarray(g[re],G?c.length:g[re+1]),Ee.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),Ee.geometryEdgeIndices=h.subarray(w[re],G?h.length:w[re+1]),ot=Ee.geometryPositions.length>0&&Ee.geometryIndices.length>0;break;case 2:Ee.primitiveName="points",Ee.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Ee.geometryColors=d.subarray(y[re],G?d.length:y[re+1]),ot=Ee.geometryPositions.length>0;break;case 3:Ee.primitiveName="lines",Ee.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Ee.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),ot=Ee.geometryPositions.length>0&&Ee.geometryIndices.length>0;break;default:continue}if(ot||(Ee=null),Ee&&(Ee.geometryPositions.length>1e3,Ee.batchThisMesh)){Ee.decompressedPositions=new Float32Array(Ee.geometryPositions.length),Ee.transformedAndRecompressedPositions=new Uint16Array(Ee.geometryPositions.length);const At=Ee.geometryPositions,ft=Ee.decompressedPositions;for(let lt=0,ut=At.length;lt<ut;lt+=3)ft[lt+0]=At[lt+0]*A[0]+A[12],ft[lt+1]=At[lt+1]*A[5]+A[13],ft[lt+2]=At[lt+2]*A[10]+A[14];Ee.geometryPositions=null,$[Ne]=Ee}}if(Ee)if(Ee.batchThisMesh){const ze=Ee.decompressedPositions,ot=Ee.transformedAndRecompressedPositions;for(let At=0,ft=ze.length;At<ft;At+=3)Kl[0]=ze[At+0],Kl[1]=ze[At+1],Kl[2]=ze[At+2],Kl[3]=1,C.transformVec4(he,Kl,wW),Jt.compressPosition(wW,Y,Kl),ot[At+0]=Kl[0],ot[At+1]=Kl[1],ot[At+2]=Kl[2];o.createMesh(mt.apply(Z,{id:Me,origin:W,primitive:Ee.primitiveName,positionsCompressed:ot,normalsCompressed:Ee.geometryNormals,colorsCompressed:Ee.geometryColors,indices:Ee.geometryIndices,edgeIndices:Ee.geometryEdgeIndices,positionsDecodeMatrix:Fe,color:K,metallic:xe,roughness:oe,opacity:ue})),Be.push(Me)}else ve[Ne]||(o.createGeometry({id:Ne,primitive:Ee.primitiveName,positionsCompressed:Ee.geometryPositions,normalsCompressed:Ee.geometryNormals,colorsCompressed:Ee.geometryColors,indices:Ee.geometryIndices,edgeIndices:Ee.geometryEdgeIndices,positionsDecodeMatrix:A}),ve[Ne]=!0),o.createMesh(mt.apply(Z,{id:Me,geometryId:Ne,origin:W,matrix:he,color:K,metallic:xe,roughness:oe,opacity:ue})),Be.push(Me)}else{const je=f[re];let he,Ne,Ee,ze,ot,At,ft=!1;switch(je){case 0:he="solid",Ne=l.subarray(m[re],G?l.length:m[re+1]),Ee=c.subarray(g[re],G?c.length:g[re+1]),ot=u.subarray(v[re],G?u.length:v[re+1]),At=h.subarray(w[re],G?h.length:w[re+1]),ft=Ne.length>0&&ot.length>0;break;case 1:he="surface",Ne=l.subarray(m[re],G?l.length:m[re+1]),Ee=c.subarray(g[re],G?c.length:g[re+1]),ot=u.subarray(v[re],G?u.length:v[re+1]),At=h.subarray(w[re],G?h.length:w[re+1]),ft=Ne.length>0&&ot.length>0;break;case 2:he="points",Ne=l.subarray(m[re],G?l.length:m[re+1]),ze=d.subarray(y[re],G?d.length:y[re+1]),ft=Ne.length>0;break;case 3:he="lines",Ne=l.subarray(m[re],G?l.length:m[re+1]),ot=u.subarray(v[re],G?u.length:v[re+1]),ft=Ne.length>0&&ot.length>0;break;default:continue}ft&&(o.createMesh(mt.apply(Z,{id:Me,origin:W,primitive:he,positionsCompressed:Ne,normalsCompressed:Ee,colorsCompressed:ze,indices:ot,edgeIndices:At,positionsDecodeMatrix:Fe,color:K,metallic:xe,roughness:oe,opacity:ue})),Be.push(Me))}}Be.length>0&&o.createEntity(mt.apply(Q,{id:Le,isObject:!0,meshIds:Be}))}}}}const CW={version:9,parse:function(i,e,t,o,n,r){const a=ZSt(t),s=WSt(a);XSt(i,e,s,o,n,r)}};let Yp=window.pako||$a;Yp.inflate||(Yp=Yp.default);const Jl=C.vec4(),xW=C.vec4(),$St=9;function eTt(i){let e=0;return{metadata:i[e++],textureData:i[e++],eachTextureDataPortion:i[e++],eachTextureAttributes:i[e++],positions:i[e++],normals:i[e++],colors:i[e++],uvs:i[e++],indices:i[e++],edgeIndices:i[e++],eachTextureSetTextures:i[e++],matrices:i[e++],reusedGeometriesDecodeMatrix:i[e++],eachGeometryPrimitiveType:i[e++],eachGeometryPositionsPortion:i[e++],eachGeometryNormalsPortion:i[e++],eachGeometryColorsPortion:i[e++],eachGeometryUVsPortion:i[e++],eachGeometryIndicesPortion:i[e++],eachGeometryEdgeIndicesPortion:i[e++],eachMeshGeometriesPortion:i[e++],eachMeshMatricesPortion:i[e++],eachMeshTextureSet:i[e++],eachMeshMaterialAttributes:i[e++],eachEntityId:i[e++],eachEntityMeshesPortion:i[e++],eachTileAABB:i[e++],eachTileEntitiesPortion:i[e++]}}function tTt(i){function e(t,o){return t.length===0?[]:Yp.inflate(t,o).buffer}return{metadata:JSON.parse(Yp.inflate(i.metadata,{to:"string"})),textureData:new Uint8Array(e(i.textureData)),eachTextureDataPortion:new Uint32Array(e(i.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(i.eachTextureAttributes)),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),uvs:new Float32Array(e(i.uvs)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),eachTextureSetTextures:new Int32Array(e(i.eachTextureSetTextures)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(i.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(i.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(i.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(Yp.inflate(i.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const iTt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();(function(){const i=document.createElement("canvas"),e=i.getContext("2d");return function(t){return i.width=t.width,i.height=t.height,e.putImageData(t,0,0),i.toDataURL()}})();function oTt(i,e,t,o,n,r){const a=r.getNextId(),s=t.metadata,l=t.textureData,c=t.eachTextureDataPortion,d=t.eachTextureAttributes,u=t.positions,h=t.normals,p=t.colors,A=t.uvs,f=t.indices,m=t.edgeIndices,g=t.eachTextureSetTextures,y=t.matrices,v=t.reusedGeometriesDecodeMatrix,w=t.eachGeometryPrimitiveType,x=t.eachGeometryPositionsPortion,k=t.eachGeometryNormalsPortion,B=t.eachGeometryColorsPortion,E=t.eachGeometryUVsPortion,P=t.eachGeometryIndicesPortion,R=t.eachGeometryEdgeIndicesPortion,T=t.eachMeshGeometriesPortion,L=t.eachMeshMatricesPortion,F=t.eachMeshTextureSet,U=t.eachMeshMaterialAttributes,q=t.eachEntityId,V=t.eachEntityMeshesPortion,W=t.eachTileAABB,Y=t.eachTileEntitiesPortion,$=c.length,me=g.length/5,Ie=x.length,Se=T.length,qe=V.length,Qe=Y.length;n&&n.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let ge=0;ge<$;ge++){const we=ge===$-1,Le=c[ge],We=we?l.length:c[ge+1],H=We-Le>0,ee=ge*$St,ae=d[ee+0]===1,Be=d[ee+1];d[ee+2],d[ee+3];const pe=d[ee+4],Q=d[ee+5],Z=d[ee+6],ie=d[ee+7],re=d[ee+8];if(H){const ne=new Uint8Array(l.subarray(Le,We)).buffer,G=`${a}-texture-${ge}`;if(ae)o.createTexture({id:G,buffers:[ne],minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re});else{const K=Be===j8?"image/jpeg":Be===V8?"image/png":"image/gif",ue=new Blob([ne],{type:K}),xe=(window.URL||window.webkitURL).createObjectURL(ue),oe=document.createElement("img");oe.src=xe,o.createTexture({id:G,image:oe,minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re})}}}for(let ge=0;ge<me;ge++){const we=ge*5,Le=`${a}-textureSet-${ge}`,We=g[we+0],H=g[we+1],ee=g[we+2],ae=g[we+3],Be=g[we+4];o.createTextureSet({id:Le,colorTextureId:We>=0?`${a}-texture-${We}`:null,normalsTextureId:ee>=0?`${a}-texture-${ee}`:null,metallicRoughnessTextureId:H>=0?`${a}-texture-${H}`:null,emissiveTextureId:ae>=0?`${a}-texture-${ae}`:null,occlusionTextureId:Be>=0?`${a}-texture-${Be}`:null})}const Ce=new Uint32Array(Ie);for(let ge=0;ge<Se;ge++){const we=T[ge];Ce[we]!==void 0?Ce[we]++:Ce[we]=1}const De=C.vec3(),Fe=C.AABB3(),ve={};for(let ge=0;ge<Qe;ge++){const we=Qe-1,Le=ge===we,We=Y[ge],H=Le?qe-1:Y[ge+1]-1,ee=ge*6,ae=W.subarray(ee,ee+6);C.getAABB3Center(ae,De),Fe[0]=ae[0]-De[0],Fe[1]=ae[1]-De[1],Fe[2]=ae[2]-De[2],Fe[3]=ae[3]-De[0],Fe[4]=ae[4]-De[1],Fe[5]=ae[5]-De[2];const Be=Jt.createPositionsDecodeMatrix(Fe),pe={};for(let Q=We;Q<=H;Q++){const Z=q[Q],ie=e.globalizeObjectIds?C.globalizeObjectId(o.id,Z):Z,re=qe-1,ne=Q===re,G=V[Q],K=ne?T.length-1:V[Q+1]-1,ue=[],xe=i.metaScene.metaObjects[ie],oe={},Me={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(xe){if(e.excludeTypesMap&&xe.type&&e.excludeTypesMap[xe.type]||e.includeTypesMap&&xe.type&&!e.includeTypesMap[xe.type]||e.includeIdsMap&&xe.id&&!e.includeIdsMap[xe.id])continue;const je=e.objectDefaults?e.objectDefaults[xe.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(oe.visible=!1),je.pickable===!1&&(oe.pickable=!1),je.colorize&&(Me.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(Me.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(Me.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(Me.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=G;je<=K;je++){const he=T[je],Ne=Ce[he]>1,Ee=he===Ie-1,ze=F[je],ot=ze>=0?`${a}-textureSet-${ze}`:null,At=iTt(U.subarray(je*6,je*6+3)),ft=U[je*6+3]/255,lt=U[je*6+4]/255,ut=U[je*6+5]/255,Te=r.getNextId();if(Ne){const st=L[je],dt=y.slice(st,st+16),Ye=`${a}-geometry.${ge}.${he}`;let fe=ve[Ye];if(!fe){fe={batchThisMesh:!e.reuseGeometries};const be=w[he];let Xe=!1;switch(be){case 0:fe.primitiveName="solid",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Ee?h.length:k[he+1]),fe.geometryUVs=A.subarray(E[he],Ee?A.length:E[he+1]),fe.geometryIndices=f.subarray(P[he],Ee?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(R[he],Ee?m.length:R[he+1]),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 1:fe.primitiveName="surface",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Ee?h.length:k[he+1]),fe.geometryUVs=A.subarray(E[he],Ee?A.length:E[he+1]),fe.geometryIndices=f.subarray(P[he],Ee?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(R[he],Ee?m.length:R[he+1]),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 2:fe.primitiveName="points",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryColors=p.subarray(B[he],Ee?p.length:B[he+1]),Xe=fe.geometryPositions.length>0;break;case 3:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryIndices=f.subarray(P[he],Ee?f.length:P[he+1]),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 4:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryIndices=kW(fe.geometryPositions,f.subarray(P[he],Ee?f.length:P[he+1])),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;default:continue}if(Xe||(fe=null),fe&&(fe.geometryPositions.length>1e3,fe.batchThisMesh)){fe.decompressedPositions=new Float32Array(fe.geometryPositions.length),fe.transformedAndRecompressedPositions=new Uint16Array(fe.geometryPositions.length);const ht=fe.geometryPositions,St=fe.decompressedPositions;for(let xt=0,fi=ht.length;xt<fi;xt+=3)St[xt+0]=ht[xt+0]*v[0]+v[12],St[xt+1]=ht[xt+1]*v[5]+v[13],St[xt+2]=ht[xt+2]*v[10]+v[14];fe.geometryPositions=null,ve[Ye]=fe}}if(fe)if(fe.batchThisMesh){const be=fe.decompressedPositions,Xe=fe.transformedAndRecompressedPositions;for(let ht=0,St=be.length;ht<St;ht+=3)Jl[0]=be[ht+0],Jl[1]=be[ht+1],Jl[2]=be[ht+2],Jl[3]=1,C.transformVec4(dt,Jl,xW),Jt.compressPosition(xW,Fe,Jl),Xe[ht+0]=Jl[0],Xe[ht+1]=Jl[1],Xe[ht+2]=Jl[2];o.createMesh(mt.apply(Me,{id:Te,textureSetId:ot,origin:De,primitive:fe.primitiveName,positionsCompressed:Xe,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:Be,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te)}else pe[Ye]||(o.createGeometry({id:Ye,primitive:fe.primitiveName,positionsCompressed:fe.geometryPositions,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:v}),pe[Ye]=!0),o.createMesh(mt.apply(Me,{id:Te,geometryId:Ye,textureSetId:ot,matrix:dt,color:At,metallic:lt,roughness:ut,opacity:ft,origin:De})),ue.push(Te)}else{const st=w[he];let dt,Ye,fe,be,Xe,ht,St,xt=!1;switch(st){case 0:dt="solid",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),fe=h.subarray(k[he],Ee?h.length:k[he+1]),be=A.subarray(E[he],Ee?A.length:E[he+1]),ht=f.subarray(P[he],Ee?f.length:P[he+1]),St=m.subarray(R[he],Ee?m.length:R[he+1]),xt=Ye.length>0&&ht.length>0;break;case 1:dt="surface",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),fe=h.subarray(k[he],Ee?h.length:k[he+1]),be=A.subarray(E[he],Ee?A.length:E[he+1]),ht=f.subarray(P[he],Ee?f.length:P[he+1]),St=m.subarray(R[he],Ee?m.length:R[he+1]),xt=Ye.length>0&&ht.length>0;break;case 2:dt="points",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),Xe=p.subarray(B[he],Ee?p.length:B[he+1]),xt=Ye.length>0;break;case 3:dt="lines",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),ht=f.subarray(P[he],Ee?f.length:P[he+1]),xt=Ye.length>0&&ht.length>0;break;case 4:dt="lines",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),ht=kW(Ye,f.subarray(P[he],Ee?f.length:P[he+1])),xt=Ye.length>0&&ht.length>0;break;default:continue}xt&&(o.createMesh(mt.apply(Me,{id:Te,textureSetId:ot,origin:De,primitive:dt,positionsCompressed:Ye,normalsCompressed:fe,uv:be&&be.length>0?be:null,colorsCompressed:Xe,indices:ht,edgeIndices:St,positionsDecodeMatrix:Be,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te))}}ue.length>0&&o.createEntity(mt.apply(oe,{id:ie,isObject:!0,meshIds:ue}))}}}}function kW(i,e){const t=[];if(e.length>1)for(let o=0,n=e.length-1;o<n;o++)t.push(e[o]),t.push(e[o+1]);else if(i.length>1)for(let o=0,n=i.length/3-1;o<n;o++)t.push(o),t.push(o+1);return t}const MW={version:10,parse:function(i,e,t,o,n,r){const a=eTt(t),s=tTt(a);oTt(i,e,s,o,n,r)}},Zl=C.vec4(),BW=C.vec4(),rTt=9;function nTt(i){const e=(function(){const n=new ArrayBuffer(2);return new Uint16Array(n)[0]=1,new Uint8Array(n)[0]!==1})(),t=(function(){let n=0;const r=new DataView(i);return function(a){const s=1+2*n++,l=r.getUint32(s*4,!0),c=r.getUint32((s+1)*4,!0),d=a.BYTES_PER_ELEMENT;if(e&&d>1){const u=new Uint8Array(i,l,c),h=d/2,p=u.length/d;for(let A=0;A<p;A++){const f=A*d;for(let m=0;m<h;m++){const g=f+m,y=f-m+d-1,v=u[g];u[g]=u[y],u[y]=v}}}return new a(i,l,c/d)}})(),o=(function(){const n=new TextDecoder;return()=>JSON.parse(n.decode(t(Uint8Array)))})();return{metadata:o(),textureData:t(Uint8Array),eachTextureDataPortion:t(Uint32Array),eachTextureAttributes:t(Uint16Array),positions:t(Uint16Array),normals:t(Int8Array),colors:t(Uint8Array),uvs:t(Float32Array),indices:t(Uint32Array),edgeIndices:t(Uint32Array),eachTextureSetTextures:t(Int32Array),matrices:t(Float32Array),reusedGeometriesDecodeMatrix:t(Float32Array),eachGeometryPrimitiveType:t(Uint8Array),eachGeometryPositionsPortion:t(Uint32Array),eachGeometryNormalsPortion:t(Uint32Array),eachGeometryColorsPortion:t(Uint32Array),eachGeometryUVsPortion:t(Uint32Array),eachGeometryIndicesPortion:t(Uint32Array),eachGeometryEdgeIndicesPortion:t(Uint32Array),eachMeshGeometriesPortion:t(Uint32Array),eachMeshMatricesPortion:t(Uint32Array),eachMeshTextureSet:t(Int32Array),eachMeshMaterialAttributes:t(Uint8Array),eachEntityId:o(),eachEntityMeshesPortion:t(Uint32Array),eachTileAABB:t(Float64Array),eachTileEntitiesPortion:t(Uint32Array)}}const aTt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();(function(){const i=document.createElement("canvas"),e=i.getContext("2d");return function(t){return i.width=t.width,i.height=t.height,e.putImageData(t,0,0),i.toDataURL()}})();function sTt(i,e,t,o,n,r){const a=r.getNextId(),s=t.metadata,l=t.textureData,c=t.eachTextureDataPortion,d=t.eachTextureAttributes,u=t.positions,h=t.normals,p=t.colors,A=t.uvs,f=t.indices,m=t.edgeIndices,g=t.eachTextureSetTextures,y=t.matrices,v=t.reusedGeometriesDecodeMatrix,w=t.eachGeometryPrimitiveType,x=t.eachGeometryPositionsPortion,k=t.eachGeometryNormalsPortion,B=t.eachGeometryColorsPortion,E=t.eachGeometryUVsPortion,P=t.eachGeometryIndicesPortion,R=t.eachGeometryEdgeIndicesPortion,T=t.eachMeshGeometriesPortion,L=t.eachMeshMatricesPortion,F=t.eachMeshTextureSet,U=t.eachMeshMaterialAttributes,q=t.eachEntityId,V=t.eachEntityMeshesPortion,W=t.eachTileAABB,Y=t.eachTileEntitiesPortion,$=c.length,me=g.length/5,Ie=x.length,Se=T.length,qe=V.length,Qe=Y.length;n&&n.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let ge=0;ge<$;ge++){const we=ge===$-1,Le=c[ge],We=we?l.length:c[ge+1],H=We-Le>0,ee=ge*rTt,ae=d[ee+0]===1,Be=d[ee+1];d[ee+2],d[ee+3];const pe=d[ee+4],Q=d[ee+5],Z=d[ee+6],ie=d[ee+7],re=d[ee+8];if(H){const ne=new Uint8Array(l.subarray(Le,We)).buffer,G=`${a}-texture-${ge}`;if(ae)o.createTexture({id:G,buffers:[ne],minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re});else{const K=Be===j8?"image/jpeg":Be===V8?"image/png":"image/gif",ue=new Blob([ne],{type:K}),xe=(window.URL||window.webkitURL).createObjectURL(ue),oe=document.createElement("img");oe.src=xe,o.createTexture({id:G,image:oe,minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re})}}}for(let ge=0;ge<me;ge++){const we=ge*5,Le=`${a}-textureSet-${ge}`,We=g[we+0],H=g[we+1],ee=g[we+2],ae=g[we+3],Be=g[we+4];o.createTextureSet({id:Le,colorTextureId:We>=0?`${a}-texture-${We}`:null,normalsTextureId:ee>=0?`${a}-texture-${ee}`:null,metallicRoughnessTextureId:H>=0?`${a}-texture-${H}`:null,emissiveTextureId:ae>=0?`${a}-texture-${ae}`:null,occlusionTextureId:Be>=0?`${a}-texture-${Be}`:null})}const Ce=new Uint32Array(Ie);for(let ge=0;ge<Se;ge++){const we=T[ge];Ce[we]!==void 0?Ce[we]++:Ce[we]=1}const De=C.vec3(),Fe=C.AABB3(),ve={};for(let ge=0;ge<Qe;ge++){const we=Qe-1,Le=ge===we,We=Y[ge],H=Le?qe-1:Y[ge+1]-1,ee=ge*6,ae=W.subarray(ee,ee+6);C.getAABB3Center(ae,De),Fe[0]=ae[0]-De[0],Fe[1]=ae[1]-De[1],Fe[2]=ae[2]-De[2],Fe[3]=ae[3]-De[0],Fe[4]=ae[4]-De[1],Fe[5]=ae[5]-De[2];const Be=Jt.createPositionsDecodeMatrix(Fe),pe={};for(let Q=We;Q<=H;Q++){const Z=q[Q],ie=e.globalizeObjectIds?C.globalizeObjectId(o.id,Z):Z,re=qe-1,ne=Q===re,G=V[Q],K=ne?T.length-1:V[Q+1]-1,ue=[],xe=i.metaScene.metaObjects[ie],oe={},Me={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(xe){if(e.excludeTypesMap&&xe.type&&e.excludeTypesMap[xe.type]||e.includeTypesMap&&xe.type&&!e.includeTypesMap[xe.type]||e.includeIdsMap&&xe.id&&!e.includeIdsMap[xe.id])continue;const je=e.objectDefaults?e.objectDefaults[xe.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(oe.visible=!1),je.pickable===!1&&(oe.pickable=!1),je.colorize&&(Me.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(Me.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(Me.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(Me.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=G;je<=K;je++){const he=T[je],Ne=Ce[he]>1,Ee=he===Ie-1,ze=F[je],ot=ze>=0?`${a}-textureSet-${ze}`:null,At=aTt(U.subarray(je*6,je*6+3)),ft=U[je*6+3]/255,lt=U[je*6+4]/255,ut=U[je*6+5]/255,Te=r.getNextId();if(Ne){const st=L[je],dt=y.slice(st,st+16),Ye=`${a}-geometry.${ge}.${he}`;let fe=ve[Ye];if(!fe){fe={batchThisMesh:!e.reuseGeometries};const be=w[he];let Xe=!1;switch(be){case 0:fe.primitiveName="solid",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Ee?h.length:k[he+1]),fe.geometryUVs=A.subarray(E[he],Ee?A.length:E[he+1]),fe.geometryIndices=f.subarray(P[he],Ee?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(R[he],Ee?m.length:R[he+1]),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 1:fe.primitiveName="surface",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Ee?h.length:k[he+1]),fe.geometryUVs=A.subarray(E[he],Ee?A.length:E[he+1]),fe.geometryIndices=f.subarray(P[he],Ee?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(R[he],Ee?m.length:R[he+1]),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 2:fe.primitiveName="points",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryColors=p.subarray(B[he],Ee?p.length:B[he+1]),Xe=fe.geometryPositions.length>0;break;case 3:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryIndices=f.subarray(P[he],Ee?f.length:P[he+1]),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 4:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryIndices=EW(fe.geometryPositions,f.subarray(P[he],Ee?f.length:P[he+1])),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;default:continue}if(Xe||(fe=null),fe&&(fe.geometryPositions.length>1e3,fe.batchThisMesh)){fe.decompressedPositions=new Float32Array(fe.geometryPositions.length),fe.transformedAndRecompressedPositions=new Uint16Array(fe.geometryPositions.length);const ht=fe.geometryPositions,St=fe.decompressedPositions;for(let xt=0,fi=ht.length;xt<fi;xt+=3)St[xt+0]=ht[xt+0]*v[0]+v[12],St[xt+1]=ht[xt+1]*v[5]+v[13],St[xt+2]=ht[xt+2]*v[10]+v[14];fe.geometryPositions=null,ve[Ye]=fe}}if(fe)if(fe.batchThisMesh){const be=fe.decompressedPositions,Xe=fe.transformedAndRecompressedPositions;for(let ht=0,St=be.length;ht<St;ht+=3)Zl[0]=be[ht+0],Zl[1]=be[ht+1],Zl[2]=be[ht+2],Zl[3]=1,C.transformVec4(dt,Zl,BW),Jt.compressPosition(BW,Fe,Zl),Xe[ht+0]=Zl[0],Xe[ht+1]=Zl[1],Xe[ht+2]=Zl[2];o.createMesh(mt.apply(Me,{id:Te,textureSetId:ot,origin:De,primitive:fe.primitiveName,positionsCompressed:Xe,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:Be,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te)}else pe[Ye]||(o.createGeometry({id:Ye,primitive:fe.primitiveName,positionsCompressed:fe.geometryPositions,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:v}),pe[Ye]=!0),o.createMesh(mt.apply(Me,{id:Te,geometryId:Ye,textureSetId:ot,matrix:dt,color:At,metallic:lt,roughness:ut,opacity:ft,origin:De})),ue.push(Te)}else{const st=w[he];let dt,Ye,fe,be,Xe,ht,St,xt=!1;switch(st){case 0:dt="solid",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),fe=h.subarray(k[he],Ee?h.length:k[he+1]),be=A.subarray(E[he],Ee?A.length:E[he+1]),ht=f.subarray(P[he],Ee?f.length:P[he+1]),St=m.subarray(R[he],Ee?m.length:R[he+1]),xt=Ye.length>0&&ht.length>0;break;case 1:dt="surface",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),fe=h.subarray(k[he],Ee?h.length:k[he+1]),be=A.subarray(E[he],Ee?A.length:E[he+1]),ht=f.subarray(P[he],Ee?f.length:P[he+1]),St=m.subarray(R[he],Ee?m.length:R[he+1]),xt=Ye.length>0&&ht.length>0;break;case 2:dt="points",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),Xe=p.subarray(B[he],Ee?p.length:B[he+1]),xt=Ye.length>0;break;case 3:dt="lines",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),ht=f.subarray(P[he],Ee?f.length:P[he+1]),xt=Ye.length>0&&ht.length>0;break;case 4:dt="lines",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),ht=EW(Ye,f.subarray(P[he],Ee?f.length:P[he+1])),xt=Ye.length>0&&ht.length>0;break;default:continue}xt&&(o.createMesh(mt.apply(Me,{id:Te,textureSetId:ot,origin:De,primitive:dt,positionsCompressed:Ye,normalsCompressed:fe,uv:be&&be.length>0?be:null,colorsCompressed:Xe,indices:ht,edgeIndices:St,positionsDecodeMatrix:Be,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te))}}ue.length>0&&o.createEntity(mt.apply(oe,{id:ie,isObject:!0,meshIds:ue}))}}}}function EW(i,e){const t=[];if(e.length>1)for(let o=0,n=e.length-1;o<n;o++)t.push(e[o]),t.push(e[o+1]);else if(i.length>1)for(let o=0,n=i.length/3-1;o<n;o++)t.push(o),t.push(o+1);return t}const PW={version:11,parseArrayBuffer:function(i,e,t,o,n,r){const a=nTt(t);sTt(i,e,a,o,n,r)}};let Du=window.pako||$a;Du.inflate||(Du=Du.default);const Wl=C.vec4(),IW=C.vec4(),lTt=9;function cTt(i){const e=(function(){const n=new ArrayBuffer(2);return new Uint16Array(n)[0]=1,new Uint8Array(n)[0]!==1})(),t=(function(){let n=0;const r=new DataView(i);return function(a){const s=1+2*n++,l=r.getUint32(s*4,!0),c=r.getUint32((s+1)*4,!0),d=a.BYTES_PER_ELEMENT;if(e&&d>1){const u=new Uint8Array(i,l,c),h=d/2,p=u.length/d;for(let A=0;A<p;A++){const f=A*d;for(let m=0;m<h;m++){const g=f+m,y=f-m+d-1,v=u[g];u[g]=u[y],u[y]=v}}}return new a(i,l,c/d)}})(),o=(function(){const n=new TextDecoder;return()=>JSON.parse(n.decode(t(Uint8Array)))})();return{metadata:o(),textureData:t(Uint8Array),eachTextureDataPortion:t(Uint32Array),eachTextureAttributes:t(Uint16Array),positions:t(Uint16Array),normals:t(Int8Array),colors:t(Uint8Array),uvs:t(Float32Array),indices:t(Uint32Array),edgeIndices:t(Uint32Array),eachTextureSetTextures:t(Int32Array),matrices:t(Float32Array),reusedGeometriesDecodeMatrix:t(Float32Array),eachGeometryPrimitiveType:t(Uint8Array),eachGeometryAxisLabel:o(),eachGeometryPositionsPortion:t(Uint32Array),eachGeometryNormalsPortion:t(Uint32Array),eachGeometryColorsPortion:t(Uint32Array),eachGeometryUVsPortion:t(Uint32Array),eachGeometryIndicesPortion:t(Uint32Array),eachGeometryEdgeIndicesPortion:t(Uint32Array),eachMeshGeometriesPortion:t(Uint32Array),eachMeshMatricesPortion:t(Uint32Array),eachMeshTextureSet:t(Int32Array),eachMeshMaterialAttributes:t(Uint8Array),eachEntityId:o(),eachEntityMeshesPortion:t(Uint32Array),eachTileAABB:t(Float64Array),eachTileEntitiesPortion:t(Uint32Array)}}function dTt(i){let e=0;return{metadata:i[e++],textureData:i[e++],eachTextureDataPortion:i[e++],eachTextureAttributes:i[e++],positions:i[e++],normals:i[e++],colors:i[e++],uvs:i[e++],indices:i[e++],edgeIndices:i[e++],eachTextureSetTextures:i[e++],matrices:i[e++],reusedGeometriesDecodeMatrix:i[e++],eachGeometryPrimitiveType:i[e++],eachGeometryAxisLabel:i[e++],eachGeometryPositionsPortion:i[e++],eachGeometryNormalsPortion:i[e++],eachGeometryColorsPortion:i[e++],eachGeometryUVsPortion:i[e++],eachGeometryIndicesPortion:i[e++],eachGeometryEdgeIndicesPortion:i[e++],eachMeshGeometriesPortion:i[e++],eachMeshMatricesPortion:i[e++],eachMeshTextureSet:i[e++],eachMeshMaterialAttributes:i[e++],eachEntityId:i[e++],eachEntityMeshesPortion:i[e++],eachTileAABB:i[e++],eachTileEntitiesPortion:i[e++]}}function uTt(i){function e(t,o){return t.length===0?[]:Du.inflate(t,o).buffer}return{metadata:JSON.parse(Du.inflate(i.metadata,{to:"string"})),textureData:new Uint8Array(e(i.textureData)),eachTextureDataPortion:new Uint32Array(e(i.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(i.eachTextureAttributes)),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),uvs:new Float32Array(e(i.uvs)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),eachTextureSetTextures:new Int32Array(e(i.eachTextureSetTextures)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryAxisLabel:JSON.parse(Du.inflate(i.eachGeometryAxisLabel,{to:"string"})),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(i.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(i.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(i.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(Du.inflate(i.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const hTt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();(function(){const i=document.createElement("canvas"),e=i.getContext("2d");return function(t){return i.width=t.width,i.height=t.height,e.putImageData(t,0,0),i.toDataURL()}})();function SW(i,e,t,o,n,r){const a=r.getNextId(),s=t.metadata,l=t.textureData,c=t.eachTextureDataPortion,d=t.eachTextureAttributes,u=t.positions,h=t.normals,p=t.colors,A=t.uvs,f=t.indices,m=t.edgeIndices,g=t.eachTextureSetTextures,y=t.matrices,v=t.reusedGeometriesDecodeMatrix,w=t.eachGeometryPrimitiveType,x=t.eachGeometryAxisLabel,k=t.eachGeometryPositionsPortion,B=t.eachGeometryNormalsPortion,E=t.eachGeometryColorsPortion,P=t.eachGeometryUVsPortion,R=t.eachGeometryIndicesPortion,T=t.eachGeometryEdgeIndicesPortion,L=t.eachMeshGeometriesPortion,F=t.eachMeshMatricesPortion,U=t.eachMeshTextureSet,q=t.eachMeshMaterialAttributes,V=t.eachEntityId,W=t.eachEntityMeshesPortion,Y=t.eachTileAABB,$=t.eachTileEntitiesPortion,me=c.length,Ie=g.length/5,Se=k.length,qe=L.length,Qe=W.length,Ce=$.length;n&&n.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let we=0;we<me;we++){const Le=we===me-1,We=c[we],H=Le?l.length:c[we+1],ee=H-We>0,ae=we*lTt,Be=d[ae+0]===1,pe=d[ae+1];d[ae+2],d[ae+3];const Q=d[ae+4],Z=d[ae+5],ie=d[ae+6],re=d[ae+7],ne=d[ae+8];if(ee){const G=new Uint8Array(l.subarray(We,H)).buffer,K=`${a}-texture-${we}`;if(Be)o.createTexture({id:K,buffers:[G],minFilter:Q,magFilter:Z,wrapS:ie,wrapT:re,wrapR:ne});else{const ue=pe===j8?"image/jpeg":pe===V8?"image/png":"image/gif",xe=new Blob([G],{type:ue}),oe=(window.URL||window.webkitURL).createObjectURL(xe),Me=document.createElement("img");Me.src=oe,o.createTexture({id:K,image:Me,minFilter:Q,magFilter:Z,wrapS:ie,wrapT:re,wrapR:ne})}}}for(let we=0;we<Ie;we++){const Le=we*5,We=`${a}-textureSet-${we}`,H=g[Le+0],ee=g[Le+1],ae=g[Le+2],Be=g[Le+3],pe=g[Le+4];o.createTextureSet({id:We,colorTextureId:H>=0?`${a}-texture-${H}`:null,normalsTextureId:ae>=0?`${a}-texture-${ae}`:null,metallicRoughnessTextureId:ee>=0?`${a}-texture-${ee}`:null,emissiveTextureId:Be>=0?`${a}-texture-${Be}`:null,occlusionTextureId:pe>=0?`${a}-texture-${pe}`:null})}const De=new Uint32Array(Se);for(let we=0;we<qe;we++){const Le=L[we];De[Le]!==void 0?De[Le]++:De[Le]=1}const Fe=C.vec3(),ve=C.AABB3(),ge={};for(let we=0;we<Ce;we++){const Le=Ce-1,We=we===Le,H=$[we],ee=We?Qe-1:$[we+1]-1,ae=we*6,Be=Y.subarray(ae,ae+6);C.getAABB3Center(Be,Fe),ve[0]=Be[0]-Fe[0],ve[1]=Be[1]-Fe[1],ve[2]=Be[2]-Fe[2],ve[3]=Be[3]-Fe[0],ve[4]=Be[4]-Fe[1],ve[5]=Be[5]-Fe[2];const pe=Jt.createPositionsDecodeMatrix(ve),Q={};for(let Z=H;Z<=ee;Z++){const ie=V[Z],re=e.globalizeObjectIds?C.globalizeObjectId(o.id,ie):ie,ne=Qe-1,G=Z===ne,K=W[Z],ue=G?L.length-1:W[Z+1]-1,xe=[],oe=i.metaScene.metaObjects[re],Me={},je={};if(!(e.includeIdsMap&&ie&&!e.includeIdsMap[ie])){if(oe){if(e.excludeTypesMap&&oe.type&&e.excludeTypesMap[oe.type]||e.includeTypesMap&&oe.type&&!e.includeTypesMap[oe.type]||e.includeIdsMap&&oe.id&&!e.includeIdsMap[oe.id])continue;const he=e.objectDefaults?e.objectDefaults[oe.type]||e.objectDefaults.DEFAULT:null;he&&(he.visible===!1&&(Me.visible=!1),he.pickable===!1&&(Me.pickable=!1),he.colorize&&(je.color=he.colorize),he.opacity!==void 0&&he.opacity!==null&&(je.opacity=he.opacity),he.metallic!==void 0&&he.metallic!==null&&(je.metallic=he.metallic),he.roughness!==void 0&&he.roughness!==null&&(je.roughness=he.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let he=K;he<=ue;he++){const Ne=L[he],Ee=De[Ne]>1,ze=Ne===Se-1,ot=U[he],At=ot>=0?`${a}-textureSet-${ot}`:null,ft=hTt(q.subarray(he*6,he*6+3)),lt=q[he*6+3]/255,ut=q[he*6+4]/255,Te=q[he*6+5]/255,st=r.getNextId();if(Ee){const dt=F[he],Ye=y.slice(dt,dt+16),fe=`${a}-geometry.${we}.${Ne}`;let be=ge[fe];if(!be){be={batchThisMesh:!e.reuseGeometries};const Xe=w[Ne],ht=x[Ne];let St=!1,xt;switch(Xe){case 0:be.primitiveName="solid",be.geometryPositions=u.subarray(k[Ne],ze?u.length:k[Ne+1]),be.geometryNormals=h.subarray(B[Ne],ze?h.length:B[Ne+1]),be.geometryUVs=A.subarray(P[Ne],ze?A.length:P[Ne+1]),be.geometryIndices=f.subarray(R[Ne],ze?f.length:R[Ne+1]),be.geometryEdgeIndices=m.subarray(T[Ne],ze?m.length:T[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 1:be.primitiveName="surface",be.geometryPositions=u.subarray(k[Ne],ze?u.length:k[Ne+1]),be.geometryNormals=h.subarray(B[Ne],ze?h.length:B[Ne+1]),be.geometryUVs=A.subarray(P[Ne],ze?A.length:P[Ne+1]),be.geometryIndices=f.subarray(R[Ne],ze?f.length:R[Ne+1]),be.geometryEdgeIndices=m.subarray(T[Ne],ze?m.length:T[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 2:be.primitiveName="points",be.geometryPositions=u.subarray(k[Ne],ze?u.length:k[Ne+1]),be.geometryColors=p.subarray(E[Ne],ze?p.length:E[Ne+1]),St=be.geometryPositions.length>0;break;case 3:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],ze?u.length:k[Ne+1]),be.geometryIndices=f.subarray(R[Ne],ze?f.length:R[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 4:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],ze?u.length:k[Ne+1]),be.geometryIndices=TW(be.geometryPositions,f.subarray(R[Ne],ze?f.length:R[Ne+1])),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 7:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],ze?u.length:k[Ne+1]),be.decompressedPositions=Jt.decompressPositions(be.geometryPositions,v),xt=yp({origin:be.decompressedPositions,text:ht,size:2}),be.decompressedPositions=xt.positions,be.geometryIndices=xt.indices,be.geometryPositions=null,St=be.decompressedPositions.length>0&&be.geometryIndices.length>0;break;default:continue}if(St||(be=null),be&&(be.geometryPositions&&be.geometryPositions.length>1e3,be.batchThisMesh)){if(Xe===7)be.transformedAndRecompressedPositions=new Uint16Array(be.decompressedPositions.length);else{be.decompressedPositions=new Float32Array(be.geometryPositions.length),be.transformedAndRecompressedPositions=new Uint16Array(be.geometryPositions.length);const fi=be.geometryPositions,ji=be.decompressedPositions;for(let Mo=0,eo=fi.length;Mo<eo;Mo+=3)ji[Mo+0]=fi[Mo+0]*v[0]+v[12],ji[Mo+1]=fi[Mo+1]*v[5]+v[13],ji[Mo+2]=fi[Mo+2]*v[10]+v[14];be.geometryPositions=null}ge[fe]=be}}if(be)if(be.batchThisMesh){const Xe=be.decompressedPositions,ht=be.transformedAndRecompressedPositions;for(let St=0,xt=Xe.length;St<xt;St+=3)Wl[0]=Xe[St+0],Wl[1]=Xe[St+1],Wl[2]=Xe[St+2],Wl[3]=1,C.transformVec4(Ye,Wl,IW),Jt.compressPosition(IW,ve,Wl),ht[St+0]=Wl[0],ht[St+1]=Wl[1],ht[St+2]=Wl[2];o.createMesh(mt.apply(je,{id:st,textureSetId:At,origin:Fe,primitive:be.primitiveName,positionsCompressed:ht,normalsCompressed:be.geometryNormals,uv:be.geometryUVs,colorsCompressed:be.geometryColors,indices:be.geometryIndices,edgeIndices:be.geometryEdgeIndices,positionsDecodeMatrix:pe,color:ft,metallic:ut,roughness:Te,opacity:lt})),xe.push(st)}else{if(!Q[fe]){let Xe={id:fe,primitive:be.primitiveName,normalsCompressed:be.geometryNormals,uv:be.geometryUVs,colorsCompressed:be.geometryColors,indices:be.geometryIndices,edgeIndices:be.geometryEdgeIndices};be.geometryPositions?Xe={...Xe,positionsCompressed:be.geometryPositions,positionsDecodeMatrix:v}:Xe={...Xe,positions:be.decompressedPositions},o.createGeometry(Xe),Q[fe]=!0}o.createMesh(mt.apply(je,{id:st,geometryId:fe,textureSetId:At,matrix:Ye,color:ft,metallic:ut,roughness:Te,opacity:lt,origin:Fe})),xe.push(st)}}else{const dt=w[Ne],Ye=x[Ne];let fe,be,Xe,ht,St,xt,fi,ji=!1,Mo;switch(dt){case 0:fe="solid",be=u.subarray(k[Ne],ze?u.length:k[Ne+1]),Xe=h.subarray(B[Ne],ze?h.length:B[Ne+1]),ht=A.subarray(P[Ne],ze?A.length:P[Ne+1]),xt=f.subarray(R[Ne],ze?f.length:R[Ne+1]),fi=m.subarray(T[Ne],ze?m.length:T[Ne+1]),ji=be.length>0&&xt.length>0;break;case 1:fe="surface",be=u.subarray(k[Ne],ze?u.length:k[Ne+1]),Xe=h.subarray(B[Ne],ze?h.length:B[Ne+1]),ht=A.subarray(P[Ne],ze?A.length:P[Ne+1]),xt=f.subarray(R[Ne],ze?f.length:R[Ne+1]),fi=m.subarray(T[Ne],ze?m.length:T[Ne+1]),ji=be.length>0&&xt.length>0;break;case 2:fe="points",be=u.subarray(k[Ne],ze?u.length:k[Ne+1]),St=p.subarray(E[Ne],ze?p.length:E[Ne+1]),ji=be.length>0;break;case 3:fe="lines",be=u.subarray(k[Ne],ze?u.length:k[Ne+1]),xt=f.subarray(R[Ne],ze?f.length:R[Ne+1]),ji=be.length>0&&xt.length>0;break;case 4:fe="lines",be=u.subarray(k[Ne],ze?u.length:k[Ne+1]),xt=TW(be,f.subarray(R[Ne],ze?f.length:R[Ne+1])),ji=be.length>0&&xt.length>0;break;case 7:fe="lines",be=u.subarray(k[Ne],ze?u.length:k[Ne+1]),be=Jt.decompressPositions(be,pe),Mo=yp({origin:be,text:Ye,size:2}),be=Mo.positions,xt=Mo.indices,ji=be.length>0&&xt.length>0;break;default:continue}if(ji){let eo=mt.apply(je,{id:st,textureSetId:At,origin:Fe,primitive:fe,normalsCompressed:Xe,uv:ht&&ht.length>0?ht:null,colorsCompressed:St,indices:xt,edgeIndices:fi,color:ft,metallic:ut,roughness:Te,opacity:lt});dt!==7?eo={...eo,positionsCompressed:be,positionsDecodeMatrix:pe}:eo={...eo,positions:be},o.createMesh(eo),xe.push(st)}}}xe.length>0&&o.createEntity(mt.apply(Me,{id:re,isObject:!0,meshIds:xe}))}}}}function TW(i,e){const t=[];if(e.length>1)for(let o=0,n=e.length-1;o<n;o++)t.push(e[o]),t.push(e[o+1]);else if(i.length>1)for(let o=0,n=i.length/3-1;o<n;o++)t.push(o),t.push(o+1);return t}const RW={version:12,parseArrayBuffer:function(i,e,t,o,n,r){const a=cTt(t);SW(i,e,a,o,n,r)},parse:function(i,e,t,o,n,r){const a=dTt(t),s=uTt(a);SW(i,e,s,o,n,r)}},gn={};gn[dW.version]=dW,gn[uW.version]=uW,gn[hW.version]=hW,gn[pW.version]=pW,gn[fW.version]=fW,gn[AW.version]=AW,gn[mW.version]=mW,gn[bW.version]=bW,gn[CW.version]=CW,gn[MW.version]=MW,gn[PW.version]=PW,gn[RW.version]=RW;class n7 extends va{constructor(e,t={}){super("XKTLoader",e,t),this._maxGeometryBatchSize=t.maxGeometryBatchSize,this.textureTranscoder=t.textureTranscoder,this.dataSource=t.dataSource,this.objectDefaults=t.objectDefaults,this.includeTypes=t.includeTypes,this.excludeTypes=t.excludeTypes,this.excludeUnclassifiedObjects=t.excludeUnclassifiedObjects,this.reuseGeometries=t.reuseGeometries}get supportedVersions(){return Object.keys(gn)}get textureTranscoder(){return this._textureTranscoder}set textureTranscoder(e){this._textureTranscoder=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource=e||new sW}get objectDefaults(){return this._objectDefaults}set objectDefaults(e){this._objectDefaults=e||rW}get includeTypes(){return this._includeTypes}set includeTypes(e){this._includeTypes=e}get excludeTypes(){return this._excludeTypes}set excludeTypes(e){this._excludeTypes=e}get includeIds(){return this._includeIds}set includeIds(e){this._includeIds=e}get excludeUnclassifiedObjects(){return this._excludeUnclassifiedObjects}set excludeUnclassifiedObjects(e){this._excludeUnclassifiedObjects=!!e}get globalizeObjectIds(){return this._globalizeObjectIds}set globalizeObjectIds(e){this._globalizeObjectIds=!!e}get reuseGeometries(){return this._reuseGeometries}set reuseGeometries(e){this._reuseGeometries=e!==!1}load(e={}){if(e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id),!e.src&&!e.xkt&&!e.manifestSrc&&!e.manifest)throw new Error("XKTLoaderPlugin: load() param expected: src, xkt, manifestSrc or manifestData");const t={},o=e.includeTypes||this._includeTypes,n=e.excludeTypes||this._excludeTypes,r=e.includeIds||this._includeIds,a=e.objectDefaults||this._objectDefaults;if(t.reuseGeometries=e.reuseGeometries!==null&&e.reuseGeometries!==void 0?e.reuseGeometries:this._reuseGeometries!==!1,o){t.includeTypesMap={};for(let A=0,f=o.length;A<f;A++)t.includeTypesMap[o[A]]=!0}if(n){t.excludeTypesMap={};for(let A=0,f=n.length;A<f;A++)t.excludeTypesMap[n[A]]=!0}if(r){t.includeIdsMap={};for(let A=0,f=r.length;A<f;A++)t.includeIdsMap[r[A]]=!0}a&&(t.objectDefaults=a),t.excludeUnclassifiedObjects=e.excludeUnclassifiedObjects!==void 0?!!e.excludeUnclassifiedObjects:this._excludeUnclassifiedObjects,t.globalizeObjectIds=e.globalizeObjectIds!==void 0&&e.globalizeObjectIds!==null?!!e.globalizeObjectIds:this._globalizeObjectIds;const s=new gv(this.viewer.scene,mt.apply(e,{isModel:!0,textureTranscoder:this._textureTranscoder,maxGeometryBatchSize:this._maxGeometryBatchSize,origin:e.origin,disableVertexWelding:e.disableVertexWelding||!1,disableIndexRebucketing:e.disableIndexRebucketing||!1,dtxEnabled:e.dtxEnabled,renderOrder:e.renderOrder})),l=s.id,c=new sJ({metaScene:this.viewer.metaScene,id:l});this.viewer.scene.canvas.spinner.processes++;const d=()=>{s.destroyed||(s.finalize(),c.finalize(),this.viewer.scene.canvas.spinner.processes--,s.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(c.id)}),this.scheduleTask(()=>{s.destroyed||(s.scene.fire("modelLoaded",s.id),s.fire("loaded",!0,!1))}))},u=A=>{this.viewer.scene.canvas.spinner.processes--,this.error(A),s.fire("error",A)};let h=0;const p={getNextId:()=>`${l}.${h++}`};if(e.metaModelSrc||e.metaModelData)if(e.metaModelSrc){const A=e.metaModelSrc;this._dataSource.getMetaModel(A,f=>{s.destroyed||(c.loadData(f,{includeTypes:o,excludeTypes:n,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,t,s,null,p,d,u):(this._parseModel(e.xkt,t,s,null,p),d()))},f=>{u(`load(): Failed to load model metadata for model '${l} from '${A}' - ${f}`)})}else e.metaModelData&&(c.loadData(e.metaModelData,{includeTypes:o,excludeTypes:n,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,t,s,null,p,d,u):(this._parseModel(e.xkt,t,s,null,p),d()));else if(e.src)this._loadModel(e.src,t,s,c,p,d,u);else if(e.xkt)this._parseModel(e.xkt,t,s,c,p),d();else if(e.manifestSrc||e.manifest){const A=e.manifestSrc?pTt(e.manifestSrc):"",f=(y,v,w)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getMetaModel(`${A}${y[x]}`,B=>{c.loadData(B,{includeTypes:o,excludeTypes:n,globalizeObjectIds:t.globalizeObjectIds}),x++,this.scheduleTask(k,200)},w)};k()},m=(y,v,w)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getXKT(`${A}${y[x]}`,B=>{this._parseModel(B,t,s,null,p),s.preFinalize(),x++,this.scheduleTask(k,200)},w)};k()},g=(y,v,w)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getXKT(`${A}${y[x]}`,B=>{this._parseModel(B,t,s,c,p),s.preFinalize(),x++,this.scheduleTask(k,200)},w)};k()};if(e.manifest){const y=e.manifest,v=y.xktFiles;if(!v||v.length===0){u("load(): Failed to load model manifest - manifest not valid");return}const w=y.metaModelFiles;w?f(w,()=>{m(v,d,u)},u):g(v,d,u)}else this._dataSource.getManifest(e.manifestSrc,y=>{if(s.destroyed)return;const v=y.xktFiles;if(!v||v.length===0){u("load(): Failed to load model manifest - manifest not valid");return}const w=y.metaModelFiles;w?f(w,()=>{m(v,d,u)},u):g(v,d,u)},u)}return s}_loadModel(e,t,o,n,r,a,s){this._dataSource.getXKT(e,l=>{this._parseModel(l,t,o,n,r),o.preFinalize(),a()},s)}async _parseModel(e,t,o,n,r){if(o.destroyed)return;const a=new DataView(e),s=new Uint8Array(e),l=a.getUint32(0,!0),c=l&2147483647,d=c<11||c>=12&&l>>>31,u=gn[c];if(!u){this.error("Unsupported .XKT file version: "+c+" - this XKTLoaderPlugin supports versions "+Object.keys(gn));return}if(!d){u.parseArrayBuffer(this.viewer,t,e,o,n,r);return}const h=a.getUint32(4,!0),p=[];let A=(h+2)*4;for(let f=0;f<h;f++){const m=a.getUint32((f+2)*4,!0);p.push(s.subarray(A,A+m)),A+=m}u.parse(this.viewer,t,p,o,n,r)}}function pTt(i){i.indexOf("?")>-1&&(i=i.split("?")[0]);const e=i.split("/");return e.pop(),e.join("/")+"/"}let fTt=1;class uL{constructor(e,t,o=null){this.tileset=e,this.computePriority=e.plugin.computePriority,this.distanceFactorToFreeData=e.plugin.distanceFactorToFreeData,this.src=t.content?.uri??null;const n=this.src?new URL(this.src).pathname:null;this.name=`${e.name}_${n?n.substring(n.lastIndexOf("/")+1):`tileWithNoContent_${fTt++}`}`,this.parent=o,this.refine=t.refine,this.data=null,this.fetching=null,this.depth=o?o.depth+1:1,this.model=null,this.loadProcess=null,this.loading=!1,this.currentDistanceFromCamera=null,this._visible=!o,this.priority=1,this.geometricError=t.geometricError;const[r,a,s,l,c,d,u,h,p,A,f,m]=t.boundingVolume.box,g=[r,s,-a];e.rootTransform&&(g[0]+=e.rootTransform[12],g[1]+=e.rootTransform[14],g[2]+=e.rootTransform[13]),this.center=Object.freeze(g);const y=[l,c,d],v=[-u,-h,-p],w=[A,f,m];this.xSize=C.lenVec3(y),this.ySize=C.lenVec3(w),this.zSize=C.lenVec3(v),this.volume=this.xSize*2*this.ySize*2*this.zSize*2,this.children=t.children?.map(x=>new uL(e,x,this))??[],e.tiles.add(this)}get visible(){return this._visible}set visible(e){this._visible!==e&&(this._visible=e,e?this.tileset.visibleTiles.add(this):this.tileset.visibleTiles.delete(this))}get loaded(){return!!this.model}get viewDistance(){return this.tileset.sensitivity*this.geometricError}get isWithinCameraVisibleRange(){return this.currentDistanceFromCamera<=this.viewDistance}updateVisibility(e){this.currentDistanceFromCamera=C.distVec3(this.center,e),this.parent&&(this.visible=this.isWithinCameraVisibleRange,this.currentDistanceFromCamera>this.viewDistance*this.distanceFactorToFreeData&&(this.data=null)),this.visible&&this.children.forEach(t=>t.updateVisibility(e)),this.priority=this.computePriority(this)}fetchData(){return this.data?this.data:this.src?(this.fetching||(this.fetching=new Promise((e,t)=>{fetch(this.src).then(o=>{o.ok?o.arrayBuffer().then(n=>{this.data=n,this.fetching=null,e(this.data)}):t(o)})})),this.fetching):null}showBoundingBox(){const{viewer:e}=this.tileset.plugin,{xSize:t,ySize:o,zSize:n,center:r}=this,a=1/this.depth;this.boxLines=new pi(e.scene,{geometry:new uo(e.scene,kM({center:r,xSize:t,ySize:o,zSize:n})),material:new ho(e.scene,{emissive:[1-a,a,(1-a)/2]})})}async load(){if(this.loading)return this.loadProcess;if(this.loaded)return this.model;if(this.loading=!0,!this.data)try{await this.fetchData()}catch(e){return console.warn(`[Xeokit - TilesetLoaderPlugin] Impossible to fetch data of tile "${this.name}".`,e),this.loading=!1,null}if(!this.visible)return this.loading=!1,null;this.tileset.plugin.debugMode&&this.showBoundingBox();try{const e=new Promise(t=>{const o=this.tileset.plugin.loader.load({id:this.name,xkt:this.data,metaModelData:{metaObjects:[{id:"metaModelRoot"}]}});o.once("loaded",()=>{this.loading=!1,this.loadProcess=null,this.model=o,this.tileset.destroyed||!this.visible?(this.unload(),t(null)):(this.tileset.loadedTiles.add(this),t(o))}),o.once("destroyed",()=>{this.loading=!1,this.loadProcess=null,t(null)})});return this.loadProcess=e,this.loadProcess}catch(e){return console.warn(`[Xeokit - TilesetLoaderPlugin] Impossible to load tile "${this.name}".`,e),null}}unload(){this.boxLines&&(this.boxLines.destroy(),this.boxLines=null),this.model&&(this.model.destroy(),this.model=null),this.tileset.loadedTiles.delete(this),this.children.forEach(e=>{e.loaded&&e.unload()})}}function ATt(i,e,t){const o=Array.from(i),n=o.splice(0,e),r=async a=>{if(await t(a),o.length>0){const s=o.shift();r(s)}};n.forEach(r)}function gTt(i){let e=!1;return{cancel(){e=!0},async run(t){for(let o of i){if(e)break;await new Promise(n=>setTimeout(()=>(t(o)||Promise.resolve()).then(n)))}}}}let mTt=0;class vTt{constructor(e,t){this.plugin=e,this.name=t.name||`tileset-${mTt++}`,this.tiles=new Set,this.visibleTiles=new Set,this.loadedTiles=new Set,this.queue=null,this.renderNeeded=!0,this.destroyed=!1,this._sensitivity=e.sensitivity,t.root.transform&&(this.rootTransform=t.root.transform),this.root=new uL(this,t.root),this.root.load().then(o=>e.viewer.cameraFlight.flyTo(o))}get sensitivity(){return this._sensitivity}set sensitivity(e){this._sensitivity=e,this.updateVisibility()}updateVisibility(){this.tiles.forEach(e=>{e!==this.root&&(e.visible=!1)}),this.root.updateVisibility(this.plugin.viewer.camera.eye),this.renderNeeded=!0}render(){if(!this.renderNeeded)return;this.queue&&this.queue.cancel(),this.loadedTiles.forEach(t=>{t.visible||t.unload()});const e=Array.from(this.visibleTiles).filter(t=>!t.loaded).sort((t,o)=>t.priority-o.priority);ATt(e,40,t=>t.fetchData()),this.queue=gTt(e),this.queue.run(t=>t.load()),this.renderNeeded=!1}destroy(){this.queue&&this.queue.cancel(),this.loadedTiles.forEach(e=>e.unload()),this.destroyed=!0,this.plugin.tilesets.delete(this)}}function yTt(i){return i.depth}class LW extends va{constructor(e,t={}){super("TilesetLoader",e);const{computePriority:o=yTt,sensitivity:n=50,distanceFactorToFreeData:r=3,debugMode:a=!1}=t;this._sensitivity=n,this.distanceFactorToFreeData=r,this.computePriority=o,this.debugMode=a,this.tilesets=new Set,e.camera.on("matrix",this.updateTilesetsVisibilityCallback=()=>this.updateTilesetsVisibility()),e.scene.on("tick",this.renderTilesetsCallback=()=>this.renderTilesets()),this.loader=new n7(e)}load(e){const t=new vTt(this,e);return this.tilesets.add(t),t}updateTilesetsVisibility(){this.tilesets.forEach(e=>e.updateVisibility())}renderTilesets(){this.tilesets.forEach(e=>e.render())}get sensitivity(){return this._sensitivity}set sensitivity(e){this._sensitivity=e,this.tilesets.forEach(t=>t.sensitivity=this._sensitivity)}destroy(){this.viewer.camera.off(this.updateTilesetsVisibilityCallback),this.viewer.scene.off(this.renderTilesetsCallback),this.tilesets.forEach(e=>e.destroy()),super.destroy()}}const bTt="2.6.90";typeof window<"u"&&(window.__XEOKIT__?console.warn("WARNING: Multiple instances of xeokit-sdk being imported."):window.__XEOKIT__=bTt);const Yl=Object.freeze(Object.defineProperty({__proto__:null,AlphaFormat:fQ,AmbientLight:PB,AngleMeasurementEditMouseControl:JCt,AngleMeasurementEditTouchControl:ZCt,AngleMeasurementsControl:iE,AngleMeasurementsMouseControl:mJ,AngleMeasurementsPlugin:Py,AngleMeasurementsTouchControl:KCt,AnnotationsPlugin:rE,AxisGizmoPlugin:ext,BCFViewpointsPlugin:Dy,Bitmap:ZQ,ByteType:rQ,CameraMemento:Nbt,CameraPath:u6t,CameraPathAnimation:xr,ClampToEdgeWrapping:Qr,Component:ni,CompressedMediaType:_6t,Configs:Z8,ContextMenu:P5t,CubicBezierCurve:Hbt,Curve:qm,DefaultLoadingManager:tK,DepthFormat:vQ,DepthStencilFormat:yQ,DirLight:Wa,DistanceMeasurementEditControl:aE,DistanceMeasurementEditMouseControl:lxt,DistanceMeasurementEditTouchControl:cxt,DistanceMeasurementsControl:nE,DistanceMeasurementsMouseControl:CJ,DistanceMeasurementsPlugin:xJ,DistanceMeasurementsTouchControl:sxt,EdgeMaterial:eB,EmphasisMaterial:Ul,FastNavPlugin:EJ,FloatType:cQ,Fresnel:P8t,Frustum:Jn,FrustumPlane:mu,GIFMediaType:D6t,GLTFDefaultDataSource:PJ,GLTFLoaderPlugin:KE,HalfFloatType:dQ,ImagePlane:b8t,IntType:sQ,JPEGMediaType:j8,KTX2TextureTranscoder:ls,LOD:wK,LambertMaterial:w8t,LightMap:Obt,LineSet:AK,LinearEncoding:Tn,LinearFilter:Gr,LinearMipMapLinearFilter:wp,LinearMipMapNearestFilter:Jm,LinearMipmapLinearFilter:Cu,LinearMipmapNearestFilter:L6t,Loader:iK,LoadingManager:eK,LocaleService:Uq,LuminanceAlphaFormat:mQ,LuminanceFormat:gQ,Map:ma,Marker:vv,MarqueePicker:tl,MarqueePickerMouseControl:d6t,Mesh:pi,MeshSurfaceArea:eG,MeshVolume:YQ,MetallicMaterial:k8t,MirroredRepeatWrapping:Dl,ModelMemento:jbt,NavCubePlugin:JE,NearestFilter:wu,NearestMipMapLinearFilter:bp,NearestMipMapNearestFilter:Km,NearestMipmapLinearFilter:oQ,NearestMipmapNearestFilter:iQ,Node:Gm,ObjectsKdTree3:R5t,ObjectsMemento:Vbt,PNGMediaType:V8,Path:zbt,PerformanceModel:Qbt,PhongMaterial:ho,PickResult:hy,Plugin:va,PointLight:Dbt,PointerCircle:mM,PointerLens:I5t,QuadraticBezierCurve:qbt,Queue:Pq,RGBAFormat:Zm,RGBAIntegerFormat:kQ,RGBA_ASTC_10x10_Format:VM,RGBA_ASTC_10x5_Format:UM,RGBA_ASTC_10x6_Format:NM,RGBA_ASTC_10x8_Format:jM,RGBA_ASTC_12x10_Format:HM,RGBA_ASTC_12x12_Format:zM,RGBA_ASTC_4x4_Format:U8,RGBA_ASTC_5x4_Format:TM,RGBA_ASTC_5x5_Format:RM,RGBA_ASTC_6x5_Format:LM,RGBA_ASTC_6x6_Format:DM,RGBA_ASTC_8x5_Format:_M,RGBA_ASTC_8x6_Format:FM,RGBA_ASTC_8x8_Format:OM,RGBA_BPTC_Format:N8,RGBA_ETC2_EAC_Format:O8,RGBA_PVRTC_2BPPV1_Format:IM,RGBA_PVRTC_4BPPV1_Format:_8,RGBA_S3TC_DXT1_Format:R8,RGBA_S3TC_DXT3_Format:L8,RGBA_S3TC_DXT5_Format:Ym,RGBFormat:AQ,RGB_ETC1_Format:SM,RGB_ETC2_Format:F8,RGB_PVRTC_2BPPV1_Format:PM,RGB_PVRTC_4BPPV1_Format:D8,RGB_S3TC_DXT1_Format:Wm,RGFormat:CQ,RGIntegerFormat:xQ,ReadableGeometry:uo,RedFormat:bQ,RedIntegerFormat:wQ,ReflectionMap:Fbt,RepeatWrapping:mo,SceneModel:gv,SceneModelMesh:iG,SceneModelTransform:lK,SectionPlane:RB,SectionPlanesPlugin:pSt,ShortType:nQ,SpecularMaterial:E8t,SplineCurve:B8,SpriteMarker:Ubt,Texture:Cp,TextureTranscoder:Jbt,TilesetLoaderPlugin:LW,UnsignedByteType:EM,UnsignedInt248Type:pQ,UnsignedIntType:lQ,UnsignedShort4444Type:uQ,UnsignedShort5551Type:hQ,UnsignedShortType:aQ,VBOGeometry:Qq,VFC:DK,Viewer:gJ,WorkerPool:rK,XKTDefaultDataSource:sW,XKTLoaderPlugin:n7,buildBoxGeometry:xM,buildBoxLinesGeometry:kM,buildBoxLinesGeometryFromAABB:P6t,buildCylinderGeometry:mp,buildGridGeometry:Gq,buildLineGeometry:Jq,buildPlaneGeometry:MM,buildPolylineGeometry:Kq,buildPolylineGeometryFromCurve:S6t,buildSphereGeometry:vp,buildTorusGeometry:BM,buildVectorTextGeometry:yp,createCombinedTexture:zCt,createRTCViewMat:_i,createSkyboxMesh:qCt,createSphereMapMesh:QCt,frustumIntersectsAABB3:M8,getKTX2TextureTranscoder:nK,getPlaneRTCPos:jo,isTriangleMeshSolid:WQ,load3DSGeometry:B6t,loadOBJGeometry:E6t,math:C,meshSurfaceArea:tv,meshVolume:kp,os:OB,rtcToWorldPos:R6t,sRGBEncoding:ao,setFrustum:Oq,stats:Mi,utils:mt,worldToRTCPos:bu,worldToRTCPositions:T8},Symbol.toStringTag,{value:"Module"}));function Xp(i){let e=i.substring(1);const t=[];let o=null;for(;e.length>0;)o=e.substring(0,2),e=e.substring(2),t.push(parseInt(o,16)/255);return t}function DW(i){let e="";return e+=Math.round(i[0]*255).toString(16).padStart(2,"0"),e+=Math.round(i[1]*255).toString(16).padStart(2,"0"),e+=Math.round(i[2]*255).toString(16).padStart(2,"0"),`#${e}`}const wTt={class:"annotations-3d"},CTt={__name:"Annotations3D",setup(i){const e=ct("$viewer"),{localContext:t}=e,{xeokit:o}=t.viewer,n=o.scene.canvas.canvas,r=pM(),a=Er(new WeakSet),s=Re(()=>r.value.filter(u=>a.has(u))),l=new Map;pt(r,()=>{r.value.forEach(u=>{if(!l.has(u.id)){const{x:h,y:p,z:A}=u,f=new vv(o.scene,{worldPos:[h,A,p]});l.set(u.id,f);const[m,g]=f.canvasPos;f.style=le(`left: ${m}px; top: ${g}px;`),f.on("canvasPos",([w,x])=>{f.style.value=`left: ${w}px; top: ${x}px;`}),f.on("visible",w=>w?a.add(u):a.delete(u)),f.on("destroyed",()=>{e.state.hub.off(v),e.state.hub.off(y)});const y=e.state.hub.on("annotation-updated",({annotation:w})=>{if(w.id===u.id){const{x,y:k,z:B}=w;f.worldPos=[x,B,k],f._update(),o.scene._renderer._occlusionTester._occlusionTestListDirty=!0}}),v=e.state.hub.on("annotation-removed",({annotation:w})=>{w.id===u.id&&(l.delete(u.id),f.destroy())})}})},{flush:"sync"});const c=(u,h)=>{const{clientX:p,clientY:A}=h,{x:f,y:m}=n.getBoundingClientRect(),g=o.scene.pick({pickSurface:!0,canvasPos:[p-f,A-m]});if(g){const[y,v,w]=g.worldPos;Object.assign(u,{x:y,y:w,z:v})}},d=u=>l.get(u.id).style.value;return(u,h)=>(M(),_("div",wTt,[(M(!0),_($e,null,Bt(s.value,p=>(M(),J(fM,{key:p.instanceId,annotation:p,canvas:rt(n),style:de(d(p)),onAnnotationDrag:A=>c(p,A)},null,8,["annotation","canvas","style","onAnnotationDrag"]))),128))]))}},_W=j(CTt,[["__scopeId","data-v-10ceb001"]]),xTt={setup(){const i=ct("$viewer"),e=i.localContext.pluginComponentInstances.get("viewer3d"),{math:t}=e.xeokitSdk,o=()=>{const r=e.xeokit,a=[0,0,-1],s=r.scene.aabb,l=t.getAABB3Diag(s),c=t.vec3();t.getAABB3Center(s,c);const d=45,u=Math.abs(l/Math.tan(d*t.DEGTORAD));r.cameraControl.pivotPos=c,r.cameraFlight.jumpTo({look:c,eye:[c[0]-u*a[0],c[1]-u*a[1],c[2]-u*a[2]],up:[0,1,0],orthoScale:l*1.1,fitFOV:d})},n=()=>{const r=i.localContext.loadedModels.flatMap(a=>a.objects.filter(s=>s.visible===!1).map(s=>s.id));i.state.showObjects(r)};return{onClick:()=>{o(),n(),e.reintegrateObjects()}}}};function kTt(i,e,t,o,n,r){const a=I("BIMDataIconHome"),s=I("BIMDataButton");return M(),J(s,{color:"default",ghost:"",rounded:"",icon:"",onClick:o.onClick},{default:N(()=>[S(a,{size:"xs"})]),_:1},8,["onClick"])}const MTt=j(xTt,[["render",kTt]]),BTt={computed:{active(){return this.$viewer.localContext.pluginComponentInstances.has("navigationVersionsModel")?this.$viewer.localContext.pluginComponentInstances.get("navigationVersionsModel").isOpen.value:!1}},methods:{onClick(){this.$viewer.localContext.pluginComponentInstances.get("navigationVersionsModel").toggle()}}};function ETt(i,e,t,o,n,r){const a=I("BIMDataIcon"),s=I("BIMDataButton"),l=I("BIMDataTooltip");return M(),J(l,{text:i.$t("navigationVersionsModel.tooltip")},{default:N(()=>[S(s,{class:ce(["bimdata-navigation-versions-model",{active:r.active}]),color:"primary",ghost:"",rounded:"",icon:"",onClick:r.onClick},{default:N(()=>[S(a,{name:"versioning",fill:"",color:"primary",size:"xxs"})]),_:1},8,["class","onClick"])]),_:1},8,["text"])}const PTt=j(BTt,[["render",ETt],["__scopeId","data-v-ced27a96"]]),ITt={key:0,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},STt={key:1,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},TTt={__name:"KeyboardNavigate",setup(i){const e=ct("$viewer").i18n.locale==="fr";return(t,o)=>e?(M(),_("svg",ITt,[...o[0]||(o[0]=[rn('<path d="M79 0L87 11H71L79 0Z" fill="#2F374A"></path><path d="M159 79.1111L148 87.1111L148 71.1111L159 79.1111Z" fill="#2F374A"></path><path d="M9.5399e-08 79.1111L11 71.1111L11 87.1111L9.5399e-08 79.1111Z" fill="#2F374A"></path><path d="M79 115.222L71 104.222L87 104.222L79 115.222Z" fill="#2F374A"></path><rect x="61.3333" y="18" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M82.5998 38.834V40H76.6759V38.834H82.5998ZM82.465 32.377L77.2209 40H76.2365V39.0684L81.4982 31.4688H82.465V32.377ZM81.9201 31.4688V32.6406H76.2716V31.4688H81.9201Z" fill="#6B6B6B"></path><rect x="104.667" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M122.148 83.1111H120.326L120.338 81.9451H122.148C122.676 81.9451 123.117 81.8298 123.473 81.5994C123.832 81.3689 124.101 81.0388 124.281 80.6091C124.465 80.1794 124.557 79.6677 124.557 79.074V78.6111C124.557 78.1501 124.504 77.7419 124.398 77.3865C124.297 77.031 124.144 76.7322 123.941 76.49C123.742 76.2478 123.496 76.0642 123.203 75.9392C122.914 75.8142 122.58 75.7517 122.201 75.7517H120.291V74.5798H122.201C122.767 74.5798 123.285 74.6755 123.754 74.8669C124.223 75.0544 124.627 75.3259 124.967 75.6814C125.31 76.0369 125.574 76.4626 125.758 76.9587C125.941 77.4548 126.033 78.0095 126.033 78.6228V79.074C126.033 79.6873 125.941 80.2419 125.758 80.738C125.574 81.2341 125.31 81.6599 124.967 82.0154C124.623 82.3669 124.213 82.6384 123.736 82.8298C123.264 83.0173 122.734 83.1111 122.148 83.1111ZM121.141 74.5798V83.1111H119.67V74.5798H121.141Z" fill="#6B6B6B"></path><rect x="18" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M37.3036 81.9744L39.5478 83.7556L38.5927 84.5935L36.3896 82.8298L37.3036 81.9744ZM39.5653 78.6111V79.0798C39.5653 79.7244 39.4814 80.3025 39.3134 80.8142C39.1454 81.3259 38.9052 81.7615 38.5927 82.1208C38.2802 82.4802 37.9071 82.7556 37.4735 82.947C37.04 83.1345 36.5595 83.2283 36.0321 83.2283C35.5087 83.2283 35.0302 83.1345 34.5966 82.947C34.1669 82.7556 33.7939 82.4802 33.4775 82.1208C33.161 81.7615 32.915 81.3259 32.7392 80.8142C32.5673 80.3025 32.4814 79.7244 32.4814 79.0798V78.6111C32.4814 77.9666 32.5673 77.3904 32.7392 76.8826C32.911 76.3708 33.1532 75.9353 33.4657 75.5759C33.7821 75.2126 34.1552 74.9373 34.5849 74.7498C35.0185 74.5583 35.497 74.4626 36.0204 74.4626C36.5478 74.4626 37.0282 74.5583 37.4618 74.7498C37.8993 74.9373 38.2743 75.2126 38.5868 75.5759C38.8993 75.9353 39.1396 76.3708 39.3075 76.8826C39.4794 77.3904 39.5653 77.9666 39.5653 78.6111ZM38.0888 79.0798V78.5994C38.0888 78.1228 38.0419 77.7029 37.9482 77.3396C37.8583 76.9724 37.7235 76.6658 37.5439 76.4197C37.3681 76.1697 37.1513 75.9822 36.8935 75.8572C36.6396 75.7283 36.3485 75.6638 36.0204 75.6638C35.7001 75.6638 35.413 75.7283 35.1591 75.8572C34.9052 75.9822 34.6884 76.1697 34.5087 76.4197C34.329 76.6658 34.1923 76.9724 34.0985 77.3396C34.0048 77.7029 33.9579 78.1228 33.9579 78.5994V79.0798C33.9579 79.5564 34.0048 79.9783 34.0985 80.3455C34.1923 80.7126 34.329 81.0232 34.5087 81.2771C34.6923 81.5271 34.911 81.7166 35.165 81.8455C35.4228 81.9705 35.7118 82.033 36.0321 82.033C36.3603 82.033 36.6513 81.9705 36.9052 81.8455C37.1591 81.7166 37.3739 81.5271 37.5497 81.2771C37.7255 81.0232 37.8583 80.7126 37.9482 80.3455C38.0419 79.9783 38.0888 79.5564 38.0888 79.0798Z" fill="#6B6B6B"></path><rect x="61.3333" y="61.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M81.1115 81.025C81.1115 80.8492 81.0841 80.693 81.0295 80.5563C80.9787 80.4196 80.8869 80.2946 80.7541 80.1813C80.6213 80.068 80.4338 79.9586 80.1916 79.8531C79.9533 79.7438 79.6486 79.6324 79.2775 79.5192C78.8713 79.3942 78.4963 79.2555 78.1525 79.1031C77.8127 78.9469 77.5158 78.7672 77.2619 78.5641C77.008 78.3571 76.8107 78.1207 76.6701 77.8551C76.5295 77.5856 76.4591 77.275 76.4591 76.9235C76.4591 76.5758 76.5314 76.2594 76.6759 75.9742C76.8244 75.6891 77.0334 75.443 77.3029 75.236C77.5763 75.025 77.8986 74.8629 78.2697 74.7496C78.6408 74.6324 79.0509 74.5739 79.5002 74.5739C80.133 74.5739 80.6779 74.691 81.1349 74.9254C81.5959 75.1598 81.9494 75.4742 82.1955 75.8688C82.4455 76.2633 82.5705 76.6989 82.5705 77.1754H81.1115C81.1115 76.8942 81.0509 76.6461 80.9298 76.4313C80.8127 76.2125 80.633 76.0406 80.3908 75.9156C80.1525 75.7906 79.8498 75.7281 79.4826 75.7281C79.1349 75.7281 78.8459 75.7809 78.6154 75.8864C78.3849 75.9918 78.213 76.1344 78.0998 76.3141C77.9865 76.4938 77.9298 76.6969 77.9298 76.9235C77.9298 77.0836 77.967 77.2301 78.0412 77.3629C78.1154 77.4918 78.2287 77.6129 78.381 77.7262C78.5334 77.8356 78.7248 77.9391 78.9552 78.0367C79.1857 78.1344 79.4572 78.2281 79.7697 78.318C80.2423 78.4586 80.6545 78.6149 81.006 78.7867C81.3576 78.9547 81.6505 79.1461 81.8849 79.361C82.1193 79.5758 82.2951 79.8199 82.4123 80.0934C82.5295 80.3629 82.588 80.6696 82.588 81.0133C82.588 81.3727 82.5158 81.6969 82.3713 81.986C82.2267 82.2711 82.0197 82.5153 81.7502 82.7184C81.4845 82.9176 81.1642 83.0719 80.7892 83.1813C80.4181 83.2867 80.0041 83.3395 79.547 83.3395C79.1369 83.3395 78.7326 83.2848 78.3341 83.1754C77.9396 83.066 77.5802 82.9 77.256 82.6774C76.9318 82.4508 76.674 82.1696 76.4826 81.8336C76.2912 81.4938 76.1955 81.0973 76.1955 80.6442H77.6662C77.6662 80.9215 77.713 81.1578 77.8068 81.3531C77.9045 81.5485 78.0392 81.7086 78.2111 81.8336C78.383 81.9547 78.5822 82.0446 78.8088 82.1031C79.0392 82.1617 79.2853 82.191 79.547 82.191C79.8908 82.191 80.1779 82.1422 80.4084 82.0446C80.6427 81.9469 80.8185 81.8102 80.9357 81.6344C81.0529 81.4586 81.1115 81.2555 81.1115 81.025Z" fill="#6B6B6B"></path>',12)])])):(M(),_("svg",STt,[...o[1]||(o[1]=[rn('<path d="M79 0L87 11H71L79 0Z" fill="#2F374A"></path><path d="M159 79.1111L148 87.1111L148 71.1111L159 79.1111Z" fill="#2F374A"></path><path d="M9.5399e-08 79.1111L11 71.1111L11 87.1111L9.5399e-08 79.1111Z" fill="#2F374A"></path><path d="M79 115.222L71 104.222L87 104.222L79 115.222Z" fill="#2F374A"></path><rect x="61.3333" y="18" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M77.1095 38.084L78.8088 31.4688H79.6994L79.5998 33.1738L77.7834 40H76.8576L77.1095 38.084ZM75.838 31.4688L77.215 38.0312L77.338 40H76.3537L74.3791 31.4688H75.838ZM81.6271 38.0137L82.9865 31.4688H84.4513L82.4767 40H81.4923L81.6271 38.0137ZM80.0451 31.4688L81.7267 38.1016L81.9728 40H81.047L79.2599 33.1738L79.1662 31.4688H80.0451Z" fill="#6B6B6B"></path><rect x="104.667" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M122.148 83.1111H120.326L120.338 81.9451H122.148C122.676 81.9451 123.117 81.8298 123.473 81.5994C123.832 81.3689 124.101 81.0388 124.281 80.6091C124.465 80.1794 124.557 79.6677 124.557 79.074V78.6111C124.557 78.1501 124.504 77.7419 124.398 77.3865C124.297 77.031 124.144 76.7322 123.941 76.49C123.742 76.2478 123.496 76.0642 123.203 75.9392C122.914 75.8142 122.58 75.7517 122.201 75.7517H120.291V74.5798H122.201C122.767 74.5798 123.285 74.6755 123.754 74.8669C124.223 75.0544 124.627 75.3259 124.967 75.6814C125.31 76.0369 125.574 76.4626 125.758 76.9587C125.941 77.4548 126.033 78.0095 126.033 78.6228V79.074C126.033 79.6873 125.941 80.2419 125.758 80.738C125.574 81.2341 125.31 81.6599 124.967 82.0154C124.623 82.3669 124.213 82.6384 123.736 82.8298C123.264 83.0173 122.734 83.1111 122.148 83.1111ZM121.141 74.5798V83.1111H119.67V74.5798H121.141Z" fill="#6B6B6B"></path><rect x="18" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M36.2665 75.7166L33.7177 83.1111H32.1767L35.3876 74.5798H36.372L36.2665 75.7166ZM38.3993 83.1111L35.8446 75.7166L35.7333 74.5798H36.7235L39.9462 83.1111H38.3993ZM38.2763 79.947V81.113H33.6357V79.947H38.2763Z" fill="#6B6B6B"></path><rect x="61.3333" y="61.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M81.1115 81.025C81.1115 80.8492 81.0841 80.693 81.0295 80.5563C80.9787 80.4196 80.8869 80.2946 80.7541 80.1813C80.6213 80.068 80.4338 79.9586 80.1916 79.8531C79.9533 79.7438 79.6486 79.6324 79.2775 79.5192C78.8713 79.3942 78.4963 79.2555 78.1525 79.1031C77.8127 78.9469 77.5158 78.7672 77.2619 78.5641C77.008 78.3571 76.8107 78.1207 76.6701 77.8551C76.5295 77.5856 76.4591 77.275 76.4591 76.9235C76.4591 76.5758 76.5314 76.2594 76.6759 75.9742C76.8244 75.6891 77.0334 75.443 77.3029 75.236C77.5763 75.025 77.8986 74.8629 78.2697 74.7496C78.6408 74.6324 79.0509 74.5739 79.5002 74.5739C80.133 74.5739 80.6779 74.691 81.1349 74.9254C81.5959 75.1598 81.9494 75.4742 82.1955 75.8688C82.4455 76.2633 82.5705 76.6989 82.5705 77.1754H81.1115C81.1115 76.8942 81.0509 76.6461 80.9298 76.4313C80.8127 76.2125 80.633 76.0406 80.3908 75.9156C80.1525 75.7906 79.8498 75.7281 79.4826 75.7281C79.1349 75.7281 78.8459 75.7809 78.6154 75.8864C78.3849 75.9918 78.213 76.1344 78.0998 76.3141C77.9865 76.4938 77.9298 76.6969 77.9298 76.9235C77.9298 77.0836 77.967 77.2301 78.0412 77.3629C78.1154 77.4918 78.2287 77.6129 78.381 77.7262C78.5334 77.8356 78.7248 77.9391 78.9552 78.0367C79.1857 78.1344 79.4572 78.2281 79.7697 78.318C80.2423 78.4586 80.6545 78.6149 81.006 78.7867C81.3576 78.9547 81.6505 79.1461 81.8849 79.361C82.1193 79.5758 82.2951 79.8199 82.4123 80.0934C82.5295 80.3629 82.588 80.6696 82.588 81.0133C82.588 81.3727 82.5158 81.6969 82.3713 81.986C82.2267 82.2711 82.0197 82.5153 81.7502 82.7184C81.4845 82.9176 81.1642 83.0719 80.7892 83.1813C80.4181 83.2867 80.0041 83.3395 79.547 83.3395C79.1369 83.3395 78.7326 83.2848 78.3341 83.1754C77.9396 83.066 77.5802 82.9 77.256 82.6774C76.9318 82.4508 76.674 82.1696 76.4826 81.8336C76.2912 81.4938 76.1955 81.0973 76.1955 80.6442H77.6662C77.6662 80.9215 77.713 81.1578 77.8068 81.3531C77.9045 81.5485 78.0392 81.7086 78.2111 81.8336C78.383 81.9547 78.5822 82.0446 78.8088 82.1031C79.0392 82.1617 79.2853 82.191 79.547 82.191C79.8908 82.191 80.1779 82.1422 80.4084 82.0446C80.6427 81.9469 80.8185 81.8102 80.9357 81.6344C81.0529 81.4586 81.1115 81.2555 81.1115 81.025Z" fill="#6B6B6B"></path>',12)])]))}},RTt={key:0,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},LTt={key:1,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},DTt={__name:"KeyboardStorey",setup(i){const e=ct("$viewer"),t=Re(()=>e.i18n.locale==="fr");return(o,n)=>t.value?(M(),_("svg",RTt,[...n[0]||(n[0]=[rn('<rect y="25" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M16.2509 38.4688L18.0614 41.5801L19.872 38.4688H21.5653L18.9872 42.6934L21.6298 47H19.9189L18.0614 43.8301L16.204 47H14.4872L17.1357 42.6934L14.5517 38.4688H16.2509Z" fill="#6B6B6B"></path><rect y="68.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M15.7763 88.3063L17.4755 81.691H18.3661L18.2665 83.3961L16.4501 90.2223H15.5243L15.7763 88.3063ZM14.5048 81.691L15.8817 88.2535L16.0048 90.2223H15.0204L13.0458 81.691H14.5048ZM20.2939 88.236L21.6532 81.691H23.1181L21.1435 90.2223H20.1591L20.2939 88.236ZM18.7118 81.691L20.3935 88.3239L20.6396 90.2223H19.7138L17.9267 83.3961L17.8329 81.691H18.7118Z" fill="#6B6B6B"></path><path d="M18 0L26 11H10L18 0Z" fill="#2F374A"></path><rect x="14" y="13" width="8" height="2" fill="#2F374A"></rect><rect x="14" y="17" width="8" height="4" fill="#2F374A"></rect><path d="M18 129L10 118L26 118L18 129Z" fill="#2F374A"></path><rect x="22" y="116" width="8" height="2" transform="rotate(-180 22 116)" fill="#2F374A"></rect><rect x="22" y="112" width="8" height="4" transform="rotate(-180 22 112)" fill="#2F374A"></rect>',10)])])):(M(),_("svg",LTt,[...n[1]||(n[1]=[rn('<rect y="25" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M16.2509 38.4688L18.0614 41.5801L19.872 38.4688H21.5653L18.9872 42.6934L21.6298 47H19.9189L18.0614 43.8301L16.204 47H14.4872L17.1357 42.6934L14.5517 38.4688H16.2509Z" fill="#6B6B6B"></path><rect y="68.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M21.2665 89.0563V90.2223H15.3427V89.0563H21.2665ZM21.1317 82.5992L15.8876 90.2223H14.9032V89.2906L20.165 81.691H21.1317V82.5992ZM20.5868 81.691V82.8629H14.9384V81.691H20.5868Z" fill="#6B6B6B"></path><path d="M18 0L26 11H10L18 0Z" fill="#2F374A"></path><rect x="14" y="13" width="8" height="2" fill="#2F374A"></rect><rect x="14" y="17" width="8" height="4" fill="#2F374A"></rect><path d="M18 129L10 118L26 118L18 129Z" fill="#2F374A"></path><rect x="22" y="116" width="8" height="2" transform="rotate(-180 22 116)" fill="#2F374A"></rect><rect x="22" y="112" width="8" height="4" transform="rotate(-180 22 112)" fill="#2F374A"></rect>',10)])]))}},_Tt={},FTt={width:"174",height:"130",viewBox:"0 0 174 130",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function OTt(i,e){return M(),_("svg",FTt,[...e[0]||(e[0]=[rn('<path d="M33.1118 0.382324H131.606L141.853 99.4882H23.4L33.1118 0.382324Z" fill="#F2F2F2"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M22.9412 99.8706H142.235L131.988 0.305882V0H32.8059L23.0176 99.4882L22.9412 99.8706ZM141.394 99.1059H23.7823L33.4941 0.764706H131.3L141.394 99.1059Z" fill="#9E9E9E"></path><path d="M62.1705 9.86475L60.7941 46.953H103.771V9.86475H62.1705Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M60.4117 47.3354H104.153H104.229V9.48242H61.8647L60.4117 47.3354ZM103.388 46.5707H61.1764L62.5529 10.2471H103.388V46.5707Z" fill="#9E9E9E"></path><path d="M60.7942 46.9529L64.5412 61.7882H100.1L103.771 46.9529H60.7942Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M64.2353 62.1706H100.406L104.306 46.5706H60.3353L64.2353 62.1706ZM99.7942 61.4059H64.8471L61.3294 47.3353H103.312L99.7942 61.4059Z" fill="#9E9E9E"></path><path d="M85.2648 34.7939L85.0354 53.8351L90.0825 49.0175L97.806 49.5528L85.2648 34.7939Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M83.8118 57.5823L83.7354 31.5823L100.406 51.4646L90.3883 49.9352L83.8118 57.5823ZM85.8765 37.3176L85.953 51.9235L89.6236 47.6411L95.2824 48.4823L85.8765 37.3176Z" fill="black"></path><path d="M26.3059 128.241H25.9236C17.5883 128.241 10.7059 121.359 10.7059 113.024V100.253C10.7059 91.9178 17.5883 85.0354 25.9236 85.0354H26.3059C34.6412 85.0354 41.5236 91.9178 41.5236 100.253V113.024C41.5236 121.359 34.6412 128.241 26.3059 128.241Z" fill="white"></path><path d="M137.188 128.241H136.806C128.471 128.241 121.588 121.359 121.588 113.024V100.253C121.588 91.9178 128.471 85.0354 136.806 85.0354H137.188C145.524 85.0354 152.406 91.9178 152.406 100.253V113.024C152.406 121.359 145.524 128.241 137.188 128.241Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M25.4647 129.159H26.9942C35.6353 129.159 42.6706 122.2 42.5942 113.559V99.6413C42.5942 91.0766 35.6353 84.0413 26.9942 84.0413H25.4647C16.9 84.0413 9.86475 91.0001 9.86475 99.6413V113.559C9.86475 122.124 16.8236 129.159 25.4647 129.159ZM12.1589 99.5648C12.1589 92.2236 18.1236 86.2589 25.4647 86.2589H26.9942C34.3353 86.2589 40.3 92.2236 40.3 99.5648V113.482C40.3 120.824 34.3353 126.788 26.9942 126.788H25.4647C18.1236 126.788 12.1589 120.824 12.1589 113.482V99.5648Z" fill="#30374B"></path><path d="M26.3823 104.459C25.5411 104.459 24.8529 103.771 24.8529 102.929V98.4176C24.8529 97.5764 25.5411 96.8882 26.3823 96.8882C27.2235 96.8882 27.9117 97.5764 27.9117 98.4176V102.929C27.9117 103.771 27.2235 104.459 26.3823 104.459Z" fill="#30374B"></path><path d="M15.3706 84.1177C14.8353 84.1177 14.3765 83.6589 14.3765 83.1236V75.4765C14.3765 74.9412 14.8353 74.4824 15.3706 74.4824C15.9059 74.4824 16.3647 74.9412 16.3647 75.4765V83.1236C16.3647 83.6589 15.9059 84.1177 15.3706 84.1177Z" fill="#F8C62C"></path><path d="M9.63529 90.3884C9.63529 90.9237 9.17647 91.3825 8.64118 91.3825H0.994118C0.458824 91.3825 0 90.9237 0 90.3884C0 89.8531 0.458824 89.3943 0.994118 89.3943H8.64118C9.17647 89.3943 9.63529 89.8531 9.63529 90.3884Z" fill="#F8C62C"></path><path d="M11.9294 86.4117C11.5471 86.7941 10.8589 86.7941 10.4765 86.4117L3.74709 79.6823C3.36474 79.3 3.36474 78.6117 3.74709 78.2294C4.12944 77.847 4.81768 77.847 5.20003 78.2294L11.9294 84.9588C12.3118 85.3412 12.3118 86.0294 11.9294 86.4117Z" fill="#F8C62C"></path><path d="M87.7117 105.682H82.9706V100.941H80.8294V105.682H76.1647V107.747H80.8294V112.488H82.9706V107.747H87.7117V105.682Z" fill="#F8C62C"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M136.194 129.159H137.724C146.365 129.159 153.4 122.2 153.324 113.559V99.6413C153.324 91.0766 146.365 84.0413 137.724 84.0413H136.194C127.629 84.0413 120.594 91.0001 120.594 99.6413V113.559C120.594 122.124 127.553 129.159 136.194 129.159ZM122.888 99.5648C122.888 92.2236 128.853 86.2589 136.194 86.2589H137.724C145.065 86.2589 151.029 92.2236 151.029 99.5648V113.482C151.029 120.824 145.065 126.788 137.724 126.788H136.194C128.853 126.788 122.888 120.824 122.888 113.482V99.5648Z" fill="#30374B"></path><path d="M137.112 104.459C136.271 104.459 135.582 103.771 135.582 102.929V98.4176C135.582 97.5764 136.271 96.8882 137.112 96.8882C137.953 96.8882 138.641 97.5764 138.641 98.4176V102.929C138.641 103.771 137.953 104.459 137.112 104.459Z" fill="#30374B"></path><path d="M102.776 106.753L108.129 101.4C108.588 100.941 108.588 100.253 108.129 99.7941C107.671 99.3352 106.982 99.3352 106.524 99.7941L100.406 105.912C100.176 106.141 100.1 106.447 100.1 106.753C100.1 107.059 100.176 107.365 100.406 107.594L106.524 113.712C106.982 114.171 107.671 114.171 108.129 113.712C108.588 113.253 108.588 112.565 108.129 112.106L102.776 106.753Z" fill="#F8C62C"></path><path d="M171.218 106.753L165.865 101.4C165.406 100.941 165.406 100.253 165.865 99.7941C166.324 99.3352 167.012 99.3352 167.471 99.7941L173.588 105.912C173.818 106.141 173.894 106.447 173.894 106.753C173.894 107.059 173.818 107.365 173.588 107.594L167.471 113.712C167.012 114.171 166.324 114.171 165.865 113.712C165.406 113.253 165.406 112.565 165.865 112.106L171.218 106.753Z" fill="#F8C62C"></path>',20)])])}const UTt=j(_Tt,[["render",OTt]]),NTt={},jTt={width:"42",height:"55",viewBox:"0 0 42 55",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function VTt(i,e){return M(),_("svg",jTt,[...e[0]||(e[0]=[rn('<path d="M1.7192 47.4914L0.501465 10.6013H40.8298L40.3284 47.4914H1.7192Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M1.36104 47.8495H40.6866L41.188 10.2432H0.143311L1.36104 47.8495ZM39.9703 47.1332H2.07735L0.859623 10.9595H40.4717L39.9703 47.1332Z" fill="#9E9E9E"></path><path d="M4.29792 0.429688L0.501465 10.6013H40.8298L37.5348 0.429688H4.29792Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M0 10.9596H41.3312L37.7496 0H4.01135L0 10.9596ZM40.3284 10.2433H1.00284L4.51277 0.716312H37.2482L40.3284 10.2433Z" fill="#9E9E9E"></path><path d="M18.9312 23.0255C19.4326 23.0255 19.8624 22.5957 19.8624 22.0943V14.9312C19.8624 14.4298 19.4326 14 18.9312 14C18.4298 14 18 14.4298 18 14.9312V22.0943C18 22.5957 18.4298 23.0255 18.9312 23.0255Z" fill="#F8C62C"></path><path d="M24.3035 28.9708C24.3035 29.4722 24.7333 29.902 25.2347 29.902H32.3978C32.8992 29.902 33.329 29.4722 33.329 28.9708C33.329 28.4693 32.8992 28.0395 32.3978 28.0395H25.2347C24.7333 27.9679 24.3035 28.3977 24.3035 28.9708Z" fill="#F8C62C"></path><path d="M22.1546 25.2461C22.5128 25.6043 23.1575 25.6043 23.5156 25.2461L29.8192 18.9426C30.1773 18.5844 30.1773 17.9398 29.8192 17.5816C29.461 17.2234 28.8163 17.2234 28.4582 17.5816L22.1546 23.8852C21.7248 24.2433 21.7248 24.8164 22.1546 25.2461Z" fill="#F8C62C"></path><path d="M21.5855 31.4087L21.3477 51.0688L26.5798 46.0745L34.5865 46.6294L21.5855 31.4087Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M20.0793 54.9534L20 28L37.2819 48.6114L26.8969 47.0259L20.0793 54.9534ZM22.2197 33.9456L22.299 49.087L26.1041 44.6477L31.9705 45.5197L22.2197 33.9456Z" fill="black"></path>',9)])])}const HTt=j(NTt,[["render",VTt]]),zTt={},qTt={width:"124",height:"152",viewBox:"0 0 124 152",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function QTt(i,e){return M(),_("svg",qTt,[...e[0]||(e[0]=[rn('<path d="M10.5436 0.396484H112.649L123.272 103.216H0.475708L10.5436 0.396484Z" fill="#F2F2F2"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M0 103.612H123.668L113.046 0.317098V0H10.2264L0.0792746 103.216L0 103.612ZM122.876 102.819H0.951324L10.9399 0.792766H112.332L122.876 102.819Z" fill="#9E9E9E"></path><path d="M40.7472 10.2266L39.241 48.6747H83.7933V10.2266H40.7472Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M38.8446 49.071H84.1897H84.269V9.83008H40.3508L38.8446 49.071ZM83.4762 48.2783H39.7166L41.0643 10.6228H83.4762V48.2783Z" fill="#9E9E9E"></path><path d="M39.2408 48.6748L43.1253 64.0541H79.988L83.7932 48.6748H39.2408Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M42.8083 64.4503H80.3052L84.3482 48.2783H38.7653L42.8083 64.4503ZM79.671 63.6576H43.4425L39.7958 49.0711H83.3176L79.671 63.6576Z" fill="#9E9E9E"></path><path d="M64.6088 36.1494L64.371 55.8095L69.6031 50.8152L77.6098 51.3701L64.6088 36.1494Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M63.1026 59.6938L63.0233 32.7405L80.3052 53.3519L69.9202 51.7664L63.1026 59.6938ZM65.243 38.6861L65.3223 53.8275L69.1275 49.3881L74.9938 50.2602L65.243 38.6861Z" fill="black"></path><path d="M61.7549 130.724H61.3585C52.7176 130.724 45.5829 123.589 45.5829 114.948V101.709C45.5829 93.0686 52.7176 85.9338 61.3585 85.9338H61.7549C70.3958 85.9338 77.5306 93.0686 77.5306 101.709V114.948C77.5306 123.589 70.4751 130.724 61.7549 130.724Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M44.7902 114.79C44.7902 124.144 52.4005 131.754 61.7549 131.754C71.1093 131.754 78.7197 124.065 78.7197 114.79V101.947C78.7197 92.5928 71.1093 84.9824 61.7549 84.9824C52.4005 84.9824 44.7902 92.5928 44.7902 101.947V114.79ZM47.1684 101.868C47.1684 93.8612 53.6689 87.2814 61.7549 87.2814C69.7617 87.2814 76.3415 93.7819 76.3415 101.868V114.71C76.3415 122.717 69.8409 129.297 61.7549 129.297C53.7482 129.297 47.1684 122.796 47.1684 114.71V101.868Z" fill="#30374B"></path><path d="M61.8341 106.069C60.9621 106.069 60.2487 105.356 60.2487 104.484V100.996C60.2487 100.124 60.9621 99.4104 61.8341 99.4104C62.7062 99.4104 63.4196 100.124 63.4196 100.996V104.484C63.4196 105.356 62.7062 106.069 61.8341 106.069Z" fill="#30374B"></path><path d="M61.8341 97.7457C60.9621 97.7457 60.2487 97.0322 60.2487 96.1602C60.2487 95.2882 60.9621 94.5747 61.8341 94.5747C62.7062 94.5747 63.4196 95.2882 63.4196 96.1602C63.4196 97.0322 62.7062 97.7457 61.8341 97.7457Z" fill="#30374B"></path><path d="M61.8341 110.826C60.9621 110.826 60.2487 110.113 60.2487 109.241C60.2487 108.369 60.9621 107.655 61.8341 107.655C62.7062 107.655 63.4196 108.369 63.4196 109.241C63.4196 110.113 62.7062 110.826 61.8341 110.826Z" fill="#30374B"></path><path d="M61.8342 142.298L67.3834 136.749C67.859 136.273 68.5725 136.273 69.0481 136.749C69.5238 137.224 69.5238 137.938 69.0481 138.414L62.7062 144.756C62.4684 144.993 62.1513 145.073 61.8342 145.073C61.5171 145.073 61.2 144.993 60.9621 144.756L54.6202 138.414C54.1445 137.938 54.1445 137.224 54.6202 136.749C55.0958 136.273 55.8093 136.273 56.2849 136.749L61.8342 142.298Z" fill="#F8C62C"></path><path d="M61.8342 149.195L67.3834 143.646C67.859 143.17 68.5725 143.17 69.0481 143.646C69.5238 144.121 69.5238 144.835 69.0481 145.311L62.7062 151.653C62.4684 151.89 62.1513 151.97 61.8342 151.97C61.5171 151.97 61.2 151.89 60.9621 151.653L54.6202 145.311C54.1445 144.835 54.1445 144.121 54.6202 143.646C55.0958 143.17 55.8093 143.17 56.2849 143.646L61.8342 149.195Z" fill="#F8C62C"></path>',15)])])}const GTt=j(zTt,[["render",QTt]]),KTt={name:"FirstPersonViewHelper",components:{KeyboardNavigate:TTt,KeyboardStorey:DTt,MouseMove:UTt,MouseStorey:HTt,MouseZoom:GTt},emits:["close"],methods:{close(){this.$emit("close")},clear(){localStorage.setItem("firstPersonViewHelper","false"),this.close()}}},JTt={class:"bimdata-first-person-view-helper"},ZTt={class:"bimdata-first-person-view-helper__header"},WTt={class:"bimdata-first-person-view-helper__content"},YTt={class:"bimdata-first-person-view-helper__content__main"},XTt={class:"bimdata-first-person-view-helper__content__main__left"},$Tt={class:"bimdata-first-person-view-helper__content__main__left__element"},eRt={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},tRt={class:"bimdata-first-person-view-helper__content__main__left__element__text"},iRt={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},oRt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},rRt={class:"bimdata-first-person-view-helper__content__main__left__element"},nRt={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},aRt={class:"bimdata-first-person-view-helper__content__main__left__element__text"},sRt={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},lRt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},cRt={class:"bimdata-first-person-view-helper__content__main__left__element"},dRt={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},uRt={class:"bimdata-first-person-view-helper__content__main__left__element__text"},hRt={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},pRt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},fRt={class:"bimdata-first-person-view-helper__content__main__right"},ARt={class:"bimdata-first-person-view-helper__content__main__right__title"},gRt={class:"bimdata-first-person-view-helper__content__main__right__content"},mRt={class:"bimdata-first-person-view-helper__content__main__right__content__picture"},vRt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},yRt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},bRt={class:"bimdata-first-person-view-helper__content__main__right__content__text"},wRt={class:"bimdata-first-person-view-helper__content__footer"},CRt={class:"bimdata-first-person-view-helper__footer-buttons"};function xRt(i,e,t,o,n,r){const a=I("KeyboardNavigate"),s=I("MouseMove"),l=I("MouseZoom"),c=I("MouseStorey"),d=I("KeyboardStorey"),u=I("BIMDataButton");return M(),_("div",JTt,[b("h1",ZTt,z(i.$t("viewer3d.firstPersonViewHelper.title")),1),b("div",WTt,[b("div",YTt,[b("div",XTt,[b("div",$Tt,[b("div",eRt,[S(a)]),b("div",tRt,[b("h4",iRt,z(i.$t("viewer3d.firstPersonViewHelper.keyboardUsage")),1),b("ul",oRt,[b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.forward")),1),b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.backward")),1),b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.left")),1),b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.right")),1)])])]),b("div",rRt,[b("div",nRt,[S(s)]),b("div",aRt,[b("h4",sRt,z(i.$t("viewer3d.firstPersonViewHelper.mouseOrientation")),1),b("ul",lRt,[b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.pressLeft")),1),b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.mouseMove")),1),b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.mouseVertical")),1)])])]),b("div",cRt,[b("div",dRt,[S(l)]),b("div",uRt,[b("h4",hRt,z(i.$t("viewer3d.firstPersonViewHelper.mouseZoom")),1),b("ul",pRt,[b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.mouseWheelForward")),1),b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.mouseWheelBackward")),1)])])])]),b("div",fRt,[b("h4",ARt,z(i.$t("viewer3d.firstPersonViewHelper.changeStorey")),1),b("div",gRt,[b("div",mRt,[b("div",vRt,[S(c)]),b("div",yRt,[S(d)])]),b("div",bRt,[b("ul",null,[b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.storeyClick")),1),b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.moveCameraToObject")),1)]),b("ul",null,[b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.keyboardStoreyChange")),1)])])])])]),b("div",wRt,z(i.$t("viewer3d.firstPersonViewHelper.contentFooter")),1)]),b("div",CRt,[S(u,{color:"primary",fill:"",radius:"",width:"200px",onClick:r.close},{default:N(()=>[Ze(z(i.$t("viewer3d.firstPersonViewHelper.understand")),1)]),_:1},8,["onClick"]),S(u,{color:"primary",outline:"",radius:"",width:"200px",onClick:r.clear},{default:N(()=>[Ze(z(i.$t("viewer3d.firstPersonViewHelper.noRecall")),1)]),_:1},8,["onClick"])])])}const FW=j(KTt,[["render",xRt],["__scopeId","data-v-77cce9d5"]]),kRt={components:{ShortcutsModal:m8,FirstPersonViewHelper:FW},data(){const i=this.$t;return{tabs:[{id:0,get label(){return i("viewer3d.modals.3d")}},{id:1,get label(){return i("viewer3d.modals.firstPerson")}}],activeTab:0,elements:[{image:"shortcutRotate",title:this.$t("shortcuts-helper.title_rotate"),text:this.$t("shortcuts-helper.text_rotate")},{image:"shortcutZoom",title:this.$t("shortcuts-helper.title_zoom"),text:this.$t("shortcuts-helper.text_zoom")},{image:"shortcutOpen",title:this.$t("shortcuts-helper.title_open"),text:this.$t("shortcuts-helper.text_open")}],shortcuts:[{letter:"F",text:this.$t("context_menu.fit_view")},{letter:"C",text:this.$t("context_menu.select_all")},{letter:"V",text:this.$t("context_menu.deselect_all")},{letter:"H",text:this.$t("context_menu.hide")},{letter:"Y",text:this.$t("context_menu.select_similar")},{letter:"I",text:this.$t("context_menu.isolate")},{letter:"U",text:this.$t("context_menu.reintegrate")},{letter:"R",text:this.$t("context_menu.show_all")},{letter:"1",text:this.$t("shortcuts-helper.shortcut_1")},{letter:"2",text:this.$t("shortcuts-helper.shortcut_2")},{letter:"3",text:this.$t("shortcuts-helper.shortcut_3")},{letter:"4",text:this.$t("shortcuts-helper.shortcut_4")},{letter:"5",text:this.$t("shortcuts-helper.shortcut_5")},{letter:"6",text:this.$t("shortcuts-helper.shortcut_6")},{maj:!0,text:this.$t("shortcuts-helper.shortcut_pan"),illustration:"click"},{alt:!0,text:this.$t("shortcuts-helper.shortcut_open"),illustration:"click"},{shift:!0,text:this.$t("shortcuts-helper.shortcut_multiselect"),illustration:"click"}]}}},MRt={class:"bimdata-shortcuts-helper__header"};function BRt(i,e,t,o,n,r){const a=I("BIMDataTabs"),s=I("ShortcutsModal"),l=I("FirstPersonViewHelper");return M(),_("div",null,[b("div",MRt,[S(a,{tabs:n.tabs,width:"490px",height:"44px",tabSize:"245",onTabSelected:e[0]||(e[0]=c=>n.activeTab=n.tabs.indexOf(c)),selected:n.activeTab},null,8,["tabs","selected"])]),n.activeTab===0?(M(),J(s,{key:0,elements:n.elements,shortcuts:n.shortcuts,onClose:e[1]||(e[1]=c=>i.$emit("close"))},{title:N(()=>[Ze(z(i.$t("shortcuts-helper.title_modal")),1)]),_:1},8,["elements","shortcuts"])):(M(),J(l,{key:1,onClose:e[2]||(e[2]=c=>i.$emit("close"))}))])}const ERt=j(kRt,[["render",BRt],["__scopeId","data-v-a26872a0"]]),PRt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M1.20102%2023.5V24.5H2.20102H10.261C11.4116%2029.9278%2016.2295%2034%2022%2034C27.7705%2034%2032.5884%2029.9278%2033.739%2024.5H41.799H42.799V23.5V20.5V19.5H41.799H33.739C32.5884%2014.0722%2027.7705%2010%2022%2010C16.2295%2010%2011.4116%2014.0722%2010.261%2019.5H2.20102H1.20102V20.5V23.5ZM14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C26.0764%2014.619%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",IRt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M6.23222%2034.2322L5.52512%2034.9393L6.23222%2035.6464L8.35354%2037.7678L9.06065%2038.4749L9.76776%2037.7678L15.4677%2032.0678C17.3477%2033.2898%2019.592%2034%2022%2034C24.408%2034%2026.6523%2033.2898%2028.5323%2032.0678L34.2322%2037.7678L34.9393%2038.4749L35.6464%2037.7678L37.7678%2035.6465L38.4749%2034.9393L37.7678%2034.2322L32.0678%2028.5323C33.2898%2026.6523%2034%2024.408%2034%2022C34%2019.592%2033.2898%2017.3477%2032.0678%2015.4677L37.7678%209.76776L38.4749%209.06065L37.7678%208.35354L35.6464%206.23222L34.9393%205.52512L34.2322%206.23222L28.5322%2011.9322C26.6523%2010.7102%2024.408%2010%2022%2010C19.592%2010%2017.3477%2010.7102%2015.4677%2011.9322L9.76776%206.23224L9.06065%205.52513L8.35354%206.23224L6.23222%208.35356L5.52512%209.06066L6.23222%209.76777L11.9322%2015.4678C10.7102%2017.3477%2010%2019.592%2010%2022C10%2024.408%2010.7102%2026.6523%2011.9322%2028.5323L6.23222%2034.2322ZM14.619%2022C14.619%2017.9236%2017.9236%2014.6191%2022%2014.6191C26.0764%2014.6191%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",SRt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C26.0764%2014.619%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022ZM22%2010C15.3726%2010%2010%2015.3726%2010%2022C10%2028.6274%2015.3726%2034%2022%2034C28.6274%2034%2034%2028.6274%2034%2022C34%2015.3726%2028.6274%2010%2022%2010Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",TRt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C23.8642%2014.619%2025.5667%2015.3094%2026.8665%2016.4504L14.7593%2023.4405C14.6673%2022.9751%2014.619%2022.4935%2014.619%2022ZM29.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C20.0879%2029.381%2018.3459%2028.6547%2017.0341%2027.4608L29.2136%2020.4289C29.3232%2020.9347%2029.381%2021.4602%2029.381%2022ZM22%2010C15.3726%2010%2010%2015.3726%2010%2022C10%2028.6274%2015.3726%2034%2022%2034C28.6274%2034%2034%2028.6274%2034%2022C34%2015.3726%2028.6274%2010%2022%2010Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",RRt="data:image/svg+xml,%3csvg%20width='33'%20height='33'%20viewBox='0%200%2033%2033'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.70001%2016.8667V17.3667H2.20001H7.33335H7.83335V16.8667V16.1333V15.6333H7.33335L2.20001%2015.6333H1.70001V16.1333L1.70001%2016.8667ZM30.8%2017.3667H31.3V16.8667V16.1333V15.6333H30.8L25.6667%2015.6333H25.1667V16.1333V16.8667V17.3667H25.6667H30.8Z'%20fill='%232F374A'%20stroke='white'/%3e%3cpath%20d='M16.1333%201.70001L15.6333%201.70001L15.6333%202.20001L15.6333%207.33335L15.6333%207.83335L16.1333%207.83335L16.8667%207.83335L17.3667%207.83335L17.3667%207.33335L17.3667%202.20001L17.3667%201.70001L16.8667%201.70001L16.1333%201.70001ZM15.6333%2030.8L15.6333%2031.3L16.1333%2031.3L16.8667%2031.3L17.3667%2031.3L17.3667%2030.8L17.3667%2025.6667L17.3667%2025.1667L16.8667%2025.1667L16.1333%2025.1667L15.6333%2025.1667L15.6333%2025.6667L15.6333%2030.8Z'%20fill='%232F374A'%20stroke='white'/%3e%3c/svg%3e",LRt={0:{positions:[36.5625,31.640625,36.5625,19.51171875,36.42067337036133,16.11605453491211,35.99519348144531,13.020120620727539,35.28605651855469,10.223917961120605,34.293270111083984,7.727446556091309,33.01683044433594,5.530706882476807,30.959993362426758,3.3593661785125732,28.725576400756836,1.6479235887527466,26.31357765197754,.39637935161590576,23.723995208740234,-.39526674151420593,20.956830978393555,-.7270146012306213,20.3203125,-.73828125,17.307449340820312,-.5108020901679993,14.569392204284668,.17163534462451935,12.106142044067383,1.3090311288833618,9.917699813842773,2.9013850688934326,8.174575805664062,5.153988838195801,6.733142375946045,7.555612087249756,5.593398094177246,10.106253623962402,4.755343437194824,12.805914878845215,4.218978404998779,15.654594421386719,3.9843032360076904,18.652292251586914,3.97265625,19.51171875,3.97265625,31.640625,4.115384578704834,35.0230827331543,4.543569564819336,38.11090850830078,5.257210731506348,40.904109954833984,6.256308555603027,43.40268325805664,7.540863037109375,45.606624603271484,9.608292579650879,47.79111099243164,11.846480369567871,49.51402282714844,14.255425453186035,50.775352478027344,16.835128784179688,51.57510757446289,19.585588455200195,51.91328811645508,20.25,51.92578125,23.26165771484375,51.697608947753906,25.997068405151367,51.013092041015625,28.456228256225586,49.872230529785156,30.639141082763672,48.2750244140625,32.375572204589844,46.0158576965332,33.81153869628906,43.60895538330078,34.947044372558594,41.0543212890625,35.78208923339844,38.35194778442383,36.31666946411133,35.5018424987793,36.55078887939453,32.50400161743164,36.5625,31.640625,29.63671875,18.10546875,29.63671875,33.1171875,29.450082778930664,36.561954498291016,28.89017677307129,39.497215270996094,27.956998825073242,41.92298126220703,25.967069625854492,44.22639083862305,23.724157333374023,45.72625732421875,21.228260040283203,46.422576904296875,20.25,46.4765625,17.354780197143555,46.07659912109375,14.97888469696045,44.876708984375,13.33356761932373,42.470394134521484,12.110569953918457,39.9057731628418,11.309891700744629,37.1828498840332,10.931534767150879,34.30161666870117,10.8984375,33.1171875,10.8984375,18.10546875,11.085087776184082,14.669450759887695,11.645040512084961,11.733874320983887,12.578293800354004,9.298736572265625,14.569818496704102,6.974865436553955,16.804428100585938,5.454482555389404,19.282119750976562,4.737586975097656,20.3203125,4.67578125,23.212167739868164,5.077450752258301,25.581016540527344,6.282459735870361,27.21183204650879,8.69408893585205,28.425546646118164,11.263723373413086,29.2221622467041,13.991360664367676,29.6016788482666,16.877002716064453],indices:[0,2,1,2,4,3,4,6,5,6,8,7,8,10,9,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,63,62,61,24,62,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,0,45,0,4,2,4,8,6,8,12,10,12,16,14,16,20,18,20,24,22,24,64,63,60,24,61,24,28,26,28,32,30,32,36,34,36,40,38,40,44,42,44,4,0,4,12,8,12,20,16,20,64,24,59,24,60,24,32,28,32,40,36,40,4,44,20,65,64,58,24,59,20,66,65,57,24,58,12,66,20,57,32,24,12,67,66,56,32,57,12,68,67,55,32,56,12,69,68,54,32,55,12,70,69,53,32,54,12,71,70,53,40,32,4,71,12,52,40,53,4,72,71,51,40,52,4,73,72,50,40,51,4,74,73,49,40,50,4,75,74,48,40,49,4,76,75,47,40,48,40,76,4,76,40,47],width:32.58984375},1:{positions:[23.94140625,51.1875,23.94140625,0,17.015625,0,17.015625,44.4375,6.5390625,44.296875,6.5390625,49.2890625],indices:[0,2,1,3,5,4,0,3,2,3,0,5],width:17.40234375},2:{positions:[37.3359375,5.4140625,37.3359375,0,4.1484375,0,4.1484375,4.74609375,20.91796875,23.37890625,23.33412742614746,26.180971145629883,25.239078521728516,28.61744499206543,26.632823944091797,30.68832778930664,27.938528060913086,33.606327056884766,28.560094833374023,36.34145736694336,28.6171875,37.40625,28.23740577697754,40.36100769042969,27.09806251525879,42.90309143066406,24.87748908996582,45.0150146484375,22.4631290435791,46.19827651977539,20.4609375,46.4765625,17.237478256225586,46.17487716674805,14.632962226867676,45.26981735229492,12.647390365600586,43.76138687133789,11.200069427490234,41.599464416503906,10.360716819763184,38.91020965576172,10.125,36.10546875,3.48046875,36.10546875,3.41015625,36.31640625,3.580944538116455,39.24900436401367,4.255249977111816,41.95781326293945,5.433072566986084,44.442840576171875,7.114412784576416,46.704078674316406,9.256887435913086,48.52997589111328,11.61109447479248,49.96455383300781,14.177034378051758,51.007816314697266,16.954708099365234,51.659759521484375,19.944114685058594,51.920387268066406,20.4609375,51.92578125,23.575925827026367,51.698787689208984,26.37569808959961,51.01780319213867,28.86025619506836,49.88283157348633,31.029598236083984,48.29386901855469,32.93091583251953,46.07616424560547,34.31552505493164,43.65195846557617,35.18342971801758,41.0212516784668,35.53462600708008,38.18403625488281,35.54296875,37.65234375,35.271297454833984,34.8802490234375,34.45627975463867,32.10430145263672,33.097923278808594,29.324501037597656,31.655981063842773,27.067161560058594,29.948768615722656,24.73398208618164,27.976285934448242,22.324962615966797,26.12109375,20.25,12.65625,5.58984375,12.7265625,5.4140625],indices:[51,1,0,1,3,2,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,46,45,46,48,47,48,50,49,51,3,1,19,22,20,22,26,24,26,30,28,30,34,32,34,38,36,38,42,40,42,46,44,46,50,48,50,3,51,18,22,19,22,30,26,30,38,34,38,46,42,46,3,50,18,30,22,46,4,3,17,30,18,46,5,4,16,30,17,46,6,5,15,30,16,46,7,6,14,30,15,46,8,7,13,30,14,38,8,46,13,38,30,38,9,8,12,38,13,38,10,9,11,38,12,38,11,10],width:33.92578125},3:{positions:[13.640625,23.37890625,13.640625,28.79296875,19.6875,28.79296875,22.903934478759766,29.15167236328125,25.282482147216797,30.227783203125,26.954715728759766,32.621280670166016,27.896883010864258,35.25688171386719,28.125,37.51171875,27.781084060668945,40.67007064819336,26.749338150024414,43.162776947021484,24.544097900390625,45.051876068115234,22.03769302368164,46.1552734375,19.51171875,46.4765625,16.51466941833496,46.0916633605957,14.03652286529541,44.93696212768555,12.056009292602539,42.62509536743164,10.906388282775879,40.13740539550781,10.58203125,37.79296875,3.9375,37.79296875,3.8671875,38.00390625,4.073190689086914,40.847023010253906,4.870357036590576,43.464176177978516,6.258687496185303,45.85536193847656,8.649903297424316,47.949581146240234,11.105090141296387,49.6024169921875,13.624245643615723,50.81385803222656,16.207372665405273,51.58391189575195,18.854469299316406,51.912574768066406,19.51171875,51.92578125,22.69034194946289,51.71705627441406,25.550539016723633,51.090885162353516,28.09231185913086,50.04726028442383,30.315656661987305,48.58618927001953,32.206153869628906,46.54783248901367,33.6175651550293,44.22849655151367,34.54988479614258,41.62818145751953,35.00312423706055,38.74688720703125,35.05078125,37.37109375,34.68306350708008,34.60222244262695,33.579917907714844,31.84009552001953,31.788928985595703,29.416330337524414,29.652488708496094,27.526569366455078,27.38671875,26.26171875,30.2706241607666,24.998523712158203,32.5009765625,23.31671142578125,34.190120697021484,20.399517059326172,35.28596115112305,17.665790557861328,35.78849792480469,15.115530967712402,35.82421875,14.2734375,35.583168029785156,11.223187446594238,34.860015869140625,8.486950874328613,33.65475845336914,6.064727306365967,31.9674015045166,3.9565165042877197,29.64410972595215,2.185784339904785,27.159265518188477,.8323085308074951,24.512863159179688,-.10391119122505188,21.704906463623047,-.6228747963905334,19.51171875,-.73828125,16.397254943847656,-.535150945186615,13.541664123535156,.07424008101224899,10.9449462890625,1.089891791343689,8.607102394104004,2.5118041038513184,6.504549980163574,4.569301605224609,4.957869052886963,6.847413539886475,3.9670591354370117,9.34614086151123,3.5321204662323,12.065483093261719,3.515625,13.2890625,3.62109375,13.5,10.23046875,13.5,10.628458976745605,10.52513313293457,11.822431564331055,8.080921173095703,14.14232063293457,6.207763671875,16.670166015625,5.072887420654297,19.405969619750977,4.6762919425964355,19.51171875,4.67578125,22.593053817749023,5.02486515045166,25.119962692260742,6.072116374969482,27.08766746520996,8.277663230895996,28.33972930908203,10.727699279785156,28.876150131225586,13.422224998474121,28.8984375,14.1328125,28.579307556152344,17.37627601623535,27.621917724609375,19.90043067932129,25.462261199951172,21.754257202148438,22.976253509521484,22.91082000732422,20.163896560668945,23.3701229095459,19.6875,23.37890625],indices:[86,1,0,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,46,45,46,48,47,48,50,49,50,52,51,52,54,53,54,56,55,56,58,57,58,60,59,60,62,61,62,64,63,64,66,65,66,68,67,85,1,86,15,18,16,18,22,20,22,26,24,26,30,28,30,34,32,34,38,36,38,42,40,42,46,44,46,50,48,50,54,52,54,58,56,58,62,60,62,66,64,66,69,68,84,1,85,14,18,15,18,26,22,26,34,30,34,42,38,42,50,46,50,58,54,58,66,62,66,70,69,83,1,84,14,26,18,58,70,66,83,2,1,13,26,14,58,71,70,82,2,83,12,26,13,58,72,71,82,3,2,11,26,12,58,73,72,82,4,3,10,26,11,58,74,73,81,4,82,10,34,26,58,75,74,9,34,10,50,75,58,8,34,9,50,76,75,7,34,8,50,77,76,6,34,7,50,78,77,5,34,6,50,79,78,5,42,34,50,80,79,4,42,5,50,81,80,81,42,4,42,81,50],width:32.30859375},4:{positions:[31.81640625,51.1875,31.81640625,17.2265625,38.8828125,17.2265625,38.8828125,11.8125,31.81640625,11.8125,31.81640625,0,24.92578125,0,24.92578125,11.8125,1.93359375,11.8125,1.93359375,15.71484375,24.50390625,51.1875,31.81640625,51.1875,24.046875,39.515625,9.31640625,17.2265625,24.92578125,17.2265625,24.92578125,41.23828125,24.71484375,41.2734375],indices:[1,3,2,4,6,5,7,9,8,9,14,13,16,13,12,13,10,9,10,1,0,1,4,3,4,7,6,7,14,9,16,10,13,10,4,1,4,14,7,15,10,16,4,15,14,15,4,10],width:36.94921875},5:{positions:[11.91796875,22.5,6.15234375,23.09765625,9.10546875,51.1875,34.734375,51.1875,34.734375,45.03515625,14.9765625,45.03515625,13.2890625,30.65625,14.99853515625,31.75048828125,16.892578125,32.642578125,19.03271484375,33.25341796875,21.48046875,33.50390625,21.48046875,33.50390625,24.524171829223633,33.29277038574219,27.260135650634766,32.595733642578125,29.6883602142334,31.412792205810547,31.808847427368164,29.743946075439453,33.53106689453125,27.481525421142578,34.8779411315918,25.034576416015625,35.84947204589844,22.40309715270996,36.44565963745117,19.58709144592285,36.66650390625,16.586557388305664,36.66796875,16.3125,36.47660446166992,13.1383056640625,35.90251541137695,10.244234085083008,34.94569778442383,7.630287170410156,33.60615158081055,5.296463966369629,31.54420280456543,3.2312631607055664,29.28870391845703,1.597025990486145,26.839656829833984,.3937528729438782,24.197057723999023,-.3785564601421356,21.360912322998047,-.7199019193649292,20.49609375,-.73828125,17.404800415039062,-.5199803113937378,14.58151912689209,.13492262363433838,12.026251792907715,1.226427435874939,9.738997459411621,2.7545342445373535,7.902623653411865,4.662389278411865,6.586172580718994,6.943535327911377,5.78964376449585,9.59797191619873,5.513038158416748,12.625699043273926,5.51953125,13.25390625,5.58984375,13.46484375,11.84765625,13.46484375,12.231374740600586,10.424592018127441,13.382529258728027,7.983725547790527,15.769926071166992,6.059262275695801,18.29474449157715,4.960567474365234,20.49609375,4.67578125,23.407373428344727,5.077446937561035,25.80744171142578,6.282444000244141,27.603513717651367,8.744783401489258,28.85628890991211,11.317317962646484,29.565767288208008,14.000046730041504,29.7421875,16.2421875,29.464466094970703,19.35067367553711,28.631298065185547,22.06241226196289,26.50613021850586,24.628503799438477,24.30402374267578,26.380647659301758,22.024982452392578,27.31884002685547,20.49609375,27.4921875,17.11406707763672,27.2115478515625,14.758378028869629,26.369632720947266,13.049945831298828,24.7330322265625],indices:[2,4,3,6,8,7,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,2,5,4,6,9,8,12,16,14,16,20,18,20,24,22,24,28,26,28,32,30,32,36,34,36,40,38,40,43,42,1,5,2,12,20,16,20,28,24,28,36,32,36,43,40,1,6,5,36,44,43,1,9,6,36,45,44,28,45,36,28,46,45,28,47,46,28,48,47,28,49,48,20,49,28,20,50,49,20,51,50,20,52,51,20,53,52,20,54,53,20,55,54,12,55,20,12,56,55,12,57,56,12,58,57,12,59,58,12,60,59,12,61,60,1,11,9,11,61,12,62,1,0,1,61,11,61,1,62],width:31.154930591583252},6:{positions:[23.73046875,51.92578125,23.73046875,51.92578125,26.35400390625,51.7763671875,28.951171875,51.328125,31.31103515625,50.6513671875,33.22265625,49.81640625,33.22265625,49.81640625,31.74609375,44.5078125,29.98388671875,45.30322265625,28.142578125,45.931640625,26.09912109375,46.34033203125,23.73046875,46.4765625,23.73046875,46.4765625,20.900758743286133,46.15056610107422,18.386611938476562,45.17258071899414,16.18802833557129,43.5426025390625,14.465424537658691,41.076210021972656,13.138894081115723,38.50679397583008,12.208439826965332,35.8343505859375,11.67405891418457,33.05888366699219,11.53125,30.62109375,11.53125,29.8125,13.904020309448242,31.542055130004883,16.591995239257812,32.85417938232422,19.408527374267578,33.66147994995117,22.372249603271484,33.98829650878906,22.921875,33.99609375,25.913307189941406,33.7476806640625,28.614002227783203,33.002437591552734,31.023962020874023,31.7603702545166,33.143184661865234,30.021472930908203,34.91127014160156,27.67707633972168,36.273963928222656,25.183759689331055,37.23126983642578,22.541519165039062,37.783180236816406,19.750356674194336,37.93359375,17.2265625,37.749637603759766,14.08007526397705,37.19777297973633,11.182336807250977,36.27799606323242,8.533347129821777,34.99031066894531,6.1331071853637695,32.81218719482422,3.8232548236846924,30.5310001373291,1.9849358797073364,28.146751403808594,.6181499361991882,25.65943717956543,-.2771027684211731,23.069063186645508,-.7008222937583923,22.0078125,-.73828125,19.07733154296875,-.5163767337799072,16.358732223510742,.14933684468269348,13.852017402648926,1.2588595151901245,11.557185173034668,2.8121912479400635,9.638298988342285,5.0737128257751465,8.030496597290039,7.450648784637451,6.733777046203613,9.942998886108398,5.748140335083008,12.550763130187988,5.073586463928223,15.273941993713379,4.710115432739258,18.112533569335938,4.640625,20.07421875,4.640625,29.84765625,4.791966915130615,33.015262603759766,5.245992183685303,35.97719955444336,6.0027008056640625,38.73346710205078,7.062093257904053,41.28406524658203,8.424168586730957,43.62899398803711,10.08892822265625,45.768253326416016,12.196839332580566,47.81597900390625,14.478988647460938,49.4511604309082,16.93537712097168,50.673797607421875,19.56600570678711,51.483890533447266,22.370872497558594,51.881439208984375,21.375,28.828125,21.375,28.828125,18.29266357421875,28.514667510986328,15.669046401977539,27.57429313659668,13.216089248657227,25.754901885986328,11.53125,23.5546875,11.53125,23.5546875,11.53125,19.40625,11.72034740447998,16.05575180053711,12.287637710571289,13.114592552185059,13.233122825622559,10.582772254943848,15.422850608825684,7.959404945373535,17.641748428344727,6.1007585525512695,19.889812469482422,5.006833076477051,22.0078125,4.67578125,24.755970001220703,5.117502212524414,27.043012619018555,6.4426655769348145,28.768321990966797,9.139809608459473,30.00419807434082,11.825053215026855,30.75064468383789,14.498397827148438,31.007658004760742,17.15984344482422,31.0078125,17.2265625,30.737268447875977,20.334959030151367,29.925634384155273,23.062726974487305,28.57291030883789,25.409866333007812,26.557069778442383,27.331403732299805,24.112672805786133,28.470571517944336],indices:[2,4,3,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,61,60,61,63,62,63,65,64,65,67,66,21,25,23,25,29,27,29,33,31,33,37,35,37,41,39,41,45,43,45,49,47,49,53,51,53,57,55,57,61,59,61,65,63,65,68,67,21,29,25,29,37,33,37,45,41,45,53,49,57,65,61,57,68,65,73,57,74,68,2,1,2,6,4,6,8,7,53,75,57,72,57,73,68,6,2,6,9,8,53,76,75,71,57,72,68,9,6,53,77,76,70,57,71,68,10,9,53,78,77,68,12,10,53,79,78,68,13,12,45,79,53,68,14,13,45,80,79,68,15,14,45,81,80,57,15,68,45,82,81,57,16,15,45,83,82,57,17,16,45,84,83,57,18,17,37,84,45,57,19,18,37,85,84,57,20,19,37,86,85,57,21,20,37,87,86,70,21,57,37,88,87,70,29,21,37,89,88,95,29,70,37,90,89,94,29,95,29,90,37,93,29,94,29,91,90,92,29,93,29,92,91],width:33.29296875},7:{positions:[37.3359375,51.1875,37.3359375,45.73828125,35.06884002685547,42.96620559692383,32.99747848510742,40.27573776245117,31.121856689453125,37.666873931884766,29.441970825195312,35.13961410522461,27.957822799682617,32.6939582824707,26.669410705566406,30.329906463623047,25.576738357543945,28.047460556030273,24.585519790649414,25.34857940673828,23.679515838623047,22.592660903930664,22.85872459411621,19.779708862304688,22.123149871826172,16.909719467163086,21.47278594970703,13.982696533203125,20.907638549804688,10.998638153076172,20.427703857421875,7.957544803619385,20.109375,5.51953125,19.546875,0,12.62109375,0,13.18359375,5.51953125,13.624162673950195,8.682632446289062,14.162458419799805,11.7554292678833,14.798481941223145,14.737921714782715,15.532232284545898,17.630107879638672,16.363710403442383,20.431991577148438,17.29291534423828,23.14356803894043,18.319847106933594,25.764841079711914,19.59184455871582,28.50404167175293,20.94556999206543,31.184146881103516,22.381019592285156,33.80515670776367,23.898197174072266,36.367069244384766,25.497098922729492,38.86988830566406,27.17772674560547,41.31361389160156,28.940080642700195,43.6982421875,30.55078125,45.73828125,2.70703125,45.73828125,2.70703125,51.1875],indices:[36,1,0,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,15,18,16,18,22,20,22,26,24,26,30,28,30,34,32,34,1,36,14,18,15,18,26,22,26,34,30,34,2,1,13,18,14,18,34,26,34,3,2,12,18,13,34,4,3,11,18,12,34,5,4,10,18,11,34,6,5,9,18,10,34,7,6,8,18,9,34,8,7,8,34,18],width:34.62890625},8:{positions:[35.5078125,37.828125,35.5078125,37.828125,35.171749114990234,34.87995147705078,34.16355895996094,32.23108673095703,32.111854553222656,29.74087905883789,29.926387786865234,27.833354949951172,27.60715675354004,26.50851058959961,27.17578125,26.33203125,29.95149040222168,25.094419479370117,32.32651901245117,23.460092544555664,34.43555450439453,20.72713279724121,35.900413513183594,18.128986358642578,36.721099853515625,15.665656089782715,36.9140625,13.8515625,36.669769287109375,10.764041900634766,35.936893463134766,8.031349182128906,34.71543502807617,5.653482913970947,33.00539016723633,3.630444288253784,30.672534942626953,1.9876797199249268,28.159135818481445,.7305349111557007,25.465194702148438,-.14099019765853882,22.590709686279297,-.6268956065177917,20.28515625,-.73828125,17.073928833007812,-.5518752932548523,14.154998779296875,.007342617027461529,11.52836799621582,.9393724799156189,9.194035530090332,2.2442142963409424,7.087226867675781,4.249664306640625,5.474374294281006,6.483748912811279,4.355478763580322,8.946466445922852,3.730539560317993,11.637818336486816,3.5859375,13.8515625,3.9077277183532715,16.76708984375,4.873098373413086,19.430402755737305,6.983664512634277,21.999971389770508,9.1663179397583,24.03520965576172,11.421058654785156,25.536113739013672,13.21875,26.33203125,10.521642684936523,27.690086364746094,8.310940742492676,29.498327255249023,6.554880142211914,32.2148551940918,5.462681293487549,34.86786651611328,5.034343719482422,37.45735549926758,5.02734375,37.828125,5.274991512298584,40.936737060546875,6.0179338455200195,43.679622650146484,7.256171703338623,46.056785583496094,8.989704132080078,48.0682258605957,11.195730209350586,49.67716598510742,13.679861068725586,50.85453796386719,16.442096710205078,51.60033416748047,19.482437133789062,51.914554595947266,20.21484375,51.92578125,23.33972930908203,51.71018600463867,26.17371940612793,51.06340789794922,28.716812133789062,49.98543930053711,30.96900749206543,48.476287841796875,32.855812072753906,46.481101989746094,34.23870849609375,44.16929626464844,35.11769485473633,41.54087829589844,35.49277114868164,38.5958366394043,30.0234375,13.9921875,30.0234375,13.9921875,29.64218521118164,16.91078758239746,28.498428344726562,19.414352416992188,26.08045768737793,21.54735565185547,23.622779846191406,22.934738159179688,21.125396728515625,23.576496124267578,20.21484375,23.625,17.24955177307129,23.25731658935547,14.728343963623047,22.15427017211914,12.576437950134277,19.76153564453125,11.184748649597168,17.31914710998535,10.553275108337402,14.827102661132812,10.51171875,13.9921875,10.887092590332031,10.988458633422852,12.013215065002441,8.51321792602539,14.405669212341309,6.533318519592285,16.906885147094727,5.263905048370361,19.516860961914062,4.704977512359619,20.28515625,4.67578125,23.29867172241211,5.026233196258545,25.858081817626953,6.077588081359863,28.013742446899414,8.338984489440918,29.392438888549805,10.737264633178711,29.994173049926758,13.27242660522461,28.58203125,37.6875,28.58203125,37.6875,28.174694061279297,40.610374450683594,26.952680587768555,43.08668899536133,24.61227035522461,45.108375549316406,22.137697219848633,46.228328704833984,20.21484375,46.4765625,17.313322067260742,46.03565979003906,14.926724433898926,44.71294403076172,13.154691696166992,42.36640930175781,12.172061920166016,39.77567672729492,11.953125,37.6875,12.353304862976074,34.70274353027344,13.553845405578613,32.25563430786133,15.877814292907715,30.335918426513672,18.399682998657227,29.288454055786133,20.28515625,29.07421875,23.187891006469727,29.511512756347656,25.59459114074707,30.82339859008789,27.39614486694336,33.1435661315918,28.379940032958984,35.7212028503418],indices:[96,43,97,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,1,60,1,3,2,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,75,74,73,31,74,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,98,97,95,43,96,43,47,45,47,51,49,51,55,53,55,59,57,59,3,1,3,7,5,7,11,9,11,15,13,15,19,17,19,23,21,23,27,25,27,31,29,31,76,75,72,31,73,31,35,33,37,41,39,41,98,43,94,43,95,43,51,47,51,59,55,59,7,3,7,15,11,15,23,19,23,31,27,31,77,76,71,31,72,31,37,35,37,98,41,94,51,43,23,77,31,70,31,71,37,99,98,93,51,94,23,78,77,70,37,31,37,100,99,92,51,93,23,79,78,69,37,70,37,101,100,91,51,92,23,80,79,68,37,69,37,102,101,90,51,91,23,81,80,67,37,68,37,103,102,89,51,90,15,81,23,66,37,67,89,59,51,15,82,81,66,103,37,88,59,89,15,83,82,65,103,66,87,59,88,15,84,83,64,103,65,106,59,87,15,85,84,64,104,103,105,59,106,15,62,85,63,104,64,104,59,105,15,63,62,104,7,59,7,63,15,63,7,104],width:33.328125},9:{positions:[17.96484375,4.67578125,17.96484375,4.67578125,20.832611083984375,5.023819923400879,23.333181381225586,6.067935943603516,25.466554641723633,7.80812931060791,26.91764259338379,9.993691444396973,28.0020751953125,12.483912467956543,28.7198543548584,15.278792381286621,29.070980072021484,18.378332138061523,29.109375,19.8984375,29.109375,22.21875,27.17138671875,20.02587890625,24.802734375,18.439453125,22.097061157226562,17.482282638549805,19.10603904724121,17.156333923339844,19.0546875,17.15625,15.962648391723633,17.374753952026367,13.161947250366211,18.030263900756836,10.65258502960205,19.12278175354004,8.43455982208252,20.652305603027344,6.556478023529053,22.870075225830078,5.067807197570801,25.25521469116211,3.968548536300659,27.80772590637207,3.2587015628814697,30.527606964111328,2.9382660388946533,33.414859771728516,2.91796875,34.3828125,3.1171858310699463,37.45964050292969,3.7148373126983643,40.29710006713867,4.710922718048096,42.89520263671875,6.105442523956299,45.253936767578125,8.45276927947998,47.5704231262207,10.840720176696777,49.39479446411133,13.269293785095215,50.72705078125,15.738492012023926,51.56719207763672,18.248313903808594,51.915218353271484,18.7734375,51.92578125,21.87710189819336,51.72084045410156,24.703197479248047,51.10601806640625,27.25172233581543,50.0813102722168,29.52267837524414,48.646724700927734,31.40683364868164,46.456634521484375,32.97002410888672,44.11880111694336,34.212249755859375,41.63322067260742,35.133514404296875,38.99989700317383,35.73381423950195,36.21882629394531,36.01314926147461,33.29001235961914,36.03515625,32.16796875,36.03515625,19.96875,35.885276794433594,16.642547607421875,35.435638427734375,13.59611988067627,34.686241149902344,10.8294677734375,33.6370849609375,8.34259033203125,32.28816604614258,6.135488033294678,30.066654205322266,3.964623212814331,27.738887786865234,2.2044835090637207,25.30486488342285,.8550683259963989,22.764589309692383,-.08362190425395966,20.118059158325195,-.6115872859954834,17.96484375,-.73828125,15.23583984375,-.61083984375,12.462890625,-.228515625,9.81298828125,.41748046875,7.453125,1.3359375,7.453125,1.3359375,8.5078125,6.64453125,10.62158203125,5.71728515625,12.814453125,5.115234375,15.21826171875,4.78564453125,17.96484375,4.67578125,19.0546875,22.5703125,19.0546875,22.5703125,22.15691566467285,22.88543701171875,24.769695281982422,23.830808639526367,27.256725311279297,25.793380737304688,28.883312225341797,27.970977783203125,29.109375,28.44140625,29.109375,32.87109375,28.917926788330078,36.28435516357422,28.34358024597168,39.213134765625,27.386337280273438,41.657432556152344,25.37175941467285,43.94849395751953,23.127288818359375,45.50687026977539,20.652921676635742,46.33256530761719,18.984375,46.4765625,16.33090591430664,46.012935638427734,13.984920501708984,44.62206268310547,12.139910697937012,42.07911682128906,10.835031509399414,39.48687744140625,10.070281982421875,36.84534454345703,9.84375,34.3828125,10.09748363494873,31.21339988708496,10.858684539794922,28.454280853271484,12.127352714538574,26.105453491210938,14.162574768066406,24.085222244262695,16.57485580444336,22.90838050842285],indices:[60,63,61,63,65,64,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,89,25,88,25,89,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,63,60,63,66,65,10,14,12,14,18,16,18,22,20,22,89,24,87,25,88,25,29,27,29,33,31,33,37,35,37,41,39,41,45,43,45,49,47,49,53,51,53,57,55,57,63,59,63,67,66,10,18,14,18,89,22,86,25,87,25,33,29,33,41,37,41,49,45,49,57,53,57,67,63,18,90,89,85,25,86,57,1,67,18,91,90,85,33,25,57,2,1,18,92,91,84,33,85,57,3,2,18,93,92,83,33,84,49,3,57,18,94,93,82,33,83,49,4,3,18,70,94,81,33,82,49,5,4,10,70,18,80,33,81,49,6,5,10,71,70,80,41,33,49,7,6,10,72,71,79,41,80,41,7,49,10,73,72,78,41,79,41,8,7,10,74,73,77,41,78,41,9,8,10,75,74,76,41,77,41,10,9,75,41,76,41,75,10],width:33.1171875},".":{positions:[12.5859375,7.1015625,12.5859375,0,5.66015625,0,5.66015625,7.1015625],indices:[3,1,0,1,3,2],width:6.92578125},m:{positions:[5.02734375,38.0390625,11.21484375,38.0390625,11.70703125,33.046875,13.634581565856934,35.28191375732422,15.986680030822754,37.00302505493164,18.700471878051758,38.111698150634766,21.567134857177734,38.6696662902832,23.09765625,38.7421875,26.139192581176758,38.42292022705078,28.791221618652344,37.465118408203125,31.15591812133789,35.599586486816406,32.90284729003906,33.37240219116211,33.71484375,31.7109375,35.408084869384766,34.171592712402344,37.503177642822266,36.16951370239258,40.22900390625,37.6488037109375,42.961280822753906,38.50468063354492,45.3515625,38.7421875,48.32835006713867,38.446842193603516,50.9460334777832,37.5608024597168,53.204620361328125,36.084068298339844,54.8843879699707,33.86517333984375,56.19401931762695,31.434070587158203,57.133506774902344,28.79076385498047,57.70286178588867,25.93524932861328,57.90207290649414,22.867528915405273,57.90234375,22.74609375,57.90234375,0,50.9765625,0,50.9765625,22.81640625,50.74445724487305,26.319555282592773,50.04814529418945,29.033550262451172,47.956382751464844,31.33014678955078,45.659942626953125,32.691036224365234,43.27734375,33.1171875,40.4267463684082,32.6451530456543,38.09538650512695,31.229045867919922,36.33670425415039,28.815231323242188,35.26606750488281,26.190664291381836,34.9453125,24.43359375,34.9453125,24.15234375,34.9453125,0,27.984375,0,27.984375,22.81640625,27.73810386657715,26.2243709564209,26.99928855895996,28.921852111816406,24.89556121826172,31.278352737426758,22.623031616210938,32.67652893066406,20.28515625,33.1171875,17.40234375,32.7919921875,15.08203125,31.81640625,13.2802734375,30.251953125,11.953125,28.16015625,11.953125,28.16015625,11.953125,0,5.02734375,0],indices:[55,1,0,2,4,3,4,6,5,6,8,7,8,10,9,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,40,42,41,54,1,55,2,6,4,6,10,8,12,16,14,16,20,18,20,24,22,24,28,26,39,42,40,54,2,1,2,10,6,12,20,16,20,28,24,38,42,39,20,29,28,38,43,42,20,30,29,37,43,38,20,31,30,36,43,37,20,32,31,36,44,43,20,33,32,35,44,36,20,34,33,35,45,44,12,34,20,12,35,34,12,45,35,10,45,12,10,46,45,10,47,46,10,48,47,2,48,10,2,49,48,2,50,49,2,51,50,2,53,51,53,2,54],width:52.875},c:{positions:[20.49609375,4.67578125,20.49609375,4.67578125,23.36757469177246,5.087423801422119,25.919267654418945,6.322350978851318,28.055252075195312,8.557517051696777,29.08038330078125,10.95840835571289,29.1796875,12.0234375,35.40234375,12.0234375,35.47265625,11.8125,35.209197998046875,9.178794860839844,34.224666595458984,6.713964939117432,32.519065856933594,4.418010711669922,29.943574905395508,2.4374680519104004,27.361528396606445,.9345490336418152,24.772926330566406,-.0907462015748024,22.177766799926758,-.6384177803993225,20.49609375,-.73828125,17.386640548706055,-.5293084979057312,14.578433990478516,.09760986268520355,12.071474075317383,1.142473816871643,9.86575984954834,2.605283260345459,7.9612932205200195,4.4860382080078125,6.3618083000183105,6.765913009643555,5.107275009155273,9.241913795471191,4.197693824768066,11.914040565490723,3.633063793182373,14.782294273376465,3.4133858680725098,17.8466739654541,3.41015625,18.28125,3.41015625,19.7578125,3.5838754177093506,22.87480926513672,4.105032920837402,25.780019760131836,4.973628997802734,28.473445892333984,6.189663410186768,30.95508575439453,7.753136157989502,33.22494125366211,9.646564483642578,35.16857147216797,11.828062057495117,36.69178771972656,14.297628402709961,37.79460144042969,17.05526351928711,38.47700500488281,20.100967407226562,38.73899841308594,20.49609375,38.7421875,23.570213317871094,38.5140495300293,26.36119842529297,37.82963943481445,28.869049072265625,36.6889533996582,31.093765258789062,35.09199523925781,33.085479736328125,32.87481689453125,34.484825134277344,30.467679977416992,35.29180145263672,27.87058448791504,35.5078125,25.13671875,35.4375,24.92578125,29.1796875,24.92578125,28.72093391418457,27.737882614135742,27.34467315673828,30.163320541381836,24.98297119140625,32.04195022583008,22.43872833251953,33.074039459228516,20.49609375,33.29296875,17.510202407836914,32.94111633300781,15.082853317260742,31.88556480407715,13.214049339294434,30.12630844116211,11.89155101776123,27.541250228881836,10.979540824890137,24.808610916137695,10.478017807006836,21.928388595581055,10.37109375,19.7578125,10.37109375,18.28125,10.565627098083496,15.065240859985352,11.149227142333984,12.176401138305664,12.121894836425781,9.614731788635254,13.855029106140137,7.324370861053467,15.960027694702148,5.741883754730225,18.4368896484375,4.867271423339844],indices:[5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,4,7,5,7,11,9,11,15,13,15,19,17,19,23,21,23,27,25,27,31,29,31,35,33,35,39,37,39,43,41,43,47,45,47,50,49,3,7,4,7,15,11,15,23,19,23,31,27,31,39,35,39,47,43,47,51,50,3,15,7,39,51,47,2,15,3,39,52,51,39,53,52,39,54,53,39,55,54,31,55,39,31,56,55,31,57,56,31,58,57,23,58,31,23,59,58,23,60,59,23,61,60,23,62,61,23,63,62,23,64,63,23,65,64,23,66,65,15,66,23,15,67,66,15,68,67,15,1,68,1,15,2],width:32.09765625},k:{positions:[28.828125,0,16.48828125,17.54296875,11.98828125,17.54296875,11.98828125,0,5.0625,0,5.0625,54.84375,11.98828125,54.84375,11.98828125,23.0625,16.41796875,23.0625,26.82421875,38.0390625,35.12109375,38.0390625,22.11328125,20.7421875,36.984375,0],indices:[12,1,0,2,4,3,4,6,5,8,10,9,11,1,12,4,7,6,8,11,10,11,2,1,2,7,4,7,11,8,11,7,2],width:31.921875},t:{positions:[0,0,30,0],indices:[0,2,1],width:30}," ":{width:16,positions:[],indices:[]}};function DRt({text:i,size:e=1,zOffset:t=0}){const o=[],n=[];let r=0,a=0;const s=10;e/=100;for(const l of i){const c=LRt[l];if(!c)throw new Error("Unknown character: "+l);const d=a;for(let h=0;h<c.positions.length;h+=2)o.push(c.positions[h]*e+d,c.positions[h+1]*e,t);const u=r===0?0:r+1;for(const h of c.indices)n.push(h+u),r=Math.max(r,h+u);a+=(c.width+s)*e}return{positions:o,indices:n,primitive:"triangles"}}function OW(i,{content:e,size:t,matrix:o,offset:n=0}){const{material:r,origin:a,plugin:s}=i,{textSizeRatio:l,textBottomMarginRatio:c,xeokitSdk:d,viewer:u}=s,{Mesh:h,VBOGeometry:p,math:A}=d,{scene:f}=u,{primitive:m,positions:g,indices:y}=DRt({text:e,size:t*l,zOffset:n});let v=g[0],w=g[0];for(let P=0;P<g.length;P+=3){const R=g[P];R<v&&(v=R),R>w&&(w=R)}const x=-(w-v)/2,k=A.mat4(),B=A.translationMat4v([x,t*c,0]);A.mulMat4(o,A.rotationMat4v(Math.PI,[0,1,0],A.mat4()),k),A.mulMat4(o,B),A.mulMat4(k,B);const E=new p(f,{primitive:m,positions:g,indices:y});return[new h(f,{geometry:E,material:r,pickable:!1,origin:a,matrix:o}),new h(f,{geometry:E,material:r,pickable:!1,origin:a,matrix:k})]}class _Rt{constructor(e,t,o){this.plugin=e;const{viewer:n}=e;this.line=null,this.texts=null,this.length=0;const{math:r,worldToRTCPos:a,Node:s,PhongMaterial:l}=e.xeokitSdk,c=r.vec3(),d=r.vec3();a(t,d,c),this.material=new l(n.scene,{emissive:Xp(e.defaultColor)}),this.node=new s(n.scene,{pickable:!1,origin:d,children:[]}),this.origin=d,this.p1=c,this.normal=o}move(e,t){const{arrowSizeRatio:o,offsetRatio:n,xeokitSdk:r,viewer:a}=this.plugin,{math:s,Mesh:l,VBOGeometry:c}=r,{scene:d}=a,u=this.p1;this.p2=s.subVec3(e,this.origin),this.node.removeChildren(),this.line?.destroy();const h=s.subVec3(e,u,s.vec3());if(h.every(Ce=>Ce===0))return;const p=s.normalizeVec3(h,s.vec3()),A=s.mulVec3Scalar(p,-1,s.vec3()),f=s.lenVec3(h);this.length=f;const m=n*f;let g=0;const y=s.mulVec3Scalar(h,.5,s.vec3()),v=s.addVec3(u,y,s.vec3());let w=s.normalizeVec3(s.cross3Vec3(t,s.normalizeVec3(h,s.vec3()),s.vec3()));const x=s.dotVec3(t,this.normal)>.999,k=s.vec3([0,1,0]),B=s.dotVec3(p,k);if(x){const Ce=Math.abs(B)<.01;g=m;let De=null;if(Ce){const{look:Fe,up:ve,eye:ge}=d.camera,we=s.normalizeVec3(s.subVec3(Fe,ge,s.vec3())),Le=s.cross3Vec3(we,ve);De=s.dotVec3(p,Le)}else{const Fe=s.cross3Vec3(k,t,s.vec3());De=s.dotVec3(p,Fe)}De<0&&(w=s.negateVec3(w),g=-g)}else if(Math.abs(B)>.99){const{look:Ce,eye:De}=d.camera,Fe=s.normalizeVec3(s.subVec3(Ce,De,s.vec3()));w=s.normalizeVec3(s.cross3Vec3(p,Fe,s.vec3())),t=s.normalizeVec3(s.cross3Vec3(w,p,s.vec3()))}else t=s.normalizeVec3(s.cross3Vec3(k,p,s.vec3())),w=s.normalizeVec3(s.cross3Vec3(p,t,s.vec3())),s.dotVec3(w,k)<0&&(w=s.negateVec3(w));const E=s.negateVec3(w,s.vec3()),P=s.mulVec3Scalar(w,f*o,s.vec3()),R=s.mulVec3Scalar(E,f*o,s.vec3()),T=s.addVec3(u,P,s.vec3()),L=s.addVec3(u,R,s.vec3()),F=s.addVec3(e,P,s.vec3()),U=s.addVec3(e,R,s.vec3()),q=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(w,p,s.vec3())),f*o*Math.SQRT2),V=s.addVec3(u,q,s.vec3()),W=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(E,p,s.vec3())),f*o*Math.SQRT2),Y=s.addVec3(u,W,s.vec3()),$=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(w,A,s.vec3())),f*o*Math.SQRT2),me=s.addVec3(e,$,s.vec3()),Ie=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(E,A,s.vec3())),f*o*Math.SQRT2),Se=s.addVec3(e,Ie,s.vec3()),qe=s.translationMat4v(s.mulVec3Scalar(t,m,s.vec3()));this.line=new l(a.scene,{geometry:new c(a.scene,{primitive:"lines",positions:[...u,...e,...T,...L,...F,...U,...V,...Y,...me,...Se],indices:[0,1,0,2,0,3,0,6,0,7,1,4,1,5,1,8,1,9]}),material:this.material,matrix:qe,pickable:!1,origin:this.origin}),this.node.addChild(this.line),this.texts?.forEach(Ce=>Ce.destroy());const Qe=s.mat4([...p,0,...w,0,...t,0,...v,1]);this.texts=this._makeTexts(f.toFixed(2)+" m",f,Qe,g),this.texts.forEach(Ce=>this.node.addChild(Ce))}_makeTexts(e,t,o,n=0){return OW(this,{content:e,size:t,matrix:o,offset:n})}destroy(){this.node.destroy(),this.line?.destroy(),this.texts?.forEach(e=>e.destroy()),this.plugin.measurements=this.plugin.measurements.filter(e=>e!==this)}get visible(){return this.node.visible}set visible(e){this.node.visible=e}get color(){return DW(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=Xp(e)}}class UW{constructor(e,t,o={}){this.viewer=e,this.xeokitSdk=t,this.arrowSizeRatio=o.arrowSizeRatio??.04,this.textSizeRatio=o.textSizeRatio??.1,this.textBottomMarginRatio=o.textBottomMarginRatio??.02,this.offsetRatio=o.offsetRatio??.003,this.snapPickRadius=o.snapPickRadius??15,this.defaultColor=o.defaultColor??"#ffffff";const n=document.createElement("img"),r=e.scene.canvas.canvas;r.parentNode.insertBefore(n,r),n.style.width="28px",n.style.height="28px",n.style.position="absolute",n.style.pointerEvents="none",n.style.transform="translate(-50%, -50%)",n.style.display="none",this.imgElement=n,this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new FRt(this)}on(e,t){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=t,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class FRt{constructor(e){this.plugin=e,this.currentMeasurement=null,this.lastPosition=null,this.mouseDown=!1,this.dragging=!1,this.activated=!1}_updateCursor(e){const{imgElement:t,viewer:o}=this.plugin,{scene:n}=o;n.canvas.canvas.style.cursor=`url("${RRt}") 16 16, auto`;const r=n.pick({canvasPos:e,snapRadius:this.plugin.snapPickRadius,snapToEdge:!0,snapToVertex:!0});if(r?.snappedWorldPos||r?.worldPos){if(r.snappedCanvasPos)t.style.left=`${r.snappedCanvasPos[0]}px`,t.style.top=`${r.snappedCanvasPos[1]}px`,t.src=r.snapType==="vertex"?IRt:PRt;else{const a=r.canvasPos;t.style.left=`${a[0]}px`,t.style.top=`${a[1]}px`,t.src=SRt}this.lastPosition=r.snappedWorldPos??r.worldPos,this.lastPosition.worldNormal=r.snappedWorldNormal??r.worldNormal}else t.style.left=`${e[0]}px`,t.style.top=`${e[1]}px`,t.src=TRt,this.lastPosition=null}_onMouseMove(e){this.mouseDown&&(this.dragging=!0),e.preventDefault(),this._updateCursor([e.offsetX,e.offsetY]),this.lastPosition&&this.currentMeasurement?.move(this.lastPosition,this.lastPosition.worldNormal)}_onMouseDown(){this.mouseDown=!0}_onMouseUp(){this.mouseDown=!1;const e=this.dragging;this.dragging=!1,!e&&this.lastPosition&&(this.currentMeasurement?(this.plugin.measurements.push(this.currentMeasurement),Object.values(this.plugin.measurementEndCallbacks).forEach(t=>t?.(this.currentMeasurement)),this.currentMeasurement=null):this.currentMeasurement=new _Rt(this.plugin,this.lastPosition,this.lastPosition.worldNormal))}activate(){if(this.activated)return;const{canvas:e}=this.plugin.viewer.scene.canvas;this.plugin.imgElement.style.display="block";const t=this._onMouseMove.bind(this),o=this._onMouseDown.bind(this),n=this._onMouseUp.bind(this);e.addEventListener("mousemove",t),e.addEventListener("mousedown",o),document.addEventListener("mouseup",n),this._unsubscribe=()=>{e.removeEventListener("mousemove",t),e.removeEventListener("mousedown",o),document.removeEventListener("mouseup",n)},this.activated=!0}deactivate(){this.activated&&(this._unsubscribe?.(),this.currentMeasurement?.destroy(),this.currentMeasurement=null,this.lastPosition=null,this.plugin.imgElement.style.display="none",this.activated=!1)}}class ORt{constructor(e,t){this.plugin=e;const{xeokitSdk:o,viewer:n}=e,{Mesh:r,ReadableGeometry:a,buildSphereGeometry:s,PhongMaterial:l,Node:c,math:d,worldToRTCPos:u}=o,h=d.vec3(),p=d.vec3();this._length=0;const{entity:A,worldPos:f}=t;u(f,p,h);const m=new l(n.scene,{emissive:Xp(e.defaultColor),diffuse:[0,0,0]}),g=(k=!0)=>new r(n.scene,{geometry:new a(n.scene,s({radius:.03})),material:m,pickable:!1,visible:k,origin:p}),y=g(),v=g(!1),w=new r(n.scene,{geometry:new a(n.scene,{primitive:"lines",positions:[0,0,0,0,0,0],indices:[0,1]}),material:m,pickable:!1,visible:!1,origin:p}),x=new c(n.scene,{pickable:!1,visible:!0,position:h,origin:p,children:[y,w,v]});this.origin=p,this.modelId=A.model.id,this.node=x,this.toSphere=v,this.fromSphere=y,this.line=w,this.material=m}show(e){const{node:t,fromSphere:o,toSphere:n,line:r,texts:a,plugin:s}=this,{math:l}=s.xeokitSdk;t.position=l.subVec3(e.worldPos,t.origin,l.vec3()),t.visible=!0;const{viewer:c}=s,d=c.scene.pick({pickSurface:!0,origin:e.worldPos,direction:e.worldNormal});if(a&&(a.forEach(u=>u.destroy()),this.texts=null),d){n.visible=!0,r.visible=!0,n.position=l.subVec3(d.worldPos,n.origin,l.vec3()),n.position=l.subVec3(n.position,t.position,l.vec3()),r.position=l.vec3().set(t.position),r.geometry.positions=[0,0,0,...n.position];const u=l.lenVec3(n.position);this._length=u;const h=o.position,p=n.position,A=l.subVec3(p,h,l.vec3()),f=l.normalizeVec3(A,l.vec3()),m=l.mulVec3Scalar(A,.5,l.vec3()),g=l.addVec3(h,m,l.vec3()),y=[0,1,0],v=l.dotVec3(f,y),w=Math.abs(v)>.9;let x;if(w){const k=l.normalizeVec3(l.subVec3(c.scene.camera.eye,c.scene.camera.look,l.vec3()),l.vec3()),B=l.normalizeVec3(l.cross3Vec3(k,f,l.vec3()),l.vec3()),E=l.normalizeVec3(l.cross3Vec3(B,f,l.vec3()),l.vec3());x=l.mat4([...f,0,...B,0,...E,0,...g,1])}else{const k=l.normalizeVec3(l.cross3Vec3(y,f,l.vec3()),l.vec3()),B=l.normalizeVec3(l.cross3Vec3(f,k,l.vec3()),l.vec3());x=l.mat4([...f,0,...B,0,...k,0,...g,1])}this.texts=this._makeTexts(u.toFixed(2)+" m",u,x),this.texts.forEach(k=>t.addChild(k))}else n.visible=!1,r.visible=!1,this._length=0}hide(){this.node.visible=!1}destroy(){this.node.destroy(),this.line.destroy(),this.fromSphere.destroy(),this.toSphere.destroy(),this.texts?.forEach(e=>e.destroy())}set length(e){this._length=e}get length(){return this.visible?this._length:0}get visible(){return this.node.visible===!0}set visible(e){this.node.visible=!!e}get color(){return DW(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=Xp(e)}_makeTexts(e,t,o){return OW(this,{content:e,size:t,matrix:o})}}class NW{constructor(e,t,o={}){this.viewer=e,this.xeokitSdk=t,this.textSizeRatio=o.textSizeRatio??.1,this.textBottomMarginRatio=o.textBottomMarginRatio??.01,this.defaultColor=o.defaultColor??"#ffffff",this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new URt(this)}on(e,t){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=t,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class URt{constructor(e){this.plugin=e,this.currentMeasure=null,this.pickedSpaceMeasureSubscription=null,this.hitHelperMouseMoveSubscription=null}activate(){const{plugin:e}=this,{viewer:t}=e;this.pickedSpaceMeasureSubscription=t.scene.input.on("mouseclicked",()=>{if(!this.currentMeasure?.length)return;const o=this.currentMeasure;this.currentMeasure=null,Object.values(this.plugin.measurementEndCallbacks).forEach(n=>n(o))}),this.hitHelperMouseMoveSubscription=t.scene.input.on("mousemove",o=>{const n=t.scene.pick({canvasPos:o,pickSurface:!0});n?.entity?.model&&(n?((!this.currentMeasure||this.currentMeasure.modelId!==n.entity.model.id)&&(this.currentMeasure?.destroy(),this.currentMeasure=new ORt(this.plugin,n)),this.currentMeasure.show(n)):this.currentMeasure?.hide())})}deactivate(){const{viewer:e}=this.plugin;this.currentMeasure?.destroy(),this.currentMeasure=null,e.scene.input.off(this.pickedSpaceMeasureSubscription),e.scene.input.off(this.hitHelperMouseMoveSubscription)}}const NRt=`onmessage = async event => {
|
|
1378
|
+
}`}function zJ(i,e=!0,t){const o=t||new Set;if(i){if(qJ(i))o.add(i);else if(qJ(i.buffer))o.add(i.buffer);else if(!ArrayBuffer.isView(i)&&e&&typeof i=="object")for(const n in i)zJ(i[n],e,o)}return t===void 0?Array.from(o):[]}function qJ(i){return i?i instanceof ArrayBuffer||typeof MessagePort<"u"&&i instanceof MessagePort||typeof ImageBitmap<"u"&&i instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas:!1}const fE=()=>{};class AE{name;source;url;terminated=!1;worker;onMessage;onError;_loadableURL="";static isSupported(){return typeof Worker<"u"&&ba||typeof hE<"u"&&!ba}constructor(e){const{name:t,source:o,url:n}=e;ql(o||n),this.name=t,this.source=o,this.url=n,this.onMessage=fE,this.onError=r=>console.log(r),this.worker=ba?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=fE,this.onError=fE,this.worker.terminate(),this.terminated=!0}get isRunning(){return!!this.onMessage}postMessage(e,t){t=t||zJ(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+=`worker ${this.name} from ${this.url}. `,e.message&&(t+=`${e.message} in `),e.lineno&&(t+=`:${e.lineno}:${e.colno}`),new Error(t)}_createBrowserWorker(){this._loadableURL=Lxt({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=t=>{t.data?this.onMessage(t.data):this.onError(new Error("No data received"))},e.onerror=t=>{this.onError(this._getErrorFromErrorEvent(t)),this.terminated=!0},e.onmessageerror=t=>console.error(t),e}_createNodeWorker(){let e;if(this.url){const t=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;e=new hE(t,{eval:!1})}else if(this.source)e=new hE(this.source,{eval:!0});else throw new Error("no worker");return e.on("message",t=>{this.onMessage(t)}),e.on("error",t=>{this.onError(t)}),e.on("exit",t=>{}),e}}class Fxt{name="unnamed";source;url;maxConcurrency=1;maxMobileConcurrency=1;onDebug=()=>{};reuseWorkers=!0;props={};jobQueue=[];idleQueue=[];count=0;isDestroyed=!1;static isSupported(){return AE.isSupported()}constructor(e){this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},e.name!==void 0&&(this.name=e.name),e.maxConcurrency!==void 0&&(this.maxConcurrency=e.maxConcurrency),e.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=e.maxMobileConcurrency),e.reuseWorkers!==void 0&&(this.reuseWorkers=e.reuseWorkers),e.onDebug!==void 0&&(this.onDebug=e.onDebug)}async startJob(e,t=(n,r,a)=>n.done(a),o=(n,r)=>n.error(r)){const n=new Promise(r=>(this.jobQueue.push({name:e,onMessage:t,onError:o,onStart:r}),this));return this._startQueuedJob(),await n}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const o=new Rxt(t.name,e);e.onMessage=n=>t.onMessage(o,n.type,n.payload),e.onError=n=>t.onError(o,n),t.onStart(o);try{await o.result}catch(n){console.error(`Worker exception: ${n}`)}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){!ba||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new AE({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return Txt?this.maxMobileConcurrency:this.maxConcurrency}}const Oxt={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}};class Dd{props;workerPools=new Map;static _workerFarm;static isSupported(){return AE.isSupported()}static getWorkerFarm(e={}){return Dd._workerFarm=Dd._workerFarm||new Dd({}),Dd._workerFarm.setProps(e),Dd._workerFarm}constructor(e){this.props={...Oxt},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const t of this.workerPools.values())t.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:o,url:n}=e;let r=this.workerPools.get(t);return r||(r=new Fxt({name:t,source:o,url:n}),r.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,r)),r}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}function Uxt(i,e={}){const t=e[i.id]||{},o=ba?`${i.id}-worker.js`:`${i.id}-worker-node.js`;let n=t.workerUrl;if(!n&&i.id==="compression"&&(n=e.workerUrl),e._workerType==="test"&&(ba?n=`modules/${i.module}/dist/${o}`:n=`modules/${i.module}/src/workers/${i.id}-worker-node.ts`),!n){let r=i.version;r==="latest"&&(r=Ixt);const a=r?`@${r}`:"";n=`https://unpkg.com/@loaders.gl/${i.module}${a}/dist/${o}`}return ql(n),n}function Nxt(i,e=jJ){ql(i,"no worker provided");const t=i.version;return!(!e||!t)}const gE={};async function Iu(i,e=null,t={},o=null){return e&&(i=jxt(i,e,t,o)),gE[i]=gE[i]||Vxt(i),await gE[i]}function jxt(i,e,t={},o=null){if(!t.useLocalLibraries&&i.startsWith("http"))return i;o=o||i;const n=t.modules||{};return n[o]?n[o]:ba?t.CDN?(ql(t.CDN.startsWith("http")),`${t.CDN}/${e}@${jJ}/dist/libs/${o}`):uE?`../src/libs/${o}`:`modules/${e}/src/libs/${o}`:`modules/${e}/dist/libs/${o}`}async function Vxt(i){if(i.endsWith("wasm"))return await zxt(i);if(!ba)try{const{requireFromFile:t}=globalThis.loaders||{};return await t?.(i)}catch(t){return console.error(t),null}if(uE)return importScripts(i);const e=await qxt(i);return Hxt(e,i)}function Hxt(i,e){if(!ba){const{requireFromString:o}=globalThis.loaders||{};return o?.(i,e)}if(uE)return eval.call(globalThis,i),null;const t=document.createElement("script");t.id=e;try{t.appendChild(document.createTextNode(i))}catch{t.text=i}return document.body.appendChild(t),null}async function zxt(i){const{readFileAsArrayBuffer:e}=globalThis.loaders||{};return ba||!e||i.startsWith("http")?await(await fetch(i)).arrayBuffer():await e(i)}async function qxt(i){const{readFileAsText:e}=globalThis.loaders||{};return ba||!e||i.startsWith("http")?await(await fetch(i)).text():await e(i)}function Qxt(i,e){return!Dd.isSupported()||!ba&&!e?._nodeWorkers?!1:i.worker&&e?.worker}async function Gxt(i,e,t,o,n){const r=i.id,a=Uxt(i,t),s=Dd.getWorkerFarm(t).getWorkerPool({name:r,url:a});t=JSON.parse(JSON.stringify(t)),o=JSON.parse(JSON.stringify(o||{}));const l=await s.startJob("process-on-worker",Kxt.bind(null,n));return l.postMessage("process",{input:e,options:t,context:o}),await(await l.result).result}async function Kxt(i,e,t,o){switch(t){case"done":e.done(o);break;case"error":e.error(new Error(o.error));break;case"process":const{id:n,input:r,options:a}=o;try{const s=await i(r,a);e.postMessage("done",{id:n,result:s})}catch(s){const l=s instanceof Error?s.message:"unknown error";e.postMessage("error",{id:n,error:l})}break;default:console.warn(`parse-with-worker unknown message ${t}`)}}function Jxt(i,e=5){return typeof i=="string"?i.slice(0,e):ArrayBuffer.isView(i)?QJ(i.buffer,i.byteOffset,e):i instanceof ArrayBuffer?QJ(i,0,e):""}function QJ(i,e,t){if(i.byteLength<=e+t)return"";const o=new DataView(i);let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(o.getUint8(e+r));return n}function Zxt(i){try{return JSON.parse(i)}catch{throw new Error(`Failed to parse JSON from data starting with "${Jxt(i)}"`)}}function Wxt(i,e,t){if(t=t||i.byteLength,i.byteLength<t||e.byteLength<t)return!1;const o=new Uint8Array(i),n=new Uint8Array(e);for(let r=0;r<o.length;++r)if(o[r]!==n[r])return!1;return!0}function Yxt(...i){return Xxt(i)}function Xxt(i){const e=i.map(r=>r instanceof ArrayBuffer?new Uint8Array(r):r),t=e.reduce((r,a)=>r+a.byteLength,0),o=new Uint8Array(t);let n=0;for(const r of e)o.set(r,n),n+=r.byteLength;return o.buffer}function GJ(i,e,t){const o=t!==void 0?new Uint8Array(i).subarray(e,e+t):new Uint8Array(i).subarray(e);return new Uint8Array(o).buffer}function Iv(i,e){return zl(i>=0),zl(e>0),i+(e-1)&-4}function $xt(i,e,t){let o;if(i instanceof ArrayBuffer)o=new Uint8Array(i);else{const n=i.byteOffset,r=i.byteLength;o=new Uint8Array(i.buffer||i.arrayBuffer,n,r)}return e.set(o,t),t+Iv(o.byteLength,4)}async function ekt(i){const e=[];for await(const t of i)e.push(t);return Yxt(...e)}let tkt="";const KJ={};function ikt(i){for(const e in KJ)if(i.startsWith(e)){const t=KJ[e];i=i.replace(e,t)}return!i.startsWith("http://")&&!i.startsWith("https://")&&(i=`${tkt}${i}`),i}function okt(i){return i&&typeof i=="object"&&i.isBuffer}function JJ(i){if(okt(i)||i instanceof ArrayBuffer)return i;if(ArrayBuffer.isView(i))return i.byteOffset===0&&i.byteLength===i.buffer.byteLength?i.buffer:i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength);if(typeof i=="string"){const e=i;return new TextEncoder().encode(e).buffer}if(i&&typeof i=="object"&&i._toArrayBuffer)return i._toArrayBuffer();throw new Error("toArrayBuffer")}function ZJ(i){const e=i?i.lastIndexOf("/"):-1;return e>=0?i.substr(e+1):""}function rkt(i){const e=i?i.lastIndexOf("/"):-1;return e>=0?i.substr(0,e):""}const nkt=i=>typeof i=="boolean",Sv=i=>typeof i=="function",Tv=i=>i!==null&&typeof i=="object",WJ=i=>Tv(i)&&i.constructor==={}.constructor,akt=i=>!!i&&typeof i[Symbol.iterator]=="function",skt=i=>i&&typeof i[Symbol.asyncIterator]=="function",Su=i=>typeof Response<"u"&&i instanceof Response||i&&i.arrayBuffer&&i.text&&i.json,qp=i=>typeof Blob<"u"&&i instanceof Blob,lkt=i=>i&&typeof i=="object"&&i.isBuffer,ckt=i=>typeof ReadableStream<"u"&&i instanceof ReadableStream||Tv(i)&&Sv(i.tee)&&Sv(i.cancel)&&Sv(i.getReader),dkt=i=>Tv(i)&&Sv(i.read)&&Sv(i.pipe)&&nkt(i.readable),YJ=i=>ckt(i)||dkt(i);class ukt extends Error{constructor(e,t){super(e),this.reason=t.reason,this.url=t.url,this.response=t.response}reason;url;response}const hkt=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,pkt=/^([-\w.]+\/[-\w.+]+)/;function XJ(i,e){return i.toLowerCase()===e.toLowerCase()}function fkt(i){const e=pkt.exec(i);return e?e[1]:i}function $J(i){const e=hkt.exec(i);return e?e[1]:""}const eZ=/\?.*/;function Akt(i){const e=i.match(eZ);return e&&e[0]}function mE(i){return i.replace(eZ,"")}function gkt(i){if(i.length<50)return i;const e=i.slice(i.length-15);return`${i.substr(0,32)}...${e}`}function Hy(i){return Su(i)?i.url:qp(i)?i.name||"":typeof i=="string"?i:""}function vE(i){if(Su(i)){const e=i,t=e.headers.get("content-type")||"",o=mE(e.url);return fkt(t)||$J(o)}return qp(i)?i.type||"":typeof i=="string"?$J(i):""}function mkt(i){return Su(i)?i.headers["content-length"]||-1:qp(i)?i.size:typeof i=="string"?i.length:i instanceof ArrayBuffer||ArrayBuffer.isView(i)?i.byteLength:-1}async function tZ(i){if(Su(i))return i;const e={},t=mkt(i);t>=0&&(e["content-length"]=String(t));const o=Hy(i),n=vE(i);n&&(e["content-type"]=n);const r=await bkt(i);r&&(e["x-first-bytes"]=r),typeof i=="string"&&(i=new TextEncoder().encode(i));const a=new Response(i,{headers:e});return Object.defineProperty(a,"url",{value:o}),a}async function vkt(i){if(!i.ok)throw await ykt(i)}async function ykt(i){const e=gkt(i.url);let t=`Failed to fetch resource (${i.status}) ${i.statusText}: ${e}`;t=t.length>100?`${t.slice(0,100)}...`:t;const o={reason:i.statusText,url:i.url,response:i};try{const n=i.headers.get("Content-Type");o.reason=!i.bodyUsed&&n?.includes("application/json")?await i.json():await i.text()}catch{}return new ukt(t,o)}async function bkt(i){if(typeof i=="string")return`data:,${i.slice(0,5)}`;if(i instanceof Blob){const e=i.slice(0,5);return await new Promise(t=>{const o=new FileReader;o.onload=n=>t(n?.target?.result),o.readAsDataURL(e)})}if(i instanceof ArrayBuffer){const e=i.slice(0,5);return`data:base64,${wkt(e)}`}return null}function wkt(i){let e="";const t=new Uint8Array(i);for(let o=0;o<t.byteLength;o++)e+=String.fromCharCode(t[o]);return btoa(e)}function Ckt(i){return!xkt(i)&&!kkt(i)}function xkt(i){return i.startsWith("http:")||i.startsWith("https:")}function kkt(i){return i.startsWith("data:")}async function iZ(i,e){if(typeof i=="string"){const t=ikt(i);return Ckt(t)&&globalThis.loaders?.fetchNode?globalThis.loaders?.fetchNode(t,e):await fetch(t,e)}return await tZ(i)}const oZ=new cE({id:"loaders.gl"});class Mkt{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}class Bkt{console;constructor(){this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}}const rZ={fetch:null,mimeType:void 0,nothrow:!1,log:new Bkt,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:jy,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},Ekt={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function nZ(){globalThis.loaders=globalThis.loaders||{};const{loaders:i}=globalThis;return i._state||(i._state={}),i._state}function aZ(){const i=nZ();return i.globalOptions=i.globalOptions||{...rZ},i.globalOptions}function Pkt(i,e,t,o){return t=t||[],t=Array.isArray(t)?t:[t],Ikt(i,t),Tkt(e,i,o)}function Ikt(i,e){sZ(i,null,rZ,Ekt,e);for(const t of e){const o=i&&i[t.id]||{},n=t.options&&t.options[t.id]||{},r=t.deprecatedOptions&&t.deprecatedOptions[t.id]||{};sZ(o,t.id,n,r,e)}}function sZ(i,e,t,o,n){const r=e||"Top level",a=e?`${e}.`:"";for(const s in i){const l=!e&&Tv(i[s]),c=s==="baseUri"&&!e,d=s==="workerUrl"&&e;if(!(s in t)&&!c&&!d){if(s in o)oZ.warn(`${r} loader option '${a}${s}' no longer supported, use '${o[s]}'`)();else if(!l){const u=Skt(s,n);oZ.warn(`${r} loader option '${a}${s}' not recognized. ${u}`)()}}}}function Skt(i,e){const t=i.toLowerCase();let o="";for(const n of e)for(const r in n.options){if(i===r)return`Did you mean '${n.id}.${r}'?`;const a=r.toLowerCase();(t.startsWith(a)||a.startsWith(t))&&(o=o||`Did you mean '${n.id}.${r}'?`)}return o}function Tkt(i,e,t){const o={...i.options||{}};return Rkt(o,t),o.log===null&&(o.log=new Mkt),lZ(o,aZ()),lZ(o,e),o}function lZ(i,e){for(const t in e)if(t in e){const o=e[t];WJ(o)&&WJ(i[t])?i[t]={...i[t],...e[t]}:i[t]=e[t]}}function Rkt(i,e){e&&!("baseUri"in i)&&(i.baseUri=e)}function cZ(i){return i?(Array.isArray(i)&&(i=i[0]),Array.isArray(i?.extensions)):!1}function dZ(i){zl(i,"null loader"),zl(cZ(i),"invalid loader");let e;return Array.isArray(i)&&(e=i[1],i=i[0],i={...i,options:{...i.options,...e}}),(i?.parseTextSync||i?.parseText)&&(i.text=!0),i.text||(i.binary=!0),i}const Lkt=()=>{const i=nZ();return i.loaderRegistry=i.loaderRegistry||[],i.loaderRegistry};function Dkt(){return Lkt()}const _kt=/\.([^.]+)$/;async function Fkt(i,e=[],t,o){if(!hZ(i))return null;let n=uZ(i,e,{...t,nothrow:!0},o);if(n)return n;if(qp(i)&&(i=await i.slice(0,10).arrayBuffer(),n=uZ(i,e,t,o)),!n&&!t?.nothrow)throw new Error(pZ(i));return n}function uZ(i,e=[],t,o){if(!hZ(i))return null;if(e&&!Array.isArray(e))return dZ(e);let n=[];e&&(n=n.concat(e)),t?.ignoreRegisteredLoaders||n.push(...Dkt()),Ukt(n);const r=Okt(i,n,t,o);if(!r&&!t?.nothrow)throw new Error(pZ(i));return r}function Okt(i,e,t,o){const n=Hy(i),r=vE(i),a=mE(n)||o?.url;let s=null,l="";return t?.mimeType&&(s=yE(e,t?.mimeType),l=`match forced by supplied MIME type ${t?.mimeType}`),s=s||Nkt(e,a),l=l||(s?`matched url ${a}`:""),s=s||yE(e,r),l=l||(s?`matched MIME type ${r}`:""),s=s||Vkt(e,i),l=l||(s?`matched initial data ${AZ(i)}`:""),t?.fallbackMimeType&&(s=s||yE(e,t?.fallbackMimeType),l=l||(s?`matched fallback MIME type ${r}`:"")),l&&Mxt.log(1,`selectLoader selected ${s?.name}: ${l}.`),s}function hZ(i){return!(i instanceof Response&&i.status===204)}function pZ(i){const e=Hy(i),t=vE(i);let o="No valid loader found (";o+=e?`${ZJ(e)}, `:"no url provided, ",o+=`MIME type: ${t?`"${t}"`:"not provided"}, `;const n=i?AZ(i):"";return o+=n?` first bytes: "${n}"`:"first bytes: not available",o+=")",o}function Ukt(i){for(const e of i)dZ(e)}function Nkt(i,e){const t=e&&_kt.exec(e),o=t&&t[1];return o?jkt(i,o):null}function jkt(i,e){e=e.toLowerCase();for(const t of i)for(const o of t.extensions)if(o.toLowerCase()===e)return t;return null}function yE(i,e){for(const t of i)if(t.mimeTypes?.some(o=>XJ(e,o))||XJ(e,`application/x.${t.id}`))return t;return null}function Vkt(i,e){if(!e)return null;for(const t of i)if(typeof e=="string"){if(Hkt(e,t))return t}else if(ArrayBuffer.isView(e)){if(fZ(e.buffer,e.byteOffset,t))return t}else if(e instanceof ArrayBuffer&&fZ(e,0,t))return t;return null}function Hkt(i,e){return e.testText?e.testText(i):(Array.isArray(e.tests)?e.tests:[e.tests]).some(t=>i.startsWith(t))}function fZ(i,e,t){return(Array.isArray(t.tests)?t.tests:[t.tests]).some(o=>zkt(i,e,t,o))}function zkt(i,e,t,o){if(o instanceof ArrayBuffer)return Wxt(o,i,o.byteLength);switch(typeof o){case"function":return o(i);case"string":const n=bE(i,e,o.length);return o===n;default:return!1}}function AZ(i,e=5){return typeof i=="string"?i.slice(0,e):ArrayBuffer.isView(i)?bE(i.buffer,i.byteOffset,e):i instanceof ArrayBuffer?bE(i,0,e):""}function bE(i,e,t){if(i.byteLength<e+t)return"";const o=new DataView(i);let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(o.getUint8(e+r));return n}const qkt=256*1024;function*Qkt(i,e){const t=e?.chunkSize||qkt;let o=0;const n=new TextEncoder;for(;o<i.length;){const r=Math.min(i.length-o,t),a=i.slice(o,o+r);o+=r,yield n.encode(a)}}const Gkt=256*1024;function*Kkt(i,e={}){const{chunkSize:t=Gkt}=e;let o=0;for(;o<i.byteLength;){const n=Math.min(i.byteLength-o,t),r=new ArrayBuffer(n),a=new Uint8Array(i,o,n);new Uint8Array(r).set(a),o+=n,yield r}}const Jkt=1024*1024;async function*Zkt(i,e){const t=e?.chunkSize||Jkt;let o=0;for(;o<i.size;){const n=o+t,r=await i.slice(o,n).arrayBuffer();o=n,yield r}}function gZ(i,e){return jy?Wkt(i,e):Ykt(i)}async function*Wkt(i,e){const t=i.getReader();let o;try{for(;;){const n=o||t.read();e?._streamReadAhead&&(o=t.read());const{done:r,value:a}=await n;if(r)return;yield JJ(a)}}catch{t.releaseLock()}}async function*Ykt(i,e){for await(const t of i)yield JJ(t)}function Xkt(i,e){if(typeof i=="string")return Qkt(i,e);if(i instanceof ArrayBuffer)return Kkt(i,e);if(qp(i))return Zkt(i,e);if(YJ(i))return gZ(i,e);if(Su(i))return gZ(i.body,e);throw new Error("makeIterator")}const mZ="Cannot convert supplied data type";function $kt(i,e,t){if(e.text&&typeof i=="string")return i;if(lkt(i)&&(i=i.buffer),i instanceof ArrayBuffer){const o=i;return e.text&&!e.binary?new TextDecoder("utf8").decode(o):o}if(ArrayBuffer.isView(i)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(i);let o=i.buffer;const n=i.byteLength||i.length;return(i.byteOffset!==0||n!==o.byteLength)&&(o=o.slice(i.byteOffset,i.byteOffset+n)),o}throw new Error(mZ)}async function eMt(i,e,t){const o=i instanceof ArrayBuffer||ArrayBuffer.isView(i);if(typeof i=="string"||o)return $kt(i,e);if(qp(i)&&(i=await tZ(i)),Su(i)){const n=i;return await vkt(n),e.binary?await n.arrayBuffer():await n.text()}if(YJ(i)&&(i=Xkt(i,t)),akt(i)||skt(i))return ekt(i);throw new Error(mZ)}function tMt(i,e){const t=aZ(),o=i||t;return typeof o.fetch=="function"?o.fetch:Tv(o.fetch)?n=>iZ(n,o.fetch):e?.fetch?e?.fetch:iZ}function iMt(i,e,t){if(t)return t;const o={fetch:tMt(e,i),...i};if(o.url){const n=mE(o.url);o.baseUrl=n,o.queryString=Akt(o.url),o.filename=ZJ(n),o.baseUrl=rkt(n)}return Array.isArray(o.loaders)||(o.loaders=null),o}function oMt(i,e){if(i&&!Array.isArray(i))return i;let t;if(i&&(t=Array.isArray(i)?i:[i]),e&&e.loaders){const o=Array.isArray(e.loaders)?e.loaders:[e.loaders];t=t?[...t,...o]:o}return t&&t.length?t:void 0}async function wE(i,e,t,o){e&&!Array.isArray(e)&&!cZ(e)&&(o=void 0,t=e,e=void 0),i=await i,t=t||{};const n=Hy(i),r=oMt(e,o),a=await Fkt(i,r,t);return a?(t=Pkt(t,a,r,n),o=iMt({url:n,_parse:wE,loaders:r},t,o||null),await rMt(a,i,t,o)):null}async function rMt(i,e,t,o){if(Nxt(i),t=Bxt(i.options,t),Su(e)){const r=e,{ok:a,redirected:s,status:l,statusText:c,type:d,url:u}=r,h=Object.fromEntries(r.headers.entries());o.response={headers:h,ok:a,redirected:s,status:l,statusText:c,type:d,url:u}}e=await eMt(e,i,t);const n=i;if(n.parseTextSync&&typeof e=="string")return n.parseTextSync(e,t,o);if(Qxt(i,t))return await Gxt(i,e,t,o,wE);if(n.parseText&&typeof e=="string")return await n.parseText(e,t,o);if(n.parse)return await n.parse(e,t,o);throw ql(!n.parseSync),new Error(`${i.id} loader - no parser found and worker is disabled`)}function nMt(i){switch(i.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function aMt(i){let e=1/0,t=1/0,o=1/0,n=-1/0,r=-1/0,a=-1/0;const s=i.POSITION?i.POSITION.value:[],l=s&&s.length;for(let c=0;c<l;c+=3){const d=s[c],u=s[c+1],h=s[c+2];e=d<e?d:e,t=u<t?u:t,o=h<o?h:o,n=d>n?d:n,r=u>r?u:r,a=h>a?h:a}return[[e,t,o],[n,r,a]]}function sMt(i,e,t){const o=nMt(e.value),n=t||lMt(e);return{name:i,type:{type:"fixed-size-list",listSize:e.size,children:[{name:"value",type:o}]},nullable:!1,metadata:n}}function lMt(i){const e={};return"byteOffset"in i&&(e.byteOffset=i.byteOffset.toString(10)),"byteStride"in i&&(e.byteStride=i.byteStride.toString(10)),"normalized"in i&&(e.normalized=i.normalized.toString()),e}const cMt="4.3.3",dMt=globalThis.loaders?.parseImageNode,CE=typeof Image<"u",xE=typeof ImageBitmap<"u",uMt=!!dMt,kE=jy?!0:uMt;function hMt(i){switch(i){case"auto":return xE||CE||kE;case"imagebitmap":return xE;case"image":return CE;case"data":return kE;default:throw new Error(`@loaders.gl/images: image ${i} not supported in this environment`)}}function pMt(){if(xE)return"imagebitmap";if(CE)return"image";if(kE)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function fMt(i){const e=AMt(i);if(!e)throw new Error("Not an image");return e}function vZ(i){switch(fMt(i)){case"data":return i;case"image":case"imagebitmap":const e=document.createElement("canvas"),t=e.getContext("2d");if(!t)throw new Error("getImageData");return e.width=i.width,e.height=i.height,t.drawImage(i,0,0),t.getImageData(0,0,i.width,i.height);default:throw new Error("getImageData")}}function AMt(i){return typeof ImageBitmap<"u"&&i instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&i instanceof Image?"image":i&&typeof i=="object"&&i.data&&i.width&&i.height?"data":null}const gMt=/^data:image\/svg\+xml/,mMt=/\.svg((\?|#).*)?$/;function ME(i){return i&&(gMt.test(i)||mMt.test(i))}function vMt(i,e){if(ME(e)){let t=new TextDecoder().decode(i);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(t=unescape(encodeURIComponent(t)))}catch(o){throw new Error(o.message)}return`data:image/svg+xml;base64,${btoa(t)}`}return yZ(i,e)}function yZ(i,e){if(ME(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(i)])}async function bZ(i,e,t){const o=vMt(i,t),n=self.URL||self.webkitURL,r=typeof o!="string"&&n.createObjectURL(o);try{return await yMt(r||o,e)}finally{r&&n.revokeObjectURL(r)}}async function yMt(i,e){const t=new Image;return t.src=i,e.image&&e.image.decode&&t.decode?(await t.decode(),t):await new Promise((o,n)=>{try{t.onload=()=>o(t),t.onerror=r=>{const a=r instanceof Error?r.message:"error";n(new Error(a))}}catch(r){n(r)}})}const bMt={};let wZ=!0;async function wMt(i,e,t){let o;ME(t)?o=await bZ(i,e,t):o=yZ(i,t);const n=e&&e.imagebitmap;return await CMt(o,n)}async function CMt(i,e=null){if((xMt(e)||!wZ)&&(e=null),e)try{return await createImageBitmap(i,e)}catch(t){console.warn(t),wZ=!1}return await createImageBitmap(i)}function xMt(i){for(const e in i||bMt)return!1;return!0}function kMt(i){return!PMt(i,"ftyp",4)||(i[8]&96)===0?null:MMt(i)}function MMt(i){switch(BMt(i,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function BMt(i,e,t){return String.fromCharCode(...i.slice(e,t))}function EMt(i){return[...i].map(e=>e.charCodeAt(0))}function PMt(i,e,t=0){const o=EMt(e);for(let n=0;n<o.length;++n)if(o[n]!==i[n+t])return!1;return!0}const Hs=!1,Rv=!0;function BE(i){const e=Lv(i);return SMt(e)||LMt(e)||TMt(e)||RMt(e)||IMt(e)}function IMt(i){const e=new Uint8Array(i instanceof DataView?i.buffer:i),t=kMt(e);return t?{mimeType:t.mimeType,width:0,height:0}:null}function SMt(i){const e=Lv(i);return e.byteLength>=24&&e.getUint32(0,Hs)===2303741511?{mimeType:"image/png",width:e.getUint32(16,Hs),height:e.getUint32(20,Hs)}:null}function TMt(i){const e=Lv(i);return e.byteLength>=10&&e.getUint32(0,Hs)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,Rv),height:e.getUint16(8,Rv)}:null}function RMt(i){const e=Lv(i);return e.byteLength>=14&&e.getUint16(0,Hs)===16973&&e.getUint32(2,Rv)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,Rv),height:e.getUint32(22,Rv)}:null}function LMt(i){const e=Lv(i);if(!(e.byteLength>=3&&e.getUint16(0,Hs)===65496&&e.getUint8(2)===255))return null;const{tableMarkers:t,sofMarkers:o}=DMt();let n=2;for(;n+9<e.byteLength;){const r=e.getUint16(n,Hs);if(o.has(r))return{mimeType:"image/jpeg",height:e.getUint16(n+5,Hs),width:e.getUint16(n+7,Hs)};if(!t.has(r))return null;n+=2,n+=e.getUint16(n,Hs)}return null}function DMt(){const i=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)i.add(e);return{tableMarkers:i,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function Lv(i){if(i instanceof DataView)return i;if(ArrayBuffer.isView(i))return new DataView(i.buffer);if(i instanceof ArrayBuffer)return new DataView(i);throw new Error("toDataView")}async function _Mt(i,e){const{mimeType:t}=BE(i)||{},o=globalThis.loaders?.parseImageNode;return zl(o),await o(i,t)}async function FMt(i,e,t){e=e||{};const o=(e.image||{}).type||"auto",{url:n}=t||{},r=OMt(o);let a;switch(r){case"imagebitmap":a=await wMt(i,e,n);break;case"image":a=await bZ(i,e,n);break;case"data":a=await _Mt(i);break;default:zl(!1)}return o==="data"&&(a=vZ(a)),a}function OMt(i){switch(i){case"auto":case"data":return pMt();default:return hMt(i),i}}const UMt=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],NMt=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],jMt={image:{type:"auto",decode:!0}},VMt={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:cMt,mimeTypes:NMt,extensions:UMt,parse:FMt,tests:[i=>!!BE(new DataView(i))],options:jMt},EE={};function HMt(i){if(EE[i]===void 0){const e=jy?qMt(i):zMt(i);EE[i]=e}return EE[i]}function zMt(i){const e=["image/png","image/jpeg","image/gif"],t=globalThis.loaders?.imageFormatsNode||e;return!!globalThis.loaders?.parseImageNode&&t.includes(i)}function qMt(i){switch(i){case"image/avif":case"image/webp":return QMt(i);default:return!0}}function QMt(i){try{return document.createElement("canvas").toDataURL(i).indexOf(`data:${i}`)===0}catch{return!1}}function Yn(i,e){if(!i)throw new Error(e||"assert failed: gltf")}const CZ={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},xZ={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},kZ=["SCALAR","VEC2","VEC3","VEC4"],GMt=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],KMt=new Map(GMt),JMt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ZMt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},WMt={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function MZ(i){return kZ[i-1]||kZ[0]}function zy(i){const e=KMt.get(i.constructor);if(!e)throw new Error("Illegal typed array");return e}function PE(i,e){const t=WMt[i.componentType],o=JMt[i.type],n=ZMt[i.componentType],r=i.count*o,a=i.count*o*n;Yn(a>=0&&a<=e.byteLength);const s=xZ[i.componentType],l=CZ[i.type];return{ArrayType:t,length:r,byteLength:a,componentByteSize:s,numberOfComponentsInElement:l}}function YMt(i,e,t){const o=i.bufferViews[t];Yn(o);const n=o.buffer,r=e[n];Yn(r);const a=(o.byteOffset||0)+r.byteOffset;return new Uint8Array(r.arrayBuffer,a,o.byteLength)}function XMt(i,e,t){const o=typeof t=="number"?i.accessors?.[t]:t;if(!o)throw new Error(`No gltf accessor ${JSON.stringify(t)}`);const n=i.bufferViews?.[o.bufferView||0];if(!n)throw new Error(`No gltf buffer view for accessor ${n}`);const{arrayBuffer:r,byteOffset:a}=e[n.buffer],s=(a||0)+(o.byteOffset||0)+(n.byteOffset||0),{ArrayType:l,length:c,componentByteSize:d,numberOfComponentsInElement:u}=PE(o,n),h=d*u,p=n.byteStride||h;if(typeof n.byteStride>"u"||n.byteStride===h)return new l(r,s,c);const A=new l(c);for(let f=0;f<o.count;f++){const m=new l(r,s+f*p,u);A.set(m,f*u)}return A}function $Mt(){return{asset:{version:"2.0",generator:"loaders.gl"},buffers:[],extensions:{},extensionsRequired:[],extensionsUsed:[]}}class gr{gltf;sourceBuffers;byteLength;constructor(e){this.gltf={json:e?.json||$Mt(),buffers:e?.buffers||[],images:e?.images||[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(e){return this.json[e]}getExtraData(e){return(this.json.extras||{})[e]}hasExtension(e){const t=this.getUsedExtensions().find(n=>n===e),o=this.getRequiredExtensions().find(n=>n===e);return typeof t=="string"||typeof o=="string"}getExtension(e){const t=this.getUsedExtensions().find(n=>n===e),o=this.json.extensions||{};return t?o[e]:null}getRequiredExtension(e){return this.getRequiredExtensions().find(t=>t===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(e,t){return(e.extensions||{})[t]}getScene(e){return this.getObject("scenes",e)}getNode(e){return this.getObject("nodes",e)}getSkin(e){return this.getObject("skins",e)}getMesh(e){return this.getObject("meshes",e)}getMaterial(e){return this.getObject("materials",e)}getAccessor(e){return this.getObject("accessors",e)}getTexture(e){return this.getObject("textures",e)}getSampler(e){return this.getObject("samplers",e)}getImage(e){return this.getObject("images",e)}getBufferView(e){return this.getObject("bufferViews",e)}getBuffer(e){return this.getObject("buffers",e)}getObject(e,t){if(typeof t=="object")return t;const o=this.json[e]&&this.json[e][t];if(!o)throw new Error(`glTF file error: Could not find ${e}[${t}]`);return o}getTypedArrayForBufferView(e){e=this.getBufferView(e);const t=e.buffer,o=this.gltf.buffers[t];Yn(o);const n=(e.byteOffset||0)+o.byteOffset;return new Uint8Array(o.arrayBuffer,n,e.byteLength)}getTypedArrayForAccessor(e){const t=this.getAccessor(e);return XMt(this.gltf.json,this.gltf.buffers,t)}getTypedArrayForImageData(e){e=this.getAccessor(e);const t=this.getBufferView(e.bufferView),o=this.getBuffer(t.buffer).data,n=t.byteOffset||0;return new Uint8Array(o,n,t.byteLength)}addApplicationData(e,t){return this.json[e]=t,this}addExtraData(e,t){return this.json.extras=this.json.extras||{},this.json.extras[e]=t,this}addObjectExtension(e,t,o){return e.extensions=e.extensions||{},e.extensions[t]=o,this.registerUsedExtension(t),this}setObjectExtension(e,t,o){const n=e.extensions||{};n[t]=o}removeObjectExtension(e,t){const o=e?.extensions||{};if(o[t]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const n=this.json.extensionsRemoved;n.includes(t)||n.push(t)}delete o[t]}addExtension(e,t={}){return Yn(t),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=t,this.registerUsedExtension(e),t}addRequiredExtension(e,t={}){return Yn(t),this.addExtension(e,t),this.registerRequiredExtension(e),t}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(t=>t===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(t=>t===e)||this.json.extensionsRequired.push(e)}removeExtension(e){if(this.json.extensions?.[e]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const t=this.json.extensionsRemoved;t.includes(e)||t.push(e)}this.json.extensions&&delete this.json.extensions[e],this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e)}setDefaultScene(e){this.json.scene=e}addScene(e){const{nodeIndices:t}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:t}),this.json.scenes.length-1}addNode(e){const{meshIndex:t,matrix:o}=e;this.json.nodes=this.json.nodes||[];const n={mesh:t};return o&&(n.matrix=o),this.json.nodes.push(n),this.json.nodes.length-1}addMesh(e){const{attributes:t,indices:o,material:n,mode:r=4}=e,a={primitives:[{attributes:this._addAttributes(t),mode:r}]};if(o){const s=this._addIndices(o);a.primitives[0].indices=s}return Number.isFinite(n)&&(a.primitives[0].material=n),this.json.meshes=this.json.meshes||[],this.json.meshes.push(a),this.json.meshes.length-1}addPointCloud(e){const t={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(t),this.json.meshes.length-1}addImage(e,t){const o=BE(e),n=t||o?.mimeType,r={bufferView:this.addBufferView(e),mimeType:n};return this.json.images=this.json.images||[],this.json.images.push(r),this.json.images.length-1}addBufferView(e,t=0,o=this.byteLength){const n=e.byteLength;Yn(Number.isFinite(n)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);const r={buffer:t,byteOffset:o,byteLength:n};return this.byteLength+=Iv(n,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(r),this.json.bufferViews.length-1}addAccessor(e,t){const o={bufferView:e,type:MZ(t.size),componentType:t.componentType,count:t.count,max:t.max,min:t.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(o),this.json.accessors.length-1}addBinaryBuffer(e,t={size:3}){const o=this.addBufferView(e);let n={min:t.min,max:t.max};(!n.min||!n.max)&&(n=this._getAccessorMinMax(e,t.size));const r={size:t.size,componentType:zy(e),count:Math.round(e.length/t.size),min:n.min,max:n.max};return this.addAccessor(o,Object.assign(r,t))}addTexture(e){const{imageIndex:t}=e,o={source:t};return this.json.textures=this.json.textures||[],this.json.textures.push(o),this.json.textures.length-1}addMaterial(e){return this.json.materials=this.json.materials||[],this.json.materials.push(e),this.json.materials.length-1}createBinaryChunk(){const e=this.byteLength,t=new ArrayBuffer(e),o=new Uint8Array(t);let n=0;for(const r of this.sourceBuffers||[])n=$xt(r,o,n);this.json?.buffers?.[0]?this.json.buffers[0].byteLength=e:this.json.buffers=[{byteLength:e}],this.gltf.binary=t,this.sourceBuffers=[t],this.gltf.buffers=[{arrayBuffer:t,byteOffset:0,byteLength:t.byteLength}]}_removeStringFromArray(e,t){let o=!0;for(;o;){const n=e.indexOf(t);n>-1?e.splice(n,1):o=!1}}_addAttributes(e={}){const t={};for(const o in e){const n=e[o],r=this._getGltfAttributeName(o),a=this.addBinaryBuffer(n.value,n);t[r]=a}return t}_addIndices(e){return this.addBinaryBuffer(e,{size:1})}_getGltfAttributeName(e){switch(e.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return e}}_getAccessorMinMax(e,t){const o={min:null,max:null};if(e.length<t)return o;o.min=[],o.max=[];const n=e.subarray(0,t);for(const r of n)o.min.push(r),o.max.push(r);for(let r=t;r<e.length;r+=t)for(let a=0;a<t;a++)o.min[0+a]=Math.min(o.min[0+a],e[r+a]),o.max[0+a]=Math.max(o.max[0+a],e[r+a]);return o}}function BZ(i){return(i%1+1)%1}const EZ={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16,BOOLEAN:1,STRING:1,ENUM:1},eBt={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:BigInt64Array,UINT64:BigUint64Array,FLOAT32:Float32Array,FLOAT64:Float64Array},PZ={INT8:1,UINT8:1,INT16:2,UINT16:2,INT32:4,UINT32:4,INT64:8,UINT64:8,FLOAT32:4,FLOAT64:8};function IE(i,e){return PZ[e]*EZ[i]}function qy(i,e,t,o){if(t!=="UINT8"&&t!=="UINT16"&&t!=="UINT32"&&t!=="UINT64")return null;const n=i.getTypedArrayForBufferView(e),r=Qy(n,"SCALAR",t,o+1);return r instanceof BigInt64Array||r instanceof BigUint64Array?null:r}function Qy(i,e,t,o=1){const n=EZ[e],r=eBt[t],a=PZ[t],s=o*n,l=s*a;let c=i.buffer,d=i.byteOffset;return d%a!==0&&(c=new Uint8Array(c).slice(d,d+l).buffer,d=0),new r(c,d,s)}function SE(i,e,t){const o=`TEXCOORD_${e.texCoord||0}`,n=t.attributes[o],r=i.getTypedArrayForAccessor(n),a=i.gltf.json,s=e.index,l=a.textures?.[s]?.source;if(typeof l<"u"){const c=a.images?.[l]?.mimeType,d=i.gltf.images?.[l];if(d&&typeof d.width<"u"){const u=[];for(let h=0;h<r.length;h+=2){const p=tBt(d,c,r,h,e.channels);u.push(p)}return u}}return[]}function IZ(i,e,t,o,n){if(!t?.length)return;const r=[];for(const d of t){let u=o.findIndex(h=>h===d);u===-1&&(u=o.push(d)-1),r.push(u)}const a=new Uint32Array(r),s=i.gltf.buffers.push({arrayBuffer:a.buffer,byteOffset:a.byteOffset,byteLength:a.byteLength})-1,l=i.addBufferView(a,s,0),c=i.addAccessor(l,{size:1,componentType:zy(a),count:a.length});n.attributes[e]=c}function tBt(i,e,t,o,n=[0]){const r={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},a=t[o],s=t[o+1];let l=1;e&&(e.indexOf("image/jpeg")!==-1||e.indexOf("image/png")!==-1)&&(l=4);const c=iBt(a,s,i,l);let d=0;for(const u of n){const h=typeof u=="number"?Object.values(r)[u]:r[u],p=c+h.offset,A=vZ(i);if(A.data.length<=p)throw new Error(`${A.data.length} <= ${p}`);const f=A.data[p];d|=f<<h.shift}return d}function iBt(i,e,t,o=1){const n=t.width,r=BZ(i)*(n-1),a=Math.round(r),s=t.height,l=BZ(e)*(s-1),c=Math.round(l),d=t.components?t.components:o;return(c*n+a)*d}function SZ(i,e,t,o,n){const r=[];for(let a=0;a<e;a++){const s=t[a],l=t[a+1]-t[a];if(l+s>o)break;const c=s/n,d=l/n;r.push(i.slice(c,c+d))}return r}function TZ(i,e,t){const o=[];for(let n=0;n<e;n++){const r=n*t;o.push(i.slice(r,r+t))}return o}function RZ(i,e,t,o){if(t)throw new Error("Not implemented - arrayOffsets for strings is specified");if(o){const n=[],r=new TextDecoder("utf8");let a=0;for(let s=0;s<i;s++){const l=o[s+1]-o[s];if(l+a<=e.length){const c=e.subarray(a,l+a),d=r.decode(c);n.push(d),a+=l}}return n}return[]}const Qp="EXT_mesh_features",oBt=Qp;async function rBt(i,e){const t=new gr(i);aBt(t,e)}function nBt(i,e){const t=new gr(i);return lBt(t),t.createBinaryChunk(),t.gltf}function aBt(i,e){const t=i.gltf.json;if(t.meshes)for(const o of t.meshes)for(const n of o.primitives)sBt(i,n,e)}function sBt(i,e,t){if(!t?.gltf?.loadBuffers)return;const o=e.extensions?.[Qp]?.featureIds;if(o)for(const n of o){let r;if(typeof n.attribute<"u"){const a=`_FEATURE_ID_${n.attribute}`,s=e.attributes[a];r=i.getTypedArrayForAccessor(s)}else typeof n.texture<"u"&&t?.gltf?.loadImages?r=SE(i,n.texture,e):r=[];n.data=r}}function lBt(i,e){const t=i.gltf.json.meshes;if(t)for(const o of t)for(const n of o.primitives)dBt(i,n)}function cBt(i,e,t,o){e.extensions||(e.extensions={});let n=e.extensions[Qp];n||(n={featureIds:[]},e.extensions[Qp]=n);const{featureIds:r}=n,a={featureCount:t.length,propertyTable:o,data:t};r.push(a),i.addObjectExtension(e,Qp,n)}function dBt(i,e){const t=e.extensions?.[Qp];if(!t)return;const o=t.featureIds;o.forEach((n,r)=>{if(n.data){const{accessorKey:a,index:s}=uBt(e.attributes),l=new Uint32Array(n.data);o[r]={featureCount:l.length,propertyTable:n.propertyTable,attribute:s},i.gltf.buffers.push({arrayBuffer:l.buffer,byteOffset:l.byteOffset,byteLength:l.byteLength});const c=i.addBufferView(l),d=i.addAccessor(c,{size:1,componentType:zy(l),count:l.length});e.attributes[a]=d}})}function uBt(i){const e="_FEATURE_ID_",t=Object.keys(i).filter(n=>n.indexOf(e)===0);let o=-1;for(const n of t){const r=Number(n.substring(e.length));r>o&&(o=r)}return o++,{accessorKey:`${e}${o}`,index:o}}const hBt=Object.freeze(Object.defineProperty({__proto__:null,createExtMeshFeatures:cBt,decode:rBt,encode:nBt,name:oBt},Symbol.toStringTag,{value:"Module"})),Gp="EXT_structural_metadata",pBt=Gp;async function fBt(i,e){const t=new gr(i);gBt(t,e)}function ABt(i,e){const t=new gr(i);return RBt(t),t.createBinaryChunk(),t.gltf}function gBt(i,e){if(!e.gltf?.loadBuffers)return;const t=i.getExtension(Gp);t&&(e.gltf?.loadImages&&mBt(i,t),vBt(i,t))}function mBt(i,e){const t=e.propertyTextures,o=i.gltf.json;if(t&&o.meshes)for(const n of o.meshes)for(const r of n.primitives)bBt(i,t,r,e)}function vBt(i,e){const t=e.schema;if(!t)return;const o=t.classes,n=e.propertyTables;if(o&&n)for(const r in o){const a=yBt(n,r);a&&CBt(i,t,a)}}function yBt(i,e){for(const t of i)if(t.class===e)return t;return null}function bBt(i,e,t,o){if(!e)return;const n=t.extensions?.[Gp]?.propertyTextures;if(n)for(const r of n){const a=e[r];wBt(i,a,t,o)}}function wBt(i,e,t,o){if(!e.properties)return;o.dataAttributeNames||(o.dataAttributeNames=[]);const n=e.class;for(const r in e.properties){const a=`${n}_${r}`,s=e.properties?.[r];if(!s)continue;s.data||(s.data=[]);const l=s.data,c=SE(i,s,t);c!==null&&(IZ(i,a,c,l,t),s.data=l,o.dataAttributeNames.push(a))}}function CBt(i,e,t){const o=e.classes?.[t.class];if(!o)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${t.class}`);const n=t.count;for(const r in o.properties){const a=o.properties[r],s=t.properties?.[r];if(s){const l=xBt(i,e,a,n,s);s.data=l}}}function xBt(i,e,t,o,n){let r=[];const a=n.values,s=i.getTypedArrayForBufferView(a),l=kBt(i,t,n,o),c=MBt(i,n,o);switch(t.type){case"SCALAR":case"VEC2":case"VEC3":case"VEC4":case"MAT2":case"MAT3":case"MAT4":{r=BBt(t,o,s,l);break}case"BOOLEAN":throw new Error(`Not implemented - classProperty.type=${t.type}`);case"STRING":{r=RZ(o,s,l,c);break}case"ENUM":{r=EBt(e,t,o,s,l);break}default:throw new Error(`Unknown classProperty type ${t.type}`)}return r}function kBt(i,e,t,o){return e.array&&typeof e.count>"u"&&typeof t.arrayOffsets<"u"?qy(i,t.arrayOffsets,t.arrayOffsetType||"UINT32",o):null}function MBt(i,e,t){return typeof e.stringOffsets<"u"?qy(i,e.stringOffsets,e.stringOffsetType||"UINT32",t):null}function BBt(i,e,t,o){const n=i.array,r=i.count,a=IE(i.type,i.componentType),s=t.byteLength/a;let l;return i.componentType?l=Qy(t,i.type,i.componentType,s):l=t,n?o?SZ(l,e,o,t.length,a):r?TZ(l,e,r):[]:l}function EBt(i,e,t,o,n){const r=e.enumType;if(!r)throw new Error("Incorrect data in the EXT_structural_metadata extension: classProperty.enumType is not set for type ENUM");const a=i.enums?.[r];if(!a)throw new Error(`Incorrect data in the EXT_structural_metadata extension: schema.enums does't contain ${r}`);const s=a.valueType||"UINT16",l=IE(e.type,s),c=o.byteLength/l;let d=Qy(o,e.type,s,c);if(d||(d=o),e.array){if(n)return PBt({valuesData:d,numberOfElements:t,arrayOffsets:n,valuesDataBytesLength:o.length,elementSize:l,enumEntry:a});const u=e.count;return u?IBt(d,t,u,a):[]}return TE(d,0,t,a)}function PBt(i){const{valuesData:e,numberOfElements:t,arrayOffsets:o,valuesDataBytesLength:n,elementSize:r,enumEntry:a}=i,s=[];for(let l=0;l<t;l++){const c=o[l],d=o[l+1]-o[l];if(d+c>n)break;const u=c/r,h=d/r,p=TE(e,u,h,a);s.push(p)}return s}function IBt(i,e,t,o){const n=[];for(let r=0;r<e;r++){const a=t*r,s=TE(i,a,t,o);n.push(s)}return n}function TE(i,e,t,o){const n=[];for(let r=0;r<t;r++)if(i instanceof BigInt64Array||i instanceof BigUint64Array)n.push("");else{const a=i[e+r],s=SBt(o,a);s?n.push(s.name):n.push("")}return n}function SBt(i,e){for(const t of i.values)if(t.value===e)return t;return null}const TBt="schemaClassId";function RBt(i,e){const t=i.getExtension(Gp);if(t&&t.propertyTables)for(const o of t.propertyTables){const n=o.class,r=t.schema?.classes?.[n];o.properties&&r&&LBt(o,r,i)}}function LBt(i,e,t){for(const o in i.properties){const n=i.properties[o].data;if(n){const r=e.properties[o];if(r){const a=OBt(n,r,t);i.properties[o]=a}}}}function DBt(i,e,t=TBt){let o=i.getExtension(Gp);o||(o=i.addExtension(Gp)),o.schema=_Bt(e,t,o.schema);const n=FBt(e,t,o.schema);return o.propertyTables||(o.propertyTables=[]),o.propertyTables.push(n)-1}function _Bt(i,e,t){const o=t??{id:"schema_id"},n={properties:{}};for(const r of i){const a={type:r.elementType,componentType:r.componentType};n.properties[r.name]=a}return o.classes={},o.classes[e]=n,o}function FBt(i,e,t){const o={class:e,count:0};let n=0;const r=t.classes?.[e];for(const a of i){if(n===0&&(n=a.values.length),n!==a.values.length&&a.values.length)throw new Error("Illegal values in attributes");r?.properties[a.name]&&(o.properties||(o.properties={}),o.properties[a.name]={values:0,data:a.values})}return o.count=n,o}function OBt(i,e,t){const o={values:0};if(e.type==="STRING"){const{stringData:n,stringOffsets:r}=jBt(i);o.stringOffsets=RE(r,t),o.values=RE(n,t)}else if(e.type==="SCALAR"&&e.componentType){const n=NBt(i,e.componentType);o.values=RE(n,t)}return o}const UBt={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:Int32Array,UINT64:Uint32Array,FLOAT32:Float32Array,FLOAT64:Float64Array};function NBt(i,e){const t=[];for(const n of i)t.push(Number(n));const o=UBt[e];if(!o)throw new Error("Illegal component type");return new o(t)}function jBt(i){const e=new TextEncoder,t=[];let o=0;for(const l of i){const c=e.encode(l);o+=c.length,t.push(c)}const n=new Uint8Array(o),r=[];let a=0;for(const l of t)n.set(l,a),r.push(a),a+=l.length;r.push(a);const s=new Uint32Array(r);return{stringData:n,stringOffsets:s}}function RE(i,e){return e.gltf.buffers.push({arrayBuffer:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}),e.addBufferView(i)}const VBt=Object.freeze(Object.defineProperty({__proto__:null,createExtStructuralMetadata:DBt,decode:fBt,encode:ABt,name:pBt},Symbol.toStringTag,{value:"Module"})),LZ="EXT_feature_metadata",HBt=LZ;async function zBt(i,e){const t=new gr(i);qBt(t,e)}function qBt(i,e){if(!e.gltf?.loadBuffers)return;const t=i.getExtension(LZ);t&&(e.gltf?.loadImages&&QBt(i,t),GBt(i,t))}function QBt(i,e){const t=e.schema;if(!t)return;const o=t.classes,{featureTextures:n}=e;if(o&&n)for(const r in o){const a=o[r],s=JBt(n,r);s&&WBt(i,s,a)}}function GBt(i,e){const t=e.schema;if(!t)return;const o=t.classes,n=e.featureTables;if(o&&n)for(const r in o){const a=KBt(n,r);a&&ZBt(i,t,a)}}function KBt(i,e){for(const t in i){const o=i[t];if(o.class===e)return o}return null}function JBt(i,e){for(const t in i){const o=i[t];if(o.class===e)return o}return null}function ZBt(i,e,t){if(!t.class)return;const o=e.classes?.[t.class];if(!o)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${t.class}`);const n=t.count;for(const r in o.properties){const a=o.properties[r],s=t.properties?.[r];if(s){const l=YBt(i,e,a,n,s);s.data=l}}}function WBt(i,e,t){const o=e.class;for(const n in t.properties){const r=e?.properties?.[n];if(r){const a=iEt(i,r,o);r.data=a}}}function YBt(i,e,t,o,n){let r=[];const a=n.bufferView,s=i.getTypedArrayForBufferView(a),l=XBt(i,t,n,o),c=$Bt(i,t,n,o);return t.type==="STRING"||t.componentType==="STRING"?r=RZ(o,s,l,c):eEt(t)&&(r=tEt(t,o,s,l)),r}function XBt(i,e,t,o){return e.type==="ARRAY"&&typeof e.componentCount>"u"&&typeof t.arrayOffsetBufferView<"u"?qy(i,t.arrayOffsetBufferView,t.offsetType||"UINT32",o):null}function $Bt(i,e,t,o){return typeof t.stringOffsetBufferView<"u"?qy(i,t.stringOffsetBufferView,t.offsetType||"UINT32",o):null}function eEt(i){const e=["UINT8","INT16","UINT16","INT32","UINT32","INT64","UINT64","FLOAT32","FLOAT64"];return e.includes(i.type)||typeof i.componentType<"u"&&e.includes(i.componentType)}function tEt(i,e,t,o){const n=i.type==="ARRAY",r=i.componentCount,a="SCALAR",s=i.componentType||i.type,l=IE(a,s),c=t.byteLength/l,d=Qy(t,a,s,c);return n?o?SZ(d,e,o,t.length,l):r?TZ(d,e,r):[]:d}function iEt(i,e,t){const o=i.gltf.json;if(!o.meshes)return[];const n=[];for(const r of o.meshes)for(const a of r.primitives)oEt(i,t,e,n,a);return n}function oEt(i,e,t,o,n){const r={channels:t.channels,...t.texture},a=SE(i,r,n);a&&IZ(i,e,a,o,n)}const rEt=Object.freeze(Object.defineProperty({__proto__:null,decode:zBt,name:HBt},Symbol.toStringTag,{value:"Module"})),nEt="4.3.3",aEt="4.3.3",Gy={TRANSCODER:"basis_transcoder.js",TRANSCODER_WASM:"basis_transcoder.wasm",ENCODER:"basis_encoder.js",ENCODER_WASM:"basis_encoder.wasm"};let DZ;async function _Z(i){return Ext(i.modules),Pxt("basis")||(DZ||=sEt(i),await DZ)}async function sEt(i){let e=null,t=null;return[e,t]=await Promise.all([await Iu(Gy.TRANSCODER,"textures",i),await Iu(Gy.TRANSCODER_WASM,"textures",i)]),e=e||globalThis.BASIS,await lEt(e,t)}function lEt(i,e){const t={};return e&&(t.wasmBinary=e),new Promise(o=>{i(t).then(n=>{const{BasisFile:r,initializeBasis:a}=n;a(),o({BasisFile:r})})})}let LE;async function FZ(i){const e=i.modules||{};return e.basisEncoder?e.basisEncoder:(LE=LE||cEt(i),await LE)}async function cEt(i){let e=null,t=null;return[e,t]=await Promise.all([await Iu(Gy.ENCODER,"textures",i),await Iu(Gy.ENCODER_WASM,"textures",i)]),e=e||globalThis.BASIS,await dEt(e,t)}function dEt(i,e){const t={};return e&&(t.wasmBinary=e),new Promise(o=>{i(t).then(n=>{const{BasisFile:r,KTX2File:a,initializeBasis:s,BasisEncoder:l}=n;s(),o({BasisFile:r,KTX2File:a,BasisEncoder:l})})})}const Kp={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_ASTC_4X4_KHR:37808},uEt=["","WEBKIT_","MOZ_"],OZ={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let Ky=null;function hEt(i){if(!Ky){i=i||pEt()||void 0,Ky=new Set;for(const e of uEt)for(const t in OZ)if(i&&i.getExtension(`${e}${t}`)){const o=OZ[t];Ky.add(o)}}return Ky}function pEt(){try{return document.createElement("canvas").getContext("webgl")}catch{return null}}const Xn=[171,75,84,88,32,50,48,187,13,10,26,10];function fEt(i){const e=new Uint8Array(i);return!(e.byteLength<Xn.length||e[0]!==Xn[0]||e[1]!==Xn[1]||e[2]!==Xn[2]||e[3]!==Xn[3]||e[4]!==Xn[4]||e[5]!==Xn[5]||e[6]!==Xn[6]||e[7]!==Xn[7]||e[8]!==Xn[8]||e[9]!==Xn[9]||e[10]!==Xn[10]||e[11]!==Xn[11])}const AEt={etc1:{basisFormat:0,compressed:!0,format:Kp.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:Kp.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:Kp.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:Kp.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:Kp.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:Kp.COMPRESSED_RGBA_ASTC_4X4_KHR},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};async function gEt(i,e){if(e.basis.containerFormat==="auto"){if(fEt(i)){const o=await FZ(e);return UZ(o.KTX2File,i,e)}const{BasisFile:t}=await _Z(e);return DE(t,i,e)}switch(e.basis.module){case"encoder":const t=await FZ(e);switch(e.basis.containerFormat){case"ktx2":return UZ(t.KTX2File,i,e);case"basis":default:return DE(t.BasisFile,i,e)}case"transcoder":default:const{BasisFile:o}=await _Z(e);return DE(o,i,e)}}function DE(i,e,t){const o=new i(new Uint8Array(e));try{if(!o.startTranscoding())throw new Error("Failed to start basis transcoding");const n=o.getNumImages(),r=[];for(let a=0;a<n;a++){const s=o.getNumLevels(a),l=[];for(let c=0;c<s;c++)l.push(mEt(o,a,c,t));r.push(l)}return r}finally{o.close(),o.delete()}}function mEt(i,e,t,o){const n=i.getImageWidth(e,t),r=i.getImageHeight(e,t),a=i.getHasAlpha(),{compressed:s,format:l,basisFormat:c}=NZ(o,a),d=i.getImageTranscodedSizeInBytes(e,t,c),u=new Uint8Array(d);if(!i.transcodeImage(u,e,t,c,0,0))throw new Error("failed to start Basis transcoding");return{width:n,height:r,data:u,compressed:s,format:l,hasAlpha:a}}function UZ(i,e,t){const o=new i(new Uint8Array(e));try{if(!o.startTranscoding())throw new Error("failed to start KTX2 transcoding");const n=o.getLevels(),r=[];for(let a=0;a<n;a++)r.push(vEt(o,a,t));return[r]}finally{o.close(),o.delete()}}function vEt(i,e,t){const{alphaFlag:o,height:n,width:r}=i.getImageLevelInfo(e,0,0),{compressed:a,format:s,basisFormat:l}=NZ(t,o),c=i.getImageTranscodedSizeInBytes(e,0,0,l),d=new Uint8Array(c);if(!i.transcodeImage(d,e,0,0,l,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:r,height:n,data:d,compressed:a,levelSize:c,hasAlpha:o,format:s}}function NZ(i,e){let t=i&&i.basis&&i.basis.format;return t==="auto"&&(t=jZ()),typeof t=="object"&&(t=e?t.alpha:t.noAlpha),t=t.toLowerCase(),AEt[t]}function jZ(){const i=hEt();return i.has("astc")?"astc-4x4":i.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:i.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:i.has("etc1")?"etc1":i.has("etc2")?"etc2":"rgb565"}const yEt={dataType:null,batchType:null,name:"Basis",id:"basis",module:"textures",version:aEt,worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},bEt={...yEt,parse:gEt},Jp=!0,VZ=1735152710,_E=12,Jy=8,wEt=1313821514,CEt=5130562,xEt=0,kEt=0,MEt=1;function BEt(i,e=0){return`${String.fromCharCode(i.getUint8(e+0))}${String.fromCharCode(i.getUint8(e+1))}${String.fromCharCode(i.getUint8(e+2))}${String.fromCharCode(i.getUint8(e+3))}`}function EEt(i,e=0,t={}){const o=new DataView(i),{magic:n=VZ}=t,r=o.getUint32(e,!1);return r===n||r===VZ}function PEt(i,e,t=0,o={}){const n=new DataView(e),r=BEt(n,t+0),a=n.getUint32(t+4,Jp),s=n.getUint32(t+8,Jp);switch(Object.assign(i,{header:{byteOffset:t,byteLength:s,hasBinChunk:!1},type:r,version:a,json:{},binChunks:[]}),t+=_E,i.version){case 1:return IEt(i,n,t);case 2:return SEt(i,n,t,o={});default:throw new Error(`Invalid GLB version ${i.version}. Only supports version 1 and 2.`)}}function IEt(i,e,t){zl(i.header.byteLength>_E+Jy);const o=e.getUint32(t+0,Jp),n=e.getUint32(t+4,Jp);return t+=Jy,zl(n===xEt),FE(i,e,t,o),t+=o,t+=OE(i,e,t,i.header.byteLength),t}function SEt(i,e,t,o){return zl(i.header.byteLength>_E+Jy),TEt(i,e,t,o),t+i.header.byteLength}function TEt(i,e,t,o){for(;t+8<=i.header.byteLength;){const n=e.getUint32(t+0,Jp),r=e.getUint32(t+4,Jp);switch(t+=Jy,r){case wEt:FE(i,e,t,n);break;case CEt:OE(i,e,t,n);break;case kEt:o.strict||FE(i,e,t,n);break;case MEt:o.strict||OE(i,e,t,n);break}t+=Iv(n,4)}return t}function FE(i,e,t,o){const n=new Uint8Array(e.buffer,t,o),r=new TextDecoder("utf8").decode(n);return i.json=JSON.parse(r),Iv(o,4)}function OE(i,e,t,o){return i.header.hasBinChunk=!0,i.binChunks.push({byteOffset:t,byteLength:o,arrayBuffer:e.buffer}),Iv(o,4)}function HZ(i,e){if(i.startsWith("data:")||i.startsWith("http:")||i.startsWith("https:"))return i;const t=e.baseUri||e.uri;if(!t)throw new Error(`'baseUri' must be provided to resolve relative url ${i}`);return t.substr(0,t.lastIndexOf("/")+1)+i}const REt="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",LEt="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",DEt=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]),_Et=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),FEt={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},OEt={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};async function UEt(i,e,t,o,n,r="NONE"){const a=await NEt();HEt(a,a.exports[OEt[n]],i,e,t,o,a.exports[FEt[r||"NONE"]])}let UE;async function NEt(){return UE||(UE=jEt()),UE}async function jEt(){let i=REt;WebAssembly.validate(DEt)&&(i=LEt,console.log("Warning: meshopt_decoder is using experimental SIMD support"));const e=await WebAssembly.instantiate(VEt(i),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}function VEt(i){const e=new Uint8Array(i.length);for(let o=0;o<i.length;++o){const n=i.charCodeAt(o);e[o]=n>96?n-71:n>64?n-65:n>47?n+4:n>46?63:62}let t=0;for(let o=0;o<i.length;++o)e[t++]=e[o]<60?_Et[e[o]]:(e[o]-60)*64+e[++o];return e.buffer.slice(0,t)}function HEt(i,e,t,o,n,r,a){const s=i.exports.sbrk,l=o+3&-4,c=s(l*n),d=s(r.length),u=new Uint8Array(i.exports.memory.buffer);u.set(r,d);const h=e(c,o,n,d,r.length);if(h===0&&a&&a(c,l,n),t.set(u.subarray(c,c+o*n)),s(c-s(0)),h!==0)throw new Error(`Malformed buffer data: ${h}`)}const Zy="EXT_meshopt_compression",zEt=Zy;async function qEt(i,e){const t=new gr(i);if(!e?.gltf?.decompressMeshes||!e.gltf?.loadBuffers)return;const o=[];for(const n of i.json.bufferViews||[])o.push(QEt(t,n));await Promise.all(o),t.removeExtension(Zy)}async function QEt(i,e){const t=i.getObjectExtension(e,Zy);if(t){const{byteOffset:o=0,byteLength:n=0,byteStride:r,count:a,mode:s,filter:l="NONE",buffer:c}=t,d=i.gltf.buffers[c],u=new Uint8Array(d.arrayBuffer,d.byteOffset+o,n),h=new Uint8Array(i.gltf.buffers[e.buffer].arrayBuffer,e.byteOffset,e.byteLength);await UEt(h,a,r,u,s,l),i.removeObjectExtension(e,Zy)}}const GEt=Object.freeze(Object.defineProperty({__proto__:null,decode:qEt,name:zEt},Symbol.toStringTag,{value:"Module"})),Zp="EXT_texture_webp",KEt=Zp;function JEt(i,e){const t=new gr(i);if(!HMt("image/webp")){if(t.getRequiredExtensions().includes(Zp))throw new Error(`gltf: Required extension ${Zp} not supported by browser`);return}const{json:o}=t;for(const n of o.textures||[]){const r=t.getObjectExtension(n,Zp);r&&(n.source=r.source),t.removeObjectExtension(n,Zp)}t.removeExtension(Zp)}const ZEt=Object.freeze(Object.defineProperty({__proto__:null,name:KEt,preprocess:JEt},Symbol.toStringTag,{value:"Module"})),Wy="KHR_texture_basisu",WEt=Wy;function YEt(i,e){const t=new gr(i),{json:o}=t;for(const n of o.textures||[]){const r=t.getObjectExtension(n,Wy);r&&(n.source=r.source,t.removeObjectExtension(n,Wy))}t.removeExtension(Wy)}const XEt=Object.freeze(Object.defineProperty({__proto__:null,name:WEt,preprocess:YEt},Symbol.toStringTag,{value:"Module"})),$Et="4.3.3",ePt={dataType:null,batchType:null,name:"Draco",id:"draco",module:"draco",version:$Et,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function tPt(i,e,t){const o=qZ(e.metadata),n=[],r=iPt(e.attributes);for(const a in i){const s=i[a],l=zZ(a,s,r[a]);n.push(l)}if(t){const a=zZ("indices",t);n.push(a)}return{fields:n,metadata:o}}function iPt(i){const e={};for(const t in i){const o=i[t];e[o.name||"undefined"]=o}return e}function zZ(i,e,t){const o=t?qZ(t.metadata):void 0;return sMt(i,e,o)}function qZ(i){Object.entries(i);const e={};for(const t in i)e[`${t}.string`]=JSON.stringify(i[t]);return e}const QZ={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},oPt={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},rPt=4;class nPt{draco;decoder;metadataQuerier;constructor(e){this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(e,t={}){const o=new this.draco.DecoderBuffer;o.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(t);const n=this.decoder.GetEncodedGeometryType(o),r=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let a;switch(n){case this.draco.TRIANGULAR_MESH:a=this.decoder.DecodeBufferToMesh(o,r);break;case this.draco.POINT_CLOUD:a=this.decoder.DecodeBufferToPointCloud(o,r);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!a.ok()||!r.ptr){const u=`DRACO decompression failed: ${a.error_msg()}`;throw new Error(u)}const s=this._getDracoLoaderData(r,n,t),l=this._getMeshData(r,s,t),c=aMt(l.attributes),d=tPt(l.attributes,s,l.indices);return{loader:"draco",loaderData:s,header:{vertexCount:r.num_points(),boundingBox:c},...l,schema:d}}finally{this.draco.destroy(o),r&&this.draco.destroy(r)}}_getDracoLoaderData(e,t,o){const n=this._getTopLevelMetadata(e),r=this._getDracoAttributes(e,o);return{geometry_type:t,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:n,attributes:r}}_getDracoAttributes(e,t){const o={};for(let n=0;n<e.num_attributes();n++){const r=this.decoder.GetAttribute(e,n),a=this._getAttributeMetadata(e,n);o[r.unique_id()]={unique_id:r.unique_id(),attribute_type:r.attribute_type(),data_type:r.data_type(),num_components:r.num_components(),byte_offset:r.byte_offset(),byte_stride:r.byte_stride(),normalized:r.normalized(),attribute_index:n,metadata:a};const s=this._getQuantizationTransform(r,t);s&&(o[r.unique_id()].quantization_transform=s);const l=this._getOctahedronTransform(r,t);l&&(o[r.unique_id()].octahedron_transform=l)}return o}_getMeshData(e,t,o){const n=this._getMeshAttributes(t,e,o);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(e instanceof this.draco.Mesh)switch(o.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(e),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(e),size:1}}}return{topology:"point-list",mode:0,attributes:n}}_getMeshAttributes(e,t,o){const n={};for(const r of Object.values(e.attributes)){const a=this._deduceAttributeName(r,o);r.name=a;const s=this._getAttributeValues(t,r);if(s){const{value:l,size:c}=s;n[a]={value:l,size:c,byteOffset:r.byte_offset,byteStride:r.byte_stride,normalized:r.normalized}}}return n}_getTriangleListIndices(e){const t=e.num_faces()*3,o=t*rPt,n=this.draco._malloc(o);try{return this.decoder.GetTrianglesUInt32Array(e,o,n),new Uint32Array(this.draco.HEAPF32.buffer,n,t).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(e){const t=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(e,t),lPt(t)}finally{this.draco.destroy(t)}}_getAttributeValues(e,t){const o=oPt[t.data_type];if(!o)return console.warn(`DRACO: Unsupported attribute type ${t.data_type}`),null;const n=t.num_components,r=e.num_points()*n,a=r*o.BYTES_PER_ELEMENT,s=aPt(this.draco,o);let l;const c=this.draco._malloc(a);try{const d=this.decoder.GetAttribute(e,t.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(e,d,s,a,c),l=new o(this.draco.HEAPF32.buffer,c,r).slice()}finally{this.draco._free(c)}return{value:l,size:n}}_deduceAttributeName(e,t){const o=e.unique_id;for(const[a,s]of Object.entries(t.extraAttributes||{}))if(s===o)return a;const n=e.attribute_type;for(const a in QZ)if(this.draco[a]===n)return QZ[a];const r=t.attributeNameEntry||"name";return e.metadata[r]?e.metadata[r].string:`CUSTOM_ATTRIBUTE_${o}`}_getTopLevelMetadata(e){const t=this.decoder.GetMetadata(e);return this._getDracoMetadata(t)}_getAttributeMetadata(e,t){const o=this.decoder.GetAttributeMetadata(e,t);return this._getDracoMetadata(o)}_getDracoMetadata(e){if(!e||!e.ptr)return{};const t={},o=this.metadataQuerier.NumEntries(e);for(let n=0;n<o;n++){const r=this.metadataQuerier.GetEntryName(e,n);t[r]=this._getDracoMetadataField(e,r)}return t}_getDracoMetadataField(e,t){const o=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(e,t,o);const n=sPt(o);return{int:this.metadataQuerier.GetIntEntry(e,t),string:this.metadataQuerier.GetStringEntry(e,t),double:this.metadataQuerier.GetDoubleEntry(e,t),intArray:n}}finally{this.draco.destroy(o)}}_disableAttributeTransforms(e){const{quantizedAttributes:t=[],octahedronAttributes:o=[]}=e,n=[...t,...o];for(const r of n)this.decoder.SkipAttributeTransform(this.draco[r])}_getQuantizationTransform(e,t){const{quantizedAttributes:o=[]}=t,n=e.attribute_type();if(o.map(r=>this.decoder[r]).includes(n)){const r=new this.draco.AttributeQuantizationTransform;try{if(r.InitFromAttribute(e))return{quantization_bits:r.quantization_bits(),range:r.range(),min_values:new Float32Array([1,2,3]).map(a=>r.min_value(a))}}finally{this.draco.destroy(r)}}return null}_getOctahedronTransform(e,t){const{octahedronAttributes:o=[]}=t,n=e.attribute_type();if(o.map(r=>this.decoder[r]).includes(n)){const r=new this.draco.AttributeQuantizationTransform;try{if(r.InitFromAttribute(e))return{quantization_bits:r.quantization_bits()}}finally{this.draco.destroy(r)}}return null}}function aPt(i,e){switch(e){case Float32Array:return i.DT_FLOAT32;case Int8Array:return i.DT_INT8;case Int16Array:return i.DT_INT16;case Int32Array:return i.DT_INT32;case Uint8Array:return i.DT_UINT8;case Uint16Array:return i.DT_UINT16;case Uint32Array:return i.DT_UINT32;default:return i.DT_INVALID}}function sPt(i){const e=i.size(),t=new Int32Array(e);for(let o=0;o<e;o++)t[o]=i.GetValue(o);return t}function lPt(i){const e=i.size(),t=new Int32Array(e);for(let o=0;o<e;o++)t[o]=i.GetValue(o);return t}const cPt="1.5.6",dPt="1.4.1",NE=`https://www.gstatic.com/draco/versioned/decoders/${cPt}`,Fn={DECODER:"draco_wasm_wrapper.js",DECODER_WASM:"draco_decoder.wasm",FALLBACK_DECODER:"draco_decoder.js",ENCODER:"draco_encoder.js"},jE={[Fn.DECODER]:`${NE}/${Fn.DECODER}`,[Fn.DECODER_WASM]:`${NE}/${Fn.DECODER_WASM}`,[Fn.FALLBACK_DECODER]:`${NE}/${Fn.FALLBACK_DECODER}`,[Fn.ENCODER]:`https://raw.githubusercontent.com/google/draco/${dPt}/javascript/${Fn.ENCODER}`};let VE;async function uPt(i){const e=i.modules||{};return e.draco3d?VE||=e.draco3d.createDecoderModule({}).then(t=>({draco:t})):VE||=hPt(i),await VE}async function hPt(i){let e,t;switch(i.draco&&i.draco.decoderType){case"js":e=await Iu(jE[Fn.FALLBACK_DECODER],"draco",i,Fn.FALLBACK_DECODER);break;case"wasm":default:[e,t]=await Promise.all([await Iu(jE[Fn.DECODER],"draco",i,Fn.DECODER),await Iu(jE[Fn.DECODER_WASM],"draco",i,Fn.DECODER_WASM)])}return e=e||globalThis.DracoDecoderModule,await pPt(e,t)}function pPt(i,e){const t={};return e&&(t.wasmBinary=e),new Promise(o=>{i({...t,onModuleLoaded:n=>o({draco:n})})})}const fPt={...ePt,parse:APt};async function APt(i,e){const{draco:t}=await uPt(e),o=new nPt(t);try{return o.parseSync(i,e?.draco)}finally{o.destroy()}}function gPt(i){const e={};for(const t in i){const o=i[t];if(t!=="indices"){const n=GZ(o);e[t]=n}}return e}function GZ(i){const{buffer:e,size:t,count:o}=mPt(i);return{value:e,size:t,byteOffset:0,count:o,type:MZ(t),componentType:zy(e)}}function mPt(i){let e=i,t=1,o=0;return i&&i.value&&(e=i.value,t=i.size||1),e&&(ArrayBuffer.isView(e)||(e=vPt(e,Float32Array)),o=e.length/t),{buffer:e,size:t,count:o}}function vPt(i,e,t=!1){return i?Array.isArray(i)?new e(i):t&&!(i instanceof e)?new e(i):i:null}const nd="KHR_draco_mesh_compression",yPt=nd;function bPt(i,e,t){const o=new gr(i);for(const n of KZ(o))o.getObjectExtension(n,nd)}async function wPt(i,e,t){if(!e?.gltf?.decompressMeshes)return;const o=new gr(i),n=[];for(const r of KZ(o))o.getObjectExtension(r,nd)&&n.push(xPt(o,r,e,t));await Promise.all(n),o.removeExtension(nd)}function CPt(i,e={}){const t=new gr(i);for(const o of t.json.meshes||[])kPt(o),t.addRequiredExtension(nd)}async function xPt(i,e,t,o){const n=i.getObjectExtension(e,nd);if(!n)return;const r=i.getTypedArrayForBufferView(n.bufferView),a=GJ(r.buffer,r.byteOffset),s={...t};delete s["3d-tiles"];const l=await IJ(a,fPt,s,o),c=gPt(l.attributes);for(const[d,u]of Object.entries(c))if(d in e.attributes){const h=e.attributes[d],p=i.getAccessor(h);p?.min&&p?.max&&(u.min=p.min,u.max=p.max)}e.attributes=c,l.indices&&(e.indices=GZ(l.indices)),i.removeObjectExtension(e,nd),MPt(e)}function kPt(i,e,t=4,o,n){if(!o.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const r=o.DracoWriter.encodeSync({attributes:i}),a=n?.parseSync?.({attributes:i}),s=o._addFauxAttributes(a.attributes),l=o.addBufferView(r);return{primitives:[{attributes:s,mode:t,extensions:{[nd]:{bufferView:l,attributes:s}}}]}}function MPt(i){if(!i.attributes&&Object.keys(i.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function*KZ(i){for(const e of i.json.meshes||[])for(const t of e.primitives)yield t}const BPt=Object.freeze(Object.defineProperty({__proto__:null,decode:wPt,encode:CPt,name:yPt,preprocess:bPt},Symbol.toStringTag,{value:"Module"})),EPt={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...EPt}};const wa=globalThis.mathgl.config;function PPt(i,{precision:e=wa.precision}={}){return i=IPt(i),`${parseFloat(i.toPrecision(e))}`}function Yy(i){return Array.isArray(i)||ArrayBuffer.isView(i)&&!(i instanceof DataView)}function JZ(i,e,t){const o=wa.EPSILON;try{if(i===e)return!0;if(Yy(i)&&Yy(e)){if(i.length!==e.length)return!1;for(let n=0;n<i.length;++n)if(!JZ(i[n],e[n]))return!1;return!0}return i&&i.equals?i.equals(e):e&&e.equals?e.equals(i):typeof i=="number"&&typeof e=="number"?Math.abs(i-e)<=wa.EPSILON*Math.max(1,Math.abs(i),Math.abs(e)):!1}finally{wa.EPSILON=o}}function IPt(i){return Math.round(i/wa.EPSILON)*wa.EPSILON}class ZZ extends Array{clone(){return new this.constructor().copy(this)}fromArray(e,t=0){for(let o=0;o<this.ELEMENTS;++o)this[o]=e[o+t];return this.check()}toArray(e=[],t=0){for(let o=0;o<this.ELEMENTS;++o)e[t+o]=this[o];return e}toObject(e){return e}from(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}to(e){return e===this?this:Yy(e)?this.toArray(e):this.toObject(e)}toTarget(e){return e?this.to(e):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(wa)}formatString(e){let t="";for(let o=0;o<this.ELEMENTS;++o)t+=(o>0?", ":"")+PPt(this[o],e);return`${e.printTypes?this.constructor.name:""}[${t}]`}equals(e){if(!e||this.length!==e.length)return!1;for(let t=0;t<this.ELEMENTS;++t)if(!JZ(this[t],e[t]))return!1;return!0}exactEquals(e){if(!e||this.length!==e.length)return!1;for(let t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}negate(){for(let e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}lerp(e,t,o){if(o===void 0)return this.lerp(this,e,t);for(let n=0;n<this.ELEMENTS;++n){const r=e[n],a=typeof t=="number"?t:t[n];this[n]=r+o*(a-r)}return this.check()}min(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}max(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}clamp(e,t){for(let o=0;o<this.ELEMENTS;++o)this[o]=Math.min(Math.max(this[o],e[o]),t[o]);return this.check()}add(...e){for(const t of e)for(let o=0;o<this.ELEMENTS;++o)this[o]+=t[o];return this.check()}subtract(...e){for(const t of e)for(let o=0;o<this.ELEMENTS;++o)this[o]-=t[o];return this.check()}scale(e){if(typeof e=="number")for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;else for(let t=0;t<this.ELEMENTS&&t<e.length;++t)this[t]*=e[t];return this.check()}multiplyByScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}check(){if(wa.debug&&!this.validate())throw new Error(`math.gl: ${this.constructor.name} some fields set to invalid numbers'`);return this}validate(){let e=this.length===this.ELEMENTS;for(let t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}sub(e){return this.subtract(e)}setScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}addScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}subScalar(e){return this.addScalar(-e)}multiplyScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}divideScalar(e){return this.multiplyByScalar(1/e)}clampScalar(e,t){for(let o=0;o<this.ELEMENTS;++o)this[o]=Math.min(Math.max(this[o],e),t);return this.check()}get elements(){return this}}function SPt(i,e){if(i.length!==e)return!1;for(let t=0;t<i.length;++t)if(!Number.isFinite(i[t]))return!1;return!0}function $n(i){if(!Number.isFinite(i))throw new Error(`Invalid number ${JSON.stringify(i)}`);return i}function TPt(i,e,t=""){if(wa.debug&&!SPt(i,e))throw new Error(`math.gl: ${t} some fields set to invalid numbers'`);return i}function WZ(i,e){if(!i)throw new Error(`math.gl assertion ${e}`)}class RPt extends ZZ{get x(){return this[0]}set x(e){this[0]=$n(e)}get y(){return this[1]}set y(e){this[1]=$n(e)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let e=0;for(let t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}magnitudeSquared(){return this.lengthSquared()}distance(e){return Math.sqrt(this.distanceSquared(e))}distanceSquared(e){let t=0;for(let o=0;o<this.ELEMENTS;++o){const n=this[o]-e[o];t+=n*n}return $n(t)}dot(e){let t=0;for(let o=0;o<this.ELEMENTS;++o)t+=this[o]*e[o];return $n(t)}normalize(){const e=this.magnitude();if(e!==0)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}multiply(...e){for(const t of e)for(let o=0;o<this.ELEMENTS;++o)this[o]*=t[o];return this.check()}divide(...e){for(const t of e)for(let o=0;o<this.ELEMENTS;++o)this[o]/=t[o];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(e){return this.distance(e)}distanceToSquared(e){return this.distanceSquared(e)}getComponent(e){return WZ(e>=0&&e<this.ELEMENTS,"index is out of range"),$n(this[e])}setComponent(e,t){return WZ(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}addVectors(e,t){return this.copy(e).add(t)}subVectors(e,t){return this.copy(e).subtract(t)}multiplyVectors(e,t){return this.copy(e).multiply(t)}addScaledVector(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}}let Xy=typeof Float32Array<"u"?Float32Array:Array;function LPt(){const i=new Xy(2);return Xy!=Float32Array&&(i[0]=0,i[1]=0),i}function DPt(i,e,t){const o=e[0],n=e[1];return i[0]=t[0]*o+t[3]*n+t[6],i[1]=t[1]*o+t[4]*n+t[7],i}(function(){const i=LPt();return function(e,t,o,n,r,a){let s,l;for(t||(t=2),o||(o=0),n?l=Math.min(n*t+o,e.length):l=e.length,s=o;s<l;s+=t)i[0]=e[s],i[1]=e[s+1],r(i,i,a),e[s]=i[0],e[s+1]=i[1];return e}})();function _Pt(i,e,t){const o=e[0],n=e[1],r=e[2],a=t[3]*o+t[7]*n+t[11]*r||1;return i[0]=(t[0]*o+t[4]*n+t[8]*r)/a,i[1]=(t[1]*o+t[5]*n+t[9]*r)/a,i[2]=(t[2]*o+t[6]*n+t[10]*r)/a,i}function FPt(i,e,t){const o=e[0],n=e[1];return i[0]=t[0]*o+t[2]*n,i[1]=t[1]*o+t[3]*n,i[2]=e[2],i}function OPt(i,e,t){const o=e[0],n=e[1],r=e[2];return i[0]=t[0]*o+t[3]*n+t[6]*r,i[1]=t[1]*o+t[4]*n+t[7]*r,i[2]=t[2]*o+t[5]*n+t[8]*r,i[3]=e[3],i}function UPt(){const i=new Xy(3);return Xy!=Float32Array&&(i[0]=0,i[1]=0,i[2]=0),i}function NPt(i,e){return i[0]*e[0]+i[1]*e[1]+i[2]*e[2]}function jPt(i,e,t){const o=e[0],n=e[1],r=e[2],a=t[0],s=t[1],l=t[2];return i[0]=n*l-r*s,i[1]=r*a-o*l,i[2]=o*s-n*a,i}function VPt(i,e,t){const o=e[0],n=e[1],r=e[2];let a=t[3]*o+t[7]*n+t[11]*r+t[15];return a=a||1,i[0]=(t[0]*o+t[4]*n+t[8]*r+t[12])/a,i[1]=(t[1]*o+t[5]*n+t[9]*r+t[13])/a,i[2]=(t[2]*o+t[6]*n+t[10]*r+t[14])/a,i}function YZ(i,e,t){const o=e[0],n=e[1],r=e[2];return i[0]=o*t[0]+n*t[3]+r*t[6],i[1]=o*t[1]+n*t[4]+r*t[7],i[2]=o*t[2]+n*t[5]+r*t[8],i}function HPt(i,e,t){const o=t[0],n=t[1],r=t[2],a=t[3],s=e[0],l=e[1],c=e[2];let d=n*c-r*l,u=r*s-o*c,h=o*l-n*s,p=n*h-r*u,A=r*d-o*h,f=o*u-n*d;const m=a*2;return d*=m,u*=m,h*=m,p*=2,A*=2,f*=2,i[0]=s+d+p,i[1]=l+u+A,i[2]=c+h+f,i}function zPt(i,e,t,o){const n=[],r=[];return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],r[0]=n[0],r[1]=n[1]*Math.cos(o)-n[2]*Math.sin(o),r[2]=n[1]*Math.sin(o)+n[2]*Math.cos(o),i[0]=r[0]+t[0],i[1]=r[1]+t[1],i[2]=r[2]+t[2],i}function qPt(i,e,t,o){const n=[],r=[];return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],r[0]=n[2]*Math.sin(o)+n[0]*Math.cos(o),r[1]=n[1],r[2]=n[2]*Math.cos(o)-n[0]*Math.sin(o),i[0]=r[0]+t[0],i[1]=r[1]+t[1],i[2]=r[2]+t[2],i}function QPt(i,e,t,o){const n=[],r=[];return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],r[0]=n[0]*Math.cos(o)-n[1]*Math.sin(o),r[1]=n[0]*Math.sin(o)+n[1]*Math.cos(o),r[2]=n[2],i[0]=r[0]+t[0],i[1]=r[1]+t[1],i[2]=r[2]+t[2],i}function GPt(i,e){const t=i[0],o=i[1],n=i[2],r=e[0],a=e[1],s=e[2],l=Math.sqrt((t*t+o*o+n*n)*(r*r+a*a+s*s)),c=l&&NPt(i,e)/l;return Math.acos(Math.min(Math.max(c,-1),1))}(function(){const i=UPt();return function(e,t,o,n,r,a){let s,l;for(t||(t=3),o||(o=0),n?l=Math.min(n*t+o,e.length):l=e.length,s=o;s<l;s+=t)i[0]=e[s],i[1]=e[s+1],i[2]=e[s+2],r(i,i,a),e[s]=i[0],e[s+1]=i[1],e[s+2]=i[2];return e}})();const HE=[0,0,0];let $y,KPt=class Yhe extends RPt{static get ZERO(){return $y||($y=new Yhe(0,0,0),Object.freeze($y)),$y}constructor(e=0,t=0,o=0){super(-0,-0,-0),arguments.length===1&&Yy(e)?this.copy(e):(wa.debug&&($n(e),$n(t),$n(o)),this[0]=e,this[1]=t,this[2]=o)}set(e,t,o){return this[0]=e,this[1]=t,this[2]=o,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}fromObject(e){return wa.debug&&($n(e.x),$n(e.y),$n(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}toObject(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}get ELEMENTS(){return 3}get z(){return this[2]}set z(e){this[2]=$n(e)}angle(e){return GPt(this,e)}cross(e){return jPt(this,this,e),this.check()}rotateX({radians:e,origin:t=HE}){return zPt(this,this,t,e),this.check()}rotateY({radians:e,origin:t=HE}){return qPt(this,this,t,e),this.check()}rotateZ({radians:e,origin:t=HE}){return QPt(this,this,t,e),this.check()}transform(e){return this.transformAsPoint(e)}transformAsPoint(e){return VPt(this,this,e),this.check()}transformAsVector(e){return _Pt(this,this,e),this.check()}transformByMatrix3(e){return YZ(this,this,e),this.check()}transformByMatrix2(e){return FPt(this,this,e),this.check()}transformByQuaternion(e){return HPt(this,this,e),this.check()}};class JPt extends ZZ{toString(){let e="[";if(wa.printRowMajor){e+="row-major:";for(let t=0;t<this.RANK;++t)for(let o=0;o<this.RANK;++o)e+=` ${this[o*this.RANK+t]}`}else{e+="column-major:";for(let t=0;t<this.ELEMENTS;++t)e+=` ${this[t]}`}return e+="]",e}getElementIndex(e,t){return t*this.RANK+e}getElement(e,t){return this[t*this.RANK+e]}setElement(e,t,o){return this[t*this.RANK+e]=$n(o),this}getColumn(e,t=new Array(this.RANK).fill(-0)){const o=e*this.RANK;for(let n=0;n<this.RANK;++n)t[n]=this[o+n];return t}setColumn(e,t){const o=e*this.RANK;for(let n=0;n<this.RANK;++n)this[o+n]=t[n];return this}}function ZPt(i,e){if(i===e){const t=e[1],o=e[2],n=e[5];i[1]=e[3],i[2]=e[6],i[3]=t,i[5]=e[7],i[6]=o,i[7]=n}else i[0]=e[0],i[1]=e[3],i[2]=e[6],i[3]=e[1],i[4]=e[4],i[5]=e[7],i[6]=e[2],i[7]=e[5],i[8]=e[8];return i}function WPt(i,e){const t=e[0],o=e[1],n=e[2],r=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8],u=d*a-s*c,h=-d*r+s*l,p=c*r-a*l;let A=t*u+o*h+n*p;return A?(A=1/A,i[0]=u*A,i[1]=(-d*o+n*c)*A,i[2]=(s*o-n*a)*A,i[3]=h*A,i[4]=(d*t-n*l)*A,i[5]=(-s*t+n*r)*A,i[6]=p*A,i[7]=(-c*t+o*l)*A,i[8]=(a*t-o*r)*A,i):null}function YPt(i){const e=i[0],t=i[1],o=i[2],n=i[3],r=i[4],a=i[5],s=i[6],l=i[7],c=i[8];return e*(c*r-a*l)+t*(-c*n+a*s)+o*(l*n-r*s)}function XZ(i,e,t){const o=e[0],n=e[1],r=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=t[0],p=t[1],A=t[2],f=t[3],m=t[4],g=t[5],y=t[6],v=t[7],w=t[8];return i[0]=h*o+p*a+A*c,i[1]=h*n+p*s+A*d,i[2]=h*r+p*l+A*u,i[3]=f*o+m*a+g*c,i[4]=f*n+m*s+g*d,i[5]=f*r+m*l+g*u,i[6]=y*o+v*a+w*c,i[7]=y*n+v*s+w*d,i[8]=y*r+v*l+w*u,i}function XPt(i,e,t){const o=e[0],n=e[1],r=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=t[0],p=t[1];return i[0]=o,i[1]=n,i[2]=r,i[3]=a,i[4]=s,i[5]=l,i[6]=h*o+p*a+c,i[7]=h*n+p*s+d,i[8]=h*r+p*l+u,i}function $Pt(i,e,t){const o=e[0],n=e[1],r=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=Math.sin(t),p=Math.cos(t);return i[0]=p*o+h*a,i[1]=p*n+h*s,i[2]=p*r+h*l,i[3]=p*a-h*o,i[4]=p*s-h*n,i[5]=p*l-h*r,i[6]=c,i[7]=d,i[8]=u,i}function $Z(i,e,t){const o=t[0],n=t[1];return i[0]=o*e[0],i[1]=o*e[1],i[2]=o*e[2],i[3]=n*e[3],i[4]=n*e[4],i[5]=n*e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i}function eIt(i,e){const t=e[0],o=e[1],n=e[2],r=e[3],a=t+t,s=o+o,l=n+n,c=t*a,d=o*a,u=o*s,h=n*a,p=n*s,A=n*l,f=r*a,m=r*s,g=r*l;return i[0]=1-u-A,i[3]=d-g,i[6]=h+m,i[1]=d+g,i[4]=1-c-A,i[7]=p-f,i[2]=h-m,i[5]=p+f,i[8]=1-c-u,i}var zE;(function(i){i[i.COL0ROW0=0]="COL0ROW0",i[i.COL0ROW1=1]="COL0ROW1",i[i.COL0ROW2=2]="COL0ROW2",i[i.COL1ROW0=3]="COL1ROW0",i[i.COL1ROW1=4]="COL1ROW1",i[i.COL1ROW2=5]="COL1ROW2",i[i.COL2ROW0=6]="COL2ROW0",i[i.COL2ROW1=7]="COL2ROW1",i[i.COL2ROW2=8]="COL2ROW2"})(zE||(zE={}));const tIt=Object.freeze([1,0,0,0,1,0,0,0,1]);let Dv=class extends JPt{static get IDENTITY(){return oIt()}static get ZERO(){return iIt()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return zE}constructor(i,...e){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(i)?this.copy(i):e.length>0?this.copy([i,...e]):this.identity()}copy(i){return this[0]=i[0],this[1]=i[1],this[2]=i[2],this[3]=i[3],this[4]=i[4],this[5]=i[5],this[6]=i[6],this[7]=i[7],this[8]=i[8],this.check()}identity(){return this.copy(tIt)}fromObject(i){return this.check()}fromQuaternion(i){return eIt(this,i),this.check()}set(i,e,t,o,n,r,a,s,l){return this[0]=i,this[1]=e,this[2]=t,this[3]=o,this[4]=n,this[5]=r,this[6]=a,this[7]=s,this[8]=l,this.check()}setRowMajor(i,e,t,o,n,r,a,s,l){return this[0]=i,this[1]=o,this[2]=a,this[3]=e,this[4]=n,this[5]=s,this[6]=t,this[7]=r,this[8]=l,this.check()}determinant(){return YPt(this)}transpose(){return ZPt(this,this),this.check()}invert(){return WPt(this,this),this.check()}multiplyLeft(i){return XZ(this,i,this),this.check()}multiplyRight(i){return XZ(this,this,i),this.check()}rotate(i){return $Pt(this,this,i),this.check()}scale(i){return Array.isArray(i)?$Z(this,this,i):$Z(this,this,[i,i]),this.check()}translate(i){return XPt(this,this,i),this.check()}transform(i,e){let t;switch(i.length){case 2:t=DPt(e||[-0,-0],i,this);break;case 3:t=YZ(e||[-0,-0,-0],i,this);break;case 4:t=OPt(e||[-0,-0,-0,-0],i,this);break;default:throw new Error("Illegal vector")}return TPt(t,i.length),t}transformVector(i,e){return this.transform(i,e)}transformVector2(i,e){return this.transform(i,e)}transformVector3(i,e){return this.transform(i,e)}},e7,t7=null;function iIt(){return e7||(e7=new Dv([0,0,0,0,0,0,0,0,0]),Object.freeze(e7)),e7}function oIt(){return t7||(t7=new Dv,Object.freeze(t7)),t7}const i7="KHR_texture_transform",rIt=i7,o7=new KPt,nIt=new Dv,aIt=new Dv;async function sIt(i,e){if(!new gr(i).hasExtension(i7)||!e.gltf?.loadBuffers)return;const t=i.json.materials||[];for(let o=0;o<t.length;o++)lIt(o,i)}function lIt(i,e){const t=e.json.materials?.[i],o=[t?.pbrMetallicRoughness?.baseColorTexture,t?.emissiveTexture,t?.normalTexture,t?.occlusionTexture,t?.pbrMetallicRoughness?.metallicRoughnessTexture],n=[];for(const r of o)r&&r?.extensions?.[i7]&&cIt(e,i,r,n)}function cIt(i,e,t,o){const n=dIt(t,o);if(!n)return;const r=i.json.meshes||[];for(const a of r)for(const s of a.primitives){const l=s.material;Number.isFinite(l)&&e===l&&uIt(i,s,n)}}function dIt(i,e){const t=i.extensions?.[i7],{texCoord:o=0}=i,{texCoord:n=o}=t;if(e.findIndex(([r,a])=>r===o&&a===n)===-1){const r=fIt(t);return o!==n&&(i.texCoord=n),e.push([o,n]),{originalTexCoord:o,texCoord:n,matrix:r}}return null}function uIt(i,e,t){const{originalTexCoord:o,texCoord:n,matrix:r}=t,a=e.attributes[`TEXCOORD_${o}`];if(Number.isFinite(a)){const s=i.json.accessors?.[a];if(s&&s.bufferView){const l=i.json.bufferViews?.[s.bufferView];if(l){const{arrayBuffer:c,byteOffset:d}=i.buffers[l.buffer],u=(d||0)+(s.byteOffset||0)+(l.byteOffset||0),{ArrayType:h,length:p}=PE(s,l),A=xZ[s.componentType],f=CZ[s.type],m=l.byteStride||A*f,g=new Float32Array(p);for(let y=0;y<s.count;y++){const v=new h(c,u+y*m,2);o7.set(v[0],v[1],1),o7.transformByMatrix3(r),g.set([o7[0],o7[1]],y*f)}o===n?hIt(s,l,i.buffers,g):pIt(n,s,e,i,g)}}}}function hIt(i,e,t,o){i.componentType=5126,t.push({arrayBuffer:o.buffer,byteOffset:0,byteLength:o.buffer.byteLength}),e.buffer=t.length-1,e.byteLength=o.buffer.byteLength,e.byteOffset=0,delete e.byteStride}function pIt(i,e,t,o,n){o.buffers.push({arrayBuffer:n.buffer,byteOffset:0,byteLength:n.buffer.byteLength});const r=o.json.bufferViews;if(!r)return;r.push({buffer:o.buffers.length-1,byteLength:n.buffer.byteLength,byteOffset:0});const a=o.json.accessors;a&&(a.push({bufferView:r?.length-1,byteOffset:0,componentType:5126,count:e.count,type:"VEC2"}),t.attributes[`TEXCOORD_${i}`]=a.length-1)}function fIt(i){const{offset:e=[0,0],rotation:t=0,scale:o=[1,1]}=i,n=new Dv().set(1,0,0,0,1,0,e[0],e[1],1),r=nIt.set(Math.cos(t),Math.sin(t),0,-Math.sin(t),Math.cos(t),0,0,0,1),a=aIt.set(o[0],0,0,0,o[1],0,0,0,1);return n.multiplyRight(r).multiplyRight(a)}const AIt=Object.freeze(Object.defineProperty({__proto__:null,decode:sIt,name:rIt},Symbol.toStringTag,{value:"Module"})),Tu="KHR_lights_punctual",gIt=Tu;async function mIt(i){const e=new gr(i),{json:t}=e,o=e.getExtension(Tu);o&&(e.json.lights=o.lights,e.removeExtension(Tu));for(const n of t.nodes||[]){const r=e.getObjectExtension(n,Tu);r&&(n.light=r.light),e.removeObjectExtension(n,Tu)}}async function vIt(i){const e=new gr(i),{json:t}=e;if(t.lights){const o=e.addExtension(Tu);Yn(!o.lights),o.lights=t.lights,delete t.lights}if(e.json.lights){for(const o of e.json.lights){const n=o.node;e.addObjectExtension(n,Tu,o)}delete e.json.lights}}const yIt=Object.freeze(Object.defineProperty({__proto__:null,decode:mIt,encode:vIt,name:gIt},Symbol.toStringTag,{value:"Module"})),_v="KHR_materials_unlit",bIt=_v;async function wIt(i){const e=new gr(i),{json:t}=e;for(const o of t.materials||[])o.extensions&&o.extensions.KHR_materials_unlit&&(o.unlit=!0),e.removeObjectExtension(o,_v);e.removeExtension(_v)}function CIt(i){const e=new gr(i),{json:t}=e;if(e.materials)for(const o of t.materials||[])o.unlit&&(delete o.unlit,e.addObjectExtension(o,_v,{}),e.addExtension(_v))}const xIt=Object.freeze(Object.defineProperty({__proto__:null,decode:wIt,encode:CIt,name:bIt},Symbol.toStringTag,{value:"Module"})),Fv="KHR_techniques_webgl",kIt=Fv;async function MIt(i){const e=new gr(i),{json:t}=e,o=e.getExtension(Fv);if(o){const n=EIt(o,e);for(const r of t.materials||[]){const a=e.getObjectExtension(r,Fv);a&&(r.technique=Object.assign({},a,n[a.technique]),r.technique.values=PIt(r.technique,e)),e.removeObjectExtension(r,Fv)}e.removeExtension(Fv)}}async function BIt(i,e){}function EIt(i,e){const{programs:t=[],shaders:o=[],techniques:n=[]}=i,r=new TextDecoder;return o.forEach(a=>{if(Number.isFinite(a.bufferView))a.code=r.decode(e.getTypedArrayForBufferView(a.bufferView));else throw new Error("KHR_techniques_webgl: no shader code")}),t.forEach(a=>{a.fragmentShader=o[a.fragmentShader],a.vertexShader=o[a.vertexShader]}),n.forEach(a=>{a.program=t[a.program]}),n}function PIt(i,e){const t=Object.assign({},i.values);return Object.keys(i.uniforms||{}).forEach(o=>{i.uniforms[o].value&&!(o in t)&&(t[o]=i.uniforms[o].value)}),Object.keys(t).forEach(o=>{typeof t[o]=="object"&&t[o].index!==void 0&&(t[o].texture=e.getTexture(t[o].index))}),t}const IIt=Object.freeze(Object.defineProperty({__proto__:null,decode:MIt,encode:BIt,name:kIt},Symbol.toStringTag,{value:"Module"})),eW=[VBt,hBt,GEt,ZEt,XEt,BPt,yIt,xIt,IIt,AIt,rEt];function SIt(i,e={},t){const o=eW.filter(n=>tW(n.name,e));for(const n of o)n.preprocess?.(i,e,t)}async function TIt(i,e={},t){const o=eW.filter(n=>tW(n.name,e));for(const n of o)await n.decode?.(i,e,t)}function tW(i,e){const t=e?.gltf?.excludeExtensions||{};return!(i in t&&!t[i])}const qE="KHR_binary_glTF";function RIt(i){const e=new gr(i),{json:t}=e;for(const o of t.images||[]){const n=e.getObjectExtension(o,qE);n&&Object.assign(o,n),e.removeObjectExtension(o,qE)}t.buffers&&t.buffers[0]&&delete t.buffers[0].uri,e.removeExtension(qE)}const iW={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},LIt={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class DIt{idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}};json;normalize(e,t){this.json=e.json;const o=e.json;switch(o.asset&&o.asset.version){case"2.0":return;case void 0:case"1.0":break;default:console.warn(`glTF: Unknown version ${o.asset.version}`);return}if(!t.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(o),this._convertTopLevelObjectsToArrays(o),RIt(e),this._convertObjectIdsToArrayIndices(o),this._updateObjects(o),this._updateMaterial(o)}_addAsset(e){e.asset=e.asset||{},e.asset.version="2.0",e.asset.generator=e.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(e){for(const t in iW)this._convertTopLevelObjectToArray(e,t)}_convertTopLevelObjectToArray(e,t){const o=e[t];if(!(!o||Array.isArray(o))){e[t]=[];for(const n in o){const r=o[n];r.id=r.id||n;const a=e[t].length;e[t].push(r),this.idToIndexMap[t][n]=a}}}_convertObjectIdsToArrayIndices(e){for(const t in iW)this._convertIdsToIndices(e,t);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));for(const t of e.textures)this._convertTextureIds(t);for(const t of e.meshes)this._convertMeshIds(t);for(const t of e.nodes)this._convertNodeIds(t);for(const t of e.scenes)this._convertSceneIds(t)}_convertTextureIds(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}_convertMeshIds(e){for(const t of e.primitives){const{attributes:o,indices:n,material:r}=t;for(const a in o)o[a]=this._convertIdToIndex(o[a],"accessor");n&&(t.indices=this._convertIdToIndex(n,"accessor")),r&&(t.material=this._convertIdToIndex(r,"material"))}}_convertNodeIds(e){e.children&&(e.children=e.children.map(t=>this._convertIdToIndex(t,"node"))),e.meshes&&(e.meshes=e.meshes.map(t=>this._convertIdToIndex(t,"mesh")))}_convertSceneIds(e){e.nodes&&(e.nodes=e.nodes.map(t=>this._convertIdToIndex(t,"node")))}_convertIdsToIndices(e,t){e[t]||(console.warn(`gltf v1: json doesn't contain attribute ${t}`),e[t]=[]);for(const o of e[t])for(const n in o){const r=o[n],a=this._convertIdToIndex(r,n);o[n]=a}}_convertIdToIndex(e,t){const o=LIt[t];if(o in this.idToIndexMap){const n=this.idToIndexMap[o][e];if(!Number.isFinite(n))throw new Error(`gltf v1: failed to resolve ${t} with id ${e}`);return n}return e}_updateObjects(e){for(const t of this.json.buffers)delete t.type}_updateMaterial(e){for(const t of e.materials){t.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const o=t.values?.tex||t.values?.texture2d_0||t.values?.diffuseTex,n=e.textures.findIndex(r=>r.id===o);n!==-1&&(t.pbrMetallicRoughness.baseColorTexture={index:n})}}}function _It(i,e={}){return new DIt().normalize(i,e)}async function FIt(i,e,t=0,o,n){return OIt(i,e,t,o),_It(i,{normalize:o?.gltf?.normalize}),SIt(i,o,n),o?.gltf?.loadBuffers&&i.json.buffers&&await UIt(i,o,n),o?.gltf?.loadImages&&await NIt(i,o,n),await TIt(i,o,n),i}function OIt(i,e,t,o){if(o.uri&&(i.baseUri=o.uri),e instanceof ArrayBuffer&&!EEt(e,t,o)&&(e=new TextDecoder().decode(e)),typeof e=="string")i.json=Zxt(e);else if(e instanceof ArrayBuffer){const a={};t=PEt(a,e,t,o.glb),Yn(a.type==="glTF",`Invalid GLB magic string ${a.type}`),i._glb=a,i.json=a.json}else Yn(!1,"GLTF: must be ArrayBuffer or string");const n=i.json.buffers||[];if(i.buffers=new Array(n.length).fill(null),i._glb&&i._glb.header.hasBinChunk){const{binChunks:a}=i._glb;i.buffers[0]={arrayBuffer:a[0].arrayBuffer,byteOffset:a[0].byteOffset,byteLength:a[0].byteLength}}const r=i.json.images||[];i.images=new Array(r.length).fill({})}async function UIt(i,e,t){const o=i.json.buffers||[];for(let n=0;n<o.length;++n){const r=o[n];if(r.uri){const{fetch:a}=t;Yn(a);const s=HZ(r.uri,e),l=await(await t?.fetch?.(s))?.arrayBuffer?.();i.buffers[n]={arrayBuffer:l,byteOffset:0,byteLength:l.byteLength},delete r.uri}else i.buffers[n]===null&&(i.buffers[n]={arrayBuffer:new ArrayBuffer(r.byteLength),byteOffset:0,byteLength:r.byteLength})}}async function NIt(i,e,t){const o=jIt(i),n=i.json.images||[],r=[];for(const a of o)r.push(VIt(i,n[a],a,e,t));return await Promise.all(r)}function jIt(i){const e=new Set,t=i.json.textures||[];for(const o of t)o.source!==void 0&&e.add(o.source);return Array.from(e).sort()}async function VIt(i,e,t,o,n){let r;if(e.uri&&!e.hasOwnProperty("bufferView")){const s=HZ(e.uri,o),{fetch:l}=n;r=await(await l(s)).arrayBuffer(),e.bufferView={data:r}}if(Number.isFinite(e.bufferView)){const s=YMt(i.json,i.buffers,e.bufferView);r=GJ(s.buffer,s.byteOffset,s.byteLength)}Yn(r,"glTF image has no data");let a=await IJ(r,[VMt,bEt],{...o,mimeType:e.mimeType,basis:o.basis||{format:jZ()}},n);a&&a[0]&&(a={compressed:!0,mipmaps:!1,width:a[0].width,height:a[0].height,data:a[0]}),i.images=i.images||[],i.images[t]=a}const QE={dataType:null,batchType:null,name:"glTF",id:"gltf",module:"gltf",version:nEt,extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:HIt,options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0},log:console}};async function HIt(i,e={},t){e={...QE.options,...e},e.gltf={...QE.options.gltf,...e.gltf};const{byteOffset:o=0}=e;return await FIt({},i,o,e,t)}const zIt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},qIt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Ca={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},QIt={magFilter:Ca.TEXTURE_MAG_FILTER,minFilter:Ca.TEXTURE_MIN_FILTER,wrapS:Ca.TEXTURE_WRAP_S,wrapT:Ca.TEXTURE_WRAP_T},GIt={[Ca.TEXTURE_MAG_FILTER]:Ca.LINEAR,[Ca.TEXTURE_MIN_FILTER]:Ca.NEAREST_MIPMAP_LINEAR,[Ca.TEXTURE_WRAP_S]:Ca.REPEAT,[Ca.TEXTURE_WRAP_T]:Ca.REPEAT};function KIt(){return{id:"default-sampler",parameters:GIt}}function JIt(i){return qIt[i]}function ZIt(i){return zIt[i]}class WIt{baseUri="";jsonUnprocessed;json;buffers=[];images=[];postProcess(e,t={}){const{json:o,buffers:n=[],images:r=[]}=e,{baseUri:a=""}=e;return Yn(o),this.baseUri=a,this.buffers=n,this.images=r,this.jsonUnprocessed=o,this.json=this._resolveTree(e.json,t),this.json}_resolveTree(e,t={}){const o={...e};return this.json=o,e.bufferViews&&(o.bufferViews=e.bufferViews.map((n,r)=>this._resolveBufferView(n,r))),e.images&&(o.images=e.images.map((n,r)=>this._resolveImage(n,r))),e.samplers&&(o.samplers=e.samplers.map((n,r)=>this._resolveSampler(n,r))),e.textures&&(o.textures=e.textures.map((n,r)=>this._resolveTexture(n,r))),e.accessors&&(o.accessors=e.accessors.map((n,r)=>this._resolveAccessor(n,r))),e.materials&&(o.materials=e.materials.map((n,r)=>this._resolveMaterial(n,r))),e.meshes&&(o.meshes=e.meshes.map((n,r)=>this._resolveMesh(n,r))),e.nodes&&(o.nodes=e.nodes.map((n,r)=>this._resolveNode(n,r)),o.nodes=o.nodes.map((n,r)=>this._resolveNodeChildren(n))),e.skins&&(o.skins=e.skins.map((n,r)=>this._resolveSkin(n,r))),e.scenes&&(o.scenes=e.scenes.map((n,r)=>this._resolveScene(n,r))),typeof this.json.scene=="number"&&o.scenes&&(o.scene=o.scenes[this.json.scene]),o}getScene(e){return this._get(this.json.scenes,e)}getNode(e){return this._get(this.json.nodes,e)}getSkin(e){return this._get(this.json.skins,e)}getMesh(e){return this._get(this.json.meshes,e)}getMaterial(e){return this._get(this.json.materials,e)}getAccessor(e){return this._get(this.json.accessors,e)}getCamera(e){return this._get(this.json.cameras,e)}getTexture(e){return this._get(this.json.textures,e)}getSampler(e){return this._get(this.json.samplers,e)}getImage(e){return this._get(this.json.images,e)}getBufferView(e){return this._get(this.json.bufferViews,e)}getBuffer(e){return this._get(this.json.buffers,e)}_get(e,t){if(typeof t=="object")return t;const o=e&&e[t];return o||console.warn(`glTF file error: Could not find ${e}[${t}]`),o}_resolveScene(e,t){return{...e,id:e.id||`scene-${t}`,nodes:(e.nodes||[]).map(o=>this.getNode(o))}}_resolveNode(e,t){const o={...e,id:e?.id||`node-${t}`};return e.mesh!==void 0&&(o.mesh=this.getMesh(e.mesh)),e.camera!==void 0&&(o.camera=this.getCamera(e.camera)),e.skin!==void 0&&(o.skin=this.getSkin(e.skin)),e.meshes!==void 0&&e.meshes.length&&(o.mesh=e.meshes.reduce((n,r)=>{const a=this.getMesh(r);return n.id=a.id,n.primitives=n.primitives.concat(a.primitives),n},{primitives:[]})),o}_resolveNodeChildren(e){return e.children&&(e.children=e.children.map(t=>this.getNode(t))),e}_resolveSkin(e,t){const o=typeof e.inverseBindMatrices=="number"?this.getAccessor(e.inverseBindMatrices):void 0;return{...e,id:e.id||`skin-${t}`,inverseBindMatrices:o}}_resolveMesh(e,t){const o={...e,id:e.id||`mesh-${t}`,primitives:[]};return e.primitives&&(o.primitives=e.primitives.map(n=>{const r={...n,attributes:{},indices:void 0,material:void 0},a=n.attributes;for(const s in a)r.attributes[s]=this.getAccessor(a[s]);return n.indices!==void 0&&(r.indices=this.getAccessor(n.indices)),n.material!==void 0&&(r.material=this.getMaterial(n.material)),r})),o}_resolveMaterial(e,t){const o={...e,id:e.id||`material-${t}`};if(o.normalTexture&&(o.normalTexture={...o.normalTexture},o.normalTexture.texture=this.getTexture(o.normalTexture.index)),o.occlusionTexture&&(o.occlusionTexture={...o.occlusionTexture},o.occlusionTexture.texture=this.getTexture(o.occlusionTexture.index)),o.emissiveTexture&&(o.emissiveTexture={...o.emissiveTexture},o.emissiveTexture.texture=this.getTexture(o.emissiveTexture.index)),o.emissiveFactor||(o.emissiveFactor=o.emissiveTexture?[1,1,1]:[0,0,0]),o.pbrMetallicRoughness){o.pbrMetallicRoughness={...o.pbrMetallicRoughness};const n=o.pbrMetallicRoughness;n.baseColorTexture&&(n.baseColorTexture={...n.baseColorTexture},n.baseColorTexture.texture=this.getTexture(n.baseColorTexture.index)),n.metallicRoughnessTexture&&(n.metallicRoughnessTexture={...n.metallicRoughnessTexture},n.metallicRoughnessTexture.texture=this.getTexture(n.metallicRoughnessTexture.index))}return o}_resolveAccessor(e,t){const o=JIt(e.componentType),n=ZIt(e.type),r=o*n,a={...e,id:e.id||`accessor-${t}`,bytesPerComponent:o,components:n,bytesPerElement:r,value:void 0,bufferView:void 0,sparse:void 0};if(e.bufferView!==void 0&&(a.bufferView=this.getBufferView(e.bufferView)),a.bufferView){const s=a.bufferView.buffer,{ArrayType:l,byteLength:c}=PE(a,a.bufferView),d=(a.bufferView.byteOffset||0)+(a.byteOffset||0)+s.byteOffset;let u=s.arrayBuffer.slice(d,d+c);a.bufferView.byteStride&&(u=this._getValueFromInterleavedBuffer(s,d,a.bufferView.byteStride,a.bytesPerElement,a.count)),a.value=new l(u)}return a}_getValueFromInterleavedBuffer(e,t,o,n,r){const a=new Uint8Array(r*n);for(let s=0;s<r;s++){const l=t+s*o;a.set(new Uint8Array(e.arrayBuffer.slice(l,l+n)),s*n)}return a.buffer}_resolveTexture(e,t){return{...e,id:e.id||`texture-${t}`,sampler:typeof e.sampler=="number"?this.getSampler(e.sampler):KIt(),source:typeof e.source=="number"?this.getImage(e.source):void 0}}_resolveSampler(e,t){const o={id:e.id||`sampler-${t}`,...e,parameters:{}};for(const n in o){const r=this._enumSamplerParameter(n);r!==void 0&&(o.parameters[r]=o[n])}return o}_enumSamplerParameter(e){return QIt[e]}_resolveImage(e,t){const o={...e,id:e.id||`image-${t}`,image:null,bufferView:e.bufferView!==void 0?this.getBufferView(e.bufferView):void 0},n=this.images[t];return n&&(o.image=n),o}_resolveBufferView(e,t){const o=e.buffer,n=this.buffers[o].arrayBuffer;let r=this.buffers[o].byteOffset||0;return e.byteOffset&&(r+=e.byteOffset),{id:`bufferView-${t}`,...e,buffer:this.buffers[o],data:new Uint8Array(n,r,e.byteLength)}}_resolveCamera(e,t){const o={...e,id:e.id||`camera-${t}`};return o.perspective,o.orthographic,o}}function YIt(i,e){return new WIt().postProcess(i,e)}class XIt{constructor(e){}load(e,t,o,n,r,a,s){n=n||{},$It(e,t,o,n,r,function(){no.scheduleTask(function(){r.scene.fire("modelLoaded",r.id),r.fire("loaded",!0,!1)}),a&&a()},function(l){e.error(l),s&&s(l),r.fire("error",l)})}parse(e,t,o,n,r,a,s){n=n||{},GE(e,"",t,o,n,r,function(){r.scene.fire("modelLoaded",r.id),r.fire("loaded",!0,!1),a&&a()},function(l){r.error(l),r.fire("error",l),s&&s(l)})}}function $It(i,e,t,o,n,r,a){const s=i.viewer.scene.canvas.spinner;s.processes++,e.split(".").pop()==="glb"?i.dataSource.getGLB(e,l=>{o.basePath=oW(e),GE(i,e,l,t,o,n,r,a),s.processes--},l=>{s.processes--,a(l)}):i.dataSource.getGLTF(e,l=>{o.basePath=oW(e),GE(i,e,l,t,o,n,r,a),s.processes--},l=>{s.processes--,a(l)})}function oW(i){const e=i.lastIndexOf("/");return e!==0?i.substring(0,e+1):""}function GE(i,e,t,o,n,r,a,s){const l=i.viewer.scene.canvas.spinner;l.processes++,wE(t,QE,{baseUri:n.basePath}).then(c=>{const d=YIt(c),u={entityId:n.entityId,autoMetaModel:n.autoMetaModel,globalizeObjectIds:n.globalizeObjectIds,metaObjects:[],loadBuffer:n.loadBuffer,basePath:n.basePath,handlenode:n.handlenode,backfaces:!!n.backfaces,gltfData:d,scene:r.scene,plugin:i,sceneModel:r,numObjects:0,nextId:0};eSt(u),iSt(u),n.autoMetaModel&&u.metaObjects.push({id:r.id,type:"Default",name:r.id}),nSt(u),r.finalize(),n.autoMetaModel&&i.viewer.metaScene.createMetaModel(r.id,{metaObjects:u.metaObjects}),l.processes--,a()}).catch(c=>{s&&s(c)})}function eSt(i){const e=i.gltfData.textures;if(e)for(let t=0,o=e.length;t<o;t++)tSt(i,e[t])}function tSt(i,e){if(!e.source||!e.source.image)return;const t=`texture-${i.nextId++}`;let o=bp;switch(e.sampler.minFilter){case 9728:o=wu;break;case 9729:o=Gr;break;case 9984:o=Km;break;case 9985:o=Jm;break;case 9986:o=bp;break;case 9987:o=wp;break}let n=Gr;switch(e.sampler.magFilter){case 9728:n=wu;break;case 9729:n=Gr;break}let r=mo;switch(e.sampler.wrapS){case 33071:r=Qr;break;case 33648:r=Dl;break;case 10497:r=mo;break}let a=mo;switch(e.sampler.wrapT){case 33071:a=Qr;break;case 33648:a=Dl;break;case 10497:a=mo;break}let s=mo;switch(e.sampler.wrapR){case 33071:s=Qr;break;case 33648:s=Dl;break;case 10497:s=mo;break}i.sceneModel.createTexture({id:t,image:e.source.image,flipY:!!e.flipY,minFilter:o,magFilter:n,wrapS:r,wrapT:a,wrapR:s,encoding:ao}),e._textureId=t}function iSt(i){const e=i.gltfData.materials;if(e)for(let t=0,o=e.length;t<o;t++){const n=e[t];n._textureSetId=oSt(i,n),n._attributes=rSt(i,n)}}function oSt(i,e){const t={};switch(e.normalTexture&&(t.normalTextureId=e.normalTexture.texture._textureId),e.occlusionTexture&&(t.occlusionTextureId=e.occlusionTexture.texture._textureId),e.emissiveTexture&&(t.emissiveTextureId=e.emissiveTexture.texture._textureId),e.alphaMode){case"OPAQUE":break;case"MASK":const r=e.alphaCutoff;t.alphaCutoff=r!==void 0?r:.5;break}const o=e.pbrMetallicRoughness;if(e.pbrMetallicRoughness){const r=e.pbrMetallicRoughness,a=r.baseColorTexture||r.colorTexture;a&&(a.texture?t.colorTextureId=a.texture._textureId:t.colorTextureId=i.gltfData.textures[a.index]._textureId),o.metallicRoughnessTexture&&(t.metallicRoughnessTextureId=o.metallicRoughnessTexture.texture._textureId)}const n=e.extensions;if(n){const r=n.KHR_materials_pbrSpecularGlossiness;if(r){r.specularTexture;const a=r.specularColorTexture;a!=null&&(t.colorTextureId=i.gltfData.textures[a.index]._textureId)}}return t.normalTextureId!==void 0||t.occlusionTextureId!==void 0||t.emissiveTextureId!==void 0||t.colorTextureId!==void 0||t.metallicRoughnessTextureId!==void 0?(t.id=`textureSet-${i.nextId++};`,i.sceneModel.createTextureSet(t),t.id):null}function rSt(i,e){const t=e.extensions,o={color:new Float32Array([1,1,1,1]),opacity:1,metallic:0,roughness:1,doubleSided:!0};if(t){const r=t.KHR_materials_pbrSpecularGlossiness;if(r){const s=r.diffuseFactor;s!=null&&o.color.set(s)}const a=t.KHR_materials_common;if(a){const s=a.technique,l=a.values||{},c=s==="BLINN",d=s==="PHONG",u=s==="LAMBERT",h=l.diffuse;h&&(c||d||u)&&(mt.isString(h)||o.color.set(h));const p=l.transparency;p!=null&&(o.opacity=p);const A=l.transparent;A!=null&&(o.opacity=A)}}const n=e.pbrMetallicRoughness;if(n){const r=n.baseColorFactor;r&&(o.color[0]=r[0],o.color[1]=r[1],o.color[2]=r[2],o.opacity=r[3]);const a=n.metallicFactor;a!=null&&(o.metallic=a);const s=n.roughnessFactor;s!=null&&(o.roughness=s)}return o.doubleSided=e.doubleSided!==!1,o}function nSt(i){const e=i.gltfData,t=e.scene||e.scenes[0];if(!t){lSt(i,"glTF has no default scene");return}const o=t.nodes;if(!o)return;(function a(s){s.forEach(l=>{const c=l.mesh;c&&(c.instances||=0,c.instances+=1),l.children&&a(l.children)})})(o);const n=[];let r=null;(function a(s,l,c){s.forEach(d=>{const u=d.name;let h=u!=null&&u||l===0&&"entity-"+i.nextId++;if(h){for(;i.sceneModel.objects[h];)h="entity-"+i.nextId++;n.push(r),r=[]}const p=aSt(d,c);if(d.mesh&&sSt(d,i,p,r),d.children&&a(d.children,l+1,p),h){if(r.length>0){const A=i.globalizeObjectIds?C.globalizeObjectId(i.sceneModel.id,h):h;i.sceneModel.createEntity({id:A,meshIds:r,isObject:!0}),i.autoMetaModel&&i.metaObjects.push({id:A,type:"Default",name:A,parent:i.sceneModel.id})}r=n.pop()}})})(o,0,null)}function aSt(i,e){let t;return i.matrix&&(t=i.matrix,e?e=C.mulMat4(e,t,C.mat4()):e=t),i.translation&&(t=C.translationMat4v(i.translation),e?e=C.mulMat4(e,t,C.mat4()):e=t),i.rotation&&(t=C.quaternionToMat4(i.rotation),e?e=C.mulMat4(e,t,C.mat4()):e=t),i.scale&&(t=C.scalingMat4v(i.scale),e?e=C.mulMat4(e,t,C.mat4()):e=t),e}function sSt(i,e,t,o){const n=i.mesh;if(!n)return;const r=n.primitives.length;if(r>0)for(let a=0;a<r;a++){const s=n.primitives[a];if(s.mode<4)continue;const l={id:e.sceneModel.id+"."+e.numObjects++},c=s.material;c?(l.textureSetId=c._textureSetId,l.color=c._attributes.color,l.opacity=c._attributes.opacity,l.metallic=c._attributes.metallic,l.roughness=c._attributes.roughness):(l.color=new Float32Array([1,1,1]),l.opacity=1);const d=e.backfaces!==!1||c&&c.doubleSided!==!1;switch(s.mode){case 0:l.primitive="points";break;case 1:l.primitive="lines";break;case 2:l.primitive="lines";break;case 3:l.primitive="lines";break;case 4:l.primitive=d?"triangles":"solid";break;case 5:l.primitive=d?"triangles":"solid";break;case 6:l.primitive=d?"triangles":"solid";break;default:l.primitive=d?"triangles":"solid"}const u=s.attributes.POSITION;if(!u)continue;l.localPositions=u.value,l.positions=new Float64Array(l.localPositions.length),s.attributes.NORMAL&&(l.normals=s.attributes.NORMAL.value),s.attributes.TEXCOORD_0&&(l.uv=s.attributes.TEXCOORD_0.value),s.indices&&(l.indices=s.indices.value),t?C.transformPositions3(t,l.localPositions,l.positions):l.positions.set(l.localPositions);const h=C.vec3();T8(l.positions,l.positions,h)&&(l.origin=h),e.sceneModel.createMesh(l),o.push(l.id)}}function lSt(i,e){i.plugin.error(e)}const rW={DEFAULT:{}};class KE extends va{constructor(e,t={}){super("GLTFLoader",e,t),this._sceneModelLoader=new XIt(this,t),this.dataSource=t.dataSource,this.objectDefaults=t.objectDefaults}set dataSource(e){this._dataSource=e||new PJ}get dataSource(){return this._dataSource}set objectDefaults(e){this._objectDefaults=e||rW}get objectDefaults(){return this._objectDefaults}load(e={}){e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id);const t=new gv(this.viewer.scene,mt.apply(e,{isModel:!0,dtxEnabled:e.dtxEnabled})),o=t.id;if(!e.src&&!e.gltf)return this.error("load() param expected: src or gltf"),t;if(e.metaModelSrc||e.metaModelJSON){const n=r=>{this.viewer.metaScene.createMetaModel(o,r,{}),this.viewer.scene.canvas.spinner.processes--,e.src?this._sceneModelLoader.load(this,e.src,r,e,t):this._sceneModelLoader.parse(this,e.gltf,r,e,t)};if(e.metaModelSrc){const r=e.metaModelSrc;this.viewer.scene.canvas.spinner.processes++,this._dataSource.getMetaModel(r,a=>{this.viewer.scene.canvas.spinner.processes--,n(a)},a=>{this.error(`load(): Failed to load model metadata for model '${o} from '${r}' - ${a}`),this.viewer.scene.canvas.spinner.processes--})}else e.metaModelJSON&&n(e.metaModelJSON)}else e.src?this._sceneModelLoader.load(this,e.src,null,e,t):this._sceneModelLoader.parse(this,e.gltf,null,e,t);return t.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(o)}),t}destroy(){super.destroy()}}function cSt(i,e,t={}){const o="lightgrey",n=t.hoverColor||"rgba(0,0,0,0.4)",r=t.textColor||"black",a=t.canvasElement||document.body,s=500,l=s+s/3,c=l/24,d=[{boundary:[6,6,6,6],color:t.frontColor||t.color||"#55FF55"},{boundary:[18,6,6,6],color:t.backColor||t.color||"#55FF55"},{boundary:[12,6,6,6],color:t.rightColor||t.color||"#FF5555"},{boundary:[0,6,6,6],color:t.leftColor||t.color||"#FF5555"},{boundary:[6,0,6,6],color:t.topColor||t.color||"#7777FF"},{boundary:[6,12,6,6],color:t.bottomColor||t.color||"#7777FF"}],u=[{label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,1,0],up:[0,0,1]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,-1,0],up:[0,0,1]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,0,1]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,0,1]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,0,1],up:[0,-1,0]},{boundaries:[[7,5,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,0,-1],up:[1,0,1]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-1,-1],up:[0,-1,1]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,0,-1],up:[-1,0,1]},{boundaries:[[7,11,4,2]],dir:[0,1,1],up:[0,-1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,0,1],up:[-1,0,1]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,-1,1],up:[0,1,1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,0,1],up:[1,0,1]},{boundaries:[[5,7,2,4]],dir:[1,1,0],up:[0,0,1]},{boundaries:[[11,7,2,4]],dir:[-1,1,0],up:[0,0,1]},{boundaries:[[17,7,2,4]],dir:[-1,-1,0],up:[0,0,1]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,-1,0],up:[0,0,1]},{boundaries:[[5,11,2,2]],dir:[1,1,1],up:[-1,-1,1]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[1,-1,1],up:[-1,1,1]},{boundaries:[[5,5,2,2]],dir:[1,1,-1],up:[1,1,1]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-1,-1,1],up:[1,1,1]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-1,-1,-1],up:[-1,-1,1]},{boundaries:[[11,11,2,2]],dir:[-1,1,1],up:[1,-1,1]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[1,-1,-1],up:[1,-1,1]},{boundaries:[[11,5,2,2]],dir:[-1,1,-1],up:[-1,1,1]}];t.frontColor||t.color,t.backColor||t.color,t.rightColor||t.color,t.leftColor||t.color,t.topColor||t.color,t.bottomColor||t.color;const h=[{yUp:"",label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,0,1],up:[0,1,0]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,1,0]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,1,0]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,-1,0],up:[0,0,-1]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,1,0],up:[0,0,1]},{boundaries:[[7,5,4,2]],dir:[0,-.7071,-.7071],up:[0,.7071,-.7071]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,-1,0],up:[1,1,0]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-.7071,.7071],up:[0,.7071,.7071]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,-1,0],up:[-1,1,0]},{boundaries:[[7,11,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,1,0],up:[-1,1,0]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,1,1],up:[0,1,-1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,1,0],up:[1,1,0]},{boundaries:[[5,7,2,4]],dir:[1,0,-1],up:[0,1,0]},{boundaries:[[11,7,2,4]],dir:[-1,0,-1],up:[0,1,0]},{boundaries:[[17,7,2,4]],dir:[-1,0,1],up:[0,1,0]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,0,1],up:[0,1,0]},{boundaries:[[5,11,2,2]],dir:[.5,.7071,-.5],up:[-.5,.7071,.5]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[.5,.7071,.5],up:[-.5,.7071,-.5]},{boundaries:[[5,5,2,2]],dir:[.5,-.7071,-.5],up:[.5,.7071,-.5]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-.5,.7071,.5],up:[.5,.7071,-.5]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-.5,-.7071,.5],up:[-.5,.7071,.5]},{boundaries:[[11,11,2,2]],dir:[-.5,.7071,-.5],up:[.5,.7071,.5]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[.5,-.7071,.5],up:[.5,.7071,.5]},{boundaries:[[11,5,2,2]],dir:[-.5,-.7071,-.5],up:[-.5,.7071,-.5]}];for(let y=0,v=u.length;y<v;y++)C.normalizeVec3(u[y].dir,u[y].dir),C.normalizeVec3(u[y].up,u[y].up);for(let y=0,v=h.length;y<v;y++)C.normalizeVec3(h[y].dir,h[y].dir),C.normalizeVec3(h[y].up,h[y].up);var p=h;this._textureCanvas=document.createElement("canvas"),this._textureCanvas.width=l,this._textureCanvas.height=s,this._textureCanvas.style.width=l+"px",this._textureCanvas.style.height=s+"px",this._textureCanvas.style.padding="0",this._textureCanvas.style.margin="0",this._textureCanvas.style.top="0",this._textureCanvas.style.background=o,this._textureCanvas.style.position="absolute",this._textureCanvas.style.opacity="1.0",this._textureCanvas.style.visibility="hidden",this._textureCanvas.style["z-index"]=2e6,a.appendChild(this._textureCanvas);const A=this._textureCanvas.getContext("2d");let f=!1;function m(){for(let k=0,B=d.length;k<B;k++){const E=d[k],P=E.boundary,R=Math.round(P[0]*c),T=Math.round(P[1]*c),L=Math.round(P[2]*c),F=Math.round(P[3]*c);A.fillStyle=E.color,A.fillRect(R,T,L,F)}for(let k=0,B=p.length;k<B;k++){let E,P,R,T;const L=p[k],F=L.boundaries;for(var y=0,v=F.length;y<v;y++){const U=F[y];E=Math.round(U[0]*c),P=Math.round(U[1]*c),R=Math.round(U[2]*c),T=Math.round(U[3]*c),L.highlighted&&(A.fillStyle=L.highlighted?n:L.color||o,A.fillRect(E,P,R,T))}if(L.label){A.fillStyle=r,A.font="60px sans-serif",A.textAlign="center";var w=E+R*.5,x=P+T*.7;A.fillText(g(L.label),w,x,80)}}e.glRedraw()}const g=(function(){const y={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},v={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},w={"NavCube.front":"FRONT","NavCube.back":"BACK","NavCube.right":"RIGHT","NavCube.left":"LEFT","NavCube.top":"TOP","NavCube.bottom":"BOTTOM"};return function(x){const k=f?v:y,B=k?k[x]:null;return B?i.localeService.translate(B)||w[B]||B:x}})();this.setZUp=function(){f=!0,p=u,this.clear()},this.setYUp=function(){f=!1,p=h,this.clear()},this.clear=function(){A.fillStyle=o,A.fillRect(0,0,l,s);for(var y=0,v=p.length;y<v;y++){const w=p[y];w.highlighted=!1}m()},this.getArea=function(y){const v=y[0]*l,w=s-y[1]*s;for(var x=0,k=p.length;x<k;x++){const P=p[x].boundaries;for(var B=0,E=P.length;B<E;B++){const R=P[B];if(v>=R[0]*c&&v<=(R[0]+R[2])*c&&w>=R[1]*c&&w<=(R[1]+R[3])*c)return x}}return-1},this.setAreaHighlighted=function(y,v){var w=p[y];if(!w)throw"Area not found: "+y;w.highlighted=!!v,m()},this.getAreaDir=function(y){var v=p[y];if(!v)throw"Unknown area: "+y;return v.dir},this.getAreaUp=function(y){var v=p[y];if(!v)throw"Unknown area: "+y;return v.up},this.getImage=function(){return this._textureCanvas},this.destroy=function(){this._textureCanvas&&(this._textureCanvas.parentNode.removeChild(this._textureCanvas),this._textureCanvas=null)}}const nW=C.vec3(),aW=C.vec3();C.mat4();class JE extends va{constructor(e,t={}){super("NavCube",e,t),e.navCube=this;try{this._navCubeScene=new my(e,{canvasId:t.canvasId,canvasElement:t.canvasElement,transparent:!0}),this._navCubeCanvas=this._navCubeScene.canvas.canvas,this._navCubeScene.input.keyboardEnabled=!1}catch(g){this.error(g);return}const o=this._navCubeScene;o.clearLights(),new Wa(o,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Wa(o,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Wa(o,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._navCubeCamera=o.camera,this._navCubeCamera.ortho.scale=7,this._navCubeCamera.ortho.near=.1,this._navCubeCamera.ortho.far=2e3,o.edgeMaterial.edgeColor=[.2,.2,.2],o.edgeMaterial.edgeAlpha=.6,this._zUp=!!e.camera.zUp;var n=this;this.setIsProjectNorth(t.isProjectNorth),this.setProjectNorthOffsetAngle(t.projectNorthOffsetAngle);const r=(function(){const g=C.mat4();return function(y,v,w){return C.identityMat4(g),C.rotationMat4v(y*n._projectNorthOffsetAngle*C.DEGTORAD,[0,1,0],g),C.transformVec3(g,v,w)}})();this._synchCamera=(function(){var g=C.rotationMat4c(-90*C.DEGTORAD,1,0,0),y=C.vec3(),v=C.vec3(),w=C.vec3();return function(){var x=e.camera.eye,k=e.camera.look,B=e.camera.up;y=C.mulVec3Scalar(C.normalizeVec3(C.subVec3(x,k,y)),5),n._isProjectNorth&&n._projectNorthOffsetAngle&&(y=r(-1,y,nW),B=r(-1,B,aW)),n._zUp?(C.transformVec3(g,y,v),C.transformVec3(g,B,w),n._navCubeCamera.look=[0,0,0],n._navCubeCamera.eye=C.transformVec3(g,y,v),n._navCubeCamera.up=C.transformPoint3(g,B,w)):(n._navCubeCamera.look=[0,0,0],n._navCubeCamera.eye=y,n._navCubeCamera.up=B)}})(),this._cubeTextureCanvas=new cSt(e,o,t),this._cubeSampler=new Cp(o,{image:this._cubeTextureCanvas.getImage(),flipY:!0,wrapS:Qr,wrapT:Qr}),this._cubeMesh=new pi(o,{geometry:new uo(o,{primitive:"triangles",normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),material:new ho(o,{diffuse:[.4,.4,.4],specular:[.4,.4,.4],emissive:[.6,.6,.6],diffuseMap:this._cubeSampler,emissiveMap:this._cubeSampler}),visible:!0,edges:!0}),this._shadow=t.shadowVisible===!1?null:new pi(o,{geometry:new uo(o,mp({center:[0,0,0],radiusTop:.001,radiusBottom:1.4,height:.01,radialSegments:20,heightSegments:1,openEnded:!0})),material:new ho(o,{diffuse:[0,0,0],specular:[0,0,0],emissive:[0,0,0],alpha:.5}),position:[0,-1.5,0],visible:!0,pickable:!1,backfaces:!1}),this._onCameraMatrix=e.camera.on("matrix",this._synchCamera),this._onCameraWorldAxis=e.camera.on("worldAxis",()=>{e.camera.zUp?(this._zUp=!0,this._cubeTextureCanvas.setZUp(),this._repaint(),this._synchCamera()):e.camera.yUp&&(this._zUp=!1,this._cubeTextureCanvas.setYUp(),this._repaint(),this._synchCamera())}),this._onCameraFOV=e.camera.perspective.on("fov",g=>{this._synchProjection&&(this._navCubeCamera.perspective.fov=g)}),this._onCameraProjection=e.camera.on("projection",g=>{this._synchProjection&&(this._navCubeCamera.projection=g==="ortho"||g==="perspective"?g:"perspective")});var a=-1;function s(g,y){var v=(g-A)*-p,w=(y-f)*-p;e.camera.orbitYaw(v),e.camera.orbitPitch(-w),A=g,f=y}function l(g){const{left:y,top:v}=n._navCubeCanvas.getBoundingClientRect();return[g.clientX-y,g.clientY-v]}{var c=null,d=null,u=!1,h=!1,p=.5,A,f;n._navCubeCanvas.addEventListener("mouseenter",n._onMouseEnter=function(g){h=!0}),n._navCubeCanvas.addEventListener("mouseleave",n._onMouseLeave=function(g){h=!1}),n._navCubeCanvas.addEventListener("mousedown",n._onMouseDown=function(g){if(g.which===1){c=g.x,d=g.y,A=g.clientX,f=g.clientY;var y=l({clientX:g.clientX,clientY:g.clientY}),v=o.pick({canvasPos:y});v?u=!0:u=!1}}),n._navCubeCanvas.addEventListener("mouseup",n._onMouseUp=function(g){if(g.which===1&&(u=!1,c!==null)){var y=l({clientX:g.clientX,clientY:g.clientY}),v=o.pick({canvasPos:y,pickSurface:!0});if(v&&v.uv){var w=n._cubeTextureCanvas.getArea(v.uv);if(w>=0&&(n._navCubeCanvas.style.cursor="pointer",a>=0&&(n._cubeTextureCanvas.setAreaHighlighted(a,!1),n._repaint(),a=-1),w>=0)){if(n._cubeTextureCanvas.setAreaHighlighted(w,!0),a=w,n._repaint(),g.x<c-3||g.x>c+3||g.y<d-3||g.y>d+3)return;var x=n._cubeTextureCanvas.getAreaDir(w);if(x){var k=n._cubeTextureCanvas.getAreaUp(w);n._isProjectNorth&&n._projectNorthOffsetAngle&&(x=r(1,x,nW),k=r(1,k,aW)),m(x,k,function(){a>=0&&(n._cubeTextureCanvas.setAreaHighlighted(a,!1),n._repaint(),a=-1),n._navCubeCanvas.style.cursor="pointer",a>=0&&(n._cubeTextureCanvas.setAreaHighlighted(a,!1),n._repaint(),a=-1),w>=0&&(n._cubeTextureCanvas.setAreaHighlighted(w,!1),a=-1,n._repaint())})}}}}}),n._navCubeCanvas.addEventListener("mousemove",n._onMouseMove=function(g){if(a>=0&&(n._cubeTextureCanvas.setAreaHighlighted(a,!1),n._repaint(),a=-1),!(g.buttons===1&&!u)){if(u){var y=g.clientX,v=g.clientY;n._navCubeCanvas.style.cursor="move",s(y,v);return}if(h){var w=l({clientX:g.clientX,clientY:g.clientY}),x=o.pick({canvasPos:w,pickSurface:!0});if(x){if(x.uv){n._navCubeCanvas.style.cursor="pointer";var k=n._cubeTextureCanvas.getArea(x.uv);if(k===a)return;a>=0&&n._cubeTextureCanvas.setAreaHighlighted(a,!1),k>=0&&(n._cubeTextureCanvas.setAreaHighlighted(k,!0),n._repaint(),a=k)}}else n._navCubeCanvas.style.cursor="default",a>=0&&(n._cubeTextureCanvas.setAreaHighlighted(a,!1),n._repaint(),a=-1)}}}),n._navCubeCanvas.addEventListener("touchstart",n._onTouchStart=function(g){if(g.touches.length>0){c=g.touches[0].clientX,d=g.touches[0].clientY,A=g.touches[0].clientX,f=g.touches[0].clientY;var y=l({clientX:g.touches[0].clientX,clientY:g.touches[0].clientY}),v=o.pick({canvasPos:y});v?u=!0:u=!1}},{passive:!1}),n._navCubeCanvas.addEventListener("touchmove",n._onTouchMove=function(g){g.preventDefault();var y=g.touches[0],v=y.clientX,w=y.clientY,x=document.elementFromPoint(v,w);if(h=n._navCubeCanvas===x,!!h&&u){s(v,w);return}},{passive:!1}),n._navCubeCanvas.addEventListener("touchend",n._onTouchEnd=function(g){u=!1});var m=(function(){var g=C.vec3();return function(y,v,w){var x=n._fitVisible?e.scene.getAABB(e.scene.visibleObjectIds):e.scene.aabb,k=C.getAABB3Diag(x);C.getAABB3Center(x,g);var B=Math.abs(k/Math.tan(n._cameraFitFOV*C.DEGTORAD));e.cameraControl.pivotPos=g,n._cameraFly?e.cameraFlight.flyTo({look:g,eye:[g[0]-B*y[0],g[1]-B*y[1],g[2]-B*y[2]],up:v||[0,1,0],orthoScale:k*1.1,fitFOV:n._cameraFitFOV,duration:n._cameraFlyDuration},w):e.cameraFlight.jumpTo({look:g,eye:[g[0]-B*y[0],g[1]-B*y[1],g[2]-B*y[2]],up:v||[0,1,0],orthoScale:k*1.1,fitFOV:n._cameraFitFOV},w)}})()}this._onUpdated=e.localeService.on("updated",()=>{this._cubeTextureCanvas.clear(),this._repaint()}),this.setVisible(t.visible),this.setCameraFitFOV(t.cameraFitFOV),this.setCameraFly(t.cameraFly),this.setCameraFlyDuration(t.cameraFlyDuration),this.setFitVisible(t.fitVisible),this.setSynchProjection(t.synchProjection)}send(e,t){switch(e){case"language":this._cubeTextureCanvas.clear(),this._repaint();break}}_repaint(){const e=this._cubeTextureCanvas.getImage();this._cubeMesh.material.diffuseMap.image=e,this._cubeMesh.material.emissiveMap.image=e}setVisible(e=!0){this._navCubeCanvas&&(this._cubeMesh.visible=e,this._shadow&&(this._shadow.visible=e),this._navCubeCanvas.style.visibility=e?"visible":"hidden")}getVisible(){return this._navCubeCanvas?this._cubeMesh.visible:!1}setFitVisible(e=!1){this._fitVisible=e}getFitVisible(){return this._fitVisible}setCameraFly(e=!0){this._cameraFly=e}getCameraFly(){return this._cameraFly}setCameraFitFOV(e=45){this._cameraFitFOV=e}getCameraFitFOV(){return this._cameraFitFOV}setCameraFlyDuration(e=.5){this._cameraFlyDuration=e}getCameraFlyDuration(){return this._cameraFlyDuration}setSynchProjection(e=!1){this._synchProjection=e}getSynchProjection(){return this._synchProjection}setIsProjectNorth(e=!1){this._isProjectNorth=e}getIsProjectNorth(){return this._isProjectNorth}setProjectNorthOffsetAngle(e){this._projectNorthOffsetAngle=e}getProjectNorthOffsetAngle(){return this._projectNorthOffsetAngle}destroy(){this._navCubeCanvas&&(this.viewer.localeService.off(this._onUpdated),this.viewer.camera.off(this._onCameraMatrix),this.viewer.camera.off(this._onCameraWorldAxis),this.viewer.camera.perspective.off(this._onCameraFOV),this.viewer.camera.off(this._onCameraProjection),this._navCubeCanvas.removeEventListener("mouseenter",this._onMouseEnter),this._navCubeCanvas.removeEventListener("mouseleave",this._onMouseLeave),this._navCubeCanvas.removeEventListener("mousedown",this._onMouseDown),this._navCubeCanvas.removeEventListener("mousemove",this._onMouseMove),this._navCubeCanvas.removeEventListener("mouseup",this._onMouseUp),this._navCubeCanvas.removeEventListener("touchstart",this._onTouchStart),this._navCubeCanvas.removeEventListener("touchmove",this._onTouchMove),this._navCubeCanvas.removeEventListener("touchend",this._onTouchEnd),this._navCubeCanvas=null,this._cubeTextureCanvas.destroy(),this._cubeTextureCanvas=null,this._onMouseEnter=null,this._onMouseLeave=null,this._onMouseDown=null,this._onMouseMove=null,this._onMouseUp=null,this._onTouchStart=null,this._onTouchMove=null,this._onTouchEnd=null),this._navCubeScene.destroy(),this._navCubeScene=null,this._cubeMesh=null,this._shadow=null,super.destroy()}}class dSt{constructor(e){const t=e.cameraControl,o=e.scene,n=o.canvas.canvas,r=!1,a=1,s=.09,l=.01,c=new Gm(o,{position:[0,0,0],scale:[5,5,5],isObject:!1}),d=C.vec3();this._setPosition=(function(){const x=C.vec3(),k=C.vec3();return function(B){d.set(B),bu(B,x,k),c.origin=x,c.position=k}})(),this._setQuaternion=x=>{c.quaternion=x};const u=(x,k)=>new uo(c,mp({radiusTop:.001,radiusBottom:x,radialSegments:32,heightSegments:1,height:k,openEnded:!1})),h=(x,k,B)=>new uo(c,mp({radiusTop:x,radiusBottom:x,radialSegments:B,heightSegments:1,height:k,openEnded:!1})),p=(x,k,B)=>new uo(c,BM({radius:a-.2,tube:x,radialSegments:64,tubeSegments:B,arc:Math.PI*2*k})),A={curve:p(l,.25,14),curveHandle:p(s,.25,14),hoop:p(l,1,8),arrowHead:u(.07,.2),arrowHeadBig:u(.09,.25),arrowHeadHandle:h(s,.37,8),axis:h(l,a,20),axisHandle:h(s,a,20)},f=x=>new ho(c,{diffuse:x,emissive:x,ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),m=(x,k)=>new Ul(c,{edges:!1,fill:!0,fillColor:x,fillAlpha:k}),g=new ho(c,{diffuse:[1,1,0],alpha:0,alphaMode:"blend"}),y={},v=(x,k)=>{C.mulVec3Scalar(x,-1,C.vec3());const B=f(x),E=C.quaternionToRotationMat4(k,C.identityMat4());C.mulMat4(C.rotationMat4v(Math.PI,[0,1,0],C.mat4()),E,E);const P=C.scaleMat4v([.6,.6,.6],C.identityMat4()),R=(ee,ae)=>{const Be=C.translateMat4v(ee,C.identityMat4()),pe=C.identityMat4();return C.mulMat4(Be,ae,pe),C.mulMat4(E,pe,pe),C.mulMat4(pe,P,C.identityMat4())},T=c.addChild(new pi(c,{geometry:A.curve,material:B,matrix:E,pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),r),L=c.addChild(new pi(c,{geometry:A.curveHandle,material:g,matrix:E,pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),r),F=c.addChild(new pi(c,{geometry:A.arrowHead,material:B,matrix:R([.8,.07,0],C.rotationMat4v(180*C.DEGTORAD,[0,0,1],C.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),U=c.addChild(new pi(c,{geometry:A.arrowHead,material:B,matrix:R([.07,.8,0],C.rotationMat4v(90*C.DEGTORAD,[0,0,1],C.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),q=c.addChild(new pi(c,{geometry:A.hoop,material:B,highlighted:!0,highlightMaterial:m(x,.6),matrix:E,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),V=C.quaternionToRotationMat4(C.vec3PairToQuaternion([0,1,0],x),C.identityMat4());C.mulMat4(C.rotationMat4v(Math.PI,[0,1,0],C.mat4()),V,V);const W=ee=>C.mulMat4(V,C.translateMat4c(0,ee,0,C.identityMat4()),C.identityMat4()),Y=W(a+.1),$=W(a/2),me=c.addChild(new pi(c,{geometry:A.arrowHead,material:B,matrix:Y,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),Ie=c.addChild(new pi(c,{geometry:A.arrowHeadHandle,material:g,matrix:Y,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),Se=c.addChild(new pi(c,{geometry:A.axis,material:B,matrix:$,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),qe=c.addChild(new pi(c,{geometry:A.axisHandle,material:g,matrix:$,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),Qe=c.addChild(new pi(c,{geometry:A.arrowHeadBig,material:B,matrix:Y,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),Ce=(ee,ae)=>C.vec3ApplyQuaternion(c.quaternion,ee,ae),De=(function(){const ee=C.vec3(),ae=C.vec3(),Be=C.vec3();return(pe,Q)=>{Ce(x,ee);const Z=d,ie=ee;C.canvasPosToWorldRay(n,o.camera.viewMatrix,o.camera.projMatrix,o.camera.projection,pe,ae,Be);const re=C.dotVec3(ie,Be),ne=C.subVec3(ae,Z,Q),G=C.dotVec3(ne,ie),K=C.dotVec3(ne,Be),ue=1-re*re;if(Math.abs(ue)>1e-10){const xe=(G-re*K)/ue;return C.addVec3(Z,C.mulVec3Scalar(ie,xe,Q),Q),!0}else return!1}})(),Fe=C.vec3(),ve=C.vec3();y[Ie.id]=y[qe.id]={setActivated:ee=>Qe.visible=ee,initDragAction:ee=>De(ee,Fe)&&C.subVec3(Fe,d,Fe)&&(ae=>{De(ae,ve)&&(C.subVec3(ve,Fe,ve),this._setPosition(ve),this._handlers&&this._handlers.onPosition(ve))})},y[L.id]={setActivated:ee=>q.visible=ee,initDragAction:ee=>{const ae=(function(){const pe=o.camera.projectWorldPos(d);Ce(x,ve),C.transformVec3(o.camera.normalMatrix,ve,ve);const Q=Math.sign(ve[2]);return Z=>{const ie=Z[0]-pe[0],re=Z[1]-pe[1];return Q*Math.atan2(-re,ie)}})();let Be=ae(ee);return pe=>{const Q=ae(pe);c.rotate(x,(Q-Be)*180/Math.PI),this._handlers&&this._handlers.onQuaternion(c.quaternion),Be=Q}}};let ge=!1,we=!1,Le=!1;const We=()=>{const ee=Le&≥Ie.visible=qe.visible=me.visible=Se.visible=!!ee,ee||(Qe.visible=!1)},H=()=>{const ee=Le&&we;L.visible=T.visible=F.visible=U.visible=!!ee,ee||(q.visible=!1)};return{setPositionActive:ee=>{ge=ee,We()},setRotationActive:ee=>{we=ee,H()},set visible(ee){Le=ee,We(),H()}}};this._displayMeshes={center:c.addChild(new pi(c,{geometry:new uo(c,vp({radius:.05})),material:new ho(c,{diffuse:[0,0,0],emissive:[0,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80}),pickable:!1,collidable:!0,clippable:!1,visible:!1,isObject:!1}),r),x:v([1,0,0],C.vec3PairToQuaternion([1,0,0],[0,0,1])),y:v([0,1,0],C.eulerToQuaternion([90,0,0],"XYZ")),z:v([0,0,1],C.identityQuaternion())};const w=[];{let x=-1;const k=E=>{c.scale[0]!==E&&(c.scale=[E,E,E],this._handlers&&this._handlers.onScreenScale&&this._handlers.onScreenScale(c.scale))},B=o.on("tick",()=>{const E=o.camera,P=Math.abs(C.distVec3(E.eye,d));E.projection==="perspective"?P!==x&&k(.07*P*Math.tan(E.perspective.fov*C.DEGTORAD)):E.projection==="ortho"&&k(E.ortho.scale/10),x=P});w.push(()=>o.off(B))}{let x=null,k=null;w.push(()=>{k&&k.cleanup()});const B=C.vec2(),E=(F,U)=>{U[0]=F.pageX,U[1]=F.pageY,Ns(n.ownerDocument.documentElement,n,U)},P=F=>{E(F,B);const U=o.pick({canvasPos:B}),q=U&&U.entity,V=q&&q.id;return V in y&&y[V]},R=(F,U)=>{const q=P(U(F));if(q){k&&k.cleanup();const V=q.initDragAction(B);return V&&(t.pointerEnabled=!1,q.setActivated(!0),k={onChange:W=>{const Y=U(W);Y&&(E(Y,B),V(B))},cleanup:function(){k=null,t.pointerEnabled=!0,q.setActivated(!1)}}),!!V}else return!1},T=(F,U)=>{n.addEventListener(F,U),w.push(()=>n.removeEventListener(F,U))},L=F=>{F.preventDefault(),F.stopPropagation(),F.stopImmediatePropagation()};T("mousedown",F=>{F.which===1&&R(F,U=>U.which===1&&U)&&L(F)}),T("mousemove",F=>{if(k)k.onChange(F),L(F);else{x&&x();const U=P(F);U?(U.setActivated(!0),x=()=>U.setActivated(!1)):x=null}}),T("mouseup",F=>{k&&(k.onChange(F),k.cleanup())}),T("touchstart",F=>{if(F.preventDefault(),F.touches.length===1){const U=F.touches[0].identifier;R(F,q=>[...q.changedTouches].find(V=>V.identifier===U))&&L(F)}}),T("touchmove",F=>{k&&(k.onChange(F),L(F))}),T("touchend",F=>{k&&(k.onChange(F),k.cleanup())})}this.__destroy=()=>{w.forEach(x=>x()),c.destroy();for(let x in y)delete y[x]}}destroy(){this.__destroy()}setHandlers(e){Object.values(this._displayMeshes).forEach(t=>t.visible=!!e),this._handlers=e,this._displayMeshes.x.setPositionActive(e&&e.onPosition),this._displayMeshes.y.setPositionActive(e&&e.onPosition),this._displayMeshes.z.setPositionActive(e&&e.onPosition),this._displayMeshes.x.setRotationActive(e&&e.onQuaternion),this._displayMeshes.y.setRotationActive(e&&e.onQuaternion),this._displayMeshes.z.setRotationActive(e&&e.onQuaternion)}setPosition(e){this._setPosition(e)}setQuaternion(e){this._setQuaternion(e)}}let uSt=class{constructor(i,e,t){this.id=t.id,this._sectionPlane=t,this._mesh=new pi(e,{id:t.id,geometry:new uo(e,xM({xSize:.5,ySize:.5,zSize:.001})),material:new ho(e,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new eB(e,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new Ul(e,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new Ul(e,{fill:!0,fillColor:[0,0,1],fillAlpha:.7,edges:!0,edgeColor:[1,0,0],edgeAlpha:1,edgeWidth:1}),highlighted:!0,scale:[3,3,3],position:[0,0,0],rotation:[0,0,0],opacity:.3,edges:!0});{const o=C.vec3([0,0,0]),n=C.vec3(),r=C.vec3([0,0,1]),a=C.vec4(4),s=C.vec3(),l=()=>{const c=this._sectionPlane.scene.center,d=[-this._sectionPlane.dir[0],-this._sectionPlane.dir[1],-this._sectionPlane.dir[2]];C.subVec3(c,this._sectionPlane.pos,o);const u=-C.dotVec3(d,o);C.normalizeVec3(d),C.mulVec3Scalar(d,u,n);const h=C.vec3PairToQuaternion(r,this._sectionPlane.dir,a);s[0]=n[0]*.1,s[1]=n[1]*.1,s[2]=n[2]*.1,this._mesh.quaternion=h,this._mesh.position=s};this._onSectionPlanePos=this._sectionPlane.on("pos",l),this._onSectionPlaneDir=this._sectionPlane.on("dir",l)}this._highlighted=!1,this._selected=!1}setHighlighted(i){this._highlighted=!!i,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=i?[0,.7,0]:[0,0,0]}getHighlighted(){return this._highlighted}setSelected(i){this._selected=!!i,this._mesh.edgeMaterial.edgeWidth=i?3:1,this._mesh.highlightMaterial.edgeWidth=i?3:1}getSelected(){return this._selected}destroy(){this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._mesh.destroy()}};class hSt{constructor(e,t){if(!t.onHoverEnterPlane||!t.onHoverLeavePlane||!t.onClickedNothing||!t.onClickedPlane)throw"Missing config(s): onHoverEnterPlane, onHoverLeavePlane, onClickedNothing || onClickedPlane";this.plugin=e,this._viewer=e.viewer,this._onHoverEnterPlane=t.onHoverEnterPlane,this._onHoverLeavePlane=t.onHoverLeavePlane,this._onClickedNothing=t.onClickedNothing,this._onClickedPlane=t.onClickedPlane,this._visible=!0,this._planes={},this._canvas=t.overviewCanvas,this._scene=new my(this._viewer,{canvasId:this._canvas.id,transparent:!0}),this._scene.clearLights(),new Wa(this._scene,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Wa(this._scene,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Wa(this._scene,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._scene.camera,this._scene.camera.perspective.fov=70,this._zUp=!1;{const n=this._scene.camera,r=C.rotationMat4c(-90*C.DEGTORAD,1,0,0),a=C.vec3(),s=C.vec3(),l=C.vec3();this._synchCamera=()=>{const c=this._viewer.camera.eye,d=this._viewer.camera.look,u=this._viewer.camera.up;C.mulVec3Scalar(C.normalizeVec3(C.subVec3(c,d,a)),7),this._zUp?(C.transformVec3(r,a,s),C.transformVec3(r,u,l),n.look=[0,0,0],n.eye=C.transformVec3(r,a,s),n.up=C.transformPoint3(r,u,l)):(n.look=[0,0,0],n.eye=a,n.up=u)}}this._onViewerCameraMatrix=this._viewer.camera.on("matrix",this._synchCamera),this._onViewerCameraWorldAxis=this._viewer.camera.on("worldAxis",this._synchCamera),this._onViewerCameraFOV=this._viewer.camera.perspective.on("fov",n=>{this._scene.camera.perspective.fov=n});{var o=null;this._onInputMouseMove=this._scene.input.on("mousemove",n=>{const r=this._scene.pick({canvasPos:n});r?(!o||r.entity.id!==o.id)&&(o&&this._planes[o.id]&&this._onHoverLeavePlane(o.id),o=r.entity,this._planes[o.id]&&this._onHoverEnterPlane(o.id)):o&&(this._onHoverLeavePlane(o.id),o=null)}),this._scene.canvas.canvas.addEventListener("mouseup",this._onCanvasMouseUp=()=>{o?this._planes[o.id]&&this._onClickedPlane(o.id):this._onClickedNothing()}),this._scene.canvas.canvas.addEventListener("mouseout",this._onCanvasMouseOut=()=>{o&&(this._onHoverLeavePlane(o.id),o=null)})}this.setVisible(t.overviewVisible)}addSectionPlane(e){this._planes[e.id]=new uSt(this,this._scene,e)}setPlaneHighlighted(e,t){const o=this._planes[e];o&&o.setHighlighted(t)}setPlaneSelected(e,t){const o=this._planes[e];o&&o.setSelected(t)}removeSectionPlane(e){const t=this._planes[e.id];t&&(t.destroy(),delete this._planes[e.id])}setVisible(e=!0){this._visible=e,this._canvas.style.visibility=e?"visible":"hidden"}getVisible(){return this._visible}destroy(){this._viewer.camera.off(this._onViewerCameraMatrix),this._viewer.camera.off(this._onViewerCameraWorldAxis),this._viewer.camera.perspective.off(this._onViewerCameraFOV),this._scene.input.off(this._onInputMouseMove),this._scene.canvas.canvas.removeEventListener("mouseup",this._onCanvasMouseUp),this._scene.canvas.canvas.removeEventListener("mouseout",this._onCanvasMouseOut),this._scene.destroy()}}const Ql=C.AABB3(),Ru=C.vec3();class pSt extends va{constructor(e,t={}){if(super("SectionPlanes",e),this._freeControls=[],this._sectionPlanes=e.scene.sectionPlanes,this._controls={},this._shownControlId=null,t.overviewCanvasId!==null&&t.overviewCanvasId!==void 0){const o=document.getElementById(t.overviewCanvasId);o?this._overview=new hSt(this,{overviewCanvas:o,visible:t.overviewVisible,onHoverEnterPlane:(n=>{this._overview.setPlaneHighlighted(n,!0)}),onHoverLeavePlane:(n=>{this._overview.setPlaneHighlighted(n,!1)}),onClickedPlane:(n=>{if(this.getShownControl()===n){this.hideControl();return}this.showControl(n);const r=this.sectionPlanes[n].pos;Ql.set(this.viewer.scene.aabb),C.getAABB3Center(Ql,Ru),Ql[0]+=r[0]-Ru[0],Ql[1]+=r[1]-Ru[1],Ql[2]+=r[2]-Ru[2],Ql[3]+=r[0]-Ru[0],Ql[4]+=r[1]-Ru[1],Ql[5]+=r[2]-Ru[2],this.viewer.cameraFlight.flyTo({aabb:Ql,fitFOV:65})}),onClickedNothing:(()=>{this.hideControl()})}):this.warn("Can't find overview canvas: '"+t.overviewCanvasId+"' - will create plugin without overview")}this._onSceneSectionPlaneCreated=e.scene.on("sectionPlaneCreated",o=>{this._sectionPlaneCreated(o)})}setOverviewVisible(e){this._overview&&this._overview.setVisible(e)}getOverviewVisible(){if(this._overview)return this._overview.getVisible()}get sectionPlanes(){return this._sectionPlanes}createSectionPlane(e={}){return e.id!==void 0&&e.id!==null&&this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id),new RB(this.viewer.scene,{id:e.id,pos:e.pos,dir:e.dir,active:!0})}_sectionPlaneCreated(e){const t=this._freeControls.length>0?this._freeControls.pop():(()=>{const o=this.viewer.scene,n=(function(){const u=new Gm(o,{isObject:!1});return u.addChild(new pi(u,{geometry:new uo(u,{primitive:"triangles",positions:[.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,.5,.5,-0,.5,-.5,-0,-.5,-.5,-0,-.5,.5,-0],indices:[0,1,2,2,3,0]}),material:new ho(u,{emissive:[0,0,0],diffuse:[0,0,0],backfaces:!0}),opacity:.6,ghosted:!0,ghostMaterial:new Ul(u,{edges:!1,filled:!0,fillColor:[1,1,0],edgeColor:[0,0,0],fillAlpha:.1,backfaces:!0}),pickable:!1,collidable:!0,clippable:!1,visible:!1,scale:[2.4,2.4,1],isObject:!1})),u.addChild(new pi(u,{geometry:new uo(u,BM({center:[0,0,0],radius:1.7,tube:.02,radialSegments:4,tubeSegments:4,arc:Math.PI*2})),material:new ho(u,{emissive:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],shininess:0}),highlightMaterial:new Ul(u,{edges:!1,edgeColor:[0,0,0],filled:!0,fillColor:[.8,.8,.8],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,.1],rotation:[0,0,45],isObject:!1})),{setPosition:(function(){const h=C.vec3(),p=C.vec3();return function(A){bu(A,h,p),u.origin=h,u.position=p}})(),setQuaternion:h=>{u.quaternion=h},setScale:h=>{u.scale=h},setVisible:h=>{u.visible=h},destroy:()=>{u.destroy()}}})();let r=()=>{};const a=new dSt(this.viewer);let s=!1,l=!1,c=null;const d=()=>{const u=l&&!s;n.setVisible(u),a.setHandlers(u&&c)};return{_destroy:()=>{r(),a.destroy(),n.destroy()},setCulled:u=>{s=u,d()},setVisible:u=>{l=u,d()},_setSectionPlane:u=>{if(r(),u){let h=!1;c={onPosition:g=>{n.setPosition(g),u.pos=g},onQuaternion:g=>{n.setQuaternion(g),h=!0,u.quaternion=g},onScreenScale:g=>{n.setScale(g)}};const p=()=>{n.setPosition(u.pos),a.setPosition(u.pos)},A=()=>{n.setQuaternion(u.quaternion),a.setQuaternion(u.quaternion)};p(),A();const f=u.on("pos",p),m=u.on("dir",()=>{h?h=!1:A()});r=()=>{u.off(f),u.off(m),r=()=>{}}}}}})();t._setSectionPlane(e),t.setVisible(!1),this._controls[e.id]=t,this._overview&&this._overview.addSectionPlane(e),e.once("destroyed",()=>{this._sectionPlaneDestroyed(e)})}flipSectionPlanes(){const e=this.viewer.scene.sectionPlanes;for(let t in e)e[t].flipDir()}showControl(e){const t=this._controls[e];if(!t){this.error("Control not found: "+e);return}this.hideControl(),t.setVisible(!0),this._overview&&this._overview.setPlaneSelected(e,!0),this._shownControlId=e}getShownControl(){return this._shownControlId}hideControl(){for(var e in this._controls)this._controls.hasOwnProperty(e)&&(this._controls[e].setVisible(!1),this._overview&&this._overview.setPlaneSelected(e,!1));this._shownControlId=null}destroySectionPlane(e){var t=this.viewer.scene.sectionPlanes[e];if(!t){this.error("SectionPlane not found: "+e);return}this._sectionPlaneDestroyed(t),t.destroy(),e===this._shownControlId&&(this._shownControlId=null)}_sectionPlaneDestroyed(e){this._overview&&this._overview.removeSectionPlane(e);const t=this._controls[e.id];t&&(t.setVisible(!1),t._setSectionPlane(null),delete this._controls[e.id],this._freeControls.push(t))}clear(){const e=Object.keys(this._sectionPlanes);for(var t=0,o=e.length;t<o;t++)this.destroySectionPlane(e[t])}send(e,t){switch(e){case"snapshotStarting":for(let o in this._controls)this._controls.hasOwnProperty(o)&&this._controls[o].setCulled(!0);break;case"snapshotFinished":for(let o in this._controls)this._controls.hasOwnProperty(o)&&this._controls[o].setCulled(!1);break;case"clearSectionPlanes":this.clear();break}}destroy(){this.clear(),this._overview&&this._overview.destroy(),this._destroyFreeControls(),super.destroy()}_destroyFreeControls(){for(var e=this._freeControls.pop();e;)e._destroy(),e=this._freeControls.pop();this.viewer.scene.off(this._onSceneSectionPlaneCreated)}}class sW{constructor(e={}){this.cacheBuster=e.cacheBuster!==!1}_cacheBusterURL(e){if(!this.cacheBuster)return e;const t=new Date().getTime();return e.indexOf("?")>-1?e+"&_="+t:e+"?_="+t}getManifest(e,t,o){mt.loadJSON(this._cacheBusterURL(e),n=>{t(n)},function(n){o(n)})}getMetaModel(e,t,o){mt.loadJSON(this._cacheBusterURL(e),n=>{t(n)},function(n){o(n)})}getXKT(e,t,o){var n=()=>{};t=t||n,o=o||n;const r=/^data:(.*?)(;base64)?,(.*)$/,a=e.match(r);if(a){const c=!!a[2];var s=a[3];s=window.decodeURIComponent(s),c&&(s=window.atob(s));try{const d=new ArrayBuffer(s.length),u=new Uint8Array(d);for(var l=0;l<s.length;l++)u[l]=s.charCodeAt(l);t(d)}catch(d){o(d)}}else{const c=new XMLHttpRequest;c.open("GET",this._cacheBusterURL(e),!0),c.responseType="arraybuffer",c.onreadystatechange=function(){c.readyState===4&&(c.status===200?t(c.response):o("getXKT error : "+c.response))},c.send(null)}}}var r7={exports:{}},fSt=r7.exports,lW;function ASt(){return lW||(lW=1,(function(i,e){(function(t,o){o(e)})(fSt,(function(t){function o(D){let X=D.length;for(;--X>=0;)D[X]=0}const n=256,r=286,a=30,s=15,l=new Uint8Array([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]),c=new Uint8Array([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]),d=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),u=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),h=new Array(576);o(h);const p=new Array(60);o(p);const A=new Array(512);o(A);const f=new Array(256);o(f);const m=new Array(29);o(m);const g=new Array(a);function y(D,X,O,ke,ye){this.static_tree=D,this.extra_bits=X,this.extra_base=O,this.elems=ke,this.max_length=ye,this.has_stree=D&&D.length}let v,w,x;function k(D,X){this.dyn_tree=D,this.max_code=0,this.stat_desc=X}o(g);const B=D=>D<256?A[D]:A[256+(D>>>7)],E=(D,X)=>{D.pending_buf[D.pending++]=255&X,D.pending_buf[D.pending++]=X>>>8&255},P=(D,X,O)=>{D.bi_valid>16-O?(D.bi_buf|=X<<D.bi_valid&65535,E(D,D.bi_buf),D.bi_buf=X>>16-D.bi_valid,D.bi_valid+=O-16):(D.bi_buf|=X<<D.bi_valid&65535,D.bi_valid+=O)},R=(D,X,O)=>{P(D,O[2*X],O[2*X+1])},T=(D,X)=>{let O=0;do O|=1&D,D>>>=1,O<<=1;while(--X>0);return O>>>1},L=(D,X,O)=>{const ke=new Array(16);let ye,Ae,tt=0;for(ye=1;ye<=s;ye++)tt=tt+O[ye-1]<<1,ke[ye]=tt;for(Ae=0;Ae<=X;Ae++){let Oe=D[2*Ae+1];Oe!==0&&(D[2*Ae]=T(ke[Oe]++,Oe))}},F=D=>{let X;for(X=0;X<r;X++)D.dyn_ltree[2*X]=0;for(X=0;X<a;X++)D.dyn_dtree[2*X]=0;for(X=0;X<19;X++)D.bl_tree[2*X]=0;D.dyn_ltree[512]=1,D.opt_len=D.static_len=0,D.sym_next=D.matches=0},U=D=>{D.bi_valid>8?E(D,D.bi_buf):D.bi_valid>0&&(D.pending_buf[D.pending++]=D.bi_buf),D.bi_buf=0,D.bi_valid=0},q=(D,X,O,ke)=>{const ye=2*X,Ae=2*O;return D[ye]<D[Ae]||D[ye]===D[Ae]&&ke[X]<=ke[O]},V=(D,X,O)=>{const ke=D.heap[O];let ye=O<<1;for(;ye<=D.heap_len&&(ye<D.heap_len&&q(X,D.heap[ye+1],D.heap[ye],D.depth)&&ye++,!q(X,ke,D.heap[ye],D.depth));)D.heap[O]=D.heap[ye],O=ye,ye<<=1;D.heap[O]=ke},W=(D,X,O)=>{let ke,ye,Ae,tt,Oe=0;if(D.sym_next!==0)do ke=255&D.pending_buf[D.sym_buf+Oe++],ke+=(255&D.pending_buf[D.sym_buf+Oe++])<<8,ye=D.pending_buf[D.sym_buf+Oe++],ke===0?R(D,ye,X):(Ae=f[ye],R(D,Ae+n+1,X),tt=l[Ae],tt!==0&&(ye-=m[Ae],P(D,ye,tt)),ke--,Ae=B(ke),R(D,Ae,O),tt=c[Ae],tt!==0&&(ke-=g[Ae],P(D,ke,tt)));while(Oe<D.sym_next);R(D,256,X)},Y=(D,X)=>{const O=X.dyn_tree,ke=X.stat_desc.static_tree,ye=X.stat_desc.has_stree,Ae=X.stat_desc.elems;let tt,Oe,wt,Ve=-1;for(D.heap_len=0,D.heap_max=573,tt=0;tt<Ae;tt++)O[2*tt]!==0?(D.heap[++D.heap_len]=Ve=tt,D.depth[tt]=0):O[2*tt+1]=0;for(;D.heap_len<2;)wt=D.heap[++D.heap_len]=Ve<2?++Ve:0,O[2*wt]=1,D.depth[wt]=0,D.opt_len--,ye&&(D.static_len-=ke[2*wt+1]);for(X.max_code=Ve,tt=D.heap_len>>1;tt>=1;tt--)V(D,O,tt);wt=Ae;do tt=D.heap[1],D.heap[1]=D.heap[D.heap_len--],V(D,O,1),Oe=D.heap[1],D.heap[--D.heap_max]=tt,D.heap[--D.heap_max]=Oe,O[2*wt]=O[2*tt]+O[2*Oe],D.depth[wt]=(D.depth[tt]>=D.depth[Oe]?D.depth[tt]:D.depth[Oe])+1,O[2*tt+1]=O[2*Oe+1]=wt,D.heap[1]=wt++,V(D,O,1);while(D.heap_len>=2);D.heap[--D.heap_max]=D.heap[1],((et,ii)=>{const Ht=ii.dyn_tree,Ct=ii.max_code,Ho=ii.stat_desc.static_tree,Bi=ii.stat_desc.has_stree,Qt=ii.stat_desc.extra_bits,Li=ii.stat_desc.extra_base,ti=ii.stat_desc.max_length;let kt,ei,Di,Pt,wi,oi,Gt=0;for(Pt=0;Pt<=s;Pt++)et.bl_count[Pt]=0;for(Ht[2*et.heap[et.heap_max]+1]=0,kt=et.heap_max+1;kt<573;kt++)ei=et.heap[kt],Pt=Ht[2*Ht[2*ei+1]+1]+1,Pt>ti&&(Pt=ti,Gt++),Ht[2*ei+1]=Pt,ei>Ct||(et.bl_count[Pt]++,wi=0,ei>=Li&&(wi=Qt[ei-Li]),oi=Ht[2*ei],et.opt_len+=oi*(Pt+wi),Bi&&(et.static_len+=oi*(Ho[2*ei+1]+wi)));if(Gt!==0){do{for(Pt=ti-1;et.bl_count[Pt]===0;)Pt--;et.bl_count[Pt]--,et.bl_count[Pt+1]+=2,et.bl_count[ti]--,Gt-=2}while(Gt>0);for(Pt=ti;Pt!==0;Pt--)for(ei=et.bl_count[Pt];ei!==0;)Di=et.heap[--kt],Di>Ct||(Ht[2*Di+1]!==Pt&&(et.opt_len+=(Pt-Ht[2*Di+1])*Ht[2*Di],Ht[2*Di+1]=Pt),ei--)}})(D,X),L(O,Ve,D.bl_count)},$=(D,X,O)=>{let ke,ye,Ae=-1,tt=X[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),X[2*(O+1)+1]=65535,ke=0;ke<=O;ke++)ye=tt,tt=X[2*(ke+1)+1],++Oe<wt&&ye===tt||(Oe<Ve?D.bl_tree[2*ye]+=Oe:ye!==0?(ye!==Ae&&D.bl_tree[2*ye]++,D.bl_tree[32]++):Oe<=10?D.bl_tree[34]++:D.bl_tree[36]++,Oe=0,Ae=ye,tt===0?(wt=138,Ve=3):ye===tt?(wt=6,Ve=3):(wt=7,Ve=4))},me=(D,X,O)=>{let ke,ye,Ae=-1,tt=X[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),ke=0;ke<=O;ke++)if(ye=tt,tt=X[2*(ke+1)+1],!(++Oe<wt&&ye===tt)){if(Oe<Ve)do R(D,ye,D.bl_tree);while(--Oe!=0);else ye!==0?(ye!==Ae&&(R(D,ye,D.bl_tree),Oe--),R(D,16,D.bl_tree),P(D,Oe-3,2)):Oe<=10?(R(D,17,D.bl_tree),P(D,Oe-3,3)):(R(D,18,D.bl_tree),P(D,Oe-11,7));Oe=0,Ae=ye,tt===0?(wt=138,Ve=3):ye===tt?(wt=6,Ve=3):(wt=7,Ve=4)}};let Ie=!1;const Se=(D,X,O,ke)=>{P(D,0+(ke?1:0),3),U(D),E(D,O),E(D,~O),O&&D.pending_buf.set(D.window.subarray(X,X+O),D.pending),D.pending+=O};var qe=(D,X,O,ke)=>{let ye,Ae,tt=0;D.level>0?(D.strm.data_type===2&&(D.strm.data_type=(Oe=>{let wt,Ve=4093624447;for(wt=0;wt<=31;wt++,Ve>>>=1)if(1&Ve&&Oe.dyn_ltree[2*wt]!==0)return 0;if(Oe.dyn_ltree[18]!==0||Oe.dyn_ltree[20]!==0||Oe.dyn_ltree[26]!==0)return 1;for(wt=32;wt<n;wt++)if(Oe.dyn_ltree[2*wt]!==0)return 1;return 0})(D)),Y(D,D.l_desc),Y(D,D.d_desc),tt=(Oe=>{let wt;for($(Oe,Oe.dyn_ltree,Oe.l_desc.max_code),$(Oe,Oe.dyn_dtree,Oe.d_desc.max_code),Y(Oe,Oe.bl_desc),wt=18;wt>=3&&Oe.bl_tree[2*u[wt]+1]===0;wt--);return Oe.opt_len+=3*(wt+1)+5+5+4,wt})(D),ye=D.opt_len+3+7>>>3,Ae=D.static_len+3+7>>>3,Ae<=ye&&(ye=Ae)):ye=Ae=O+5,O+4<=ye&&X!==-1?Se(D,X,O,ke):D.strategy===4||Ae===ye?(P(D,2+(ke?1:0),3),W(D,h,p)):(P(D,4+(ke?1:0),3),((Oe,wt,Ve,et)=>{let ii;for(P(Oe,wt-257,5),P(Oe,Ve-1,5),P(Oe,et-4,4),ii=0;ii<et;ii++)P(Oe,Oe.bl_tree[2*u[ii]+1],3);me(Oe,Oe.dyn_ltree,wt-1),me(Oe,Oe.dyn_dtree,Ve-1)})(D,D.l_desc.max_code+1,D.d_desc.max_code+1,tt+1),W(D,D.dyn_ltree,D.dyn_dtree)),F(D),ke&&U(D)},Qe={_tr_init:D=>{Ie||((()=>{let X,O,ke,ye,Ae;const tt=new Array(16);for(ke=0,ye=0;ye<28;ye++)for(m[ye]=ke,X=0;X<1<<l[ye];X++)f[ke++]=ye;for(f[ke-1]=ye,Ae=0,ye=0;ye<16;ye++)for(g[ye]=Ae,X=0;X<1<<c[ye];X++)A[Ae++]=ye;for(Ae>>=7;ye<a;ye++)for(g[ye]=Ae<<7,X=0;X<1<<c[ye]-7;X++)A[256+Ae++]=ye;for(O=0;O<=s;O++)tt[O]=0;for(X=0;X<=143;)h[2*X+1]=8,X++,tt[8]++;for(;X<=255;)h[2*X+1]=9,X++,tt[9]++;for(;X<=279;)h[2*X+1]=7,X++,tt[7]++;for(;X<=287;)h[2*X+1]=8,X++,tt[8]++;for(L(h,287,tt),X=0;X<a;X++)p[2*X+1]=5,p[2*X]=T(X,5);v=new y(h,l,257,r,s),w=new y(p,c,0,a,s),x=new y(new Array(0),d,0,19,7)})(),Ie=!0),D.l_desc=new k(D.dyn_ltree,v),D.d_desc=new k(D.dyn_dtree,w),D.bl_desc=new k(D.bl_tree,x),D.bi_buf=0,D.bi_valid=0,F(D)},_tr_stored_block:Se,_tr_flush_block:qe,_tr_tally:(D,X,O)=>(D.pending_buf[D.sym_buf+D.sym_next++]=X,D.pending_buf[D.sym_buf+D.sym_next++]=X>>8,D.pending_buf[D.sym_buf+D.sym_next++]=O,X===0?D.dyn_ltree[2*O]++:(D.matches++,X--,D.dyn_ltree[2*(f[O]+n+1)]++,D.dyn_dtree[2*B(X)]++),D.sym_next===D.sym_end),_tr_align:D=>{P(D,2,3),R(D,256,h),(X=>{X.bi_valid===16?(E(X,X.bi_buf),X.bi_buf=0,X.bi_valid=0):X.bi_valid>=8&&(X.pending_buf[X.pending++]=255&X.bi_buf,X.bi_buf>>=8,X.bi_valid-=8)})(D)}},Ce=(D,X,O,ke)=>{let ye=65535&D|0,Ae=D>>>16&65535|0,tt=0;for(;O!==0;){tt=O>2e3?2e3:O,O-=tt;do ye=ye+X[ke++]|0,Ae=Ae+ye|0;while(--tt);ye%=65521,Ae%=65521}return ye|Ae<<16|0};const De=new Uint32Array((()=>{let D,X=[];for(var O=0;O<256;O++){D=O;for(var ke=0;ke<8;ke++)D=1&D?3988292384^D>>>1:D>>>1;X[O]=D}return X})());var Fe=(D,X,O,ke)=>{const ye=De,Ae=ke+O;D^=-1;for(let tt=ke;tt<Ae;tt++)D=D>>>8^ye[255&(D^X[tt])];return-1^D},ve={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ge={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:we,_tr_stored_block:Le,_tr_flush_block:We,_tr_tally:H,_tr_align:ee}=Qe,{Z_NO_FLUSH:ae,Z_PARTIAL_FLUSH:Be,Z_FULL_FLUSH:pe,Z_FINISH:Q,Z_BLOCK:Z,Z_OK:ie,Z_STREAM_END:re,Z_STREAM_ERROR:ne,Z_DATA_ERROR:G,Z_BUF_ERROR:K,Z_DEFAULT_COMPRESSION:ue,Z_FILTERED:xe,Z_HUFFMAN_ONLY:oe,Z_RLE:Me,Z_FIXED:je,Z_DEFAULT_STRATEGY:he,Z_UNKNOWN:Ne,Z_DEFLATED:Ee}=ge,ze=258,ot=262,At=42,ft=113,lt=666,ut=(D,X)=>(D.msg=ve[X],X),Te=D=>2*D-(D>4?9:0),st=D=>{let X=D.length;for(;--X>=0;)D[X]=0},dt=D=>{let X,O,ke,ye=D.w_size;X=D.hash_size,ke=X;do O=D.head[--ke],D.head[ke]=O>=ye?O-ye:0;while(--X);X=ye,ke=X;do O=D.prev[--ke],D.prev[ke]=O>=ye?O-ye:0;while(--X)};let Ye=(D,X,O)=>(X<<D.hash_shift^O)&D.hash_mask;const fe=D=>{const X=D.state;let O=X.pending;O>D.avail_out&&(O=D.avail_out),O!==0&&(D.output.set(X.pending_buf.subarray(X.pending_out,X.pending_out+O),D.next_out),D.next_out+=O,X.pending_out+=O,D.total_out+=O,D.avail_out-=O,X.pending-=O,X.pending===0&&(X.pending_out=0))},be=(D,X)=>{We(D,D.block_start>=0?D.block_start:-1,D.strstart-D.block_start,X),D.block_start=D.strstart,fe(D.strm)},Xe=(D,X)=>{D.pending_buf[D.pending++]=X},ht=(D,X)=>{D.pending_buf[D.pending++]=X>>>8&255,D.pending_buf[D.pending++]=255&X},St=(D,X,O,ke)=>{let ye=D.avail_in;return ye>ke&&(ye=ke),ye===0?0:(D.avail_in-=ye,X.set(D.input.subarray(D.next_in,D.next_in+ye),O),D.state.wrap===1?D.adler=Ce(D.adler,X,ye,O):D.state.wrap===2&&(D.adler=Fe(D.adler,X,ye,O)),D.next_in+=ye,D.total_in+=ye,ye)},xt=(D,X)=>{let O,ke,ye=D.max_chain_length,Ae=D.strstart,tt=D.prev_length,Oe=D.nice_match;const wt=D.strstart>D.w_size-ot?D.strstart-(D.w_size-ot):0,Ve=D.window,et=D.w_mask,ii=D.prev,Ht=D.strstart+ze;let Ct=Ve[Ae+tt-1],Ho=Ve[Ae+tt];D.prev_length>=D.good_match&&(ye>>=2),Oe>D.lookahead&&(Oe=D.lookahead);do if(O=X,Ve[O+tt]===Ho&&Ve[O+tt-1]===Ct&&Ve[O]===Ve[Ae]&&Ve[++O]===Ve[Ae+1]){Ae+=2,O++;do;while(Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ae<Ht);if(ke=ze-(Ht-Ae),Ae=Ht-ze,ke>tt){if(D.match_start=X,tt=ke,ke>=Oe)break;Ct=Ve[Ae+tt-1],Ho=Ve[Ae+tt]}}while((X=ii[X&et])>wt&&--ye!=0);return tt<=D.lookahead?tt:D.lookahead},fi=D=>{const X=D.w_size;let O,ke,ye;do{if(ke=D.window_size-D.lookahead-D.strstart,D.strstart>=X+(X-ot)&&(D.window.set(D.window.subarray(X,X+X-ke),0),D.match_start-=X,D.strstart-=X,D.block_start-=X,D.insert>D.strstart&&(D.insert=D.strstart),dt(D),ke+=X),D.strm.avail_in===0)break;if(O=St(D.strm,D.window,D.strstart+D.lookahead,ke),D.lookahead+=O,D.lookahead+D.insert>=3)for(ye=D.strstart-D.insert,D.ins_h=D.window[ye],D.ins_h=Ye(D,D.ins_h,D.window[ye+1]);D.insert&&(D.ins_h=Ye(D,D.ins_h,D.window[ye+3-1]),D.prev[ye&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=ye,ye++,D.insert--,!(D.lookahead+D.insert<3)););}while(D.lookahead<ot&&D.strm.avail_in!==0)},ji=(D,X)=>{let O,ke,ye,Ae=D.pending_buf_size-5>D.w_size?D.w_size:D.pending_buf_size-5,tt=0,Oe=D.strm.avail_in;do{if(O=65535,ye=D.bi_valid+42>>3,D.strm.avail_out<ye||(ye=D.strm.avail_out-ye,ke=D.strstart-D.block_start,O>ke+D.strm.avail_in&&(O=ke+D.strm.avail_in),O>ye&&(O=ye),O<Ae&&(O===0&&X!==Q||X===ae||O!==ke+D.strm.avail_in)))break;tt=X===Q&&O===ke+D.strm.avail_in?1:0,Le(D,0,0,tt),D.pending_buf[D.pending-4]=O,D.pending_buf[D.pending-3]=O>>8,D.pending_buf[D.pending-2]=~O,D.pending_buf[D.pending-1]=~O>>8,fe(D.strm),ke&&(ke>O&&(ke=O),D.strm.output.set(D.window.subarray(D.block_start,D.block_start+ke),D.strm.next_out),D.strm.next_out+=ke,D.strm.avail_out-=ke,D.strm.total_out+=ke,D.block_start+=ke,O-=ke),O&&(St(D.strm,D.strm.output,D.strm.next_out,O),D.strm.next_out+=O,D.strm.avail_out-=O,D.strm.total_out+=O)}while(tt===0);return Oe-=D.strm.avail_in,Oe&&(Oe>=D.w_size?(D.matches=2,D.window.set(D.strm.input.subarray(D.strm.next_in-D.w_size,D.strm.next_in),0),D.strstart=D.w_size,D.insert=D.strstart):(D.window_size-D.strstart<=Oe&&(D.strstart-=D.w_size,D.window.set(D.window.subarray(D.w_size,D.w_size+D.strstart),0),D.matches<2&&D.matches++,D.insert>D.strstart&&(D.insert=D.strstart)),D.window.set(D.strm.input.subarray(D.strm.next_in-Oe,D.strm.next_in),D.strstart),D.strstart+=Oe,D.insert+=Oe>D.w_size-D.insert?D.w_size-D.insert:Oe),D.block_start=D.strstart),D.high_water<D.strstart&&(D.high_water=D.strstart),tt?4:X!==ae&&X!==Q&&D.strm.avail_in===0&&D.strstart===D.block_start?2:(ye=D.window_size-D.strstart,D.strm.avail_in>ye&&D.block_start>=D.w_size&&(D.block_start-=D.w_size,D.strstart-=D.w_size,D.window.set(D.window.subarray(D.w_size,D.w_size+D.strstart),0),D.matches<2&&D.matches++,ye+=D.w_size,D.insert>D.strstart&&(D.insert=D.strstart)),ye>D.strm.avail_in&&(ye=D.strm.avail_in),ye&&(St(D.strm,D.window,D.strstart,ye),D.strstart+=ye,D.insert+=ye>D.w_size-D.insert?D.w_size-D.insert:ye),D.high_water<D.strstart&&(D.high_water=D.strstart),ye=D.bi_valid+42>>3,ye=D.pending_buf_size-ye>65535?65535:D.pending_buf_size-ye,Ae=ye>D.w_size?D.w_size:ye,ke=D.strstart-D.block_start,(ke>=Ae||(ke||X===Q)&&X!==ae&&D.strm.avail_in===0&&ke<=ye)&&(O=ke>ye?ye:ke,tt=X===Q&&D.strm.avail_in===0&&O===ke?1:0,Le(D,D.block_start,O,tt),D.block_start+=O,fe(D.strm)),tt?3:1)},Mo=(D,X)=>{let O,ke;for(;;){if(D.lookahead<ot){if(fi(D),D.lookahead<ot&&X===ae)return 1;if(D.lookahead===0)break}if(O=0,D.lookahead>=3&&(D.ins_h=Ye(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart),O!==0&&D.strstart-O<=D.w_size-ot&&(D.match_length=xt(D,O)),D.match_length>=3)if(ke=H(D,D.strstart-D.match_start,D.match_length-3),D.lookahead-=D.match_length,D.match_length<=D.max_lazy_match&&D.lookahead>=3){D.match_length--;do D.strstart++,D.ins_h=Ye(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart;while(--D.match_length!=0);D.strstart++}else D.strstart+=D.match_length,D.match_length=0,D.ins_h=D.window[D.strstart],D.ins_h=Ye(D,D.ins_h,D.window[D.strstart+1]);else ke=H(D,0,D.window[D.strstart]),D.lookahead--,D.strstart++;if(ke&&(be(D,!1),D.strm.avail_out===0))return 1}return D.insert=D.strstart<2?D.strstart:2,X===Q?(be(D,!0),D.strm.avail_out===0?3:4):D.sym_next&&(be(D,!1),D.strm.avail_out===0)?1:2},eo=(D,X)=>{let O,ke,ye;for(;;){if(D.lookahead<ot){if(fi(D),D.lookahead<ot&&X===ae)return 1;if(D.lookahead===0)break}if(O=0,D.lookahead>=3&&(D.ins_h=Ye(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart),D.prev_length=D.match_length,D.prev_match=D.match_start,D.match_length=2,O!==0&&D.prev_length<D.max_lazy_match&&D.strstart-O<=D.w_size-ot&&(D.match_length=xt(D,O),D.match_length<=5&&(D.strategy===xe||D.match_length===3&&D.strstart-D.match_start>4096)&&(D.match_length=2)),D.prev_length>=3&&D.match_length<=D.prev_length){ye=D.strstart+D.lookahead-3,ke=H(D,D.strstart-1-D.prev_match,D.prev_length-3),D.lookahead-=D.prev_length-1,D.prev_length-=2;do++D.strstart<=ye&&(D.ins_h=Ye(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart);while(--D.prev_length!=0);if(D.match_available=0,D.match_length=2,D.strstart++,ke&&(be(D,!1),D.strm.avail_out===0))return 1}else if(D.match_available){if(ke=H(D,0,D.window[D.strstart-1]),ke&&be(D,!1),D.strstart++,D.lookahead--,D.strm.avail_out===0)return 1}else D.match_available=1,D.strstart++,D.lookahead--}return D.match_available&&(ke=H(D,0,D.window[D.strstart-1]),D.match_available=0),D.insert=D.strstart<2?D.strstart:2,X===Q?(be(D,!0),D.strm.avail_out===0?3:4):D.sym_next&&(be(D,!1),D.strm.avail_out===0)?1:2};function ar(D,X,O,ke,ye){this.good_length=D,this.max_lazy=X,this.nice_length=O,this.max_chain=ke,this.func=ye}const Vi=[new ar(0,0,0,0,ji),new ar(4,4,8,4,Mo),new ar(4,5,16,8,Mo),new ar(4,6,32,32,Mo),new ar(4,4,16,16,eo),new ar(8,16,32,32,eo),new ar(8,16,128,128,eo),new ar(8,32,128,256,eo),new ar(32,128,258,1024,eo),new ar(32,258,258,4096,eo)];function rh(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Ee,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),st(this.dyn_ltree),st(this.dyn_dtree),st(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),st(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),st(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const ds=D=>{if(!D)return 1;const X=D.state;return!X||X.strm!==D||X.status!==At&&X.status!==57&&X.status!==69&&X.status!==73&&X.status!==91&&X.status!==103&&X.status!==ft&&X.status!==lt?1:0},c2=D=>{if(ds(D))return ut(D,ne);D.total_in=D.total_out=0,D.data_type=Ne;const X=D.state;return X.pending=0,X.pending_out=0,X.wrap<0&&(X.wrap=-X.wrap),X.status=X.wrap===2?57:X.wrap?At:ft,D.adler=X.wrap===2?0:1,X.last_flush=-2,we(X),ie},_d=D=>{const X=c2(D);var O;return X===ie&&((O=D.state).window_size=2*O.w_size,st(O.head),O.max_lazy_match=Vi[O.level].max_lazy,O.good_match=Vi[O.level].good_length,O.nice_match=Vi[O.level].nice_length,O.max_chain_length=Vi[O.level].max_chain,O.strstart=0,O.block_start=0,O.lookahead=0,O.insert=0,O.match_length=O.prev_length=2,O.match_available=0,O.ins_h=0),X},d2=(D,X,O,ke,ye,Ae)=>{if(!D)return ne;let tt=1;if(X===ue&&(X=6),ke<0?(tt=0,ke=-ke):ke>15&&(tt=2,ke-=16),ye<1||ye>9||O!==Ee||ke<8||ke>15||X<0||X>9||Ae<0||Ae>je||ke===8&&tt!==1)return ut(D,ne);ke===8&&(ke=9);const Oe=new rh;return D.state=Oe,Oe.strm=D,Oe.status=At,Oe.wrap=tt,Oe.gzhead=null,Oe.w_bits=ke,Oe.w_size=1<<Oe.w_bits,Oe.w_mask=Oe.w_size-1,Oe.hash_bits=ye+7,Oe.hash_size=1<<Oe.hash_bits,Oe.hash_mask=Oe.hash_size-1,Oe.hash_shift=~~((Oe.hash_bits+3-1)/3),Oe.window=new Uint8Array(2*Oe.w_size),Oe.head=new Uint16Array(Oe.hash_size),Oe.prev=new Uint16Array(Oe.w_size),Oe.lit_bufsize=1<<ye+6,Oe.pending_buf_size=4*Oe.lit_bufsize,Oe.pending_buf=new Uint8Array(Oe.pending_buf_size),Oe.sym_buf=Oe.lit_bufsize,Oe.sym_end=3*(Oe.lit_bufsize-1),Oe.level=X,Oe.strategy=Ae,Oe.method=O,_d(D)};var fc={deflateInit:(D,X)=>d2(D,X,Ee,15,8,he),deflateInit2:d2,deflateReset:_d,deflateResetKeep:c2,deflateSetHeader:(D,X)=>ds(D)||D.state.wrap!==2?ne:(D.state.gzhead=X,ie),deflate:(D,X)=>{if(ds(D)||X>Z||X<0)return D?ut(D,ne):ne;const O=D.state;if(!D.output||D.avail_in!==0&&!D.input||O.status===lt&&X!==Q)return ut(D,D.avail_out===0?K:ne);const ke=O.last_flush;if(O.last_flush=X,O.pending!==0){if(fe(D),D.avail_out===0)return O.last_flush=-1,ie}else if(D.avail_in===0&&Te(X)<=Te(ke)&&X!==Q)return ut(D,K);if(O.status===lt&&D.avail_in!==0)return ut(D,K);if(O.status===At&&O.wrap===0&&(O.status=ft),O.status===At){let ye=Ee+(O.w_bits-8<<4)<<8,Ae=-1;if(Ae=O.strategy>=oe||O.level<2?0:O.level<6?1:O.level===6?2:3,ye|=Ae<<6,O.strstart!==0&&(ye|=32),ye+=31-ye%31,ht(O,ye),O.strstart!==0&&(ht(O,D.adler>>>16),ht(O,65535&D.adler)),D.adler=1,O.status=ft,fe(D),O.pending!==0)return O.last_flush=-1,ie}if(O.status===57){if(D.adler=0,Xe(O,31),Xe(O,139),Xe(O,8),O.gzhead)Xe(O,(O.gzhead.text?1:0)+(O.gzhead.hcrc?2:0)+(O.gzhead.extra?4:0)+(O.gzhead.name?8:0)+(O.gzhead.comment?16:0)),Xe(O,255&O.gzhead.time),Xe(O,O.gzhead.time>>8&255),Xe(O,O.gzhead.time>>16&255),Xe(O,O.gzhead.time>>24&255),Xe(O,O.level===9?2:O.strategy>=oe||O.level<2?4:0),Xe(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&(Xe(O,255&O.gzhead.extra.length),Xe(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(D.adler=Fe(D.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69;else if(Xe(O,0),Xe(O,0),Xe(O,0),Xe(O,0),Xe(O,0),Xe(O,O.level===9?2:O.strategy>=oe||O.level<2?4:0),Xe(O,3),O.status=ft,fe(D),O.pending!==0)return O.last_flush=-1,ie}if(O.status===69){if(O.gzhead.extra){let ye=O.pending,Ae=(65535&O.gzhead.extra.length)-O.gzindex;for(;O.pending+Ae>O.pending_buf_size;){let Oe=O.pending_buf_size-O.pending;if(O.pending_buf.set(O.gzhead.extra.subarray(O.gzindex,O.gzindex+Oe),O.pending),O.pending=O.pending_buf_size,O.gzhead.hcrc&&O.pending>ye&&(D.adler=Fe(D.adler,O.pending_buf,O.pending-ye,ye)),O.gzindex+=Oe,fe(D),O.pending!==0)return O.last_flush=-1,ie;ye=0,Ae-=Oe}let tt=new Uint8Array(O.gzhead.extra);O.pending_buf.set(tt.subarray(O.gzindex,O.gzindex+Ae),O.pending),O.pending+=Ae,O.gzhead.hcrc&&O.pending>ye&&(D.adler=Fe(D.adler,O.pending_buf,O.pending-ye,ye)),O.gzindex=0}O.status=73}if(O.status===73){if(O.gzhead.name){let ye,Ae=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>Ae&&(D.adler=Fe(D.adler,O.pending_buf,O.pending-Ae,Ae)),fe(D),O.pending!==0)return O.last_flush=-1,ie;Ae=0}ye=O.gzindex<O.gzhead.name.length?255&O.gzhead.name.charCodeAt(O.gzindex++):0,Xe(O,ye)}while(ye!==0);O.gzhead.hcrc&&O.pending>Ae&&(D.adler=Fe(D.adler,O.pending_buf,O.pending-Ae,Ae)),O.gzindex=0}O.status=91}if(O.status===91){if(O.gzhead.comment){let ye,Ae=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>Ae&&(D.adler=Fe(D.adler,O.pending_buf,O.pending-Ae,Ae)),fe(D),O.pending!==0)return O.last_flush=-1,ie;Ae=0}ye=O.gzindex<O.gzhead.comment.length?255&O.gzhead.comment.charCodeAt(O.gzindex++):0,Xe(O,ye)}while(ye!==0);O.gzhead.hcrc&&O.pending>Ae&&(D.adler=Fe(D.adler,O.pending_buf,O.pending-Ae,Ae))}O.status=103}if(O.status===103){if(O.gzhead.hcrc){if(O.pending+2>O.pending_buf_size&&(fe(D),O.pending!==0))return O.last_flush=-1,ie;Xe(O,255&D.adler),Xe(O,D.adler>>8&255),D.adler=0}if(O.status=ft,fe(D),O.pending!==0)return O.last_flush=-1,ie}if(D.avail_in!==0||O.lookahead!==0||X!==ae&&O.status!==lt){let ye=O.level===0?ji(O,X):O.strategy===oe?((Ae,tt)=>{let Oe;for(;;){if(Ae.lookahead===0&&(fi(Ae),Ae.lookahead===0)){if(tt===ae)return 1;break}if(Ae.match_length=0,Oe=H(Ae,0,Ae.window[Ae.strstart]),Ae.lookahead--,Ae.strstart++,Oe&&(be(Ae,!1),Ae.strm.avail_out===0))return 1}return Ae.insert=0,tt===Q?(be(Ae,!0),Ae.strm.avail_out===0?3:4):Ae.sym_next&&(be(Ae,!1),Ae.strm.avail_out===0)?1:2})(O,X):O.strategy===Me?((Ae,tt)=>{let Oe,wt,Ve,et;const ii=Ae.window;for(;;){if(Ae.lookahead<=ze){if(fi(Ae),Ae.lookahead<=ze&&tt===ae)return 1;if(Ae.lookahead===0)break}if(Ae.match_length=0,Ae.lookahead>=3&&Ae.strstart>0&&(Ve=Ae.strstart-1,wt=ii[Ve],wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve])){et=Ae.strstart+ze;do;while(wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&Ve<et);Ae.match_length=ze-(et-Ve),Ae.match_length>Ae.lookahead&&(Ae.match_length=Ae.lookahead)}if(Ae.match_length>=3?(Oe=H(Ae,1,Ae.match_length-3),Ae.lookahead-=Ae.match_length,Ae.strstart+=Ae.match_length,Ae.match_length=0):(Oe=H(Ae,0,Ae.window[Ae.strstart]),Ae.lookahead--,Ae.strstart++),Oe&&(be(Ae,!1),Ae.strm.avail_out===0))return 1}return Ae.insert=0,tt===Q?(be(Ae,!0),Ae.strm.avail_out===0?3:4):Ae.sym_next&&(be(Ae,!1),Ae.strm.avail_out===0)?1:2})(O,X):Vi[O.level].func(O,X);if(ye!==3&&ye!==4||(O.status=lt),ye===1||ye===3)return D.avail_out===0&&(O.last_flush=-1),ie;if(ye===2&&(X===Be?ee(O):X!==Z&&(Le(O,0,0,!1),X===pe&&(st(O.head),O.lookahead===0&&(O.strstart=0,O.block_start=0,O.insert=0))),fe(D),D.avail_out===0))return O.last_flush=-1,ie}return X!==Q?ie:O.wrap<=0?re:(O.wrap===2?(Xe(O,255&D.adler),Xe(O,D.adler>>8&255),Xe(O,D.adler>>16&255),Xe(O,D.adler>>24&255),Xe(O,255&D.total_in),Xe(O,D.total_in>>8&255),Xe(O,D.total_in>>16&255),Xe(O,D.total_in>>24&255)):(ht(O,D.adler>>>16),ht(O,65535&D.adler)),fe(D),O.wrap>0&&(O.wrap=-O.wrap),O.pending!==0?ie:re)},deflateEnd:D=>{if(ds(D))return ne;const X=D.state.status;return D.state=null,X===ft?ut(D,G):ie},deflateSetDictionary:(D,X)=>{let O=X.length;if(ds(D))return ne;const ke=D.state,ye=ke.wrap;if(ye===2||ye===1&&ke.status!==At||ke.lookahead)return ne;if(ye===1&&(D.adler=Ce(D.adler,X,O,0)),ke.wrap=0,O>=ke.w_size){ye===0&&(st(ke.head),ke.strstart=0,ke.block_start=0,ke.insert=0);let wt=new Uint8Array(ke.w_size);wt.set(X.subarray(O-ke.w_size,O),0),X=wt,O=ke.w_size}const Ae=D.avail_in,tt=D.next_in,Oe=D.input;for(D.avail_in=O,D.next_in=0,D.input=X,fi(ke);ke.lookahead>=3;){let wt=ke.strstart,Ve=ke.lookahead-2;do ke.ins_h=Ye(ke,ke.ins_h,ke.window[wt+3-1]),ke.prev[wt&ke.w_mask]=ke.head[ke.ins_h],ke.head[ke.ins_h]=wt,wt++;while(--Ve);ke.strstart=wt,ke.lookahead=2,fi(ke)}return ke.strstart+=ke.lookahead,ke.block_start=ke.strstart,ke.insert=ke.lookahead,ke.lookahead=0,ke.match_length=ke.prev_length=2,ke.match_available=0,D.next_in=tt,D.input=Oe,D.avail_in=Ae,ke.wrap=ye,ie},deflateInfo:"pako deflate (from Nodeca project)"};const Q9=(D,X)=>Object.prototype.hasOwnProperty.call(D,X);var G3=function(D){const X=Array.prototype.slice.call(arguments,1);for(;X.length;){const O=X.shift();if(O){if(typeof O!="object")throw new TypeError(O+"must be non-object");for(const ke in O)Q9(O,ke)&&(D[ke]=O[ke])}}return D},K3=D=>{let X=0;for(let ke=0,ye=D.length;ke<ye;ke++)X+=D[ke].length;const O=new Uint8Array(X);for(let ke=0,ye=0,Ae=D.length;ke<Ae;ke++){let tt=D[ke];O.set(tt,ye),ye+=tt.length}return O};let J3=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{J3=!1}const Fd=new Uint8Array(256);for(let D=0;D<256;D++)Fd[D]=D>=252?6:D>=248?5:D>=240?4:D>=224?3:D>=192?2:1;Fd[254]=Fd[254]=1;var u2=D=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(D);let X,O,ke,ye,Ae,tt=D.length,Oe=0;for(ye=0;ye<tt;ye++)O=D.charCodeAt(ye),(64512&O)==55296&&ye+1<tt&&(ke=D.charCodeAt(ye+1),(64512&ke)==56320&&(O=65536+(O-55296<<10)+(ke-56320),ye++)),Oe+=O<128?1:O<2048?2:O<65536?3:4;for(X=new Uint8Array(Oe),Ae=0,ye=0;Ae<Oe;ye++)O=D.charCodeAt(ye),(64512&O)==55296&&ye+1<tt&&(ke=D.charCodeAt(ye+1),(64512&ke)==56320&&(O=65536+(O-55296<<10)+(ke-56320),ye++)),O<128?X[Ae++]=O:O<2048?(X[Ae++]=192|O>>>6,X[Ae++]=128|63&O):O<65536?(X[Ae++]=224|O>>>12,X[Ae++]=128|O>>>6&63,X[Ae++]=128|63&O):(X[Ae++]=240|O>>>18,X[Ae++]=128|O>>>12&63,X[Ae++]=128|O>>>6&63,X[Ae++]=128|63&O);return X},se=(D,X)=>{const O=X||D.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(D.subarray(0,X));let ke,ye;const Ae=new Array(2*O);for(ye=0,ke=0;ke<O;){let tt=D[ke++];if(tt<128){Ae[ye++]=tt;continue}let Oe=Fd[tt];if(Oe>4)Ae[ye++]=65533,ke+=Oe-1;else{for(tt&=Oe===2?31:Oe===3?15:7;Oe>1&&ke<O;)tt=tt<<6|63&D[ke++],Oe--;Oe>1?Ae[ye++]=65533:tt<65536?Ae[ye++]=tt:(tt-=65536,Ae[ye++]=55296|tt>>10&1023,Ae[ye++]=56320|1023&tt)}}return((tt,Oe)=>{if(Oe<65534&&tt.subarray&&J3)return String.fromCharCode.apply(null,tt.length===Oe?tt:tt.subarray(0,Oe));let wt="";for(let Ve=0;Ve<Oe;Ve++)wt+=String.fromCharCode(tt[Ve]);return wt})(Ae,ye)},Ke=(D,X)=>{(X=X||D.length)>D.length&&(X=D.length);let O=X-1;for(;O>=0&&(192&D[O])==128;)O--;return O<0||O===0?X:O+Fd[D[O]]>X?O:X},nt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const at=Object.prototype.toString,{Z_NO_FLUSH:Ge,Z_SYNC_FLUSH:bt,Z_FULL_FLUSH:Lt,Z_FINISH:Ot,Z_OK:Ft,Z_STREAM_END:Yt,Z_DEFAULT_COMPRESSION:$t,Z_DEFAULT_STRATEGY:Xt,Z_DEFLATED:bi}=ge;function Ri(D){this.options=G3({level:$t,method:bi,chunkSize:16384,windowBits:15,memLevel:8,strategy:Xt},D||{});let X=this.options;X.raw&&X.windowBits>0?X.windowBits=-X.windowBits:X.gzip&&X.windowBits>0&&X.windowBits<16&&(X.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new nt,this.strm.avail_out=0;let O=fc.deflateInit2(this.strm,X.level,X.method,X.windowBits,X.memLevel,X.strategy);if(O!==Ft)throw new Error(ve[O]);if(X.header&&fc.deflateSetHeader(this.strm,X.header),X.dictionary){let ke;if(ke=typeof X.dictionary=="string"?u2(X.dictionary):at.call(X.dictionary)==="[object ArrayBuffer]"?new Uint8Array(X.dictionary):X.dictionary,O=fc.deflateSetDictionary(this.strm,ke),O!==Ft)throw new Error(ve[O]);this._dict_set=!0}}function Zi(D,X){const O=new Ri(X);if(O.push(D,!0),O.err)throw O.msg||ve[O.err];return O.result}Ri.prototype.push=function(D,X){const O=this.strm,ke=this.options.chunkSize;let ye,Ae;if(this.ended)return!1;for(Ae=X===~~X?X:X===!0?Ot:Ge,typeof D=="string"?O.input=u2(D):at.call(D)==="[object ArrayBuffer]"?O.input=new Uint8Array(D):O.input=D,O.next_in=0,O.avail_in=O.input.length;;)if(O.avail_out===0&&(O.output=new Uint8Array(ke),O.next_out=0,O.avail_out=ke),(Ae===bt||Ae===Lt)&&O.avail_out<=6)this.onData(O.output.subarray(0,O.next_out)),O.avail_out=0;else{if(ye=fc.deflate(O,Ae),ye===Yt)return O.next_out>0&&this.onData(O.output.subarray(0,O.next_out)),ye=fc.deflateEnd(this.strm),this.onEnd(ye),this.ended=!0,ye===Ft;if(O.avail_out!==0){if(Ae>0&&O.next_out>0)this.onData(O.output.subarray(0,O.next_out)),O.avail_out=0;else if(O.avail_in===0)break}else this.onData(O.output)}return!0},Ri.prototype.onData=function(D){this.chunks.push(D)},Ri.prototype.onEnd=function(D){D===Ft&&(this.result=K3(this.chunks)),this.chunks=[],this.err=D,this.msg=this.strm.msg};var yo={Deflate:Ri,deflate:Zi,deflateRaw:function(D,X){return(X=X||{}).raw=!0,Zi(D,X)},gzip:function(D,X){return(X=X||{}).gzip=!0,Zi(D,X)}};const Fi=16209;var qt=function(D,X){let O,ke,ye,Ae,tt,Oe,wt,Ve,et,ii,Ht,Ct,Ho,Bi,Qt,Li,ti,kt,ei,Di,Pt,wi,oi,Gt;const ui=D.state;O=D.next_in,oi=D.input,ke=O+(D.avail_in-5),ye=D.next_out,Gt=D.output,Ae=ye-(X-D.avail_out),tt=ye+(D.avail_out-257),Oe=ui.dmax,wt=ui.wsize,Ve=ui.whave,et=ui.wnext,ii=ui.window,Ht=ui.hold,Ct=ui.bits,Ho=ui.lencode,Bi=ui.distcode,Qt=(1<<ui.lenbits)-1,Li=(1<<ui.distbits)-1;e:do{Ct<15&&(Ht+=oi[O++]<<Ct,Ct+=8,Ht+=oi[O++]<<Ct,Ct+=8),ti=Ho[Ht&Qt];t:for(;;){if(kt=ti>>>24,Ht>>>=kt,Ct-=kt,kt=ti>>>16&255,kt===0)Gt[ye++]=65535&ti;else{if(!(16&kt)){if((64&kt)==0){ti=Ho[(65535&ti)+(Ht&(1<<kt)-1)];continue t}if(32&kt){ui.mode=16191;break e}D.msg="invalid literal/length code",ui.mode=Fi;break e}ei=65535&ti,kt&=15,kt&&(Ct<kt&&(Ht+=oi[O++]<<Ct,Ct+=8),ei+=Ht&(1<<kt)-1,Ht>>>=kt,Ct-=kt),Ct<15&&(Ht+=oi[O++]<<Ct,Ct+=8,Ht+=oi[O++]<<Ct,Ct+=8),ti=Bi[Ht&Li];i:for(;;){if(kt=ti>>>24,Ht>>>=kt,Ct-=kt,kt=ti>>>16&255,!(16&kt)){if((64&kt)==0){ti=Bi[(65535&ti)+(Ht&(1<<kt)-1)];continue i}D.msg="invalid distance code",ui.mode=Fi;break e}if(Di=65535&ti,kt&=15,Ct<kt&&(Ht+=oi[O++]<<Ct,Ct+=8,Ct<kt&&(Ht+=oi[O++]<<Ct,Ct+=8)),Di+=Ht&(1<<kt)-1,Di>Oe){D.msg="invalid distance too far back",ui.mode=Fi;break e}if(Ht>>>=kt,Ct-=kt,kt=ye-Ae,Di>kt){if(kt=Di-kt,kt>Ve&&ui.sane){D.msg="invalid distance too far back",ui.mode=Fi;break e}if(Pt=0,wi=ii,et===0){if(Pt+=wt-kt,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Di,wi=Gt}}else if(et<kt){if(Pt+=wt+et-kt,kt-=et,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);if(Pt=0,et<ei){kt=et,ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Di,wi=Gt}}}else if(Pt+=et-kt,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Di,wi=Gt}for(;ei>2;)Gt[ye++]=wi[Pt++],Gt[ye++]=wi[Pt++],Gt[ye++]=wi[Pt++],ei-=3;ei&&(Gt[ye++]=wi[Pt++],ei>1&&(Gt[ye++]=wi[Pt++]))}else{Pt=ye-Di;do Gt[ye++]=Gt[Pt++],Gt[ye++]=Gt[Pt++],Gt[ye++]=Gt[Pt++],ei-=3;while(ei>2);ei&&(Gt[ye++]=Gt[Pt++],ei>1&&(Gt[ye++]=Gt[Pt++]))}break}}break}}while(O<ke&&ye<tt);ei=Ct>>3,O-=ei,Ct-=ei<<3,Ht&=(1<<Ct)-1,D.next_in=O,D.next_out=ye,D.avail_in=O<ke?ke-O+5:5-(O-ke),D.avail_out=ye<tt?tt-ye+257:257-(ye-tt),ui.hold=Ht,ui.bits=Ct};const Fo=15,Sa=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),jn=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Ac=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Yr=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var Ta=(D,X,O,ke,ye,Ae,tt,Oe)=>{const wt=Oe.bits;let Ve,et,ii,Ht,Ct,Ho,Bi=0,Qt=0,Li=0,ti=0,kt=0,ei=0,Di=0,Pt=0,wi=0,oi=0,Gt=null;const ui=new Uint16Array(16),Xr=new Uint16Array(16);let A2,$3,e4,t4=null;for(Bi=0;Bi<=Fo;Bi++)ui[Bi]=0;for(Qt=0;Qt<ke;Qt++)ui[X[O+Qt]]++;for(kt=wt,ti=Fo;ti>=1&&ui[ti]===0;ti--);if(kt>ti&&(kt=ti),ti===0)return ye[Ae++]=20971520,ye[Ae++]=20971520,Oe.bits=1,0;for(Li=1;Li<ti&&ui[Li]===0;Li++);for(kt<Li&&(kt=Li),Pt=1,Bi=1;Bi<=Fo;Bi++)if(Pt<<=1,Pt-=ui[Bi],Pt<0)return-1;if(Pt>0&&(D===0||ti!==1))return-1;for(Xr[1]=0,Bi=1;Bi<Fo;Bi++)Xr[Bi+1]=Xr[Bi]+ui[Bi];for(Qt=0;Qt<ke;Qt++)X[O+Qt]!==0&&(tt[Xr[X[O+Qt]]++]=Qt);if(D===0?(Gt=t4=tt,Ho=20):D===1?(Gt=Sa,t4=jn,Ho=257):(Gt=Ac,t4=Yr,Ho=0),oi=0,Qt=0,Bi=Li,Ct=Ae,ei=kt,Di=0,ii=-1,wi=1<<kt,Ht=wi-1,D===1&&wi>852||D===2&&wi>592)return 1;for(;;){A2=Bi-Di,tt[Qt]+1<Ho?($3=0,e4=tt[Qt]):tt[Qt]>=Ho?($3=t4[tt[Qt]-Ho],e4=Gt[tt[Qt]-Ho]):($3=96,e4=0),Ve=1<<Bi-Di,et=1<<ei,Li=et;do et-=Ve,ye[Ct+(oi>>Di)+et]=A2<<24|$3<<16|e4|0;while(et!==0);for(Ve=1<<Bi-1;oi&Ve;)Ve>>=1;if(Ve!==0?(oi&=Ve-1,oi+=Ve):oi=0,Qt++,--ui[Bi]==0){if(Bi===ti)break;Bi=X[O+tt[Qt]]}if(Bi>kt&&(oi&Ht)!==ii){for(Di===0&&(Di=kt),Ct+=Li,ei=Bi-Di,Pt=1<<ei;ei+Di<ti&&(Pt-=ui[ei+Di],!(Pt<=0));)ei++,Pt<<=1;if(wi+=1<<ei,D===1&&wi>852||D===2&&wi>592)return 1;ii=oi&Ht,ye[ii]=kt<<24|ei<<16|Ct-Ae|0}}return oi!==0&&(ye[Ct+oi]=Bi-Di<<24|64<<16|0),Oe.bits=kt,0};const{Z_FINISH:po,Z_BLOCK:Cn,Z_TREES:kr,Z_OK:bo,Z_STREAM_END:Vn,Z_NEED_DICT:h2,Z_STREAM_ERROR:$o,Z_DATA_ERROR:hL,Z_MEM_ERROR:pL,Z_BUF_ERROR:Dpe,Z_DEFLATED:fL}=ge,Z3=16180,W3=16190,il=16191,G9=16192,K9=16194,Y3=16199,X3=16200,J9=16206,Bo=16209,AL=D=>(D>>>24&255)+(D>>>8&65280)+((65280&D)<<8)+((255&D)<<24);function _pe(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Od=D=>{if(!D)return 1;const X=D.state;return!X||X.strm!==D||X.mode<Z3||X.mode>16211?1:0},gL=D=>{if(Od(D))return $o;const X=D.state;return D.total_in=D.total_out=X.total=0,D.msg="",X.wrap&&(D.adler=1&X.wrap),X.mode=Z3,X.last=0,X.havedict=0,X.flags=-1,X.dmax=32768,X.head=null,X.hold=0,X.bits=0,X.lencode=X.lendyn=new Int32Array(852),X.distcode=X.distdyn=new Int32Array(592),X.sane=1,X.back=-1,bo},mL=D=>{if(Od(D))return $o;const X=D.state;return X.wsize=0,X.whave=0,X.wnext=0,gL(D)},vL=(D,X)=>{let O;if(Od(D))return $o;const ke=D.state;return X<0?(O=0,X=-X):(O=5+(X>>4),X<48&&(X&=15)),X&&(X<8||X>15)?$o:(ke.window!==null&&ke.wbits!==X&&(ke.window=null),ke.wrap=O,ke.wbits=X,mL(D))},yL=(D,X)=>{if(!D)return $o;const O=new _pe;D.state=O,O.strm=D,O.window=null,O.mode=Z3;const ke=vL(D,X);return ke!==bo&&(D.state=null),ke};let Z9,W9,bL=!0;const Fpe=D=>{if(bL){Z9=new Int32Array(512),W9=new Int32Array(32);let X=0;for(;X<144;)D.lens[X++]=8;for(;X<256;)D.lens[X++]=9;for(;X<280;)D.lens[X++]=7;for(;X<288;)D.lens[X++]=8;for(Ta(1,D.lens,0,288,Z9,0,D.work,{bits:9}),X=0;X<32;)D.lens[X++]=5;Ta(2,D.lens,0,32,W9,0,D.work,{bits:5}),bL=!1}D.lencode=Z9,D.lenbits=9,D.distcode=W9,D.distbits=5},wL=(D,X,O,ke)=>{let ye;const Ae=D.state;return Ae.window===null&&(Ae.wsize=1<<Ae.wbits,Ae.wnext=0,Ae.whave=0,Ae.window=new Uint8Array(Ae.wsize)),ke>=Ae.wsize?(Ae.window.set(X.subarray(O-Ae.wsize,O),0),Ae.wnext=0,Ae.whave=Ae.wsize):(ye=Ae.wsize-Ae.wnext,ye>ke&&(ye=ke),Ae.window.set(X.subarray(O-ke,O-ke+ye),Ae.wnext),(ke-=ye)?(Ae.window.set(X.subarray(O-ke,O),0),Ae.wnext=ke,Ae.whave=Ae.wsize):(Ae.wnext+=ye,Ae.wnext===Ae.wsize&&(Ae.wnext=0),Ae.whave<Ae.wsize&&(Ae.whave+=ye))),0};var ol={inflateReset:mL,inflateReset2:vL,inflateResetKeep:gL,inflateInit:D=>yL(D,15),inflateInit2:yL,inflate:(D,X)=>{let O,ke,ye,Ae,tt,Oe,wt,Ve,et,ii,Ht,Ct,Ho,Bi,Qt,Li,ti,kt,ei,Di,Pt,wi,oi=0;const Gt=new Uint8Array(4);let ui,Xr;const A2=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Od(D)||!D.output||!D.input&&D.avail_in!==0)return $o;O=D.state,O.mode===il&&(O.mode=G9),tt=D.next_out,ye=D.output,wt=D.avail_out,Ae=D.next_in,ke=D.input,Oe=D.avail_in,Ve=O.hold,et=O.bits,ii=Oe,Ht=wt,wi=bo;e:for(;;)switch(O.mode){case Z3:if(O.wrap===0){O.mode=G9;break}for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(2&O.wrap&&Ve===35615){O.wbits===0&&(O.wbits=15),O.check=0,Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0),Ve=0,et=0,O.mode=16181;break}if(O.head&&(O.head.done=!1),!(1&O.wrap)||(((255&Ve)<<8)+(Ve>>8))%31){D.msg="incorrect header check",O.mode=Bo;break}if((15&Ve)!==fL){D.msg="unknown compression method",O.mode=Bo;break}if(Ve>>>=4,et-=4,Pt=8+(15&Ve),O.wbits===0&&(O.wbits=Pt),Pt>15||Pt>O.wbits){D.msg="invalid window size",O.mode=Bo;break}O.dmax=1<<O.wbits,O.flags=0,D.adler=O.check=1,O.mode=512&Ve?16189:il,Ve=0,et=0;break;case 16181:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(O.flags=Ve,(255&O.flags)!==fL){D.msg="unknown compression method",O.mode=Bo;break}if(57344&O.flags){D.msg="unknown header flags set",O.mode=Bo;break}O.head&&(O.head.text=Ve>>8&1),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0)),Ve=0,et=0,O.mode=16182;case 16182:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.head&&(O.head.time=Ve),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,Gt[2]=Ve>>>16&255,Gt[3]=Ve>>>24&255,O.check=Fe(O.check,Gt,4,0)),Ve=0,et=0,O.mode=16183;case 16183:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.head&&(O.head.xflags=255&Ve,O.head.os=Ve>>8),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0)),Ve=0,et=0,O.mode=16184;case 16184:if(1024&O.flags){for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.length=Ve,O.head&&(O.head.extra_len=Ve),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0)),Ve=0,et=0}else O.head&&(O.head.extra=null);O.mode=16185;case 16185:if(1024&O.flags&&(Ct=O.length,Ct>Oe&&(Ct=Oe),Ct&&(O.head&&(Pt=O.head.extra_len-O.length,O.head.extra||(O.head.extra=new Uint8Array(O.head.extra_len)),O.head.extra.set(ke.subarray(Ae,Ae+Ct),Pt)),512&O.flags&&4&O.wrap&&(O.check=Fe(O.check,ke,Ct,Ae)),Oe-=Ct,Ae+=Ct,O.length-=Ct),O.length))break e;O.length=0,O.mode=16186;case 16186:if(2048&O.flags){if(Oe===0)break e;Ct=0;do Pt=ke[Ae+Ct++],O.head&&Pt&&O.length<65536&&(O.head.name+=String.fromCharCode(Pt));while(Pt&&Ct<Oe);if(512&O.flags&&4&O.wrap&&(O.check=Fe(O.check,ke,Ct,Ae)),Oe-=Ct,Ae+=Ct,Pt)break e}else O.head&&(O.head.name=null);O.length=0,O.mode=16187;case 16187:if(4096&O.flags){if(Oe===0)break e;Ct=0;do Pt=ke[Ae+Ct++],O.head&&Pt&&O.length<65536&&(O.head.comment+=String.fromCharCode(Pt));while(Pt&&Ct<Oe);if(512&O.flags&&4&O.wrap&&(O.check=Fe(O.check,ke,Ct,Ae)),Oe-=Ct,Ae+=Ct,Pt)break e}else O.head&&(O.head.comment=null);O.mode=16188;case 16188:if(512&O.flags){for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(4&O.wrap&&Ve!==(65535&O.check)){D.msg="header crc mismatch",O.mode=Bo;break}Ve=0,et=0}O.head&&(O.head.hcrc=O.flags>>9&1,O.head.done=!0),D.adler=O.check=0,O.mode=il;break;case 16189:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}D.adler=O.check=AL(Ve),Ve=0,et=0,O.mode=W3;case W3:if(O.havedict===0)return D.next_out=tt,D.avail_out=wt,D.next_in=Ae,D.avail_in=Oe,O.hold=Ve,O.bits=et,h2;D.adler=O.check=1,O.mode=il;case il:if(X===Cn||X===kr)break e;case G9:if(O.last){Ve>>>=7&et,et-=7&et,O.mode=J9;break}for(;et<3;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}switch(O.last=1&Ve,Ve>>>=1,et-=1,3&Ve){case 0:O.mode=16193;break;case 1:if(Fpe(O),O.mode=Y3,X===kr){Ve>>>=2,et-=2;break e}break;case 2:O.mode=16196;break;case 3:D.msg="invalid block type",O.mode=Bo}Ve>>>=2,et-=2;break;case 16193:for(Ve>>>=7&et,et-=7&et;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if((65535&Ve)!=(Ve>>>16^65535)){D.msg="invalid stored block lengths",O.mode=Bo;break}if(O.length=65535&Ve,Ve=0,et=0,O.mode=K9,X===kr)break e;case K9:O.mode=16195;case 16195:if(Ct=O.length,Ct){if(Ct>Oe&&(Ct=Oe),Ct>wt&&(Ct=wt),Ct===0)break e;ye.set(ke.subarray(Ae,Ae+Ct),tt),Oe-=Ct,Ae+=Ct,wt-=Ct,tt+=Ct,O.length-=Ct;break}O.mode=il;break;case 16196:for(;et<14;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(O.nlen=257+(31&Ve),Ve>>>=5,et-=5,O.ndist=1+(31&Ve),Ve>>>=5,et-=5,O.ncode=4+(15&Ve),Ve>>>=4,et-=4,O.nlen>286||O.ndist>30){D.msg="too many length or distance symbols",O.mode=Bo;break}O.have=0,O.mode=16197;case 16197:for(;O.have<O.ncode;){for(;et<3;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.lens[A2[O.have++]]=7&Ve,Ve>>>=3,et-=3}for(;O.have<19;)O.lens[A2[O.have++]]=0;if(O.lencode=O.lendyn,O.lenbits=7,ui={bits:O.lenbits},wi=Ta(0,O.lens,0,19,O.lencode,0,O.work,ui),O.lenbits=ui.bits,wi){D.msg="invalid code lengths set",O.mode=Bo;break}O.have=0,O.mode=16198;case 16198:for(;O.have<O.nlen+O.ndist;){for(;oi=O.lencode[Ve&(1<<O.lenbits)-1],Qt=oi>>>24,Li=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(ti<16)Ve>>>=Qt,et-=Qt,O.lens[O.have++]=ti;else{if(ti===16){for(Xr=Qt+2;et<Xr;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(Ve>>>=Qt,et-=Qt,O.have===0){D.msg="invalid bit length repeat",O.mode=Bo;break}Pt=O.lens[O.have-1],Ct=3+(3&Ve),Ve>>>=2,et-=2}else if(ti===17){for(Xr=Qt+3;et<Xr;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=Qt,et-=Qt,Pt=0,Ct=3+(7&Ve),Ve>>>=3,et-=3}else{for(Xr=Qt+7;et<Xr;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=Qt,et-=Qt,Pt=0,Ct=11+(127&Ve),Ve>>>=7,et-=7}if(O.have+Ct>O.nlen+O.ndist){D.msg="invalid bit length repeat",O.mode=Bo;break}for(;Ct--;)O.lens[O.have++]=Pt}}if(O.mode===Bo)break;if(O.lens[256]===0){D.msg="invalid code -- missing end-of-block",O.mode=Bo;break}if(O.lenbits=9,ui={bits:O.lenbits},wi=Ta(1,O.lens,0,O.nlen,O.lencode,0,O.work,ui),O.lenbits=ui.bits,wi){D.msg="invalid literal/lengths set",O.mode=Bo;break}if(O.distbits=6,O.distcode=O.distdyn,ui={bits:O.distbits},wi=Ta(2,O.lens,O.nlen,O.ndist,O.distcode,0,O.work,ui),O.distbits=ui.bits,wi){D.msg="invalid distances set",O.mode=Bo;break}if(O.mode=Y3,X===kr)break e;case Y3:O.mode=X3;case X3:if(Oe>=6&&wt>=258){D.next_out=tt,D.avail_out=wt,D.next_in=Ae,D.avail_in=Oe,O.hold=Ve,O.bits=et,qt(D,Ht),tt=D.next_out,ye=D.output,wt=D.avail_out,Ae=D.next_in,ke=D.input,Oe=D.avail_in,Ve=O.hold,et=O.bits,O.mode===il&&(O.back=-1);break}for(O.back=0;oi=O.lencode[Ve&(1<<O.lenbits)-1],Qt=oi>>>24,Li=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(Li&&(240&Li)==0){for(kt=Qt,ei=Li,Di=ti;oi=O.lencode[Di+((Ve&(1<<kt+ei)-1)>>kt)],Qt=oi>>>24,Li=oi>>>16&255,ti=65535&oi,!(kt+Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=kt,et-=kt,O.back+=kt}if(Ve>>>=Qt,et-=Qt,O.back+=Qt,O.length=ti,Li===0){O.mode=16205;break}if(32&Li){O.back=-1,O.mode=il;break}if(64&Li){D.msg="invalid literal/length code",O.mode=Bo;break}O.extra=15&Li,O.mode=16201;case 16201:if(O.extra){for(Xr=O.extra;et<Xr;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.length+=Ve&(1<<O.extra)-1,Ve>>>=O.extra,et-=O.extra,O.back+=O.extra}O.was=O.length,O.mode=16202;case 16202:for(;oi=O.distcode[Ve&(1<<O.distbits)-1],Qt=oi>>>24,Li=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if((240&Li)==0){for(kt=Qt,ei=Li,Di=ti;oi=O.distcode[Di+((Ve&(1<<kt+ei)-1)>>kt)],Qt=oi>>>24,Li=oi>>>16&255,ti=65535&oi,!(kt+Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=kt,et-=kt,O.back+=kt}if(Ve>>>=Qt,et-=Qt,O.back+=Qt,64&Li){D.msg="invalid distance code",O.mode=Bo;break}O.offset=ti,O.extra=15&Li,O.mode=16203;case 16203:if(O.extra){for(Xr=O.extra;et<Xr;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.offset+=Ve&(1<<O.extra)-1,Ve>>>=O.extra,et-=O.extra,O.back+=O.extra}if(O.offset>O.dmax){D.msg="invalid distance too far back",O.mode=Bo;break}O.mode=16204;case 16204:if(wt===0)break e;if(Ct=Ht-wt,O.offset>Ct){if(Ct=O.offset-Ct,Ct>O.whave&&O.sane){D.msg="invalid distance too far back",O.mode=Bo;break}Ct>O.wnext?(Ct-=O.wnext,Ho=O.wsize-Ct):Ho=O.wnext-Ct,Ct>O.length&&(Ct=O.length),Bi=O.window}else Bi=ye,Ho=tt-O.offset,Ct=O.length;Ct>wt&&(Ct=wt),wt-=Ct,O.length-=Ct;do ye[tt++]=Bi[Ho++];while(--Ct);O.length===0&&(O.mode=X3);break;case 16205:if(wt===0)break e;ye[tt++]=O.length,wt--,O.mode=X3;break;case J9:if(O.wrap){for(;et<32;){if(Oe===0)break e;Oe--,Ve|=ke[Ae++]<<et,et+=8}if(Ht-=wt,D.total_out+=Ht,O.total+=Ht,4&O.wrap&&Ht&&(D.adler=O.check=O.flags?Fe(O.check,ye,Ht,tt-Ht):Ce(O.check,ye,Ht,tt-Ht)),Ht=wt,4&O.wrap&&(O.flags?Ve:AL(Ve))!==O.check){D.msg="incorrect data check",O.mode=Bo;break}Ve=0,et=0}O.mode=16207;case 16207:if(O.wrap&&O.flags){for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(4&O.wrap&&Ve!==(4294967295&O.total)){D.msg="incorrect length check",O.mode=Bo;break}Ve=0,et=0}O.mode=16208;case 16208:wi=Vn;break e;case Bo:wi=hL;break e;case 16210:return pL;default:return $o}return D.next_out=tt,D.avail_out=wt,D.next_in=Ae,D.avail_in=Oe,O.hold=Ve,O.bits=et,(O.wsize||Ht!==D.avail_out&&O.mode<Bo&&(O.mode<J9||X!==po))&&wL(D,D.output,D.next_out,Ht-D.avail_out),ii-=D.avail_in,Ht-=D.avail_out,D.total_in+=ii,D.total_out+=Ht,O.total+=Ht,4&O.wrap&&Ht&&(D.adler=O.check=O.flags?Fe(O.check,ye,Ht,D.next_out-Ht):Ce(O.check,ye,Ht,D.next_out-Ht)),D.data_type=O.bits+(O.last?64:0)+(O.mode===il?128:0)+(O.mode===Y3||O.mode===K9?256:0),(ii===0&&Ht===0||X===po)&&wi===bo&&(wi=Dpe),wi},inflateEnd:D=>{if(Od(D))return $o;let X=D.state;return X.window&&(X.window=null),D.state=null,bo},inflateGetHeader:(D,X)=>{if(Od(D))return $o;const O=D.state;return(2&O.wrap)==0?$o:(O.head=X,X.done=!1,bo)},inflateSetDictionary:(D,X)=>{const O=X.length;let ke,ye,Ae;return Od(D)?$o:(ke=D.state,ke.wrap!==0&&ke.mode!==W3?$o:ke.mode===W3&&(ye=1,ye=Ce(ye,X,O,0),ye!==ke.check)?hL:(Ae=wL(D,X,O,O),Ae?(ke.mode=16210,pL):(ke.havedict=1,bo)))},inflateInfo:"pako inflate (from Nodeca project)"},Ope=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const CL=Object.prototype.toString,{Z_NO_FLUSH:Upe,Z_FINISH:Npe,Z_OK:p2,Z_STREAM_END:Y9,Z_NEED_DICT:X9,Z_STREAM_ERROR:jpe,Z_DATA_ERROR:xL,Z_MEM_ERROR:Vpe}=ge;function f2(D){this.options=G3({chunkSize:65536,windowBits:15,to:""},D||{});const X=this.options;X.raw&&X.windowBits>=0&&X.windowBits<16&&(X.windowBits=-X.windowBits,X.windowBits===0&&(X.windowBits=-15)),!(X.windowBits>=0&&X.windowBits<16)||D&&D.windowBits||(X.windowBits+=32),X.windowBits>15&&X.windowBits<48&&(15&X.windowBits)==0&&(X.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new nt,this.strm.avail_out=0;let O=ol.inflateInit2(this.strm,X.windowBits);if(O!==p2)throw new Error(ve[O]);if(this.header=new Ope,ol.inflateGetHeader(this.strm,this.header),X.dictionary&&(typeof X.dictionary=="string"?X.dictionary=u2(X.dictionary):CL.call(X.dictionary)==="[object ArrayBuffer]"&&(X.dictionary=new Uint8Array(X.dictionary)),X.raw&&(O=ol.inflateSetDictionary(this.strm,X.dictionary),O!==p2)))throw new Error(ve[O])}function $9(D,X){const O=new f2(X);if(O.push(D),O.err)throw O.msg||ve[O.err];return O.result}f2.prototype.push=function(D,X){const O=this.strm,ke=this.options.chunkSize,ye=this.options.dictionary;let Ae,tt,Oe;if(this.ended)return!1;for(tt=X===~~X?X:X===!0?Npe:Upe,CL.call(D)==="[object ArrayBuffer]"?O.input=new Uint8Array(D):O.input=D,O.next_in=0,O.avail_in=O.input.length;;){for(O.avail_out===0&&(O.output=new Uint8Array(ke),O.next_out=0,O.avail_out=ke),Ae=ol.inflate(O,tt),Ae===X9&&ye&&(Ae=ol.inflateSetDictionary(O,ye),Ae===p2?Ae=ol.inflate(O,tt):Ae===xL&&(Ae=X9));O.avail_in>0&&Ae===Y9&&O.state.wrap>0&&D[O.next_in]!==0;)ol.inflateReset(O),Ae=ol.inflate(O,tt);switch(Ae){case jpe:case xL:case X9:case Vpe:return this.onEnd(Ae),this.ended=!0,!1}if(Oe=O.avail_out,O.next_out&&(O.avail_out===0||Ae===Y9))if(this.options.to==="string"){let wt=Ke(O.output,O.next_out),Ve=O.next_out-wt,et=se(O.output,wt);O.next_out=Ve,O.avail_out=ke-Ve,Ve&&O.output.set(O.output.subarray(wt,wt+Ve),0),this.onData(et)}else this.onData(O.output.length===O.next_out?O.output:O.output.subarray(0,O.next_out));if(Ae!==p2||Oe!==0){if(Ae===Y9)return Ae=ol.inflateEnd(this.strm),this.onEnd(Ae),this.ended=!0,!0;if(O.avail_in===0)break}}return!0},f2.prototype.onData=function(D){this.chunks.push(D)},f2.prototype.onEnd=function(D){D===p2&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=K3(this.chunks)),this.chunks=[],this.err=D,this.msg=this.strm.msg};var Hpe={Inflate:f2,inflate:$9,inflateRaw:function(D,X){return(X=X||{}).raw=!0,$9(D,X)},ungzip:$9};const{Deflate:zpe,deflate:qpe,deflateRaw:Qpe,gzip:Gpe}=yo,{Inflate:Kpe,inflate:Jpe,inflateRaw:Zpe,ungzip:Wpe}=Hpe;var kL=zpe,ML=qpe,BL=Qpe,EL=Gpe,PL=Kpe,IL=Jpe,SL=Zpe,TL=Wpe,RL=ge,Ype={Deflate:kL,deflate:ML,deflateRaw:BL,gzip:EL,Inflate:PL,inflate:IL,inflateRaw:SL,ungzip:TL,constants:RL};t.Deflate=kL,t.Inflate=PL,t.constants=RL,t.default=Ype,t.deflate=ML,t.deflateRaw=BL,t.gzip=EL,t.inflate=IL,t.inflateRaw=SL,t.ungzip=TL,Object.defineProperty(t,"__esModule",{value:!0})}))})(r7,r7.exports)),r7.exports}var cW=ASt();const gSt=J2(cW),$a=Xpe({__proto__:null,default:gSt},[cW]);let An=window.pako||$a;An.inflate||(An=An.default);const mSt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function vSt(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],meshPositions:i[4],meshIndices:i[5],meshEdgesIndices:i[6],meshColors:i[7],entityIDs:i[8],entityMeshes:i[9],entityIsObjects:i[10],positionsDecodeMatrix:i[11]}}function ySt(i){return{positions:new Uint16Array(An.inflate(i.positions).buffer),normals:new Int8Array(An.inflate(i.normals).buffer),indices:new Uint32Array(An.inflate(i.indices).buffer),edgeIndices:new Uint32Array(An.inflate(i.edgeIndices).buffer),meshPositions:new Uint32Array(An.inflate(i.meshPositions).buffer),meshIndices:new Uint32Array(An.inflate(i.meshIndices).buffer),meshEdgesIndices:new Uint32Array(An.inflate(i.meshEdgesIndices).buffer),meshColors:new Uint8Array(An.inflate(i.meshColors).buffer),entityIDs:An.inflate(i.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(An.inflate(i.entityMeshes).buffer),entityIsObjects:new Uint8Array(An.inflate(i.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(An.inflate(i.positionsDecodeMatrix).buffer)}}function bSt(i,e,t,o,n,r){r.getNextId(),o.positionsCompression="precompressed",o.normalsCompression="precompressed";const a=t.positions,s=t.normals,l=t.indices,c=t.edgeIndices,d=t.meshPositions,u=t.meshIndices,h=t.meshEdgesIndices,p=t.meshColors,A=JSON.parse(t.entityIDs),f=t.entityMeshes,m=t.entityIsObjects,g=d.length,y=f.length;for(let v=0;v<y;v++){const w=A[v],x=e.globalizeObjectIds?C.globalizeObjectId(o.id,w):w,k=i.metaScene.metaObjects[x],B={},E={};if(k){if(e.excludeTypesMap&&k.type&&e.excludeTypesMap[k.type]||e.includeTypesMap&&k.type&&!e.includeTypesMap[k.type])continue;const T=e.objectDefaults?e.objectDefaults[k.type]||e.objectDefaults.DEFAULT:null;T&&(T.visible===!1&&(B.visible=!1),T.pickable===!1&&(B.pickable=!1),T.colorize&&(E.color=T.colorize),T.opacity!==void 0&&T.opacity!==null&&(E.opacity=T.opacity))}else if(e.excludeUnclassifiedObjects)continue;const P=v===y-1,R=[];for(let T=f[v],L=P?f.length:f[v+1];T<L;T++){const F=T===g-1,U=x+".mesh."+T,q=mSt(p.subarray(T*4,T*4+3)),V=p[T*4+3]/255;o.createMesh(mt.apply(E,{id:U,primitive:"triangles",positionsCompressed:a.subarray(d[T],F?a.length:d[T+1]),normalsCompressed:s.subarray(d[T],F?a.length:d[T+1]),indices:l.subarray(u[T],F?l.length:u[T+1]),edgeIndices:c.subarray(h[T],F?c.length:h[T+1]),positionsDecodeMatrix:t.positionsDecodeMatrix,color:q,opacity:V})),R.push(U)}o.createEntity(mt.apply(B,{id:x,isObject:m[v]===1,meshIds:R}))}}const dW={version:1,parse:function(i,e,t,o,n,r){const a=vSt(t),s=ySt(a);bSt(i,e,s,o,n,r)}};let mr=window.pako||$a;mr.inflate||(mr=mr.default);function wSt(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],meshPositions:i[4],meshIndices:i[5],meshEdgesIndices:i[6],meshColors:i[7],entityIDs:i[8],entityMeshes:i[9],entityIsObjects:i[10],positionsDecodeMatrix:i[11],entityMeshIds:i[12],entityMatrices:i[13],entityUsesInstancing:i[14]}}function CSt(i){return{positions:new Uint16Array(mr.inflate(i.positions).buffer),normals:new Int8Array(mr.inflate(i.normals).buffer),indices:new Uint32Array(mr.inflate(i.indices).buffer),edgeIndices:new Uint32Array(mr.inflate(i.edgeIndices).buffer),meshPositions:new Uint32Array(mr.inflate(i.meshPositions).buffer),meshIndices:new Uint32Array(mr.inflate(i.meshIndices).buffer),meshEdgesIndices:new Uint32Array(mr.inflate(i.meshEdgesIndices).buffer),meshColors:new Uint8Array(mr.inflate(i.meshColors).buffer),entityIDs:mr.inflate(i.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(mr.inflate(i.entityMeshes).buffer),entityIsObjects:new Uint8Array(mr.inflate(i.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(mr.inflate(i.positionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(mr.inflate(i.entityMeshIds).buffer),entityMatrices:new Float32Array(mr.inflate(i.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(mr.inflate(i.entityUsesInstancing).buffer)}}const xSt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function kSt(i,e,t,o,n,r){const a=r.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=t.positions,l=t.normals,c=t.indices,d=t.edgeIndices,u=t.meshPositions,h=t.meshIndices,p=t.meshEdgesIndices,A=t.meshColors,f=JSON.parse(t.entityIDs),m=t.entityMeshes,g=t.entityIsObjects,y=t.entityMeshIds,v=t.entityMatrices,w=t.entityUsesInstancing,x=u.length,k=m.length,B={};for(let E=0;E<k;E++){const P=f[E],R=e.globalizeObjectIds?C.globalizeObjectId(o.id,P):P,T=i.metaScene.metaObjects[R],L={},F={},U=v.subarray(E*16,E*16+16);if(T){if(e.excludeTypesMap&&T.type&&e.excludeTypesMap[T.type]||e.includeTypesMap&&T.type&&!e.includeTypesMap[T.type])continue;const W=e.objectDefaults?e.objectDefaults[T.type]||e.objectDefaults.DEFAULT:null;W&&(W.visible===!1&&(L.visible=!1),W.pickable===!1&&(L.pickable=!1),W.colorize&&(F.color=W.colorize),W.opacity!==void 0&&W.opacity!==null&&(F.opacity=W.opacity))}else if(e.excludeUnclassifiedObjects)continue;const q=E===k-1,V=[];for(let W=m[E],Y=q?y.length:m[E+1];W<Y;W++){const $=y[W],me=$===x-1,Ie=r.getNextId(),Se=xSt(A.subarray($*4,$*4+3)),qe=A[$*4+3]/255,Qe=s.subarray(u[$],me?s.length:u[$+1]),Ce=l.subarray(u[$],me?s.length:u[$+1]),De=c.subarray(h[$],me?c.length:h[$+1]),Fe=d.subarray(p[$],me?d.length:p[$+1]);if(w[E]===1){const ve=`${a}.geometry.${Ie}.${$}`;ve in B||(o.createGeometry({id:ve,positionsCompressed:Qe,normalsCompressed:Ce,indices:De,edgeIndices:Fe,primitive:"triangles",positionsDecodeMatrix:t.positionsDecodeMatrix}),B[ve]=!0),o.createMesh(mt.apply(F,{id:Ie,color:Se,opacity:qe,matrix:U,geometryId:ve})),V.push(Ie)}else o.createMesh(mt.apply(F,{id:Ie,primitive:"triangles",positionsCompressed:Qe,normalsCompressed:Ce,indices:De,edgeIndices:Fe,positionsDecodeMatrix:t.positionsDecodeMatrix,color:Se,opacity:qe})),V.push(Ie)}V.length&&o.createEntity(mt.apply(L,{id:R,isObject:g[E]===1,meshIds:V}))}}const uW={version:2,parse:function(i,e,t,o,n,r){const a=wSt(t),s=CSt(a);kSt(i,e,s,o,n,r)}};let cr=window.pako||$a;cr.inflate||(cr=cr.default);function MSt(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],meshPositions:i[4],meshIndices:i[5],meshEdgesIndices:i[6],meshColors:i[7],entityIDs:i[8],entityMeshes:i[9],entityIsObjects:i[10],instancedPositionsDecodeMatrix:i[11],batchedPositionsDecodeMatrix:i[12],entityMeshIds:i[13],entityMatrices:i[14],entityUsesInstancing:i[15]}}function BSt(i){return{positions:new Uint16Array(cr.inflate(i.positions).buffer),normals:new Int8Array(cr.inflate(i.normals).buffer),indices:new Uint32Array(cr.inflate(i.indices).buffer),edgeIndices:new Uint32Array(cr.inflate(i.edgeIndices).buffer),meshPositions:new Uint32Array(cr.inflate(i.meshPositions).buffer),meshIndices:new Uint32Array(cr.inflate(i.meshIndices).buffer),meshEdgesIndices:new Uint32Array(cr.inflate(i.meshEdgesIndices).buffer),meshColors:new Uint8Array(cr.inflate(i.meshColors).buffer),entityIDs:cr.inflate(i.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(cr.inflate(i.entityMeshes).buffer),entityIsObjects:new Uint8Array(cr.inflate(i.entityIsObjects).buffer),instancedPositionsDecodeMatrix:new Float32Array(cr.inflate(i.instancedPositionsDecodeMatrix).buffer),batchedPositionsDecodeMatrix:new Float32Array(cr.inflate(i.batchedPositionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(cr.inflate(i.entityMeshIds).buffer),entityMatrices:new Float32Array(cr.inflate(i.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(cr.inflate(i.entityUsesInstancing).buffer)}}const ESt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function PSt(i,e,t,o,n,r){const a=r.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=t.positions,l=t.normals,c=t.indices,d=t.edgeIndices,u=t.meshPositions,h=t.meshIndices,p=t.meshEdgesIndices,A=t.meshColors,f=JSON.parse(t.entityIDs),m=t.entityMeshes,g=t.entityIsObjects,y=t.entityMeshIds,v=t.entityMatrices,w=t.entityUsesInstancing,x=u.length,k=m.length,B={};for(let F=0;F<k;F++){const U=f[F],q=e.globalizeObjectIds?C.globalizeObjectId(o.id,U):U,V=i.metaScene.metaObjects[q],W={},Y={},$=v.subarray(F*16,F*16+16);if(V){if(e.excludeTypesMap&&V.type&&e.excludeTypesMap[V.type]||e.includeTypesMap&&V.type&&!e.includeTypesMap[V.type])continue;const Se=e.objectDefaults?e.objectDefaults[V.type]||e.objectDefaults.DEFAULT:null;Se&&(Se.visible===!1&&(W.visible=!1),Se.pickable===!1&&(W.pickable=!1),Se.colorize&&(Y.color=Se.colorize),Se.opacity!==void 0&&Se.opacity!==null&&(Y.opacity=Se.opacity))}else if(e.excludeUnclassifiedObjects)continue;const me=F===k-1,Ie=[];for(let Se=m[F],qe=me?y.length:m[F+1];Se<qe;Se++){var E=y[Se];const Qe=E===x-1,Ce=`${a}.${q}.mesh.${E}`,De=ESt(A.subarray(E*4,E*4+3)),Fe=A[E*4+3]/255;var P=s.subarray(u[E],Qe?s.length:u[E+1]),R=l.subarray(u[E],Qe?s.length:u[E+1]),T=c.subarray(h[E],Qe?c.length:h[E+1]),L=d.subarray(p[E],Qe?d.length:p[E+1]);if(w[F]===1){const ve=`${a}.geometry.${Ce}.${E}`;ve in B||(o.createGeometry({id:ve,positionsCompressed:P,normalsCompressed:R,indices:T,edgeIndices:L,primitive:"triangles",positionsDecodeMatrix:t.instancedPositionsDecodeMatrix}),B[ve]=!0),o.createMesh(mt.apply(Y,{id:Ce,color:De,opacity:Fe,matrix:$,geometryId:ve})),Ie.push(Ce)}else o.createMesh(mt.apply(Y,{id:Ce,primitive:"triangles",positionsCompressed:P,normalsCompressed:R,indices:T,edgeIndices:L,positionsDecodeMatrix:t.batchedPositionsDecodeMatrix,color:De,opacity:Fe})),Ie.push(Ce)}Ie.length&&o.createEntity(mt.apply(W,{id:q,isObject:g[F]===1,meshIds:Ie}))}}const hW={version:3,parse:function(i,e,t,o,n,r){const a=MSt(t),s=BSt(a);PSt(i,e,s,o,n,r)}};let vr=window.pako||$a;vr.inflate||(vr=vr.default);function ISt(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],decodeMatrices:i[4],matrices:i[5],eachPrimitivePositionsAndNormalsPortion:i[6],eachPrimitiveIndicesPortion:i[7],eachPrimitiveEdgeIndicesPortion:i[8],eachPrimitiveDecodeMatricesPortion:i[9],eachPrimitiveColor:i[10],primitiveInstances:i[11],eachEntityId:i[12],eachEntityPrimitiveInstancesPortion:i[13],eachEntityMatricesPortion:i[14],eachEntityMatrix:i[15]}}function SSt(i){return{positions:new Uint16Array(vr.inflate(i.positions).buffer),normals:new Int8Array(vr.inflate(i.normals).buffer),indices:new Uint32Array(vr.inflate(i.indices).buffer),edgeIndices:new Uint32Array(vr.inflate(i.edgeIndices).buffer),decodeMatrices:new Float32Array(vr.inflate(i.decodeMatrices).buffer),matrices:new Float32Array(vr.inflate(i.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(vr.inflate(i.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(vr.inflate(i.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(vr.inflate(i.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveDecodeMatricesPortion:new Uint32Array(vr.inflate(i.eachPrimitiveDecodeMatricesPortion).buffer),eachPrimitiveColor:new Uint8Array(vr.inflate(i.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(vr.inflate(i.primitiveInstances).buffer),eachEntityId:vr.inflate(i.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(vr.inflate(i.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(vr.inflate(i.eachEntityMatricesPortion).buffer)}}const TSt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function RSt(i,e,t,o,n,r){const a=r.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=t.positions,l=t.normals,c=t.indices,d=t.edgeIndices,u=t.decodeMatrices,h=t.matrices,p=t.eachPrimitivePositionsAndNormalsPortion,A=t.eachPrimitiveIndicesPortion,f=t.eachPrimitiveEdgeIndicesPortion,m=t.eachPrimitiveDecodeMatricesPortion,g=t.eachPrimitiveColor,y=t.primitiveInstances,v=JSON.parse(t.eachEntityId),w=t.eachEntityPrimitiveInstancesPortion,x=t.eachEntityMatricesPortion,k=p.length,B=y.length,E=new Uint8Array(k),P=new Uint32Array(k),R=v.length;for(let F=0;F<k;F++)P[F]=F;P.sort((F,U)=>m[F]<m[U]?-1:m[F]>m[U]?1:0);for(let F=0;F<B;F++){const U=y[F];E[U]++}const T={};for(let F=0;F<R;F++){const U=R-1,q=F===U,V=w[F],W=q?w[U]:w[F+1];for(let Y=V;Y<W;Y++){const $=y[Y];E[$]>1||(T[$]=F)}}for(let F=0;F<k;F++){const U=P[F],q=U===k-1,V=E[U]>1,W=TSt(g.subarray(U*4,U*4+3)),Y=g[U*4+3]/255,$=s.subarray(p[U],q?s.length:p[U+1]),me=l.subarray(p[U],q?l.length:p[U+1]),Ie=c.subarray(A[U],q?c.length:A[U+1]),Se=d.subarray(f[U],q?d.length:f[U+1]),qe=u.subarray(m[U],m[U]+16);if(V){const Qe=`${a}-geometry.${U}`;o.createGeometry({id:Qe,primitive:"triangles",positionsCompressed:$,normalsCompressed:me,indices:Ie,edgeIndices:Se,positionsDecodeMatrix:qe})}else{const Qe=`${a}-${U}`,Ce=T[U];v[Ce];const De={};o.createMesh(mt.apply(De,{id:Qe,primitive:"triangles",positionsCompressed:$,normalsCompressed:me,indices:Ie,edgeIndices:Se,positionsDecodeMatrix:qe,color:W,opacity:Y}))}}let L=0;for(let F=0;F<R;F++){const U=R-1,q=F===U,V=v[F],W=w[F],Y=q?w[U]:w[F+1],$=[];for(let me=W;me<Y;me++){const Ie=y[me];if(E[Ie]>1){const Se={},qe=`${a}-instance.${L++}`,Qe=`${a}-geometry.${Ie}`,Ce=x[F]*16,De=h.subarray(Ce,Ce+16);o.createMesh(mt.apply(Se,{id:qe,geometryId:Qe,matrix:De})),$.push(qe)}else $.push(Ie)}if($.length>0){const me={};o.createEntity(mt.apply(me,{id:V,isObject:!0,meshIds:$}))}}}const pW={version:4,parse:function(i,e,t,o,n,r){const a=ISt(t),s=SSt(a);RSt(i,e,s,o,n,r)}};let Jr=window.pako||$a;Jr.inflate||(Jr=Jr.default);function LSt(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],matrices:i[4],eachPrimitivePositionsAndNormalsPortion:i[5],eachPrimitiveIndicesPortion:i[6],eachPrimitiveEdgeIndicesPortion:i[7],eachPrimitiveColor:i[8],primitiveInstances:i[9],eachEntityId:i[10],eachEntityPrimitiveInstancesPortion:i[11],eachEntityMatricesPortion:i[12]}}function DSt(i){return{positions:new Float32Array(Jr.inflate(i.positions).buffer),normals:new Int8Array(Jr.inflate(i.normals).buffer),indices:new Uint32Array(Jr.inflate(i.indices).buffer),edgeIndices:new Uint32Array(Jr.inflate(i.edgeIndices).buffer),matrices:new Float32Array(Jr.inflate(i.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(Jr.inflate(i.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(Jr.inflate(i.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(Jr.inflate(i.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveColor:new Uint8Array(Jr.inflate(i.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(Jr.inflate(i.primitiveInstances).buffer),eachEntityId:Jr.inflate(i.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(Jr.inflate(i.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(Jr.inflate(i.eachEntityMatricesPortion).buffer)}}const _St=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function FSt(i,e,t,o,n,r){const a=r.getNextId();o.positionsCompression="disabled",o.normalsCompression="precompressed";const s=t.positions,l=t.normals,c=t.indices,d=t.edgeIndices,u=t.matrices,h=t.eachPrimitivePositionsAndNormalsPortion,p=t.eachPrimitiveIndicesPortion,A=t.eachPrimitiveEdgeIndicesPortion,f=t.eachPrimitiveColor,m=t.primitiveInstances,g=JSON.parse(t.eachEntityId),y=t.eachEntityPrimitiveInstancesPortion,v=t.eachEntityMatricesPortion,w=h.length,x=m.length,k=new Uint8Array(w),B=g.length;for(let R=0;R<x;R++){const T=m[R];k[T]++}const E={};for(let R=0;R<B;R++){const T=B-1,L=R===T,F=y[R],U=L?y[T]:y[R+1];for(let q=F;q<U;q++){const V=m[q];k[V]>1||(E[V]=R)}}for(let R=0;R<w;R++){const T=R===w-1,L=k[R]>1,F=_St(f.subarray(R*4,R*4+3)),U=f[R*4+3]/255,q=s.subarray(h[R],T?s.length:h[R+1]),V=l.subarray(h[R],T?l.length:h[R+1]),W=c.subarray(p[R],T?c.length:p[R+1]),Y=d.subarray(A[R],T?d.length:A[R+1]);if(L){const $=`${a}-geometry.${R}`;o.createGeometry({id:$,primitive:"triangles",positionsCompressed:q,normalsCompressed:V,indices:W,edgeIndices:Y})}else{const $=R,me=E[R];g[me];const Ie={};o.createMesh(mt.apply(Ie,{id:$,primitive:"triangles",positionsCompressed:q,normalsCompressed:V,indices:W,edgeIndices:Y,color:F,opacity:U}))}}let P=0;for(let R=0;R<B;R++){const T=B-1,L=R===T,F=g[R],U=y[R],q=L?y[T]:y[R+1],V=[];for(let W=U;W<q;W++){const Y=m[W];if(k[Y]>1){const $={},me="instance."+P++,Ie="geometry"+Y,Se=v[R]*16,qe=u.subarray(Se,Se+16);o.createMesh(mt.apply($,{id:me,geometryId:Ie,matrix:qe})),V.push(me)}else V.push(Y)}if(V.length>0){const W={};o.createEntity(mt.apply(W,{id:F,isObject:!0,meshIds:V}))}}}const fW={version:5,parse:function(i,e,t,o,n,r){const a=LSt(t),s=DSt(a);FSt(i,e,s,o,n,r)}};let Ov=window.pako||$a;Ov.inflate||(Ov=Ov.default);function OSt(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],matrices:i[4],reusedPrimitivesDecodeMatrix:i[5],eachPrimitivePositionsAndNormalsPortion:i[6],eachPrimitiveIndicesPortion:i[7],eachPrimitiveEdgeIndicesPortion:i[8],eachPrimitiveColorAndOpacity:i[9],primitiveInstances:i[10],eachEntityId:i[11],eachEntityPrimitiveInstancesPortion:i[12],eachEntityMatricesPortion:i[13],eachTileAABB:i[14],eachTileEntitiesPortion:i[15]}}function USt(i){function e(t,o){return t.length===0?[]:Ov.inflate(t,o).buffer}return{positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedPrimitivesDecodeMatrix:new Float32Array(e(i.reusedPrimitivesDecodeMatrix)),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(e(i.eachPrimitivePositionsAndNormalsPortion)),eachPrimitiveIndicesPortion:new Uint32Array(e(i.eachPrimitiveIndicesPortion)),eachPrimitiveEdgeIndicesPortion:new Uint32Array(e(i.eachPrimitiveEdgeIndicesPortion)),eachPrimitiveColorAndOpacity:new Uint8Array(e(i.eachPrimitiveColorAndOpacity)),primitiveInstances:new Uint32Array(e(i.primitiveInstances)),eachEntityId:Ov.inflate(i.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(e(i.eachEntityPrimitiveInstancesPortion)),eachEntityMatricesPortion:new Uint32Array(e(i.eachEntityMatricesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const NSt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function jSt(i,e,t,o,n,r){const a=r.getNextId(),s=t.positions,l=t.normals,c=t.indices,d=t.edgeIndices,u=t.matrices,h=t.reusedPrimitivesDecodeMatrix,p=t.eachPrimitivePositionsAndNormalsPortion,A=t.eachPrimitiveIndicesPortion,f=t.eachPrimitiveEdgeIndicesPortion,m=t.eachPrimitiveColorAndOpacity,g=t.primitiveInstances,y=JSON.parse(t.eachEntityId),v=t.eachEntityPrimitiveInstancesPortion,w=t.eachEntityMatricesPortion,x=t.eachTileAABB,k=t.eachTileEntitiesPortion,B=p.length,E=g.length,P=y.length,R=k.length,T=new Uint32Array(B);for(let U=0;U<E;U++){const q=g[U];T[q]!==void 0?T[q]++:T[q]=1}const L=C.vec3(),F=C.AABB3();for(let U=0;U<R;U++){const q=R-1,V=U===q,W=k[U],Y=V?P:k[U+1],$=U*6,me=x.subarray($,$+6);C.getAABB3Center(me,L),F[0]=me[0]-L[0],F[1]=me[1]-L[1],F[2]=me[2]-L[2],F[3]=me[3]-L[0],F[4]=me[4]-L[1],F[5]=me[5]-L[2];const Ie=Jt.createPositionsDecodeMatrix(F),Se={};for(let qe=W;qe<Y;qe++){const Qe=y[qe],Ce=e.globalizeObjectIds?C.globalizeObjectId(o.id,Qe):Qe,De=w[qe],Fe=u.slice(De,De+16),ve=P-1,ge=qe===ve,we=v[qe],Le=ge?g.length:v[qe+1],We=[],H=i.metaScene.metaObjects[Ce],ee={},ae={};if(H){if(e.excludeTypesMap&&H.type&&e.excludeTypesMap[H.type]||e.includeTypesMap&&H.type&&!e.includeTypesMap[H.type]||e.includeIdsMap&&H.id&&!e.includeIdsMap[H.id])continue;const Be=e.objectDefaults?e.objectDefaults[H.type]||e.objectDefaults.DEFAULT:null;Be&&(Be.visible===!1&&(ee.visible=!1),Be.pickable===!1&&(ee.pickable=!1),Be.colorize&&(ae.color=Be.colorize),Be.opacity!==void 0&&Be.opacity!==null&&(ae.opacity=Be.opacity))}else if(e.excludeUnclassifiedObjects)continue;for(let Be=we;Be<Le;Be++){const pe=g[Be],Q=T[pe]>1,Z=pe===B-1,ie=s.subarray(p[pe],Z?s.length:p[pe+1]),re=l.subarray(p[pe],Z?l.length:p[pe+1]),ne=c.subarray(A[pe],Z?c.length:A[pe+1]),G=d.subarray(f[pe],Z?d.length:f[pe+1]),K=NSt(m.subarray(pe*4,pe*4+3)),ue=m[pe*4+3]/255,xe=r.getNextId();if(Q){const oe=`${a}-geometry.${U}.${pe}`;Se[oe]||(o.createGeometry({id:oe,primitive:"triangles",positionsCompressed:ie,indices:ne,edgeIndices:G,positionsDecodeMatrix:h}),Se[oe]=!0),o.createMesh(mt.apply(ae,{id:xe,geometryId:oe,origin:L,matrix:Fe,color:K,opacity:ue})),We.push(xe)}else o.createMesh(mt.apply(ae,{id:xe,origin:L,primitive:"triangles",positionsCompressed:ie,normalsCompressed:re,indices:ne,edgeIndices:G,positionsDecodeMatrix:Ie,color:K,opacity:ue})),We.push(xe)}We.length>0&&o.createEntity(mt.apply(ee,{id:Ce,isObject:!0,meshIds:We}))}}}const AW={version:6,parse:function(i,e,t,o,n,r){const a=OSt(t),s=USt(a);jSt(i,e,s,o,n,r)}};let Uv=window.pako||$a;Uv.inflate||(Uv=Uv.default);function VSt(i){return{positions:i[0],normals:i[1],colors:i[2],indices:i[3],edgeIndices:i[4],matrices:i[5],reusedGeometriesDecodeMatrix:i[6],eachGeometryPrimitiveType:i[7],eachGeometryPositionsPortion:i[8],eachGeometryNormalsPortion:i[9],eachGeometryColorsPortion:i[10],eachGeometryIndicesPortion:i[11],eachGeometryEdgeIndicesPortion:i[12],eachMeshGeometriesPortion:i[13],eachMeshMatricesPortion:i[14],eachMeshMaterial:i[15],eachEntityId:i[16],eachEntityMeshesPortion:i[17],eachTileAABB:i[18],eachTileEntitiesPortion:i[19]}}function HSt(i){function e(t,o){return t.length===0?[]:Uv.inflate(t,o).buffer}return{positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(i.eachMeshMaterial)),eachEntityId:Uv.inflate(i.eachEntityId,{to:"string"}),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const zSt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function gW(i){const e=[];for(let t=0,o=i.length;t<o;t+=3)e.push(i[t]),e.push(i[t+1]),e.push(i[t+2]),e.push(1);return e}function qSt(i,e,t,o,n,r){const a=r.getNextId(),s=t.positions,l=t.normals,c=t.colors,d=t.indices,u=t.edgeIndices,h=t.matrices,p=t.reusedGeometriesDecodeMatrix,A=t.eachGeometryPrimitiveType,f=t.eachGeometryPositionsPortion,m=t.eachGeometryNormalsPortion,g=t.eachGeometryColorsPortion,y=t.eachGeometryIndicesPortion,v=t.eachGeometryEdgeIndicesPortion,w=t.eachMeshGeometriesPortion,x=t.eachMeshMatricesPortion,k=t.eachMeshMaterial,B=JSON.parse(t.eachEntityId),E=t.eachEntityMeshesPortion,P=t.eachTileAABB,R=t.eachTileEntitiesPortion,T=f.length,L=w.length,F=B.length,U=R.length,q=new Uint32Array(T);for(let Y=0;Y<L;Y++){const $=w[Y];q[$]!==void 0?q[$]++:q[$]=1}const V=C.vec3(),W=C.AABB3();for(let Y=0;Y<U;Y++){const $=U-1,me=Y===$,Ie=R[Y],Se=me?F:R[Y+1],qe=Y*6,Qe=P.subarray(qe,qe+6);C.getAABB3Center(Qe,V),W[0]=Qe[0]-V[0],W[1]=Qe[1]-V[1],W[2]=Qe[2]-V[2],W[3]=Qe[3]-V[0],W[4]=Qe[4]-V[1],W[5]=Qe[5]-V[2];const Ce=Jt.createPositionsDecodeMatrix(W),De={};for(let Fe=Ie;Fe<Se;Fe++){const ve=B[Fe],ge=e.globalizeObjectIds?C.globalizeObjectId(o.id,ve):ve,we=F-1,Le=Fe===we,We=E[Fe],H=Le?w.length:E[Fe+1],ee=[],ae=i.metaScene.metaObjects[ge],Be={},pe={};if(ae){if(e.excludeTypesMap&&ae.type&&e.excludeTypesMap[ae.type]||e.includeTypesMap&&ae.type&&!e.includeTypesMap[ae.type]||e.includeIdsMap&&ae.id&&!e.includeIdsMap[ae.id])continue;const Q=e.objectDefaults?e.objectDefaults[ae.type]||e.objectDefaults.DEFAULT:null;Q&&(Q.visible===!1&&(Be.visible=!1),Q.pickable===!1&&(Be.pickable=!1),Q.colorize&&(pe.color=Q.colorize),Q.opacity!==void 0&&Q.opacity!==null&&(pe.opacity=Q.opacity),Q.metallic!==void 0&&Q.metallic!==null&&(pe.metallic=Q.metallic),Q.roughness!==void 0&&Q.roughness!==null&&(pe.roughness=Q.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let Q=We;Q<H;Q++){const Z=w[Q],ie=q[Z]>1,re=Z===T-1,ne=zSt(k.subarray(Q*6,Q*6+3)),G=k[Q*6+3]/255,K=k[Q*6+4]/255,ue=k[Q*6+5]/255,xe=r.getNextId();if(ie){const oe=x[Q],Me=h.slice(oe,oe+16),je=`${a}-geometry.${Y}.${Z}`;if(!De[je]){const he=A[Z];let Ne,Ee,ze,ot,At,ft;switch(he){case 0:Ne="solid",Ee=s.subarray(f[Z],re?s.length:f[Z+1]),ze=l.subarray(m[Z],re?l.length:m[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]),ft=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 1:Ne="surface",Ee=s.subarray(f[Z],re?s.length:f[Z+1]),ze=l.subarray(m[Z],re?l.length:m[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]),ft=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 2:Ne="points",Ee=s.subarray(f[Z],re?s.length:f[Z+1]),ot=gW(c.subarray(g[Z],re?c.length:g[Z+1]));break;case 3:Ne="lines",Ee=s.subarray(f[Z],re?s.length:f[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]);break;default:continue}o.createGeometry({id:je,primitive:Ne,positionsCompressed:Ee,normalsCompressed:ze,colors:ot,indices:At,edgeIndices:ft,positionsDecodeMatrix:p}),De[je]=!0}o.createMesh(mt.apply(pe,{id:xe,geometryId:je,origin:V,matrix:Me,color:ne,metallic:K,roughness:ue,opacity:G})),ee.push(xe)}else{const oe=A[Z];let Me,je,he,Ne,Ee,ze;switch(oe){case 0:Me="solid",je=s.subarray(f[Z],re?s.length:f[Z+1]),he=l.subarray(m[Z],re?l.length:m[Z+1]),Ee=d.subarray(y[Z],re?d.length:y[Z+1]),ze=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 1:Me="surface",je=s.subarray(f[Z],re?s.length:f[Z+1]),he=l.subarray(m[Z],re?l.length:m[Z+1]),Ee=d.subarray(y[Z],re?d.length:y[Z+1]),ze=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 2:Me="points",je=s.subarray(f[Z],re?s.length:f[Z+1]),Ne=gW(c.subarray(g[Z],re?c.length:g[Z+1]));break;case 3:Me="lines",je=s.subarray(f[Z],re?s.length:f[Z+1]),Ee=d.subarray(y[Z],re?d.length:y[Z+1]);break;default:continue}o.createMesh(mt.apply(pe,{id:xe,origin:V,primitive:Me,positionsCompressed:je,normalsCompressed:he,colors:Ne,indices:Ee,edgeIndices:ze,positionsDecodeMatrix:Ce,color:ne,metallic:K,roughness:ue,opacity:G})),ee.push(xe)}}ee.length>0&&o.createEntity(mt.apply(Be,{id:ge,isObject:!0,meshIds:ee}))}}}const mW={version:7,parse:function(i,e,t,o,n,r){const a=VSt(t),s=HSt(a);qSt(i,e,s,o,n,r)}};let Lu=window.pako||$a;Lu.inflate||(Lu=Lu.default);const Gl=C.vec4(),vW=C.vec4();function QSt(i){return{types:i[0],eachMetaObjectId:i[1],eachMetaObjectType:i[2],eachMetaObjectName:i[3],eachMetaObjectParent:i[4],positions:i[5],normals:i[6],colors:i[7],indices:i[8],edgeIndices:i[9],matrices:i[10],reusedGeometriesDecodeMatrix:i[11],eachGeometryPrimitiveType:i[12],eachGeometryPositionsPortion:i[13],eachGeometryNormalsPortion:i[14],eachGeometryColorsPortion:i[15],eachGeometryIndicesPortion:i[16],eachGeometryEdgeIndicesPortion:i[17],eachMeshGeometriesPortion:i[18],eachMeshMatricesPortion:i[19],eachMeshMaterial:i[20],eachEntityMetaObject:i[21],eachEntityMeshesPortion:i[22],eachTileAABB:i[23],eachTileEntitiesPortion:i[24]}}function GSt(i){function e(t,o){return t.length===0?[]:Lu.inflate(t,o).buffer}return{types:Lu.inflate(i.types,{to:"string"}),eachMetaObjectId:Lu.inflate(i.eachMetaObjectId,{to:"string"}),eachMetaObjectType:new Uint32Array(e(i.eachMetaObjectType)),eachMetaObjectName:Lu.inflate(i.eachMetaObjectName,{to:"string"}),eachMetaObjectParent:new Uint32Array(e(i.eachMetaObjectParent)),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(i.eachMeshMaterial)),eachEntityMetaObject:new Uint32Array(e(i.eachEntityMetaObject)),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const KSt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function yW(i){const e=[];for(let t=0,o=i.length;t<o;t+=3)e.push(i[t]),e.push(i[t+1]),e.push(i[t+2]),e.push(1);return e}function JSt(i,e,t,o,n,r){const a=r.getNextId(),s=JSON.parse(t.types),l=JSON.parse(t.eachMetaObjectId),c=t.eachMetaObjectType,d=JSON.parse(t.eachMetaObjectName),u=t.eachMetaObjectParent,h=t.positions,p=t.normals,A=t.colors,f=t.indices,m=t.edgeIndices,g=t.matrices,y=t.reusedGeometriesDecodeMatrix,v=t.eachGeometryPrimitiveType,w=t.eachGeometryPositionsPortion,x=t.eachGeometryNormalsPortion,k=t.eachGeometryColorsPortion,B=t.eachGeometryIndicesPortion,E=t.eachGeometryEdgeIndicesPortion,P=t.eachMeshGeometriesPortion,R=t.eachMeshMatricesPortion,T=t.eachMeshMaterial,L=t.eachEntityMetaObject,F=t.eachEntityMeshesPortion,U=t.eachTileAABB,q=t.eachTileEntitiesPortion,V=l.length,W=w.length,Y=P.length,$=L.length,me=q.length;if(n){const Ce={metaObjects:[]};for(let De=0;De<V;De++){const Fe=l[De],ve=c[De],ge=s[ve]||"default",we=d[De],Le=u[De],We=Le!==De?l[Le]:null;Ce.metaObjects.push({id:Fe,type:ge,name:we,parent:We})}n.loadData(Ce,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds})}const Ie=new Uint32Array(W);for(let Ce=0;Ce<Y;Ce++){const De=P[Ce];Ie[De]!==void 0?Ie[De]++:Ie[De]=1}const Se=C.vec3(),qe=C.AABB3(),Qe={};for(let Ce=0;Ce<me;Ce++){const De=me-1,Fe=Ce===De,ve=q[Ce],ge=Fe?$:q[Ce+1],we=Ce*6,Le=U.subarray(we,we+6);C.getAABB3Center(Le,Se),qe[0]=Le[0]-Se[0],qe[1]=Le[1]-Se[1],qe[2]=Le[2]-Se[2],qe[3]=Le[3]-Se[0],qe[4]=Le[4]-Se[1],qe[5]=Le[5]-Se[2];const We=Jt.createPositionsDecodeMatrix(qe),H={};for(let ee=ve;ee<ge;ee++){const ae=L[ee],Be=l[ae],pe=e.globalizeObjectIds?C.globalizeObjectId(o.id,Be):Be,Q=$-1,Z=ee===Q,ie=F[ee],re=Z?P.length:F[ee+1],ne=[],G=i.metaScene.metaObjects[pe],K={},ue={};if(G){if(e.excludeTypesMap&&G.type&&e.excludeTypesMap[G.type]||e.includeTypesMap&&G.type&&!e.includeTypesMap[G.type]||e.includeIdsMap&&G.id&&!e.includeIdsMap[G.id])continue;const xe=e.objectDefaults?e.objectDefaults[G.type]||e.objectDefaults.DEFAULT:null;xe&&(xe.visible===!1&&(K.visible=!1),xe.pickable===!1&&(K.pickable=!1),xe.colorize&&(ue.color=xe.colorize),xe.opacity!==void 0&&xe.opacity!==null&&(ue.opacity=xe.opacity),xe.metallic!==void 0&&xe.metallic!==null&&(ue.metallic=xe.metallic),xe.roughness!==void 0&&xe.roughness!==null&&(ue.roughness=xe.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let xe=ie;xe<re;xe++){const oe=P[xe],Me=Ie[oe]>1,je=oe===W-1,he=KSt(T.subarray(xe*6,xe*6+3)),Ne=T[xe*6+3]/255,Ee=T[xe*6+4]/255,ze=T[xe*6+5]/255,ot=r.getNextId();if(Me){const At=R[xe],ft=g.slice(At,At+16),lt=`${a}-geometry.${Ce}.${oe}`;let ut=Qe[lt];if(!ut){ut={batchThisMesh:!e.reuseGeometries};const Te=v[oe];let st=!1;switch(Te){case 0:ut.primitiveName="solid",ut.geometryPositions=h.subarray(w[oe],je?h.length:w[oe+1]),ut.geometryNormals=p.subarray(x[oe],je?p.length:x[oe+1]),ut.geometryIndices=f.subarray(B[oe],je?f.length:B[oe+1]),ut.geometryEdgeIndices=m.subarray(E[oe],je?m.length:E[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;case 1:ut.primitiveName="surface",ut.geometryPositions=h.subarray(w[oe],je?h.length:w[oe+1]),ut.geometryNormals=p.subarray(x[oe],je?p.length:x[oe+1]),ut.geometryIndices=f.subarray(B[oe],je?f.length:B[oe+1]),ut.geometryEdgeIndices=m.subarray(E[oe],je?m.length:E[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;case 2:ut.primitiveName="points",ut.geometryPositions=h.subarray(w[oe],je?h.length:w[oe+1]),ut.geometryColors=yW(A.subarray(k[oe],je?A.length:k[oe+1])),st=ut.geometryPositions.length>0;break;case 3:ut.primitiveName="lines",ut.geometryPositions=h.subarray(w[oe],je?h.length:w[oe+1]),ut.geometryIndices=f.subarray(B[oe],je?f.length:B[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;default:continue}if(st||(ut=null),ut&&(ut.geometryPositions.length>1e3,ut.batchThisMesh)){ut.decompressedPositions=new Float32Array(ut.geometryPositions.length);const dt=ut.geometryPositions,Ye=ut.decompressedPositions;for(let fe=0,be=dt.length;fe<be;fe+=3)Ye[fe+0]=dt[fe+0]*y[0]+y[12],Ye[fe+1]=dt[fe+1]*y[5]+y[13],Ye[fe+2]=dt[fe+2]*y[10]+y[14];ut.geometryPositions=null,Qe[lt]=ut}}if(ut)if(ut.batchThisMesh){const Te=ut.decompressedPositions,st=new Uint16Array(Te.length);for(let dt=0,Ye=Te.length;dt<Ye;dt+=3)Gl[0]=Te[dt+0],Gl[1]=Te[dt+1],Gl[2]=Te[dt+2],Gl[3]=1,C.transformVec4(ft,Gl,vW),Jt.compressPosition(vW,qe,Gl),st[dt+0]=Gl[0],st[dt+1]=Gl[1],st[dt+2]=Gl[2];o.createMesh(mt.apply(ue,{id:ot,origin:Se,primitive:ut.primitiveName,positionsCompressed:st,normalsCompressed:ut.geometryNormals,colorsCompressed:ut.geometryColors,indices:ut.geometryIndices,edgeIndices:ut.geometryEdgeIndices,positionsDecodeMatrix:We,color:he,metallic:Ee,roughness:ze,opacity:Ne})),ne.push(ot)}else H[lt]||(o.createGeometry({id:lt,primitive:ut.primitiveName,positionsCompressed:ut.geometryPositions,normalsCompressed:ut.geometryNormals,colorsCompressed:ut.geometryColors,indices:ut.geometryIndices,edgeIndices:ut.geometryEdgeIndices,positionsDecodeMatrix:y}),H[lt]=!0),o.createMesh(mt.apply(ue,{id:ot,geometryId:lt,origin:Se,matrix:ft,color:he,metallic:Ee,roughness:ze,opacity:Ne})),ne.push(ot)}else{const At=v[oe];let ft,lt,ut,Te,st,dt,Ye=!1;switch(At){case 0:ft="solid",lt=h.subarray(w[oe],je?h.length:w[oe+1]),ut=p.subarray(x[oe],je?p.length:x[oe+1]),st=f.subarray(B[oe],je?f.length:B[oe+1]),dt=m.subarray(E[oe],je?m.length:E[oe+1]),Ye=lt.length>0&&st.length>0;break;case 1:ft="surface",lt=h.subarray(w[oe],je?h.length:w[oe+1]),ut=p.subarray(x[oe],je?p.length:x[oe+1]),st=f.subarray(B[oe],je?f.length:B[oe+1]),dt=m.subarray(E[oe],je?m.length:E[oe+1]),Ye=lt.length>0&&st.length>0;break;case 2:ft="points",lt=h.subarray(w[oe],je?h.length:w[oe+1]),Te=yW(A.subarray(k[oe],je?A.length:k[oe+1])),Ye=lt.length>0;break;case 3:ft="lines",lt=h.subarray(w[oe],je?h.length:w[oe+1]),st=f.subarray(B[oe],je?f.length:B[oe+1]),Ye=lt.length>0&&st.length>0;break;default:continue}Ye&&(o.createMesh(mt.apply(ue,{id:ot,origin:Se,primitive:ft,positionsCompressed:lt,normalsCompressed:ut,colorsCompressed:Te,indices:st,edgeIndices:dt,positionsDecodeMatrix:We,color:he,metallic:Ee,roughness:ze,opacity:Ne})),ne.push(ot))}}ne.length>0&&o.createEntity(mt.apply(K,{id:pe,isObject:!0,meshIds:ne}))}}}const bW={version:8,parse:function(i,e,t,o,n,r){const a=QSt(t),s=GSt(a);JSt(i,e,s,o,n,r)}};let Wp=window.pako||$a;Wp.inflate||(Wp=Wp.default);const Kl=C.vec4(),wW=C.vec4();function ZSt(i){return{metadata:i[0],positions:i[1],normals:i[2],colors:i[3],indices:i[4],edgeIndices:i[5],matrices:i[6],reusedGeometriesDecodeMatrix:i[7],eachGeometryPrimitiveType:i[8],eachGeometryPositionsPortion:i[9],eachGeometryNormalsPortion:i[10],eachGeometryColorsPortion:i[11],eachGeometryIndicesPortion:i[12],eachGeometryEdgeIndicesPortion:i[13],eachMeshGeometriesPortion:i[14],eachMeshMatricesPortion:i[15],eachMeshMaterial:i[16],eachEntityId:i[17],eachEntityMeshesPortion:i[18],eachTileAABB:i[19],eachTileEntitiesPortion:i[20]}}function WSt(i){function e(t,o){return t.length===0?[]:Wp.inflate(t,o).buffer}return{metadata:JSON.parse(Wp.inflate(i.metadata,{to:"string"})),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(i.eachMeshMaterial)),eachEntityId:JSON.parse(Wp.inflate(i.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const YSt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function XSt(i,e,t,o,n,r){const a=r.getNextId(),s=t.metadata,l=t.positions,c=t.normals,d=t.colors,u=t.indices,h=t.edgeIndices,p=t.matrices,A=t.reusedGeometriesDecodeMatrix,f=t.eachGeometryPrimitiveType,m=t.eachGeometryPositionsPortion,g=t.eachGeometryNormalsPortion,y=t.eachGeometryColorsPortion,v=t.eachGeometryIndicesPortion,w=t.eachGeometryEdgeIndicesPortion,x=t.eachMeshGeometriesPortion,k=t.eachMeshMatricesPortion,B=t.eachMeshMaterial,E=t.eachEntityId,P=t.eachEntityMeshesPortion,R=t.eachTileAABB,T=t.eachTileEntitiesPortion,L=m.length,F=x.length,U=P.length,q=T.length;n&&n.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});const V=new Uint32Array(L);for(let me=0;me<F;me++){const Ie=x[me];V[Ie]!==void 0?V[Ie]++:V[Ie]=1}const W=C.vec3(),Y=C.AABB3(),$={};for(let me=0;me<q;me++){const Ie=q-1,Se=me===Ie,qe=T[me],Qe=Se?U-1:T[me+1]-1,Ce=me*6,De=R.subarray(Ce,Ce+6);C.getAABB3Center(De,W),Y[0]=De[0]-W[0],Y[1]=De[1]-W[1],Y[2]=De[2]-W[2],Y[3]=De[3]-W[0],Y[4]=De[4]-W[1],Y[5]=De[5]-W[2];const Fe=Jt.createPositionsDecodeMatrix(Y),ve={};for(let ge=qe;ge<=Qe;ge++){const we=E[ge],Le=e.globalizeObjectIds?C.globalizeObjectId(o.id,we):we,We=U-1,H=ge===We,ee=P[ge],ae=H?x.length-1:P[ge+1]-1,Be=[],pe=i.metaScene.metaObjects[Le],Q={},Z={};if(!(e.includeIdsMap&&we&&!e.includeIdsMap[we])){if(pe){if(e.excludeTypesMap&&pe.type&&e.excludeTypesMap[pe.type]||e.includeTypesMap&&pe.type&&!e.includeTypesMap[pe.type]||e.includeIdsMap&&pe.id&&!e.includeIdsMap[pe.id])continue;const ie=e.objectDefaults?e.objectDefaults[pe.type]||e.objectDefaults.DEFAULT:null;ie&&(ie.visible===!1&&(Q.visible=!1),ie.pickable===!1&&(Q.pickable=!1),ie.colorize&&(Z.color=ie.colorize),ie.opacity!==void 0&&ie.opacity!==null&&(Z.opacity=ie.opacity),ie.metallic!==void 0&&ie.metallic!==null&&(Z.metallic=ie.metallic),ie.roughness!==void 0&&ie.roughness!==null&&(Z.roughness=ie.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let ie=ee;ie<=ae;ie++){const re=x[ie],ne=V[re]>1,G=re===L-1,K=YSt(B.subarray(ie*6,ie*6+3)),ue=B[ie*6+3]/255,xe=B[ie*6+4]/255,oe=B[ie*6+5]/255,Me=r.getNextId();if(ne){const je=k[ie],he=p.slice(je,je+16),Ne=`${a}-geometry.${me}.${re}`;let Ee=$[Ne];if(!Ee){Ee={batchThisMesh:!e.reuseGeometries};const ze=f[re];let ot=!1;switch(ze){case 0:Ee.primitiveName="solid",Ee.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Ee.geometryNormals=c.subarray(g[re],G?c.length:g[re+1]),Ee.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),Ee.geometryEdgeIndices=h.subarray(w[re],G?h.length:w[re+1]),ot=Ee.geometryPositions.length>0&&Ee.geometryIndices.length>0;break;case 1:Ee.primitiveName="surface",Ee.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Ee.geometryNormals=c.subarray(g[re],G?c.length:g[re+1]),Ee.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),Ee.geometryEdgeIndices=h.subarray(w[re],G?h.length:w[re+1]),ot=Ee.geometryPositions.length>0&&Ee.geometryIndices.length>0;break;case 2:Ee.primitiveName="points",Ee.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Ee.geometryColors=d.subarray(y[re],G?d.length:y[re+1]),ot=Ee.geometryPositions.length>0;break;case 3:Ee.primitiveName="lines",Ee.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Ee.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),ot=Ee.geometryPositions.length>0&&Ee.geometryIndices.length>0;break;default:continue}if(ot||(Ee=null),Ee&&(Ee.geometryPositions.length>1e3,Ee.batchThisMesh)){Ee.decompressedPositions=new Float32Array(Ee.geometryPositions.length),Ee.transformedAndRecompressedPositions=new Uint16Array(Ee.geometryPositions.length);const At=Ee.geometryPositions,ft=Ee.decompressedPositions;for(let lt=0,ut=At.length;lt<ut;lt+=3)ft[lt+0]=At[lt+0]*A[0]+A[12],ft[lt+1]=At[lt+1]*A[5]+A[13],ft[lt+2]=At[lt+2]*A[10]+A[14];Ee.geometryPositions=null,$[Ne]=Ee}}if(Ee)if(Ee.batchThisMesh){const ze=Ee.decompressedPositions,ot=Ee.transformedAndRecompressedPositions;for(let At=0,ft=ze.length;At<ft;At+=3)Kl[0]=ze[At+0],Kl[1]=ze[At+1],Kl[2]=ze[At+2],Kl[3]=1,C.transformVec4(he,Kl,wW),Jt.compressPosition(wW,Y,Kl),ot[At+0]=Kl[0],ot[At+1]=Kl[1],ot[At+2]=Kl[2];o.createMesh(mt.apply(Z,{id:Me,origin:W,primitive:Ee.primitiveName,positionsCompressed:ot,normalsCompressed:Ee.geometryNormals,colorsCompressed:Ee.geometryColors,indices:Ee.geometryIndices,edgeIndices:Ee.geometryEdgeIndices,positionsDecodeMatrix:Fe,color:K,metallic:xe,roughness:oe,opacity:ue})),Be.push(Me)}else ve[Ne]||(o.createGeometry({id:Ne,primitive:Ee.primitiveName,positionsCompressed:Ee.geometryPositions,normalsCompressed:Ee.geometryNormals,colorsCompressed:Ee.geometryColors,indices:Ee.geometryIndices,edgeIndices:Ee.geometryEdgeIndices,positionsDecodeMatrix:A}),ve[Ne]=!0),o.createMesh(mt.apply(Z,{id:Me,geometryId:Ne,origin:W,matrix:he,color:K,metallic:xe,roughness:oe,opacity:ue})),Be.push(Me)}else{const je=f[re];let he,Ne,Ee,ze,ot,At,ft=!1;switch(je){case 0:he="solid",Ne=l.subarray(m[re],G?l.length:m[re+1]),Ee=c.subarray(g[re],G?c.length:g[re+1]),ot=u.subarray(v[re],G?u.length:v[re+1]),At=h.subarray(w[re],G?h.length:w[re+1]),ft=Ne.length>0&&ot.length>0;break;case 1:he="surface",Ne=l.subarray(m[re],G?l.length:m[re+1]),Ee=c.subarray(g[re],G?c.length:g[re+1]),ot=u.subarray(v[re],G?u.length:v[re+1]),At=h.subarray(w[re],G?h.length:w[re+1]),ft=Ne.length>0&&ot.length>0;break;case 2:he="points",Ne=l.subarray(m[re],G?l.length:m[re+1]),ze=d.subarray(y[re],G?d.length:y[re+1]),ft=Ne.length>0;break;case 3:he="lines",Ne=l.subarray(m[re],G?l.length:m[re+1]),ot=u.subarray(v[re],G?u.length:v[re+1]),ft=Ne.length>0&&ot.length>0;break;default:continue}ft&&(o.createMesh(mt.apply(Z,{id:Me,origin:W,primitive:he,positionsCompressed:Ne,normalsCompressed:Ee,colorsCompressed:ze,indices:ot,edgeIndices:At,positionsDecodeMatrix:Fe,color:K,metallic:xe,roughness:oe,opacity:ue})),Be.push(Me))}}Be.length>0&&o.createEntity(mt.apply(Q,{id:Le,isObject:!0,meshIds:Be}))}}}}const CW={version:9,parse:function(i,e,t,o,n,r){const a=ZSt(t),s=WSt(a);XSt(i,e,s,o,n,r)}};let Yp=window.pako||$a;Yp.inflate||(Yp=Yp.default);const Jl=C.vec4(),xW=C.vec4(),$St=9;function eTt(i){let e=0;return{metadata:i[e++],textureData:i[e++],eachTextureDataPortion:i[e++],eachTextureAttributes:i[e++],positions:i[e++],normals:i[e++],colors:i[e++],uvs:i[e++],indices:i[e++],edgeIndices:i[e++],eachTextureSetTextures:i[e++],matrices:i[e++],reusedGeometriesDecodeMatrix:i[e++],eachGeometryPrimitiveType:i[e++],eachGeometryPositionsPortion:i[e++],eachGeometryNormalsPortion:i[e++],eachGeometryColorsPortion:i[e++],eachGeometryUVsPortion:i[e++],eachGeometryIndicesPortion:i[e++],eachGeometryEdgeIndicesPortion:i[e++],eachMeshGeometriesPortion:i[e++],eachMeshMatricesPortion:i[e++],eachMeshTextureSet:i[e++],eachMeshMaterialAttributes:i[e++],eachEntityId:i[e++],eachEntityMeshesPortion:i[e++],eachTileAABB:i[e++],eachTileEntitiesPortion:i[e++]}}function tTt(i){function e(t,o){return t.length===0?[]:Yp.inflate(t,o).buffer}return{metadata:JSON.parse(Yp.inflate(i.metadata,{to:"string"})),textureData:new Uint8Array(e(i.textureData)),eachTextureDataPortion:new Uint32Array(e(i.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(i.eachTextureAttributes)),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),uvs:new Float32Array(e(i.uvs)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),eachTextureSetTextures:new Int32Array(e(i.eachTextureSetTextures)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(i.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(i.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(i.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(Yp.inflate(i.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const iTt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();(function(){const i=document.createElement("canvas"),e=i.getContext("2d");return function(t){return i.width=t.width,i.height=t.height,e.putImageData(t,0,0),i.toDataURL()}})();function oTt(i,e,t,o,n,r){const a=r.getNextId(),s=t.metadata,l=t.textureData,c=t.eachTextureDataPortion,d=t.eachTextureAttributes,u=t.positions,h=t.normals,p=t.colors,A=t.uvs,f=t.indices,m=t.edgeIndices,g=t.eachTextureSetTextures,y=t.matrices,v=t.reusedGeometriesDecodeMatrix,w=t.eachGeometryPrimitiveType,x=t.eachGeometryPositionsPortion,k=t.eachGeometryNormalsPortion,B=t.eachGeometryColorsPortion,E=t.eachGeometryUVsPortion,P=t.eachGeometryIndicesPortion,R=t.eachGeometryEdgeIndicesPortion,T=t.eachMeshGeometriesPortion,L=t.eachMeshMatricesPortion,F=t.eachMeshTextureSet,U=t.eachMeshMaterialAttributes,q=t.eachEntityId,V=t.eachEntityMeshesPortion,W=t.eachTileAABB,Y=t.eachTileEntitiesPortion,$=c.length,me=g.length/5,Ie=x.length,Se=T.length,qe=V.length,Qe=Y.length;n&&n.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let ge=0;ge<$;ge++){const we=ge===$-1,Le=c[ge],We=we?l.length:c[ge+1],H=We-Le>0,ee=ge*$St,ae=d[ee+0]===1,Be=d[ee+1];d[ee+2],d[ee+3];const pe=d[ee+4],Q=d[ee+5],Z=d[ee+6],ie=d[ee+7],re=d[ee+8];if(H){const ne=new Uint8Array(l.subarray(Le,We)).buffer,G=`${a}-texture-${ge}`;if(ae)o.createTexture({id:G,buffers:[ne],minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re});else{const K=Be===j8?"image/jpeg":Be===V8?"image/png":"image/gif",ue=new Blob([ne],{type:K}),xe=(window.URL||window.webkitURL).createObjectURL(ue),oe=document.createElement("img");oe.src=xe,o.createTexture({id:G,image:oe,minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re})}}}for(let ge=0;ge<me;ge++){const we=ge*5,Le=`${a}-textureSet-${ge}`,We=g[we+0],H=g[we+1],ee=g[we+2],ae=g[we+3],Be=g[we+4];o.createTextureSet({id:Le,colorTextureId:We>=0?`${a}-texture-${We}`:null,normalsTextureId:ee>=0?`${a}-texture-${ee}`:null,metallicRoughnessTextureId:H>=0?`${a}-texture-${H}`:null,emissiveTextureId:ae>=0?`${a}-texture-${ae}`:null,occlusionTextureId:Be>=0?`${a}-texture-${Be}`:null})}const Ce=new Uint32Array(Ie);for(let ge=0;ge<Se;ge++){const we=T[ge];Ce[we]!==void 0?Ce[we]++:Ce[we]=1}const De=C.vec3(),Fe=C.AABB3(),ve={};for(let ge=0;ge<Qe;ge++){const we=Qe-1,Le=ge===we,We=Y[ge],H=Le?qe-1:Y[ge+1]-1,ee=ge*6,ae=W.subarray(ee,ee+6);C.getAABB3Center(ae,De),Fe[0]=ae[0]-De[0],Fe[1]=ae[1]-De[1],Fe[2]=ae[2]-De[2],Fe[3]=ae[3]-De[0],Fe[4]=ae[4]-De[1],Fe[5]=ae[5]-De[2];const Be=Jt.createPositionsDecodeMatrix(Fe),pe={};for(let Q=We;Q<=H;Q++){const Z=q[Q],ie=e.globalizeObjectIds?C.globalizeObjectId(o.id,Z):Z,re=qe-1,ne=Q===re,G=V[Q],K=ne?T.length-1:V[Q+1]-1,ue=[],xe=i.metaScene.metaObjects[ie],oe={},Me={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(xe){if(e.excludeTypesMap&&xe.type&&e.excludeTypesMap[xe.type]||e.includeTypesMap&&xe.type&&!e.includeTypesMap[xe.type]||e.includeIdsMap&&xe.id&&!e.includeIdsMap[xe.id])continue;const je=e.objectDefaults?e.objectDefaults[xe.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(oe.visible=!1),je.pickable===!1&&(oe.pickable=!1),je.colorize&&(Me.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(Me.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(Me.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(Me.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=G;je<=K;je++){const he=T[je],Ne=Ce[he]>1,Ee=he===Ie-1,ze=F[je],ot=ze>=0?`${a}-textureSet-${ze}`:null,At=iTt(U.subarray(je*6,je*6+3)),ft=U[je*6+3]/255,lt=U[je*6+4]/255,ut=U[je*6+5]/255,Te=r.getNextId();if(Ne){const st=L[je],dt=y.slice(st,st+16),Ye=`${a}-geometry.${ge}.${he}`;let fe=ve[Ye];if(!fe){fe={batchThisMesh:!e.reuseGeometries};const be=w[he];let Xe=!1;switch(be){case 0:fe.primitiveName="solid",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Ee?h.length:k[he+1]),fe.geometryUVs=A.subarray(E[he],Ee?A.length:E[he+1]),fe.geometryIndices=f.subarray(P[he],Ee?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(R[he],Ee?m.length:R[he+1]),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 1:fe.primitiveName="surface",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Ee?h.length:k[he+1]),fe.geometryUVs=A.subarray(E[he],Ee?A.length:E[he+1]),fe.geometryIndices=f.subarray(P[he],Ee?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(R[he],Ee?m.length:R[he+1]),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 2:fe.primitiveName="points",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryColors=p.subarray(B[he],Ee?p.length:B[he+1]),Xe=fe.geometryPositions.length>0;break;case 3:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryIndices=f.subarray(P[he],Ee?f.length:P[he+1]),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 4:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryIndices=kW(fe.geometryPositions,f.subarray(P[he],Ee?f.length:P[he+1])),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;default:continue}if(Xe||(fe=null),fe&&(fe.geometryPositions.length>1e3,fe.batchThisMesh)){fe.decompressedPositions=new Float32Array(fe.geometryPositions.length),fe.transformedAndRecompressedPositions=new Uint16Array(fe.geometryPositions.length);const ht=fe.geometryPositions,St=fe.decompressedPositions;for(let xt=0,fi=ht.length;xt<fi;xt+=3)St[xt+0]=ht[xt+0]*v[0]+v[12],St[xt+1]=ht[xt+1]*v[5]+v[13],St[xt+2]=ht[xt+2]*v[10]+v[14];fe.geometryPositions=null,ve[Ye]=fe}}if(fe)if(fe.batchThisMesh){const be=fe.decompressedPositions,Xe=fe.transformedAndRecompressedPositions;for(let ht=0,St=be.length;ht<St;ht+=3)Jl[0]=be[ht+0],Jl[1]=be[ht+1],Jl[2]=be[ht+2],Jl[3]=1,C.transformVec4(dt,Jl,xW),Jt.compressPosition(xW,Fe,Jl),Xe[ht+0]=Jl[0],Xe[ht+1]=Jl[1],Xe[ht+2]=Jl[2];o.createMesh(mt.apply(Me,{id:Te,textureSetId:ot,origin:De,primitive:fe.primitiveName,positionsCompressed:Xe,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:Be,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te)}else pe[Ye]||(o.createGeometry({id:Ye,primitive:fe.primitiveName,positionsCompressed:fe.geometryPositions,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:v}),pe[Ye]=!0),o.createMesh(mt.apply(Me,{id:Te,geometryId:Ye,textureSetId:ot,matrix:dt,color:At,metallic:lt,roughness:ut,opacity:ft,origin:De})),ue.push(Te)}else{const st=w[he];let dt,Ye,fe,be,Xe,ht,St,xt=!1;switch(st){case 0:dt="solid",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),fe=h.subarray(k[he],Ee?h.length:k[he+1]),be=A.subarray(E[he],Ee?A.length:E[he+1]),ht=f.subarray(P[he],Ee?f.length:P[he+1]),St=m.subarray(R[he],Ee?m.length:R[he+1]),xt=Ye.length>0&&ht.length>0;break;case 1:dt="surface",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),fe=h.subarray(k[he],Ee?h.length:k[he+1]),be=A.subarray(E[he],Ee?A.length:E[he+1]),ht=f.subarray(P[he],Ee?f.length:P[he+1]),St=m.subarray(R[he],Ee?m.length:R[he+1]),xt=Ye.length>0&&ht.length>0;break;case 2:dt="points",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),Xe=p.subarray(B[he],Ee?p.length:B[he+1]),xt=Ye.length>0;break;case 3:dt="lines",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),ht=f.subarray(P[he],Ee?f.length:P[he+1]),xt=Ye.length>0&&ht.length>0;break;case 4:dt="lines",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),ht=kW(Ye,f.subarray(P[he],Ee?f.length:P[he+1])),xt=Ye.length>0&&ht.length>0;break;default:continue}xt&&(o.createMesh(mt.apply(Me,{id:Te,textureSetId:ot,origin:De,primitive:dt,positionsCompressed:Ye,normalsCompressed:fe,uv:be&&be.length>0?be:null,colorsCompressed:Xe,indices:ht,edgeIndices:St,positionsDecodeMatrix:Be,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te))}}ue.length>0&&o.createEntity(mt.apply(oe,{id:ie,isObject:!0,meshIds:ue}))}}}}function kW(i,e){const t=[];if(e.length>1)for(let o=0,n=e.length-1;o<n;o++)t.push(e[o]),t.push(e[o+1]);else if(i.length>1)for(let o=0,n=i.length/3-1;o<n;o++)t.push(o),t.push(o+1);return t}const MW={version:10,parse:function(i,e,t,o,n,r){const a=eTt(t),s=tTt(a);oTt(i,e,s,o,n,r)}},Zl=C.vec4(),BW=C.vec4(),rTt=9;function nTt(i){const e=(function(){const n=new ArrayBuffer(2);return new Uint16Array(n)[0]=1,new Uint8Array(n)[0]!==1})(),t=(function(){let n=0;const r=new DataView(i);return function(a){const s=1+2*n++,l=r.getUint32(s*4,!0),c=r.getUint32((s+1)*4,!0),d=a.BYTES_PER_ELEMENT;if(e&&d>1){const u=new Uint8Array(i,l,c),h=d/2,p=u.length/d;for(let A=0;A<p;A++){const f=A*d;for(let m=0;m<h;m++){const g=f+m,y=f-m+d-1,v=u[g];u[g]=u[y],u[y]=v}}}return new a(i,l,c/d)}})(),o=(function(){const n=new TextDecoder;return()=>JSON.parse(n.decode(t(Uint8Array)))})();return{metadata:o(),textureData:t(Uint8Array),eachTextureDataPortion:t(Uint32Array),eachTextureAttributes:t(Uint16Array),positions:t(Uint16Array),normals:t(Int8Array),colors:t(Uint8Array),uvs:t(Float32Array),indices:t(Uint32Array),edgeIndices:t(Uint32Array),eachTextureSetTextures:t(Int32Array),matrices:t(Float32Array),reusedGeometriesDecodeMatrix:t(Float32Array),eachGeometryPrimitiveType:t(Uint8Array),eachGeometryPositionsPortion:t(Uint32Array),eachGeometryNormalsPortion:t(Uint32Array),eachGeometryColorsPortion:t(Uint32Array),eachGeometryUVsPortion:t(Uint32Array),eachGeometryIndicesPortion:t(Uint32Array),eachGeometryEdgeIndicesPortion:t(Uint32Array),eachMeshGeometriesPortion:t(Uint32Array),eachMeshMatricesPortion:t(Uint32Array),eachMeshTextureSet:t(Int32Array),eachMeshMaterialAttributes:t(Uint8Array),eachEntityId:o(),eachEntityMeshesPortion:t(Uint32Array),eachTileAABB:t(Float64Array),eachTileEntitiesPortion:t(Uint32Array)}}const aTt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();(function(){const i=document.createElement("canvas"),e=i.getContext("2d");return function(t){return i.width=t.width,i.height=t.height,e.putImageData(t,0,0),i.toDataURL()}})();function sTt(i,e,t,o,n,r){const a=r.getNextId(),s=t.metadata,l=t.textureData,c=t.eachTextureDataPortion,d=t.eachTextureAttributes,u=t.positions,h=t.normals,p=t.colors,A=t.uvs,f=t.indices,m=t.edgeIndices,g=t.eachTextureSetTextures,y=t.matrices,v=t.reusedGeometriesDecodeMatrix,w=t.eachGeometryPrimitiveType,x=t.eachGeometryPositionsPortion,k=t.eachGeometryNormalsPortion,B=t.eachGeometryColorsPortion,E=t.eachGeometryUVsPortion,P=t.eachGeometryIndicesPortion,R=t.eachGeometryEdgeIndicesPortion,T=t.eachMeshGeometriesPortion,L=t.eachMeshMatricesPortion,F=t.eachMeshTextureSet,U=t.eachMeshMaterialAttributes,q=t.eachEntityId,V=t.eachEntityMeshesPortion,W=t.eachTileAABB,Y=t.eachTileEntitiesPortion,$=c.length,me=g.length/5,Ie=x.length,Se=T.length,qe=V.length,Qe=Y.length;n&&n.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let ge=0;ge<$;ge++){const we=ge===$-1,Le=c[ge],We=we?l.length:c[ge+1],H=We-Le>0,ee=ge*rTt,ae=d[ee+0]===1,Be=d[ee+1];d[ee+2],d[ee+3];const pe=d[ee+4],Q=d[ee+5],Z=d[ee+6],ie=d[ee+7],re=d[ee+8];if(H){const ne=new Uint8Array(l.subarray(Le,We)).buffer,G=`${a}-texture-${ge}`;if(ae)o.createTexture({id:G,buffers:[ne],minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re});else{const K=Be===j8?"image/jpeg":Be===V8?"image/png":"image/gif",ue=new Blob([ne],{type:K}),xe=(window.URL||window.webkitURL).createObjectURL(ue),oe=document.createElement("img");oe.src=xe,o.createTexture({id:G,image:oe,minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re})}}}for(let ge=0;ge<me;ge++){const we=ge*5,Le=`${a}-textureSet-${ge}`,We=g[we+0],H=g[we+1],ee=g[we+2],ae=g[we+3],Be=g[we+4];o.createTextureSet({id:Le,colorTextureId:We>=0?`${a}-texture-${We}`:null,normalsTextureId:ee>=0?`${a}-texture-${ee}`:null,metallicRoughnessTextureId:H>=0?`${a}-texture-${H}`:null,emissiveTextureId:ae>=0?`${a}-texture-${ae}`:null,occlusionTextureId:Be>=0?`${a}-texture-${Be}`:null})}const Ce=new Uint32Array(Ie);for(let ge=0;ge<Se;ge++){const we=T[ge];Ce[we]!==void 0?Ce[we]++:Ce[we]=1}const De=C.vec3(),Fe=C.AABB3(),ve={};for(let ge=0;ge<Qe;ge++){const we=Qe-1,Le=ge===we,We=Y[ge],H=Le?qe-1:Y[ge+1]-1,ee=ge*6,ae=W.subarray(ee,ee+6);C.getAABB3Center(ae,De),Fe[0]=ae[0]-De[0],Fe[1]=ae[1]-De[1],Fe[2]=ae[2]-De[2],Fe[3]=ae[3]-De[0],Fe[4]=ae[4]-De[1],Fe[5]=ae[5]-De[2];const Be=Jt.createPositionsDecodeMatrix(Fe),pe={};for(let Q=We;Q<=H;Q++){const Z=q[Q],ie=e.globalizeObjectIds?C.globalizeObjectId(o.id,Z):Z,re=qe-1,ne=Q===re,G=V[Q],K=ne?T.length-1:V[Q+1]-1,ue=[],xe=i.metaScene.metaObjects[ie],oe={},Me={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(xe){if(e.excludeTypesMap&&xe.type&&e.excludeTypesMap[xe.type]||e.includeTypesMap&&xe.type&&!e.includeTypesMap[xe.type]||e.includeIdsMap&&xe.id&&!e.includeIdsMap[xe.id])continue;const je=e.objectDefaults?e.objectDefaults[xe.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(oe.visible=!1),je.pickable===!1&&(oe.pickable=!1),je.colorize&&(Me.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(Me.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(Me.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(Me.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=G;je<=K;je++){const he=T[je],Ne=Ce[he]>1,Ee=he===Ie-1,ze=F[je],ot=ze>=0?`${a}-textureSet-${ze}`:null,At=aTt(U.subarray(je*6,je*6+3)),ft=U[je*6+3]/255,lt=U[je*6+4]/255,ut=U[je*6+5]/255,Te=r.getNextId();if(Ne){const st=L[je],dt=y.slice(st,st+16),Ye=`${a}-geometry.${ge}.${he}`;let fe=ve[Ye];if(!fe){fe={batchThisMesh:!e.reuseGeometries};const be=w[he];let Xe=!1;switch(be){case 0:fe.primitiveName="solid",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Ee?h.length:k[he+1]),fe.geometryUVs=A.subarray(E[he],Ee?A.length:E[he+1]),fe.geometryIndices=f.subarray(P[he],Ee?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(R[he],Ee?m.length:R[he+1]),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 1:fe.primitiveName="surface",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Ee?h.length:k[he+1]),fe.geometryUVs=A.subarray(E[he],Ee?A.length:E[he+1]),fe.geometryIndices=f.subarray(P[he],Ee?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(R[he],Ee?m.length:R[he+1]),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 2:fe.primitiveName="points",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryColors=p.subarray(B[he],Ee?p.length:B[he+1]),Xe=fe.geometryPositions.length>0;break;case 3:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryIndices=f.subarray(P[he],Ee?f.length:P[he+1]),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 4:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Ee?u.length:x[he+1]),fe.geometryIndices=EW(fe.geometryPositions,f.subarray(P[he],Ee?f.length:P[he+1])),Xe=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;default:continue}if(Xe||(fe=null),fe&&(fe.geometryPositions.length>1e3,fe.batchThisMesh)){fe.decompressedPositions=new Float32Array(fe.geometryPositions.length),fe.transformedAndRecompressedPositions=new Uint16Array(fe.geometryPositions.length);const ht=fe.geometryPositions,St=fe.decompressedPositions;for(let xt=0,fi=ht.length;xt<fi;xt+=3)St[xt+0]=ht[xt+0]*v[0]+v[12],St[xt+1]=ht[xt+1]*v[5]+v[13],St[xt+2]=ht[xt+2]*v[10]+v[14];fe.geometryPositions=null,ve[Ye]=fe}}if(fe)if(fe.batchThisMesh){const be=fe.decompressedPositions,Xe=fe.transformedAndRecompressedPositions;for(let ht=0,St=be.length;ht<St;ht+=3)Zl[0]=be[ht+0],Zl[1]=be[ht+1],Zl[2]=be[ht+2],Zl[3]=1,C.transformVec4(dt,Zl,BW),Jt.compressPosition(BW,Fe,Zl),Xe[ht+0]=Zl[0],Xe[ht+1]=Zl[1],Xe[ht+2]=Zl[2];o.createMesh(mt.apply(Me,{id:Te,textureSetId:ot,origin:De,primitive:fe.primitiveName,positionsCompressed:Xe,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:Be,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te)}else pe[Ye]||(o.createGeometry({id:Ye,primitive:fe.primitiveName,positionsCompressed:fe.geometryPositions,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:v}),pe[Ye]=!0),o.createMesh(mt.apply(Me,{id:Te,geometryId:Ye,textureSetId:ot,matrix:dt,color:At,metallic:lt,roughness:ut,opacity:ft,origin:De})),ue.push(Te)}else{const st=w[he];let dt,Ye,fe,be,Xe,ht,St,xt=!1;switch(st){case 0:dt="solid",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),fe=h.subarray(k[he],Ee?h.length:k[he+1]),be=A.subarray(E[he],Ee?A.length:E[he+1]),ht=f.subarray(P[he],Ee?f.length:P[he+1]),St=m.subarray(R[he],Ee?m.length:R[he+1]),xt=Ye.length>0&&ht.length>0;break;case 1:dt="surface",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),fe=h.subarray(k[he],Ee?h.length:k[he+1]),be=A.subarray(E[he],Ee?A.length:E[he+1]),ht=f.subarray(P[he],Ee?f.length:P[he+1]),St=m.subarray(R[he],Ee?m.length:R[he+1]),xt=Ye.length>0&&ht.length>0;break;case 2:dt="points",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),Xe=p.subarray(B[he],Ee?p.length:B[he+1]),xt=Ye.length>0;break;case 3:dt="lines",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),ht=f.subarray(P[he],Ee?f.length:P[he+1]),xt=Ye.length>0&&ht.length>0;break;case 4:dt="lines",Ye=u.subarray(x[he],Ee?u.length:x[he+1]),ht=EW(Ye,f.subarray(P[he],Ee?f.length:P[he+1])),xt=Ye.length>0&&ht.length>0;break;default:continue}xt&&(o.createMesh(mt.apply(Me,{id:Te,textureSetId:ot,origin:De,primitive:dt,positionsCompressed:Ye,normalsCompressed:fe,uv:be&&be.length>0?be:null,colorsCompressed:Xe,indices:ht,edgeIndices:St,positionsDecodeMatrix:Be,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te))}}ue.length>0&&o.createEntity(mt.apply(oe,{id:ie,isObject:!0,meshIds:ue}))}}}}function EW(i,e){const t=[];if(e.length>1)for(let o=0,n=e.length-1;o<n;o++)t.push(e[o]),t.push(e[o+1]);else if(i.length>1)for(let o=0,n=i.length/3-1;o<n;o++)t.push(o),t.push(o+1);return t}const PW={version:11,parseArrayBuffer:function(i,e,t,o,n,r){const a=nTt(t);sTt(i,e,a,o,n,r)}};let Du=window.pako||$a;Du.inflate||(Du=Du.default);const Wl=C.vec4(),IW=C.vec4(),lTt=9;function cTt(i){const e=(function(){const n=new ArrayBuffer(2);return new Uint16Array(n)[0]=1,new Uint8Array(n)[0]!==1})(),t=(function(){let n=0;const r=new DataView(i);return function(a){const s=1+2*n++,l=r.getUint32(s*4,!0),c=r.getUint32((s+1)*4,!0),d=a.BYTES_PER_ELEMENT;if(e&&d>1){const u=new Uint8Array(i,l,c),h=d/2,p=u.length/d;for(let A=0;A<p;A++){const f=A*d;for(let m=0;m<h;m++){const g=f+m,y=f-m+d-1,v=u[g];u[g]=u[y],u[y]=v}}}return new a(i,l,c/d)}})(),o=(function(){const n=new TextDecoder;return()=>JSON.parse(n.decode(t(Uint8Array)))})();return{metadata:o(),textureData:t(Uint8Array),eachTextureDataPortion:t(Uint32Array),eachTextureAttributes:t(Uint16Array),positions:t(Uint16Array),normals:t(Int8Array),colors:t(Uint8Array),uvs:t(Float32Array),indices:t(Uint32Array),edgeIndices:t(Uint32Array),eachTextureSetTextures:t(Int32Array),matrices:t(Float32Array),reusedGeometriesDecodeMatrix:t(Float32Array),eachGeometryPrimitiveType:t(Uint8Array),eachGeometryAxisLabel:o(),eachGeometryPositionsPortion:t(Uint32Array),eachGeometryNormalsPortion:t(Uint32Array),eachGeometryColorsPortion:t(Uint32Array),eachGeometryUVsPortion:t(Uint32Array),eachGeometryIndicesPortion:t(Uint32Array),eachGeometryEdgeIndicesPortion:t(Uint32Array),eachMeshGeometriesPortion:t(Uint32Array),eachMeshMatricesPortion:t(Uint32Array),eachMeshTextureSet:t(Int32Array),eachMeshMaterialAttributes:t(Uint8Array),eachEntityId:o(),eachEntityMeshesPortion:t(Uint32Array),eachTileAABB:t(Float64Array),eachTileEntitiesPortion:t(Uint32Array)}}function dTt(i){let e=0;return{metadata:i[e++],textureData:i[e++],eachTextureDataPortion:i[e++],eachTextureAttributes:i[e++],positions:i[e++],normals:i[e++],colors:i[e++],uvs:i[e++],indices:i[e++],edgeIndices:i[e++],eachTextureSetTextures:i[e++],matrices:i[e++],reusedGeometriesDecodeMatrix:i[e++],eachGeometryPrimitiveType:i[e++],eachGeometryAxisLabel:i[e++],eachGeometryPositionsPortion:i[e++],eachGeometryNormalsPortion:i[e++],eachGeometryColorsPortion:i[e++],eachGeometryUVsPortion:i[e++],eachGeometryIndicesPortion:i[e++],eachGeometryEdgeIndicesPortion:i[e++],eachMeshGeometriesPortion:i[e++],eachMeshMatricesPortion:i[e++],eachMeshTextureSet:i[e++],eachMeshMaterialAttributes:i[e++],eachEntityId:i[e++],eachEntityMeshesPortion:i[e++],eachTileAABB:i[e++],eachTileEntitiesPortion:i[e++]}}function uTt(i){function e(t,o){return t.length===0?[]:Du.inflate(t,o).buffer}return{metadata:JSON.parse(Du.inflate(i.metadata,{to:"string"})),textureData:new Uint8Array(e(i.textureData)),eachTextureDataPortion:new Uint32Array(e(i.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(i.eachTextureAttributes)),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),uvs:new Float32Array(e(i.uvs)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),eachTextureSetTextures:new Int32Array(e(i.eachTextureSetTextures)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryAxisLabel:JSON.parse(Du.inflate(i.eachGeometryAxisLabel,{to:"string"})),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(i.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(i.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(i.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(Du.inflate(i.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const hTt=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();(function(){const i=document.createElement("canvas"),e=i.getContext("2d");return function(t){return i.width=t.width,i.height=t.height,e.putImageData(t,0,0),i.toDataURL()}})();function SW(i,e,t,o,n,r){const a=r.getNextId(),s=t.metadata,l=t.textureData,c=t.eachTextureDataPortion,d=t.eachTextureAttributes,u=t.positions,h=t.normals,p=t.colors,A=t.uvs,f=t.indices,m=t.edgeIndices,g=t.eachTextureSetTextures,y=t.matrices,v=t.reusedGeometriesDecodeMatrix,w=t.eachGeometryPrimitiveType,x=t.eachGeometryAxisLabel,k=t.eachGeometryPositionsPortion,B=t.eachGeometryNormalsPortion,E=t.eachGeometryColorsPortion,P=t.eachGeometryUVsPortion,R=t.eachGeometryIndicesPortion,T=t.eachGeometryEdgeIndicesPortion,L=t.eachMeshGeometriesPortion,F=t.eachMeshMatricesPortion,U=t.eachMeshTextureSet,q=t.eachMeshMaterialAttributes,V=t.eachEntityId,W=t.eachEntityMeshesPortion,Y=t.eachTileAABB,$=t.eachTileEntitiesPortion,me=c.length,Ie=g.length/5,Se=k.length,qe=L.length,Qe=W.length,Ce=$.length;n&&n.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let we=0;we<me;we++){const Le=we===me-1,We=c[we],H=Le?l.length:c[we+1],ee=H-We>0,ae=we*lTt,Be=d[ae+0]===1,pe=d[ae+1];d[ae+2],d[ae+3];const Q=d[ae+4],Z=d[ae+5],ie=d[ae+6],re=d[ae+7],ne=d[ae+8];if(ee){const G=new Uint8Array(l.subarray(We,H)).buffer,K=`${a}-texture-${we}`;if(Be)o.createTexture({id:K,buffers:[G],minFilter:Q,magFilter:Z,wrapS:ie,wrapT:re,wrapR:ne});else{const ue=pe===j8?"image/jpeg":pe===V8?"image/png":"image/gif",xe=new Blob([G],{type:ue}),oe=(window.URL||window.webkitURL).createObjectURL(xe),Me=document.createElement("img");Me.src=oe,o.createTexture({id:K,image:Me,minFilter:Q,magFilter:Z,wrapS:ie,wrapT:re,wrapR:ne})}}}for(let we=0;we<Ie;we++){const Le=we*5,We=`${a}-textureSet-${we}`,H=g[Le+0],ee=g[Le+1],ae=g[Le+2],Be=g[Le+3],pe=g[Le+4];o.createTextureSet({id:We,colorTextureId:H>=0?`${a}-texture-${H}`:null,normalsTextureId:ae>=0?`${a}-texture-${ae}`:null,metallicRoughnessTextureId:ee>=0?`${a}-texture-${ee}`:null,emissiveTextureId:Be>=0?`${a}-texture-${Be}`:null,occlusionTextureId:pe>=0?`${a}-texture-${pe}`:null})}const De=new Uint32Array(Se);for(let we=0;we<qe;we++){const Le=L[we];De[Le]!==void 0?De[Le]++:De[Le]=1}const Fe=C.vec3(),ve=C.AABB3(),ge={};for(let we=0;we<Ce;we++){const Le=Ce-1,We=we===Le,H=$[we],ee=We?Qe-1:$[we+1]-1,ae=we*6,Be=Y.subarray(ae,ae+6);C.getAABB3Center(Be,Fe),ve[0]=Be[0]-Fe[0],ve[1]=Be[1]-Fe[1],ve[2]=Be[2]-Fe[2],ve[3]=Be[3]-Fe[0],ve[4]=Be[4]-Fe[1],ve[5]=Be[5]-Fe[2];const pe=Jt.createPositionsDecodeMatrix(ve),Q={};for(let Z=H;Z<=ee;Z++){const ie=V[Z],re=e.globalizeObjectIds?C.globalizeObjectId(o.id,ie):ie,ne=Qe-1,G=Z===ne,K=W[Z],ue=G?L.length-1:W[Z+1]-1,xe=[],oe=i.metaScene.metaObjects[re],Me={},je={};if(!(e.includeIdsMap&&ie&&!e.includeIdsMap[ie])){if(oe){if(e.excludeTypesMap&&oe.type&&e.excludeTypesMap[oe.type]||e.includeTypesMap&&oe.type&&!e.includeTypesMap[oe.type]||e.includeIdsMap&&oe.id&&!e.includeIdsMap[oe.id])continue;const he=e.objectDefaults?e.objectDefaults[oe.type]||e.objectDefaults.DEFAULT:null;he&&(he.visible===!1&&(Me.visible=!1),he.pickable===!1&&(Me.pickable=!1),he.colorize&&(je.color=he.colorize),he.opacity!==void 0&&he.opacity!==null&&(je.opacity=he.opacity),he.metallic!==void 0&&he.metallic!==null&&(je.metallic=he.metallic),he.roughness!==void 0&&he.roughness!==null&&(je.roughness=he.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let he=K;he<=ue;he++){const Ne=L[he],Ee=De[Ne]>1,ze=Ne===Se-1,ot=U[he],At=ot>=0?`${a}-textureSet-${ot}`:null,ft=hTt(q.subarray(he*6,he*6+3)),lt=q[he*6+3]/255,ut=q[he*6+4]/255,Te=q[he*6+5]/255,st=r.getNextId();if(Ee){const dt=F[he],Ye=y.slice(dt,dt+16),fe=`${a}-geometry.${we}.${Ne}`;let be=ge[fe];if(!be){be={batchThisMesh:!e.reuseGeometries};const Xe=w[Ne],ht=x[Ne];let St=!1,xt;switch(Xe){case 0:be.primitiveName="solid",be.geometryPositions=u.subarray(k[Ne],ze?u.length:k[Ne+1]),be.geometryNormals=h.subarray(B[Ne],ze?h.length:B[Ne+1]),be.geometryUVs=A.subarray(P[Ne],ze?A.length:P[Ne+1]),be.geometryIndices=f.subarray(R[Ne],ze?f.length:R[Ne+1]),be.geometryEdgeIndices=m.subarray(T[Ne],ze?m.length:T[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 1:be.primitiveName="surface",be.geometryPositions=u.subarray(k[Ne],ze?u.length:k[Ne+1]),be.geometryNormals=h.subarray(B[Ne],ze?h.length:B[Ne+1]),be.geometryUVs=A.subarray(P[Ne],ze?A.length:P[Ne+1]),be.geometryIndices=f.subarray(R[Ne],ze?f.length:R[Ne+1]),be.geometryEdgeIndices=m.subarray(T[Ne],ze?m.length:T[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 2:be.primitiveName="points",be.geometryPositions=u.subarray(k[Ne],ze?u.length:k[Ne+1]),be.geometryColors=p.subarray(E[Ne],ze?p.length:E[Ne+1]),St=be.geometryPositions.length>0;break;case 3:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],ze?u.length:k[Ne+1]),be.geometryIndices=f.subarray(R[Ne],ze?f.length:R[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 4:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],ze?u.length:k[Ne+1]),be.geometryIndices=TW(be.geometryPositions,f.subarray(R[Ne],ze?f.length:R[Ne+1])),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 7:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],ze?u.length:k[Ne+1]),be.decompressedPositions=Jt.decompressPositions(be.geometryPositions,v),xt=yp({origin:be.decompressedPositions,text:ht,size:2}),be.decompressedPositions=xt.positions,be.geometryIndices=xt.indices,be.geometryPositions=null,St=be.decompressedPositions.length>0&&be.geometryIndices.length>0;break;default:continue}if(St||(be=null),be&&(be.geometryPositions&&be.geometryPositions.length>1e3,be.batchThisMesh)){if(Xe===7)be.transformedAndRecompressedPositions=new Uint16Array(be.decompressedPositions.length);else{be.decompressedPositions=new Float32Array(be.geometryPositions.length),be.transformedAndRecompressedPositions=new Uint16Array(be.geometryPositions.length);const fi=be.geometryPositions,ji=be.decompressedPositions;for(let Mo=0,eo=fi.length;Mo<eo;Mo+=3)ji[Mo+0]=fi[Mo+0]*v[0]+v[12],ji[Mo+1]=fi[Mo+1]*v[5]+v[13],ji[Mo+2]=fi[Mo+2]*v[10]+v[14];be.geometryPositions=null}ge[fe]=be}}if(be)if(be.batchThisMesh){const Xe=be.decompressedPositions,ht=be.transformedAndRecompressedPositions;for(let St=0,xt=Xe.length;St<xt;St+=3)Wl[0]=Xe[St+0],Wl[1]=Xe[St+1],Wl[2]=Xe[St+2],Wl[3]=1,C.transformVec4(Ye,Wl,IW),Jt.compressPosition(IW,ve,Wl),ht[St+0]=Wl[0],ht[St+1]=Wl[1],ht[St+2]=Wl[2];o.createMesh(mt.apply(je,{id:st,textureSetId:At,origin:Fe,primitive:be.primitiveName,positionsCompressed:ht,normalsCompressed:be.geometryNormals,uv:be.geometryUVs,colorsCompressed:be.geometryColors,indices:be.geometryIndices,edgeIndices:be.geometryEdgeIndices,positionsDecodeMatrix:pe,color:ft,metallic:ut,roughness:Te,opacity:lt})),xe.push(st)}else{if(!Q[fe]){let Xe={id:fe,primitive:be.primitiveName,normalsCompressed:be.geometryNormals,uv:be.geometryUVs,colorsCompressed:be.geometryColors,indices:be.geometryIndices,edgeIndices:be.geometryEdgeIndices};be.geometryPositions?Xe={...Xe,positionsCompressed:be.geometryPositions,positionsDecodeMatrix:v}:Xe={...Xe,positions:be.decompressedPositions},o.createGeometry(Xe),Q[fe]=!0}o.createMesh(mt.apply(je,{id:st,geometryId:fe,textureSetId:At,matrix:Ye,color:ft,metallic:ut,roughness:Te,opacity:lt,origin:Fe})),xe.push(st)}}else{const dt=w[Ne],Ye=x[Ne];let fe,be,Xe,ht,St,xt,fi,ji=!1,Mo;switch(dt){case 0:fe="solid",be=u.subarray(k[Ne],ze?u.length:k[Ne+1]),Xe=h.subarray(B[Ne],ze?h.length:B[Ne+1]),ht=A.subarray(P[Ne],ze?A.length:P[Ne+1]),xt=f.subarray(R[Ne],ze?f.length:R[Ne+1]),fi=m.subarray(T[Ne],ze?m.length:T[Ne+1]),ji=be.length>0&&xt.length>0;break;case 1:fe="surface",be=u.subarray(k[Ne],ze?u.length:k[Ne+1]),Xe=h.subarray(B[Ne],ze?h.length:B[Ne+1]),ht=A.subarray(P[Ne],ze?A.length:P[Ne+1]),xt=f.subarray(R[Ne],ze?f.length:R[Ne+1]),fi=m.subarray(T[Ne],ze?m.length:T[Ne+1]),ji=be.length>0&&xt.length>0;break;case 2:fe="points",be=u.subarray(k[Ne],ze?u.length:k[Ne+1]),St=p.subarray(E[Ne],ze?p.length:E[Ne+1]),ji=be.length>0;break;case 3:fe="lines",be=u.subarray(k[Ne],ze?u.length:k[Ne+1]),xt=f.subarray(R[Ne],ze?f.length:R[Ne+1]),ji=be.length>0&&xt.length>0;break;case 4:fe="lines",be=u.subarray(k[Ne],ze?u.length:k[Ne+1]),xt=TW(be,f.subarray(R[Ne],ze?f.length:R[Ne+1])),ji=be.length>0&&xt.length>0;break;case 7:fe="lines",be=u.subarray(k[Ne],ze?u.length:k[Ne+1]),be=Jt.decompressPositions(be,pe),Mo=yp({origin:be,text:Ye,size:2}),be=Mo.positions,xt=Mo.indices,ji=be.length>0&&xt.length>0;break;default:continue}if(ji){let eo=mt.apply(je,{id:st,textureSetId:At,origin:Fe,primitive:fe,normalsCompressed:Xe,uv:ht&&ht.length>0?ht:null,colorsCompressed:St,indices:xt,edgeIndices:fi,color:ft,metallic:ut,roughness:Te,opacity:lt});dt!==7?eo={...eo,positionsCompressed:be,positionsDecodeMatrix:pe}:eo={...eo,positions:be},o.createMesh(eo),xe.push(st)}}}xe.length>0&&o.createEntity(mt.apply(Me,{id:re,isObject:!0,meshIds:xe}))}}}}function TW(i,e){const t=[];if(e.length>1)for(let o=0,n=e.length-1;o<n;o++)t.push(e[o]),t.push(e[o+1]);else if(i.length>1)for(let o=0,n=i.length/3-1;o<n;o++)t.push(o),t.push(o+1);return t}const RW={version:12,parseArrayBuffer:function(i,e,t,o,n,r){const a=cTt(t);SW(i,e,a,o,n,r)},parse:function(i,e,t,o,n,r){const a=dTt(t),s=uTt(a);SW(i,e,s,o,n,r)}},gn={};gn[dW.version]=dW,gn[uW.version]=uW,gn[hW.version]=hW,gn[pW.version]=pW,gn[fW.version]=fW,gn[AW.version]=AW,gn[mW.version]=mW,gn[bW.version]=bW,gn[CW.version]=CW,gn[MW.version]=MW,gn[PW.version]=PW,gn[RW.version]=RW;class n7 extends va{constructor(e,t={}){super("XKTLoader",e,t),this._maxGeometryBatchSize=t.maxGeometryBatchSize,this.textureTranscoder=t.textureTranscoder,this.dataSource=t.dataSource,this.objectDefaults=t.objectDefaults,this.includeTypes=t.includeTypes,this.excludeTypes=t.excludeTypes,this.excludeUnclassifiedObjects=t.excludeUnclassifiedObjects,this.reuseGeometries=t.reuseGeometries}get supportedVersions(){return Object.keys(gn)}get textureTranscoder(){return this._textureTranscoder}set textureTranscoder(e){this._textureTranscoder=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource=e||new sW}get objectDefaults(){return this._objectDefaults}set objectDefaults(e){this._objectDefaults=e||rW}get includeTypes(){return this._includeTypes}set includeTypes(e){this._includeTypes=e}get excludeTypes(){return this._excludeTypes}set excludeTypes(e){this._excludeTypes=e}get includeIds(){return this._includeIds}set includeIds(e){this._includeIds=e}get excludeUnclassifiedObjects(){return this._excludeUnclassifiedObjects}set excludeUnclassifiedObjects(e){this._excludeUnclassifiedObjects=!!e}get globalizeObjectIds(){return this._globalizeObjectIds}set globalizeObjectIds(e){this._globalizeObjectIds=!!e}get reuseGeometries(){return this._reuseGeometries}set reuseGeometries(e){this._reuseGeometries=e!==!1}load(e={}){if(e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id),!e.src&&!e.xkt&&!e.manifestSrc&&!e.manifest)throw new Error("XKTLoaderPlugin: load() param expected: src, xkt, manifestSrc or manifestData");const t={},o=e.includeTypes||this._includeTypes,n=e.excludeTypes||this._excludeTypes,r=e.includeIds||this._includeIds,a=e.objectDefaults||this._objectDefaults;if(t.reuseGeometries=e.reuseGeometries!==null&&e.reuseGeometries!==void 0?e.reuseGeometries:this._reuseGeometries!==!1,o){t.includeTypesMap={};for(let A=0,f=o.length;A<f;A++)t.includeTypesMap[o[A]]=!0}if(n){t.excludeTypesMap={};for(let A=0,f=n.length;A<f;A++)t.excludeTypesMap[n[A]]=!0}if(r){t.includeIdsMap={};for(let A=0,f=r.length;A<f;A++)t.includeIdsMap[r[A]]=!0}a&&(t.objectDefaults=a),t.excludeUnclassifiedObjects=e.excludeUnclassifiedObjects!==void 0?!!e.excludeUnclassifiedObjects:this._excludeUnclassifiedObjects,t.globalizeObjectIds=e.globalizeObjectIds!==void 0&&e.globalizeObjectIds!==null?!!e.globalizeObjectIds:this._globalizeObjectIds;const s=new gv(this.viewer.scene,mt.apply(e,{isModel:!0,textureTranscoder:this._textureTranscoder,maxGeometryBatchSize:this._maxGeometryBatchSize,origin:e.origin,disableVertexWelding:e.disableVertexWelding||!1,disableIndexRebucketing:e.disableIndexRebucketing||!1,dtxEnabled:e.dtxEnabled,renderOrder:e.renderOrder})),l=s.id,c=new sJ({metaScene:this.viewer.metaScene,id:l});this.viewer.scene.canvas.spinner.processes++;const d=()=>{s.destroyed||(s.finalize(),c.finalize(),this.viewer.scene.canvas.spinner.processes--,s.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(c.id)}),this.scheduleTask(()=>{s.destroyed||(s.scene.fire("modelLoaded",s.id),s.fire("loaded",!0,!1))}))},u=A=>{this.viewer.scene.canvas.spinner.processes--,this.error(A),s.fire("error",A)};let h=0;const p={getNextId:()=>`${l}.${h++}`};if(e.metaModelSrc||e.metaModelData)if(e.metaModelSrc){const A=e.metaModelSrc;this._dataSource.getMetaModel(A,f=>{s.destroyed||(c.loadData(f,{includeTypes:o,excludeTypes:n,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,t,s,null,p,d,u):(this._parseModel(e.xkt,t,s,null,p),d()))},f=>{u(`load(): Failed to load model metadata for model '${l} from '${A}' - ${f}`)})}else e.metaModelData&&(c.loadData(e.metaModelData,{includeTypes:o,excludeTypes:n,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,t,s,null,p,d,u):(this._parseModel(e.xkt,t,s,null,p),d()));else if(e.src)this._loadModel(e.src,t,s,c,p,d,u);else if(e.xkt)this._parseModel(e.xkt,t,s,c,p),d();else if(e.manifestSrc||e.manifest){const A=e.manifestSrc?pTt(e.manifestSrc):"",f=(y,v,w)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getMetaModel(`${A}${y[x]}`,B=>{c.loadData(B,{includeTypes:o,excludeTypes:n,globalizeObjectIds:t.globalizeObjectIds}),x++,this.scheduleTask(k,200)},w)};k()},m=(y,v,w)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getXKT(`${A}${y[x]}`,B=>{this._parseModel(B,t,s,null,p),s.preFinalize(),x++,this.scheduleTask(k,200)},w)};k()},g=(y,v,w)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getXKT(`${A}${y[x]}`,B=>{this._parseModel(B,t,s,c,p),s.preFinalize(),x++,this.scheduleTask(k,200)},w)};k()};if(e.manifest){const y=e.manifest,v=y.xktFiles;if(!v||v.length===0){u("load(): Failed to load model manifest - manifest not valid");return}const w=y.metaModelFiles;w?f(w,()=>{m(v,d,u)},u):g(v,d,u)}else this._dataSource.getManifest(e.manifestSrc,y=>{if(s.destroyed)return;const v=y.xktFiles;if(!v||v.length===0){u("load(): Failed to load model manifest - manifest not valid");return}const w=y.metaModelFiles;w?f(w,()=>{m(v,d,u)},u):g(v,d,u)},u)}return s}_loadModel(e,t,o,n,r,a,s){this._dataSource.getXKT(e,l=>{this._parseModel(l,t,o,n,r),o.preFinalize(),a()},s)}async _parseModel(e,t,o,n,r){if(o.destroyed)return;const a=new DataView(e),s=new Uint8Array(e),l=a.getUint32(0,!0),c=l&2147483647,d=c<11||c>=12&&l>>>31,u=gn[c];if(!u){this.error("Unsupported .XKT file version: "+c+" - this XKTLoaderPlugin supports versions "+Object.keys(gn));return}if(!d){u.parseArrayBuffer(this.viewer,t,e,o,n,r);return}const h=a.getUint32(4,!0),p=[];let A=(h+2)*4;for(let f=0;f<h;f++){const m=a.getUint32((f+2)*4,!0);p.push(s.subarray(A,A+m)),A+=m}u.parse(this.viewer,t,p,o,n,r)}}function pTt(i){i.indexOf("?")>-1&&(i=i.split("?")[0]);const e=i.split("/");return e.pop(),e.join("/")+"/"}let fTt=1;class uL{constructor(e,t,o=null){this.tileset=e,this.computePriority=e.plugin.computePriority,this.distanceFactorToFreeData=e.plugin.distanceFactorToFreeData,this.src=t.content?.uri??null;const n=this.src?new URL(this.src).pathname:null;this.name=`${e.name}_${n?n.substring(n.lastIndexOf("/")+1):`tileWithNoContent_${fTt++}`}`,this.parent=o,this.refine=t.refine,this.data=null,this.fetching=null,this.depth=o?o.depth+1:1,this.model=null,this.loadProcess=null,this.loading=!1,this.currentDistanceFromCamera=null,this._visible=!o,this.priority=1,this.geometricError=t.geometricError;const[r,a,s,l,c,d,u,h,p,A,f,m]=t.boundingVolume.box,g=[r,s,-a];e.rootTransform&&(g[0]+=e.rootTransform[12],g[1]+=e.rootTransform[14],g[2]-=e.rootTransform[13]),this.center=Object.freeze(g);const y=[l,c,d],v=[-u,-h,-p],w=[A,f,m];this.xSize=C.lenVec3(y),this.ySize=C.lenVec3(w),this.zSize=C.lenVec3(v),this.volume=this.xSize*2*this.ySize*2*this.zSize*2,this.children=t.children?.map(x=>new uL(e,x,this))??[],e.tiles.add(this)}get visible(){return this._visible}set visible(e){this._visible!==e&&(this._visible=e,e?this.tileset.visibleTiles.add(this):this.tileset.visibleTiles.delete(this))}get loaded(){return!!this.model}get viewDistance(){return this.tileset.sensitivity*this.geometricError}get isWithinCameraVisibleRange(){return this.currentDistanceFromCamera<=this.viewDistance}updateVisibility(e){this.currentDistanceFromCamera=C.distVec3(this.center,e),this.parent&&(this.visible=this.isWithinCameraVisibleRange,this.currentDistanceFromCamera>this.viewDistance*this.distanceFactorToFreeData&&(this.data=null)),this.visible&&this.children.forEach(t=>t.updateVisibility(e)),this.priority=this.computePriority(this)}fetchData(){return this.data?this.data:this.src?(this.fetching||(this.fetching=new Promise((e,t)=>{fetch(this.src).then(o=>{o.ok?o.arrayBuffer().then(n=>{this.data=n,this.fetching=null,e(this.data)}):t(o)})})),this.fetching):null}showBoundingBox(){const{viewer:e}=this.tileset.plugin,{xSize:t,ySize:o,zSize:n,center:r}=this,a=1/this.depth;this.boxLines=new pi(e.scene,{geometry:new uo(e.scene,kM({center:r,xSize:t,ySize:o,zSize:n})),material:new ho(e.scene,{emissive:[1-a,a,(1-a)/2]})})}async load(){if(this.loading)return this.loadProcess;if(this.loaded)return this.model;if(this.loading=!0,!this.data)try{await this.fetchData()}catch(e){return console.warn(`[Xeokit - TilesetLoaderPlugin] Impossible to fetch data of tile "${this.name}".`,e),this.loading=!1,null}if(!this.visible)return this.loading=!1,null;this.tileset.plugin.debugMode&&this.showBoundingBox();try{const e=new Promise(t=>{const o=this.tileset.plugin.loader.load({id:this.name,xkt:this.data,metaModelData:{metaObjects:[{id:"metaModelRoot"}]}});o.once("loaded",()=>{this.loading=!1,this.loadProcess=null,this.model=o,this.tileset.destroyed||!this.visible?(this.unload(),t(null)):(this.tileset.loadedTiles.add(this),t(o))}),o.once("destroyed",()=>{this.loading=!1,this.loadProcess=null,t(null)})});return this.loadProcess=e,this.loadProcess}catch(e){return console.warn(`[Xeokit - TilesetLoaderPlugin] Impossible to load tile "${this.name}".`,e),null}}unload(){this.boxLines&&(this.boxLines.destroy(),this.boxLines=null),this.model&&(this.model.destroy(),this.model=null),this.tileset.loadedTiles.delete(this),this.children.forEach(e=>{e.loaded&&e.unload()})}}function ATt(i,e,t){const o=Array.from(i),n=o.splice(0,e),r=async a=>{if(await t(a),o.length>0){const s=o.shift();r(s)}};n.forEach(r)}function gTt(i){let e=!1;return{cancel(){e=!0},async run(t){for(let o of i){if(e)break;await new Promise(n=>setTimeout(()=>(t(o)||Promise.resolve()).then(n)))}}}}let mTt=0;class vTt{constructor(e,t){this.plugin=e,this.name=t.name||`tileset-${mTt++}`,this.tiles=new Set,this.visibleTiles=new Set,this.loadedTiles=new Set,this.queue=null,this.renderNeeded=!0,this.destroyed=!1,this._sensitivity=e.sensitivity,t.root.transform&&(this.rootTransform=t.root.transform),this.root=new uL(this,t.root),this.root.load().then(o=>e.viewer.cameraFlight.flyTo(o))}get sensitivity(){return this._sensitivity}set sensitivity(e){this._sensitivity=e,this.updateVisibility()}updateVisibility(){this.tiles.forEach(e=>{e!==this.root&&(e.visible=!1)}),this.root.updateVisibility(this.plugin.viewer.camera.eye),this.renderNeeded=!0}render(){if(!this.renderNeeded)return;this.queue&&this.queue.cancel(),this.loadedTiles.forEach(t=>{t.visible||t.unload()});const e=Array.from(this.visibleTiles).filter(t=>!t.loaded).sort((t,o)=>t.priority-o.priority);ATt(e,40,t=>t.fetchData()),this.queue=gTt(e),this.queue.run(t=>t.load()),this.renderNeeded=!1}destroy(){this.queue&&this.queue.cancel(),this.loadedTiles.forEach(e=>e.unload()),this.destroyed=!0,this.plugin.tilesets.delete(this)}}function yTt(i){return i.depth}class LW extends va{constructor(e,t={}){super("TilesetLoader",e);const{computePriority:o=yTt,sensitivity:n=50,distanceFactorToFreeData:r=3,debugMode:a=!1}=t;this._sensitivity=n,this.distanceFactorToFreeData=r,this.computePriority=o,this.debugMode=a,this.tilesets=new Set,e.camera.on("matrix",this.updateTilesetsVisibilityCallback=()=>this.updateTilesetsVisibility()),e.scene.on("tick",this.renderTilesetsCallback=()=>this.renderTilesets()),this.loader=new n7(e)}load(e){const t=new vTt(this,e);return this.tilesets.add(t),t}updateTilesetsVisibility(){this.tilesets.forEach(e=>e.updateVisibility())}renderTilesets(){this.tilesets.forEach(e=>e.render())}get sensitivity(){return this._sensitivity}set sensitivity(e){this._sensitivity=e,this.tilesets.forEach(t=>t.sensitivity=this._sensitivity)}destroy(){this.viewer.camera.off(this.updateTilesetsVisibilityCallback),this.viewer.scene.off(this.renderTilesetsCallback),this.tilesets.forEach(e=>e.destroy()),super.destroy()}}const bTt="2.6.90";typeof window<"u"&&(window.__XEOKIT__?console.warn("WARNING: Multiple instances of xeokit-sdk being imported."):window.__XEOKIT__=bTt);const Yl=Object.freeze(Object.defineProperty({__proto__:null,AlphaFormat:fQ,AmbientLight:PB,AngleMeasurementEditMouseControl:JCt,AngleMeasurementEditTouchControl:ZCt,AngleMeasurementsControl:iE,AngleMeasurementsMouseControl:mJ,AngleMeasurementsPlugin:Py,AngleMeasurementsTouchControl:KCt,AnnotationsPlugin:rE,AxisGizmoPlugin:ext,BCFViewpointsPlugin:Dy,Bitmap:ZQ,ByteType:rQ,CameraMemento:Nbt,CameraPath:u6t,CameraPathAnimation:xr,ClampToEdgeWrapping:Qr,Component:ni,CompressedMediaType:_6t,Configs:Z8,ContextMenu:P5t,CubicBezierCurve:Hbt,Curve:qm,DefaultLoadingManager:tK,DepthFormat:vQ,DepthStencilFormat:yQ,DirLight:Wa,DistanceMeasurementEditControl:aE,DistanceMeasurementEditMouseControl:lxt,DistanceMeasurementEditTouchControl:cxt,DistanceMeasurementsControl:nE,DistanceMeasurementsMouseControl:CJ,DistanceMeasurementsPlugin:xJ,DistanceMeasurementsTouchControl:sxt,EdgeMaterial:eB,EmphasisMaterial:Ul,FastNavPlugin:EJ,FloatType:cQ,Fresnel:P8t,Frustum:Jn,FrustumPlane:mu,GIFMediaType:D6t,GLTFDefaultDataSource:PJ,GLTFLoaderPlugin:KE,HalfFloatType:dQ,ImagePlane:b8t,IntType:sQ,JPEGMediaType:j8,KTX2TextureTranscoder:ls,LOD:wK,LambertMaterial:w8t,LightMap:Obt,LineSet:AK,LinearEncoding:Tn,LinearFilter:Gr,LinearMipMapLinearFilter:wp,LinearMipMapNearestFilter:Jm,LinearMipmapLinearFilter:Cu,LinearMipmapNearestFilter:L6t,Loader:iK,LoadingManager:eK,LocaleService:Uq,LuminanceAlphaFormat:mQ,LuminanceFormat:gQ,Map:ma,Marker:vv,MarqueePicker:tl,MarqueePickerMouseControl:d6t,Mesh:pi,MeshSurfaceArea:eG,MeshVolume:YQ,MetallicMaterial:k8t,MirroredRepeatWrapping:Dl,ModelMemento:jbt,NavCubePlugin:JE,NearestFilter:wu,NearestMipMapLinearFilter:bp,NearestMipMapNearestFilter:Km,NearestMipmapLinearFilter:oQ,NearestMipmapNearestFilter:iQ,Node:Gm,ObjectsKdTree3:R5t,ObjectsMemento:Vbt,PNGMediaType:V8,Path:zbt,PerformanceModel:Qbt,PhongMaterial:ho,PickResult:hy,Plugin:va,PointLight:Dbt,PointerCircle:mM,PointerLens:I5t,QuadraticBezierCurve:qbt,Queue:Pq,RGBAFormat:Zm,RGBAIntegerFormat:kQ,RGBA_ASTC_10x10_Format:VM,RGBA_ASTC_10x5_Format:UM,RGBA_ASTC_10x6_Format:NM,RGBA_ASTC_10x8_Format:jM,RGBA_ASTC_12x10_Format:HM,RGBA_ASTC_12x12_Format:zM,RGBA_ASTC_4x4_Format:U8,RGBA_ASTC_5x4_Format:TM,RGBA_ASTC_5x5_Format:RM,RGBA_ASTC_6x5_Format:LM,RGBA_ASTC_6x6_Format:DM,RGBA_ASTC_8x5_Format:_M,RGBA_ASTC_8x6_Format:FM,RGBA_ASTC_8x8_Format:OM,RGBA_BPTC_Format:N8,RGBA_ETC2_EAC_Format:O8,RGBA_PVRTC_2BPPV1_Format:IM,RGBA_PVRTC_4BPPV1_Format:_8,RGBA_S3TC_DXT1_Format:R8,RGBA_S3TC_DXT3_Format:L8,RGBA_S3TC_DXT5_Format:Ym,RGBFormat:AQ,RGB_ETC1_Format:SM,RGB_ETC2_Format:F8,RGB_PVRTC_2BPPV1_Format:PM,RGB_PVRTC_4BPPV1_Format:D8,RGB_S3TC_DXT1_Format:Wm,RGFormat:CQ,RGIntegerFormat:xQ,ReadableGeometry:uo,RedFormat:bQ,RedIntegerFormat:wQ,ReflectionMap:Fbt,RepeatWrapping:mo,SceneModel:gv,SceneModelMesh:iG,SceneModelTransform:lK,SectionPlane:RB,SectionPlanesPlugin:pSt,ShortType:nQ,SpecularMaterial:E8t,SplineCurve:B8,SpriteMarker:Ubt,Texture:Cp,TextureTranscoder:Jbt,TilesetLoaderPlugin:LW,UnsignedByteType:EM,UnsignedInt248Type:pQ,UnsignedIntType:lQ,UnsignedShort4444Type:uQ,UnsignedShort5551Type:hQ,UnsignedShortType:aQ,VBOGeometry:Qq,VFC:DK,Viewer:gJ,WorkerPool:rK,XKTDefaultDataSource:sW,XKTLoaderPlugin:n7,buildBoxGeometry:xM,buildBoxLinesGeometry:kM,buildBoxLinesGeometryFromAABB:P6t,buildCylinderGeometry:mp,buildGridGeometry:Gq,buildLineGeometry:Jq,buildPlaneGeometry:MM,buildPolylineGeometry:Kq,buildPolylineGeometryFromCurve:S6t,buildSphereGeometry:vp,buildTorusGeometry:BM,buildVectorTextGeometry:yp,createCombinedTexture:zCt,createRTCViewMat:_i,createSkyboxMesh:qCt,createSphereMapMesh:QCt,frustumIntersectsAABB3:M8,getKTX2TextureTranscoder:nK,getPlaneRTCPos:jo,isTriangleMeshSolid:WQ,load3DSGeometry:B6t,loadOBJGeometry:E6t,math:C,meshSurfaceArea:tv,meshVolume:kp,os:OB,rtcToWorldPos:R6t,sRGBEncoding:ao,setFrustum:Oq,stats:Mi,utils:mt,worldToRTCPos:bu,worldToRTCPositions:T8},Symbol.toStringTag,{value:"Module"}));function Xp(i){let e=i.substring(1);const t=[];let o=null;for(;e.length>0;)o=e.substring(0,2),e=e.substring(2),t.push(parseInt(o,16)/255);return t}function DW(i){let e="";return e+=Math.round(i[0]*255).toString(16).padStart(2,"0"),e+=Math.round(i[1]*255).toString(16).padStart(2,"0"),e+=Math.round(i[2]*255).toString(16).padStart(2,"0"),`#${e}`}const wTt={class:"annotations-3d"},CTt={__name:"Annotations3D",setup(i){const e=ct("$viewer"),{localContext:t}=e,{xeokit:o}=t.viewer,n=o.scene.canvas.canvas,r=pM(),a=Er(new WeakSet),s=Re(()=>r.value.filter(u=>a.has(u))),l=new Map;pt(r,()=>{r.value.forEach(u=>{if(!l.has(u.id)){const{x:h,y:p,z:A}=u,f=new vv(o.scene,{worldPos:[h,A,p]});l.set(u.id,f);const[m,g]=f.canvasPos;f.style=le(`left: ${m}px; top: ${g}px;`),f.on("canvasPos",([w,x])=>{f.style.value=`left: ${w}px; top: ${x}px;`}),f.on("visible",w=>w?a.add(u):a.delete(u)),f.on("destroyed",()=>{e.state.hub.off(v),e.state.hub.off(y)});const y=e.state.hub.on("annotation-updated",({annotation:w})=>{if(w.id===u.id){const{x,y:k,z:B}=w;f.worldPos=[x,B,k],f._update(),o.scene._renderer._occlusionTester._occlusionTestListDirty=!0}}),v=e.state.hub.on("annotation-removed",({annotation:w})=>{w.id===u.id&&(l.delete(u.id),f.destroy())})}})},{flush:"sync"});const c=(u,h)=>{const{clientX:p,clientY:A}=h,{x:f,y:m}=n.getBoundingClientRect(),g=o.scene.pick({pickSurface:!0,canvasPos:[p-f,A-m]});if(g){const[y,v,w]=g.worldPos;Object.assign(u,{x:y,y:w,z:v})}},d=u=>l.get(u.id).style.value;return(u,h)=>(M(),_("div",wTt,[(M(!0),_($e,null,Bt(s.value,p=>(M(),J(fM,{key:p.instanceId,annotation:p,canvas:rt(n),style:de(d(p)),onAnnotationDrag:A=>c(p,A)},null,8,["annotation","canvas","style","onAnnotationDrag"]))),128))]))}},_W=j(CTt,[["__scopeId","data-v-10ceb001"]]),xTt={setup(){const i=ct("$viewer"),e=i.localContext.pluginComponentInstances.get("viewer3d"),{math:t}=e.xeokitSdk,o=()=>{const r=e.xeokit,a=[0,0,-1],s=r.scene.aabb,l=t.getAABB3Diag(s),c=t.vec3();t.getAABB3Center(s,c);const d=45,u=Math.abs(l/Math.tan(d*t.DEGTORAD));r.cameraControl.pivotPos=c,r.cameraFlight.jumpTo({look:c,eye:[c[0]-u*a[0],c[1]-u*a[1],c[2]-u*a[2]],up:[0,1,0],orthoScale:l*1.1,fitFOV:d})},n=()=>{const r=i.localContext.loadedModels.flatMap(a=>a.objects.filter(s=>s.visible===!1).map(s=>s.id));i.state.showObjects(r)};return{onClick:()=>{o(),n(),e.reintegrateObjects()}}}};function kTt(i,e,t,o,n,r){const a=I("BIMDataIconHome"),s=I("BIMDataButton");return M(),J(s,{color:"default",ghost:"",rounded:"",icon:"",onClick:o.onClick},{default:N(()=>[S(a,{size:"xs"})]),_:1},8,["onClick"])}const MTt=j(xTt,[["render",kTt]]),BTt={computed:{active(){return this.$viewer.localContext.pluginComponentInstances.has("navigationVersionsModel")?this.$viewer.localContext.pluginComponentInstances.get("navigationVersionsModel").isOpen.value:!1}},methods:{onClick(){this.$viewer.localContext.pluginComponentInstances.get("navigationVersionsModel").toggle()}}};function ETt(i,e,t,o,n,r){const a=I("BIMDataIcon"),s=I("BIMDataButton"),l=I("BIMDataTooltip");return M(),J(l,{text:i.$t("navigationVersionsModel.tooltip")},{default:N(()=>[S(s,{class:ce(["bimdata-navigation-versions-model",{active:r.active}]),color:"primary",ghost:"",rounded:"",icon:"",onClick:r.onClick},{default:N(()=>[S(a,{name:"versioning",fill:"",color:"primary",size:"xxs"})]),_:1},8,["class","onClick"])]),_:1},8,["text"])}const PTt=j(BTt,[["render",ETt],["__scopeId","data-v-ced27a96"]]),ITt={key:0,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},STt={key:1,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},TTt={__name:"KeyboardNavigate",setup(i){const e=ct("$viewer").i18n.locale==="fr";return(t,o)=>e?(M(),_("svg",ITt,[...o[0]||(o[0]=[rn('<path d="M79 0L87 11H71L79 0Z" fill="#2F374A"></path><path d="M159 79.1111L148 87.1111L148 71.1111L159 79.1111Z" fill="#2F374A"></path><path d="M9.5399e-08 79.1111L11 71.1111L11 87.1111L9.5399e-08 79.1111Z" fill="#2F374A"></path><path d="M79 115.222L71 104.222L87 104.222L79 115.222Z" fill="#2F374A"></path><rect x="61.3333" y="18" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M82.5998 38.834V40H76.6759V38.834H82.5998ZM82.465 32.377L77.2209 40H76.2365V39.0684L81.4982 31.4688H82.465V32.377ZM81.9201 31.4688V32.6406H76.2716V31.4688H81.9201Z" fill="#6B6B6B"></path><rect x="104.667" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M122.148 83.1111H120.326L120.338 81.9451H122.148C122.676 81.9451 123.117 81.8298 123.473 81.5994C123.832 81.3689 124.101 81.0388 124.281 80.6091C124.465 80.1794 124.557 79.6677 124.557 79.074V78.6111C124.557 78.1501 124.504 77.7419 124.398 77.3865C124.297 77.031 124.144 76.7322 123.941 76.49C123.742 76.2478 123.496 76.0642 123.203 75.9392C122.914 75.8142 122.58 75.7517 122.201 75.7517H120.291V74.5798H122.201C122.767 74.5798 123.285 74.6755 123.754 74.8669C124.223 75.0544 124.627 75.3259 124.967 75.6814C125.31 76.0369 125.574 76.4626 125.758 76.9587C125.941 77.4548 126.033 78.0095 126.033 78.6228V79.074C126.033 79.6873 125.941 80.2419 125.758 80.738C125.574 81.2341 125.31 81.6599 124.967 82.0154C124.623 82.3669 124.213 82.6384 123.736 82.8298C123.264 83.0173 122.734 83.1111 122.148 83.1111ZM121.141 74.5798V83.1111H119.67V74.5798H121.141Z" fill="#6B6B6B"></path><rect x="18" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M37.3036 81.9744L39.5478 83.7556L38.5927 84.5935L36.3896 82.8298L37.3036 81.9744ZM39.5653 78.6111V79.0798C39.5653 79.7244 39.4814 80.3025 39.3134 80.8142C39.1454 81.3259 38.9052 81.7615 38.5927 82.1208C38.2802 82.4802 37.9071 82.7556 37.4735 82.947C37.04 83.1345 36.5595 83.2283 36.0321 83.2283C35.5087 83.2283 35.0302 83.1345 34.5966 82.947C34.1669 82.7556 33.7939 82.4802 33.4775 82.1208C33.161 81.7615 32.915 81.3259 32.7392 80.8142C32.5673 80.3025 32.4814 79.7244 32.4814 79.0798V78.6111C32.4814 77.9666 32.5673 77.3904 32.7392 76.8826C32.911 76.3708 33.1532 75.9353 33.4657 75.5759C33.7821 75.2126 34.1552 74.9373 34.5849 74.7498C35.0185 74.5583 35.497 74.4626 36.0204 74.4626C36.5478 74.4626 37.0282 74.5583 37.4618 74.7498C37.8993 74.9373 38.2743 75.2126 38.5868 75.5759C38.8993 75.9353 39.1396 76.3708 39.3075 76.8826C39.4794 77.3904 39.5653 77.9666 39.5653 78.6111ZM38.0888 79.0798V78.5994C38.0888 78.1228 38.0419 77.7029 37.9482 77.3396C37.8583 76.9724 37.7235 76.6658 37.5439 76.4197C37.3681 76.1697 37.1513 75.9822 36.8935 75.8572C36.6396 75.7283 36.3485 75.6638 36.0204 75.6638C35.7001 75.6638 35.413 75.7283 35.1591 75.8572C34.9052 75.9822 34.6884 76.1697 34.5087 76.4197C34.329 76.6658 34.1923 76.9724 34.0985 77.3396C34.0048 77.7029 33.9579 78.1228 33.9579 78.5994V79.0798C33.9579 79.5564 34.0048 79.9783 34.0985 80.3455C34.1923 80.7126 34.329 81.0232 34.5087 81.2771C34.6923 81.5271 34.911 81.7166 35.165 81.8455C35.4228 81.9705 35.7118 82.033 36.0321 82.033C36.3603 82.033 36.6513 81.9705 36.9052 81.8455C37.1591 81.7166 37.3739 81.5271 37.5497 81.2771C37.7255 81.0232 37.8583 80.7126 37.9482 80.3455C38.0419 79.9783 38.0888 79.5564 38.0888 79.0798Z" fill="#6B6B6B"></path><rect x="61.3333" y="61.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M81.1115 81.025C81.1115 80.8492 81.0841 80.693 81.0295 80.5563C80.9787 80.4196 80.8869 80.2946 80.7541 80.1813C80.6213 80.068 80.4338 79.9586 80.1916 79.8531C79.9533 79.7438 79.6486 79.6324 79.2775 79.5192C78.8713 79.3942 78.4963 79.2555 78.1525 79.1031C77.8127 78.9469 77.5158 78.7672 77.2619 78.5641C77.008 78.3571 76.8107 78.1207 76.6701 77.8551C76.5295 77.5856 76.4591 77.275 76.4591 76.9235C76.4591 76.5758 76.5314 76.2594 76.6759 75.9742C76.8244 75.6891 77.0334 75.443 77.3029 75.236C77.5763 75.025 77.8986 74.8629 78.2697 74.7496C78.6408 74.6324 79.0509 74.5739 79.5002 74.5739C80.133 74.5739 80.6779 74.691 81.1349 74.9254C81.5959 75.1598 81.9494 75.4742 82.1955 75.8688C82.4455 76.2633 82.5705 76.6989 82.5705 77.1754H81.1115C81.1115 76.8942 81.0509 76.6461 80.9298 76.4313C80.8127 76.2125 80.633 76.0406 80.3908 75.9156C80.1525 75.7906 79.8498 75.7281 79.4826 75.7281C79.1349 75.7281 78.8459 75.7809 78.6154 75.8864C78.3849 75.9918 78.213 76.1344 78.0998 76.3141C77.9865 76.4938 77.9298 76.6969 77.9298 76.9235C77.9298 77.0836 77.967 77.2301 78.0412 77.3629C78.1154 77.4918 78.2287 77.6129 78.381 77.7262C78.5334 77.8356 78.7248 77.9391 78.9552 78.0367C79.1857 78.1344 79.4572 78.2281 79.7697 78.318C80.2423 78.4586 80.6545 78.6149 81.006 78.7867C81.3576 78.9547 81.6505 79.1461 81.8849 79.361C82.1193 79.5758 82.2951 79.8199 82.4123 80.0934C82.5295 80.3629 82.588 80.6696 82.588 81.0133C82.588 81.3727 82.5158 81.6969 82.3713 81.986C82.2267 82.2711 82.0197 82.5153 81.7502 82.7184C81.4845 82.9176 81.1642 83.0719 80.7892 83.1813C80.4181 83.2867 80.0041 83.3395 79.547 83.3395C79.1369 83.3395 78.7326 83.2848 78.3341 83.1754C77.9396 83.066 77.5802 82.9 77.256 82.6774C76.9318 82.4508 76.674 82.1696 76.4826 81.8336C76.2912 81.4938 76.1955 81.0973 76.1955 80.6442H77.6662C77.6662 80.9215 77.713 81.1578 77.8068 81.3531C77.9045 81.5485 78.0392 81.7086 78.2111 81.8336C78.383 81.9547 78.5822 82.0446 78.8088 82.1031C79.0392 82.1617 79.2853 82.191 79.547 82.191C79.8908 82.191 80.1779 82.1422 80.4084 82.0446C80.6427 81.9469 80.8185 81.8102 80.9357 81.6344C81.0529 81.4586 81.1115 81.2555 81.1115 81.025Z" fill="#6B6B6B"></path>',12)])])):(M(),_("svg",STt,[...o[1]||(o[1]=[rn('<path d="M79 0L87 11H71L79 0Z" fill="#2F374A"></path><path d="M159 79.1111L148 87.1111L148 71.1111L159 79.1111Z" fill="#2F374A"></path><path d="M9.5399e-08 79.1111L11 71.1111L11 87.1111L9.5399e-08 79.1111Z" fill="#2F374A"></path><path d="M79 115.222L71 104.222L87 104.222L79 115.222Z" fill="#2F374A"></path><rect x="61.3333" y="18" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M77.1095 38.084L78.8088 31.4688H79.6994L79.5998 33.1738L77.7834 40H76.8576L77.1095 38.084ZM75.838 31.4688L77.215 38.0312L77.338 40H76.3537L74.3791 31.4688H75.838ZM81.6271 38.0137L82.9865 31.4688H84.4513L82.4767 40H81.4923L81.6271 38.0137ZM80.0451 31.4688L81.7267 38.1016L81.9728 40H81.047L79.2599 33.1738L79.1662 31.4688H80.0451Z" fill="#6B6B6B"></path><rect x="104.667" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M122.148 83.1111H120.326L120.338 81.9451H122.148C122.676 81.9451 123.117 81.8298 123.473 81.5994C123.832 81.3689 124.101 81.0388 124.281 80.6091C124.465 80.1794 124.557 79.6677 124.557 79.074V78.6111C124.557 78.1501 124.504 77.7419 124.398 77.3865C124.297 77.031 124.144 76.7322 123.941 76.49C123.742 76.2478 123.496 76.0642 123.203 75.9392C122.914 75.8142 122.58 75.7517 122.201 75.7517H120.291V74.5798H122.201C122.767 74.5798 123.285 74.6755 123.754 74.8669C124.223 75.0544 124.627 75.3259 124.967 75.6814C125.31 76.0369 125.574 76.4626 125.758 76.9587C125.941 77.4548 126.033 78.0095 126.033 78.6228V79.074C126.033 79.6873 125.941 80.2419 125.758 80.738C125.574 81.2341 125.31 81.6599 124.967 82.0154C124.623 82.3669 124.213 82.6384 123.736 82.8298C123.264 83.0173 122.734 83.1111 122.148 83.1111ZM121.141 74.5798V83.1111H119.67V74.5798H121.141Z" fill="#6B6B6B"></path><rect x="18" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M36.2665 75.7166L33.7177 83.1111H32.1767L35.3876 74.5798H36.372L36.2665 75.7166ZM38.3993 83.1111L35.8446 75.7166L35.7333 74.5798H36.7235L39.9462 83.1111H38.3993ZM38.2763 79.947V81.113H33.6357V79.947H38.2763Z" fill="#6B6B6B"></path><rect x="61.3333" y="61.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M81.1115 81.025C81.1115 80.8492 81.0841 80.693 81.0295 80.5563C80.9787 80.4196 80.8869 80.2946 80.7541 80.1813C80.6213 80.068 80.4338 79.9586 80.1916 79.8531C79.9533 79.7438 79.6486 79.6324 79.2775 79.5192C78.8713 79.3942 78.4963 79.2555 78.1525 79.1031C77.8127 78.9469 77.5158 78.7672 77.2619 78.5641C77.008 78.3571 76.8107 78.1207 76.6701 77.8551C76.5295 77.5856 76.4591 77.275 76.4591 76.9235C76.4591 76.5758 76.5314 76.2594 76.6759 75.9742C76.8244 75.6891 77.0334 75.443 77.3029 75.236C77.5763 75.025 77.8986 74.8629 78.2697 74.7496C78.6408 74.6324 79.0509 74.5739 79.5002 74.5739C80.133 74.5739 80.6779 74.691 81.1349 74.9254C81.5959 75.1598 81.9494 75.4742 82.1955 75.8688C82.4455 76.2633 82.5705 76.6989 82.5705 77.1754H81.1115C81.1115 76.8942 81.0509 76.6461 80.9298 76.4313C80.8127 76.2125 80.633 76.0406 80.3908 75.9156C80.1525 75.7906 79.8498 75.7281 79.4826 75.7281C79.1349 75.7281 78.8459 75.7809 78.6154 75.8864C78.3849 75.9918 78.213 76.1344 78.0998 76.3141C77.9865 76.4938 77.9298 76.6969 77.9298 76.9235C77.9298 77.0836 77.967 77.2301 78.0412 77.3629C78.1154 77.4918 78.2287 77.6129 78.381 77.7262C78.5334 77.8356 78.7248 77.9391 78.9552 78.0367C79.1857 78.1344 79.4572 78.2281 79.7697 78.318C80.2423 78.4586 80.6545 78.6149 81.006 78.7867C81.3576 78.9547 81.6505 79.1461 81.8849 79.361C82.1193 79.5758 82.2951 79.8199 82.4123 80.0934C82.5295 80.3629 82.588 80.6696 82.588 81.0133C82.588 81.3727 82.5158 81.6969 82.3713 81.986C82.2267 82.2711 82.0197 82.5153 81.7502 82.7184C81.4845 82.9176 81.1642 83.0719 80.7892 83.1813C80.4181 83.2867 80.0041 83.3395 79.547 83.3395C79.1369 83.3395 78.7326 83.2848 78.3341 83.1754C77.9396 83.066 77.5802 82.9 77.256 82.6774C76.9318 82.4508 76.674 82.1696 76.4826 81.8336C76.2912 81.4938 76.1955 81.0973 76.1955 80.6442H77.6662C77.6662 80.9215 77.713 81.1578 77.8068 81.3531C77.9045 81.5485 78.0392 81.7086 78.2111 81.8336C78.383 81.9547 78.5822 82.0446 78.8088 82.1031C79.0392 82.1617 79.2853 82.191 79.547 82.191C79.8908 82.191 80.1779 82.1422 80.4084 82.0446C80.6427 81.9469 80.8185 81.8102 80.9357 81.6344C81.0529 81.4586 81.1115 81.2555 81.1115 81.025Z" fill="#6B6B6B"></path>',12)])]))}},RTt={key:0,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},LTt={key:1,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},DTt={__name:"KeyboardStorey",setup(i){const e=ct("$viewer"),t=Re(()=>e.i18n.locale==="fr");return(o,n)=>t.value?(M(),_("svg",RTt,[...n[0]||(n[0]=[rn('<rect y="25" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M16.2509 38.4688L18.0614 41.5801L19.872 38.4688H21.5653L18.9872 42.6934L21.6298 47H19.9189L18.0614 43.8301L16.204 47H14.4872L17.1357 42.6934L14.5517 38.4688H16.2509Z" fill="#6B6B6B"></path><rect y="68.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M15.7763 88.3063L17.4755 81.691H18.3661L18.2665 83.3961L16.4501 90.2223H15.5243L15.7763 88.3063ZM14.5048 81.691L15.8817 88.2535L16.0048 90.2223H15.0204L13.0458 81.691H14.5048ZM20.2939 88.236L21.6532 81.691H23.1181L21.1435 90.2223H20.1591L20.2939 88.236ZM18.7118 81.691L20.3935 88.3239L20.6396 90.2223H19.7138L17.9267 83.3961L17.8329 81.691H18.7118Z" fill="#6B6B6B"></path><path d="M18 0L26 11H10L18 0Z" fill="#2F374A"></path><rect x="14" y="13" width="8" height="2" fill="#2F374A"></rect><rect x="14" y="17" width="8" height="4" fill="#2F374A"></rect><path d="M18 129L10 118L26 118L18 129Z" fill="#2F374A"></path><rect x="22" y="116" width="8" height="2" transform="rotate(-180 22 116)" fill="#2F374A"></rect><rect x="22" y="112" width="8" height="4" transform="rotate(-180 22 112)" fill="#2F374A"></rect>',10)])])):(M(),_("svg",LTt,[...n[1]||(n[1]=[rn('<rect y="25" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M16.2509 38.4688L18.0614 41.5801L19.872 38.4688H21.5653L18.9872 42.6934L21.6298 47H19.9189L18.0614 43.8301L16.204 47H14.4872L17.1357 42.6934L14.5517 38.4688H16.2509Z" fill="#6B6B6B"></path><rect y="68.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M21.2665 89.0563V90.2223H15.3427V89.0563H21.2665ZM21.1317 82.5992L15.8876 90.2223H14.9032V89.2906L20.165 81.691H21.1317V82.5992ZM20.5868 81.691V82.8629H14.9384V81.691H20.5868Z" fill="#6B6B6B"></path><path d="M18 0L26 11H10L18 0Z" fill="#2F374A"></path><rect x="14" y="13" width="8" height="2" fill="#2F374A"></rect><rect x="14" y="17" width="8" height="4" fill="#2F374A"></rect><path d="M18 129L10 118L26 118L18 129Z" fill="#2F374A"></path><rect x="22" y="116" width="8" height="2" transform="rotate(-180 22 116)" fill="#2F374A"></rect><rect x="22" y="112" width="8" height="4" transform="rotate(-180 22 112)" fill="#2F374A"></rect>',10)])]))}},_Tt={},FTt={width:"174",height:"130",viewBox:"0 0 174 130",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function OTt(i,e){return M(),_("svg",FTt,[...e[0]||(e[0]=[rn('<path d="M33.1118 0.382324H131.606L141.853 99.4882H23.4L33.1118 0.382324Z" fill="#F2F2F2"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M22.9412 99.8706H142.235L131.988 0.305882V0H32.8059L23.0176 99.4882L22.9412 99.8706ZM141.394 99.1059H23.7823L33.4941 0.764706H131.3L141.394 99.1059Z" fill="#9E9E9E"></path><path d="M62.1705 9.86475L60.7941 46.953H103.771V9.86475H62.1705Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M60.4117 47.3354H104.153H104.229V9.48242H61.8647L60.4117 47.3354ZM103.388 46.5707H61.1764L62.5529 10.2471H103.388V46.5707Z" fill="#9E9E9E"></path><path d="M60.7942 46.9529L64.5412 61.7882H100.1L103.771 46.9529H60.7942Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M64.2353 62.1706H100.406L104.306 46.5706H60.3353L64.2353 62.1706ZM99.7942 61.4059H64.8471L61.3294 47.3353H103.312L99.7942 61.4059Z" fill="#9E9E9E"></path><path d="M85.2648 34.7939L85.0354 53.8351L90.0825 49.0175L97.806 49.5528L85.2648 34.7939Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M83.8118 57.5823L83.7354 31.5823L100.406 51.4646L90.3883 49.9352L83.8118 57.5823ZM85.8765 37.3176L85.953 51.9235L89.6236 47.6411L95.2824 48.4823L85.8765 37.3176Z" fill="black"></path><path d="M26.3059 128.241H25.9236C17.5883 128.241 10.7059 121.359 10.7059 113.024V100.253C10.7059 91.9178 17.5883 85.0354 25.9236 85.0354H26.3059C34.6412 85.0354 41.5236 91.9178 41.5236 100.253V113.024C41.5236 121.359 34.6412 128.241 26.3059 128.241Z" fill="white"></path><path d="M137.188 128.241H136.806C128.471 128.241 121.588 121.359 121.588 113.024V100.253C121.588 91.9178 128.471 85.0354 136.806 85.0354H137.188C145.524 85.0354 152.406 91.9178 152.406 100.253V113.024C152.406 121.359 145.524 128.241 137.188 128.241Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M25.4647 129.159H26.9942C35.6353 129.159 42.6706 122.2 42.5942 113.559V99.6413C42.5942 91.0766 35.6353 84.0413 26.9942 84.0413H25.4647C16.9 84.0413 9.86475 91.0001 9.86475 99.6413V113.559C9.86475 122.124 16.8236 129.159 25.4647 129.159ZM12.1589 99.5648C12.1589 92.2236 18.1236 86.2589 25.4647 86.2589H26.9942C34.3353 86.2589 40.3 92.2236 40.3 99.5648V113.482C40.3 120.824 34.3353 126.788 26.9942 126.788H25.4647C18.1236 126.788 12.1589 120.824 12.1589 113.482V99.5648Z" fill="#30374B"></path><path d="M26.3823 104.459C25.5411 104.459 24.8529 103.771 24.8529 102.929V98.4176C24.8529 97.5764 25.5411 96.8882 26.3823 96.8882C27.2235 96.8882 27.9117 97.5764 27.9117 98.4176V102.929C27.9117 103.771 27.2235 104.459 26.3823 104.459Z" fill="#30374B"></path><path d="M15.3706 84.1177C14.8353 84.1177 14.3765 83.6589 14.3765 83.1236V75.4765C14.3765 74.9412 14.8353 74.4824 15.3706 74.4824C15.9059 74.4824 16.3647 74.9412 16.3647 75.4765V83.1236C16.3647 83.6589 15.9059 84.1177 15.3706 84.1177Z" fill="#F8C62C"></path><path d="M9.63529 90.3884C9.63529 90.9237 9.17647 91.3825 8.64118 91.3825H0.994118C0.458824 91.3825 0 90.9237 0 90.3884C0 89.8531 0.458824 89.3943 0.994118 89.3943H8.64118C9.17647 89.3943 9.63529 89.8531 9.63529 90.3884Z" fill="#F8C62C"></path><path d="M11.9294 86.4117C11.5471 86.7941 10.8589 86.7941 10.4765 86.4117L3.74709 79.6823C3.36474 79.3 3.36474 78.6117 3.74709 78.2294C4.12944 77.847 4.81768 77.847 5.20003 78.2294L11.9294 84.9588C12.3118 85.3412 12.3118 86.0294 11.9294 86.4117Z" fill="#F8C62C"></path><path d="M87.7117 105.682H82.9706V100.941H80.8294V105.682H76.1647V107.747H80.8294V112.488H82.9706V107.747H87.7117V105.682Z" fill="#F8C62C"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M136.194 129.159H137.724C146.365 129.159 153.4 122.2 153.324 113.559V99.6413C153.324 91.0766 146.365 84.0413 137.724 84.0413H136.194C127.629 84.0413 120.594 91.0001 120.594 99.6413V113.559C120.594 122.124 127.553 129.159 136.194 129.159ZM122.888 99.5648C122.888 92.2236 128.853 86.2589 136.194 86.2589H137.724C145.065 86.2589 151.029 92.2236 151.029 99.5648V113.482C151.029 120.824 145.065 126.788 137.724 126.788H136.194C128.853 126.788 122.888 120.824 122.888 113.482V99.5648Z" fill="#30374B"></path><path d="M137.112 104.459C136.271 104.459 135.582 103.771 135.582 102.929V98.4176C135.582 97.5764 136.271 96.8882 137.112 96.8882C137.953 96.8882 138.641 97.5764 138.641 98.4176V102.929C138.641 103.771 137.953 104.459 137.112 104.459Z" fill="#30374B"></path><path d="M102.776 106.753L108.129 101.4C108.588 100.941 108.588 100.253 108.129 99.7941C107.671 99.3352 106.982 99.3352 106.524 99.7941L100.406 105.912C100.176 106.141 100.1 106.447 100.1 106.753C100.1 107.059 100.176 107.365 100.406 107.594L106.524 113.712C106.982 114.171 107.671 114.171 108.129 113.712C108.588 113.253 108.588 112.565 108.129 112.106L102.776 106.753Z" fill="#F8C62C"></path><path d="M171.218 106.753L165.865 101.4C165.406 100.941 165.406 100.253 165.865 99.7941C166.324 99.3352 167.012 99.3352 167.471 99.7941L173.588 105.912C173.818 106.141 173.894 106.447 173.894 106.753C173.894 107.059 173.818 107.365 173.588 107.594L167.471 113.712C167.012 114.171 166.324 114.171 165.865 113.712C165.406 113.253 165.406 112.565 165.865 112.106L171.218 106.753Z" fill="#F8C62C"></path>',20)])])}const UTt=j(_Tt,[["render",OTt]]),NTt={},jTt={width:"42",height:"55",viewBox:"0 0 42 55",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function VTt(i,e){return M(),_("svg",jTt,[...e[0]||(e[0]=[rn('<path d="M1.7192 47.4914L0.501465 10.6013H40.8298L40.3284 47.4914H1.7192Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M1.36104 47.8495H40.6866L41.188 10.2432H0.143311L1.36104 47.8495ZM39.9703 47.1332H2.07735L0.859623 10.9595H40.4717L39.9703 47.1332Z" fill="#9E9E9E"></path><path d="M4.29792 0.429688L0.501465 10.6013H40.8298L37.5348 0.429688H4.29792Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M0 10.9596H41.3312L37.7496 0H4.01135L0 10.9596ZM40.3284 10.2433H1.00284L4.51277 0.716312H37.2482L40.3284 10.2433Z" fill="#9E9E9E"></path><path d="M18.9312 23.0255C19.4326 23.0255 19.8624 22.5957 19.8624 22.0943V14.9312C19.8624 14.4298 19.4326 14 18.9312 14C18.4298 14 18 14.4298 18 14.9312V22.0943C18 22.5957 18.4298 23.0255 18.9312 23.0255Z" fill="#F8C62C"></path><path d="M24.3035 28.9708C24.3035 29.4722 24.7333 29.902 25.2347 29.902H32.3978C32.8992 29.902 33.329 29.4722 33.329 28.9708C33.329 28.4693 32.8992 28.0395 32.3978 28.0395H25.2347C24.7333 27.9679 24.3035 28.3977 24.3035 28.9708Z" fill="#F8C62C"></path><path d="M22.1546 25.2461C22.5128 25.6043 23.1575 25.6043 23.5156 25.2461L29.8192 18.9426C30.1773 18.5844 30.1773 17.9398 29.8192 17.5816C29.461 17.2234 28.8163 17.2234 28.4582 17.5816L22.1546 23.8852C21.7248 24.2433 21.7248 24.8164 22.1546 25.2461Z" fill="#F8C62C"></path><path d="M21.5855 31.4087L21.3477 51.0688L26.5798 46.0745L34.5865 46.6294L21.5855 31.4087Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M20.0793 54.9534L20 28L37.2819 48.6114L26.8969 47.0259L20.0793 54.9534ZM22.2197 33.9456L22.299 49.087L26.1041 44.6477L31.9705 45.5197L22.2197 33.9456Z" fill="black"></path>',9)])])}const HTt=j(NTt,[["render",VTt]]),zTt={},qTt={width:"124",height:"152",viewBox:"0 0 124 152",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function QTt(i,e){return M(),_("svg",qTt,[...e[0]||(e[0]=[rn('<path d="M10.5436 0.396484H112.649L123.272 103.216H0.475708L10.5436 0.396484Z" fill="#F2F2F2"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M0 103.612H123.668L113.046 0.317098V0H10.2264L0.0792746 103.216L0 103.612ZM122.876 102.819H0.951324L10.9399 0.792766H112.332L122.876 102.819Z" fill="#9E9E9E"></path><path d="M40.7472 10.2266L39.241 48.6747H83.7933V10.2266H40.7472Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M38.8446 49.071H84.1897H84.269V9.83008H40.3508L38.8446 49.071ZM83.4762 48.2783H39.7166L41.0643 10.6228H83.4762V48.2783Z" fill="#9E9E9E"></path><path d="M39.2408 48.6748L43.1253 64.0541H79.988L83.7932 48.6748H39.2408Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M42.8083 64.4503H80.3052L84.3482 48.2783H38.7653L42.8083 64.4503ZM79.671 63.6576H43.4425L39.7958 49.0711H83.3176L79.671 63.6576Z" fill="#9E9E9E"></path><path d="M64.6088 36.1494L64.371 55.8095L69.6031 50.8152L77.6098 51.3701L64.6088 36.1494Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M63.1026 59.6938L63.0233 32.7405L80.3052 53.3519L69.9202 51.7664L63.1026 59.6938ZM65.243 38.6861L65.3223 53.8275L69.1275 49.3881L74.9938 50.2602L65.243 38.6861Z" fill="black"></path><path d="M61.7549 130.724H61.3585C52.7176 130.724 45.5829 123.589 45.5829 114.948V101.709C45.5829 93.0686 52.7176 85.9338 61.3585 85.9338H61.7549C70.3958 85.9338 77.5306 93.0686 77.5306 101.709V114.948C77.5306 123.589 70.4751 130.724 61.7549 130.724Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M44.7902 114.79C44.7902 124.144 52.4005 131.754 61.7549 131.754C71.1093 131.754 78.7197 124.065 78.7197 114.79V101.947C78.7197 92.5928 71.1093 84.9824 61.7549 84.9824C52.4005 84.9824 44.7902 92.5928 44.7902 101.947V114.79ZM47.1684 101.868C47.1684 93.8612 53.6689 87.2814 61.7549 87.2814C69.7617 87.2814 76.3415 93.7819 76.3415 101.868V114.71C76.3415 122.717 69.8409 129.297 61.7549 129.297C53.7482 129.297 47.1684 122.796 47.1684 114.71V101.868Z" fill="#30374B"></path><path d="M61.8341 106.069C60.9621 106.069 60.2487 105.356 60.2487 104.484V100.996C60.2487 100.124 60.9621 99.4104 61.8341 99.4104C62.7062 99.4104 63.4196 100.124 63.4196 100.996V104.484C63.4196 105.356 62.7062 106.069 61.8341 106.069Z" fill="#30374B"></path><path d="M61.8341 97.7457C60.9621 97.7457 60.2487 97.0322 60.2487 96.1602C60.2487 95.2882 60.9621 94.5747 61.8341 94.5747C62.7062 94.5747 63.4196 95.2882 63.4196 96.1602C63.4196 97.0322 62.7062 97.7457 61.8341 97.7457Z" fill="#30374B"></path><path d="M61.8341 110.826C60.9621 110.826 60.2487 110.113 60.2487 109.241C60.2487 108.369 60.9621 107.655 61.8341 107.655C62.7062 107.655 63.4196 108.369 63.4196 109.241C63.4196 110.113 62.7062 110.826 61.8341 110.826Z" fill="#30374B"></path><path d="M61.8342 142.298L67.3834 136.749C67.859 136.273 68.5725 136.273 69.0481 136.749C69.5238 137.224 69.5238 137.938 69.0481 138.414L62.7062 144.756C62.4684 144.993 62.1513 145.073 61.8342 145.073C61.5171 145.073 61.2 144.993 60.9621 144.756L54.6202 138.414C54.1445 137.938 54.1445 137.224 54.6202 136.749C55.0958 136.273 55.8093 136.273 56.2849 136.749L61.8342 142.298Z" fill="#F8C62C"></path><path d="M61.8342 149.195L67.3834 143.646C67.859 143.17 68.5725 143.17 69.0481 143.646C69.5238 144.121 69.5238 144.835 69.0481 145.311L62.7062 151.653C62.4684 151.89 62.1513 151.97 61.8342 151.97C61.5171 151.97 61.2 151.89 60.9621 151.653L54.6202 145.311C54.1445 144.835 54.1445 144.121 54.6202 143.646C55.0958 143.17 55.8093 143.17 56.2849 143.646L61.8342 149.195Z" fill="#F8C62C"></path>',15)])])}const GTt=j(zTt,[["render",QTt]]),KTt={name:"FirstPersonViewHelper",components:{KeyboardNavigate:TTt,KeyboardStorey:DTt,MouseMove:UTt,MouseStorey:HTt,MouseZoom:GTt},emits:["close"],methods:{close(){this.$emit("close")},clear(){localStorage.setItem("firstPersonViewHelper","false"),this.close()}}},JTt={class:"bimdata-first-person-view-helper"},ZTt={class:"bimdata-first-person-view-helper__header"},WTt={class:"bimdata-first-person-view-helper__content"},YTt={class:"bimdata-first-person-view-helper__content__main"},XTt={class:"bimdata-first-person-view-helper__content__main__left"},$Tt={class:"bimdata-first-person-view-helper__content__main__left__element"},eRt={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},tRt={class:"bimdata-first-person-view-helper__content__main__left__element__text"},iRt={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},oRt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},rRt={class:"bimdata-first-person-view-helper__content__main__left__element"},nRt={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},aRt={class:"bimdata-first-person-view-helper__content__main__left__element__text"},sRt={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},lRt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},cRt={class:"bimdata-first-person-view-helper__content__main__left__element"},dRt={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},uRt={class:"bimdata-first-person-view-helper__content__main__left__element__text"},hRt={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},pRt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},fRt={class:"bimdata-first-person-view-helper__content__main__right"},ARt={class:"bimdata-first-person-view-helper__content__main__right__title"},gRt={class:"bimdata-first-person-view-helper__content__main__right__content"},mRt={class:"bimdata-first-person-view-helper__content__main__right__content__picture"},vRt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},yRt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},bRt={class:"bimdata-first-person-view-helper__content__main__right__content__text"},wRt={class:"bimdata-first-person-view-helper__content__footer"},CRt={class:"bimdata-first-person-view-helper__footer-buttons"};function xRt(i,e,t,o,n,r){const a=I("KeyboardNavigate"),s=I("MouseMove"),l=I("MouseZoom"),c=I("MouseStorey"),d=I("KeyboardStorey"),u=I("BIMDataButton");return M(),_("div",JTt,[b("h1",ZTt,z(i.$t("viewer3d.firstPersonViewHelper.title")),1),b("div",WTt,[b("div",YTt,[b("div",XTt,[b("div",$Tt,[b("div",eRt,[S(a)]),b("div",tRt,[b("h4",iRt,z(i.$t("viewer3d.firstPersonViewHelper.keyboardUsage")),1),b("ul",oRt,[b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.forward")),1),b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.backward")),1),b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.left")),1),b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.right")),1)])])]),b("div",rRt,[b("div",nRt,[S(s)]),b("div",aRt,[b("h4",sRt,z(i.$t("viewer3d.firstPersonViewHelper.mouseOrientation")),1),b("ul",lRt,[b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.pressLeft")),1),b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.mouseMove")),1),b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.mouseVertical")),1)])])]),b("div",cRt,[b("div",dRt,[S(l)]),b("div",uRt,[b("h4",hRt,z(i.$t("viewer3d.firstPersonViewHelper.mouseZoom")),1),b("ul",pRt,[b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.mouseWheelForward")),1),b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.mouseWheelBackward")),1)])])])]),b("div",fRt,[b("h4",ARt,z(i.$t("viewer3d.firstPersonViewHelper.changeStorey")),1),b("div",gRt,[b("div",mRt,[b("div",vRt,[S(c)]),b("div",yRt,[S(d)])]),b("div",bRt,[b("ul",null,[b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.storeyClick")),1),b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.moveCameraToObject")),1)]),b("ul",null,[b("li",null,z(i.$t("viewer3d.firstPersonViewHelper.keyboardStoreyChange")),1)])])])])]),b("div",wRt,z(i.$t("viewer3d.firstPersonViewHelper.contentFooter")),1)]),b("div",CRt,[S(u,{color:"primary",fill:"",radius:"",width:"200px",onClick:r.close},{default:N(()=>[Ze(z(i.$t("viewer3d.firstPersonViewHelper.understand")),1)]),_:1},8,["onClick"]),S(u,{color:"primary",outline:"",radius:"",width:"200px",onClick:r.clear},{default:N(()=>[Ze(z(i.$t("viewer3d.firstPersonViewHelper.noRecall")),1)]),_:1},8,["onClick"])])])}const FW=j(KTt,[["render",xRt],["__scopeId","data-v-77cce9d5"]]),kRt={components:{ShortcutsModal:m8,FirstPersonViewHelper:FW},data(){const i=this.$t;return{tabs:[{id:0,get label(){return i("viewer3d.modals.3d")}},{id:1,get label(){return i("viewer3d.modals.firstPerson")}}],activeTab:0,elements:[{image:"shortcutRotate",title:this.$t("shortcuts-helper.title_rotate"),text:this.$t("shortcuts-helper.text_rotate")},{image:"shortcutZoom",title:this.$t("shortcuts-helper.title_zoom"),text:this.$t("shortcuts-helper.text_zoom")},{image:"shortcutOpen",title:this.$t("shortcuts-helper.title_open"),text:this.$t("shortcuts-helper.text_open")}],shortcuts:[{letter:"F",text:this.$t("context_menu.fit_view")},{letter:"C",text:this.$t("context_menu.select_all")},{letter:"V",text:this.$t("context_menu.deselect_all")},{letter:"H",text:this.$t("context_menu.hide")},{letter:"Y",text:this.$t("context_menu.select_similar")},{letter:"I",text:this.$t("context_menu.isolate")},{letter:"U",text:this.$t("context_menu.reintegrate")},{letter:"R",text:this.$t("context_menu.show_all")},{letter:"1",text:this.$t("shortcuts-helper.shortcut_1")},{letter:"2",text:this.$t("shortcuts-helper.shortcut_2")},{letter:"3",text:this.$t("shortcuts-helper.shortcut_3")},{letter:"4",text:this.$t("shortcuts-helper.shortcut_4")},{letter:"5",text:this.$t("shortcuts-helper.shortcut_5")},{letter:"6",text:this.$t("shortcuts-helper.shortcut_6")},{maj:!0,text:this.$t("shortcuts-helper.shortcut_pan"),illustration:"click"},{alt:!0,text:this.$t("shortcuts-helper.shortcut_open"),illustration:"click"},{shift:!0,text:this.$t("shortcuts-helper.shortcut_multiselect"),illustration:"click"}]}}},MRt={class:"bimdata-shortcuts-helper__header"};function BRt(i,e,t,o,n,r){const a=I("BIMDataTabs"),s=I("ShortcutsModal"),l=I("FirstPersonViewHelper");return M(),_("div",null,[b("div",MRt,[S(a,{tabs:n.tabs,width:"490px",height:"44px",tabSize:"245",onTabSelected:e[0]||(e[0]=c=>n.activeTab=n.tabs.indexOf(c)),selected:n.activeTab},null,8,["tabs","selected"])]),n.activeTab===0?(M(),J(s,{key:0,elements:n.elements,shortcuts:n.shortcuts,onClose:e[1]||(e[1]=c=>i.$emit("close"))},{title:N(()=>[Ze(z(i.$t("shortcuts-helper.title_modal")),1)]),_:1},8,["elements","shortcuts"])):(M(),J(l,{key:1,onClose:e[2]||(e[2]=c=>i.$emit("close"))}))])}const ERt=j(kRt,[["render",BRt],["__scopeId","data-v-a26872a0"]]),PRt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M1.20102%2023.5V24.5H2.20102H10.261C11.4116%2029.9278%2016.2295%2034%2022%2034C27.7705%2034%2032.5884%2029.9278%2033.739%2024.5H41.799H42.799V23.5V20.5V19.5H41.799H33.739C32.5884%2014.0722%2027.7705%2010%2022%2010C16.2295%2010%2011.4116%2014.0722%2010.261%2019.5H2.20102H1.20102V20.5V23.5ZM14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C26.0764%2014.619%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",IRt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M6.23222%2034.2322L5.52512%2034.9393L6.23222%2035.6464L8.35354%2037.7678L9.06065%2038.4749L9.76776%2037.7678L15.4677%2032.0678C17.3477%2033.2898%2019.592%2034%2022%2034C24.408%2034%2026.6523%2033.2898%2028.5323%2032.0678L34.2322%2037.7678L34.9393%2038.4749L35.6464%2037.7678L37.7678%2035.6465L38.4749%2034.9393L37.7678%2034.2322L32.0678%2028.5323C33.2898%2026.6523%2034%2024.408%2034%2022C34%2019.592%2033.2898%2017.3477%2032.0678%2015.4677L37.7678%209.76776L38.4749%209.06065L37.7678%208.35354L35.6464%206.23222L34.9393%205.52512L34.2322%206.23222L28.5322%2011.9322C26.6523%2010.7102%2024.408%2010%2022%2010C19.592%2010%2017.3477%2010.7102%2015.4677%2011.9322L9.76776%206.23224L9.06065%205.52513L8.35354%206.23224L6.23222%208.35356L5.52512%209.06066L6.23222%209.76777L11.9322%2015.4678C10.7102%2017.3477%2010%2019.592%2010%2022C10%2024.408%2010.7102%2026.6523%2011.9322%2028.5323L6.23222%2034.2322ZM14.619%2022C14.619%2017.9236%2017.9236%2014.6191%2022%2014.6191C26.0764%2014.6191%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",SRt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C26.0764%2014.619%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022ZM22%2010C15.3726%2010%2010%2015.3726%2010%2022C10%2028.6274%2015.3726%2034%2022%2034C28.6274%2034%2034%2028.6274%2034%2022C34%2015.3726%2028.6274%2010%2022%2010Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",TRt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C23.8642%2014.619%2025.5667%2015.3094%2026.8665%2016.4504L14.7593%2023.4405C14.6673%2022.9751%2014.619%2022.4935%2014.619%2022ZM29.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C20.0879%2029.381%2018.3459%2028.6547%2017.0341%2027.4608L29.2136%2020.4289C29.3232%2020.9347%2029.381%2021.4602%2029.381%2022ZM22%2010C15.3726%2010%2010%2015.3726%2010%2022C10%2028.6274%2015.3726%2034%2022%2034C28.6274%2034%2034%2028.6274%2034%2022C34%2015.3726%2028.6274%2010%2022%2010Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",RRt="data:image/svg+xml,%3csvg%20width='33'%20height='33'%20viewBox='0%200%2033%2033'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.70001%2016.8667V17.3667H2.20001H7.33335H7.83335V16.8667V16.1333V15.6333H7.33335L2.20001%2015.6333H1.70001V16.1333L1.70001%2016.8667ZM30.8%2017.3667H31.3V16.8667V16.1333V15.6333H30.8L25.6667%2015.6333H25.1667V16.1333V16.8667V17.3667H25.6667H30.8Z'%20fill='%232F374A'%20stroke='white'/%3e%3cpath%20d='M16.1333%201.70001L15.6333%201.70001L15.6333%202.20001L15.6333%207.33335L15.6333%207.83335L16.1333%207.83335L16.8667%207.83335L17.3667%207.83335L17.3667%207.33335L17.3667%202.20001L17.3667%201.70001L16.8667%201.70001L16.1333%201.70001ZM15.6333%2030.8L15.6333%2031.3L16.1333%2031.3L16.8667%2031.3L17.3667%2031.3L17.3667%2030.8L17.3667%2025.6667L17.3667%2025.1667L16.8667%2025.1667L16.1333%2025.1667L15.6333%2025.1667L15.6333%2025.6667L15.6333%2030.8Z'%20fill='%232F374A'%20stroke='white'/%3e%3c/svg%3e",LRt={0:{positions:[36.5625,31.640625,36.5625,19.51171875,36.42067337036133,16.11605453491211,35.99519348144531,13.020120620727539,35.28605651855469,10.223917961120605,34.293270111083984,7.727446556091309,33.01683044433594,5.530706882476807,30.959993362426758,3.3593661785125732,28.725576400756836,1.6479235887527466,26.31357765197754,.39637935161590576,23.723995208740234,-.39526674151420593,20.956830978393555,-.7270146012306213,20.3203125,-.73828125,17.307449340820312,-.5108020901679993,14.569392204284668,.17163534462451935,12.106142044067383,1.3090311288833618,9.917699813842773,2.9013850688934326,8.174575805664062,5.153988838195801,6.733142375946045,7.555612087249756,5.593398094177246,10.106253623962402,4.755343437194824,12.805914878845215,4.218978404998779,15.654594421386719,3.9843032360076904,18.652292251586914,3.97265625,19.51171875,3.97265625,31.640625,4.115384578704834,35.0230827331543,4.543569564819336,38.11090850830078,5.257210731506348,40.904109954833984,6.256308555603027,43.40268325805664,7.540863037109375,45.606624603271484,9.608292579650879,47.79111099243164,11.846480369567871,49.51402282714844,14.255425453186035,50.775352478027344,16.835128784179688,51.57510757446289,19.585588455200195,51.91328811645508,20.25,51.92578125,23.26165771484375,51.697608947753906,25.997068405151367,51.013092041015625,28.456228256225586,49.872230529785156,30.639141082763672,48.2750244140625,32.375572204589844,46.0158576965332,33.81153869628906,43.60895538330078,34.947044372558594,41.0543212890625,35.78208923339844,38.35194778442383,36.31666946411133,35.5018424987793,36.55078887939453,32.50400161743164,36.5625,31.640625,29.63671875,18.10546875,29.63671875,33.1171875,29.450082778930664,36.561954498291016,28.89017677307129,39.497215270996094,27.956998825073242,41.92298126220703,25.967069625854492,44.22639083862305,23.724157333374023,45.72625732421875,21.228260040283203,46.422576904296875,20.25,46.4765625,17.354780197143555,46.07659912109375,14.97888469696045,44.876708984375,13.33356761932373,42.470394134521484,12.110569953918457,39.9057731628418,11.309891700744629,37.1828498840332,10.931534767150879,34.30161666870117,10.8984375,33.1171875,10.8984375,18.10546875,11.085087776184082,14.669450759887695,11.645040512084961,11.733874320983887,12.578293800354004,9.298736572265625,14.569818496704102,6.974865436553955,16.804428100585938,5.454482555389404,19.282119750976562,4.737586975097656,20.3203125,4.67578125,23.212167739868164,5.077450752258301,25.581016540527344,6.282459735870361,27.21183204650879,8.69408893585205,28.425546646118164,11.263723373413086,29.2221622467041,13.991360664367676,29.6016788482666,16.877002716064453],indices:[0,2,1,2,4,3,4,6,5,6,8,7,8,10,9,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,63,62,61,24,62,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,0,45,0,4,2,4,8,6,8,12,10,12,16,14,16,20,18,20,24,22,24,64,63,60,24,61,24,28,26,28,32,30,32,36,34,36,40,38,40,44,42,44,4,0,4,12,8,12,20,16,20,64,24,59,24,60,24,32,28,32,40,36,40,4,44,20,65,64,58,24,59,20,66,65,57,24,58,12,66,20,57,32,24,12,67,66,56,32,57,12,68,67,55,32,56,12,69,68,54,32,55,12,70,69,53,32,54,12,71,70,53,40,32,4,71,12,52,40,53,4,72,71,51,40,52,4,73,72,50,40,51,4,74,73,49,40,50,4,75,74,48,40,49,4,76,75,47,40,48,40,76,4,76,40,47],width:32.58984375},1:{positions:[23.94140625,51.1875,23.94140625,0,17.015625,0,17.015625,44.4375,6.5390625,44.296875,6.5390625,49.2890625],indices:[0,2,1,3,5,4,0,3,2,3,0,5],width:17.40234375},2:{positions:[37.3359375,5.4140625,37.3359375,0,4.1484375,0,4.1484375,4.74609375,20.91796875,23.37890625,23.33412742614746,26.180971145629883,25.239078521728516,28.61744499206543,26.632823944091797,30.68832778930664,27.938528060913086,33.606327056884766,28.560094833374023,36.34145736694336,28.6171875,37.40625,28.23740577697754,40.36100769042969,27.09806251525879,42.90309143066406,24.87748908996582,45.0150146484375,22.4631290435791,46.19827651977539,20.4609375,46.4765625,17.237478256225586,46.17487716674805,14.632962226867676,45.26981735229492,12.647390365600586,43.76138687133789,11.200069427490234,41.599464416503906,10.360716819763184,38.91020965576172,10.125,36.10546875,3.48046875,36.10546875,3.41015625,36.31640625,3.580944538116455,39.24900436401367,4.255249977111816,41.95781326293945,5.433072566986084,44.442840576171875,7.114412784576416,46.704078674316406,9.256887435913086,48.52997589111328,11.61109447479248,49.96455383300781,14.177034378051758,51.007816314697266,16.954708099365234,51.659759521484375,19.944114685058594,51.920387268066406,20.4609375,51.92578125,23.575925827026367,51.698787689208984,26.37569808959961,51.01780319213867,28.86025619506836,49.88283157348633,31.029598236083984,48.29386901855469,32.93091583251953,46.07616424560547,34.31552505493164,43.65195846557617,35.18342971801758,41.0212516784668,35.53462600708008,38.18403625488281,35.54296875,37.65234375,35.271297454833984,34.8802490234375,34.45627975463867,32.10430145263672,33.097923278808594,29.324501037597656,31.655981063842773,27.067161560058594,29.948768615722656,24.73398208618164,27.976285934448242,22.324962615966797,26.12109375,20.25,12.65625,5.58984375,12.7265625,5.4140625],indices:[51,1,0,1,3,2,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,46,45,46,48,47,48,50,49,51,3,1,19,22,20,22,26,24,26,30,28,30,34,32,34,38,36,38,42,40,42,46,44,46,50,48,50,3,51,18,22,19,22,30,26,30,38,34,38,46,42,46,3,50,18,30,22,46,4,3,17,30,18,46,5,4,16,30,17,46,6,5,15,30,16,46,7,6,14,30,15,46,8,7,13,30,14,38,8,46,13,38,30,38,9,8,12,38,13,38,10,9,11,38,12,38,11,10],width:33.92578125},3:{positions:[13.640625,23.37890625,13.640625,28.79296875,19.6875,28.79296875,22.903934478759766,29.15167236328125,25.282482147216797,30.227783203125,26.954715728759766,32.621280670166016,27.896883010864258,35.25688171386719,28.125,37.51171875,27.781084060668945,40.67007064819336,26.749338150024414,43.162776947021484,24.544097900390625,45.051876068115234,22.03769302368164,46.1552734375,19.51171875,46.4765625,16.51466941833496,46.0916633605957,14.03652286529541,44.93696212768555,12.056009292602539,42.62509536743164,10.906388282775879,40.13740539550781,10.58203125,37.79296875,3.9375,37.79296875,3.8671875,38.00390625,4.073190689086914,40.847023010253906,4.870357036590576,43.464176177978516,6.258687496185303,45.85536193847656,8.649903297424316,47.949581146240234,11.105090141296387,49.6024169921875,13.624245643615723,50.81385803222656,16.207372665405273,51.58391189575195,18.854469299316406,51.912574768066406,19.51171875,51.92578125,22.69034194946289,51.71705627441406,25.550539016723633,51.090885162353516,28.09231185913086,50.04726028442383,30.315656661987305,48.58618927001953,32.206153869628906,46.54783248901367,33.6175651550293,44.22849655151367,34.54988479614258,41.62818145751953,35.00312423706055,38.74688720703125,35.05078125,37.37109375,34.68306350708008,34.60222244262695,33.579917907714844,31.84009552001953,31.788928985595703,29.416330337524414,29.652488708496094,27.526569366455078,27.38671875,26.26171875,30.2706241607666,24.998523712158203,32.5009765625,23.31671142578125,34.190120697021484,20.399517059326172,35.28596115112305,17.665790557861328,35.78849792480469,15.115530967712402,35.82421875,14.2734375,35.583168029785156,11.223187446594238,34.860015869140625,8.486950874328613,33.65475845336914,6.064727306365967,31.9674015045166,3.9565165042877197,29.64410972595215,2.185784339904785,27.159265518188477,.8323085308074951,24.512863159179688,-.10391119122505188,21.704906463623047,-.6228747963905334,19.51171875,-.73828125,16.397254943847656,-.535150945186615,13.541664123535156,.07424008101224899,10.9449462890625,1.089891791343689,8.607102394104004,2.5118041038513184,6.504549980163574,4.569301605224609,4.957869052886963,6.847413539886475,3.9670591354370117,9.34614086151123,3.5321204662323,12.065483093261719,3.515625,13.2890625,3.62109375,13.5,10.23046875,13.5,10.628458976745605,10.52513313293457,11.822431564331055,8.080921173095703,14.14232063293457,6.207763671875,16.670166015625,5.072887420654297,19.405969619750977,4.6762919425964355,19.51171875,4.67578125,22.593053817749023,5.02486515045166,25.119962692260742,6.072116374969482,27.08766746520996,8.277663230895996,28.33972930908203,10.727699279785156,28.876150131225586,13.422224998474121,28.8984375,14.1328125,28.579307556152344,17.37627601623535,27.621917724609375,19.90043067932129,25.462261199951172,21.754257202148438,22.976253509521484,22.91082000732422,20.163896560668945,23.3701229095459,19.6875,23.37890625],indices:[86,1,0,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,46,45,46,48,47,48,50,49,50,52,51,52,54,53,54,56,55,56,58,57,58,60,59,60,62,61,62,64,63,64,66,65,66,68,67,85,1,86,15,18,16,18,22,20,22,26,24,26,30,28,30,34,32,34,38,36,38,42,40,42,46,44,46,50,48,50,54,52,54,58,56,58,62,60,62,66,64,66,69,68,84,1,85,14,18,15,18,26,22,26,34,30,34,42,38,42,50,46,50,58,54,58,66,62,66,70,69,83,1,84,14,26,18,58,70,66,83,2,1,13,26,14,58,71,70,82,2,83,12,26,13,58,72,71,82,3,2,11,26,12,58,73,72,82,4,3,10,26,11,58,74,73,81,4,82,10,34,26,58,75,74,9,34,10,50,75,58,8,34,9,50,76,75,7,34,8,50,77,76,6,34,7,50,78,77,5,34,6,50,79,78,5,42,34,50,80,79,4,42,5,50,81,80,81,42,4,42,81,50],width:32.30859375},4:{positions:[31.81640625,51.1875,31.81640625,17.2265625,38.8828125,17.2265625,38.8828125,11.8125,31.81640625,11.8125,31.81640625,0,24.92578125,0,24.92578125,11.8125,1.93359375,11.8125,1.93359375,15.71484375,24.50390625,51.1875,31.81640625,51.1875,24.046875,39.515625,9.31640625,17.2265625,24.92578125,17.2265625,24.92578125,41.23828125,24.71484375,41.2734375],indices:[1,3,2,4,6,5,7,9,8,9,14,13,16,13,12,13,10,9,10,1,0,1,4,3,4,7,6,7,14,9,16,10,13,10,4,1,4,14,7,15,10,16,4,15,14,15,4,10],width:36.94921875},5:{positions:[11.91796875,22.5,6.15234375,23.09765625,9.10546875,51.1875,34.734375,51.1875,34.734375,45.03515625,14.9765625,45.03515625,13.2890625,30.65625,14.99853515625,31.75048828125,16.892578125,32.642578125,19.03271484375,33.25341796875,21.48046875,33.50390625,21.48046875,33.50390625,24.524171829223633,33.29277038574219,27.260135650634766,32.595733642578125,29.6883602142334,31.412792205810547,31.808847427368164,29.743946075439453,33.53106689453125,27.481525421142578,34.8779411315918,25.034576416015625,35.84947204589844,22.40309715270996,36.44565963745117,19.58709144592285,36.66650390625,16.586557388305664,36.66796875,16.3125,36.47660446166992,13.1383056640625,35.90251541137695,10.244234085083008,34.94569778442383,7.630287170410156,33.60615158081055,5.296463966369629,31.54420280456543,3.2312631607055664,29.28870391845703,1.597025990486145,26.839656829833984,.3937528729438782,24.197057723999023,-.3785564601421356,21.360912322998047,-.7199019193649292,20.49609375,-.73828125,17.404800415039062,-.5199803113937378,14.58151912689209,.13492262363433838,12.026251792907715,1.226427435874939,9.738997459411621,2.7545342445373535,7.902623653411865,4.662389278411865,6.586172580718994,6.943535327911377,5.78964376449585,9.59797191619873,5.513038158416748,12.625699043273926,5.51953125,13.25390625,5.58984375,13.46484375,11.84765625,13.46484375,12.231374740600586,10.424592018127441,13.382529258728027,7.983725547790527,15.769926071166992,6.059262275695801,18.29474449157715,4.960567474365234,20.49609375,4.67578125,23.407373428344727,5.077446937561035,25.80744171142578,6.282444000244141,27.603513717651367,8.744783401489258,28.85628890991211,11.317317962646484,29.565767288208008,14.000046730041504,29.7421875,16.2421875,29.464466094970703,19.35067367553711,28.631298065185547,22.06241226196289,26.50613021850586,24.628503799438477,24.30402374267578,26.380647659301758,22.024982452392578,27.31884002685547,20.49609375,27.4921875,17.11406707763672,27.2115478515625,14.758378028869629,26.369632720947266,13.049945831298828,24.7330322265625],indices:[2,4,3,6,8,7,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,2,5,4,6,9,8,12,16,14,16,20,18,20,24,22,24,28,26,28,32,30,32,36,34,36,40,38,40,43,42,1,5,2,12,20,16,20,28,24,28,36,32,36,43,40,1,6,5,36,44,43,1,9,6,36,45,44,28,45,36,28,46,45,28,47,46,28,48,47,28,49,48,20,49,28,20,50,49,20,51,50,20,52,51,20,53,52,20,54,53,20,55,54,12,55,20,12,56,55,12,57,56,12,58,57,12,59,58,12,60,59,12,61,60,1,11,9,11,61,12,62,1,0,1,61,11,61,1,62],width:31.154930591583252},6:{positions:[23.73046875,51.92578125,23.73046875,51.92578125,26.35400390625,51.7763671875,28.951171875,51.328125,31.31103515625,50.6513671875,33.22265625,49.81640625,33.22265625,49.81640625,31.74609375,44.5078125,29.98388671875,45.30322265625,28.142578125,45.931640625,26.09912109375,46.34033203125,23.73046875,46.4765625,23.73046875,46.4765625,20.900758743286133,46.15056610107422,18.386611938476562,45.17258071899414,16.18802833557129,43.5426025390625,14.465424537658691,41.076210021972656,13.138894081115723,38.50679397583008,12.208439826965332,35.8343505859375,11.67405891418457,33.05888366699219,11.53125,30.62109375,11.53125,29.8125,13.904020309448242,31.542055130004883,16.591995239257812,32.85417938232422,19.408527374267578,33.66147994995117,22.372249603271484,33.98829650878906,22.921875,33.99609375,25.913307189941406,33.7476806640625,28.614002227783203,33.002437591552734,31.023962020874023,31.7603702545166,33.143184661865234,30.021472930908203,34.91127014160156,27.67707633972168,36.273963928222656,25.183759689331055,37.23126983642578,22.541519165039062,37.783180236816406,19.750356674194336,37.93359375,17.2265625,37.749637603759766,14.08007526397705,37.19777297973633,11.182336807250977,36.27799606323242,8.533347129821777,34.99031066894531,6.1331071853637695,32.81218719482422,3.8232548236846924,30.5310001373291,1.9849358797073364,28.146751403808594,.6181499361991882,25.65943717956543,-.2771027684211731,23.069063186645508,-.7008222937583923,22.0078125,-.73828125,19.07733154296875,-.5163767337799072,16.358732223510742,.14933684468269348,13.852017402648926,1.2588595151901245,11.557185173034668,2.8121912479400635,9.638298988342285,5.0737128257751465,8.030496597290039,7.450648784637451,6.733777046203613,9.942998886108398,5.748140335083008,12.550763130187988,5.073586463928223,15.273941993713379,4.710115432739258,18.112533569335938,4.640625,20.07421875,4.640625,29.84765625,4.791966915130615,33.015262603759766,5.245992183685303,35.97719955444336,6.0027008056640625,38.73346710205078,7.062093257904053,41.28406524658203,8.424168586730957,43.62899398803711,10.08892822265625,45.768253326416016,12.196839332580566,47.81597900390625,14.478988647460938,49.4511604309082,16.93537712097168,50.673797607421875,19.56600570678711,51.483890533447266,22.370872497558594,51.881439208984375,21.375,28.828125,21.375,28.828125,18.29266357421875,28.514667510986328,15.669046401977539,27.57429313659668,13.216089248657227,25.754901885986328,11.53125,23.5546875,11.53125,23.5546875,11.53125,19.40625,11.72034740447998,16.05575180053711,12.287637710571289,13.114592552185059,13.233122825622559,10.582772254943848,15.422850608825684,7.959404945373535,17.641748428344727,6.1007585525512695,19.889812469482422,5.006833076477051,22.0078125,4.67578125,24.755970001220703,5.117502212524414,27.043012619018555,6.4426655769348145,28.768321990966797,9.139809608459473,30.00419807434082,11.825053215026855,30.75064468383789,14.498397827148438,31.007658004760742,17.15984344482422,31.0078125,17.2265625,30.737268447875977,20.334959030151367,29.925634384155273,23.062726974487305,28.57291030883789,25.409866333007812,26.557069778442383,27.331403732299805,24.112672805786133,28.470571517944336],indices:[2,4,3,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,61,60,61,63,62,63,65,64,65,67,66,21,25,23,25,29,27,29,33,31,33,37,35,37,41,39,41,45,43,45,49,47,49,53,51,53,57,55,57,61,59,61,65,63,65,68,67,21,29,25,29,37,33,37,45,41,45,53,49,57,65,61,57,68,65,73,57,74,68,2,1,2,6,4,6,8,7,53,75,57,72,57,73,68,6,2,6,9,8,53,76,75,71,57,72,68,9,6,53,77,76,70,57,71,68,10,9,53,78,77,68,12,10,53,79,78,68,13,12,45,79,53,68,14,13,45,80,79,68,15,14,45,81,80,57,15,68,45,82,81,57,16,15,45,83,82,57,17,16,45,84,83,57,18,17,37,84,45,57,19,18,37,85,84,57,20,19,37,86,85,57,21,20,37,87,86,70,21,57,37,88,87,70,29,21,37,89,88,95,29,70,37,90,89,94,29,95,29,90,37,93,29,94,29,91,90,92,29,93,29,92,91],width:33.29296875},7:{positions:[37.3359375,51.1875,37.3359375,45.73828125,35.06884002685547,42.96620559692383,32.99747848510742,40.27573776245117,31.121856689453125,37.666873931884766,29.441970825195312,35.13961410522461,27.957822799682617,32.6939582824707,26.669410705566406,30.329906463623047,25.576738357543945,28.047460556030273,24.585519790649414,25.34857940673828,23.679515838623047,22.592660903930664,22.85872459411621,19.779708862304688,22.123149871826172,16.909719467163086,21.47278594970703,13.982696533203125,20.907638549804688,10.998638153076172,20.427703857421875,7.957544803619385,20.109375,5.51953125,19.546875,0,12.62109375,0,13.18359375,5.51953125,13.624162673950195,8.682632446289062,14.162458419799805,11.7554292678833,14.798481941223145,14.737921714782715,15.532232284545898,17.630107879638672,16.363710403442383,20.431991577148438,17.29291534423828,23.14356803894043,18.319847106933594,25.764841079711914,19.59184455871582,28.50404167175293,20.94556999206543,31.184146881103516,22.381019592285156,33.80515670776367,23.898197174072266,36.367069244384766,25.497098922729492,38.86988830566406,27.17772674560547,41.31361389160156,28.940080642700195,43.6982421875,30.55078125,45.73828125,2.70703125,45.73828125,2.70703125,51.1875],indices:[36,1,0,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,15,18,16,18,22,20,22,26,24,26,30,28,30,34,32,34,1,36,14,18,15,18,26,22,26,34,30,34,2,1,13,18,14,18,34,26,34,3,2,12,18,13,34,4,3,11,18,12,34,5,4,10,18,11,34,6,5,9,18,10,34,7,6,8,18,9,34,8,7,8,34,18],width:34.62890625},8:{positions:[35.5078125,37.828125,35.5078125,37.828125,35.171749114990234,34.87995147705078,34.16355895996094,32.23108673095703,32.111854553222656,29.74087905883789,29.926387786865234,27.833354949951172,27.60715675354004,26.50851058959961,27.17578125,26.33203125,29.95149040222168,25.094419479370117,32.32651901245117,23.460092544555664,34.43555450439453,20.72713279724121,35.900413513183594,18.128986358642578,36.721099853515625,15.665656089782715,36.9140625,13.8515625,36.669769287109375,10.764041900634766,35.936893463134766,8.031349182128906,34.71543502807617,5.653482913970947,33.00539016723633,3.630444288253784,30.672534942626953,1.9876797199249268,28.159135818481445,.7305349111557007,25.465194702148438,-.14099019765853882,22.590709686279297,-.6268956065177917,20.28515625,-.73828125,17.073928833007812,-.5518752932548523,14.154998779296875,.007342617027461529,11.52836799621582,.9393724799156189,9.194035530090332,2.2442142963409424,7.087226867675781,4.249664306640625,5.474374294281006,6.483748912811279,4.355478763580322,8.946466445922852,3.730539560317993,11.637818336486816,3.5859375,13.8515625,3.9077277183532715,16.76708984375,4.873098373413086,19.430402755737305,6.983664512634277,21.999971389770508,9.1663179397583,24.03520965576172,11.421058654785156,25.536113739013672,13.21875,26.33203125,10.521642684936523,27.690086364746094,8.310940742492676,29.498327255249023,6.554880142211914,32.2148551940918,5.462681293487549,34.86786651611328,5.034343719482422,37.45735549926758,5.02734375,37.828125,5.274991512298584,40.936737060546875,6.0179338455200195,43.679622650146484,7.256171703338623,46.056785583496094,8.989704132080078,48.0682258605957,11.195730209350586,49.67716598510742,13.679861068725586,50.85453796386719,16.442096710205078,51.60033416748047,19.482437133789062,51.914554595947266,20.21484375,51.92578125,23.33972930908203,51.71018600463867,26.17371940612793,51.06340789794922,28.716812133789062,49.98543930053711,30.96900749206543,48.476287841796875,32.855812072753906,46.481101989746094,34.23870849609375,44.16929626464844,35.11769485473633,41.54087829589844,35.49277114868164,38.5958366394043,30.0234375,13.9921875,30.0234375,13.9921875,29.64218521118164,16.91078758239746,28.498428344726562,19.414352416992188,26.08045768737793,21.54735565185547,23.622779846191406,22.934738159179688,21.125396728515625,23.576496124267578,20.21484375,23.625,17.24955177307129,23.25731658935547,14.728343963623047,22.15427017211914,12.576437950134277,19.76153564453125,11.184748649597168,17.31914710998535,10.553275108337402,14.827102661132812,10.51171875,13.9921875,10.887092590332031,10.988458633422852,12.013215065002441,8.51321792602539,14.405669212341309,6.533318519592285,16.906885147094727,5.263905048370361,19.516860961914062,4.704977512359619,20.28515625,4.67578125,23.29867172241211,5.026233196258545,25.858081817626953,6.077588081359863,28.013742446899414,8.338984489440918,29.392438888549805,10.737264633178711,29.994173049926758,13.27242660522461,28.58203125,37.6875,28.58203125,37.6875,28.174694061279297,40.610374450683594,26.952680587768555,43.08668899536133,24.61227035522461,45.108375549316406,22.137697219848633,46.228328704833984,20.21484375,46.4765625,17.313322067260742,46.03565979003906,14.926724433898926,44.71294403076172,13.154691696166992,42.36640930175781,12.172061920166016,39.77567672729492,11.953125,37.6875,12.353304862976074,34.70274353027344,13.553845405578613,32.25563430786133,15.877814292907715,30.335918426513672,18.399682998657227,29.288454055786133,20.28515625,29.07421875,23.187891006469727,29.511512756347656,25.59459114074707,30.82339859008789,27.39614486694336,33.1435661315918,28.379940032958984,35.7212028503418],indices:[96,43,97,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,1,60,1,3,2,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,75,74,73,31,74,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,98,97,95,43,96,43,47,45,47,51,49,51,55,53,55,59,57,59,3,1,3,7,5,7,11,9,11,15,13,15,19,17,19,23,21,23,27,25,27,31,29,31,76,75,72,31,73,31,35,33,37,41,39,41,98,43,94,43,95,43,51,47,51,59,55,59,7,3,7,15,11,15,23,19,23,31,27,31,77,76,71,31,72,31,37,35,37,98,41,94,51,43,23,77,31,70,31,71,37,99,98,93,51,94,23,78,77,70,37,31,37,100,99,92,51,93,23,79,78,69,37,70,37,101,100,91,51,92,23,80,79,68,37,69,37,102,101,90,51,91,23,81,80,67,37,68,37,103,102,89,51,90,15,81,23,66,37,67,89,59,51,15,82,81,66,103,37,88,59,89,15,83,82,65,103,66,87,59,88,15,84,83,64,103,65,106,59,87,15,85,84,64,104,103,105,59,106,15,62,85,63,104,64,104,59,105,15,63,62,104,7,59,7,63,15,63,7,104],width:33.328125},9:{positions:[17.96484375,4.67578125,17.96484375,4.67578125,20.832611083984375,5.023819923400879,23.333181381225586,6.067935943603516,25.466554641723633,7.80812931060791,26.91764259338379,9.993691444396973,28.0020751953125,12.483912467956543,28.7198543548584,15.278792381286621,29.070980072021484,18.378332138061523,29.109375,19.8984375,29.109375,22.21875,27.17138671875,20.02587890625,24.802734375,18.439453125,22.097061157226562,17.482282638549805,19.10603904724121,17.156333923339844,19.0546875,17.15625,15.962648391723633,17.374753952026367,13.161947250366211,18.030263900756836,10.65258502960205,19.12278175354004,8.43455982208252,20.652305603027344,6.556478023529053,22.870075225830078,5.067807197570801,25.25521469116211,3.968548536300659,27.80772590637207,3.2587015628814697,30.527606964111328,2.9382660388946533,33.414859771728516,2.91796875,34.3828125,3.1171858310699463,37.45964050292969,3.7148373126983643,40.29710006713867,4.710922718048096,42.89520263671875,6.105442523956299,45.253936767578125,8.45276927947998,47.5704231262207,10.840720176696777,49.39479446411133,13.269293785095215,50.72705078125,15.738492012023926,51.56719207763672,18.248313903808594,51.915218353271484,18.7734375,51.92578125,21.87710189819336,51.72084045410156,24.703197479248047,51.10601806640625,27.25172233581543,50.0813102722168,29.52267837524414,48.646724700927734,31.40683364868164,46.456634521484375,32.97002410888672,44.11880111694336,34.212249755859375,41.63322067260742,35.133514404296875,38.99989700317383,35.73381423950195,36.21882629394531,36.01314926147461,33.29001235961914,36.03515625,32.16796875,36.03515625,19.96875,35.885276794433594,16.642547607421875,35.435638427734375,13.59611988067627,34.686241149902344,10.8294677734375,33.6370849609375,8.34259033203125,32.28816604614258,6.135488033294678,30.066654205322266,3.964623212814331,27.738887786865234,2.2044835090637207,25.30486488342285,.8550683259963989,22.764589309692383,-.08362190425395966,20.118059158325195,-.6115872859954834,17.96484375,-.73828125,15.23583984375,-.61083984375,12.462890625,-.228515625,9.81298828125,.41748046875,7.453125,1.3359375,7.453125,1.3359375,8.5078125,6.64453125,10.62158203125,5.71728515625,12.814453125,5.115234375,15.21826171875,4.78564453125,17.96484375,4.67578125,19.0546875,22.5703125,19.0546875,22.5703125,22.15691566467285,22.88543701171875,24.769695281982422,23.830808639526367,27.256725311279297,25.793380737304688,28.883312225341797,27.970977783203125,29.109375,28.44140625,29.109375,32.87109375,28.917926788330078,36.28435516357422,28.34358024597168,39.213134765625,27.386337280273438,41.657432556152344,25.37175941467285,43.94849395751953,23.127288818359375,45.50687026977539,20.652921676635742,46.33256530761719,18.984375,46.4765625,16.33090591430664,46.012935638427734,13.984920501708984,44.62206268310547,12.139910697937012,42.07911682128906,10.835031509399414,39.48687744140625,10.070281982421875,36.84534454345703,9.84375,34.3828125,10.09748363494873,31.21339988708496,10.858684539794922,28.454280853271484,12.127352714538574,26.105453491210938,14.162574768066406,24.085222244262695,16.57485580444336,22.90838050842285],indices:[60,63,61,63,65,64,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,89,25,88,25,89,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,63,60,63,66,65,10,14,12,14,18,16,18,22,20,22,89,24,87,25,88,25,29,27,29,33,31,33,37,35,37,41,39,41,45,43,45,49,47,49,53,51,53,57,55,57,63,59,63,67,66,10,18,14,18,89,22,86,25,87,25,33,29,33,41,37,41,49,45,49,57,53,57,67,63,18,90,89,85,25,86,57,1,67,18,91,90,85,33,25,57,2,1,18,92,91,84,33,85,57,3,2,18,93,92,83,33,84,49,3,57,18,94,93,82,33,83,49,4,3,18,70,94,81,33,82,49,5,4,10,70,18,80,33,81,49,6,5,10,71,70,80,41,33,49,7,6,10,72,71,79,41,80,41,7,49,10,73,72,78,41,79,41,8,7,10,74,73,77,41,78,41,9,8,10,75,74,76,41,77,41,10,9,75,41,76,41,75,10],width:33.1171875},".":{positions:[12.5859375,7.1015625,12.5859375,0,5.66015625,0,5.66015625,7.1015625],indices:[3,1,0,1,3,2],width:6.92578125},m:{positions:[5.02734375,38.0390625,11.21484375,38.0390625,11.70703125,33.046875,13.634581565856934,35.28191375732422,15.986680030822754,37.00302505493164,18.700471878051758,38.111698150634766,21.567134857177734,38.6696662902832,23.09765625,38.7421875,26.139192581176758,38.42292022705078,28.791221618652344,37.465118408203125,31.15591812133789,35.599586486816406,32.90284729003906,33.37240219116211,33.71484375,31.7109375,35.408084869384766,34.171592712402344,37.503177642822266,36.16951370239258,40.22900390625,37.6488037109375,42.961280822753906,38.50468063354492,45.3515625,38.7421875,48.32835006713867,38.446842193603516,50.9460334777832,37.5608024597168,53.204620361328125,36.084068298339844,54.8843879699707,33.86517333984375,56.19401931762695,31.434070587158203,57.133506774902344,28.79076385498047,57.70286178588867,25.93524932861328,57.90207290649414,22.867528915405273,57.90234375,22.74609375,57.90234375,0,50.9765625,0,50.9765625,22.81640625,50.74445724487305,26.319555282592773,50.04814529418945,29.033550262451172,47.956382751464844,31.33014678955078,45.659942626953125,32.691036224365234,43.27734375,33.1171875,40.4267463684082,32.6451530456543,38.09538650512695,31.229045867919922,36.33670425415039,28.815231323242188,35.26606750488281,26.190664291381836,34.9453125,24.43359375,34.9453125,24.15234375,34.9453125,0,27.984375,0,27.984375,22.81640625,27.73810386657715,26.2243709564209,26.99928855895996,28.921852111816406,24.89556121826172,31.278352737426758,22.623031616210938,32.67652893066406,20.28515625,33.1171875,17.40234375,32.7919921875,15.08203125,31.81640625,13.2802734375,30.251953125,11.953125,28.16015625,11.953125,28.16015625,11.953125,0,5.02734375,0],indices:[55,1,0,2,4,3,4,6,5,6,8,7,8,10,9,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,40,42,41,54,1,55,2,6,4,6,10,8,12,16,14,16,20,18,20,24,22,24,28,26,39,42,40,54,2,1,2,10,6,12,20,16,20,28,24,38,42,39,20,29,28,38,43,42,20,30,29,37,43,38,20,31,30,36,43,37,20,32,31,36,44,43,20,33,32,35,44,36,20,34,33,35,45,44,12,34,20,12,35,34,12,45,35,10,45,12,10,46,45,10,47,46,10,48,47,2,48,10,2,49,48,2,50,49,2,51,50,2,53,51,53,2,54],width:52.875},c:{positions:[20.49609375,4.67578125,20.49609375,4.67578125,23.36757469177246,5.087423801422119,25.919267654418945,6.322350978851318,28.055252075195312,8.557517051696777,29.08038330078125,10.95840835571289,29.1796875,12.0234375,35.40234375,12.0234375,35.47265625,11.8125,35.209197998046875,9.178794860839844,34.224666595458984,6.713964939117432,32.519065856933594,4.418010711669922,29.943574905395508,2.4374680519104004,27.361528396606445,.9345490336418152,24.772926330566406,-.0907462015748024,22.177766799926758,-.6384177803993225,20.49609375,-.73828125,17.386640548706055,-.5293084979057312,14.578433990478516,.09760986268520355,12.071474075317383,1.142473816871643,9.86575984954834,2.605283260345459,7.9612932205200195,4.4860382080078125,6.3618083000183105,6.765913009643555,5.107275009155273,9.241913795471191,4.197693824768066,11.914040565490723,3.633063793182373,14.782294273376465,3.4133858680725098,17.8466739654541,3.41015625,18.28125,3.41015625,19.7578125,3.5838754177093506,22.87480926513672,4.105032920837402,25.780019760131836,4.973628997802734,28.473445892333984,6.189663410186768,30.95508575439453,7.753136157989502,33.22494125366211,9.646564483642578,35.16857147216797,11.828062057495117,36.69178771972656,14.297628402709961,37.79460144042969,17.05526351928711,38.47700500488281,20.100967407226562,38.73899841308594,20.49609375,38.7421875,23.570213317871094,38.5140495300293,26.36119842529297,37.82963943481445,28.869049072265625,36.6889533996582,31.093765258789062,35.09199523925781,33.085479736328125,32.87481689453125,34.484825134277344,30.467679977416992,35.29180145263672,27.87058448791504,35.5078125,25.13671875,35.4375,24.92578125,29.1796875,24.92578125,28.72093391418457,27.737882614135742,27.34467315673828,30.163320541381836,24.98297119140625,32.04195022583008,22.43872833251953,33.074039459228516,20.49609375,33.29296875,17.510202407836914,32.94111633300781,15.082853317260742,31.88556480407715,13.214049339294434,30.12630844116211,11.89155101776123,27.541250228881836,10.979540824890137,24.808610916137695,10.478017807006836,21.928388595581055,10.37109375,19.7578125,10.37109375,18.28125,10.565627098083496,15.065240859985352,11.149227142333984,12.176401138305664,12.121894836425781,9.614731788635254,13.855029106140137,7.324370861053467,15.960027694702148,5.741883754730225,18.4368896484375,4.867271423339844],indices:[5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,4,7,5,7,11,9,11,15,13,15,19,17,19,23,21,23,27,25,27,31,29,31,35,33,35,39,37,39,43,41,43,47,45,47,50,49,3,7,4,7,15,11,15,23,19,23,31,27,31,39,35,39,47,43,47,51,50,3,15,7,39,51,47,2,15,3,39,52,51,39,53,52,39,54,53,39,55,54,31,55,39,31,56,55,31,57,56,31,58,57,23,58,31,23,59,58,23,60,59,23,61,60,23,62,61,23,63,62,23,64,63,23,65,64,23,66,65,15,66,23,15,67,66,15,68,67,15,1,68,1,15,2],width:32.09765625},k:{positions:[28.828125,0,16.48828125,17.54296875,11.98828125,17.54296875,11.98828125,0,5.0625,0,5.0625,54.84375,11.98828125,54.84375,11.98828125,23.0625,16.41796875,23.0625,26.82421875,38.0390625,35.12109375,38.0390625,22.11328125,20.7421875,36.984375,0],indices:[12,1,0,2,4,3,4,6,5,8,10,9,11,1,12,4,7,6,8,11,10,11,2,1,2,7,4,7,11,8,11,7,2],width:31.921875},t:{positions:[0,0,30,0],indices:[0,2,1],width:30}," ":{width:16,positions:[],indices:[]}};function DRt({text:i,size:e=1,zOffset:t=0}){const o=[],n=[];let r=0,a=0;const s=10;e/=100;for(const l of i){const c=LRt[l];if(!c)throw new Error("Unknown character: "+l);const d=a;for(let h=0;h<c.positions.length;h+=2)o.push(c.positions[h]*e+d,c.positions[h+1]*e,t);const u=r===0?0:r+1;for(const h of c.indices)n.push(h+u),r=Math.max(r,h+u);a+=(c.width+s)*e}return{positions:o,indices:n,primitive:"triangles"}}function OW(i,{content:e,size:t,matrix:o,offset:n=0}){const{material:r,origin:a,plugin:s}=i,{textSizeRatio:l,textBottomMarginRatio:c,xeokitSdk:d,viewer:u}=s,{Mesh:h,VBOGeometry:p,math:A}=d,{scene:f}=u,{primitive:m,positions:g,indices:y}=DRt({text:e,size:t*l,zOffset:n});let v=g[0],w=g[0];for(let P=0;P<g.length;P+=3){const R=g[P];R<v&&(v=R),R>w&&(w=R)}const x=-(w-v)/2,k=A.mat4(),B=A.translationMat4v([x,t*c,0]);A.mulMat4(o,A.rotationMat4v(Math.PI,[0,1,0],A.mat4()),k),A.mulMat4(o,B),A.mulMat4(k,B);const E=new p(f,{primitive:m,positions:g,indices:y});return[new h(f,{geometry:E,material:r,pickable:!1,origin:a,matrix:o}),new h(f,{geometry:E,material:r,pickable:!1,origin:a,matrix:k})]}class _Rt{constructor(e,t,o){this.plugin=e;const{viewer:n}=e;this.line=null,this.texts=null,this.length=0;const{math:r,worldToRTCPos:a,Node:s,PhongMaterial:l}=e.xeokitSdk,c=r.vec3(),d=r.vec3();a(t,d,c),this.material=new l(n.scene,{emissive:Xp(e.defaultColor)}),this.node=new s(n.scene,{pickable:!1,origin:d,children:[]}),this.origin=d,this.p1=c,this.normal=o}move(e,t){const{arrowSizeRatio:o,offsetRatio:n,xeokitSdk:r,viewer:a}=this.plugin,{math:s,Mesh:l,VBOGeometry:c}=r,{scene:d}=a,u=this.p1;this.p2=s.subVec3(e,this.origin),this.node.removeChildren(),this.line?.destroy();const h=s.subVec3(e,u,s.vec3());if(h.every(Ce=>Ce===0))return;const p=s.normalizeVec3(h,s.vec3()),A=s.mulVec3Scalar(p,-1,s.vec3()),f=s.lenVec3(h);this.length=f;const m=n*f;let g=0;const y=s.mulVec3Scalar(h,.5,s.vec3()),v=s.addVec3(u,y,s.vec3());let w=s.normalizeVec3(s.cross3Vec3(t,s.normalizeVec3(h,s.vec3()),s.vec3()));const x=s.dotVec3(t,this.normal)>.999,k=s.vec3([0,1,0]),B=s.dotVec3(p,k);if(x){const Ce=Math.abs(B)<.01;g=m;let De=null;if(Ce){const{look:Fe,up:ve,eye:ge}=d.camera,we=s.normalizeVec3(s.subVec3(Fe,ge,s.vec3())),Le=s.cross3Vec3(we,ve);De=s.dotVec3(p,Le)}else{const Fe=s.cross3Vec3(k,t,s.vec3());De=s.dotVec3(p,Fe)}De<0&&(w=s.negateVec3(w),g=-g)}else if(Math.abs(B)>.99){const{look:Ce,eye:De}=d.camera,Fe=s.normalizeVec3(s.subVec3(Ce,De,s.vec3()));w=s.normalizeVec3(s.cross3Vec3(p,Fe,s.vec3())),t=s.normalizeVec3(s.cross3Vec3(w,p,s.vec3()))}else t=s.normalizeVec3(s.cross3Vec3(k,p,s.vec3())),w=s.normalizeVec3(s.cross3Vec3(p,t,s.vec3())),s.dotVec3(w,k)<0&&(w=s.negateVec3(w));const E=s.negateVec3(w,s.vec3()),P=s.mulVec3Scalar(w,f*o,s.vec3()),R=s.mulVec3Scalar(E,f*o,s.vec3()),T=s.addVec3(u,P,s.vec3()),L=s.addVec3(u,R,s.vec3()),F=s.addVec3(e,P,s.vec3()),U=s.addVec3(e,R,s.vec3()),q=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(w,p,s.vec3())),f*o*Math.SQRT2),V=s.addVec3(u,q,s.vec3()),W=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(E,p,s.vec3())),f*o*Math.SQRT2),Y=s.addVec3(u,W,s.vec3()),$=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(w,A,s.vec3())),f*o*Math.SQRT2),me=s.addVec3(e,$,s.vec3()),Ie=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(E,A,s.vec3())),f*o*Math.SQRT2),Se=s.addVec3(e,Ie,s.vec3()),qe=s.translationMat4v(s.mulVec3Scalar(t,m,s.vec3()));this.line=new l(a.scene,{geometry:new c(a.scene,{primitive:"lines",positions:[...u,...e,...T,...L,...F,...U,...V,...Y,...me,...Se],indices:[0,1,0,2,0,3,0,6,0,7,1,4,1,5,1,8,1,9]}),material:this.material,matrix:qe,pickable:!1,origin:this.origin}),this.node.addChild(this.line),this.texts?.forEach(Ce=>Ce.destroy());const Qe=s.mat4([...p,0,...w,0,...t,0,...v,1]);this.texts=this._makeTexts(f.toFixed(2)+" m",f,Qe,g),this.texts.forEach(Ce=>this.node.addChild(Ce))}_makeTexts(e,t,o,n=0){return OW(this,{content:e,size:t,matrix:o,offset:n})}destroy(){this.node.destroy(),this.line?.destroy(),this.texts?.forEach(e=>e.destroy()),this.plugin.measurements=this.plugin.measurements.filter(e=>e!==this)}get visible(){return this.node.visible}set visible(e){this.node.visible=e}get color(){return DW(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=Xp(e)}}class UW{constructor(e,t,o={}){this.viewer=e,this.xeokitSdk=t,this.arrowSizeRatio=o.arrowSizeRatio??.04,this.textSizeRatio=o.textSizeRatio??.1,this.textBottomMarginRatio=o.textBottomMarginRatio??.02,this.offsetRatio=o.offsetRatio??.003,this.snapPickRadius=o.snapPickRadius??15,this.defaultColor=o.defaultColor??"#ffffff";const n=document.createElement("img"),r=e.scene.canvas.canvas;r.parentNode.insertBefore(n,r),n.style.width="28px",n.style.height="28px",n.style.position="absolute",n.style.pointerEvents="none",n.style.transform="translate(-50%, -50%)",n.style.display="none",this.imgElement=n,this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new FRt(this)}on(e,t){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=t,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class FRt{constructor(e){this.plugin=e,this.currentMeasurement=null,this.lastPosition=null,this.mouseDown=!1,this.dragging=!1,this.activated=!1}_updateCursor(e){const{imgElement:t,viewer:o}=this.plugin,{scene:n}=o;n.canvas.canvas.style.cursor=`url("${RRt}") 16 16, auto`;const r=n.pick({canvasPos:e,snapRadius:this.plugin.snapPickRadius,snapToEdge:!0,snapToVertex:!0});if(r?.snappedWorldPos||r?.worldPos){if(r.snappedCanvasPos)t.style.left=`${r.snappedCanvasPos[0]}px`,t.style.top=`${r.snappedCanvasPos[1]}px`,t.src=r.snapType==="vertex"?IRt:PRt;else{const a=r.canvasPos;t.style.left=`${a[0]}px`,t.style.top=`${a[1]}px`,t.src=SRt}this.lastPosition=r.snappedWorldPos??r.worldPos,this.lastPosition.worldNormal=r.snappedWorldNormal??r.worldNormal}else t.style.left=`${e[0]}px`,t.style.top=`${e[1]}px`,t.src=TRt,this.lastPosition=null}_onMouseMove(e){this.mouseDown&&(this.dragging=!0),e.preventDefault(),this._updateCursor([e.offsetX,e.offsetY]),this.lastPosition&&this.currentMeasurement?.move(this.lastPosition,this.lastPosition.worldNormal)}_onMouseDown(){this.mouseDown=!0}_onMouseUp(){this.mouseDown=!1;const e=this.dragging;this.dragging=!1,!e&&this.lastPosition&&(this.currentMeasurement?(this.plugin.measurements.push(this.currentMeasurement),Object.values(this.plugin.measurementEndCallbacks).forEach(t=>t?.(this.currentMeasurement)),this.currentMeasurement=null):this.currentMeasurement=new _Rt(this.plugin,this.lastPosition,this.lastPosition.worldNormal))}activate(){if(this.activated)return;const{canvas:e}=this.plugin.viewer.scene.canvas;this.plugin.imgElement.style.display="block";const t=this._onMouseMove.bind(this),o=this._onMouseDown.bind(this),n=this._onMouseUp.bind(this);e.addEventListener("mousemove",t),e.addEventListener("mousedown",o),document.addEventListener("mouseup",n),this._unsubscribe=()=>{e.removeEventListener("mousemove",t),e.removeEventListener("mousedown",o),document.removeEventListener("mouseup",n)},this.activated=!0}deactivate(){this.activated&&(this._unsubscribe?.(),this.currentMeasurement?.destroy(),this.currentMeasurement=null,this.lastPosition=null,this.plugin.imgElement.style.display="none",this.activated=!1)}}class ORt{constructor(e,t){this.plugin=e;const{xeokitSdk:o,viewer:n}=e,{Mesh:r,ReadableGeometry:a,buildSphereGeometry:s,PhongMaterial:l,Node:c,math:d,worldToRTCPos:u}=o,h=d.vec3(),p=d.vec3();this._length=0;const{entity:A,worldPos:f}=t;u(f,p,h);const m=new l(n.scene,{emissive:Xp(e.defaultColor),diffuse:[0,0,0]}),g=(k=!0)=>new r(n.scene,{geometry:new a(n.scene,s({radius:.03})),material:m,pickable:!1,visible:k,origin:p}),y=g(),v=g(!1),w=new r(n.scene,{geometry:new a(n.scene,{primitive:"lines",positions:[0,0,0,0,0,0],indices:[0,1]}),material:m,pickable:!1,visible:!1,origin:p}),x=new c(n.scene,{pickable:!1,visible:!0,position:h,origin:p,children:[y,w,v]});this.origin=p,this.modelId=A.model.id,this.node=x,this.toSphere=v,this.fromSphere=y,this.line=w,this.material=m}show(e){const{node:t,fromSphere:o,toSphere:n,line:r,texts:a,plugin:s}=this,{math:l}=s.xeokitSdk;t.position=l.subVec3(e.worldPos,t.origin,l.vec3()),t.visible=!0;const{viewer:c}=s,d=c.scene.pick({pickSurface:!0,origin:e.worldPos,direction:e.worldNormal});if(a&&(a.forEach(u=>u.destroy()),this.texts=null),d){n.visible=!0,r.visible=!0,n.position=l.subVec3(d.worldPos,n.origin,l.vec3()),n.position=l.subVec3(n.position,t.position,l.vec3()),r.position=l.vec3().set(t.position),r.geometry.positions=[0,0,0,...n.position];const u=l.lenVec3(n.position);this._length=u;const h=o.position,p=n.position,A=l.subVec3(p,h,l.vec3()),f=l.normalizeVec3(A,l.vec3()),m=l.mulVec3Scalar(A,.5,l.vec3()),g=l.addVec3(h,m,l.vec3()),y=[0,1,0],v=l.dotVec3(f,y),w=Math.abs(v)>.9;let x;if(w){const k=l.normalizeVec3(l.subVec3(c.scene.camera.eye,c.scene.camera.look,l.vec3()),l.vec3()),B=l.normalizeVec3(l.cross3Vec3(k,f,l.vec3()),l.vec3()),E=l.normalizeVec3(l.cross3Vec3(B,f,l.vec3()),l.vec3());x=l.mat4([...f,0,...B,0,...E,0,...g,1])}else{const k=l.normalizeVec3(l.cross3Vec3(y,f,l.vec3()),l.vec3()),B=l.normalizeVec3(l.cross3Vec3(f,k,l.vec3()),l.vec3());x=l.mat4([...f,0,...B,0,...k,0,...g,1])}this.texts=this._makeTexts(u.toFixed(2)+" m",u,x),this.texts.forEach(k=>t.addChild(k))}else n.visible=!1,r.visible=!1,this._length=0}hide(){this.node.visible=!1}destroy(){this.node.destroy(),this.line.destroy(),this.fromSphere.destroy(),this.toSphere.destroy(),this.texts?.forEach(e=>e.destroy())}set length(e){this._length=e}get length(){return this.visible?this._length:0}get visible(){return this.node.visible===!0}set visible(e){this.node.visible=!!e}get color(){return DW(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=Xp(e)}_makeTexts(e,t,o){return OW(this,{content:e,size:t,matrix:o})}}class NW{constructor(e,t,o={}){this.viewer=e,this.xeokitSdk=t,this.textSizeRatio=o.textSizeRatio??.1,this.textBottomMarginRatio=o.textBottomMarginRatio??.01,this.defaultColor=o.defaultColor??"#ffffff",this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new URt(this)}on(e,t){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=t,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class URt{constructor(e){this.plugin=e,this.currentMeasure=null,this.pickedSpaceMeasureSubscription=null,this.hitHelperMouseMoveSubscription=null}activate(){const{plugin:e}=this,{viewer:t}=e;this.pickedSpaceMeasureSubscription=t.scene.input.on("mouseclicked",()=>{if(!this.currentMeasure?.length)return;const o=this.currentMeasure;this.currentMeasure=null,Object.values(this.plugin.measurementEndCallbacks).forEach(n=>n(o))}),this.hitHelperMouseMoveSubscription=t.scene.input.on("mousemove",o=>{const n=t.scene.pick({canvasPos:o,pickSurface:!0});n?.entity?.model&&(n?((!this.currentMeasure||this.currentMeasure.modelId!==n.entity.model.id)&&(this.currentMeasure?.destroy(),this.currentMeasure=new ORt(this.plugin,n)),this.currentMeasure.show(n)):this.currentMeasure?.hide())})}deactivate(){const{viewer:e}=this.plugin;this.currentMeasure?.destroy(),this.currentMeasure=null,e.scene.input.off(this.pickedSpaceMeasureSubscription),e.scene.input.off(this.hitHelperMouseMoveSubscription)}}const NRt=`onmessage = async event => {
|
|
1379
1379
|
const sources = event.data;
|
|
1380
1380
|
for (const source of sources) {
|
|
1381
1381
|
const response = await fetch(source);
|
|
@@ -5308,5 +5308,5 @@ void main() {
|
|
|
5308
5308
|
--bimdata-local-context-width: ${o.width}px;
|
|
5309
5309
|
--bimdata-local-context-center-width: ${o.centerWidth}px;
|
|
5310
5310
|
--bimdata-local-context-resolution: ${o.resolution};
|
|
5311
|
-
`),onMouseenter:e[0]||(e[0]=(...h)=>o.onMouseEnter&&o.onMouseEnter(...h)),onMouseleave:e[1]||(e[1]=(...h)=>o.onMouseLeave&&o.onMouseLeave(...h))},[S(a,{ref:"modalManagerTemplateRef"},null,512),b("div",Emi,[o.windowPlugins.leftSidePanel?(M(),J(s,{key:0,plugin:o.windowPlugins.leftSidePanel},null,8,["plugin"])):te("",!0),b("div",Pmi,[(M(!0),_($e,null,Bt(o.windowPlugins.free,h=>(M(),J(l,{key:h.name,class:ce({"window-container__content__center__viewer":h.isViewer}),plugin:h},null,8,["class","plugin"]))),128)),S(c,{position:"left",plugins:o.windowPlugins.leftButtonColumn},null,8,["plugins"]),S(c,{position:"right",plugins:o.windowPlugins.rightButtonColumn},null,8,["plugins"])]),o.windowPlugins.rightSidePanel?(M(),J(s,{key:1,plugin:o.windowPlugins.rightSidePanel},null,8,["plugin"])):te("",!0)]),o.loading?(M(),_("div",Imi,[o.spinner&&o.spinner.component?(M(),J(Eo(o.spinner.component),Da(En({key:0},o.spinner.props)),null,16)):(M(),J(d,{key:1,size:"20px",border:"3px"}))])):te("",!0),o.layoutSettingsDisplayed?(M(),_("div",Smi,[S(u)])):te("",!0)],36)}const Rmi=j(Bmi,[["render",Tmi],["__scopeId","data-v-485f288e"]]);class Lmi{constructor(e=!0){const t=b2i(cO,null,{resizable:e});t.registerContent("default",Rmi),this.settings=Er({edit:!1,swap:!1,full:!1}),this.areas=t}get resizable(){return this.areas.resizable}set resizable(e){this.areas.resizable=e}apply(e=null){this.areas.layout=e?w2i(e):null}copy(e,t=!0){return C2i(this.areas.layout,e,t)}open({ratio:e,direction:t,insertAfter:o,windowName:n=null,windowState:r=null,localContextId:a=null}={}){const s=n?{options:{windowName:n,windowState:r}}:null;return a===null?this.areas.splitLayout(e,t,o,s):this.areas.split(a,e,t,o,s)}swap(e,t){return this.areas.swap(e,t)}close(e){return this.areas.delete(e)}compare(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;if(typeof e=="string"&&typeof t=="string")return e===t;if(typeof e=="string"||typeof t=="string")return!1;if(e.windowName&&t.windowName){if(e.windowName!==t.windowName)return!1;const o=new Set(e.windowState?.modelIds),n=new Set(t.windowState?.modelIds);return o.size===n.size&&[...o].every(r=>n.has(r))}return e.windowName||t.windowName||e.direction!==t.direction||e.children.length!==t.children.length?!1:e.children.every((o,n)=>this.compare(o,t.children[n]))}}const Dmi="2.15.0-beta.6",_mi={version:Dmi};let Fmi=1;class Omi{constructor({plugins:e,api:t,ui:o,locale:n="fr"}){this.instanceId=Fmi++,this.pluginManager=new l0i(e),this.windowManager=new d0i,this.windowManager.registerAndAddPluginsToWindows([...this.pluginManager.registeredPlugins.values()]),this.api=new Bgi(t),this.globalContext=new dme(this),this.state=Ngi(this),this.shortcutManager=t1e(this.state),this.uiSettings=o||{},this.i18n=new lme(n),this._contextMenu=null,this.layout=new Lmi(this.uiSettings.resizable!==!1),this._darkTheme=le(o?.darkTheme??!1),this.localContext=null,window.$viewer=this}get darkTheme(){return this._darkTheme.value}set darkTheme(e){this._darkTheme.value=e}get version(){return _mi.version}get locale(){return this.i18n.locale}get contextMenu(){return this._contextMenu||$pe}set contextMenu(e){this._contextMenu=e}get registeredWindows(){return[...this.windowManager.registeredWindows.keys()]}get registeredPlugins(){return[...this.pluginManager.registeredPlugins.keys()]}get pluginsCfg(){return this.pluginManager.cfg}registerPlugin(e){this.pluginManager.registerPlugin(e),this.windowManager.registerAndAddPluginsToWindows([e])}}function Umi(i,e={}){e.backgroundColor&&(i.style.setProperty("--bimdata-viewer-background-color",e.backgroundColor),e.backgroundColor==="transparent"&&i.style.setProperty("--areas-separator-color","transparent")),e.colorPrimary&&i.style.setProperty("--color-primary",e.colorPrimary),e.colorPrimaryLighter&&i.style.setProperty("--color-primary-lighter",e.colorPrimaryLighter),e.colorPrimaryLight&&i.style.setProperty("--color-primary-light",e.colorPrimaryLight),e.colorPrimaryDark&&i.style.setProperty("--color-primary-dark",e.colorPrimaryDark),e.colorSecondary&&i.style.setProperty("--color-secondary",e.colorSecondary),e.colorSecondaryLighter&&i.style.setProperty("--color-secondary-lighter",e.colorSecondaryLighter),e.colorSecondaryLight&&i.style.setProperty("--color-secondary-light",e.colorSecondaryLight),e.colorSecondaryDark&&i.style.setProperty("--color-secondary-dark",e.colorSecondaryDark),e.colorSilverLight&&i.style.setProperty("--color-silver-light",e.colorSilverLight),e.colorSilver&&i.style.setProperty("--color-silver",e.colorSilver),e.colorSilverDark&&i.style.setProperty("--color-silver-dark",e.colorSilverDark),e.colorGraniteLight&&i.style.setProperty("--color-granite-light",e.colorGraniteLight),e.colorGranite&&i.style.setProperty("--color-granite",e.colorGranite),e.colorSuccess&&i.style.setProperty("--color-success",e.colorSuccess),e.colorSuccessLighter&&i.style.setProperty("--color-success-Lighter",e.colorSuccessLighter),e.colorSuccessLight&&i.style.setProperty("--color-success-Light",e.colorSuccessLight),e.colorSuccessDark&&i.style.setProperty("--color-success-Dark",e.colorSuccessDark),e.colorWarning&&i.style.setProperty("--color-warning",e.colorWarning),e.colorWarningLighter&&i.style.setProperty("--color-warning-Lighter",e.colorWarningLighter),e.colorWarningLight&&i.style.setProperty("--color-warning-Light",e.colorWarningLight),e.colorWarningDark&&i.style.setProperty("--color-warning-Dark",e.colorWarningDark),e.colorHigh&&i.style.setProperty("--color-high",e.colorHigh),e.colorHighLighter&&i.style.setProperty("--color-high-lighter",e.colorHighLighter),e.colorHighLight&&i.style.setProperty("--color-high-light",e.colorHighLight),e.colorHighDark&&i.style.setProperty("--color-high-dark",e.colorHighDark),e.colorText&&i.style.setProperty("--color-text",e.colorText),(!e.backgroundColor||e.backgroundColor!=="transparent")&&i.style.setProperty("--areas-separator-color","rgba(216, 216, 216, 1)"),e.headerHeight!=null&&i.style.setProperty("--bimdata-viewer-header-height",e.headerHeight),i.style.setProperty("--areas-background-color","transparent")}const Nmi=Object.freeze({25:"GUEST",50:"USER",100:"ADMIN"}),s2=Object.freeze({READ:"read",WRITE:"write"});function Fhe(i){const e={};return i.forEach(t=>{const[o,n]=t.split(":");e[o]?e[o].push(n):e[o]=[n]}),e}const jmi={token_scopes:[],usable_scopes:[],user_role:25};function Ohe(i=jmi){const e=Fhe(i.token_scopes),t=Fhe(i.usable_scopes);return{...sH(i),tokenScopes:e,usableScopes:t,userRole:Nmi[i.user_role],user:i.user?sH(i.user):null,hasBcfReadPermission:t.bcf?.includes(s2.READ)??!1,hasBcfWritePermission:t.bcf?.includes(s2.WRITE)??!1,hasModelReadPermission:t.model?.includes(s2.READ)??!1,hasModelWritePermission:t.model?.includes(s2.WRITE)??!1,hasDocReadPermission:t.document?.includes(s2.READ)??!1,hasDocWritePermission:t.document?.includes(s2.WRITE)??!1}}const Vmi={back:"Zur\xFCck",BcfFilters:{filtersButton:"Filter",filtersTitle:"Filter",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",creatorsLabel:"Erstellt von",tagsLabel:"Tags",resetButton:"Zur\xFCcksetzen",searchButton:"Suchen",undefined:"Nicht definiert",datePlaceholder:"Erstellungsdatum"},BcfSettings:{title:"BCF-Parameter",text:"Erstellen, f\xFCllen und listen Sie die BCF-Einstellungen auf, die Sie f\xFCr dieses Projekt haben m\xF6chten.",validateButton:"Die BCF-Parameter anerkennen"},BcfStatistics:{emptyText:"F\xFCgen Sie Fragen hinzu, um zugeh\xF6rige Statistiken hier anzuzeigen.",issues:"Probleme",extension:{Priority:"Priorit\xE4t",PriorityNotDefined:"Keine Priorit\xE4t",PriorityTitle:"Priorit\xE4ten",Status:"Status",StatusNotDefined:"Kein Status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priorit\xE4t",noPriority:"Keine",assignedTo:"Zugewiesen an",elements:"Elemente",notSpecified:"Nicht definiert",see:"Anzeigen"},BcfTopicCreationCard:{text:"Ein neues BCF-Thema erstellen",createBcfSideTitle:"Ein Problem melden"},BcfTopicForm:{dragDropImageText:"Bitte w\xE4hlen Sie eine Datei aus.",addObjectButton:"Objekt",addAnnotationButton:"Annotation",annotationButtonTooltip:"Zu diesem Thema gibt es derzeit keine Ansichten.",addPictureButton:"F\xFCgen Sie ein Bild hinzu.",titlePlaceholder:"Titel *",titleErrorMessage:"Titel fehlt",typeLabel:"Typ",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",dueDateLabel:"F\xE4lligkeitsdatum (TT.MM.JJJJ)",descriptionLabel:"Beschreibung",labelsLabel:"Tags",createButton:"Best\xE4tigen",updateButton:"\xC4nderungen \xFCbernehmen",modalText:"Sie sind dabei, die Bearbeitung der Ausgabe {Name} zu beenden, aber es gibt noch ungespeicherte \xC4nderungen.",cancelButton:"\xC4nderungen verwerfen",continueButton:"\xC4nderungen fortsetzen",createTitle:"Ein Problem melden",dragDropImageTextTablet:"Foto machen",takeSnapshot:"Mach einen Schnappschuss",importFile:"Eine Datei importieren",searchPlaceholder:"Suchen",emptySearch:"kein Ergebnis",documentsLabel:"Dokumente",documentsCount:"Dokumente \u2013 {count} ausgew\xE4hlte Dokumente",groupsLabel:"Berechtigungen",groupsCount:"Berechtigungen \u2013 {count} ausgew\xE4hlte Gruppen",groupsText:"W\xE4hlen Sie die Benutzergruppen aus, die dieses Thema sehen und damit interagieren d\xFCrfen.",validate:"Best\xE4tigen"},BcfTopicOverview:{openViewer:"Im Viewer \xF6ffnen",openViewerNoModels:"Es sind keine Vorlagen zur Ansicht bereit",elements:"{count} Elemente",noElements:"kein Element",type:"Typ",noTypeSpecified:"Kein Typ angegeben",description:"Beschreibung",noDescriptionProvided:"Keine Beschreibung angegeben",assignedTo:"Zugeteilt an",notAssigned:"Nicht zugewiesen",dueDate:"F\xE4lligkeitsdatum",noDueDate:"Kein F\xE4lligkeitsdatum",informations:"Informationen",status:"Status",noStatusSpecified:"Kein Status angegeben",stage:"Phase",noStageProvided:"Keine Phase angegeben",priority:"Priorit\xE4t",priorityNotDefined:"Nicht definiert",tags:"Tags",noTags:"Keine Tags",commentButton:"Ein Kommentar ver\xF6ffentlichen",deleteText:"Sie l\xF6schen jetzt {Name}",deleteBcfButton:"Dieses BCF l\xF6schen",keepBcfButton:"Dieses BCF beibehalten",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE4t",status:"Status",title:"Titel",creator:"Autor",date:"Datum"}},BcfTopicActionsCell:{seeButton:"Anzeigen"},BcfTopicComments:{commentButton:"Ein Kommentar verfassen",commentLabel:"Ein Kommentar verfassen",commentText:"Kommentar",cancelButton:"Abbrechen",publishButton:"Ver\xF6ffentlichen",commentsText:"Kommentare",deleteCommentText:"Diesen Kommentar l\xF6schen?",deleteButton:"L\xF6schen",takeSnapshot:"Mach einen Schnappschuss",edited:"bearbeitet"},BcfTopicPriorityCell:{noPriority:"Keine"},SettingCard:{addButton:"ein Element hinzuf\xFCgen",cancelButton:"Abbrechen",validateButton:"Best\xE4tigen",deleteExtensionText:"Diesen Parameter l\xF6schen",deleteButton:"L\xF6schen",title:{Priority:"Priorit\xE4ten",Label:"Tags",Status:"Status",Type:"Typen",Stage:"Phasen"},input:{Priority:"Eine neue Priorit\xE4t hinzuf\xFCgen",Label:"Ein neues Etikett hinzuf\xFCgen",Status:"Einen neuen Status hinzuf\xFCgen",Type:"Einen neuen Typ hinzuf\xFCgen",Stage:"Eine neue Phase hinzuf\xFCgen"},text:{Priority:"Liste der Priorit\xE4ten",Label:"Liste von Tags",Status:"Liste der Status",Type:"Liste der Typen",Stage:"Liste der Phasen"}}},Hmi={BcfComponents:Vmi},zmi={back:"Back",BcfFilters:{filtersButton:"Filters",filtersTitle:"Filters",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",creatorsLabel:"Created by",tagsLabel:"Tags",resetButton:"Reset",searchButton:"Search",undefined:"Not defined",datePlaceholder:"Creation date"},BcfSettings:{title:"BCF Settings",text:"Create, enter in, and list the BCF settings you would like to have for this project",validateButton:"Validate BCF settings"},BcfStatistics:{emptyText:"Add BCF Topics to start to have some stats here.",issues:"issues",extension:{Priority:"Priority",PriorityNotDefined:"No priority",PriorityTitle:"Priorities",Status:"Status",StatusNotDefined:"No status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priority",noPriority:"None",assignedTo:"Assigned to",elements:"Elements",notSpecified:"Not specified",see:"See"},BcfTopicCreationCard:{text:"Create a new BCF topic",createBcfSideTitle:"Report a problem"},BcfTopicForm:{dragDropImageText:"Please select a file",addObjectButton:"Object",addAnnotationButton:"Annotation",annotationButtonTooltip:"This topic has no viewpoint",addPictureButton:"Add a picture",titlePlaceholder:"Title *",titleErrorMessage:"Missing title",typeLabel:"Type",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",dueDateLabel:"Due date",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Validate",updateButton:"Modify this BCF",modalText:"You are about to quit editing issue {name} but there are unsaved changes.",cancelButton:"Discard changes",continueButton:"Continue editing",createTitle:"Report a problem",dragDropImageTextTablet:"Take a picture",takeSnapshot:"Take a snapshot",importFile:"Import a file",searchPlaceholder:"Search",emptySearch:"No result",documentsLabel:"Add a file",documentsCount:"Files - {count} selected files",groupsLabel:"Permissions",groupsCount:"Permissions - {count} selected groups",groupsText:"You are now setting the access rights: choose the user group(s) that will be exclusively authorized to see and interact with this topic.",validate:"Validate"},BcfTopicOverview:{openViewer:"Open in viewer",openViewerNoModels:"No model to open",elements:"{count} Elements",noElements:"No element",type:"Type",noTypeSpecified:"No type specified",description:"Description",noDescriptionProvided:"No description provided",assignedTo:"Assigned to",notAssigned:"Not assigned",dueDate:"Due date",noDueDate:"No due date",informations:"Informations",status:"Status",noStatusSpecified:"No status specified",stage:"Stage",noStageProvided:"No stage provided",priority:"Priority",priorityNotDefined:"Not defined",tags:"Tags",noTags:"No tags",commentButton:"Post a comment",deleteText:"You are about to delete {name}",deleteBcfButton:"Delete this BCF",keepBcfButton:"Keep this BCF",author:"Author"},BcfTopicsTable:{headers:{index:"#",priority:"Priority",status:"Status",title:"Title",creator:"Author",date:"Date"}},BcfTopicActionsCell:{seeButton:"See"},BcfTopicComments:{commentButton:"Post a comment",commentLabel:"Post a comment",commentText:"Comment",cancelButton:"Cancel",publishButton:"Publish",commentsText:"Comments",deleteCommentText:"Delete this comment ?",deleteButton:"Delete",takeSnapshot:"Take a snapshot",edited:"edited"},BcfTopicPriorityCell:{noPriority:"None"},SettingCard:{addButton:"add an element",cancelButton:"Cancel",validateButton:"Validate",deleteExtensionText:"Remove this setting",deleteButton:"Delete",title:{Priority:"Priorities",Label:"Labels",Status:"Status",Type:"Types",Stage:"Stages"},input:{Priority:"Add a new priority",Label:"Add a new label",Status:"Add new status",Type:"Add a new type",Stage:"Add a new stage"},text:{Priority:"Priority list",Label:"Labels list",Status:"Status list",Type:"Type list",Stage:"Stage list"}}},qmi={BcfComponents:zmi},Qmi={back:"Volver",BcfFilters:{filtersButton:"Filtros",filtersTitle:"Filtros",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",creatorsLabel:"Creado por",tagsLabel:"Etiquetas:",resetButton:"Restablecer",searchButton:"Buscar en",undefined:"No definido",datePlaceholder:"Fecha de creaci\xF3n"},BcfSettings:{title:"Par\xE1metros del BCF",text:"Cree, rellene y enumere los par\xE1metros del BCF que desea tener en este proyecto",validateButton:"Validar los par\xE1metros del BCF"},BcfStatistics:{emptyText:"A\xF1ada preguntas para ver las estad\xEDsticas asociadas aqu\xED.",issues:"problemas",extension:{Priority:"Prioridad",PriorityNotDefined:"Sin prioridad",PriorityTitle:"Prioridades",Status:"Estado",StatusNotDefined:"Sin estado",StatusTitle:"Estatutos"}},BcfTopicCard:{priority:"Prioridad",noPriority:"Sin",assignedTo:"Asignado a",elements:"Elementos",notSpecified:"No definido",see:"Ver"},BcfTopicCreationCard:{text:"Crear un nuevo tema BCF",createBcfSideTitle:"Informar de un problema"},BcfTopicForm:{dragDropImageText:"Seleccione un archivo",addObjectButton:"Objeto",addAnnotationButton:"Anotaci\xF3n",annotationButtonTooltip:"Actualmente este tema no posee ning\xFAn punto de vista",addPictureButton:"A\xF1adir una imagen",titlePlaceholder:"T\xEDtulo *",titleErrorMessage:"Falta el t\xEDtulo",typeLabel:"Tipo",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",dueDateLabel:"Fecha de vencimiento (DD/MM/AAAA)",descriptionLabel:"Descripci\xF3n",labelsLabel:"Etiquetas",createButton:"Validar",updateButton:"Modificar este BCF",modalText:"Est\xE1 a punto de salir de la edici\xF3n del problema de {name} pero hay cambios sin guardar.",cancelButton:"Cancelar los cambios",continueButton:"Continuar con los cambios",createTitle:"Informar de un problema",dragDropImageTextTablet:"Tomar una fotograf\xEDa",takeSnapshot:"Tomar un snapshot",importFile:"Importar un archivo",searchPlaceholder:"Buscar",emptySearch:"No hay resultados"},BcfTopicOverview:{openViewer:"Abrir en el visor",openViewerNoModels:"No hay ning\xFAn modelo listo para la visualizaci\xF3n",elements:"{count} Elementos",noElements:"Ning\xFAn elemento",type:"Tipo",noTypeSpecified:"No se especifica el tipo",description:"Descripci\xF3n",noDescriptionProvided:"No hay descripci\xF3n",assignedTo:"Asignado a",notAssigned:"No asignado",dueDate:"Plazo",noDueDate:"Sin fecha de vencimiento",informations:"Informaci\xF3n",status:"Estado",noStatusSpecified:"No se especifica el estado",stage:"Fase",noStageProvided:"No se indica ninguna fase",priority:"Prioridad",priorityNotDefined:"No definido",tags:"Etiquetas",noTags:"Sin etiquetas",commentButton:"Publicar un comentario",deleteText:"Est\xE1s a punto de borrar {name}",deleteBcfButton:"Borrar este BCF",keepBcfButton:"Mantenga este BCF",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Prioridad",status:"Estado",title:"T\xEDtulo",creator:"Autor",date:"Fecha"}},BcfTopicActionsCell:{seeButton:"Ver"},BcfTopicComments:{commentButton:"Publicar un comentario",commentLabel:"Publicar un comentario",commentText:"Comentario",cancelButton:"Cancelar",publishButton:"Publicar",commentsText:"comentarios",deleteCommentText:"\xBFBorrar este comentario?",deleteButton:"Borrar",takeSnapshot:"Tomar un snapshot"},BcfTopicPriorityCell:{noPriority:"Sin"},SettingCard:{addButton:"a\xF1adir un elemento",cancelButton:"Cancelar",validateButton:"Validar",deleteExtensionText:"Borrar esta configuraci\xF3n",deleteButton:"Borrar",title:{Priority:"Prioridades",Label:"Etiquetas:",Status:"Estatutos",Type:"Tipos",Stage:"Fases"},input:{Priority:"A\xF1adir una nueva prioridad",Label:"A\xF1adir una nueva etiqueta",Status:"A\xF1adir un nuevo estado",Type:"A\xF1adir un nuevo tipo",Stage:"A\xF1adir una nueva fase"},text:{Priority:"Lista de prioridades",Label:"Lista de etiquetas",Status:"Lista de estatutos",Type:"Lista de tipos",Stage:"Lista de fases"}}},Gmi={BcfComponents:Qmi},Kmi={back:"Retour",BcfFilters:{filtersButton:"Filtres",filtersTitle:"Filtres",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",creatorsLabel:"Cr\xE9\xE9 par",tagsLabel:"Tags",resetButton:"R\xE9initialiser",searchButton:"Rechercher",undefined:"Non d\xE9fini",datePlaceholder:"Date de cr\xE9ation"},BcfSettings:{title:"Param\xE8tres BCF",text:"Cr\xE9ez, renseignez et listez les param\xE8tres BCF que vous souhaitez avoir sur ce projet",validateButton:"Valider les param\xE8tres BCF"},BcfStatistics:{emptyText:"Ajoutez des questions pour voir les statistiques associ\xE9es ici.",issues:"probl\xE8mes",extension:{Priority:"Priorit\xE9",PriorityNotDefined:"Aucune priorit\xE9",PriorityTitle:"Priorit\xE9s",Status:"Statut",StatusNotDefined:"Aucun statut",StatusTitle:"Statuts"}},BcfTopicCard:{priority:"Priorit\xE9",noPriority:"Aucune",assignedTo:"Assign\xE9 \xE0",elements:"{n} \xC9lements",notSpecified:"Non d\xE9fini",see:"Voir"},BcfTopicCreationCard:{text:"Cr\xE9er un nouveau topic BCF",createBcfSideTitle:"Signaler un probl\xE8me"},BcfTopicForm:{dragDropImageText:"Veuillez s\xE9lectionner un fichier",addObjectButton:"Objet",addAnnotationButton:"Annotation",annotationButtonTooltip:"Ce topic ne poss\xE8de actuellement aucun point de vue",addPictureButton:"Ajouter une image",titlePlaceholder:"Titre *",titleErrorMessage:"Titre manquant",typeLabel:"Type",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",dueDateLabel:"Date d'\xE9ch\xE9ance",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Valider",updateButton:"Modifier ce BCF",modalText:"Vous \xEAtes sur le point de quitter l'\xE9dition de l'issue {name} mais il y'a des modifications non enregistr\xE9es.",cancelButton:"Annuler les modifications",continueButton:"Continuer les modifications",createTitle:"Signaler un probl\xE8me",dragDropImageTextTablet:"Prendre une photo",takeSnapshot:"Prendre un snapshot",importFile:"Importer un fichier",searchPlaceholder:"Rechercher",emptySearch:"Pas de r\xE9sultat",documentsLabel:"Documents",documentsCount:"Documents - {count} documents s\xE9lectionn\xE9s",groupsLabel:"Permissions",groupsCount:"Permissions - {count} groupes s\xE9lectionn\xE9s",groupsText:"S\xE9lectionner les groupes utilisateur qui peuvent voir ce topic et int\xE9ragir avec.",validate:"Valider"},BcfTopicOverview:{openViewer:"Ouvrir dans le viewer",openViewerNoModels:"Il n'y a aucun mod\xE8le pr\xEAt pour une visualisation",elements:"{count} \xC9lements",noElements:"Aucun \xE9l\xE9ment concern\xE9",type:"Type",noTypeSpecified:"Pas de type sp\xE9cifi\xE9",description:"Description",noDescriptionProvided:"Pas de description renseign\xE9e",assignedTo:"Assign\xE9 \xE0",notAssigned:"Non assign\xE9",dueDate:"\xC9ch\xE9ance",noDueDate:"Pas de date d'\xE9ch\xE9ance",informations:"Informations",status:"Statut",noStatusSpecified:"Pas de statut sp\xE9cifi\xE9",stage:"Phase",noStageProvided:"Pas de phase renseign\xE9e",priority:"Priorit\xE9",priorityNotDefined:"Non d\xE9fini",tags:"Tags",noTags:"Pas de tags",commentButton:"Poster un commentaire",deleteText:"Vous \xEAtes sur le point de supprimer {name}",deleteBcfButton:"Supprimer ce BCF",keepBcfButton:"Conserver ce BCF",author:"Auteur"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE9",status:"Statut",title:"Titre",creator:"Auteur",date:"Date"}},BcfTopicActionsCell:{seeButton:"Voir"},BcfTopicComments:{commentButton:"Poster un commentaire",commentLabel:"Poster un commentaire",commentText:"Commentaire",cancelButton:"Annuler",publishButton:"Publier",commentsText:"commentaires",deleteCommentText:"Supprimer ce commentaire ?",deleteButton:"Supprimer",takeSnapshot:"Prendre un snapshot",edited:"edit\xE9"},BcfTopicPriorityCell:{noPriority:"Aucune"},SettingCard:{addButton:"ajouter un \xE9l\xE9ment",cancelButton:"Annuler",validateButton:"Valider",deleteExtensionText:"Supprimmer ce param\xE8tre",deleteButton:"Supprimer",title:{Priority:"Priorit\xE9s",Label:"Tags",Status:"Statuts",Type:"Types",Stage:"Phases"},input:{Priority:"Ajouter une nouvelle priorit\xE9",Label:"Ajouter un nouveau label",Status:"Ajouter un nouveau statut",Type:"Ajouter un nouveau type",Stage:"Ajouter une nouvelle phase"},text:{Priority:"Liste des priorit\xE9s",Label:"Liste des tags",Status:"Liste des statuts",Type:"Liste des types",Stage:"Liste des phases"}}},Jmi={BcfComponents:Kmi},Zmi={back:"Indietro",BcfFilters:{filtersButton:"Filtri",filtersTitle:"Filtri",priorityLabel:"Priorit\xE0",statusLabel:"Stato",stageLabel:"Fase",datePlaceholder:"Data di creazione",assignedToLabel:"Assegnato a",creatorsLabel:"Creato da",tagsLabel:"Etichette",resetButton:"Ripristina",searchButton:"Cerca",undefined:"Non definito"},BcfSettings:{title:"Parametri BCF",text:"Creare, notificare e elencare i parametri BCF che si desidera avere su questo progetto",validateButton:"Conferma i parametri BCF"},BcfStatistics:{emptyText:"Aggiungi delle domande per vedere le statistiche associate qui.",issues:"problemi",extension:{Priority:"Priorit\xE0",PriorityNotDefined:"Nessuna priorit\xE0",PriorityTitle:"Priorit\xE0",Status:"Stato",StatusNotDefined:"Nessuno stato",StatusTitle:"Stati"}},BcfTopicCard:{priority:"Priorit\xE0",noPriority:"Nessuno",assignedTo:"Assegnato a",elements:"Elementi",noElements:"0 elementi",notSpecified:"Non definito",see:"Visualizza"},BcfTopicCreationCard:{text:"Crea un nuovo topic BCF",createBcfSideTitle:"Segnala un problema"},BcfTopicForm:{dragDropImageText:"Selezionare un file",addObjectButton:"Oggetto",addAnnotationButton:"Annotazione",annotationButtonTooltip:"Attualmente questo argomento non presenta alcun punto di vista",addPictureButton:"Aggiungere un'immagine",titlePlaceholder:"Titolo *",titleErrorMessage:"Titolo mancante",typeLabel:"Tipo",priorityLabel:"Priorit\xE0",statusLabel:"Stato",stageLabel:"Fase",assignedToLabel:"Assegnato a",dueDateLabel:"Data di scadenza",descriptionLabel:"Descrizione",labelsLabel:"Tag",createButton:"Conferma",updateButton:"Modificare questo BCF",modalText:"State per abbandonare la modifica di {name} ma ci sono modifiche non salvate.",cancelButton:"Annullare le modifiche",continueButton:"Continuare le modifiche",createTitle:"Segnala un problema"},BcfTopicOverview:{openViewer:"Apri nel visualizzatore",openViewerNoModels:"Non esistono modelli pronti per la visualizzazione",elements:"{count} Elementi",noElements:"Nessun elemento",type:"Tipo",noTypeSpecified:"Nessun tipo specificato",description:"Descrizione",noDescriptionProvided:"Nessuna descrizione inserita",assignedTo:"Assegnato a",notAssigned:"Non assegnato",dueDate:"Scadenza",noDueDate:"Nessuna data di scadenza",informations:"Informazioni",status:"Stato",noStatusSpecified:"Nessuno stato specificato",stage:"Fase",noStageProvided:"Nessuna fase inserita",priority:"Priorit\xE0",priorityNotDefined:"Non definita",tags:"Etichette",noTags:"Nessuna etichetta",commentButton:"Pubblica un commento",deleteText:"Stai per eliminare {name}",deleteBcfButton:"Elimina questo BCF",keepBcfButton:"Conserva questo BCF",author:"Autore"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE0",status:"Stato",title:"Titolo",creator:"Autore",date:"Data"}},BcfTopicActionsCell:{seeButton:"Visualizza"},BcfTopicComments:{commentButton:"Pubblica un commento",commentLabel:"Pubblica un commento",commentText:"Commento",cancelButton:"Annulla",publishButton:"Pubblica",commentsText:"commenti",deleteCommentText:"Eliminare questo commento?",deleteButton:"Elimina"},BcfTopicPriorityCell:{noPriority:"Nessuno"},SettingCard:{addButton:"aggiungi un elemento",cancelButton:"Annulla",validateButton:"Conferma",deleteExtensionText:"Elimina questo parametro",deleteButton:"Elimina",title:{Priority:"Priorit\xE0",Label:"Etichette",Status:"Stati",Type:"Tipi",Stage:"Fasi"},input:{Priority:"Aggiungi una nuova priorit\xE0",Label:"Aggiungi una nuova etichetta",Status:"Aggiungi un nuovo stato",Type:"Aggiungi un nuovo tipo",Stage:"Aggiungi una nuova fase"},text:{Priority:"Elenco delle priorit\xE0",Label:"Elenco delle etichette",Status:"Elenco degli stati",Type:"Elenco dei tipi",Stage:"Elenco delle fasi"}}},Wmi={BcfComponents:Zmi},Ymi={de:Hmi,en:qmi,es:Gmi,fr:Jmi,it:Wmi},Xmi=({apiClient:i,fetchUsers:e,i18nPlugin:t}={})=>({install(o){i?Pi.setup({apiClient:i,fetchUsers:e}):console.error("[BCF Components Plugin] No api client provided. You must provide an api client for the components to work properly."),t?Object.entries(Ymi).forEach(([n,r])=>{t.global.mergeLocaleMessage(n,r)}):console.warn("[BCF Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(t8e).forEach(([n,r])=>{o.component(n,r)})}}),$mi={title:"Building Maker",back:"Zur\xFCck",list:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",createButton:"Neues Projekt",updateButton:"Umbenennen",deleteButton:"L\xF6schen"},form:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",input:"Name des Geb\xE4udes",error:"Ung\xFCltiger Name",createButton:"Erstellen",updateButton:"Best\xE4tigen"},view:{addStoreyButton:"Etage",addPlanButton:"Grundriss",closeButton:"Fertigstellen",submitFilesButton:"Best\xE4tigen"},storeyForm:{title:"Neue Etage",input:"Name",error:"Ung\xFCltiger Name",cancelButton:"Abbrechen",submitButton:"Best\xE4tigen"}},evi={creationFormTitle:"Ordner erstellen",renameFormPlaceholder:"Datei- / Ordnernam",nameInputPlaceholder:"Ordnername",emptyFolder:"Dieser Ordner ist leer",newFolderSuccess:"Neuer Ordner erstellt",renameFolderSuccess:"Umbenannter Ordner",deleteFolderSuccess:"Ordner gel\xF6scht",newFileSuccess:"Datei hinzugef\xFCgt",renameFileSuccess:"Umbenannte Datei",deleteFileSuccess:"Datei gel\xF6scht",nameInputErrorMessage:"Ung\xFCltiger name",cancel:"Abbrechen",submit:"Best\xE4tigen",buttonText:"Neuer Ordner",addFileButtonText:"Datei laden",rename:"Umbenennen",view:"Sehen",download:"Herunterladen",delete:"L\xF6schen",deleteTitle:"Dateien l\xF6schen",deleteDetail:"Sie sind im Begriff, die folgenden Dateien / Ordner endg\xFCltig zu l\xF6schen"},tvi={BuildingMaker:$mi,FileManager:evi},ivi={t:{back:"Back",cancel:"Cancel",create:"Create",delete:"Delete",download:"Download",finish:"Finish",rename:"Rename",search:"Search",see:"View",storey:"Storey",validate:"Validate"}},ovi={title:"Building Maker",list:{text:"Create and edit storeys, then download your PDFs.",new:"New project"},form:{input:"Building name",error:"Invalid"},view:{addStorey:"Add Storey",addFile:"Add File",addPlan:"Add Plan"},storeyForm:{title:"New storey",input:"Name",error:"Invalid name"}},rvi={creationFormTitle:"Create folder",renameFormPlaceholder:"Folder/File name",nameInputPlaceholder:"Folder name",emptyFolder:"This folder is empty",newFolderSuccess:"New folder created",renameFolderSuccess:"Folder renamed",deleteFolderSuccess:"Folder deleted",newFileSuccess:"File added",renameFileSuccess:"File renamed",deleteFileSuccess:"File deleted",nameInputErrorMessage:"Invalid name",buttonText:"New folder",addFileButtonText:"Upload a file",deleteTitle:"Deleting Files",deleteDetail:"You are about to permanently delete the following files / folders",dmsRoot:"Root of the project's DMS",pdfPageSelectorTitle:"Select a page"},nvi={title:"Meta-Building Structure",tab:{structure:"Structure",zones:"Zones",equipments:"Equipments"},StoreySelector:{placeholder:"Select a storey"}},avi={title:"Photosphere Building"},svi={BIMDataComponents:ivi,BuildingMaker:ovi,FileManager:rvi,MetaBuildingStructure:nvi,PhotosphereBuilding:avi},lvi={title:"Building Maker",back:"Vuelta",list:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",createButton:"Nuevo proyecto",updateButton:"Renombrar",deleteButton:"Suprimir"},form:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",input:"Nombre del edificio",error:"Nombre no v\xE1lido",createButton:"Crear",updateButton:"Validar"},view:{addStoreyButton:"Piso",addPlanButton:"Plano",closeButton:"Terminar",submitFilesButton:"Validar"},storeyForm:{title:"Nuevo piso",input:"Nombre",error:"Nombre no v\xE1lido",cancelButton:"Anular",submitButton:"Validar"}},cvi={creationFormTitle:"Crear un archivo",renameFormPlaceholder:"Nombre de archivo / carpeta",nameInputPlaceholder:"Nombre de la carpeta",emptyFolder:"Esta carpeta est\xE1 vac\xEDa",newFolderSuccess:"Nueva carpeta creada",renameFolderSuccess:"Carpeta renombrada",deleteFolderSuccess:"Carpeta eliminada",newFileSuccess:"Archivo agregado",renameFileSuccess:"Archivo renombrado",deleteFileSuccess:"Archivo eliminado",nameInputErrorMessage:"Nombre inv\xE1lida",cancel:"Cancelar",submit:"Validar",buttonText:"Carpeta nueva",addFileButtonText:"Cargar un archivo",rename:"Renombrar",view:"Ver",download:"Descargar",delete:"Borrar",deleteTitle:"Eliminar archivos",deleteDetail:"Est\xE1 a punto de eliminar permanentemente los siguientes archivos / carpetas"},dvi={BuildingMaker:lvi,FileManager:cvi},uvi={t:{back:"Retour",cancel:"Annuler",create:"Cr\xE9er",delete:"Supprimer",download:"T\xE9l\xE9charger",finish:"Terminer",rename:"Renommer",search:"Rechercher",see:"Voir",storey:"\xC9tage",validate:"Valider"}},hvi={title:"Building Maker",list:{text:"Cr\xE9ez et \xE9ditez les \xE9tages puis t\xE9l\xE9chagez vos PDF.",new:"Nouveau projet"},form:{input:"Nom du b\xE2timent",error:"Nom invalide"},view:{addStorey:"Ajouter un \xC9tage",addFile:"Ajouter un fichier",addPlan:"Ajouter un plan"},storeyForm:{title:"Nouvel \xE9tage",input:"Nom",error:"Nom invalide"}},pvi={creationFormTitle:"Cr\xE9er un dossier",renameFormPlaceholder:"Nom du fichier/dosier",nameInputPlaceholder:"Nom du dossier",emptyFolder:"Ce dossier est vide",newFolderSuccess:"Nouveau dossier cr\xE9\xE9",renameFolderSuccess:"Dossier renomm\xE9",deleteFolderSuccess:"Dossier supprim\xE9",newFileSuccess:"Fichier ajout\xE9",renameFileSuccess:"Fichier renomm\xE9",deleteFileSuccess:"Fichier supprim\xE9",nameInputErrorMessage:"Nom invalide",buttonText:"Nouveau dossier",addFileButtonText:"Charger un fichier",deleteTitle:"Supression de fichiers",deleteDetail:"Vous \xEAtes sur le point de supprimer d\xE9finitivement les fichiers/dossiers suivants",dmsRoot:"Racine de la GED du projet",pdfPageSelectorTitle:"S\xE9lectionner une page"},fvi={title:"Structure M\xE9ta-Building",tab:{structure:"Structure",zones:"Zones",equipments:"\xC9quipements"},StoreySelector:{placeholder:"S\xE9lectionner un \xE9tage"}},Avi={title:"Photosph\xE8re Building"},gvi={BIMDataComponents:uvi,BuildingMaker:hvi,FileManager:pvi,MetaBuildingStructure:fvi,PhotosphereBuilding:Avi},mvi={title:"Building Maker",back:"Reso",list:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",createButton:"Nuovo progetto",updateButton:"Rinominare",deleteButton:"Eliminare"},form:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",input:"Nome della costruzione",error:"Nome non corretto",createButton:"Creare",updateButton:"Convalidare"},view:{addStoreyButton:"Piano",addPlanButton:"Mappa",closeButton:"Finire",submitFilesButton:"Convalidare"},storeyForm:{title:"Nuovo piano",input:"Nome",error:"Nome non corretto",cancelButton:"Annullare",submitButton:"Convalidare"}},vvi={creationFormTitle:"Crea una cartella",renameFormPlaceholder:"Nome file/cartella",nameInputPlaceholder:"Nome della cartella",emptyFolder:"Questa cartella \xE8 vuota",newFolderSuccess:"Nuova cartella creata",renameFolderSuccess:"Cartella rinominata",deleteFolderSuccess:"Cartella eliminata",newFileSuccess:"File aggiunto",renameFileSuccess:"File rinominato",deleteFileSuccess:"File cancellato",nameInputErrorMessage:"Nome non valido",cancel:"Annulla",submit:"Invia",buttonText:"Nuova cartella",addFileButtonText:"Carica un file",rename:"Rinominare",view:"Vedere",download:"Scaricare",delete:"Cancellare",deleteTitle:"Eliminazione di file",deleteDetail:"Stai per eliminare definitivamente i seguenti file/cartelle"},yvi={BuildingMaker:mvi,FileManager:vvi},bvi={de:tvi,en:svi,es:dvi,fr:gvi,it:yvi},wvi=({i18nPlugin:i}={})=>({install(e){i?Object.entries(bvi).forEach(([t,o])=>{i.global.mergeLocaleMessage(t,o)}):console.warn("[BIMData Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(vJt).forEach(([t,o])=>{e.component(t,o)})}}),Cvi={beforeMount(i,e){if(typeof e.value!="function")throw Error(`click away directive needs function, got ${typeof e.value}`);i.clickAwayHandler=t=>{(t.path||t.composedPath&&t.composedPath()).find(o=>o===i)||e.value()},window.addEventListener("mousedown",i.clickAwayHandler,!0)},unmounted(i){window.removeEventListener("mousedown",i.clickAwayHandler,!0),delete i.clickAwayHandler}},xvi=Object.freeze(Object.defineProperty({__proto__:null,BIMDataClickAway:Cs,BIMDataClickInputAway:Cvi},Symbol.toStringTag,{value:"Module"})),kvi=i=>({install(e){Object.entries(QKe).forEach(([t,o])=>{e.component(t,o)}),Object.entries(xvi).forEach(([t,o])=>e.directive(t.split("BIMData")[1],o))}}),Mvi={name:"LiWrapper",render(){return Go("li",this.$slots.default())}};function Bvi(i,e){var t=new Set([]);return i.forEach(o=>{e.has(o)||t.add(o)}),t}const Xs=Ur("id"),Evi=({contextMenu:i,objects:e=[],state:t=i.$viewer.state,pictos:o})=>[{name:"selectAll",get group(){return i.groupPositions.select},position:1,get label(){return i.$t("context_menu.select_all")},get picto(){return o.get(this.name)},execute:()=>t.selectObjects(e.filter(us(Ci("visible"),Ud("selected"))).map(Xs)),predicate:()=>e.some(us(Ci("visible"),Ud("selected")))},{name:"deselectAll",get group(){return i.groupPositions.select},position:2,get label(){return i.$t("context_menu.deselect_all")},get picto(){return o.get(this.name)},execute:()=>t.deselectObjects(e.filter(Ci("selected")).map(Xs)),predicate:()=>e.some(Ci("selected"))},{name:"selectSimilar",get group(){return i.groupPositions.select},position:3,get label(){return i.$t("context_menu.select_similar")},get picto(){return o.get(this.name)},execute(){const n=e.filter(r=>r.visible&&r.type===this.selectedObject.type&&r.id!==this.selectedObject.id).map(Xs);t.selectObjects(n)},selectedObject:null,predicate(){const n=e.filter(us(Ci("visible"),Ci("selected")));return n.length===1&&n[0].type!==void 0?(this.selectedObject=n[0],!0):(this.selectedObject=null,!1)}},{name:"reverseSelection",get label(){return i.$t("context_menu.reverse_selection")},get group(){return i.groupPositions.select},position:4,execute:()=>{const n=new Set(e.filter(Ci("selected")).map(Xs)),r=new Set(e.filter(Ci("visible")).map(Xs));t.selectObjects(Array.from(Bvi(r,n)),{exclusive:!0})},predicate:()=>e.some(us(Ud("selected"),Ci("visible")))&&e.some(us(Ci("selected"),Ci("visible")))},{name:"showAll",get group(){return i.groupPositions.visibility},position:1,get label(){return i.$t("context_menu.show_all")},get picto(){return o.get(this.name)},execute:()=>t.showObjects(e.filter(Ud("visible")).map(Xs)),predicate:()=>e.some(Ud("visible"))},{name:"hide",get group(){return i.groupPositions.visibility},position:2,get label(){return i.$t("context_menu.hide")},get picto(){return o.get(this.name)},objectsToHide:null,execute(){const n=this.objectsToHide.filter(Ci("selected"));n.length>0&&t.deselectObjects(n.map(Xs)),t.hideObjects(this.objectsToHide.map(Xs))},predicate(){return this.objectsToHide=e.filter(us(Ci("selected"),Ci("visible"))),this.objectsToHide.length>0}},{name:"hideAll",get group(){return i.groupPositions.visibility},position:3,get label(){return i.$t("context_menu.hide_all")},execute:()=>{const n=e.filter(Ci("visible"));n.some(Ci("selected"))&&t.deselectObjects(n.filter(Ci("selected")).map(Xs)),t.hideObjects(n.map(Xs))},predicate:()=>e.some(Ci("visible"))}].filter(n=>n.predicate()),Pvi={components:{LiWrapper:Mvi},inject:["$viewer"],data(){return{defaultPrevented:!1,displayed:!1,top:null,bottom:null,left:null,width:200,nextCommandId:1,currentCommands:[],contextCommands:[],registeredCommands:[],groupPositions:{select:10,visibility:20},asyncPredicateRunning:!1}},computed:{position(){return{top:this.top?this.top+"px":"unset",bottom:this.bottom?this.bottom+"px":"unset",left:this.left+"px",width:this.width+"px"}}},watch:{displayed(i){i?document.addEventListener("keydown",this.onKeyDown):document.removeEventListener("keydown",this.onKeyDown)}},created(){this.$viewer.contextMenu=this,this.asyncPredicates=new Set},methods:{onKeyDown(i){i.key==="Escape"&&this.away()},setPosition(i){const e=(document.fullscreenElement?document.fullscreenElement:this.$parent.$el).getBoundingClientRect();this.left=i.clientX-e.left,this.top=i.clientY-e.top,this.left+this.width>e.width&&(this.left=this.left-this.width),i.clientY>e.top+e.height/2?(this.bottom=e.height-this.top,this.top=null):this.bottom=null},typeCheckCommand(i={}){let e=null;if((!i.execute||typeof i.execute!="function")&!i.component&&(e="Cannot register context menu command. A command must have an execute function or a component property."),i.label||(e="Cannot register context menu command. A command must have a label."),e)throw console.error(e),new Error(e);return i.id=this.nextCommandId++,i},open(i){this.currentCommands=[],this.setPosition(i),this.originEvent=i,i.preventDefault(),this.setCurrentCommands(),this.groupCurrentCommands(),this.defaultPrevented=!1,this.displayed=!0,document.fullscreenElement?(this.$el.parentElement.removeChild(this.$el),this.adoptiveParent=document.fullscreenElement,this.adoptiveParent.appendChild(this.$el)):this.adoptiveParent&&this.adoptiveParent!==this.$viewer.globalContext.el&&(this.adoptiveParent.removeChild(this.$el),this.$viewer.globalContext.el.appendChild(this.$el),this.adoptiveParent=null)},setCurrentCommands(){this.asyncPredicates.clear(),this.asyncPredicateRunning=!1,this.defaultPrevented||this.registeredCommands.forEach(async i=>{if(typeof i.predicate=="function"){const e=i.predicate(this.$viewer.globalContext.activeLocalContext);if(e===!0)this.currentCommands.push(i);else if(typeof e?.then=="function"){this.asyncPredicates.add(e),this.asyncPredicateRunning=!0;const t=await e;this.asyncPredicates.has(e)&&(this.asyncPredicates.delete(e),this.asyncPredicateRunning=this.asyncPredicates.size>0,t===!0&&this.currentCommands.push(i))}}else this.currentCommands.push(i)}),this.currentCommands.push(...this.contextCommands),this.contextCommands=[]},getDefaultCommands({objects:i=[],state:e=this.$viewer.state,context:t=null}){const o=new Map;return t&&this.$viewer.shortcutManager.getShortcuts(t).forEach(n=>o.set(n.name,n.key)),Evi({contextMenu:this,objects:i,state:e,pictos:o})},executeCommand(i){if(i.execute&&(i.execute(this.originEvent),this.displayed=!1),i.component&&!i.menu)throw new Error("Command with component property must have a `menu` property")},away(){this.displayed=!1},groupCurrentCommands(){const i=new Map;this.currentCommands.forEach(t=>{(t.group===null||t.group===void 0)&&(t.group=0),i.has(t.group)?i.get(t.group).push(t):i.set(t.group,[t])}),i.forEach(t=>t.sort((o,n)=>(o.position=o.position||0,n.position=n.position||0,o.position-n.position)));const e=[...i.keys()].sort((t,o)=>t-o).map(t=>i.get(t)).flat();this.currentCommands=e},isGroupIntersection(i){if(i===0)return!1;const e=this.currentCommands[i-1],t=this.currentCommands[i];return e.group<t.group},registerContextCommand(i){const e=this.typeCheckCommand(i);return this.contextCommands.push(e),i.id},registerCommand(i){const e=this.typeCheckCommand(i);return this.registeredCommands.push(e),i.id},unregisterCommand(i){return this.registeredCommands.find(e=>e.id===i)?(this.registeredCommands=this.registeredCommands.filter(e=>e.id!==i),!0):!1},preventDefault(){this.defaultPrevented=!0}}},Ivi={key:0,class:"separator"},Svi={class:"menu-text"},Tvi={key:1,class:"menu-picto"},Rvi={key:0,class:"context-menu__spinner"};function Lvi(i,e,t,o,n,r){const a=I("BIMDataIconChevron"),s=I("LiWrapper"),l=I("BIMDataSpinner"),c=si("click-away");return n.displayed&&(n.currentCommands.length||n.asyncPredicateRunning)?yt((M(),_("ul",{key:0,class:"bimdata-list context-menu",style:de(r.position)},[(M(!0),_($e,null,Bt(n.currentCommands,(d,u)=>(M(),J(s,{key:d.label,class:"context-menu__element",onClick:h=>r.executeCommand(d)},{default:N(()=>[r.isGroupIntersection(u)?(M(),_("div",Ivi)):te("",!0),b("div",Svi,z(d.label),1),!d.component&&d.picto?(M(),_("span",Tvi,z(d.picto),1)):d.component?(M(),J(a,{key:2,size:"xxs",class:"fill-primary"})):te("",!0)]),_:2},1032,["onClick"]))),128)),n.asyncPredicateRunning?(M(),_("li",Rvi,[S(l)])):te("",!0)],4)),[[c,r.away]]):te("",!0)}const Dvi=j(Pvi,[["render",Lvi],["__scopeId","data-v-5b87d4a3"]]),_vi={name:"ViewerHeader",inject:["$viewer"],props:{visible:{type:Boolean,default:!0}},setup(){const i=ct("$viewer"),e=Er(new Map),t=n=>{if(!n.name)throw new TypeError("[Viewer Header] Content must have a name");if(e.has(n.name))throw new Error(`[Viewer Header] Content with name ${n.name} already exists`);e.set(n.name,n)},o=n=>e.has(n)?(e.delete(n),!0):!1;return{logo:i.uiSettings.bimdataLogo!==!1,version:i.uiSettings.version!==!1?i.version:null,headerContent:e,headerRightContentComponents:Re(()=>Array.from(e.values()).filter(n=>n.position==="right").sort((n,r)=>n.order-r.order).map(n=>n.component)),headerLeftContentComponents:Re(()=>Array.from(e.values()).filter(n=>n.position==="left").sort((n,r)=>n.order-r.order).map(n=>n.component)),addContent:t,removeContent:o}}},Fvi={class:"viewer-header"},Ovi={class:"viewer-header__content"},Uvi={class:"viewer-header__content__left"},Nvi={class:"viewer-header__content__right"},jvi={key:0,class:"m-l-6 flex items-center"},Vvi={key:1,class:"viewer-header__version"};function Hvi(i,e,t,o,n,r){const a=I("BIMDataIllustration");return yt((M(),_("div",Fvi,[b("div",Ovi,[b("div",Uvi,[(M(!0),_($e,null,Bt(o.headerLeftContentComponents,s=>(M(),J(Eo(s),{key:s.name}))),128))]),b("div",Nvi,[(M(!0),_($e,null,Bt(o.headerRightContentComponents,s=>(M(),J(Eo(s),{key:s.name}))),128))])]),o.logo||o.version?(M(),_("div",jvi,[o.logo?(M(),J(a,{key:0,name:"logo",width:"30px",height:"30px"})):te("",!0),o.version?(M(),_("div",Vvi,z(o.version),1)):te("",!0)])):te("",!0)],512)),[[zt,t.visible]])}const zvi=j(_vi,[["render",Hvi],["__scopeId","data-v-5c9ea6b6"]]),qvi={emits:["resize"],setup(i,{emit:e}){return{onResizerMousedown:t=>{t.preventDefault();let o=t.clientX;const n=a=>{a.preventDefault();const s=a.clientX-o;o=a.clientX,e("resize",s)},r=a=>{a.preventDefault(),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",r)};window.addEventListener("mousemove",n),window.addEventListener("mouseup",r)}}}},Qvi={class:"bimdata-separator"};function Gvi(i,e,t,o,n,r){return M(),_("div",Qvi,[e[1]||(e[1]=b("div",{class:"bimdata-separator__line"},null,-1)),b("div",{class:"bimdata-separator__resizer",onMousedown:e[0]||(e[0]=(...a)=>o.onResizerMousedown&&o.onResizerMousedown(...a))},null,32)])}const Kvi=j(qvi,[["render",Gvi],["__scopeId","data-v-79a3b3af"]]),Jvi={components:{Separator:Kvi},props:{position:{type:String,required:!0,validator(i){return["left","right"].includes(i)}},sidePanel:{type:Object,required:!0,validator(i){if(i.width&&(typeof i.width!="number"||i.width<0))return console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof i.width}`),!1;const e=typeof i?.component=="object";return e||console.error("[GlobalSidePanel] sidePanel must have a component property"),e}}},setup(i){const e=le(null),t=le(i.sidePanel.width??400),o=(n,r=1)=>{const a=t.value+n*r;t.value=Math.max(0,a)};return pt(()=>i.sidePanel,()=>{Object.defineProperty(i.sidePanel,"width",{get(){return t.value},set(n){if(typeof n!="number"||n<=0){console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof n}`);return}t.value=n}}),Object.defineProperty(i.sidePanel,"componentInstance",{get(){return e.value},enumerable:!0})},{immediate:!0}),{componentInstance:e,width:t,onResize:o}}},Zvi={class:"bimdata-global-side-panel__component"};function Wvi(i,e,t,o,n,r){const a=I("Separator");return M(),_("div",{class:"bimdata-global-side-panel",style:de(`width: ${o.width}px`)},[t.sidePanel.resizable&&t.position==="right"?(M(),J(a,{key:0,onResize:e[0]||(e[0]=s=>o.onResize(s,-1))})):te("",!0),b("div",Zvi,[(M(),J(Eo(t.sidePanel.component),{ref:"componentInstance"},null,512))]),t.sidePanel.resizable&&t.position==="left"?(M(),J(a,{key:1,onResize:e[1]||(e[1]=s=>o.onResize(s))})):te("",!0)],4)}const Yvi=j(Jvi,[["render",Wvi],["__scopeId","data-v-82d0d4cb"]]),Xvi={name:"BimdataViewer",components:{ContextMenu:Dvi,ViewerHeader:zvi,ModalManager:Lhe,GlobalSidePanel:Yvi},setup(){const i=ct("$viewer"),{globalContext:e,shortcutManager:t}=i;ki(()=>{t&&t.destroy(),e.hub.clear()}),ai(()=>{i.pluginManager.runPluginsScripts(i)});const o=Re(()=>i.uiSettings.bimdataLogo!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)),n=Re(()=>i.uiSettings.version!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)?i.version:null),r=Re(()=>e.leftSidePanel),a=Re(()=>e.rightSidePanel),s=Re(()=>{const p=i.uiSettings.header!==!1,A=e.localContexts.length===1&&e.localContexts[0].window?.header===!1,f=!!(r.value||a.value);return p&&(!A||f)}),l=i.uiSettings.contextMenu!==!1,c=le(null);function d(p){l&&c.value.open(p)}function u(){i.shortcutManager.active=!0}function h(){i.shortcutManager.active=!1}return{Layout:i.layout.areas.component,onContextMenu:d,onMouseenter:u,onMouseleave:h,isHeaderVisible:s,viewerTemplateRef:e.templateRef,modalManagerTemplateRef:e.modalManagerTemplateRef,headerTemplateRef:e.headerTemplateRef,contextMenuTemplateRef:c,contextMenuEnabled:l,bimdataLogoOnSingleWindow:o,viewerVersionOnSingleWindow:n,version:i.version,loading:Re(()=>e.loading),spinner:Re(()=>e.spinner),leftSidePanel:r,rightSidePanel:a}}},$vi={key:1,class:"bimdata-context-loading-overlay",style:{"z-index":"3"}},e3i={key:2,class:"viewer__logo"},t3i={key:1,class:"version m-t-6"};function i3i(i,e,t,o,n,r){const a=I("ModalManager"),s=I("ContextMenu"),l=I("ViewerHeader"),c=I("GlobalSidePanel"),d=I("BIMDataSpinner"),u=I("BIMDataIllustration");return M(),_("div",{id:"bimdata-viewer",ref:"viewerTemplateRef",class:"bimdata-viewer bimdata-design-system bimdata-scrollbar",onContextmenu:e[0]||(e[0]=(...h)=>o.onContextMenu&&o.onContextMenu(...h)),onMouseenter:e[1]||(e[1]=(...h)=>o.onMouseenter&&o.onMouseenter(...h)),onMouseleave:e[2]||(e[2]=(...h)=>o.onMouseleave&&o.onMouseleave(...h))},[S(a,{ref:"modalManagerTemplateRef"},null,512),o.contextMenuEnabled?(M(),J(s,{key:0,ref:"contextMenuTemplateRef"},null,512)):te("",!0),S(l,{ref:"headerTemplateRef",visible:o.isHeaderVisible},null,8,["visible"]),b("div",{class:"bimdata-viewer__content",style:de(o.isHeaderVisible?"height: calc(100% - var(--bimdata-viewer-header-height, 40px))":"height: 100%")},[o.leftSidePanel?(M(),J(c,{key:0,"side-panel":o.leftSidePanel,position:"left"},null,8,["side-panel"])):te("",!0),(M(),J(Eo(o.Layout),{style:"height: 100%; flex-grow: 1;"})),o.rightSidePanel?(M(),J(c,{key:1,"side-panel":o.rightSidePanel,position:"right"},null,8,["side-panel"])):te("",!0)],4),o.loading?(M(),_("div",$vi,[o.spinner&&o.spinner.component?(M(),J(Eo(o.spinner.component),Da(En({key:0},o.spinner.props)),null,16)):(M(),J(d,{key:1,size:"40px",border:"5px"}))])):te("",!0),!o.isHeaderVisible&&(o.bimdataLogoOnSingleWindow||o.viewerVersionOnSingleWindow)?(M(),_("div",e3i,[o.bimdataLogoOnSingleWindow?(M(),J(u,{key:0,name:"logo"})):te("",!0),o.viewerVersionOnSingleWindow?(M(),_("div",t3i,z(o.version),1)):te("",!0)])):te("",!0)],544)}const o3i=j(Xvi,[["render",i3i],["__scopeId","data-v-0c1c941a"]]),r3i=["src"],n3i={class:"bimdata-models__header"},a3i={key:0,class:"bimdata-models__header__loader"},s3i={class:"bimdata-models__header__picto"},l3i={class:"bimdata-models__header__name"},c3i={key:0,class:"bimdata-models__header__name--empty"},d3i={key:1,class:"bimdata-models__header__name--empty"},u3i={key:3},h3i=["onMousemove","onClick"],p3i={__name:"Models",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(i){const e=i,t=ct("$viewer"),o=le(),n=le(0),r=le(0),a=le(),s=gi([]),l=le(!1),c=Re(()=>t.localContext.loadedModels),d=Re(()=>t.localContext.loadedModelIds),u=Re(()=>t.localContext.loadingModelIds),h=Re(()=>t.localContext.multiModel),p=Re(()=>(e.customFilter?s.value.filter(e.customFilter):s.value).map(k=>c.value.find(B=>B.document?.head_id!=null&&B.document.head_id===k.document.id)??k)),A=k=>d.value.includes(k),f=k=>u.value.includes(k),m=Re(()=>{const{x:k,y:B}=a.value?.getBoundingClientRect()??{x:0,y:0};return`top:${r.value-B}px; left:${n.value-k}px;`}),g=k=>{!h.value&&A(k.id)||u.value.length>0||(t.localContext.loadedModelIds.includes(k.id)?t.localContext.unloadModels([k.id]):t.localContext.loadModels([k.id]))},y=k=>{switch(k){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},v=(k,B)=>{k?.viewer_360_file&&(n.value=B.clientX,r.value=B.clientY),o.value=k?.viewer_360_file},w=async k=>{l.value=!0;try{return(await t.api.apiClient.modelApi.getModels(t.api.cloudId,t.api.projectId,void 0,void 0,k)).filter(B=>t.state.models.some(E=>E.archived)||!B.archived).sort(Bs("updated_at",!1))}catch(B){console.error("[Models] Cannot get project models. Error: ",B)}finally{l.value=!1}return[]},x=k=>k.children?.some(B=>A(B.id))??!1;return w(t.localContext.modelTypes).then(k=>{s.value=k}),(k,B)=>{const E=I("BIMDataSpinner"),P=I("BIMDataIconModel3D"),R=I("BIMDataTextbox"),T=I("BIMDataCheckbox"),L=I("BIMDataRadio"),F=I("BIMDataIcon"),U=I("BIMDataDropdownList");return M(),_("div",{ref_key:"templateRef",ref:a,class:ce(["bimdata-models",{"bimdata-models--window-positioning":i.windowPositioning}])},[o.value?(M(),_("div",{key:0,class:"bimdata-models__preview",style:de(m.value)},[b("img",{src:o.value},null,8,r3i)],4)):te("",!0),S(U,{style:de(`--bimdata-models-width: ${i.width};`),width:i.width,list:p.value,"element-key":"id","per-page":40,loading:l.value,class:"bimdata-models__list",disabled:p.value.length===0,onElementClick:g},{header:N(({isOpen:q})=>[b("div",n3i,[l.value||u.value.length>0?(M(),_("div",a3i,[S(E)])):(M(),_($e,{key:1},[b("div",s3i,[S(P)]),b("div",{class:ce(["bimdata-models__header__number bimdata-info-length",{"bimdata-models__header__number--empty":d.value.length===0}])},[b("span",null,z(d.value.length),1)],2),b("div",l3i,[p.value.length===0?(M(),_("span",c3i,z(k.$t("model.no_model")),1)):d.value.length===0?(M(),_("span",d3i,z(k.$t("model.no_loaded_model")),1)):d.value.length===1?(M(),J(R,{key:2,text:c.value[0].name,tooltip:!q},null,8,["text","tooltip"])):d.value.length>1?(M(),_("span",u3i,z(k.$t("model.selected_models")),1)):te("",!0)])],64))])]),element:N(({element:q,close:V})=>[b("div",{class:"bimdata-models__model",onMousemove:W=>i.preview&&v(q,W),onMouseout:B[0]||(B[0]=W=>i.preview&&v()),onClick:()=>{!h.value&&!A(q.id)&&V()}},[h.value?(M(),J(T,{key:0,"model-value":A(q.id)||x(q),disabled:q.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])):(M(),J(L,{key:1,"model-value":A(q.id)||x(q),disabled:q.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])),S(F,{margin:"0 calc(var(--spacing-unit) / 2)",name:y(q.status),size:"xs",class:ce({"fill-success":q.status==="C","fill-high":q.status==="E"})},null,8,["name","class"]),S(R,{class:ce({"bimdata-models__model__name":!0,"bimdata-models__model__name--disabled":q.status!=="C"||u.value.length>0}),text:q.name,width:`calc(100% -
|
|
5311
|
+
`),onMouseenter:e[0]||(e[0]=(...h)=>o.onMouseEnter&&o.onMouseEnter(...h)),onMouseleave:e[1]||(e[1]=(...h)=>o.onMouseLeave&&o.onMouseLeave(...h))},[S(a,{ref:"modalManagerTemplateRef"},null,512),b("div",Emi,[o.windowPlugins.leftSidePanel?(M(),J(s,{key:0,plugin:o.windowPlugins.leftSidePanel},null,8,["plugin"])):te("",!0),b("div",Pmi,[(M(!0),_($e,null,Bt(o.windowPlugins.free,h=>(M(),J(l,{key:h.name,class:ce({"window-container__content__center__viewer":h.isViewer}),plugin:h},null,8,["class","plugin"]))),128)),S(c,{position:"left",plugins:o.windowPlugins.leftButtonColumn},null,8,["plugins"]),S(c,{position:"right",plugins:o.windowPlugins.rightButtonColumn},null,8,["plugins"])]),o.windowPlugins.rightSidePanel?(M(),J(s,{key:1,plugin:o.windowPlugins.rightSidePanel},null,8,["plugin"])):te("",!0)]),o.loading?(M(),_("div",Imi,[o.spinner&&o.spinner.component?(M(),J(Eo(o.spinner.component),Da(En({key:0},o.spinner.props)),null,16)):(M(),J(d,{key:1,size:"20px",border:"3px"}))])):te("",!0),o.layoutSettingsDisplayed?(M(),_("div",Smi,[S(u)])):te("",!0)],36)}const Rmi=j(Bmi,[["render",Tmi],["__scopeId","data-v-485f288e"]]);class Lmi{constructor(e=!0){const t=b2i(cO,null,{resizable:e});t.registerContent("default",Rmi),this.settings=Er({edit:!1,swap:!1,full:!1}),this.areas=t}get resizable(){return this.areas.resizable}set resizable(e){this.areas.resizable=e}apply(e=null){this.areas.layout=e?w2i(e):null}copy(e,t=!0){return C2i(this.areas.layout,e,t)}open({ratio:e,direction:t,insertAfter:o,windowName:n=null,windowState:r=null,localContextId:a=null}={}){const s=n?{options:{windowName:n,windowState:r}}:null;return a===null?this.areas.splitLayout(e,t,o,s):this.areas.split(a,e,t,o,s)}swap(e,t){return this.areas.swap(e,t)}close(e){return this.areas.delete(e)}compare(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;if(typeof e=="string"&&typeof t=="string")return e===t;if(typeof e=="string"||typeof t=="string")return!1;if(e.windowName&&t.windowName){if(e.windowName!==t.windowName)return!1;const o=new Set(e.windowState?.modelIds),n=new Set(t.windowState?.modelIds);return o.size===n.size&&[...o].every(r=>n.has(r))}return e.windowName||t.windowName||e.direction!==t.direction||e.children.length!==t.children.length?!1:e.children.every((o,n)=>this.compare(o,t.children[n]))}}const Dmi="2.15.0-beta.7",_mi={version:Dmi};let Fmi=1;class Omi{constructor({plugins:e,api:t,ui:o,locale:n="fr"}){this.instanceId=Fmi++,this.pluginManager=new l0i(e),this.windowManager=new d0i,this.windowManager.registerAndAddPluginsToWindows([...this.pluginManager.registeredPlugins.values()]),this.api=new Bgi(t),this.globalContext=new dme(this),this.state=Ngi(this),this.shortcutManager=t1e(this.state),this.uiSettings=o||{},this.i18n=new lme(n),this._contextMenu=null,this.layout=new Lmi(this.uiSettings.resizable!==!1),this._darkTheme=le(o?.darkTheme??!1),this.localContext=null,window.$viewer=this}get darkTheme(){return this._darkTheme.value}set darkTheme(e){this._darkTheme.value=e}get version(){return _mi.version}get locale(){return this.i18n.locale}get contextMenu(){return this._contextMenu||$pe}set contextMenu(e){this._contextMenu=e}get registeredWindows(){return[...this.windowManager.registeredWindows.keys()]}get registeredPlugins(){return[...this.pluginManager.registeredPlugins.keys()]}get pluginsCfg(){return this.pluginManager.cfg}registerPlugin(e){this.pluginManager.registerPlugin(e),this.windowManager.registerAndAddPluginsToWindows([e])}}function Umi(i,e={}){e.backgroundColor&&(i.style.setProperty("--bimdata-viewer-background-color",e.backgroundColor),e.backgroundColor==="transparent"&&i.style.setProperty("--areas-separator-color","transparent")),e.colorPrimary&&i.style.setProperty("--color-primary",e.colorPrimary),e.colorPrimaryLighter&&i.style.setProperty("--color-primary-lighter",e.colorPrimaryLighter),e.colorPrimaryLight&&i.style.setProperty("--color-primary-light",e.colorPrimaryLight),e.colorPrimaryDark&&i.style.setProperty("--color-primary-dark",e.colorPrimaryDark),e.colorSecondary&&i.style.setProperty("--color-secondary",e.colorSecondary),e.colorSecondaryLighter&&i.style.setProperty("--color-secondary-lighter",e.colorSecondaryLighter),e.colorSecondaryLight&&i.style.setProperty("--color-secondary-light",e.colorSecondaryLight),e.colorSecondaryDark&&i.style.setProperty("--color-secondary-dark",e.colorSecondaryDark),e.colorSilverLight&&i.style.setProperty("--color-silver-light",e.colorSilverLight),e.colorSilver&&i.style.setProperty("--color-silver",e.colorSilver),e.colorSilverDark&&i.style.setProperty("--color-silver-dark",e.colorSilverDark),e.colorGraniteLight&&i.style.setProperty("--color-granite-light",e.colorGraniteLight),e.colorGranite&&i.style.setProperty("--color-granite",e.colorGranite),e.colorSuccess&&i.style.setProperty("--color-success",e.colorSuccess),e.colorSuccessLighter&&i.style.setProperty("--color-success-Lighter",e.colorSuccessLighter),e.colorSuccessLight&&i.style.setProperty("--color-success-Light",e.colorSuccessLight),e.colorSuccessDark&&i.style.setProperty("--color-success-Dark",e.colorSuccessDark),e.colorWarning&&i.style.setProperty("--color-warning",e.colorWarning),e.colorWarningLighter&&i.style.setProperty("--color-warning-Lighter",e.colorWarningLighter),e.colorWarningLight&&i.style.setProperty("--color-warning-Light",e.colorWarningLight),e.colorWarningDark&&i.style.setProperty("--color-warning-Dark",e.colorWarningDark),e.colorHigh&&i.style.setProperty("--color-high",e.colorHigh),e.colorHighLighter&&i.style.setProperty("--color-high-lighter",e.colorHighLighter),e.colorHighLight&&i.style.setProperty("--color-high-light",e.colorHighLight),e.colorHighDark&&i.style.setProperty("--color-high-dark",e.colorHighDark),e.colorText&&i.style.setProperty("--color-text",e.colorText),(!e.backgroundColor||e.backgroundColor!=="transparent")&&i.style.setProperty("--areas-separator-color","rgba(216, 216, 216, 1)"),e.headerHeight!=null&&i.style.setProperty("--bimdata-viewer-header-height",e.headerHeight),i.style.setProperty("--areas-background-color","transparent")}const Nmi=Object.freeze({25:"GUEST",50:"USER",100:"ADMIN"}),s2=Object.freeze({READ:"read",WRITE:"write"});function Fhe(i){const e={};return i.forEach(t=>{const[o,n]=t.split(":");e[o]?e[o].push(n):e[o]=[n]}),e}const jmi={token_scopes:[],usable_scopes:[],user_role:25};function Ohe(i=jmi){const e=Fhe(i.token_scopes),t=Fhe(i.usable_scopes);return{...sH(i),tokenScopes:e,usableScopes:t,userRole:Nmi[i.user_role],user:i.user?sH(i.user):null,hasBcfReadPermission:t.bcf?.includes(s2.READ)??!1,hasBcfWritePermission:t.bcf?.includes(s2.WRITE)??!1,hasModelReadPermission:t.model?.includes(s2.READ)??!1,hasModelWritePermission:t.model?.includes(s2.WRITE)??!1,hasDocReadPermission:t.document?.includes(s2.READ)??!1,hasDocWritePermission:t.document?.includes(s2.WRITE)??!1}}const Vmi={back:"Zur\xFCck",BcfFilters:{filtersButton:"Filter",filtersTitle:"Filter",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",creatorsLabel:"Erstellt von",tagsLabel:"Tags",resetButton:"Zur\xFCcksetzen",searchButton:"Suchen",undefined:"Nicht definiert",datePlaceholder:"Erstellungsdatum"},BcfSettings:{title:"BCF-Parameter",text:"Erstellen, f\xFCllen und listen Sie die BCF-Einstellungen auf, die Sie f\xFCr dieses Projekt haben m\xF6chten.",validateButton:"Die BCF-Parameter anerkennen"},BcfStatistics:{emptyText:"F\xFCgen Sie Fragen hinzu, um zugeh\xF6rige Statistiken hier anzuzeigen.",issues:"Probleme",extension:{Priority:"Priorit\xE4t",PriorityNotDefined:"Keine Priorit\xE4t",PriorityTitle:"Priorit\xE4ten",Status:"Status",StatusNotDefined:"Kein Status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priorit\xE4t",noPriority:"Keine",assignedTo:"Zugewiesen an",elements:"Elemente",notSpecified:"Nicht definiert",see:"Anzeigen"},BcfTopicCreationCard:{text:"Ein neues BCF-Thema erstellen",createBcfSideTitle:"Ein Problem melden"},BcfTopicForm:{dragDropImageText:"Bitte w\xE4hlen Sie eine Datei aus.",addObjectButton:"Objekt",addAnnotationButton:"Annotation",annotationButtonTooltip:"Zu diesem Thema gibt es derzeit keine Ansichten.",addPictureButton:"F\xFCgen Sie ein Bild hinzu.",titlePlaceholder:"Titel *",titleErrorMessage:"Titel fehlt",typeLabel:"Typ",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",dueDateLabel:"F\xE4lligkeitsdatum (TT.MM.JJJJ)",descriptionLabel:"Beschreibung",labelsLabel:"Tags",createButton:"Best\xE4tigen",updateButton:"\xC4nderungen \xFCbernehmen",modalText:"Sie sind dabei, die Bearbeitung der Ausgabe {Name} zu beenden, aber es gibt noch ungespeicherte \xC4nderungen.",cancelButton:"\xC4nderungen verwerfen",continueButton:"\xC4nderungen fortsetzen",createTitle:"Ein Problem melden",dragDropImageTextTablet:"Foto machen",takeSnapshot:"Mach einen Schnappschuss",importFile:"Eine Datei importieren",searchPlaceholder:"Suchen",emptySearch:"kein Ergebnis",documentsLabel:"Dokumente",documentsCount:"Dokumente \u2013 {count} ausgew\xE4hlte Dokumente",groupsLabel:"Berechtigungen",groupsCount:"Berechtigungen \u2013 {count} ausgew\xE4hlte Gruppen",groupsText:"W\xE4hlen Sie die Benutzergruppen aus, die dieses Thema sehen und damit interagieren d\xFCrfen.",validate:"Best\xE4tigen"},BcfTopicOverview:{openViewer:"Im Viewer \xF6ffnen",openViewerNoModels:"Es sind keine Vorlagen zur Ansicht bereit",elements:"{count} Elemente",noElements:"kein Element",type:"Typ",noTypeSpecified:"Kein Typ angegeben",description:"Beschreibung",noDescriptionProvided:"Keine Beschreibung angegeben",assignedTo:"Zugeteilt an",notAssigned:"Nicht zugewiesen",dueDate:"F\xE4lligkeitsdatum",noDueDate:"Kein F\xE4lligkeitsdatum",informations:"Informationen",status:"Status",noStatusSpecified:"Kein Status angegeben",stage:"Phase",noStageProvided:"Keine Phase angegeben",priority:"Priorit\xE4t",priorityNotDefined:"Nicht definiert",tags:"Tags",noTags:"Keine Tags",commentButton:"Ein Kommentar ver\xF6ffentlichen",deleteText:"Sie l\xF6schen jetzt {Name}",deleteBcfButton:"Dieses BCF l\xF6schen",keepBcfButton:"Dieses BCF beibehalten",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE4t",status:"Status",title:"Titel",creator:"Autor",date:"Datum"}},BcfTopicActionsCell:{seeButton:"Anzeigen"},BcfTopicComments:{commentButton:"Ein Kommentar verfassen",commentLabel:"Ein Kommentar verfassen",commentText:"Kommentar",cancelButton:"Abbrechen",publishButton:"Ver\xF6ffentlichen",commentsText:"Kommentare",deleteCommentText:"Diesen Kommentar l\xF6schen?",deleteButton:"L\xF6schen",takeSnapshot:"Mach einen Schnappschuss",edited:"bearbeitet"},BcfTopicPriorityCell:{noPriority:"Keine"},SettingCard:{addButton:"ein Element hinzuf\xFCgen",cancelButton:"Abbrechen",validateButton:"Best\xE4tigen",deleteExtensionText:"Diesen Parameter l\xF6schen",deleteButton:"L\xF6schen",title:{Priority:"Priorit\xE4ten",Label:"Tags",Status:"Status",Type:"Typen",Stage:"Phasen"},input:{Priority:"Eine neue Priorit\xE4t hinzuf\xFCgen",Label:"Ein neues Etikett hinzuf\xFCgen",Status:"Einen neuen Status hinzuf\xFCgen",Type:"Einen neuen Typ hinzuf\xFCgen",Stage:"Eine neue Phase hinzuf\xFCgen"},text:{Priority:"Liste der Priorit\xE4ten",Label:"Liste von Tags",Status:"Liste der Status",Type:"Liste der Typen",Stage:"Liste der Phasen"}}},Hmi={BcfComponents:Vmi},zmi={back:"Back",BcfFilters:{filtersButton:"Filters",filtersTitle:"Filters",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",creatorsLabel:"Created by",tagsLabel:"Tags",resetButton:"Reset",searchButton:"Search",undefined:"Not defined",datePlaceholder:"Creation date"},BcfSettings:{title:"BCF Settings",text:"Create, enter in, and list the BCF settings you would like to have for this project",validateButton:"Validate BCF settings"},BcfStatistics:{emptyText:"Add BCF Topics to start to have some stats here.",issues:"issues",extension:{Priority:"Priority",PriorityNotDefined:"No priority",PriorityTitle:"Priorities",Status:"Status",StatusNotDefined:"No status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priority",noPriority:"None",assignedTo:"Assigned to",elements:"Elements",notSpecified:"Not specified",see:"See"},BcfTopicCreationCard:{text:"Create a new BCF topic",createBcfSideTitle:"Report a problem"},BcfTopicForm:{dragDropImageText:"Please select a file",addObjectButton:"Object",addAnnotationButton:"Annotation",annotationButtonTooltip:"This topic has no viewpoint",addPictureButton:"Add a picture",titlePlaceholder:"Title *",titleErrorMessage:"Missing title",typeLabel:"Type",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",dueDateLabel:"Due date",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Validate",updateButton:"Modify this BCF",modalText:"You are about to quit editing issue {name} but there are unsaved changes.",cancelButton:"Discard changes",continueButton:"Continue editing",createTitle:"Report a problem",dragDropImageTextTablet:"Take a picture",takeSnapshot:"Take a snapshot",importFile:"Import a file",searchPlaceholder:"Search",emptySearch:"No result",documentsLabel:"Add a file",documentsCount:"Files - {count} selected files",groupsLabel:"Permissions",groupsCount:"Permissions - {count} selected groups",groupsText:"You are now setting the access rights: choose the user group(s) that will be exclusively authorized to see and interact with this topic.",validate:"Validate"},BcfTopicOverview:{openViewer:"Open in viewer",openViewerNoModels:"No model to open",elements:"{count} Elements",noElements:"No element",type:"Type",noTypeSpecified:"No type specified",description:"Description",noDescriptionProvided:"No description provided",assignedTo:"Assigned to",notAssigned:"Not assigned",dueDate:"Due date",noDueDate:"No due date",informations:"Informations",status:"Status",noStatusSpecified:"No status specified",stage:"Stage",noStageProvided:"No stage provided",priority:"Priority",priorityNotDefined:"Not defined",tags:"Tags",noTags:"No tags",commentButton:"Post a comment",deleteText:"You are about to delete {name}",deleteBcfButton:"Delete this BCF",keepBcfButton:"Keep this BCF",author:"Author"},BcfTopicsTable:{headers:{index:"#",priority:"Priority",status:"Status",title:"Title",creator:"Author",date:"Date"}},BcfTopicActionsCell:{seeButton:"See"},BcfTopicComments:{commentButton:"Post a comment",commentLabel:"Post a comment",commentText:"Comment",cancelButton:"Cancel",publishButton:"Publish",commentsText:"Comments",deleteCommentText:"Delete this comment ?",deleteButton:"Delete",takeSnapshot:"Take a snapshot",edited:"edited"},BcfTopicPriorityCell:{noPriority:"None"},SettingCard:{addButton:"add an element",cancelButton:"Cancel",validateButton:"Validate",deleteExtensionText:"Remove this setting",deleteButton:"Delete",title:{Priority:"Priorities",Label:"Labels",Status:"Status",Type:"Types",Stage:"Stages"},input:{Priority:"Add a new priority",Label:"Add a new label",Status:"Add new status",Type:"Add a new type",Stage:"Add a new stage"},text:{Priority:"Priority list",Label:"Labels list",Status:"Status list",Type:"Type list",Stage:"Stage list"}}},qmi={BcfComponents:zmi},Qmi={back:"Volver",BcfFilters:{filtersButton:"Filtros",filtersTitle:"Filtros",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",creatorsLabel:"Creado por",tagsLabel:"Etiquetas:",resetButton:"Restablecer",searchButton:"Buscar en",undefined:"No definido",datePlaceholder:"Fecha de creaci\xF3n"},BcfSettings:{title:"Par\xE1metros del BCF",text:"Cree, rellene y enumere los par\xE1metros del BCF que desea tener en este proyecto",validateButton:"Validar los par\xE1metros del BCF"},BcfStatistics:{emptyText:"A\xF1ada preguntas para ver las estad\xEDsticas asociadas aqu\xED.",issues:"problemas",extension:{Priority:"Prioridad",PriorityNotDefined:"Sin prioridad",PriorityTitle:"Prioridades",Status:"Estado",StatusNotDefined:"Sin estado",StatusTitle:"Estatutos"}},BcfTopicCard:{priority:"Prioridad",noPriority:"Sin",assignedTo:"Asignado a",elements:"Elementos",notSpecified:"No definido",see:"Ver"},BcfTopicCreationCard:{text:"Crear un nuevo tema BCF",createBcfSideTitle:"Informar de un problema"},BcfTopicForm:{dragDropImageText:"Seleccione un archivo",addObjectButton:"Objeto",addAnnotationButton:"Anotaci\xF3n",annotationButtonTooltip:"Actualmente este tema no posee ning\xFAn punto de vista",addPictureButton:"A\xF1adir una imagen",titlePlaceholder:"T\xEDtulo *",titleErrorMessage:"Falta el t\xEDtulo",typeLabel:"Tipo",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",dueDateLabel:"Fecha de vencimiento (DD/MM/AAAA)",descriptionLabel:"Descripci\xF3n",labelsLabel:"Etiquetas",createButton:"Validar",updateButton:"Modificar este BCF",modalText:"Est\xE1 a punto de salir de la edici\xF3n del problema de {name} pero hay cambios sin guardar.",cancelButton:"Cancelar los cambios",continueButton:"Continuar con los cambios",createTitle:"Informar de un problema",dragDropImageTextTablet:"Tomar una fotograf\xEDa",takeSnapshot:"Tomar un snapshot",importFile:"Importar un archivo",searchPlaceholder:"Buscar",emptySearch:"No hay resultados"},BcfTopicOverview:{openViewer:"Abrir en el visor",openViewerNoModels:"No hay ning\xFAn modelo listo para la visualizaci\xF3n",elements:"{count} Elementos",noElements:"Ning\xFAn elemento",type:"Tipo",noTypeSpecified:"No se especifica el tipo",description:"Descripci\xF3n",noDescriptionProvided:"No hay descripci\xF3n",assignedTo:"Asignado a",notAssigned:"No asignado",dueDate:"Plazo",noDueDate:"Sin fecha de vencimiento",informations:"Informaci\xF3n",status:"Estado",noStatusSpecified:"No se especifica el estado",stage:"Fase",noStageProvided:"No se indica ninguna fase",priority:"Prioridad",priorityNotDefined:"No definido",tags:"Etiquetas",noTags:"Sin etiquetas",commentButton:"Publicar un comentario",deleteText:"Est\xE1s a punto de borrar {name}",deleteBcfButton:"Borrar este BCF",keepBcfButton:"Mantenga este BCF",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Prioridad",status:"Estado",title:"T\xEDtulo",creator:"Autor",date:"Fecha"}},BcfTopicActionsCell:{seeButton:"Ver"},BcfTopicComments:{commentButton:"Publicar un comentario",commentLabel:"Publicar un comentario",commentText:"Comentario",cancelButton:"Cancelar",publishButton:"Publicar",commentsText:"comentarios",deleteCommentText:"\xBFBorrar este comentario?",deleteButton:"Borrar",takeSnapshot:"Tomar un snapshot"},BcfTopicPriorityCell:{noPriority:"Sin"},SettingCard:{addButton:"a\xF1adir un elemento",cancelButton:"Cancelar",validateButton:"Validar",deleteExtensionText:"Borrar esta configuraci\xF3n",deleteButton:"Borrar",title:{Priority:"Prioridades",Label:"Etiquetas:",Status:"Estatutos",Type:"Tipos",Stage:"Fases"},input:{Priority:"A\xF1adir una nueva prioridad",Label:"A\xF1adir una nueva etiqueta",Status:"A\xF1adir un nuevo estado",Type:"A\xF1adir un nuevo tipo",Stage:"A\xF1adir una nueva fase"},text:{Priority:"Lista de prioridades",Label:"Lista de etiquetas",Status:"Lista de estatutos",Type:"Lista de tipos",Stage:"Lista de fases"}}},Gmi={BcfComponents:Qmi},Kmi={back:"Retour",BcfFilters:{filtersButton:"Filtres",filtersTitle:"Filtres",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",creatorsLabel:"Cr\xE9\xE9 par",tagsLabel:"Tags",resetButton:"R\xE9initialiser",searchButton:"Rechercher",undefined:"Non d\xE9fini",datePlaceholder:"Date de cr\xE9ation"},BcfSettings:{title:"Param\xE8tres BCF",text:"Cr\xE9ez, renseignez et listez les param\xE8tres BCF que vous souhaitez avoir sur ce projet",validateButton:"Valider les param\xE8tres BCF"},BcfStatistics:{emptyText:"Ajoutez des questions pour voir les statistiques associ\xE9es ici.",issues:"probl\xE8mes",extension:{Priority:"Priorit\xE9",PriorityNotDefined:"Aucune priorit\xE9",PriorityTitle:"Priorit\xE9s",Status:"Statut",StatusNotDefined:"Aucun statut",StatusTitle:"Statuts"}},BcfTopicCard:{priority:"Priorit\xE9",noPriority:"Aucune",assignedTo:"Assign\xE9 \xE0",elements:"{n} \xC9lements",notSpecified:"Non d\xE9fini",see:"Voir"},BcfTopicCreationCard:{text:"Cr\xE9er un nouveau topic BCF",createBcfSideTitle:"Signaler un probl\xE8me"},BcfTopicForm:{dragDropImageText:"Veuillez s\xE9lectionner un fichier",addObjectButton:"Objet",addAnnotationButton:"Annotation",annotationButtonTooltip:"Ce topic ne poss\xE8de actuellement aucun point de vue",addPictureButton:"Ajouter une image",titlePlaceholder:"Titre *",titleErrorMessage:"Titre manquant",typeLabel:"Type",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",dueDateLabel:"Date d'\xE9ch\xE9ance",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Valider",updateButton:"Modifier ce BCF",modalText:"Vous \xEAtes sur le point de quitter l'\xE9dition de l'issue {name} mais il y'a des modifications non enregistr\xE9es.",cancelButton:"Annuler les modifications",continueButton:"Continuer les modifications",createTitle:"Signaler un probl\xE8me",dragDropImageTextTablet:"Prendre une photo",takeSnapshot:"Prendre un snapshot",importFile:"Importer un fichier",searchPlaceholder:"Rechercher",emptySearch:"Pas de r\xE9sultat",documentsLabel:"Documents",documentsCount:"Documents - {count} documents s\xE9lectionn\xE9s",groupsLabel:"Permissions",groupsCount:"Permissions - {count} groupes s\xE9lectionn\xE9s",groupsText:"S\xE9lectionner les groupes utilisateur qui peuvent voir ce topic et int\xE9ragir avec.",validate:"Valider"},BcfTopicOverview:{openViewer:"Ouvrir dans le viewer",openViewerNoModels:"Il n'y a aucun mod\xE8le pr\xEAt pour une visualisation",elements:"{count} \xC9lements",noElements:"Aucun \xE9l\xE9ment concern\xE9",type:"Type",noTypeSpecified:"Pas de type sp\xE9cifi\xE9",description:"Description",noDescriptionProvided:"Pas de description renseign\xE9e",assignedTo:"Assign\xE9 \xE0",notAssigned:"Non assign\xE9",dueDate:"\xC9ch\xE9ance",noDueDate:"Pas de date d'\xE9ch\xE9ance",informations:"Informations",status:"Statut",noStatusSpecified:"Pas de statut sp\xE9cifi\xE9",stage:"Phase",noStageProvided:"Pas de phase renseign\xE9e",priority:"Priorit\xE9",priorityNotDefined:"Non d\xE9fini",tags:"Tags",noTags:"Pas de tags",commentButton:"Poster un commentaire",deleteText:"Vous \xEAtes sur le point de supprimer {name}",deleteBcfButton:"Supprimer ce BCF",keepBcfButton:"Conserver ce BCF",author:"Auteur"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE9",status:"Statut",title:"Titre",creator:"Auteur",date:"Date"}},BcfTopicActionsCell:{seeButton:"Voir"},BcfTopicComments:{commentButton:"Poster un commentaire",commentLabel:"Poster un commentaire",commentText:"Commentaire",cancelButton:"Annuler",publishButton:"Publier",commentsText:"commentaires",deleteCommentText:"Supprimer ce commentaire ?",deleteButton:"Supprimer",takeSnapshot:"Prendre un snapshot",edited:"edit\xE9"},BcfTopicPriorityCell:{noPriority:"Aucune"},SettingCard:{addButton:"ajouter un \xE9l\xE9ment",cancelButton:"Annuler",validateButton:"Valider",deleteExtensionText:"Supprimmer ce param\xE8tre",deleteButton:"Supprimer",title:{Priority:"Priorit\xE9s",Label:"Tags",Status:"Statuts",Type:"Types",Stage:"Phases"},input:{Priority:"Ajouter une nouvelle priorit\xE9",Label:"Ajouter un nouveau label",Status:"Ajouter un nouveau statut",Type:"Ajouter un nouveau type",Stage:"Ajouter une nouvelle phase"},text:{Priority:"Liste des priorit\xE9s",Label:"Liste des tags",Status:"Liste des statuts",Type:"Liste des types",Stage:"Liste des phases"}}},Jmi={BcfComponents:Kmi},Zmi={back:"Indietro",BcfFilters:{filtersButton:"Filtri",filtersTitle:"Filtri",priorityLabel:"Priorit\xE0",statusLabel:"Stato",stageLabel:"Fase",datePlaceholder:"Data di creazione",assignedToLabel:"Assegnato a",creatorsLabel:"Creato da",tagsLabel:"Etichette",resetButton:"Ripristina",searchButton:"Cerca",undefined:"Non definito"},BcfSettings:{title:"Parametri BCF",text:"Creare, notificare e elencare i parametri BCF che si desidera avere su questo progetto",validateButton:"Conferma i parametri BCF"},BcfStatistics:{emptyText:"Aggiungi delle domande per vedere le statistiche associate qui.",issues:"problemi",extension:{Priority:"Priorit\xE0",PriorityNotDefined:"Nessuna priorit\xE0",PriorityTitle:"Priorit\xE0",Status:"Stato",StatusNotDefined:"Nessuno stato",StatusTitle:"Stati"}},BcfTopicCard:{priority:"Priorit\xE0",noPriority:"Nessuno",assignedTo:"Assegnato a",elements:"Elementi",noElements:"0 elementi",notSpecified:"Non definito",see:"Visualizza"},BcfTopicCreationCard:{text:"Crea un nuovo topic BCF",createBcfSideTitle:"Segnala un problema"},BcfTopicForm:{dragDropImageText:"Selezionare un file",addObjectButton:"Oggetto",addAnnotationButton:"Annotazione",annotationButtonTooltip:"Attualmente questo argomento non presenta alcun punto di vista",addPictureButton:"Aggiungere un'immagine",titlePlaceholder:"Titolo *",titleErrorMessage:"Titolo mancante",typeLabel:"Tipo",priorityLabel:"Priorit\xE0",statusLabel:"Stato",stageLabel:"Fase",assignedToLabel:"Assegnato a",dueDateLabel:"Data di scadenza",descriptionLabel:"Descrizione",labelsLabel:"Tag",createButton:"Conferma",updateButton:"Modificare questo BCF",modalText:"State per abbandonare la modifica di {name} ma ci sono modifiche non salvate.",cancelButton:"Annullare le modifiche",continueButton:"Continuare le modifiche",createTitle:"Segnala un problema"},BcfTopicOverview:{openViewer:"Apri nel visualizzatore",openViewerNoModels:"Non esistono modelli pronti per la visualizzazione",elements:"{count} Elementi",noElements:"Nessun elemento",type:"Tipo",noTypeSpecified:"Nessun tipo specificato",description:"Descrizione",noDescriptionProvided:"Nessuna descrizione inserita",assignedTo:"Assegnato a",notAssigned:"Non assegnato",dueDate:"Scadenza",noDueDate:"Nessuna data di scadenza",informations:"Informazioni",status:"Stato",noStatusSpecified:"Nessuno stato specificato",stage:"Fase",noStageProvided:"Nessuna fase inserita",priority:"Priorit\xE0",priorityNotDefined:"Non definita",tags:"Etichette",noTags:"Nessuna etichetta",commentButton:"Pubblica un commento",deleteText:"Stai per eliminare {name}",deleteBcfButton:"Elimina questo BCF",keepBcfButton:"Conserva questo BCF",author:"Autore"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE0",status:"Stato",title:"Titolo",creator:"Autore",date:"Data"}},BcfTopicActionsCell:{seeButton:"Visualizza"},BcfTopicComments:{commentButton:"Pubblica un commento",commentLabel:"Pubblica un commento",commentText:"Commento",cancelButton:"Annulla",publishButton:"Pubblica",commentsText:"commenti",deleteCommentText:"Eliminare questo commento?",deleteButton:"Elimina"},BcfTopicPriorityCell:{noPriority:"Nessuno"},SettingCard:{addButton:"aggiungi un elemento",cancelButton:"Annulla",validateButton:"Conferma",deleteExtensionText:"Elimina questo parametro",deleteButton:"Elimina",title:{Priority:"Priorit\xE0",Label:"Etichette",Status:"Stati",Type:"Tipi",Stage:"Fasi"},input:{Priority:"Aggiungi una nuova priorit\xE0",Label:"Aggiungi una nuova etichetta",Status:"Aggiungi un nuovo stato",Type:"Aggiungi un nuovo tipo",Stage:"Aggiungi una nuova fase"},text:{Priority:"Elenco delle priorit\xE0",Label:"Elenco delle etichette",Status:"Elenco degli stati",Type:"Elenco dei tipi",Stage:"Elenco delle fasi"}}},Wmi={BcfComponents:Zmi},Ymi={de:Hmi,en:qmi,es:Gmi,fr:Jmi,it:Wmi},Xmi=({apiClient:i,fetchUsers:e,i18nPlugin:t}={})=>({install(o){i?Pi.setup({apiClient:i,fetchUsers:e}):console.error("[BCF Components Plugin] No api client provided. You must provide an api client for the components to work properly."),t?Object.entries(Ymi).forEach(([n,r])=>{t.global.mergeLocaleMessage(n,r)}):console.warn("[BCF Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(t8e).forEach(([n,r])=>{o.component(n,r)})}}),$mi={title:"Building Maker",back:"Zur\xFCck",list:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",createButton:"Neues Projekt",updateButton:"Umbenennen",deleteButton:"L\xF6schen"},form:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",input:"Name des Geb\xE4udes",error:"Ung\xFCltiger Name",createButton:"Erstellen",updateButton:"Best\xE4tigen"},view:{addStoreyButton:"Etage",addPlanButton:"Grundriss",closeButton:"Fertigstellen",submitFilesButton:"Best\xE4tigen"},storeyForm:{title:"Neue Etage",input:"Name",error:"Ung\xFCltiger Name",cancelButton:"Abbrechen",submitButton:"Best\xE4tigen"}},evi={creationFormTitle:"Ordner erstellen",renameFormPlaceholder:"Datei- / Ordnernam",nameInputPlaceholder:"Ordnername",emptyFolder:"Dieser Ordner ist leer",newFolderSuccess:"Neuer Ordner erstellt",renameFolderSuccess:"Umbenannter Ordner",deleteFolderSuccess:"Ordner gel\xF6scht",newFileSuccess:"Datei hinzugef\xFCgt",renameFileSuccess:"Umbenannte Datei",deleteFileSuccess:"Datei gel\xF6scht",nameInputErrorMessage:"Ung\xFCltiger name",cancel:"Abbrechen",submit:"Best\xE4tigen",buttonText:"Neuer Ordner",addFileButtonText:"Datei laden",rename:"Umbenennen",view:"Sehen",download:"Herunterladen",delete:"L\xF6schen",deleteTitle:"Dateien l\xF6schen",deleteDetail:"Sie sind im Begriff, die folgenden Dateien / Ordner endg\xFCltig zu l\xF6schen"},tvi={BuildingMaker:$mi,FileManager:evi},ivi={t:{back:"Back",cancel:"Cancel",create:"Create",delete:"Delete",download:"Download",finish:"Finish",rename:"Rename",search:"Search",see:"View",storey:"Storey",validate:"Validate"}},ovi={title:"Building Maker",list:{text:"Create and edit storeys, then download your PDFs.",new:"New project"},form:{input:"Building name",error:"Invalid"},view:{addStorey:"Add Storey",addFile:"Add File",addPlan:"Add Plan"},storeyForm:{title:"New storey",input:"Name",error:"Invalid name"}},rvi={creationFormTitle:"Create folder",renameFormPlaceholder:"Folder/File name",nameInputPlaceholder:"Folder name",emptyFolder:"This folder is empty",newFolderSuccess:"New folder created",renameFolderSuccess:"Folder renamed",deleteFolderSuccess:"Folder deleted",newFileSuccess:"File added",renameFileSuccess:"File renamed",deleteFileSuccess:"File deleted",nameInputErrorMessage:"Invalid name",buttonText:"New folder",addFileButtonText:"Upload a file",deleteTitle:"Deleting Files",deleteDetail:"You are about to permanently delete the following files / folders",dmsRoot:"Root of the project's DMS",pdfPageSelectorTitle:"Select a page"},nvi={title:"Meta-Building Structure",tab:{structure:"Structure",zones:"Zones",equipments:"Equipments"},StoreySelector:{placeholder:"Select a storey"}},avi={title:"Photosphere Building"},svi={BIMDataComponents:ivi,BuildingMaker:ovi,FileManager:rvi,MetaBuildingStructure:nvi,PhotosphereBuilding:avi},lvi={title:"Building Maker",back:"Vuelta",list:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",createButton:"Nuevo proyecto",updateButton:"Renombrar",deleteButton:"Suprimir"},form:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",input:"Nombre del edificio",error:"Nombre no v\xE1lido",createButton:"Crear",updateButton:"Validar"},view:{addStoreyButton:"Piso",addPlanButton:"Plano",closeButton:"Terminar",submitFilesButton:"Validar"},storeyForm:{title:"Nuevo piso",input:"Nombre",error:"Nombre no v\xE1lido",cancelButton:"Anular",submitButton:"Validar"}},cvi={creationFormTitle:"Crear un archivo",renameFormPlaceholder:"Nombre de archivo / carpeta",nameInputPlaceholder:"Nombre de la carpeta",emptyFolder:"Esta carpeta est\xE1 vac\xEDa",newFolderSuccess:"Nueva carpeta creada",renameFolderSuccess:"Carpeta renombrada",deleteFolderSuccess:"Carpeta eliminada",newFileSuccess:"Archivo agregado",renameFileSuccess:"Archivo renombrado",deleteFileSuccess:"Archivo eliminado",nameInputErrorMessage:"Nombre inv\xE1lida",cancel:"Cancelar",submit:"Validar",buttonText:"Carpeta nueva",addFileButtonText:"Cargar un archivo",rename:"Renombrar",view:"Ver",download:"Descargar",delete:"Borrar",deleteTitle:"Eliminar archivos",deleteDetail:"Est\xE1 a punto de eliminar permanentemente los siguientes archivos / carpetas"},dvi={BuildingMaker:lvi,FileManager:cvi},uvi={t:{back:"Retour",cancel:"Annuler",create:"Cr\xE9er",delete:"Supprimer",download:"T\xE9l\xE9charger",finish:"Terminer",rename:"Renommer",search:"Rechercher",see:"Voir",storey:"\xC9tage",validate:"Valider"}},hvi={title:"Building Maker",list:{text:"Cr\xE9ez et \xE9ditez les \xE9tages puis t\xE9l\xE9chagez vos PDF.",new:"Nouveau projet"},form:{input:"Nom du b\xE2timent",error:"Nom invalide"},view:{addStorey:"Ajouter un \xC9tage",addFile:"Ajouter un fichier",addPlan:"Ajouter un plan"},storeyForm:{title:"Nouvel \xE9tage",input:"Nom",error:"Nom invalide"}},pvi={creationFormTitle:"Cr\xE9er un dossier",renameFormPlaceholder:"Nom du fichier/dosier",nameInputPlaceholder:"Nom du dossier",emptyFolder:"Ce dossier est vide",newFolderSuccess:"Nouveau dossier cr\xE9\xE9",renameFolderSuccess:"Dossier renomm\xE9",deleteFolderSuccess:"Dossier supprim\xE9",newFileSuccess:"Fichier ajout\xE9",renameFileSuccess:"Fichier renomm\xE9",deleteFileSuccess:"Fichier supprim\xE9",nameInputErrorMessage:"Nom invalide",buttonText:"Nouveau dossier",addFileButtonText:"Charger un fichier",deleteTitle:"Supression de fichiers",deleteDetail:"Vous \xEAtes sur le point de supprimer d\xE9finitivement les fichiers/dossiers suivants",dmsRoot:"Racine de la GED du projet",pdfPageSelectorTitle:"S\xE9lectionner une page"},fvi={title:"Structure M\xE9ta-Building",tab:{structure:"Structure",zones:"Zones",equipments:"\xC9quipements"},StoreySelector:{placeholder:"S\xE9lectionner un \xE9tage"}},Avi={title:"Photosph\xE8re Building"},gvi={BIMDataComponents:uvi,BuildingMaker:hvi,FileManager:pvi,MetaBuildingStructure:fvi,PhotosphereBuilding:Avi},mvi={title:"Building Maker",back:"Reso",list:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",createButton:"Nuovo progetto",updateButton:"Rinominare",deleteButton:"Eliminare"},form:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",input:"Nome della costruzione",error:"Nome non corretto",createButton:"Creare",updateButton:"Convalidare"},view:{addStoreyButton:"Piano",addPlanButton:"Mappa",closeButton:"Finire",submitFilesButton:"Convalidare"},storeyForm:{title:"Nuovo piano",input:"Nome",error:"Nome non corretto",cancelButton:"Annullare",submitButton:"Convalidare"}},vvi={creationFormTitle:"Crea una cartella",renameFormPlaceholder:"Nome file/cartella",nameInputPlaceholder:"Nome della cartella",emptyFolder:"Questa cartella \xE8 vuota",newFolderSuccess:"Nuova cartella creata",renameFolderSuccess:"Cartella rinominata",deleteFolderSuccess:"Cartella eliminata",newFileSuccess:"File aggiunto",renameFileSuccess:"File rinominato",deleteFileSuccess:"File cancellato",nameInputErrorMessage:"Nome non valido",cancel:"Annulla",submit:"Invia",buttonText:"Nuova cartella",addFileButtonText:"Carica un file",rename:"Rinominare",view:"Vedere",download:"Scaricare",delete:"Cancellare",deleteTitle:"Eliminazione di file",deleteDetail:"Stai per eliminare definitivamente i seguenti file/cartelle"},yvi={BuildingMaker:mvi,FileManager:vvi},bvi={de:tvi,en:svi,es:dvi,fr:gvi,it:yvi},wvi=({i18nPlugin:i}={})=>({install(e){i?Object.entries(bvi).forEach(([t,o])=>{i.global.mergeLocaleMessage(t,o)}):console.warn("[BIMData Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(vJt).forEach(([t,o])=>{e.component(t,o)})}}),Cvi={beforeMount(i,e){if(typeof e.value!="function")throw Error(`click away directive needs function, got ${typeof e.value}`);i.clickAwayHandler=t=>{(t.path||t.composedPath&&t.composedPath()).find(o=>o===i)||e.value()},window.addEventListener("mousedown",i.clickAwayHandler,!0)},unmounted(i){window.removeEventListener("mousedown",i.clickAwayHandler,!0),delete i.clickAwayHandler}},xvi=Object.freeze(Object.defineProperty({__proto__:null,BIMDataClickAway:Cs,BIMDataClickInputAway:Cvi},Symbol.toStringTag,{value:"Module"})),kvi=i=>({install(e){Object.entries(QKe).forEach(([t,o])=>{e.component(t,o)}),Object.entries(xvi).forEach(([t,o])=>e.directive(t.split("BIMData")[1],o))}}),Mvi={name:"LiWrapper",render(){return Go("li",this.$slots.default())}};function Bvi(i,e){var t=new Set([]);return i.forEach(o=>{e.has(o)||t.add(o)}),t}const Xs=Ur("id"),Evi=({contextMenu:i,objects:e=[],state:t=i.$viewer.state,pictos:o})=>[{name:"selectAll",get group(){return i.groupPositions.select},position:1,get label(){return i.$t("context_menu.select_all")},get picto(){return o.get(this.name)},execute:()=>t.selectObjects(e.filter(us(Ci("visible"),Ud("selected"))).map(Xs)),predicate:()=>e.some(us(Ci("visible"),Ud("selected")))},{name:"deselectAll",get group(){return i.groupPositions.select},position:2,get label(){return i.$t("context_menu.deselect_all")},get picto(){return o.get(this.name)},execute:()=>t.deselectObjects(e.filter(Ci("selected")).map(Xs)),predicate:()=>e.some(Ci("selected"))},{name:"selectSimilar",get group(){return i.groupPositions.select},position:3,get label(){return i.$t("context_menu.select_similar")},get picto(){return o.get(this.name)},execute(){const n=e.filter(r=>r.visible&&r.type===this.selectedObject.type&&r.id!==this.selectedObject.id).map(Xs);t.selectObjects(n)},selectedObject:null,predicate(){const n=e.filter(us(Ci("visible"),Ci("selected")));return n.length===1&&n[0].type!==void 0?(this.selectedObject=n[0],!0):(this.selectedObject=null,!1)}},{name:"reverseSelection",get label(){return i.$t("context_menu.reverse_selection")},get group(){return i.groupPositions.select},position:4,execute:()=>{const n=new Set(e.filter(Ci("selected")).map(Xs)),r=new Set(e.filter(Ci("visible")).map(Xs));t.selectObjects(Array.from(Bvi(r,n)),{exclusive:!0})},predicate:()=>e.some(us(Ud("selected"),Ci("visible")))&&e.some(us(Ci("selected"),Ci("visible")))},{name:"showAll",get group(){return i.groupPositions.visibility},position:1,get label(){return i.$t("context_menu.show_all")},get picto(){return o.get(this.name)},execute:()=>t.showObjects(e.filter(Ud("visible")).map(Xs)),predicate:()=>e.some(Ud("visible"))},{name:"hide",get group(){return i.groupPositions.visibility},position:2,get label(){return i.$t("context_menu.hide")},get picto(){return o.get(this.name)},objectsToHide:null,execute(){const n=this.objectsToHide.filter(Ci("selected"));n.length>0&&t.deselectObjects(n.map(Xs)),t.hideObjects(this.objectsToHide.map(Xs))},predicate(){return this.objectsToHide=e.filter(us(Ci("selected"),Ci("visible"))),this.objectsToHide.length>0}},{name:"hideAll",get group(){return i.groupPositions.visibility},position:3,get label(){return i.$t("context_menu.hide_all")},execute:()=>{const n=e.filter(Ci("visible"));n.some(Ci("selected"))&&t.deselectObjects(n.filter(Ci("selected")).map(Xs)),t.hideObjects(n.map(Xs))},predicate:()=>e.some(Ci("visible"))}].filter(n=>n.predicate()),Pvi={components:{LiWrapper:Mvi},inject:["$viewer"],data(){return{defaultPrevented:!1,displayed:!1,top:null,bottom:null,left:null,width:200,nextCommandId:1,currentCommands:[],contextCommands:[],registeredCommands:[],groupPositions:{select:10,visibility:20},asyncPredicateRunning:!1}},computed:{position(){return{top:this.top?this.top+"px":"unset",bottom:this.bottom?this.bottom+"px":"unset",left:this.left+"px",width:this.width+"px"}}},watch:{displayed(i){i?document.addEventListener("keydown",this.onKeyDown):document.removeEventListener("keydown",this.onKeyDown)}},created(){this.$viewer.contextMenu=this,this.asyncPredicates=new Set},methods:{onKeyDown(i){i.key==="Escape"&&this.away()},setPosition(i){const e=(document.fullscreenElement?document.fullscreenElement:this.$parent.$el).getBoundingClientRect();this.left=i.clientX-e.left,this.top=i.clientY-e.top,this.left+this.width>e.width&&(this.left=this.left-this.width),i.clientY>e.top+e.height/2?(this.bottom=e.height-this.top,this.top=null):this.bottom=null},typeCheckCommand(i={}){let e=null;if((!i.execute||typeof i.execute!="function")&!i.component&&(e="Cannot register context menu command. A command must have an execute function or a component property."),i.label||(e="Cannot register context menu command. A command must have a label."),e)throw console.error(e),new Error(e);return i.id=this.nextCommandId++,i},open(i){this.currentCommands=[],this.setPosition(i),this.originEvent=i,i.preventDefault(),this.setCurrentCommands(),this.groupCurrentCommands(),this.defaultPrevented=!1,this.displayed=!0,document.fullscreenElement?(this.$el.parentElement.removeChild(this.$el),this.adoptiveParent=document.fullscreenElement,this.adoptiveParent.appendChild(this.$el)):this.adoptiveParent&&this.adoptiveParent!==this.$viewer.globalContext.el&&(this.adoptiveParent.removeChild(this.$el),this.$viewer.globalContext.el.appendChild(this.$el),this.adoptiveParent=null)},setCurrentCommands(){this.asyncPredicates.clear(),this.asyncPredicateRunning=!1,this.defaultPrevented||this.registeredCommands.forEach(async i=>{if(typeof i.predicate=="function"){const e=i.predicate(this.$viewer.globalContext.activeLocalContext);if(e===!0)this.currentCommands.push(i);else if(typeof e?.then=="function"){this.asyncPredicates.add(e),this.asyncPredicateRunning=!0;const t=await e;this.asyncPredicates.has(e)&&(this.asyncPredicates.delete(e),this.asyncPredicateRunning=this.asyncPredicates.size>0,t===!0&&this.currentCommands.push(i))}}else this.currentCommands.push(i)}),this.currentCommands.push(...this.contextCommands),this.contextCommands=[]},getDefaultCommands({objects:i=[],state:e=this.$viewer.state,context:t=null}){const o=new Map;return t&&this.$viewer.shortcutManager.getShortcuts(t).forEach(n=>o.set(n.name,n.key)),Evi({contextMenu:this,objects:i,state:e,pictos:o})},executeCommand(i){if(i.execute&&(i.execute(this.originEvent),this.displayed=!1),i.component&&!i.menu)throw new Error("Command with component property must have a `menu` property")},away(){this.displayed=!1},groupCurrentCommands(){const i=new Map;this.currentCommands.forEach(t=>{(t.group===null||t.group===void 0)&&(t.group=0),i.has(t.group)?i.get(t.group).push(t):i.set(t.group,[t])}),i.forEach(t=>t.sort((o,n)=>(o.position=o.position||0,n.position=n.position||0,o.position-n.position)));const e=[...i.keys()].sort((t,o)=>t-o).map(t=>i.get(t)).flat();this.currentCommands=e},isGroupIntersection(i){if(i===0)return!1;const e=this.currentCommands[i-1],t=this.currentCommands[i];return e.group<t.group},registerContextCommand(i){const e=this.typeCheckCommand(i);return this.contextCommands.push(e),i.id},registerCommand(i){const e=this.typeCheckCommand(i);return this.registeredCommands.push(e),i.id},unregisterCommand(i){return this.registeredCommands.find(e=>e.id===i)?(this.registeredCommands=this.registeredCommands.filter(e=>e.id!==i),!0):!1},preventDefault(){this.defaultPrevented=!0}}},Ivi={key:0,class:"separator"},Svi={class:"menu-text"},Tvi={key:1,class:"menu-picto"},Rvi={key:0,class:"context-menu__spinner"};function Lvi(i,e,t,o,n,r){const a=I("BIMDataIconChevron"),s=I("LiWrapper"),l=I("BIMDataSpinner"),c=si("click-away");return n.displayed&&(n.currentCommands.length||n.asyncPredicateRunning)?yt((M(),_("ul",{key:0,class:"bimdata-list context-menu",style:de(r.position)},[(M(!0),_($e,null,Bt(n.currentCommands,(d,u)=>(M(),J(s,{key:d.label,class:"context-menu__element",onClick:h=>r.executeCommand(d)},{default:N(()=>[r.isGroupIntersection(u)?(M(),_("div",Ivi)):te("",!0),b("div",Svi,z(d.label),1),!d.component&&d.picto?(M(),_("span",Tvi,z(d.picto),1)):d.component?(M(),J(a,{key:2,size:"xxs",class:"fill-primary"})):te("",!0)]),_:2},1032,["onClick"]))),128)),n.asyncPredicateRunning?(M(),_("li",Rvi,[S(l)])):te("",!0)],4)),[[c,r.away]]):te("",!0)}const Dvi=j(Pvi,[["render",Lvi],["__scopeId","data-v-5b87d4a3"]]),_vi={name:"ViewerHeader",inject:["$viewer"],props:{visible:{type:Boolean,default:!0}},setup(){const i=ct("$viewer"),e=Er(new Map),t=n=>{if(!n.name)throw new TypeError("[Viewer Header] Content must have a name");if(e.has(n.name))throw new Error(`[Viewer Header] Content with name ${n.name} already exists`);e.set(n.name,n)},o=n=>e.has(n)?(e.delete(n),!0):!1;return{logo:i.uiSettings.bimdataLogo!==!1,version:i.uiSettings.version!==!1?i.version:null,headerContent:e,headerRightContentComponents:Re(()=>Array.from(e.values()).filter(n=>n.position==="right").sort((n,r)=>n.order-r.order).map(n=>n.component)),headerLeftContentComponents:Re(()=>Array.from(e.values()).filter(n=>n.position==="left").sort((n,r)=>n.order-r.order).map(n=>n.component)),addContent:t,removeContent:o}}},Fvi={class:"viewer-header"},Ovi={class:"viewer-header__content"},Uvi={class:"viewer-header__content__left"},Nvi={class:"viewer-header__content__right"},jvi={key:0,class:"m-l-6 flex items-center"},Vvi={key:1,class:"viewer-header__version"};function Hvi(i,e,t,o,n,r){const a=I("BIMDataIllustration");return yt((M(),_("div",Fvi,[b("div",Ovi,[b("div",Uvi,[(M(!0),_($e,null,Bt(o.headerLeftContentComponents,s=>(M(),J(Eo(s),{key:s.name}))),128))]),b("div",Nvi,[(M(!0),_($e,null,Bt(o.headerRightContentComponents,s=>(M(),J(Eo(s),{key:s.name}))),128))])]),o.logo||o.version?(M(),_("div",jvi,[o.logo?(M(),J(a,{key:0,name:"logo",width:"30px",height:"30px"})):te("",!0),o.version?(M(),_("div",Vvi,z(o.version),1)):te("",!0)])):te("",!0)],512)),[[zt,t.visible]])}const zvi=j(_vi,[["render",Hvi],["__scopeId","data-v-5c9ea6b6"]]),qvi={emits:["resize"],setup(i,{emit:e}){return{onResizerMousedown:t=>{t.preventDefault();let o=t.clientX;const n=a=>{a.preventDefault();const s=a.clientX-o;o=a.clientX,e("resize",s)},r=a=>{a.preventDefault(),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",r)};window.addEventListener("mousemove",n),window.addEventListener("mouseup",r)}}}},Qvi={class:"bimdata-separator"};function Gvi(i,e,t,o,n,r){return M(),_("div",Qvi,[e[1]||(e[1]=b("div",{class:"bimdata-separator__line"},null,-1)),b("div",{class:"bimdata-separator__resizer",onMousedown:e[0]||(e[0]=(...a)=>o.onResizerMousedown&&o.onResizerMousedown(...a))},null,32)])}const Kvi=j(qvi,[["render",Gvi],["__scopeId","data-v-79a3b3af"]]),Jvi={components:{Separator:Kvi},props:{position:{type:String,required:!0,validator(i){return["left","right"].includes(i)}},sidePanel:{type:Object,required:!0,validator(i){if(i.width&&(typeof i.width!="number"||i.width<0))return console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof i.width}`),!1;const e=typeof i?.component=="object";return e||console.error("[GlobalSidePanel] sidePanel must have a component property"),e}}},setup(i){const e=le(null),t=le(i.sidePanel.width??400),o=(n,r=1)=>{const a=t.value+n*r;t.value=Math.max(0,a)};return pt(()=>i.sidePanel,()=>{Object.defineProperty(i.sidePanel,"width",{get(){return t.value},set(n){if(typeof n!="number"||n<=0){console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof n}`);return}t.value=n}}),Object.defineProperty(i.sidePanel,"componentInstance",{get(){return e.value},enumerable:!0})},{immediate:!0}),{componentInstance:e,width:t,onResize:o}}},Zvi={class:"bimdata-global-side-panel__component"};function Wvi(i,e,t,o,n,r){const a=I("Separator");return M(),_("div",{class:"bimdata-global-side-panel",style:de(`width: ${o.width}px`)},[t.sidePanel.resizable&&t.position==="right"?(M(),J(a,{key:0,onResize:e[0]||(e[0]=s=>o.onResize(s,-1))})):te("",!0),b("div",Zvi,[(M(),J(Eo(t.sidePanel.component),{ref:"componentInstance"},null,512))]),t.sidePanel.resizable&&t.position==="left"?(M(),J(a,{key:1,onResize:e[1]||(e[1]=s=>o.onResize(s))})):te("",!0)],4)}const Yvi=j(Jvi,[["render",Wvi],["__scopeId","data-v-82d0d4cb"]]),Xvi={name:"BimdataViewer",components:{ContextMenu:Dvi,ViewerHeader:zvi,ModalManager:Lhe,GlobalSidePanel:Yvi},setup(){const i=ct("$viewer"),{globalContext:e,shortcutManager:t}=i;ki(()=>{t&&t.destroy(),e.hub.clear()}),ai(()=>{i.pluginManager.runPluginsScripts(i)});const o=Re(()=>i.uiSettings.bimdataLogo!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)),n=Re(()=>i.uiSettings.version!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)?i.version:null),r=Re(()=>e.leftSidePanel),a=Re(()=>e.rightSidePanel),s=Re(()=>{const p=i.uiSettings.header!==!1,A=e.localContexts.length===1&&e.localContexts[0].window?.header===!1,f=!!(r.value||a.value);return p&&(!A||f)}),l=i.uiSettings.contextMenu!==!1,c=le(null);function d(p){l&&c.value.open(p)}function u(){i.shortcutManager.active=!0}function h(){i.shortcutManager.active=!1}return{Layout:i.layout.areas.component,onContextMenu:d,onMouseenter:u,onMouseleave:h,isHeaderVisible:s,viewerTemplateRef:e.templateRef,modalManagerTemplateRef:e.modalManagerTemplateRef,headerTemplateRef:e.headerTemplateRef,contextMenuTemplateRef:c,contextMenuEnabled:l,bimdataLogoOnSingleWindow:o,viewerVersionOnSingleWindow:n,version:i.version,loading:Re(()=>e.loading),spinner:Re(()=>e.spinner),leftSidePanel:r,rightSidePanel:a}}},$vi={key:1,class:"bimdata-context-loading-overlay",style:{"z-index":"3"}},e3i={key:2,class:"viewer__logo"},t3i={key:1,class:"version m-t-6"};function i3i(i,e,t,o,n,r){const a=I("ModalManager"),s=I("ContextMenu"),l=I("ViewerHeader"),c=I("GlobalSidePanel"),d=I("BIMDataSpinner"),u=I("BIMDataIllustration");return M(),_("div",{id:"bimdata-viewer",ref:"viewerTemplateRef",class:"bimdata-viewer bimdata-design-system bimdata-scrollbar",onContextmenu:e[0]||(e[0]=(...h)=>o.onContextMenu&&o.onContextMenu(...h)),onMouseenter:e[1]||(e[1]=(...h)=>o.onMouseenter&&o.onMouseenter(...h)),onMouseleave:e[2]||(e[2]=(...h)=>o.onMouseleave&&o.onMouseleave(...h))},[S(a,{ref:"modalManagerTemplateRef"},null,512),o.contextMenuEnabled?(M(),J(s,{key:0,ref:"contextMenuTemplateRef"},null,512)):te("",!0),S(l,{ref:"headerTemplateRef",visible:o.isHeaderVisible},null,8,["visible"]),b("div",{class:"bimdata-viewer__content",style:de(o.isHeaderVisible?"height: calc(100% - var(--bimdata-viewer-header-height, 40px))":"height: 100%")},[o.leftSidePanel?(M(),J(c,{key:0,"side-panel":o.leftSidePanel,position:"left"},null,8,["side-panel"])):te("",!0),(M(),J(Eo(o.Layout),{style:"height: 100%; flex-grow: 1;"})),o.rightSidePanel?(M(),J(c,{key:1,"side-panel":o.rightSidePanel,position:"right"},null,8,["side-panel"])):te("",!0)],4),o.loading?(M(),_("div",$vi,[o.spinner&&o.spinner.component?(M(),J(Eo(o.spinner.component),Da(En({key:0},o.spinner.props)),null,16)):(M(),J(d,{key:1,size:"40px",border:"5px"}))])):te("",!0),!o.isHeaderVisible&&(o.bimdataLogoOnSingleWindow||o.viewerVersionOnSingleWindow)?(M(),_("div",e3i,[o.bimdataLogoOnSingleWindow?(M(),J(u,{key:0,name:"logo"})):te("",!0),o.viewerVersionOnSingleWindow?(M(),_("div",t3i,z(o.version),1)):te("",!0)])):te("",!0)],544)}const o3i=j(Xvi,[["render",i3i],["__scopeId","data-v-0c1c941a"]]),r3i=["src"],n3i={class:"bimdata-models__header"},a3i={key:0,class:"bimdata-models__header__loader"},s3i={class:"bimdata-models__header__picto"},l3i={class:"bimdata-models__header__name"},c3i={key:0,class:"bimdata-models__header__name--empty"},d3i={key:1,class:"bimdata-models__header__name--empty"},u3i={key:3},h3i=["onMousemove","onClick"],p3i={__name:"Models",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(i){const e=i,t=ct("$viewer"),o=le(),n=le(0),r=le(0),a=le(),s=gi([]),l=le(!1),c=Re(()=>t.localContext.loadedModels),d=Re(()=>t.localContext.loadedModelIds),u=Re(()=>t.localContext.loadingModelIds),h=Re(()=>t.localContext.multiModel),p=Re(()=>(e.customFilter?s.value.filter(e.customFilter):s.value).map(k=>c.value.find(B=>B.document?.head_id!=null&&B.document.head_id===k.document.id)??k)),A=k=>d.value.includes(k),f=k=>u.value.includes(k),m=Re(()=>{const{x:k,y:B}=a.value?.getBoundingClientRect()??{x:0,y:0};return`top:${r.value-B}px; left:${n.value-k}px;`}),g=k=>{!h.value&&A(k.id)||u.value.length>0||(t.localContext.loadedModelIds.includes(k.id)?t.localContext.unloadModels([k.id]):t.localContext.loadModels([k.id]))},y=k=>{switch(k){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},v=(k,B)=>{k?.viewer_360_file&&(n.value=B.clientX,r.value=B.clientY),o.value=k?.viewer_360_file},w=async k=>{l.value=!0;try{return(await t.api.apiClient.modelApi.getModels(t.api.cloudId,t.api.projectId,void 0,void 0,k)).filter(B=>t.state.models.some(E=>E.archived)||!B.archived).sort(Bs("updated_at",!1))}catch(B){console.error("[Models] Cannot get project models. Error: ",B)}finally{l.value=!1}return[]},x=k=>k.children?.some(B=>A(B.id))??!1;return w(t.localContext.modelTypes).then(k=>{s.value=k}),(k,B)=>{const E=I("BIMDataSpinner"),P=I("BIMDataIconModel3D"),R=I("BIMDataTextbox"),T=I("BIMDataCheckbox"),L=I("BIMDataRadio"),F=I("BIMDataIcon"),U=I("BIMDataDropdownList");return M(),_("div",{ref_key:"templateRef",ref:a,class:ce(["bimdata-models",{"bimdata-models--window-positioning":i.windowPositioning}])},[o.value?(M(),_("div",{key:0,class:"bimdata-models__preview",style:de(m.value)},[b("img",{src:o.value},null,8,r3i)],4)):te("",!0),S(U,{style:de(`--bimdata-models-width: ${i.width};`),width:i.width,list:p.value,"element-key":"id","per-page":40,loading:l.value,class:"bimdata-models__list",disabled:p.value.length===0,onElementClick:g},{header:N(({isOpen:q})=>[b("div",n3i,[l.value||u.value.length>0?(M(),_("div",a3i,[S(E)])):(M(),_($e,{key:1},[b("div",s3i,[S(P)]),b("div",{class:ce(["bimdata-models__header__number bimdata-info-length",{"bimdata-models__header__number--empty":d.value.length===0}])},[b("span",null,z(d.value.length),1)],2),b("div",l3i,[p.value.length===0?(M(),_("span",c3i,z(k.$t("model.no_model")),1)):d.value.length===0?(M(),_("span",d3i,z(k.$t("model.no_loaded_model")),1)):d.value.length===1?(M(),J(R,{key:2,text:c.value[0].name,tooltip:!q},null,8,["text","tooltip"])):d.value.length>1?(M(),_("span",u3i,z(k.$t("model.selected_models")),1)):te("",!0)])],64))])]),element:N(({element:q,close:V})=>[b("div",{class:"bimdata-models__model",onMousemove:W=>i.preview&&v(q,W),onMouseout:B[0]||(B[0]=W=>i.preview&&v()),onClick:()=>{!h.value&&!A(q.id)&&V()}},[h.value?(M(),J(T,{key:0,"model-value":A(q.id)||x(q),disabled:q.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])):(M(),J(L,{key:1,"model-value":A(q.id)||x(q),disabled:q.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])),S(F,{margin:"0 calc(var(--spacing-unit) / 2)",name:y(q.status),size:"xs",class:ce({"fill-success":q.status==="C","fill-high":q.status==="E"})},null,8,["name","class"]),S(R,{class:ce({"bimdata-models__model__name":!0,"bimdata-models__model__name--disabled":q.status!=="C"||u.value.length>0}),text:q.name,width:`calc(100% -
|
|
5312
5312
|
${h.value?13:23}px - 2 * 6px - 16px)`},null,8,["class","text","width"]),q.document&&!q.document.is_head_version?(M(),J(F,{key:2,name:"versioning",fill:"",color:"default",size:"xs",margin:"0 0 0 6px"})):te("",!0)],40,h3i),f(q.id)?(M(),J(E,{key:0,class:"bimdata-models__model__spinner"})):te("",!0)]),_:1},8,["style","width","list","loading","disabled"])],2)}}},Uhe=j(p3i,[["__scopeId","data-v-34c2cf79"]]),f3i="data:image/svg+xml,%3csvg%20width='16'%20height='21'%20viewBox='0%200%2016%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.47193%202.76644C7.65699%202.84439%207.77716%203.02565%207.777%203.22661L7.77339%207.94624C7.77318%208.22238%207.54916%208.44655%207.27301%208.44693L2.4192%208.45366C2.21569%208.45394%202.03258%208.33085%201.95617%208.1424C1.87975%207.95394%201.92528%207.73773%202.07129%207.59566L6.92872%202.86931C7.0729%202.72902%207.28688%202.6885%207.47193%202.76644ZM3.65141%207.45195L6.77378%207.44762L6.7761%204.41157L3.65141%207.45195ZM5.81657%200.893911L6.02338%200.893274L13.3879%200.870595C14.679%200.866619%2015.7208%201.91642%2015.722%203.20083L15.2221%203.20237L15.722%203.20052L15.722%203.20083L15.745%2017.8999L15.745%2017.9002C15.7462%2019.1846%2014.7063%2020.2408%2013.4153%2020.2448L2.35929%2020.2788C1.07114%2020.2828%200.0171799%2019.2362%200.0159721%2017.9486L0.00563138%206.92409L0.00543684%206.71668L0.152103%206.56972L5.67032%201.04045L5.81657%200.893911ZM6.23113%201.89264L1.00582%207.12841L1.01597%2017.9455C1.01666%2018.6791%201.62068%2019.2811%202.35835%2019.2788L13.4143%2019.2448C14.1484%2019.2425%2014.7456%2018.6402%2014.745%2017.9035C14.745%2017.9034%2014.745%2017.9033%2014.745%2017.9033L14.722%203.20423L14.722%203.20391C14.7213%202.46716%2014.123%201.86833%2013.3888%201.87059L6.23113%201.89264Z'%20fill='%232F374A'/%3e%3c/svg%3e",A3i=["src"],g3i={key:0,class:"bimdata-multi-model-loader__header-container"},m3i={key:0,class:"bimdata-multi-model-loader__header__loader"},v3i={class:"bimdata-multi-model-loader__header__picto"},y3i=["src"],b3i={class:"bimdata-multi-model-loader__header__name"},w3i={key:0,class:"bimdata-multi-model-loader__header__name--empty"},C3i={key:1,class:"bimdata-multi-model-loader__header__name--empty"},x3i={key:3},k3i={key:1,class:"bimdata-multi-model-loader__main"},M3i=["onMousemove","onClick"],B3i={__name:"BIMDataMultiModelLoader",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(i){const e=i,t=ct("$viewer"),o=le(),n=le(0),r=le(0),a=le(),s=gi([]),l=le(!1),c=le(!0),d=L=>{L.key==="Escape"?c.value=!0:L.key==="Enter"&&E()};pt(c,L=>{L?(window.removeEventListener("keydown",d),v.clear(),y.clear(),o.value=null):window.addEventListener("keydown",d)});const u=Re(()=>t.localContext.loadedModels),h=Re(()=>t.localContext.loadedModelIds),p=Re(()=>t.localContext.loadingModelIds),A=Re(()=>t.localContext.multiModel),f=Re(()=>(e.customFilter?s.value.filter(e.customFilter):s.value).map(L=>u.value.find(F=>F.document?.head_id!=null&&F.document.head_id===L.document.id)??L)),m=L=>h.value.includes(L),g=L=>p.value.includes(L),y=Er(new Set),v=Er(new Set),w=L=>L.children?.some(F=>m(F.id))??!1,x=L=>(m(L.id)||w(L)||y.has(L))&&!v.has(L),k=Re(()=>{const{x:L,y:F}=a.value.getBoundingClientRect();return`top:${r.value-F}px; left:${n.value-L}px;`}),B=L=>{L.status==="C"&&(!A.value&&m(L.id)||(m(L.id)?v.has(L)?v.delete(L):v.add(L):y.has(L)?y.delete(L):y.add(L)))},E=()=>{y.size>0&&t.localContext.loadModels(Array.from(y).map(L=>L.id)),v.size>0&&t.localContext.unloadModels(Array.from(v).map(L=>L.id)),c.value=!0},P=L=>{switch(L){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},R=L=>L.document&&!L.document.is_head_version,T=(L,F)=>{!e.preview||c.value||(L?.viewer_360_file&&(n.value=F.clientX,r.value=F.clientY),o.value=L?.viewer_360_file)};return(async L=>{l.value=!0;try{return(await t.api.apiClient.modelApi.getModels(t.api.cloudId,t.api.projectId,void 0,void 0,L)).filter(F=>t.state.models.some(U=>U.archived)||!F.archived).sort(Bs("updated_at",!1))}catch(F){console.error("[Models] Cannot get project models. Error: ",F)}finally{l.value=!1}return[]})(t.localContext.modelTypes).then(L=>{s.value=L}),(L,F)=>{const U=I("BIMDataSpinner"),q=I("BIMDataTextbox"),V=I("BIMDataIconChevron"),W=I("BIMDataButton"),Y=I("BIMDataIconFileIfcPolychrome"),$=I("BIMDataCheckbox"),me=I("BIMDataRadio"),Ie=I("BIMDataIcon"),Se=I("BIMDataPaginatedList"),qe=si("click-away");return M(),_("div",{ref_key:"templateRef",ref:a,class:ce(["bimdata-multi-model-loader",{"bimdata-multi-model-loader--window-positioning":i.windowPositioning}])},[o.value?(M(),_("div",{key:0,class:"bimdata-multi-model-loader__preview",style:de(k.value)},[b("img",{src:o.value},null,8,A3i)],4)):te("",!0),S(hi,{name:"fade",mode:"out-in"},{default:N(()=>[c.value?(M(),_("div",g3i,[gt(L.$slots,"left",{},void 0,!0),b("div",{class:"bimdata-multi-model-loader__header",onClick:F[0]||(F[0]=Qe=>c.value=!1)},[l.value||p.value.length>0?(M(),_("div",m3i,[S(U)])):(M(),_($e,{key:1},[b("div",v3i,[b("img",{src:rt(f3i),alt:"file icon"},null,8,y3i)]),b("div",{class:ce(["bimdata-multi-model-loader__header__number bimdata-info-length",{"bimdata-multi-model-loader__header__number--empty":h.value.length===0}])},[b("span",null,z(h.value.length),1)],2),b("div",b3i,[f.value.length===0?(M(),_("span",w3i,z(L.$t("model.no_model")),1)):h.value.length===0?(M(),_("span",C3i,z(L.$t("model.no_loaded_model")),1)):h.value.length===1?(M(),J(q,{key:2,text:u.value[0].name,tooltip:c.value,width:"233px"},null,8,["text","tooltip"])):h.value.length>1?(M(),_("span",x3i,z(L.$t("model.selected_models")),1)):te("",!0)]),S(W,{color:"default",icon:"",radius:"",fill:"",width:"21px",height:"21px"},{default:N(()=>[S(V,{size:"xxxs"})]),_:1})],64))]),gt(L.$slots,"right",{},void 0,!0)])):yt((M(),_("div",k3i,[S(Se,{list:f.value,"per-page":10},{element:N(({element:Qe})=>[b("div",{class:ce(["bimdata-multi-model-loader__main__model",{"bimdata-multi-model-loader__main__model--disabled":Qe.status!=="C"}]),onMousemove:Ce=>T(Qe,Ce),onMouseout:F[1]||(F[1]=Ce=>T()),onClick:Ce=>B(Qe)},[S(Y,{fill:"",color:"default",size:"xs"}),A.value?(M(),J($,{key:0,"model-value":x(Qe),disabled:Qe.status!=="C"},null,8,["model-value","disabled"])):(M(),J(me,{key:1,"model-value":x(Qe),disabled:Qe.status!=="C"},null,8,["model-value","disabled"])),S(q,{class:ce({"bimdata-multi-model-loader__main__model__name":!0,"bimdata-multi-model-loader__main__model__name--disabled":Qe.status!=="C"}),text:Qe.name,width:R(Qe)?"333px":"363px"},null,8,["class","text","width"]),R(Qe)?(M(),J(Ie,{key:2,name:"versioning",fill:"",color:"default",size:"xs",margin:"0 0 0 6px"})):te("",!0),g(Qe.id)?(M(),J(U,{key:3,class:"bimdata-multi-model-loader__main__model__spinner"})):(M(),J(Ie,{key:4,name:P(Qe.status),size:"xs",class:ce({"fill-success":Qe.status==="C","fill-high":Qe.status==="E"})},null,8,["name","class"]))],42,M3i)]),_:1},8,["list"]),S(W,{class:"bimdata-multi-model-loader__main__validate",width:"93px",color:"primary",fill:"",radius:"",disabled:rt(y).size===0&&rt(v).size===0,onClick:E},{default:N(()=>[Ze(z(L.$t("global.validate")),1)]),_:1},8,["disabled"])])),[[qe,()=>c.value=!0]])]),_:3})],2)}}},E3i=j(B3i,[["__scopeId","data-v-44e6af66"]]),P3i={data(){return{shown:!1}},mounted(){setTimeout(()=>{this.shown=!0},500)}};function I3i(i,e,t,o,n,r){const a=I("BIMDataIllustration");return M(),_("div",{class:"bimdata__no-model",style:de({"--no-model--opacity":n.shown?1:0})},[S(a,{name:"emptyViewer",x:"90",y:"90"}),b("span",null,z(i.$t("model.select_model")),1)],4)}const Nhe=j(P3i,[["render",I3i],["__scopeId","data-v-5ffd9bc0"]]);window.BIMDataViewerVue=cO;class S3i{constructor(e={}){const{api:t={},ui:o}=e;this.uiCfg=o,t.apiUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `apiUrl` not set, use 'https://api.bimdata.io' by default."),t.apiUrl="https://api.bimdata.io"),t.archiveUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `archiveUrl` not set, use 'https://archive.bimdata.io' by default."),t.archiveUrl="https://archive.bimdata.io"),t.pdfBackendUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `pdfBackendUrl` not set, use 'https://pdf-backend.bimdata.io' by default."),t.pdfBackendUrl="https://pdf-backend.bimdata.io"),t.ifcIds&&(console.warn("[BIMData Viewer] DEPRECATED - Viewer config - please use the `modelIds` property instead of `ifcIds`."),t.modelIds===void 0&&(t.modelIds=t.ifcIds)),t.modelIds||(t.modelIds=[]),t.offline?.dataFile&&(t.offline.data=t.offline.dataFile),this.$viewer=new Omi(e),t.offline?.enabled?this.$viewer.api.enableOfflineMode(t.offline.data,t.offline.options).then(()=>this.state.loadModels(t.modelIds)):(this.$viewer.globalContext.loadingProcessStart(),this.state.loadModels(t.modelIds).finally(()=>this.$viewer.globalContext.loadingProcessEnd())),this.vueApp=null}get state(){return this.$viewer.state}get api(){return this.$viewer.api}async mount(e,t="3d"){const{$viewer:o}=this;await o.api.ready;try{const d=await o.api.apiClient.collaborationApi.checkProjectAccess(o.api.cloudId,o.api.projectId);o.api.permissions=Ohe(d)}catch{o.api.permissions=Ohe()}const n=this.api.accessToken,{i18n:r}=o;r.registerTranslations(o.pluginManager.pluginTranslations),o.layout.apply(t);const a={i18n:r.i18nVuePlugin,data(){return{accessToken:n}},render(){return Go(o3i,{style:"height: 100%"})}},s=a5(a).use(r.i18nVuePlugin).use(kvi()).use(wvi({i18nPlugin:r.i18nVuePlugin})).use(Xmi({apiClient:o.api.apiClient,i18nPlugin:r.i18nVuePlugin}));s.provide("$viewer",o),s.provide("BIMDATA_DESIGN_SYSTEM_DARK_THEME",Re(()=>o.darkTheme)),s.component("BIMDataModelLoader",Uhe),s.component("BIMDataMultiModelLoader",E3i),s.component("BIMDataNoModelWindowPlaceHolder",Nhe),s.component("BIMDataStoreySelector",AM),s.component("ModelsLoader",Uhe),s.component("NoModelWindowPlaceHolder",Nhe);const l=e instanceof HTMLElement?e:document.querySelector(e);l&&(l.style.height="100%");const c=s.mount(e);return c.$viewer=o,Umi(c.$el,this.uiCfg?.style),typeof window<"u"&&(window.bimdataViewer=c),this.vueApp=s,c}destroy(){this.vueApp?.unmount()}setLocale(e){if(!BO.includes(e))throw new Error(`Viewer available locales are ${BO.join(", ")}.`);this.$viewer.i18n.locale=e}registerPlugin(e){this.$viewer.registerPlugin(e)}registerWindow(e){return this.$viewer.windowManager.registerWindow(e)}unregisterWindow(e){return this.$viewer.windowManager.unregisterWindow(e)}setAccessToken(e){this.api.accessToken=e}async loadModels(e){this.$viewer.globalContext.loadingProcessStart();const t=await this.state.loadModels(e);return this.$viewer.globalContext.loadingProcessEnd(),t}loadIfcs(e){return console.warn("[BIMData Viewer] DEPRECATED - Viewer - please use the loadModels method instead of loadIfcs."),this.loadModels(e)}}const jhe=(i={})=>new S3i(i);window.makeBIMDataViewer=jhe;export{jhe as default};
|